Regenerates zod files (#1896)
This commit is contained in:
parent
2194b92fdf
commit
d702bcf0a3
20 changed files with 236 additions and 334 deletions
|
@ -1,6 +1,6 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { CompleteBooking, BookingModel } from "./index";
|
import { CompleteBooking, BookingModel } from "./index"
|
||||||
|
|
||||||
export const _AttendeeModel = z.object({
|
export const _AttendeeModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -9,10 +9,10 @@ export const _AttendeeModel = z.object({
|
||||||
timeZone: z.string(),
|
timeZone: z.string(),
|
||||||
locale: z.string().nullish(),
|
locale: z.string().nullish(),
|
||||||
bookingId: z.number().int().nullish(),
|
bookingId: z.number().int().nullish(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteAttendee extends z.infer<typeof _AttendeeModel> {
|
export interface CompleteAttendee extends z.infer<typeof _AttendeeModel> {
|
||||||
booking?: CompleteBooking | null;
|
booking?: CompleteBooking | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,8 +20,6 @@ export interface CompleteAttendee extends z.infer<typeof _AttendeeModel> {
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const AttendeeModel: z.ZodSchema<CompleteAttendee> = z.lazy(() =>
|
export const AttendeeModel: z.ZodSchema<CompleteAttendee> = z.lazy(() => _AttendeeModel.extend({
|
||||||
_AttendeeModel.extend({
|
|
||||||
booking: BookingModel.nullish(),
|
booking: BookingModel.nullish(),
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { CompleteUser, UserModel, CompleteEventType, EventTypeModel } from "./index";
|
import { CompleteUser, UserModel, CompleteEventType, EventTypeModel } from "./index"
|
||||||
|
|
||||||
export const _AvailabilityModel = z.object({
|
export const _AvailabilityModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -11,11 +11,11 @@ export const _AvailabilityModel = z.object({
|
||||||
startTime: z.date(),
|
startTime: z.date(),
|
||||||
endTime: z.date(),
|
endTime: z.date(),
|
||||||
date: z.date().nullish(),
|
date: z.date().nullish(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteAvailability extends z.infer<typeof _AvailabilityModel> {
|
export interface CompleteAvailability extends z.infer<typeof _AvailabilityModel> {
|
||||||
user?: CompleteUser | null;
|
user?: CompleteUser | null
|
||||||
eventType?: CompleteEventType | null;
|
eventType?: CompleteEventType | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,9 +23,7 @@ export interface CompleteAvailability extends z.infer<typeof _AvailabilityModel>
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const AvailabilityModel: z.ZodSchema<CompleteAvailability> = z.lazy(() =>
|
export const AvailabilityModel: z.ZodSchema<CompleteAvailability> = z.lazy(() => _AvailabilityModel.extend({
|
||||||
_AvailabilityModel.extend({
|
|
||||||
user: UserModel.nullish(),
|
user: UserModel.nullish(),
|
||||||
eventType: EventTypeModel.nullish(),
|
eventType: EventTypeModel.nullish(),
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,22 +1,7 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { BookingStatus } from "@prisma/client";
|
import { BookingStatus } from "@prisma/client"
|
||||||
import {
|
import { CompleteUser, UserModel, CompleteBookingReference, BookingReferenceModel, CompleteEventType, EventTypeModel, CompleteAttendee, AttendeeModel, CompleteDailyEventReference, DailyEventReferenceModel, CompletePayment, PaymentModel, CompleteDestinationCalendar, DestinationCalendarModel } from "./index"
|
||||||
CompleteUser,
|
|
||||||
UserModel,
|
|
||||||
CompleteBookingReference,
|
|
||||||
BookingReferenceModel,
|
|
||||||
CompleteEventType,
|
|
||||||
EventTypeModel,
|
|
||||||
CompleteAttendee,
|
|
||||||
AttendeeModel,
|
|
||||||
CompleteDailyEventReference,
|
|
||||||
DailyEventReferenceModel,
|
|
||||||
CompletePayment,
|
|
||||||
PaymentModel,
|
|
||||||
CompleteDestinationCalendar,
|
|
||||||
DestinationCalendarModel,
|
|
||||||
} from "./index";
|
|
||||||
|
|
||||||
export const _BookingModel = z.object({
|
export const _BookingModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -36,16 +21,16 @@ export const _BookingModel = z.object({
|
||||||
paid: z.boolean(),
|
paid: z.boolean(),
|
||||||
cancellationReason: z.string().nullish(),
|
cancellationReason: z.string().nullish(),
|
||||||
rejectionReason: z.string().nullish(),
|
rejectionReason: z.string().nullish(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteBooking extends z.infer<typeof _BookingModel> {
|
export interface CompleteBooking extends z.infer<typeof _BookingModel> {
|
||||||
user?: CompleteUser | null;
|
user?: CompleteUser | null
|
||||||
references: CompleteBookingReference[];
|
references: CompleteBookingReference[]
|
||||||
eventType?: CompleteEventType | null;
|
eventType?: CompleteEventType | null
|
||||||
attendees: CompleteAttendee[];
|
attendees: CompleteAttendee[]
|
||||||
dailyRef?: CompleteDailyEventReference | null;
|
dailyRef?: CompleteDailyEventReference | null
|
||||||
payment: CompletePayment[];
|
payment: CompletePayment[]
|
||||||
destinationCalendar?: CompleteDestinationCalendar | null;
|
destinationCalendar?: CompleteDestinationCalendar | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,8 +38,7 @@ export interface CompleteBooking extends z.infer<typeof _BookingModel> {
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const BookingModel: z.ZodSchema<CompleteBooking> = z.lazy(() =>
|
export const BookingModel: z.ZodSchema<CompleteBooking> = z.lazy(() => _BookingModel.extend({
|
||||||
_BookingModel.extend({
|
|
||||||
user: UserModel.nullish(),
|
user: UserModel.nullish(),
|
||||||
references: BookingReferenceModel.array(),
|
references: BookingReferenceModel.array(),
|
||||||
eventType: EventTypeModel.nullish(),
|
eventType: EventTypeModel.nullish(),
|
||||||
|
@ -62,5 +46,4 @@ export const BookingModel: z.ZodSchema<CompleteBooking> = z.lazy(() =>
|
||||||
dailyRef: DailyEventReferenceModel.nullish(),
|
dailyRef: DailyEventReferenceModel.nullish(),
|
||||||
payment: PaymentModel.array(),
|
payment: PaymentModel.array(),
|
||||||
destinationCalendar: DestinationCalendarModel.nullish(),
|
destinationCalendar: DestinationCalendarModel.nullish(),
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { CompleteBooking, BookingModel } from "./index";
|
import { CompleteBooking, BookingModel } from "./index"
|
||||||
|
|
||||||
export const _BookingReferenceModel = z.object({
|
export const _BookingReferenceModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -10,10 +10,10 @@ export const _BookingReferenceModel = z.object({
|
||||||
meetingPassword: z.string().nullish(),
|
meetingPassword: z.string().nullish(),
|
||||||
meetingUrl: z.string().nullish(),
|
meetingUrl: z.string().nullish(),
|
||||||
bookingId: z.number().int().nullish(),
|
bookingId: z.number().int().nullish(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteBookingReference extends z.infer<typeof _BookingReferenceModel> {
|
export interface CompleteBookingReference extends z.infer<typeof _BookingReferenceModel> {
|
||||||
booking?: CompleteBooking | null;
|
booking?: CompleteBooking | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,8 +21,6 @@ export interface CompleteBookingReference extends z.infer<typeof _BookingReferen
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const BookingReferenceModel: z.ZodSchema<CompleteBookingReference> = z.lazy(() =>
|
export const BookingReferenceModel: z.ZodSchema<CompleteBookingReference> = z.lazy(() => _BookingReferenceModel.extend({
|
||||||
_BookingReferenceModel.extend({
|
|
||||||
booking: BookingModel.nullish(),
|
booking: BookingModel.nullish(),
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,24 +1,22 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { CompleteUser, UserModel } from "./index";
|
import { CompleteUser, UserModel } from "./index"
|
||||||
|
|
||||||
// Helper schema for JSON fields
|
// Helper schema for JSON fields
|
||||||
type Literal = boolean | number | string;
|
type Literal = boolean | number | string
|
||||||
type Json = Literal | { [key: string]: Json } | Json[];
|
type Json = Literal | { [key: string]: Json } | Json[]
|
||||||
const literalSchema = z.union([z.string(), z.number(), z.boolean()]);
|
const literalSchema = z.union([z.string(), z.number(), z.boolean()])
|
||||||
const jsonSchema: z.ZodSchema<Json> = z.lazy(() =>
|
const jsonSchema: z.ZodSchema<Json> = z.lazy(() => z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)]))
|
||||||
z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)])
|
|
||||||
);
|
|
||||||
|
|
||||||
export const _CredentialModel = z.object({
|
export const _CredentialModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
type: z.string(),
|
type: z.string(),
|
||||||
key: jsonSchema,
|
key: jsonSchema,
|
||||||
userId: z.number().int().nullish(),
|
userId: z.number().int().nullish(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteCredential extends z.infer<typeof _CredentialModel> {
|
export interface CompleteCredential extends z.infer<typeof _CredentialModel> {
|
||||||
user?: CompleteUser | null;
|
user?: CompleteUser | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,8 +24,6 @@ export interface CompleteCredential extends z.infer<typeof _CredentialModel> {
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const CredentialModel: z.ZodSchema<CompleteCredential> = z.lazy(() =>
|
export const CredentialModel: z.ZodSchema<CompleteCredential> = z.lazy(() => _CredentialModel.extend({
|
||||||
_CredentialModel.extend({
|
|
||||||
user: UserModel.nullish(),
|
user: UserModel.nullish(),
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { CompleteBooking, BookingModel } from "./index";
|
import { CompleteBooking, BookingModel } from "./index"
|
||||||
|
|
||||||
export const _DailyEventReferenceModel = z.object({
|
export const _DailyEventReferenceModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
dailyurl: z.string(),
|
dailyurl: z.string(),
|
||||||
dailytoken: z.string(),
|
dailytoken: z.string(),
|
||||||
bookingId: z.number().int().nullish(),
|
bookingId: z.number().int().nullish(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteDailyEventReference extends z.infer<typeof _DailyEventReferenceModel> {
|
export interface CompleteDailyEventReference extends z.infer<typeof _DailyEventReferenceModel> {
|
||||||
booking?: CompleteBooking | null;
|
booking?: CompleteBooking | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,8 +18,6 @@ export interface CompleteDailyEventReference extends z.infer<typeof _DailyEventR
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const DailyEventReferenceModel: z.ZodSchema<CompleteDailyEventReference> = z.lazy(() =>
|
export const DailyEventReferenceModel: z.ZodSchema<CompleteDailyEventReference> = z.lazy(() => _DailyEventReferenceModel.extend({
|
||||||
_DailyEventReferenceModel.extend({
|
|
||||||
booking: BookingModel.nullish(),
|
booking: BookingModel.nullish(),
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import {
|
import { CompleteUser, UserModel, CompleteBooking, BookingModel, CompleteEventType, EventTypeModel } from "./index"
|
||||||
CompleteUser,
|
|
||||||
UserModel,
|
|
||||||
CompleteBooking,
|
|
||||||
BookingModel,
|
|
||||||
CompleteEventType,
|
|
||||||
EventTypeModel,
|
|
||||||
} from "./index";
|
|
||||||
|
|
||||||
export const _DestinationCalendarModel = z.object({
|
export const _DestinationCalendarModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -16,12 +9,12 @@ export const _DestinationCalendarModel = z.object({
|
||||||
userId: z.number().int().nullish(),
|
userId: z.number().int().nullish(),
|
||||||
bookingId: z.number().int().nullish(),
|
bookingId: z.number().int().nullish(),
|
||||||
eventTypeId: z.number().int().nullish(),
|
eventTypeId: z.number().int().nullish(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteDestinationCalendar extends z.infer<typeof _DestinationCalendarModel> {
|
export interface CompleteDestinationCalendar extends z.infer<typeof _DestinationCalendarModel> {
|
||||||
user?: CompleteUser | null;
|
user?: CompleteUser | null
|
||||||
booking?: CompleteBooking | null;
|
booking?: CompleteBooking | null
|
||||||
eventType?: CompleteEventType | null;
|
eventType?: CompleteEventType | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,10 +22,8 @@ export interface CompleteDestinationCalendar extends z.infer<typeof _Destination
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const DestinationCalendarModel: z.ZodSchema<CompleteDestinationCalendar> = z.lazy(() =>
|
export const DestinationCalendarModel: z.ZodSchema<CompleteDestinationCalendar> = z.lazy(() => _DestinationCalendarModel.extend({
|
||||||
_DestinationCalendarModel.extend({
|
|
||||||
user: UserModel.nullish(),
|
user: UserModel.nullish(),
|
||||||
booking: BookingModel.nullish(),
|
booking: BookingModel.nullish(),
|
||||||
eventType: EventTypeModel.nullish(),
|
eventType: EventTypeModel.nullish(),
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,30 +1,13 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { PeriodType, SchedulingType } from "@prisma/client";
|
import { PeriodType, SchedulingType } from "@prisma/client"
|
||||||
import {
|
import { CompleteUser, UserModel, CompleteTeam, TeamModel, CompleteBooking, BookingModel, CompleteAvailability, AvailabilityModel, CompleteDestinationCalendar, DestinationCalendarModel, CompleteEventTypeCustomInput, EventTypeCustomInputModel, CompleteSchedule, ScheduleModel } from "./index"
|
||||||
CompleteUser,
|
|
||||||
UserModel,
|
|
||||||
CompleteTeam,
|
|
||||||
TeamModel,
|
|
||||||
CompleteBooking,
|
|
||||||
BookingModel,
|
|
||||||
CompleteAvailability,
|
|
||||||
AvailabilityModel,
|
|
||||||
CompleteDestinationCalendar,
|
|
||||||
DestinationCalendarModel,
|
|
||||||
CompleteEventTypeCustomInput,
|
|
||||||
EventTypeCustomInputModel,
|
|
||||||
CompleteSchedule,
|
|
||||||
ScheduleModel,
|
|
||||||
} from "./index";
|
|
||||||
|
|
||||||
// Helper schema for JSON fields
|
// Helper schema for JSON fields
|
||||||
type Literal = boolean | number | string;
|
type Literal = boolean | number | string
|
||||||
type Json = Literal | { [key: string]: Json } | Json[];
|
type Json = Literal | { [key: string]: Json } | Json[]
|
||||||
const literalSchema = z.union([z.string(), z.number(), z.boolean()]);
|
const literalSchema = z.union([z.string(), z.number(), z.boolean()])
|
||||||
const jsonSchema: z.ZodSchema<Json> = z.lazy(() =>
|
const jsonSchema: z.ZodSchema<Json> = z.lazy(() => z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)]))
|
||||||
z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)])
|
|
||||||
);
|
|
||||||
|
|
||||||
export const _EventTypeModel = z.object({
|
export const _EventTypeModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -52,16 +35,16 @@ export const _EventTypeModel = z.object({
|
||||||
currency: z.string(),
|
currency: z.string(),
|
||||||
slotInterval: z.number().int().nullish(),
|
slotInterval: z.number().int().nullish(),
|
||||||
metadata: jsonSchema,
|
metadata: jsonSchema,
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteEventType extends z.infer<typeof _EventTypeModel> {
|
export interface CompleteEventType extends z.infer<typeof _EventTypeModel> {
|
||||||
users: CompleteUser[];
|
users: CompleteUser[]
|
||||||
team?: CompleteTeam | null;
|
team?: CompleteTeam | null
|
||||||
bookings: CompleteBooking[];
|
bookings: CompleteBooking[]
|
||||||
availability: CompleteAvailability[];
|
availability: CompleteAvailability[]
|
||||||
destinationCalendar?: CompleteDestinationCalendar | null;
|
destinationCalendar?: CompleteDestinationCalendar | null
|
||||||
customInputs: CompleteEventTypeCustomInput[];
|
customInputs: CompleteEventTypeCustomInput[]
|
||||||
Schedule: CompleteSchedule[];
|
Schedule: CompleteSchedule[]
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,8 +52,7 @@ export interface CompleteEventType extends z.infer<typeof _EventTypeModel> {
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const EventTypeModel: z.ZodSchema<CompleteEventType> = z.lazy(() =>
|
export const EventTypeModel: z.ZodSchema<CompleteEventType> = z.lazy(() => _EventTypeModel.extend({
|
||||||
_EventTypeModel.extend({
|
|
||||||
users: UserModel.array(),
|
users: UserModel.array(),
|
||||||
team: TeamModel.nullish(),
|
team: TeamModel.nullish(),
|
||||||
bookings: BookingModel.array(),
|
bookings: BookingModel.array(),
|
||||||
|
@ -78,5 +60,4 @@ export const EventTypeModel: z.ZodSchema<CompleteEventType> = z.lazy(() =>
|
||||||
destinationCalendar: DestinationCalendarModel.nullish(),
|
destinationCalendar: DestinationCalendarModel.nullish(),
|
||||||
customInputs: EventTypeCustomInputModel.array(),
|
customInputs: EventTypeCustomInputModel.array(),
|
||||||
Schedule: ScheduleModel.array(),
|
Schedule: ScheduleModel.array(),
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { EventTypeCustomInputType } from "@prisma/client";
|
import { EventTypeCustomInputType } from "@prisma/client"
|
||||||
import { CompleteEventType, EventTypeModel } from "./index";
|
import { CompleteEventType, EventTypeModel } from "./index"
|
||||||
|
|
||||||
export const _EventTypeCustomInputModel = z.object({
|
export const _EventTypeCustomInputModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -10,10 +10,10 @@ export const _EventTypeCustomInputModel = z.object({
|
||||||
type: z.nativeEnum(EventTypeCustomInputType),
|
type: z.nativeEnum(EventTypeCustomInputType),
|
||||||
required: z.boolean(),
|
required: z.boolean(),
|
||||||
placeholder: z.string(),
|
placeholder: z.string(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteEventTypeCustomInput extends z.infer<typeof _EventTypeCustomInputModel> {
|
export interface CompleteEventTypeCustomInput extends z.infer<typeof _EventTypeCustomInputModel> {
|
||||||
eventType: CompleteEventType;
|
eventType: CompleteEventType
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,8 +21,6 @@ export interface CompleteEventTypeCustomInput extends z.infer<typeof _EventTypeC
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const EventTypeCustomInputModel: z.ZodSchema<CompleteEventTypeCustomInput> = z.lazy(() =>
|
export const EventTypeCustomInputModel: z.ZodSchema<CompleteEventTypeCustomInput> = z.lazy(() => _EventTypeCustomInputModel.extend({
|
||||||
_EventTypeCustomInputModel.extend({
|
|
||||||
eventType: EventTypeModel,
|
eventType: EventTypeModel,
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
export * from "./eventtype";
|
export * from "./eventtype"
|
||||||
export * from "./credential";
|
export * from "./credential"
|
||||||
export * from "./destinationcalendar";
|
export * from "./destinationcalendar"
|
||||||
export * from "./user";
|
export * from "./user"
|
||||||
export * from "./team";
|
export * from "./team"
|
||||||
export * from "./membership";
|
export * from "./membership"
|
||||||
export * from "./verificationrequest";
|
export * from "./verificationrequest"
|
||||||
export * from "./bookingreference";
|
export * from "./bookingreference"
|
||||||
export * from "./attendee";
|
export * from "./attendee"
|
||||||
export * from "./dailyeventreference";
|
export * from "./dailyeventreference"
|
||||||
export * from "./booking";
|
export * from "./booking"
|
||||||
export * from "./schedule";
|
export * from "./schedule"
|
||||||
export * from "./availability";
|
export * from "./availability"
|
||||||
export * from "./selectedcalendar";
|
export * from "./selectedcalendar"
|
||||||
export * from "./eventtypecustominput";
|
export * from "./eventtypecustominput"
|
||||||
export * from "./resetpasswordrequest";
|
export * from "./resetpasswordrequest"
|
||||||
export * from "./remindermail";
|
export * from "./remindermail"
|
||||||
export * from "./payment";
|
export * from "./payment"
|
||||||
export * from "./webhook";
|
export * from "./webhook"
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { MembershipRole } from "@prisma/client";
|
import { MembershipRole } from "@prisma/client"
|
||||||
import { CompleteTeam, TeamModel, CompleteUser, UserModel } from "./index";
|
import { CompleteTeam, TeamModel, CompleteUser, UserModel } from "./index"
|
||||||
|
|
||||||
export const _MembershipModel = z.object({
|
export const _MembershipModel = z.object({
|
||||||
teamId: z.number().int(),
|
teamId: z.number().int(),
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
accepted: z.boolean(),
|
accepted: z.boolean(),
|
||||||
role: z.nativeEnum(MembershipRole),
|
role: z.nativeEnum(MembershipRole),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteMembership extends z.infer<typeof _MembershipModel> {
|
export interface CompleteMembership extends z.infer<typeof _MembershipModel> {
|
||||||
team: CompleteTeam;
|
team: CompleteTeam
|
||||||
user: CompleteUser;
|
user: CompleteUser
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,9 +20,7 @@ export interface CompleteMembership extends z.infer<typeof _MembershipModel> {
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const MembershipModel: z.ZodSchema<CompleteMembership> = z.lazy(() =>
|
export const MembershipModel: z.ZodSchema<CompleteMembership> = z.lazy(() => _MembershipModel.extend({
|
||||||
_MembershipModel.extend({
|
|
||||||
team: TeamModel,
|
team: TeamModel,
|
||||||
user: UserModel,
|
user: UserModel,
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { PaymentType } from "@prisma/client";
|
import { PaymentType } from "@prisma/client"
|
||||||
import { CompleteBooking, BookingModel } from "./index";
|
import { CompleteBooking, BookingModel } from "./index"
|
||||||
|
|
||||||
// Helper schema for JSON fields
|
// Helper schema for JSON fields
|
||||||
type Literal = boolean | number | string;
|
type Literal = boolean | number | string
|
||||||
type Json = Literal | { [key: string]: Json } | Json[];
|
type Json = Literal | { [key: string]: Json } | Json[]
|
||||||
const literalSchema = z.union([z.string(), z.number(), z.boolean()]);
|
const literalSchema = z.union([z.string(), z.number(), z.boolean()])
|
||||||
const jsonSchema: z.ZodSchema<Json> = z.lazy(() =>
|
const jsonSchema: z.ZodSchema<Json> = z.lazy(() => z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)]))
|
||||||
z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)])
|
|
||||||
);
|
|
||||||
|
|
||||||
export const _PaymentModel = z.object({
|
export const _PaymentModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -23,10 +21,10 @@ export const _PaymentModel = z.object({
|
||||||
refunded: z.boolean(),
|
refunded: z.boolean(),
|
||||||
data: jsonSchema,
|
data: jsonSchema,
|
||||||
externalId: z.string(),
|
externalId: z.string(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompletePayment extends z.infer<typeof _PaymentModel> {
|
export interface CompletePayment extends z.infer<typeof _PaymentModel> {
|
||||||
booking?: CompleteBooking | null;
|
booking?: CompleteBooking | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,8 +32,6 @@ export interface CompletePayment extends z.infer<typeof _PaymentModel> {
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const PaymentModel: z.ZodSchema<CompletePayment> = z.lazy(() =>
|
export const PaymentModel: z.ZodSchema<CompletePayment> = z.lazy(() => _PaymentModel.extend({
|
||||||
_PaymentModel.extend({
|
|
||||||
booking: BookingModel.nullish(),
|
booking: BookingModel.nullish(),
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { ReminderType } from "@prisma/client";
|
import { ReminderType } from "@prisma/client"
|
||||||
|
|
||||||
export const _ReminderMailModel = z.object({
|
export const _ReminderMailModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -8,4 +8,4 @@ export const _ReminderMailModel = z.object({
|
||||||
reminderType: z.nativeEnum(ReminderType),
|
reminderType: z.nativeEnum(ReminderType),
|
||||||
elapsedMinutes: z.number().int(),
|
elapsedMinutes: z.number().int(),
|
||||||
createdAt: z.date(),
|
createdAt: z.date(),
|
||||||
});
|
})
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
|
|
||||||
export const _ResetPasswordRequestModel = z.object({
|
export const _ResetPasswordRequestModel = z.object({
|
||||||
id: z.string(),
|
id: z.string(),
|
||||||
|
@ -7,4 +7,4 @@ export const _ResetPasswordRequestModel = z.object({
|
||||||
updatedAt: z.date(),
|
updatedAt: z.date(),
|
||||||
email: z.string(),
|
email: z.string(),
|
||||||
expires: z.date(),
|
expires: z.date(),
|
||||||
});
|
})
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { CompleteUser, UserModel, CompleteEventType, EventTypeModel } from "./index";
|
import { CompleteUser, UserModel, CompleteEventType, EventTypeModel } from "./index"
|
||||||
|
|
||||||
// Helper schema for JSON fields
|
// Helper schema for JSON fields
|
||||||
type Literal = boolean | number | string;
|
type Literal = boolean | number | string
|
||||||
type Json = Literal | { [key: string]: Json } | Json[];
|
type Json = Literal | { [key: string]: Json } | Json[]
|
||||||
const literalSchema = z.union([z.string(), z.number(), z.boolean()]);
|
const literalSchema = z.union([z.string(), z.number(), z.boolean()])
|
||||||
const jsonSchema: z.ZodSchema<Json> = z.lazy(() =>
|
const jsonSchema: z.ZodSchema<Json> = z.lazy(() => z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)]))
|
||||||
z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)])
|
|
||||||
);
|
|
||||||
|
|
||||||
export const _ScheduleModel = z.object({
|
export const _ScheduleModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -16,11 +14,11 @@ export const _ScheduleModel = z.object({
|
||||||
eventTypeId: z.number().int().nullish(),
|
eventTypeId: z.number().int().nullish(),
|
||||||
title: z.string().nullish(),
|
title: z.string().nullish(),
|
||||||
freeBusyTimes: jsonSchema,
|
freeBusyTimes: jsonSchema,
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteSchedule extends z.infer<typeof _ScheduleModel> {
|
export interface CompleteSchedule extends z.infer<typeof _ScheduleModel> {
|
||||||
user?: CompleteUser | null;
|
user?: CompleteUser | null
|
||||||
eventType?: CompleteEventType | null;
|
eventType?: CompleteEventType | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,9 +26,7 @@ export interface CompleteSchedule extends z.infer<typeof _ScheduleModel> {
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const ScheduleModel: z.ZodSchema<CompleteSchedule> = z.lazy(() =>
|
export const ScheduleModel: z.ZodSchema<CompleteSchedule> = z.lazy(() => _ScheduleModel.extend({
|
||||||
_ScheduleModel.extend({
|
|
||||||
user: UserModel.nullish(),
|
user: UserModel.nullish(),
|
||||||
eventType: EventTypeModel.nullish(),
|
eventType: EventTypeModel.nullish(),
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { CompleteUser, UserModel } from "./index";
|
import { CompleteUser, UserModel } from "./index"
|
||||||
|
|
||||||
export const _SelectedCalendarModel = z.object({
|
export const _SelectedCalendarModel = z.object({
|
||||||
userId: z.number().int(),
|
userId: z.number().int(),
|
||||||
integration: z.string(),
|
integration: z.string(),
|
||||||
externalId: z.string(),
|
externalId: z.string(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteSelectedCalendar extends z.infer<typeof _SelectedCalendarModel> {
|
export interface CompleteSelectedCalendar extends z.infer<typeof _SelectedCalendarModel> {
|
||||||
user: CompleteUser;
|
user: CompleteUser
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,8 +17,6 @@ export interface CompleteSelectedCalendar extends z.infer<typeof _SelectedCalend
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const SelectedCalendarModel: z.ZodSchema<CompleteSelectedCalendar> = z.lazy(() =>
|
export const SelectedCalendarModel: z.ZodSchema<CompleteSelectedCalendar> = z.lazy(() => _SelectedCalendarModel.extend({
|
||||||
_SelectedCalendarModel.extend({
|
|
||||||
user: UserModel,
|
user: UserModel,
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { CompleteMembership, MembershipModel, CompleteEventType, EventTypeModel } from "./index";
|
import { CompleteMembership, MembershipModel, CompleteEventType, EventTypeModel } from "./index"
|
||||||
|
|
||||||
export const _TeamModel = z.object({
|
export const _TeamModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -9,11 +9,11 @@ export const _TeamModel = z.object({
|
||||||
logo: z.string().nullish(),
|
logo: z.string().nullish(),
|
||||||
bio: z.string().nullish(),
|
bio: z.string().nullish(),
|
||||||
hideBranding: z.boolean(),
|
hideBranding: z.boolean(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteTeam extends z.infer<typeof _TeamModel> {
|
export interface CompleteTeam extends z.infer<typeof _TeamModel> {
|
||||||
members: CompleteMembership[];
|
members: CompleteMembership[]
|
||||||
eventTypes: CompleteEventType[];
|
eventTypes: CompleteEventType[]
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,9 +21,7 @@ export interface CompleteTeam extends z.infer<typeof _TeamModel> {
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const TeamModel: z.ZodSchema<CompleteTeam> = z.lazy(() =>
|
export const TeamModel: z.ZodSchema<CompleteTeam> = z.lazy(() => _TeamModel.extend({
|
||||||
_TeamModel.extend({
|
|
||||||
members: MembershipModel.array(),
|
members: MembershipModel.array(),
|
||||||
eventTypes: EventTypeModel.array(),
|
eventTypes: EventTypeModel.array(),
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,34 +1,13 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { IdentityProvider, UserPlan } from "@prisma/client";
|
import { IdentityProvider, UserPlan } from "@prisma/client"
|
||||||
import {
|
import { CompleteEventType, EventTypeModel, CompleteCredential, CredentialModel, CompleteMembership, MembershipModel, CompleteBooking, BookingModel, CompleteAvailability, AvailabilityModel, CompleteSelectedCalendar, SelectedCalendarModel, CompleteSchedule, ScheduleModel, CompleteWebhook, WebhookModel, CompleteDestinationCalendar, DestinationCalendarModel } from "./index"
|
||||||
CompleteEventType,
|
|
||||||
EventTypeModel,
|
|
||||||
CompleteCredential,
|
|
||||||
CredentialModel,
|
|
||||||
CompleteMembership,
|
|
||||||
MembershipModel,
|
|
||||||
CompleteBooking,
|
|
||||||
BookingModel,
|
|
||||||
CompleteAvailability,
|
|
||||||
AvailabilityModel,
|
|
||||||
CompleteSelectedCalendar,
|
|
||||||
SelectedCalendarModel,
|
|
||||||
CompleteSchedule,
|
|
||||||
ScheduleModel,
|
|
||||||
CompleteWebhook,
|
|
||||||
WebhookModel,
|
|
||||||
CompleteDestinationCalendar,
|
|
||||||
DestinationCalendarModel,
|
|
||||||
} from "./index";
|
|
||||||
|
|
||||||
// Helper schema for JSON fields
|
// Helper schema for JSON fields
|
||||||
type Literal = boolean | number | string;
|
type Literal = boolean | number | string
|
||||||
type Json = Literal | { [key: string]: Json } | Json[];
|
type Json = Literal | { [key: string]: Json } | Json[]
|
||||||
const literalSchema = z.union([z.string(), z.number(), z.boolean()]);
|
const literalSchema = z.union([z.string(), z.number(), z.boolean()])
|
||||||
const jsonSchema: z.ZodSchema<Json> = z.lazy(() =>
|
const jsonSchema: z.ZodSchema<Json> = z.lazy(() => z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)]))
|
||||||
z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)])
|
|
||||||
);
|
|
||||||
|
|
||||||
export const _UserModel = z.object({
|
export const _UserModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -59,18 +38,18 @@ export const _UserModel = z.object({
|
||||||
away: z.boolean(),
|
away: z.boolean(),
|
||||||
metadata: jsonSchema,
|
metadata: jsonSchema,
|
||||||
verified: z.boolean().nullish(),
|
verified: z.boolean().nullish(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteUser extends z.infer<typeof _UserModel> {
|
export interface CompleteUser extends z.infer<typeof _UserModel> {
|
||||||
eventTypes: CompleteEventType[];
|
eventTypes: CompleteEventType[]
|
||||||
credentials: CompleteCredential[];
|
credentials: CompleteCredential[]
|
||||||
teams: CompleteMembership[];
|
teams: CompleteMembership[]
|
||||||
bookings: CompleteBooking[];
|
bookings: CompleteBooking[]
|
||||||
availability: CompleteAvailability[];
|
availability: CompleteAvailability[]
|
||||||
selectedCalendars: CompleteSelectedCalendar[];
|
selectedCalendars: CompleteSelectedCalendar[]
|
||||||
Schedule: CompleteSchedule[];
|
Schedule: CompleteSchedule[]
|
||||||
webhooks: CompleteWebhook[];
|
webhooks: CompleteWebhook[]
|
||||||
destinationCalendar?: CompleteDestinationCalendar | null;
|
destinationCalendar?: CompleteDestinationCalendar | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -78,8 +57,7 @@ export interface CompleteUser extends z.infer<typeof _UserModel> {
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const UserModel: z.ZodSchema<CompleteUser> = z.lazy(() =>
|
export const UserModel: z.ZodSchema<CompleteUser> = z.lazy(() => _UserModel.extend({
|
||||||
_UserModel.extend({
|
|
||||||
eventTypes: EventTypeModel.array(),
|
eventTypes: EventTypeModel.array(),
|
||||||
credentials: CredentialModel.array(),
|
credentials: CredentialModel.array(),
|
||||||
teams: MembershipModel.array(),
|
teams: MembershipModel.array(),
|
||||||
|
@ -89,5 +67,4 @@ export const UserModel: z.ZodSchema<CompleteUser> = z.lazy(() =>
|
||||||
Schedule: ScheduleModel.array(),
|
Schedule: ScheduleModel.array(),
|
||||||
webhooks: WebhookModel.array(),
|
webhooks: WebhookModel.array(),
|
||||||
destinationCalendar: DestinationCalendarModel.nullish(),
|
destinationCalendar: DestinationCalendarModel.nullish(),
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
|
|
||||||
export const _VerificationRequestModel = z.object({
|
export const _VerificationRequestModel = z.object({
|
||||||
id: z.number().int(),
|
id: z.number().int(),
|
||||||
|
@ -8,4 +8,4 @@ export const _VerificationRequestModel = z.object({
|
||||||
expires: z.date(),
|
expires: z.date(),
|
||||||
createdAt: z.date(),
|
createdAt: z.date(),
|
||||||
updatedAt: z.date(),
|
updatedAt: z.date(),
|
||||||
});
|
})
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import * as z from "zod";
|
import * as z from "zod"
|
||||||
import * as imports from "../zod-utils";
|
import * as imports from "../zod-utils"
|
||||||
import { WebhookTriggerEvents } from "@prisma/client";
|
import { WebhookTriggerEvents } from "@prisma/client"
|
||||||
import { CompleteUser, UserModel } from "./index";
|
import { CompleteUser, UserModel } from "./index"
|
||||||
|
|
||||||
export const _WebhookModel = z.object({
|
export const _WebhookModel = z.object({
|
||||||
id: z.string(),
|
id: z.string(),
|
||||||
|
@ -11,10 +11,10 @@ export const _WebhookModel = z.object({
|
||||||
createdAt: z.date(),
|
createdAt: z.date(),
|
||||||
active: z.boolean(),
|
active: z.boolean(),
|
||||||
eventTriggers: z.nativeEnum(WebhookTriggerEvents).array(),
|
eventTriggers: z.nativeEnum(WebhookTriggerEvents).array(),
|
||||||
});
|
})
|
||||||
|
|
||||||
export interface CompleteWebhook extends z.infer<typeof _WebhookModel> {
|
export interface CompleteWebhook extends z.infer<typeof _WebhookModel> {
|
||||||
user: CompleteUser;
|
user: CompleteUser
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,8 +22,6 @@ export interface CompleteWebhook extends z.infer<typeof _WebhookModel> {
|
||||||
*
|
*
|
||||||
* NOTE: Lazy required in case of potential circular dependencies within schema
|
* NOTE: Lazy required in case of potential circular dependencies within schema
|
||||||
*/
|
*/
|
||||||
export const WebhookModel: z.ZodSchema<CompleteWebhook> = z.lazy(() =>
|
export const WebhookModel: z.ZodSchema<CompleteWebhook> = z.lazy(() => _WebhookModel.extend({
|
||||||
_WebhookModel.extend({
|
|
||||||
user: UserModel,
|
user: UserModel,
|
||||||
})
|
}))
|
||||||
);
|
|
||||||
|
|
Loading…
Reference in a new issue