2022-04-01 23:55:41 +00:00
|
|
|
import { z } from "zod";
|
2022-03-26 23:58:22 +00:00
|
|
|
|
2022-03-30 15:37:51 +00:00
|
|
|
import { _ScheduleModel as Schedule } from "@calcom/prisma/zod";
|
|
|
|
|
2022-04-01 23:55:41 +00:00
|
|
|
const schemaScheduleBaseBodyParams = Schedule.omit({ id: true }).partial();
|
|
|
|
|
|
|
|
const schemaScheduleRequiredParams = z.object({
|
2022-10-05 13:56:27 +00:00
|
|
|
userId: z.number().optional(),
|
2022-04-01 23:55:41 +00:00
|
|
|
name: z.string(),
|
|
|
|
});
|
|
|
|
|
|
|
|
export const schemaScheduleBodyParams = schemaScheduleBaseBodyParams.merge(schemaScheduleRequiredParams);
|
2022-03-30 15:37:51 +00:00
|
|
|
|
|
|
|
export const schemaSchedulePublic = Schedule.omit({});
|