Place the crust in a 9-inch fluted tart pan with 2-inch sides and a removable bottom. Press dough into pan. Trim excess dough along edges. Refrigerate for 30 minutes while preparing the filling.
For the filling:
Slice tomatoes into ¼ inch slices and remove seeds if desired. Lay slices on triple thickness paper towels and sprinkle with one teaspoon of salt. Let sit for 30 minutes. Flip and let them drain from the other side for at least 15 minutes.
In a small bowl combine the Gruyere and Parmesan cheeses, mayonnaise, basil, thyme, ½ teaspoon salt, freshly ground black pepper, and one lightly beaten egg.
To assemble pie:
Preheat oven to 425 degrees. Pat tomato slices with paper towel to remove excess moisture. Add minced onion to bottom of pie crust. Top onion with ⅓ of the cheese mixture. Layer ⅓ of the tomatoes over cheese mixture. Top tomatoes with ⅓ of cheese mixture. Repeat with another layer of tomatoes and cheese mixture. Arrange the last tomatoes on top of pie in an overlapping pattern.Place pie on baking sheet and place in oven. Bake for 40 to 45 minutes.
Cool completely before cutting. Serve at room temperature.