import { z } from 'zod'; import { CURRENCIES } from '../common/currency'; import { pageSchema } from '../identity/identity.schemas'; const currency = z.enum(CURRENCIES); export const costRateSchema = z .object({ currency, unitCost: z.string().regex(/^(?!0\.0000$)(?:0|[1-9]\d{0,7})\.\d{4}$/), }) .strict(); export const costQuerySchema = z.object({ currency }).strict(); export const costHistoryQuerySchema = pageSchema.extend({ currency }).strict(); export type CostRateInput = z.infer; export type CostQuery = z.infer; export type CostHistoryQuery = z.infer;