@bigcommerce/checkout-sdk 1.734.0 → 1.736.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.
- package/dist/checkout-button.js +1 -1
- package/dist/checkout-button.umd.js +1 -1
- package/dist/checkout-sdk.d.ts +136 -7
- package/dist/checkout-sdk.js +1 -1
- package/dist/checkout-sdk.js.map +1 -1
- package/dist/checkout-sdk.umd.js +1 -1
- package/dist/checkout-sdk.umd.js.map +1 -1
- package/dist/hosted-form-v2-iframe-host.js +1 -1
- package/dist/hosted-form-v2-iframe-host.umd.js +1 -1
- package/docs/README.md +6 -2
- package/docs/enums/ExtensionRegion.md +7 -0
- package/docs/interfaces/BigCommercePaymentsFastlaneCustomerInitializeOptions.md +59 -0
- package/docs/interfaces/BigCommercePaymentsFastlanePaymentInitializeOptions.md +109 -0
- package/docs/interfaces/Extension.md +7 -0
- package/docs/interfaces/WithBigCommercePaymentsFastlaneCustomerInitializeOptions.md +15 -0
- package/docs/interfaces/WithBigCommercePaymentsFastlanePaymentInitializeOptions.md +15 -0
- package/package.json +1 -1
package/dist/checkout-sdk.d.ts
CHANGED
|
@@ -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/
|
|
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;
|
|
@@ -5478,6 +5597,7 @@ declare interface Extension {
|
|
|
5478
5597
|
name: string;
|
|
5479
5598
|
region: ExtensionRegion;
|
|
5480
5599
|
url: string;
|
|
5600
|
+
type?: 'iframe' | 'worker';
|
|
5481
5601
|
}
|
|
5482
5602
|
|
|
5483
5603
|
declare interface ExtensionCommandMap {
|
|
@@ -5519,7 +5639,8 @@ declare const enum ExtensionRegion {
|
|
|
5519
5639
|
ShippingShippingAddressFormAfter = "shipping.shippingAddressForm.after",
|
|
5520
5640
|
ShippingSelectedShippingMethod = "shipping.selectedShippingMethod",
|
|
5521
5641
|
SummaryAfter = "summary.after",
|
|
5522
|
-
SummaryLastItemAfter = "summary.lastItem.after"
|
|
5642
|
+
SummaryLastItemAfter = "summary.lastItem.after",
|
|
5643
|
+
GlobalWebWorker = "global"
|
|
5523
5644
|
}
|
|
5524
5645
|
|
|
5525
5646
|
declare interface ExtensionSelector {
|
|
@@ -7412,7 +7533,7 @@ declare interface PayPalCommerceFastlaneCustomerInitializeOptions {
|
|
|
7412
7533
|
* because they will be provided to PayPal library only for the first strategy initialization
|
|
7413
7534
|
* no matter which strategy was initialised first
|
|
7414
7535
|
*/
|
|
7415
|
-
styles?:
|
|
7536
|
+
styles?: PayPalFastlaneStylesOption_2;
|
|
7416
7537
|
}
|
|
7417
7538
|
|
|
7418
7539
|
/**
|
|
@@ -7480,7 +7601,7 @@ declare interface PayPalCommerceFastlanePaymentInitializeOptions {
|
|
|
7480
7601
|
* because they will be provided to PayPal library only for the first strategy initialization
|
|
7481
7602
|
* no matter what strategy was initialised first
|
|
7482
7603
|
*/
|
|
7483
|
-
styles?:
|
|
7604
|
+
styles?: PayPalFastlaneStylesOption_2;
|
|
7484
7605
|
}
|
|
7485
7606
|
|
|
7486
7607
|
/**
|
|
@@ -7495,7 +7616,7 @@ declare interface PayPalCommerceFastlaneShippingInitializeOptions {
|
|
|
7495
7616
|
* because they will be provided to PayPal library only for the first strategy initialization
|
|
7496
7617
|
* no matter what strategy was initialised first
|
|
7497
7618
|
*/
|
|
7498
|
-
styles?:
|
|
7619
|
+
styles?: PayPalFastlaneStylesOption_2;
|
|
7499
7620
|
/**
|
|
7500
7621
|
* Is a callback that shows PayPal Fastlane popup with customer addresses
|
|
7501
7622
|
* when get triggered
|
|
@@ -7752,7 +7873,7 @@ declare class PaymentHumanVerificationHandler {
|
|
|
7752
7873
|
private _isPaymentHumanVerificationRequest;
|
|
7753
7874
|
}
|
|
7754
7875
|
|
|
7755
|
-
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;
|
|
7756
7877
|
|
|
7757
7878
|
declare type PaymentInstrument = CardInstrument | AccountInstrument;
|
|
7758
7879
|
|
|
@@ -9059,6 +9180,14 @@ declare interface WithBigCommercePaymentsCreditCardsPaymentInitializeOptions {
|
|
|
9059
9180
|
bigcommerce_payments_creditcards?: BigCommercePaymentsCreditCardsPaymentInitializeOptions;
|
|
9060
9181
|
}
|
|
9061
9182
|
|
|
9183
|
+
declare interface WithBigCommercePaymentsFastlaneCustomerInitializeOptions {
|
|
9184
|
+
bigcommerce_payments_fastlane?: BigCommercePaymentsFastlaneCustomerInitializeOptions;
|
|
9185
|
+
}
|
|
9186
|
+
|
|
9187
|
+
declare interface WithBigCommercePaymentsFastlanePaymentInitializeOptions {
|
|
9188
|
+
bigcommerce_payments_fastlane?: BigCommercePaymentsFastlanePaymentInitializeOptions;
|
|
9189
|
+
}
|
|
9190
|
+
|
|
9062
9191
|
declare interface WithBigCommercePaymentsPayLaterButtonInitializeOptions {
|
|
9063
9192
|
bigcommerce_payments_paylater?: BigCommercePaymentsPayLaterButtonInitializeOptions;
|
|
9064
9193
|
}
|