cal.pub0.org/lib/validations/team.ts

16 lines
529 B
TypeScript
Raw Normal View History

import { z } from "zod";
import { _TeamModel as Team } from "@calcom/prisma/zod";
2022-10-11 02:25:47 +00:00
export const schemaTeamBaseBodyParams = Team.omit({ id: true }).partial({ hideBranding: true });
2022-04-02 01:47:41 +00:00
const schemaTeamRequiredParams = z.object({});
2022-10-11 02:25:47 +00:00
export const schemaTeamBodyParams = schemaTeamBaseBodyParams.merge(schemaTeamRequiredParams).strict();
export const schemaTeamUpdateBodyParams = schemaTeamBodyParams.partial();
export const schemaTeamReadPublic = Team.omit({});
2022-10-11 02:25:47 +00:00
export const schemaTeamsReadPublic = z.array(schemaTeamReadPublic);