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

14 lines
367 B
TypeScript

import { withValidation } from "next-validations";
import { _WebhookModel as Webhook } from "@calcom/prisma/zod";
export const schemaWebhookBodyParams = Webhook.omit({ id: true }).partial();
export const schemaWebhookPublic = Webhook.omit({});
export const withValidWebhook = withValidation({
schema: schemaWebhookBodyParams,
type: "Zod",
mode: "body",
});