import { z } from 'zod'; export const BillingFrequencySchema = z.enum([ 'DAILY', 'WEEKLY', 'MONTHLY', 'YEARLY', ]); export type BillingFrequency = z.infer; export const Money = z.object({ /** * Amount of money in cents */ amount: z.number(), currency: z.string(), }); export type MoneyType = z.infer; export const BillingForecastItemSchema = z.object({ startDate: z.string(), endDate: z.string().nullable(), regularPriceInclVat: Money, priceInclVat: Money, }); export type BillingForecastItemSchemaType = z.infer< typeof BillingForecastItemSchema >; export const BillingSchema = z.object({ billingFrequency: BillingFrequencySchema, billingFrequencyInterval: z.number(), billingForecast: z.array(BillingForecastItemSchema), }); export type BillingSchemaType = z.infer;