@bigcommerce/checkout-sdk 1.735.0 → 1.737.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.
@@ -19,7 +19,8 @@ import { HostedInstrument as HostedInstrument_2 } from '@bigcommerce/checkout-sd
19
19
  import { LoadingIndicatorStyles } from '@bigcommerce/checkout-sdk/ui';
20
20
  import { Observable } from 'rxjs';
21
21
  import { Omit as Omit_2 } from '@bigcommerce/checkout-sdk/payment-integration-api';
22
- import { PayPalFastlaneStylesOption } from '@bigcommerce/checkout-sdk/paypal-commerce-utils';
22
+ import { PayPalFastlaneStylesOption } from '@bigcommerce/checkout-sdk/bigcommerce-payments-utils';
23
+ import { PayPalFastlaneStylesOption as PayPalFastlaneStylesOption_2 } from '@bigcommerce/checkout-sdk/paypal-commerce-utils';
23
24
  import { PaymentErrorData } from '@bigcommerce/checkout-sdk/payment-integration-api';
24
25
  import { PaymentErrorResponseBody } from '@bigcommerce/checkout-sdk/payment-integration-api';
25
26
  import { PaymentProviderCustomer as PaymentProviderCustomerType } from '@bigcommerce/checkout-sdk/payment-integration-api';
@@ -1013,6 +1014,124 @@ declare interface BigCommercePaymentsCreditCardsPaymentInitializeOptions {
1013
1014
  onCreditCardFieldsRenderingError?: (error: unknown) => void;
1014
1015
  }
1015
1016
 
