feat: yarn build no errors
This commit is contained in:
1 parent
1c19032884
commit
9f4a62e2ef
25 files changed
+786
-322
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import { withValidation } from "next-validations";
|
||||
import { z } from "zod";
|
||||
|
||||
import { EventTypeModel, _EventTypeCustomInputModel as EventTypeCustomInput } from "@calcom/prisma/zod";
|
||||
|
||||
export const schemaEventTypeCustomInputBaseBodyParams = EventTypeCustomInput.omit({
|
||||
id: true,
|
||||
eventTypeId: true,
|
||||
}).partial();
|
||||
|
||||
export const schemaEventTypeCustomInputPublic = EventTypeCustomInput.omit({});
|
||||
|
||||
const schemaEventTypeCustomInputRequiredParams = z.object({
|
||||
label: z.string(),
|
||||
// uid: z.string(),
|
||||
eventType: EventTypeModel.optional(),
|
||||
|
||||
// eventType: z.instanceof(EventTypeInputModel),
|
||||
});
|
||||
|
||||
export const schemaEventTypeCustomInputBodyParams = schemaEventTypeCustomInputBaseBodyParams.merge(
|
||||
schemaEventTypeCustomInputRequiredParams
|
||||
);
|
||||
|
||||
export const withValidEventTypeCustomInput = withValidation({
|
||||
schema: schemaEventTypeCustomInputBodyParams,
|
||||
type: "Zod",
|
||||
mode: "body",
|
||||
});
|
||||
@@ -1,8 +1,18 @@
|
||||
import { withValidation } from "next-validations";
|
||||
import { z } from "zod";
|
||||
|
||||
import { _ScheduleModel as Schedule } from "@calcom/prisma/zod";
|
||||
|
||||
export const schemaScheduleBodyParams = Schedule.omit({ id: true }).partial();
|
||||
// import { jsonSchema } from "./shared/jsonSchema";
|
||||
|
||||
const schemaScheduleBaseBodyParams = Schedule.omit({ id: true }).partial();
|
||||
|
||||
const schemaScheduleRequiredParams = z.object({
|
||||
userId: z.number(),
|
||||
name: z.string(),
|
||||
});
|
||||
|
||||
export const schemaScheduleBodyParams = schemaScheduleBaseBodyParams.merge(schemaScheduleRequiredParams);
|
||||
|
||||
export const schemaSchedulePublic = Schedule.omit({});
|
||||
|
||||
|
||||
@@ -1,10 +1,28 @@
|
||||
import { withValidation } from "next-validations";
|
||||
import { z } from "zod";
|
||||
|
||||
import { _SelectedCalendarModel as SelectedCalendar } from "@calcom/prisma/zod";
|
||||
import { _UserModel, _SelectedCalendarModel as SelectedCalendar } from "@calcom/prisma/zod";
|
||||
|
||||
export const schemaSelectedCalendarBodyParams = SelectedCalendar.omit({}).partial();
|
||||
export const schemaSelectedCalendarBaseBodyParams = SelectedCalendar.omit({ userId: true }).partial();
|
||||
|
||||
export const schemaSelectedCalendarPublic = SelectedCalendar.omit({ userId: true });
|
||||
export const schemaSelectedCalendarPublic = SelectedCalendar.omit({});
|
||||
|
||||
const schemaSelectedCalendarRequiredParams = z.object({
|
||||
externalId: z.string(),
|
||||
integration: z.string(),
|
||||
user: z.object({
|
||||
connect: z.object({
|
||||
id: z.number().optional(),
|
||||
username: z.string().optional(),
|
||||
email: z.string().optional(),
|
||||
}),
|
||||
create: z.any(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const schemaSelectedCalendarBodyParams = schemaSelectedCalendarBaseBodyParams.merge(
|
||||
schemaSelectedCalendarRequiredParams
|
||||
);
|
||||
|
||||
export const withValidSelectedCalendar = withValidation({
|
||||
schema: schemaSelectedCalendarBodyParams,
|
||||
|
||||
Reference in new issue
Block a user