diff --git a/lib/validations/booking.ts b/lib/validations/booking.ts index b43c2c8ac9..53da5396aa 100644 --- a/lib/validations/booking.ts +++ b/lib/validations/booking.ts @@ -23,6 +23,8 @@ const schemaBookingEditParams = z title: z.string().optional(), startTime: iso8601.optional(), endTime: iso8601.optional(), + // Not supporting responses in edit as that might require re-triggering emails + // responses }) .strict(); @@ -61,4 +63,5 @@ export const schemaBookingReadPublic = Booking.extend({ user: true, metadata: true, status: true, + responses: true, }); diff --git a/lib/validations/event-type.ts b/lib/validations/event-type.ts index a84305736b..5f3f4f2f02 100644 --- a/lib/validations/event-type.ts +++ b/lib/validations/event-type.ts @@ -1,7 +1,7 @@ import { z } from "zod"; import { _EventTypeModel as EventType, _HostModel } from "@calcom/prisma/zod"; -import { customInputSchema } from "@calcom/prisma/zod-utils"; +import { customInputSchema, eventTypeBookingFields } from "@calcom/prisma/zod-utils"; import { Frequency } from "~/lib/types"; @@ -65,6 +65,7 @@ const schemaEventTypeCreateParams = z recurringEvent: recurringEventInputSchema.optional(), seatsPerTimeSlot: z.number().optional(), seatsShowAttendees: z.boolean().optional(), + bookingFields: eventTypeBookingFields, }) .strict(); @@ -79,6 +80,7 @@ const schemaEventTypeEditParams = z length: z.number().int().optional(), seatsPerTimeSlot: z.number().optional(), seatsShowAttendees: z.boolean().optional(), + bookingFields: eventTypeBookingFields, }) .strict(); @@ -116,6 +118,7 @@ export const schemaEventTypeReadPublic = EventType.pick({ metadata: true, seatsPerTimeSlot: true, seatsShowAttendees: true, + bookingFields: true, }).merge( z.object({ locations: z