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(),
|
title: z.string().optional(),
|
||||||
startTime: iso8601.optional(),
|
startTime: iso8601.optional(),
|
||||||
endTime: iso8601.optional(),
|
endTime: iso8601.optional(),
|
||||||
|
// Not supporting responses in edit as that might require re-triggering emails
|
||||||
|
// responses
|
||||||
})
|
})
|
||||||
.strict();
|
.strict();
|
||||||
|
|
||||||
|
@ -61,4 +63,5 @@ export const schemaBookingReadPublic = Booking.extend({
|
||||||
user: true,
|
user: true,
|
||||||
metadata: true,
|
metadata: true,
|
||||||
status: true,
|
status: true,
|
||||||
|
responses: true,
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import { _EventTypeModel as EventType, _HostModel } from "@calcom/prisma/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";
|
import { Frequency } from "~/lib/types";
|
||||||
|
|
||||||
|
@ -65,6 +65,7 @@ const schemaEventTypeCreateParams = z
|
||||||
recurringEvent: recurringEventInputSchema.optional(),
|
recurringEvent: recurringEventInputSchema.optional(),
|
||||||
seatsPerTimeSlot: z.number().optional(),
|
seatsPerTimeSlot: z.number().optional(),
|
||||||
seatsShowAttendees: z.boolean().optional(),
|
seatsShowAttendees: z.boolean().optional(),
|
||||||
|
bookingFields: eventTypeBookingFields,
|
||||||
})
|
})
|
||||||
.strict();
|
.strict();
|
||||||
|
|
||||||
|
@ -79,6 +80,7 @@ const schemaEventTypeEditParams = z
|
||||||
length: z.number().int().optional(),
|
length: z.number().int().optional(),
|
||||||
seatsPerTimeSlot: z.number().optional(),
|
seatsPerTimeSlot: z.number().optional(),
|
||||||
seatsShowAttendees: z.boolean().optional(),
|
seatsShowAttendees: z.boolean().optional(),
|
||||||
|
bookingFields: eventTypeBookingFields,
|
||||||
})
|
})
|
||||||
.strict();
|
.strict();
|
||||||
|
|
||||||
|
@ -116,6 +118,7 @@ export const schemaEventTypeReadPublic = EventType.pick({
|
||||||
metadata: true,
|
metadata: true,
|
||||||
seatsPerTimeSlot: true,
|
seatsPerTimeSlot: true,
|
||||||
seatsShowAttendees: true,
|
seatsShowAttendees: true,
|
||||||
|
bookingFields: true,
|
||||||
}).merge(
|
}).merge(
|
||||||
z.object({
|
z.object({
|
||||||
locations: z
|
locations: z
|
||||||
|
|
Loading…
Reference in New Issue