@bigcommerce/checkout-sdk 1.396.1 → 1.398.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.
@@ -1296,6 +1296,62 @@ declare interface BlockElementStyles extends InlineElementStyles {
1296
1296
  borderWidth?: string;
1297
1297
  }
1298
1298
 
1299
+ /**
1300
+ * A set of options that are required to initialize the BlueSnap V2 payment
1301
+ * method.
1302
+ *
1303
+ * The payment step is done through a web page via an iframe provided by the
1304
+ * strategy.
1305
+ *
1306
+ * ```html
1307
+ * <!-- This is where the BlueSnap iframe will be inserted. It can be an in-page container or a modal -->
1308
+ * <div id="container"></div>
1309
+ *
1310
+ * <!-- This is a cancellation button -->
1311
+ * <button type="button" id="cancel-button"></button>
1312
+ * ```
1313
+ *
1314
+ * ```js
1315
+ * service.initializePayment({
1316
+ * methodId: 'bluesnapDirect',
1317
+ * bluesnapDirect: {
1318
+ * onLoad: (iframe) => {
1319
+ * document.getElementById('container')
1320
+ * .appendChild(iframe);
1321
+ *
1322
+ * document.getElementById('cancel-button')
1323
+ * .addEventListener('click', () => {
1324
+ * document.getElementById('container').innerHTML = '';
1325
+ * });
1326
+ * },
1327
+ * },
1328
+ * });
1329
+ * ```
1330
+ */
1331
+ declare interface BlueSnapDirectAPMInitializeOptions {
1332
+ /**
1333
+ * A set of CSS properties to apply to the iframe.
1334
+ */
1335
+ style?: BlueSnapDirectStyleProps;
1336
+ /**
1337
+ * A callback that gets called when the iframe is ready to be added to the
1338
+ * current page. It is responsible for determining where the iframe should
1339
+ * be inserted in the DOM.
1340
+ *
1341
+ * @param iframe - The iframe element containing the payment web page
1342
+ * provided by the strategy.
1343
+ * @param cancel - A function, when called, will cancel the payment
1344
+ * process and remove the iframe.
1345
+ */
1346
+ onLoad(iframe: HTMLIFrameElement, cancel: () => void): void;
1347
+ }
1348
+
1349
+ declare interface BlueSnapDirectStyleProps {
1350
+ border?: string;
1351
+ height?: string;
1352
+ width?: string;
1353
+ }
1354
+
1299
1355
  /**
1300
1356
  * A set of options that are required to initialize the BlueSnap V2 payment
1301
1357
  * method.
@@ -6696,7 +6752,7 @@ declare interface PayPalInstrument extends BaseAccountInstrument {
6696
6752
  method: 'paypal';
6697
6753
  }
6698
6754
 
6699
- declare type PaymentInitializeOptions = BasePaymentInitializeOptions & WithAdyenV2PaymentInitializeOptions & WithAdyenV3PaymentInitializeOptions & WithApplePayPaymentInitializeOptions & WithBoltPaymentInitializeOptions & WithBraintreePaypalAchPaymentInitializeOptions & WithBraintreeLocalMethodsPaymentInitializeOptions & WithCreditCardPaymentInitializeOptions & WithPayPalCommercePaymentInitializeOptions & WithPayPalCommerceCreditPaymentInitializeOptions & WithPayPalCommerceVenmoPaymentInitializeOptions & WithPayPalCommerceAlternativeMethodsPaymentInitializeOptions & WithPayPalCommerceCreditCardsPaymentInitializeOptions & WithSquareV2PaymentInitializeOptions;
6755
+ declare type PaymentInitializeOptions = BasePaymentInitializeOptions & WithAdyenV2PaymentInitializeOptions & WithAdyenV3PaymentInitializeOptions & WithApplePayPaymentInitializeOptions & WithBlueSnapDirectAPMPaymentInitializeOptions & WithBoltPaymentInitializeOptions & WithBraintreePaypalAchPaymentInitializeOptions & WithBraintreeLocalMethodsPaymentInitializeOptions & WithCreditCardPaymentInitializeOptions & WithPayPalCommercePaymentInitializeOptions & WithPayPalCommerceCreditPaymentInitializeOptions & WithPayPalCommerceVenmoPaymentInitializeOptions & WithPayPalCommerceAlternativeMethodsPaymentInitializeOptions & WithPayPalCommerceCreditCardsPaymentInitializeOptions & WithSquareV2PaymentInitializeOptions;
6700
6756
 
6701
6757
  declare type PaymentInstrument = CardInstrument | AccountInstrument;
6702
6758
 
@@ -7848,6 +7904,14 @@ declare interface WithApplePayPaymentInitializeOptions {
7848
7904
  applepay?: ApplePayPaymentInitializeOptions;
7849
7905
  }
7850
7906
 
7907
+ declare interface WithBlueSnapDirectAPMPaymentInitializeOptions {
7908
+ /**
7909
+ * The options that are required to initialize the Apple Pay payment
7910
+ * method. They can be omitted unless you need to support Apple Pay.
7911
+ */
7912
+ bluesnapdirect?: BlueSnapDirectAPMInitializeOptions;
7913
+ }
7914
+
7851
7915
  declare interface WithBoltButtonInitializeOptions {
7852
7916
  /**
7853
7917
  * The options that are required to initialize the Bolt payment