/** * Runtime schemas for the persisted ledger records. Wired into * `stores.ts` as the optional validator on `botRecord` — every read * from storage gets `.parse()`'d, so a corrupted Redis record throws * a clear `SourcedError({ source: 'storage', operation: 'validate' })` * instead of NaN-ing downstream. * * Why zod? It's the canonical TS validator with the right API surface * (`{ parse(data): T }`). The library's `RecordValidator` type is * structural, so swapping to valibot / ArkType / a hand-rolled guard * just works — but zod is what we ship the default with. * * Schemas mirror the TS types in `types.ts` 1:1. Keep them in sync; the * type system enforces that via the `z.infer<>` round-trip — if a * schema drifts from the type, `satisfies ZodType` on each export * blows up. We use `satisfies` (not `as`) so the TS error points at the * mismatch, not the assertion. */ import { z } from "zod"; /** * `ChargeRecord` schema. Mutable fields stay loose-typed (zod doesn't * enforce readonly the way TS does) but every field is structurally * present. */ export declare const chargeRecordSchema: z.ZodObject<{ chargeId: z.ZodString; userId: z.ZodNumber; productKey: z.ZodString; xtr: z.ZodNumber; receivedAt: z.ZodNumber; payload: z.ZodString; waiverSnapshot: z.ZodObject<{ at: z.ZodNumber; version: z.ZodString; locale: z.ZodString; }, z.core.$strip>; subscriptionExpiresAt: z.ZodOptional; creditsGranted: z.ZodNumber; vipRung: z.ZodOptional; perkKey: z.ZodOptional; paysupportState: z.ZodEnum<{ none: "none"; opened: "opened"; refunded: "refunded"; }>; refundedAt: z.ZodOptional>; payoutBatchId: z.ZodOptional>; }, z.core.$strip>; export declare const payoutRecordSchema: z.ZodObject<{ batchId: z.ZodString; fromMs: z.ZodNumber; toMs: z.ZodNumber; tonAmount: z.ZodNumber; eurAtReceipt: z.ZodNumber; recordedAt: z.ZodNumber; facturaNumber: z.ZodOptional; }, z.core.$strip>; //# sourceMappingURL=schemas.d.ts.map