@@ -5,15 +5,20 @@ import * as checkoutButtonBundle from './bundles/checkout-button';
55import * as mainBundle from './bundles/checkout-sdk' ;
66import * as embeddedCheckoutBundle from './bundles/embedded-checkout' ;
77import * as hostedFormBundle from './bundles/hosted-form' ;
8+ import * as walletButtonBundle from './bundles/wallet-button' ;
89import { parseUrl } from './common/url' ;
910
1011export type CheckoutButtonBundle = typeof checkoutButtonBundle & { version : string } ;
12+ export type WalletButtonBundle = typeof walletButtonBundle & {
13+ version : string ;
14+ } ;
1115export type EmbeddedCheckoutBundle = typeof embeddedCheckoutBundle & { version : string } ;
1216export type HostedFormBundle = typeof hostedFormBundle & { version : string } ;
1317export type MainBundle = typeof mainBundle & { version : string } ;
1418
1519export enum BundleType {
1620 CheckoutButton = 'checkout-button' ,
21+ WalletButton = 'wallet-payment-button' ,
1722 EmbeddedCheckout = 'embedded-checkout' ,
1823 HostedForm = 'hosted-form' ,
1924 Main = 'checkout-sdk' ,
@@ -25,12 +30,19 @@ const scriptOrigin = isScriptElement(document.currentScript)
2530
2631export function load ( moduleName ?: BundleType . Main ) : Promise < MainBundle > ;
2732export function load ( moduleName : BundleType . CheckoutButton ) : Promise < CheckoutButtonBundle > ;
33+ export function load ( moduleName : BundleType . WalletButton ) : Promise < WalletButtonBundle > ;
2834export function load ( moduleName : BundleType . EmbeddedCheckout ) : Promise < EmbeddedCheckoutBundle > ;
2935export function load ( moduleName : BundleType . HostedForm ) : Promise < HostedFormBundle > ;
3036
3137export async function load (
3238 moduleName : string = BundleType . Main ,
33- ) : Promise < MainBundle | CheckoutButtonBundle | EmbeddedCheckoutBundle | HostedFormBundle > {
39+ ) : Promise <
40+ | MainBundle
41+ | CheckoutButtonBundle
42+ | WalletButtonBundle
43+ | EmbeddedCheckoutBundle
44+ | HostedFormBundle
45+ > {
3446 const { version, js } = MANIFEST_JSON ;
3547 const manifestPath = js . find ( ( path ) => path . indexOf ( moduleName ) !== - 1 ) ;
3648
0 commit comments