2
0
Files
cal/calcom/packages/trpc/server/routers/viewer/admin/createSelfHostedLicenseKey.schema.ts
2024-08-09 00:39:27 +02:00

16 lines
516 B
TypeScript

import { z } from "zod";
const BillingType = z.enum(["PER_BOOKING", "PER_USER"]);
const BillingPeriod = z.enum(["MONTHLY", "ANNUALLY"]);
export const ZCreateSelfHostedLicenseSchema = z.object({
billingType: BillingType,
entityCount: z.number().int().nonnegative(),
entityPrice: z.number().nonnegative(),
billingPeriod: BillingPeriod,
overages: z.number().nonnegative(),
billingEmail: z.string().email(),
});
export type TCreateSelfHostedLicenseSchema = z.infer<typeof ZCreateSelfHostedLicenseSchema>;