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

19 lines
567 B
TypeScript
Raw Normal View History

import { z } from "zod";
import { _TeamModel as Team } from "@calcom/prisma/zod";
export const schemaTeamBaseBodyParams = Team.omit({ id: true, createdAt: true }).partial({
hideBranding: true,
metadata: 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);