import { z } from "zod"; /** * The action types a cumulative limit may name, as the Decionis exposure * ledger names them (`COMMERCE_EXPOSURE_ACTION_TYPES`). A route that releases * money states one of these; `PAYMENT_RELEASE` unless it says otherwise. */ export declare const EXPOSURE_ACTION_TYPES: readonly ["PRICE_CHANGE", "INVENTORY_MUTATION", "ORDER_ACCEPTANCE", "FULFILLMENT_ACTION", "PROMOTION_CHANGE", "REFUND_REQUEST", "RETURN_AUTHORIZATION", "PAYMENT_RELEASE", "VENDOR_BANK_CHANGE", "EARLY_PAYMENT_DISCOUNT", "CREDIT_HOLD_RELEASE"]; export type ExposureActionType = (typeof EXPOSURE_ACTION_TYPES)[number]; export declare const DEFAULT_EXPOSURE_ACTION_TYPE: ExposureActionType; /** * The subjects a route can name, beside `org`, which every route supplies: * the organisation is the gateway's own tenant. */ export declare const EXPOSURE_ROUTE_SUBJECTS: readonly ["vendor", "customer", "sku", "agent"]; export type ExposureRouteSubject = (typeof EXPOSURE_ROUTE_SUBJECTS)[number]; /** How a route's amount is written: integer minor units, or a decimal in the currency's major unit. */ export type ExposureAmountUnit = "MINOR" | "MAJOR"; /** * The action types that move no money: a step a sequence limit counts, never * an amount. A route of one of these may omit `amount` and `currency`. */ export declare const EXPOSURE_STEP_ONLY_ACTION_TYPES: readonly ExposureActionType[]; export declare const RouteExposureSchema: z.ZodObject<{ actionType: z.ZodOptional, unknown>>; amount: z.ZodOptional; amountUnit: z.ZodOptional, unknown>>; currency: z.ZodOptional; subjects: z.ZodOptional; customer: z.ZodOptional; sku: z.ZodOptional; agent: z.ZodOptional; }, z.core.$strict>>; settledAmount: z.ZodOptional; failurePolicy: z.ZodOptional, unknown>>; }, z.core.$strict>; export type RouteExposureFile = z.infer; /** A route's money declaration, resolved: every default applied. */ export interface ExposureDeclaration { readonly actionType: ExposureActionType; /** Null for a step-only action, which moves no money. */ readonly amount: string | null; readonly amountUnit: ExposureAmountUnit; /** A pointer (it starts with `/`) or an upper-case ISO 4217 code; null with the amount. */ readonly currency: string | null; readonly subjects: Readonly>>; readonly settledAmount: string | null; readonly failurePolicy: "FAIL_CLOSED" | "FAIL_OPEN"; } /** The declaration a route's file section resolves to. */ export declare function exposureDeclaration(file: RouteExposureFile): ExposureDeclaration; //# sourceMappingURL=ExposureDeclaration.d.ts.map