2022-04-02 01:46:24 +00:00
|
|
|
import { z } from "zod";
|
2022-03-26 23:58:22 +00:00
|
|
|
|
2022-03-30 15:37:51 +00:00
|
|
|
import { _DailyEventReferenceModel as DailyEventReference } from "@calcom/prisma/zod";
|
|
|
|
|
2022-04-27 17:25:36 +00:00
|
|
|
export const schemaDailyEventReferenceBaseBodyParams = DailyEventReference.pick({
|
|
|
|
dailytoken: true,
|
|
|
|
dailyurl: true,
|
|
|
|
bookingId: true,
|
|
|
|
}).partial();
|
2022-04-02 01:46:24 +00:00
|
|
|
|
2022-04-27 17:45:59 +00:00
|
|
|
const schemaDailyEventReferenceCreateParams = z
|
|
|
|
.object({
|
|
|
|
dailytoken: z.string(),
|
|
|
|
dailyurl: z.string(),
|
|
|
|
bookingId: z.number(),
|
|
|
|
})
|
|
|
|
.strict();
|
2022-04-02 01:46:24 +00:00
|
|
|
|
2022-04-27 17:25:36 +00:00
|
|
|
export const schemaDailyEventReferenceCreateBodyParams = schemaDailyEventReferenceBaseBodyParams.merge(
|
|
|
|
schemaDailyEventReferenceCreateParams
|
2022-04-02 01:46:24 +00:00
|
|
|
);
|
2022-03-30 15:37:51 +00:00
|
|
|
|
2022-04-27 17:45:59 +00:00
|
|
|
const schemaDailyEventReferenceEditParams = z
|
|
|
|
.object({
|
|
|
|
dailytoken: z.string().optional(),
|
|
|
|
dailyurl: z.string().optional(),
|
|
|
|
})
|
|
|
|
.strict();
|
2022-03-30 15:37:51 +00:00
|
|
|
|
2022-04-27 17:25:36 +00:00
|
|
|
export const schemaDailyEventReferenceEditBodyParams = schemaDailyEventReferenceBaseBodyParams.merge(
|
|
|
|
schemaDailyEventReferenceEditParams
|
|
|
|
);
|
|
|
|
export const schemaDailyEventReferenceReadPublic = DailyEventReference.pick({
|
|
|
|
id: true,
|
|
|
|
dailytoken: true,
|
|
|
|
dailyurl: true,
|
|
|
|
bookingId: true,
|
2022-03-26 23:58:22 +00:00
|
|
|
});
|