chore: api-v2 slotInterval, afterEventBuffer, beforeEventBuffer min 0 (#15039)
This commit is contained in:
@@ -55,6 +55,7 @@ export class CreateEventTypeInput {
|
||||
disableGuests?: boolean;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@IsOptional()
|
||||
slotInterval?: number;
|
||||
|
||||
@@ -64,10 +65,12 @@ export class CreateEventTypeInput {
|
||||
minimumBookingNotice?: number;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@IsOptional()
|
||||
beforeEventBuffer?: number;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@IsOptional()
|
||||
afterEventBuffer?: number;
|
||||
|
||||
|
||||
@@ -336,10 +336,12 @@ export class UpdateEventTypeInput {
|
||||
minimumBookingNotice?: number;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@IsOptional()
|
||||
beforeEventBuffer?: number;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@IsOptional()
|
||||
afterEventBuffer?: number;
|
||||
|
||||
@@ -376,6 +378,7 @@ export class UpdateEventTypeInput {
|
||||
// currency?: string;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@IsOptional()
|
||||
slotInterval?: number;
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ export const createEventTypeInput = z.object({
|
||||
locations: imports.eventTypeLocations,
|
||||
metadata: imports.EventTypeMetaDataSchema.optional(),
|
||||
disableGuests: z.boolean().optional(),
|
||||
slotInterval: z.number().nullish(),
|
||||
slotInterval: z.number().min(0).nullish(),
|
||||
minimumBookingNotice: z.number().int().min(0).optional(),
|
||||
beforeEventBuffer: z.number().int().optional(),
|
||||
afterEventBuffer: z.number().int().optional(),
|
||||
beforeEventBuffer: z.number().int().min(0).optional(),
|
||||
afterEventBuffer: z.number().int().min(0).optional(),
|
||||
})
|
||||
.partial({ hidden: true, locations: true })
|
||||
.refine((data) => (data.teamId ? data.teamId && data.schedulingType : true), {
|
||||
|
||||
Reference in New Issue
Block a user