Files
calendar/packages/trpc/server/routers/viewer/availability/user.schema.ts
T
Alex van AndelandGitHub 23ecd1c906 refactor: First high level changes to getUsersAvailability (#26566)
* 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)
2026-01-08 14:45:26 +00:00

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>;