2022-03-26 00:53:56 +00:00
|
|
|
import { withValidation } from "next-validations";
|
|
|
|
|
2022-03-30 14:56:24 +00:00
|
|
|
import { _TeamModel as Team } from "@calcom/prisma/zod";
|
|
|
|
|
2022-04-01 15:53:52 +00:00
|
|
|
export const schemaTeamBodyParams = Team.omit({ id: true }).partial();
|
2022-03-30 14:56:24 +00:00
|
|
|
|
|
|
|
export const schemaTeamPublic = Team.omit({});
|
|
|
|
|
|
|
|
export const withValidTeam = withValidation({
|
|
|
|
schema: schemaTeamBodyParams,
|
2022-03-26 00:53:56 +00:00
|
|
|
type: "Zod",
|
|
|
|
mode: "body",
|
|
|
|
});
|