fix: hack around create/connect issues for now
parent
9f4a62e2ef
commit
fc795f963b
|
@ -1,7 +1,7 @@
|
|||
import { withValidation } from "next-validations";
|
||||
import { z } from "zod";
|
||||
|
||||
import { EventTypeModel, _EventTypeCustomInputModel as EventTypeCustomInput } from "@calcom/prisma/zod";
|
||||
import { _EventTypeCustomInputModel as EventTypeCustomInput } from "@calcom/prisma/zod";
|
||||
|
||||
export const schemaEventTypeCustomInputBaseBodyParams = EventTypeCustomInput.omit({
|
||||
id: true,
|
||||
|
@ -12,10 +12,18 @@ export const schemaEventTypeCustomInputPublic = EventTypeCustomInput.omit({});
|
|||
|
||||
const schemaEventTypeCustomInputRequiredParams = z.object({
|
||||
label: z.string(),
|
||||
// uid: z.string(),
|
||||
eventType: EventTypeModel.optional(),
|
||||
|
||||
// eventType: z.instanceof(EventTypeInputModel),
|
||||
required: z.boolean(),
|
||||
// eventType: EventTypeModel.optional(),
|
||||
type: z.enum(["TEXT", "TEXTLONG", "NUMBER", "BOOL"]),
|
||||
eventType: z.object({
|
||||
connect: z.object({
|
||||
id: z.number().optional(),
|
||||
// username: z.string().optional(),
|
||||
// email: z.string().optional(),
|
||||
}),
|
||||
// FIXME: Provide valid EventTypeModel schema here, but not sure how yet.
|
||||
create: z.any(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const schemaEventTypeCustomInputBodyParams = schemaEventTypeCustomInputBaseBodyParams.merge(
|
||||
|
|
|
@ -3,8 +3,6 @@ import { z } from "zod";
|
|||
|
||||
import { _ScheduleModel as Schedule } from "@calcom/prisma/zod";
|
||||
|
||||
// import { jsonSchema } from "./shared/jsonSchema";
|
||||
|
||||
const schemaScheduleBaseBodyParams = Schedule.omit({ id: true }).partial();
|
||||
|
||||
const schemaScheduleRequiredParams = z.object({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { withValidation } from "next-validations";
|
||||
import { z } from "zod";
|
||||
|
||||
import { _UserModel, _SelectedCalendarModel as SelectedCalendar } from "@calcom/prisma/zod";
|
||||
import { _SelectedCalendarModel as SelectedCalendar } from "@calcom/prisma/zod";
|
||||
|
||||
export const schemaSelectedCalendarBaseBodyParams = SelectedCalendar.omit({ userId: true }).partial();
|
||||
|
||||
|
@ -16,6 +16,7 @@ const schemaSelectedCalendarRequiredParams = z.object({
|
|||
username: z.string().optional(),
|
||||
email: z.string().optional(),
|
||||
}),
|
||||
// FIXME: Provide valid UserModel schema here, but not sure how yet.
|
||||
create: z.any(),
|
||||
}),
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue