API Support: Manage Booking Questions and responses (#253)
Works with https://github.com/calcom/cal.com/pull/8115pull/9078/head
parent
9654677664
commit
0d1ad23c57
|
@ -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,
|
||||
});
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue