import type { MERCHANT_CAPABILITIES } from './enums/merchantCapabilities'; import type { SUPPORTED_NETWORKS } from './enums/supportedNetworks'; export declare namespace ApplePay { type RequiredShippingContactField = 'postalAddress' | 'name' | 'phoneticName' | 'phone' | 'email'; type PaymentMethodType = 'debit' | 'credit' | 'prepaid' | 'store'; type MerchantValidationStatus = 'initiated' | 'completed' | 'error'; type UpdateKind = 'shippingContact' | 'shippingMethod' | 'paymentMethod' | 'couponCode'; interface ShippingMethod { label: string; detail: string; amount: string; identifier: string; } interface PaymentContact { phoneNumber?: string; emailAddress?: string; givenName?: string; familyName?: string; phoneticGivenName?: string; phoneticFamilyName?: string; addressLines?: string[]; subLocality?: string; locality?: string; postalCode?: string; subAdministrativeArea?: string; administrativeArea?: string; country?: string; countryCode?: string; } interface PaymentMethod { displayName?: string; network?: string; type?: PaymentMethodType; billingContact?: PaymentContact; } interface LineItem { type?: 'final' | 'pending'; label?: string; amount?: string; paymentTiming?: 'immediate' | 'recurring' | 'deferred' | 'automaticReload'; recurringPaymentStartDate?: Date; recurringPaymentIntervalUnit?: 'year' | 'month' | 'day' | 'hour' | 'minute'; recurringPaymentIntervalCount?: number; recurringPaymentEndDate?: Date; deferredPaymentDate?: Date; automaticReloadPaymentThresholdAmount?: string; } interface Error { code: string; contactField?: string; message: string; } interface PaymentTokenContext { merchantIdentifier: string; externalIdentifier: string; merchantName: string; merchantDomain?: string; amount: string; } interface UpdateData { newTotal: LineItem; newLineItems?: LineItem[]; newShippingMethods?: ShippingMethod[]; newMultiTokenContexts?: PaymentTokenContext[]; errors?: Error[]; } interface Features { shippingContactFields?: Array; supportsCouponCode?: boolean; couponCode?: string; shippingMethods?: Array; } interface SessionCallbacks { onMerchantValidation?: (status: MerchantValidationStatus) => void; onShippingMethodSelected?: (shippingMethod: ShippingMethod) => Promise; onShippingContactSelected?: (shippingContact: PaymentContact) => Promise; onPaymentMethodSelected?: (paymentMethod: PaymentMethod) => Promise; onCouponChanged?: (couponCode: string) => Promise; } interface RequestData { countryCode: string; currencyCode: string; merchantCapabilities: Array; supportedNetworks: Array; supportedCountries?: Array; billingContact?: { phoneNumber?: string; emailAddress?: string; givenName: string; familyName: string; }; total: { label: string; amount: number; }; requiredShippingContactFields?: Array; supportsCouponCode?: boolean; couponCode?: string; shippingMethods?: Array; lineItems?: Array; } }