Files
cfw-autumn/shared/models/productModels/fixedPriceModels.ts
2025-03-04 19:14:40 +00:00

19 lines
428 B
TypeScript

import { z } from "zod";
export enum BillingInterval {
OneOff = "one_off",
Month = "month",
Quarter = "quarter",
SemiAnnual = "semi_annual",
Year = "year",
}
export const FixedPriceConfigSchema = z.object({
type: z.string(),
amount: z.number().min(0),
interval: z.nativeEnum(BillingInterval),
stripe_price_id: z.string().nullish(),
});
export type FixedPriceConfig = z.infer<typeof FixedPriceConfigSchema>;