39 lines
1023 B
TypeScript
39 lines
1023 B
TypeScript
import { z } from "zod";
|
|
|
|
import { _DailyEventReferenceModel as DailyEventReference } from "@calcom/prisma/zod";
|
|
|
|
export const schemaDailyEventReferenceBaseBodyParams = DailyEventReference.pick({
|
|
dailytoken: true,
|
|
dailyurl: true,
|
|
bookingId: true,
|
|
}).partial();
|
|
|
|
const schemaDailyEventReferenceCreateParams = z
|
|
.object({
|
|
dailytoken: z.string(),
|
|
dailyurl: z.string(),
|
|
bookingId: z.number(),
|
|
})
|
|
.strict();
|
|
|
|
export const schemaDailyEventReferenceCreateBodyParams = schemaDailyEventReferenceBaseBodyParams.merge(
|
|
schemaDailyEventReferenceCreateParams
|
|
);
|
|
|
|
const schemaDailyEventReferenceEditParams = z
|
|
.object({
|
|
dailytoken: z.string().optional(),
|
|
dailyurl: z.string().optional(),
|
|
})
|
|
.strict();
|
|
|
|
export const schemaDailyEventReferenceEditBodyParams = schemaDailyEventReferenceBaseBodyParams.merge(
|
|
schemaDailyEventReferenceEditParams
|
|
);
|
|
export const schemaDailyEventReferenceReadPublic = DailyEventReference.pick({
|
|
id: true,
|
|
dailytoken: true,
|
|
dailyurl: true,
|
|
bookingId: true,
|
|
});
|