* refactor: replace timeZone string validation with timeZoneSchema - Replace all instances of timeZone: z.string() with timeZoneSchema - Preserve modifiers (.optional(), .default(), .nullish()) where present - Fix VideoApiAdapter to use organizer's timezone value - Remove redundant isSupportedTimeZone import from booking.ts - Add timeZoneSchema import where needed * Update index.ts * fix: conflicts Signed-off-by: Omar López <zomars@me.com> * Update yarn.lock * Discard changes to yarn.lock * Update booking.ts * Discard changes to packages/platform/types/me.ts * Discard changes to packages/platform/types/me/outputs/me.ts * Discard changes to packages/platform/types/schedules/schedules-2024-04-15/schedules.ts * Discard changes to packages/features/ee/cal-ai-phone/zod-utils.ts --------- Signed-off-by: Omar López <zomars@me.com>
31 lines
629 B
TypeScript
31 lines
629 B
TypeScript
import { z } from "zod";
|
|
|
|
import { timeZoneSchema } from "@calcom/lib/dayjs/timeZone.schema";
|
|
|
|
export const ZUpdateInputSchema = z.object({
|
|
scheduleId: z.number(),
|
|
timeZone: timeZoneSchema.optional(),
|
|
name: z.string().optional(),
|
|
isDefault: z.boolean().optional(),
|
|
schedule: z
|
|
.array(
|
|
z.array(
|
|
z.object({
|
|
start: z.date(),
|
|
end: z.date(),
|
|
})
|
|
)
|
|
)
|
|
.optional(),
|
|
dateOverrides: z
|
|
.array(
|
|
z.object({
|
|
start: z.date(),
|
|
end: z.date(),
|
|
})
|
|
)
|
|
.optional(),
|
|
});
|
|
|
|
export type TUpdateInputSchema = z.infer<typeof ZUpdateInputSchema>;
|