import { PaymentMethodAgenticEnrollmentVerificationConfig } from './PaymentMethodAgenticEnrollment.js'; type OrderIntentStatus = "active" | "cancelled" | "expired"; type OrderIntentProvider = "vic" | "agentpay"; type OrderIntentCredentialFormat = "card" | "network-token"; type OrderIntentSptCredentialFormat = "identifier"; type OrderIntentRailState = { status: "active" | "pending_verification"; error?: never; } | { status: "error"; error: { code: string; }; }; type OrderIntentAgenticTokenRail = OrderIntentRailState & { rail: "agentic-token"; provider: OrderIntentProvider; credentialFormats: OrderIntentCredentialFormat[]; }; type EncryptedCardRailState = { status: "active" | "pending_cvc_recollection"; error?: never; } | { status: "error"; error: { code: string; }; }; type OrderIntentEncryptedCardRail = EncryptedCardRailState & { rail: "encrypted-card"; credentialFormats: "card"[]; }; type OrderIntentSptRail = OrderIntentRailState & { rail: "spt"; provider: "stripe"; credentialFormats: OrderIntentSptCredentialFormat[]; }; type OrderIntentRail = OrderIntentAgenticTokenRail | OrderIntentEncryptedCardRail | OrderIntentSptRail; interface OrderIntentVerificationConfig extends PaymentMethodAgenticEnrollmentVerificationConfig { allowanceId: string; } interface OrderIntentMerchant { name: string; /** http or https URL of the merchant. */ url: string; /** ISO 3166-1 alpha-2, upper case. */ countryCode: string; categoryCode?: string; acquirerBin?: string; } interface OrderIntentBase { orderIntentId: string; paymentMethodId: string; status: OrderIntentStatus; amount: { total: string; spent: string; reserved: string; available: string; currency: string; }; merchant?: OrderIntentMerchant; description: string; rails: OrderIntentRail[]; expiresAt: string; } interface OrderIntentWithVerification extends OrderIntentBase { verificationConfig: OrderIntentVerificationConfig; } interface OrderIntentWithoutVerification extends OrderIntentBase { verificationConfig?: never; } type OrderIntent = OrderIntentWithVerification | OrderIntentWithoutVerification; export type { OrderIntent, OrderIntentAgenticTokenRail, OrderIntentCredentialFormat, OrderIntentEncryptedCardRail, OrderIntentMerchant, OrderIntentProvider, OrderIntentRail, OrderIntentSptCredentialFormat, OrderIntentSptRail, OrderIntentStatus, OrderIntentVerificationConfig, OrderIntentWithVerification, OrderIntentWithoutVerification };