2022-03-26 23:58:22 +00:00
|
|
|
import { withValidation } from "next-validations";
|
|
|
|
|
2022-03-30 15:37:51 +00:00
|
|
|
import { _WebhookModel as Webhook } from "@calcom/prisma/zod";
|
2022-03-26 23:58:22 +00:00
|
|
|
|
2022-04-01 15:53:52 +00:00
|
|
|
export const schemaWebhookBodyParams = Webhook.omit({ id: true }).partial();
|
2022-03-30 15:37:51 +00:00
|
|
|
|
|
|
|
export const schemaWebhookPublic = Webhook.omit({});
|
|
|
|
|
|
|
|
export const withValidWebhook = withValidation({
|
|
|
|
schema: schemaWebhookBodyParams,
|
2022-03-26 23:58:22 +00:00
|
|
|
type: "Zod",
|
|
|
|
mode: "body",
|
|
|
|
});
|