1017
+ /**
1018
+ * A set of options that are optional to initialize the BigCommercePayments Fastlane customer strategy
1019
+ * that are responsible for BigCommercePayments Fastlane components styling and initialization
1020
+ *
1021
+ * ```js
1022
+ * service.initializeCustomer({
1023
+ * methodId: 'bigcommerce_payments_fastlane',
1024
+ * bigcommerce_payments_fastlane: {
1025
+ * styles: {
1026
+ * root: {
1027
+ * backgroundColorPrimary: 'transparent',
1028
+ * errorColor: '#C40B0B',
1029
+ * fontFamily: 'Montserrat, Helvetica, Arial, sans-serif',
1030
+ * },
1031
+ * input: {
1032
+ * borderRadius: '0.25rem',
1033
+ * borderColor: '#9E9E9E',
1034
+ * focusBorderColor: '#4496F6',
1035
+ * },
1036
+ * toggle: {
1037
+ * colorPrimary: '#0F005E',
1038
+ * colorSecondary: '#ffffff',
1039
+ * },
1040
+ * text: {
1041
+ * body: {
1042
+ * color: '#222222',
1043
+ * fontSize: '1rem',
1044
+ * },
1045
+ * caption: {
1046
+ * color: '#515151',
1047
+ * fontSize: '0.875rem',
1048
+ * },
1049
+ * },
1050
+ * branding: 'light',
1051
+ * },
1052
+ * },
1053
+ * });
1054
+ * ```
1055
+ */
1056
+ declare interface BigCommercePaymentsFastlaneCustomerInitializeOptions {
1057
+ /**
1058
+ * Is a stylisation options for customizing BigCommercePayments Fastlane components
1059
+ *
1060
+ * Note: the styles for all BigCommercePayments Fastlane strategies should be the same,
1061
+ * because they will be provided to PayPal library only for the first strategy initialization
1062
+ * no matter which strategy was initialised first
1063
+ */
1064
+ styles?: PayPalFastlaneStylesOption;
1065
+ }
1066
+
1067
+ /**
1068
+ * A set of options that are required to initialize the BigCommercePayments Fastlane payment
1069
+ * method for presenting on the page.
1070
+ *
1071
+ *
1072
+ * Also, BigCommercePayments requires specific options to initialize BigCommercePayments Fastlane Card Component
1073
+ * ```html
1074
+ * <!-- This is where the BigCommercePayments Fastlane Card Component will be inserted -->
1075
+ * <div id="container"></div>
1076
+ * ```
1077
+ * ```js
1078
+ * service.initializePayment({
1079
+ * methodId: 'bigcommerce_payments_fastlane',
1080
+ * bigcommerce_payments_fastlane: {
1081
+ * onInit: (renderPayPalCardComponent) => renderPayPalCardComponent('#container-id'),
1082
+ * onChange: (showPayPalCardSelector) => showPayPalCardSelector(),
1083
+ * styles: {
1084
+ * root: {
1085
+ * backgroundColorPrimary: 'transparent',
1086
+ * errorColor: '#C40B0B',
1087
+ * fontFamily: 'Montserrat, Helvetica, Arial, sans-serif',
1088
+ * },
1089
+ * input: {
1090
+ * borderRadius: '0.25rem',
1091
+ * borderColor: '#9E9E9E',
1092
+ * focusBorderColor: '#4496F6',
1093
+ * },
1094
+ * toggle: {
1095
+ * colorPrimary: '#0F005E',
1096
+ * colorSecondary: '#ffffff',
1097
+ * },
1098
+ * text: {
1099
+ * body: {
1100
+ * color: '#222222',
1101
+ * fontSize: '1rem',
1102
+ * },
1103
+ * caption: {
1104
+ * color: '#515151',
1105
+ * fontSize: '0.875rem',
1106
+ * },
1107
+ * },
1108
+ * branding: 'light',
1109
+ * },
1110
+ * },
1111
+ * });
1112
+ * ```
1113
+ */
1114
+ declare interface BigCommercePaymentsFastlanePaymentInitializeOptions {
1115
+ /**
1116
+ * Is a callback that takes the CSS selector of a container
1117
+ * where the BigCommercePayments Fastlane form should be inserted into.
1118
+ */
1119
+ onInit?: (renderPayPalCardComponent: (container: string) => void) => void;
1120
+ /**
1121
+ * Is a callback that shows fastlane stored instruments
1122
+ * when get triggered
1123
+ */
1124
+ onChange?: (showPayPalCardSelector: () => Promise<CardInstrument_2 | undefined>) => void;
1125
+ /**
1126
+ * Is a stylisation options for customizing BigCommercePayments Fastlane components
1127
+ *
1128
+ * Note: the styles for all BigCommercePaymentsFastlane strategies should be the same,
1129
+ * because they will be provided to PayPal library only for the first strategy initialization
1130
+ * no matter what strategy was initialised first
1131
+ */
1132
+ styles?: PayPalFastlaneStylesOption;
1133
+ }
1134
+
1016
1135
  declare interface BigCommercePaymentsFieldsStyleOptions {
1017
1136
  variables?: {
1018
1137
  fontFamily?: string;
@@ -5127,7 +5246,7 @@ declare interface CustomerGroup {
5127
5246
  name: string;
5128
5247
  }
5129
5248
 
5130
- declare type CustomerInitializeOptions = BaseCustomerInitializeOptions & WithAmazonPayV2CustomerInitializeOptions & WithApplePayCustomerInitializeOptions & WithBigCommercePaymentsPayPalCustomerInitializeOptions & WithBigCommercePaymentsPayLaterCustomerInitializeOptions & WithBigCommercePaymentsVenmoCustomerInitializeOptions & WithBoltCustomerInitializeOptions & WithBraintreePaypalCustomerInitializeOptions & WithBraintreePaypalCreditCustomerInitializeOptions & WithBraintreeFastlaneCustomerInitializeOptions & WithGooglePayCustomerInitializeOptions & WithPayPalCommerceCustomerInitializeOptions & WithPayPalCommerceCreditCustomerInitializeOptions & WithPayPalCommerceVenmoCustomerInitializeOptions & WithPayPalCommerceFastlaneCustomerInitializeOptions & WithStripeUPECustomerInitializeOptions;
5249
+ declare type CustomerInitializeOptions = BaseCustomerInitializeOptions & WithAmazonPayV2CustomerInitializeOptions & WithApplePayCustomerInitializeOptions & WithBigCommercePaymentsPayPalCustomerInitializeOptions & WithBigCommercePaymentsFastlaneCustomerInitializeOptions & WithBigCommercePaymentsPayLaterCustomerInitializeOptions & WithBigCommercePaymentsVenmoCustomerInitializeOptions & WithBoltCustomerInitializeOptions & WithBraintreePaypalCustomerInitializeOptions & WithBraintreePaypalCreditCustomerInitializeOptions & WithBraintreeFastlaneCustomerInitializeOptions & WithGooglePayCustomerInitializeOptions & WithPayPalCommerceCustomerInitializeOptions & WithPayPalCommerceCreditCustomerInitializeOptions & WithPayPalCommerceVenmoCustomerInitializeOptions & WithPayPalCommerceFastlaneCustomerInitializeOptions & WithStripeUPECustomerInitializeOptions;
5131
5250
 
5132
5251
  declare interface CustomerPasswordRequirements {
5133
5252
  alpha: string;
@@ -7414,7 +7533,7 @@ declare interface PayPalCommerceFastlaneCustomerInitializeOptions {
7414
7533
  * because they will be provided to PayPal library only for the first strategy initialization
7415
7534
  * no matter which strategy was initialised first
7416
7535
  */
7417
- styles?: PayPalFastlaneStylesOption;
7536
+ styles?: PayPalFastlaneStylesOption_2;
7418
7537
  }
7419
7538
 
7420
7539
  /**
@@ -7482,7 +7601,7 @@ declare interface PayPalCommerceFastlanePaymentInitializeOptions {
7482
7601
  * because they will be provided to PayPal library only for the first strategy initialization
7483
7602
  * no matter what strategy was initialised first
7484
7603
  */
7485
- styles?: PayPalFastlaneStylesOption;
7604
+ styles?: PayPalFastlaneStylesOption_2;
7486
7605
  }
7487
7606
 
7488
7607
  /**
@@ -7497,7 +7616,7 @@ declare interface PayPalCommerceFastlaneShippingInitializeOptions {
7497
7616
  * because they will be provided to PayPal library only for the first strategy initialization
7498
7617
  * no matter what strategy was initialised first
7499
7618
  */
7500
- styles?: PayPalFastlaneStylesOption;
7619
+ styles?: PayPalFastlaneStylesOption_2;
7501
7620
  /**
7502
7621
  * Is a callback that shows PayPal Fastlane popup with customer addresses
7503
7622
  * when get triggered
@@ -7754,7 +7873,7 @@ declare class PaymentHumanVerificationHandler {
7754
7873
  private _isPaymentHumanVerificationRequest;
7755
7874
  }
7756
7875
 
7757
- declare type PaymentInitializeOptions = BasePaymentInitializeOptions & WithAdyenV3PaymentInitializeOptions & WithAdyenV2PaymentInitializeOptions & WithAmazonPayV2PaymentInitializeOptions & WithApplePayPaymentInitializeOptions & WithBigCommercePaymentsPayPalPaymentInitializeOptions & WithBigCommercePaymentsPayLaterPaymentInitializeOptions & WithBigCommercePaymentsRatePayPaymentInitializeOptions & WithBigCommercePaymentsCreditCardsPaymentInitializeOptions & WithBigCommercePaymentsAlternativeMethodsPaymentInitializeOptions & WithBigCommercePaymentsVenmoPaymentInitializeOptions & WithBlueSnapDirectAPMPaymentInitializeOptions & WithBoltPaymentInitializeOptions & WithBraintreeAchPaymentInitializeOptions & WithBraintreeLocalMethodsPaymentInitializeOptions & WithBraintreeFastlanePaymentInitializeOptions & WithCreditCardPaymentInitializeOptions & WithGooglePayPaymentInitializeOptions & WithMolliePaymentInitializeOptions & WithPayPalCommercePaymentInitializeOptions & WithPayPalCommerceCreditPaymentInitializeOptions & WithPayPalCommerceVenmoPaymentInitializeOptions & WithPayPalCommerceAlternativeMethodsPaymentInitializeOptions & WithPayPalCommerceCreditCardsPaymentInitializeOptions & WithPayPalCommerceRatePayPaymentInitializeOptions & WithPayPalCommerceFastlanePaymentInitializeOptions & WithSquareV2PaymentInitializeOptions & WithStripeV3PaymentInitializeOptions & WithStripeUPEPaymentInitializeOptions & WithWorldpayAccessPaymentInitializeOptions;
7876
+ declare type PaymentInitializeOptions = BasePaymentInitializeOptions & WithAdyenV3PaymentInitializeOptions & WithAdyenV2PaymentInitializeOptions & WithAmazonPayV2PaymentInitializeOptions & WithApplePayPaymentInitializeOptions & WithBigCommercePaymentsPayPalPaymentInitializeOptions & WithBigCommercePaymentsFastlanePaymentInitializeOptions & WithBigCommercePaymentsPayLaterPaymentInitializeOptions & WithBigCommercePaymentsRatePayPaymentInitializeOptions & WithBigCommercePaymentsCreditCardsPaymentInitializeOptions & WithBigCommercePaymentsAlternativeMethodsPaymentInitializeOptions & WithBigCommercePaymentsVenmoPaymentInitializeOptions & WithBlueSnapDirectAPMPaymentInitializeOptions & WithBoltPaymentInitializeOptions & WithBraintreeAchPaymentInitializeOptions & WithBraintreeLocalMethodsPaymentInitializeOptions & WithBraintreeFastlanePaymentInitializeOptions & WithCreditCardPaymentInitializeOptions & WithGooglePayPaymentInitializeOptions & WithMolliePaymentInitializeOptions & WithPayPalCommercePaymentInitializeOptions & WithPayPalCommerceCreditPaymentInitializeOptions & WithPayPalCommerceVenmoPaymentInitializeOptions & WithPayPalCommerceAlternativeMethodsPaymentInitializeOptions & WithPayPalCommerceCreditCardsPaymentInitializeOptions & WithPayPalCommerceRatePayPaymentInitializeOptions & WithPayPalCommerceFastlanePaymentInitializeOptions & WithSquareV2PaymentInitializeOptions & WithStripeV3PaymentInitializeOptions & WithStripeUPEPaymentInitializeOptions & WithWorldpayAccessPaymentInitializeOptions;
7758
7877
 
7759
7878
  declare type PaymentInstrument = CardInstrument | AccountInstrument;
7760
7879
 
@@ -9061,6 +9180,14 @@ declare interface WithBigCommercePaymentsCreditCardsPaymentInitializeOptions {
9061
9180
  bigcommerce_payments_creditcards?: BigCommercePaymentsCreditCardsPaymentInitializeOptions;
9062
9181
  }
9063
9182
 
9183
+ declare interface WithBigCommercePaymentsFastlaneCustomerInitializeOptions {
9184
+ bigcommerce_payments_fastlane?: BigCommercePaymentsFastlaneCustomerInitializeOptions;
9185
+ }
9186
+
9187
+ declare interface WithBigCommercePaymentsFastlanePaymentInitializeOptions {
9188
+ bigcommerce_payments_fastlane?: BigCommercePaymentsFastlanePaymentInitializeOptions;
9189
+ }
9190
+
9064
9191
  declare interface WithBigCommercePaymentsPayLaterButtonInitializeOptions {
9065
9192
  bigcommerce_payments_paylater?: BigCommercePaymentsPayLaterButtonInitializeOptions;
9066
9193
  }