* refactor: First high level changes to getUsersAvailability * Fix usage of getUserAvailability where getUsersAvailability is unused * Fix user.schema.ts in APIv2 * User handler did not provide initial data * Small ts fixes * Set user non-nullable in getTimezoneFromDelegatedCredential * Small ts fixes, ensure consumers are aware its nonnullable * Mode is defaulted to none * Mode is defaulted to none, fix ts when directly using fn (temp)
15 lines
415 B
TypeScript
15 lines
415 B
TypeScript
import { z } from "zod";
|
|
|
|
import { stringOrNumber } from "@calcom/prisma/zod-utils";
|
|
import { stringToDayjsZod } from "@calcom/lib/dayjs";
|
|
|
|
export const ZUserInputSchema = z.object({
|
|
username: z.string(),
|
|
dateFrom: stringToDayjsZod,
|
|
dateTo: stringToDayjsZod,
|
|
eventTypeId: stringOrNumber.optional(),
|
|
withSource: z.boolean().optional(),
|
|
});
|
|
|
|
export type TUserInputSchema = z.infer<typeof ZUserInputSchema>;
|