@bigcommerce/checkout-sdk 1.431.0 → 1.432.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5198,6 +5198,23 @@ declare interface GooglePayCustomerInitializeOptions {
5198
5198
  buttonType?: ButtonType;
5199
5199
  }
5200
5200
 
5201
+ /**
5202
+ * The recognized keys to pass the initialization options for Google Pay.
5203
+ */
5204
+ declare enum GooglePayKey {
5205
+ ADYEN_V2 = "googlepayadyenv2",
5206
+ ADYEN_V3 = "googlepayadyenv3",
5207
+ AUTHORIZE_NET = "googlepayauthorizenet",
5208
+ BNZ = "googlepaybnz",
5209
+ BRAINTREE = "googlepaybraintree",
5210
+ CHECKOUT_COM = "googlepaycheckoutcom",
5211
+ CYBERSOURCE_V2 = "googlepaycybersourcev2",
5212
+ ORBITAL = "googlepayorbital",
5213
+ STRIPE = "googlepaystripe",
5214
+ STRIPE_UPE = "googlepaystripeupe",
5215
+ WORLDPAY_ACCESS = "googlepayworldpayaccess"
5216
+ }
5217
+
5201
5218
  /**
5202
5219
  * A set of options that are required to initialize the GooglePay payment method
5203
5220
  *
@@ -5257,6 +5274,65 @@ declare interface GooglePayPaymentInitializeOptions {
5257
5274
  onPaymentSelect?(): void;
5258
5275
  }
5259
5276
 
5277
+ /**
5278
+ * A set of options that are required to initialize the GooglePay payment method
5279
+ *
5280
+ * If the customer chooses to pay with GooglePay, they will be asked to
5281
+ * enter their payment details via a modal. You can hook into events emitted by
5282
+ * the modal by providing the callbacks listed below.
5283
+ *
5284
+ * ```html
5285
+ * <!-- This is where the GooglePay button will be inserted -->
5286
+ * <div id="wallet-button"></div>
5287
+ * ```
5288
+ *
5289
+ * ```js
5290
+ * service.initializePayment({
5291
+ * // Using GooglePay provided by Braintree as an example
5292
+ * methodId: 'googlepaybraintree',
5293
+ * googlepaybraintree: {
5294
+ * walletButton: 'wallet-button'
5295
+ * },
5296
+ * });
5297
+ * ```
5298
+ *
5299
+ * Additional event callbacks can be registered.
5300
+ *
5301
+ * ```js
5302
+ * service.initializePayment({
5303
+ * methodId: 'googlepaybraintree',
5304
+ * googlepaybraintree: {
5305
+ * walletButton: 'wallet-button',
5306
+ * onError(error) {
5307
+ * console.log(error);
5308
+ * },
5309
+ * onPaymentSelect() {
5310
+ * console.log('Selected');
5311
+ * },
5312
+ * },
5313
+ * });
5314
+ * ```
5315
+ */
5316
+ declare interface GooglePayPaymentInitializeOptions_2 {
5317
+ /**
5318
+ * This walletButton is used to set an event listener, provide an element ID if you want
5319
+ * users to be able to launch the GooglePay wallet modal by clicking on a button.
5320
+ * It should be an HTML element.
5321
+ */
5322
+ walletButton?: string;
5323
+ /**
5324
+ * A callback that gets called when GooglePay fails to initialize or
5325
+ * selects a payment option.
5326
+ *
5327
+ * @param error - The error object describing the failure.
5328
+ */
5329
+ onError?(error: Error): void;
5330
+ /**
5331
+ * A callback that gets called when the customer selects a payment option.
5332
+ */
5333
+ onPaymentSelect?(): void;
5334
+ }
5335
+
5260
5336
  declare type GuestCredentials = Partial<Subscriptions> & {
5261
5337
  id?: string;
5262
5338
  email: string;
@@ -6839,7 +6915,7 @@ declare interface PayPalInstrument extends BaseAccountInstrument {
6839
6915
  method: 'paypal';
6840
6916
  }
6841
6917
 
6842
- declare type PaymentInitializeOptions = BasePaymentInitializeOptions & WithAdyenV2PaymentInitializeOptions & WithAdyenV3PaymentInitializeOptions & WithApplePayPaymentInitializeOptions & WithBlueSnapDirectAPMPaymentInitializeOptions & WithBoltPaymentInitializeOptions & WithBraintreePaypalAchPaymentInitializeOptions & WithBraintreeLocalMethodsPaymentInitializeOptions & WithBraintreeAcceleratedCheckoutPaymentInitializeOptions & WithCreditCardPaymentInitializeOptions & WithPayPalCommercePaymentInitializeOptions & WithPayPalCommerceCreditPaymentInitializeOptions & WithPayPalCommerceVenmoPaymentInitializeOptions & WithPayPalCommerceAlternativeMethodsPaymentInitializeOptions & WithPayPalCommerceCreditCardsPaymentInitializeOptions & WithSquareV2PaymentInitializeOptions;
6918
+ declare type PaymentInitializeOptions = BasePaymentInitializeOptions & WithAdyenV2PaymentInitializeOptions & WithAdyenV3PaymentInitializeOptions & WithApplePayPaymentInitializeOptions & WithBlueSnapDirectAPMPaymentInitializeOptions & WithBoltPaymentInitializeOptions & WithBraintreePaypalAchPaymentInitializeOptions & WithBraintreeLocalMethodsPaymentInitializeOptions & WithBraintreeAcceleratedCheckoutPaymentInitializeOptions & WithCreditCardPaymentInitializeOptions & WithGooglePayPaymentInitializeOptions & WithPayPalCommercePaymentInitializeOptions & WithPayPalCommerceCreditPaymentInitializeOptions & WithPayPalCommerceVenmoPaymentInitializeOptions & WithPayPalCommerceAlternativeMethodsPaymentInitializeOptions & WithPayPalCommerceCreditCardsPaymentInitializeOptions & WithSquareV2PaymentInitializeOptions;
6843
6919
 
6844
6920
  declare type PaymentInstrument = CardInstrument | AccountInstrument;
6845
6921
 
@@ -8124,6 +8200,14 @@ declare interface WithDocumentInstrument {
8124
8200
  ccDocument: string;
8125
8201
  }
8126
8202
 
8203
+ /**
8204
+ * The options that are required to initialize the GooglePay payment method.
8205
+ * They can be omitted unless you need to support GooglePay.
8206
+ */
8207
+ declare type WithGooglePayPaymentInitializeOptions = {
8208
+ [k in GooglePayKey]?: GooglePayPaymentInitializeOptions_2;
8209
+ };
8210
+
8127
8211
  declare interface WithMollieIssuerInstrument {
8128
8212
  issuer: string;
8129
8213
  shopper_locale: string;