* 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 <[email protected]> * 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 <[email protected]>
20 lines
634 B
TypeScript
20 lines
634 B
TypeScript
import { z } from "zod";
|
|
|
|
import { timeZoneSchema } from "@calcom/lib/dayjs/timeZone.schema";
|
|
|
|
import { assignUserToAttributeSchema } from "../attributes/assignUserToAttribute.schema";
|
|
|
|
export const ZUpdateUserInputSchema = z.object({
|
|
userId: z.number(),
|
|
username: z.string().optional(),
|
|
bio: z.string().optional(),
|
|
name: z.string().optional(),
|
|
email: z.string().optional(),
|
|
avatar: z.string().optional(),
|
|
role: z.enum(["ADMIN", "MEMBER", "OWNER"]),
|
|
timeZone: timeZoneSchema,
|
|
attributeOptions: assignUserToAttributeSchema.optional(),
|
|
});
|
|
|
|
export type TUpdateUserInputSchema = z.infer<typeof ZUpdateUserInputSchema>;
|