import type { MinorUnits } from './types.js'; export interface CartLine { /** The merchant's own label. Used for comparison and audit, never rendered in a prompt. */ readonly label: string; readonly quantity: number; readonly unitMinorUnits: MinorUnits; } export interface RequestedLine { readonly label: string; readonly quantity: number; } export interface CartCheck { readonly ok: boolean; /** Lines present in the cart that the owner did not ask for. */ readonly unexpected: readonly CartLine[]; /** Lines the owner asked for that are missing. */ readonly missing: readonly RequestedLine[]; readonly reason: string | null; } /** * Compare the cart against the request, immediately before payment. * * Quantity is checked too: turning a request for one into a cart of three is the * same defect as adding a second product, and only one of those would be caught * by comparing labels alone. */ export declare function assertCartMatchesRequest(cart: readonly CartLine[], requested: readonly RequestedLine[]): CartCheck; export interface RecurringCheck { readonly recurring: boolean; readonly matched: readonly string[]; readonly reason: string | null; } /** * Look for recurring-charge language in the order summary. * * Takes the checkout's own text, which IS untrusted page content, and is used * here only to decide whether to REFUSE. Untrusted content can always talk us * out of an action; the rule it may never do is talk us into one. Reading it to * find a reason to stop is the safe direction of that asymmetry. */ export declare function detectRecurringCharge(orderSummaryText: string): RecurringCheck; //# sourceMappingURL=cart.d.ts.map