2023-04-15 00:04:48 +00:00
|
|
|
import { z } from "zod";
|
|
|
|
|
|
|
|
import { optionToValueSchema } from "@calcom/prisma/zod-utils";
|
|
|
|
|
|
|
|
export const userBodySchema = z
|
|
|
|
.object({
|
|
|
|
locale: optionToValueSchema(z.string()),
|
|
|
|
role: optionToValueSchema(z.enum(["USER", "ADMIN"])),
|
|
|
|
weekStart: optionToValueSchema(z.string()),
|
|
|
|
timeFormat: optionToValueSchema(z.number()),
|
2023-07-07 12:55:21 +00:00
|
|
|
identityProvider: optionToValueSchema(z.enum(["CAL", "GOOGLE", "SAML"])),
|
2023-04-15 00:04:48 +00:00
|
|
|
})
|
|
|
|
.passthrough();
|