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

14 lines
455 B
TypeScript

import { withValidation } from "next-validations";
import { _PaymentModel as Payment } from "@calcom/prisma/zod";
// FIXME: Payment seems a delicate endpoint, do we need to remove anything here?
export const schemaPaymentBodyParams = Payment.omit({ id: true });
export const schemaPaymentPublic = Payment.omit({ externalId: true });
export const withValidPayment = withValidation({
schema: schemaPaymentBodyParams,
type: "Zod",
mode: "body",
});