Files
cfw-autumn/shared/models/productModels/fixedPriceModels.ts
2025-01-25 09:54:30 +00:00

18 lines
387 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),
});
export type FixedPriceConfig = z.infer<typeof FixedPriceConfigSchema>;