Scheduling infrastructure for absolutely everyone.
fix: hack around create/connect issues for now
Agusti Fernandez Pardofc795f963ba6
diff --git a/lib/validations/event-type-custom-input.ts b/lib/validations/event-type-custom-input.tsindex 4898af83bdb..ea1e80c3bb1 100644--- a/lib/validations/event-type-custom-input.ts+++ b/lib/validations/event-type-custom-input.ts@@ -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(diff --git a/lib/validations/schedule.ts b/lib/validations/schedule.tsindex e71ecbfba89..e5782a08d78 100644--- a/lib/validations/schedule.ts+++ b/lib/validations/schedule.ts@@ -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({diff --git a/lib/validations/selected-calendar.ts b/lib/validations/selected-calendar.tsindex 64eee4e401c..4eab89d9374 100644--- a/lib/validations/selected-calendar.ts+++ b/lib/validations/selected-calendar.ts@@ -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(),}),});diff --git a/pages/api/event-type-custom-inputs/[id]/edit.ts.fixme b/pages/api/event-type-custom-inputs/[id]/edit.tssimilarity index 100%rename from pages/api/event-type-custom-inputs/[id]/edit.ts.fixmerename to pages/api/event-type-custom-inputs/[id]/edit.tsdiff --git a/pages/api/event-type-custom-inputs/new.ts.fixme b/pages/api/event-type-custom-inputs/new.tssimilarity index 100%rename from pages/api/event-type-custom-inputs/new.ts.fixmerename to pages/api/event-type-custom-inputs/new.ts