2022-04-02 01:46:24 +00:00
|
|
|
import { z } from "zod";
|
2022-03-26 00:53:56 +00:00
|
|
|
|
2022-03-30 14:56:24 +00:00
|
|
|
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:46:24 +00:00
|
|
|
|
2022-04-02 01:47:41 +00:00
|
|
|
const schemaTeamRequiredParams = z.object({});
|
2022-04-02 01:46:24 +00:00
|
|
|
|
2022-10-11 02:25:47 +00:00
|
|
|
export const schemaTeamBodyParams = schemaTeamBaseBodyParams.merge(schemaTeamRequiredParams).strict();
|
|
|
|
|
|
|
|
export const schemaTeamUpdateBodyParams = schemaTeamBodyParams.partial();
|
2022-03-30 14:56:24 +00:00
|
|
|
|
2022-06-29 22:01:14 +00:00
|
|
|
export const schemaTeamReadPublic = Team.omit({});
|
2022-10-11 02:25:47 +00:00
|
|
|
|
|
|
|
export const schemaTeamsReadPublic = z.array(schemaTeamReadPublic);
|