import Product from './product'; import Cart from './cart'; import {CbAnchorElement, CbCallbacksInterface} from '../interfaces/cb-types'; import {PortalSession} from '../interfaces/cb-types'; import ChargebeePortal from './chargebee-portal'; import { Component, ComponentType, ThreeDSHandler, PaymentOptions, AmazonPayPayment, } from '../hosted_fields/common/base-types'; import {PaymentIntent, AdditionalData, Callbacks} from '../extensions/three_domain_secure/common/types'; import { EstimateFunctionsPluginLoaderInterface, VatValidationFunctionsPluginLoaderInterface, } from '../plugins/functions/loader/interface'; import {Locale, ResponseInnerMessage} from '../hosted_fields/common/types'; import {CheckoutOptions} from '../hosted_page/host/checkout/types'; import {Checkout} from '../hosted_page/host/checkout'; import {Components} from '@chargebee/components'; export default class CbInstance { cart: Cart; estimates: EstimateFunctionsPluginLoaderInterface; vat: VatValidationFunctionsPluginLoaderInterface; setBusinessEntity(businessEntityId: string): Promise; /** * Returns an instance of Components SDK * @param options */ components(options: unknown): Components; load(chunkName: string): Promise; load3DSHandler(): Promise; loadAmazonpay(): Promise; setPortalSession(ssoToken: (() => Promise) | string): void; openCheckout(options: any): void; createCheckout(options: CheckoutOptions): Promise; createChargebeePortal(): ChargebeePortal; logout(): void; closeAll(): void; setLocale(locale: Locale): void; getCart(): Cart; initializeProduct(planId: string, planQuantity?: number): Product; getProduct(element: CbAnchorElement): Product; setPortalCallbacks(callbacks: CbCallbacksInterface): void; setCheckoutCallbacks(callbacks: (cart: Cart) => CbCallbacksInterface): void; createComponent(componentType?: ComponentType, options?: {}): Component; tokenize(component: Component | ComponentType.Bank, payload?: {}): Promise; authorizeWith3ds( component: Component, intent: PaymentIntent, additionalData: AdditionalData, callbacks: Callbacks ): Promise; create3DSHandler(): ThreeDSHandler; handlePayment(paymentType: string, options: PaymentOptions): Promise; }