import { AuthorizePayload, ElementsConfig, OdusElementsCallbacks, ValidationResult } from './types'; import { AddressCityElement } from './AddressCityElement'; import { AddressCountryElement } from './AddressCountryElement'; import { AddressFirstNameElement } from './AddressFirstNameElement'; import { AddressLastNameElement } from './AddressLastNameElement'; import { AddressStateElement } from './AddressStateElement'; import { AddressStreetElement } from './AddressStreetElement'; import { AddressZipCodeElement } from './AddressZipCodeElement'; import { ApplePayElement } from './ApplePayElement'; import { CardElement } from './CardElement'; import { CardholderElement } from './CardholderElement'; import { EmailElement } from './EmailElement'; import { ErrorElement } from './ErrorElement'; import { PayPalElement } from './PayPalElement'; import { PhoneElement } from './PhoneElement'; type AddressElements = { readonly street: AddressStreetElement; readonly firstName: AddressFirstNameElement; readonly lastName: AddressLastNameElement; readonly city: AddressCityElement; readonly state: AddressStateElement; readonly zipCode: AddressZipCodeElement; readonly country: AddressCountryElement; }; export declare class OdusElements { private readonly _config; private readonly _apiService; private readonly _changeListeners; private _callbacks; private _paymentState; private _associationSequence; private _fontCleanup?; private readonly _sessionId; private _mountedReported; private _card?; private _email?; private _phone?; private _addressStreet?; private _addressFirstName?; private _addressLastName?; private _cardholderName?; private _addressCity?; private _addressState?; private _addressZipCode?; private _addressCountry?; private _applePay?; private _paypal?; private _error?; readonly elements: { readonly card: CardElement; readonly cardholderName: CardholderElement; readonly contact: { readonly email: EmailElement; readonly phone: PhoneElement; }; readonly address: AddressElements; readonly express: { readonly applePay: ApplePayElement; readonly payPal: PayPalElement; }; readonly error: ErrorElement; }; constructor(config: ElementsConfig); associatePayment(paymentId: string, checkoutKey: string): Promise; validate(): ValidationResult; private _getPayload; authorize(payload?: AuthorizePayload): Promise; applyTheme(theme: Record): void; resetTheme(theme: Record): void; get isValid(): boolean; onChange(listener: () => void): void; destroy(): void; setCallbacks(callbacks: Partial): void; private _trackElement; private _allElements; /** * Runs the authorization and reports whether it succeeded. * * The merchant callbacks keep swallowing every failure — a decline is a * normal outcome, not an exception — so the return value is what tells an * express button whether it may show the shopper a success. It is `true` * only when the SDK reported a success or a required action to the merchant. */ private _executeAuthorization; private _getPaymentMethod; private _emitLoadingState; /** * Reports the outcome to the merchant, and answers whether that outcome is * one the shopper may see as a success. A required action counts: the sheet * has to close before the merchant can send the shopper to the redirect. */ private _handlePaymentResponse; /** * Reports a submission that never reached the API. The submit funnel still * gets both stages, so an attempt that failed before the request is counted * as a failure instead of disappearing from the funnel. */ private _reportSubmitFailure; private _handleAuthorizationError; /** * `ApiError` carries the readable text at the top level. `details` holds the * raw API body, where `message` is absent on some failures, so it is only a * fallback. */ private _readErrorMessage; } export {}; //# sourceMappingURL=OdusElements.d.ts.map