@bigcommerce/checkout-sdk 1.330.1 → 1.331.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/CHANGELOG.md +21 -0
- package/dist/checkout-button.d.ts +76 -67
- package/dist/checkout-button.js +1 -1
- package/dist/checkout-button.js.map +1 -1
- package/dist/checkout-button.umd.js +1 -1
- package/dist/checkout-button.umd.js.map +1 -1
- package/dist/checkout-sdk.d.ts +76 -67
- 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/docs/README.md +9 -8
- package/docs/enums/PaypalStyleButtonColor.md +43 -0
- package/docs/enums/PaypalStyleButtonLabel.md +43 -0
- package/docs/enums/PaypalStyleButtonLayout.md +22 -0
- package/docs/enums/PaypalStyleButtonShape.md +22 -0
- package/docs/enums/StyleButtonColor.md +15 -15
- package/docs/enums/StyleButtonLabel.md +15 -15
- package/docs/enums/StyleButtonLayout.md +6 -6
- package/docs/enums/StyleButtonShape.md +6 -6
- package/docs/interfaces/BaseCheckoutButtonInitializeOptions.md +1 -1
- package/docs/interfaces/BraintreePaypalButtonInitializeOptions.md +1 -1
- package/docs/interfaces/BraintreePaypalCreditButtonInitializeOptions.md +1 -1
- package/docs/interfaces/PayPalButtonStyleOptions.md +4 -4
- package/docs/interfaces/PaypalButtonInitializeOptions.md +1 -1
- package/docs/interfaces/PaypalCommerceAlternativeMethodsButtonOptions.md +1 -1
- package/docs/interfaces/PaypalCommerceButtonInitializeOptions.md +1 -1
- package/docs/interfaces/PaypalCommerceCreditButtonInitializeOptions.md +1 -1
- package/docs/interfaces/PaypalCommerceVenmoButtonInitializeOptions.md +1 -1
- package/docs/interfaces/{PaypalButtonStyleOptions.md → PaypalStyleOptions.md} +10 -10
- package/docs/interfaces/PaypalStyleOptions_2.md +67 -0
- package/docs/interfaces/WithBuyNowFeature.md +23 -0
- package/package.json +1 -1
- package/docs/enums/StyleButtonColor_2.md +0 -43
- package/docs/enums/StyleButtonLabel_2.md +0 -43
- package/docs/enums/StyleButtonLayout_2.md +0 -22
- package/docs/enums/StyleButtonShape_2.md +0 -22
- package/docs/interfaces/PaypalButtonStyleOptions_2.md +0 -67
package/dist/checkout-sdk.d.ts
CHANGED
|
@@ -560,9 +560,9 @@ declare interface AmazonPayV2ButtonConfig {
|
|
|
560
560
|
}
|
|
561
561
|
|
|
562
562
|
/**
|
|
563
|
-
* The required config to render the AmazonPayV2
|
|
563
|
+
* The required config to render the AmazonPayV2 button.
|
|
564
564
|
*/
|
|
565
|
-
declare type AmazonPayV2ButtonInitializeOptions = AmazonPayV2ButtonParameters;
|
|
565
|
+
declare type AmazonPayV2ButtonInitializeOptions = AmazonPayV2ButtonParameters | WithBuyNowFeature;
|
|
566
566
|
|
|
567
567
|
declare type AmazonPayV2ButtonParameters = AmazonPayV2ButtonParams | AmazonPayV2NewButtonParams;
|
|
568
568
|
|
|
@@ -1634,7 +1634,7 @@ declare interface BraintreePaypalButtonInitializeOptions {
|
|
|
1634
1634
|
/**
|
|
1635
1635
|
* A set of styling options for the checkout button.
|
|
1636
1636
|
*/
|
|
1637
|
-
style?: Pick<
|
|
1637
|
+
style?: Pick<PaypalStyleOptions, 'layout' | 'size' | 'color' | 'label' | 'shape' | 'tagline' | 'fundingicons' | 'height'>;
|
|
1638
1638
|
/**
|
|
1639
1639
|
* Address to be used for shipping.
|
|
1640
1640
|
* If not provided, it will use the first saved address from the active customer.
|
|
@@ -1674,7 +1674,7 @@ declare interface BraintreePaypalCreditButtonInitializeOptions {
|
|
|
1674
1674
|
/**
|
|
1675
1675
|
* A set of styling options for the checkout button.
|
|
1676
1676
|
*/
|
|
1677
|
-
style?: Pick<
|
|
1677
|
+
style?: Pick<PaypalStyleOptions, 'layout' | 'size' | 'color' | 'label' | 'shape' | 'tagline' | 'fundingicons' | 'height'>;
|
|
1678
1678
|
/**
|
|
1679
1679
|
* Address to be used for shipping.
|
|
1680
1680
|
* If not provided, it will use the first saved address from the active customer.
|
|
@@ -5946,11 +5946,11 @@ declare interface PasswordRequirements {
|
|
|
5946
5946
|
}
|
|
5947
5947
|
|
|
5948
5948
|
declare interface PayPalButtonStyleOptions {
|
|
5949
|
-
layout?:
|
|
5950
|
-
color?:
|
|
5951
|
-
shape?:
|
|
5949
|
+
layout?: StyleButtonLayout;
|
|
5950
|
+
color?: StyleButtonColor;
|
|
5951
|
+
shape?: StyleButtonShape;
|
|
5952
5952
|
height?: number;
|
|
5953
|
-
label?:
|
|
5953
|
+
label?: StyleButtonLabel;
|
|
5954
5954
|
tagline?: boolean;
|
|
5955
5955
|
custom?: {
|
|
5956
5956
|
label?: string;
|
|
@@ -6086,7 +6086,7 @@ declare interface PaypalButtonInitializeOptions {
|
|
|
6086
6086
|
/**
|
|
6087
6087
|
* A set of styling options for the checkout button.
|
|
6088
6088
|
*/
|
|
6089
|
-
style?: Pick<
|
|
6089
|
+
style?: Pick<PaypalStyleOptions, 'layout' | 'size' | 'color' | 'label' | 'shape' | 'tagline' | 'fundingicons'>;
|
|
6090
6090
|
/**
|
|
6091
6091
|
* A callback that gets called if unable to authorize and tokenize payment.
|
|
6092
6092
|
*
|
|
@@ -6121,34 +6121,6 @@ declare enum PaypalButtonStyleLayoutOption {
|
|
|
6121
6121
|
VERTICAL = "vertical"
|
|
6122
6122
|
}
|
|
6123
6123
|
|
|
6124
|
-
declare interface PaypalButtonStyleOptions {
|
|
6125
|
-
layout?: PaypalButtonStyleLayoutOption;
|
|
6126
|
-
size?: PaypalButtonStyleSizeOption;
|
|
6127
|
-
color?: PaypalButtonStyleColorOption;
|
|
6128
|
-
label?: PaypalButtonStyleLabelOption;
|
|
6129
|
-
shape?: PaypalButtonStyleShapeOption;
|
|
6130
|
-
tagline?: boolean;
|
|
6131
|
-
fundingicons?: boolean;
|
|
6132
|
-
height?: number;
|
|
6133
|
-
}
|
|
6134
|
-
|
|
6135
|
-
declare interface PaypalButtonStyleOptions_2 {
|
|
6136
|
-
layout?: StyleButtonLayout;
|
|
6137
|
-
color?: StyleButtonColor;
|
|
6138
|
-
shape?: StyleButtonShape;
|
|
6139
|
-
height?: number;
|
|
6140
|
-
label?: StyleButtonLabel;
|
|
6141
|
-
tagline?: boolean;
|
|
6142
|
-
custom?: {
|
|
6143
|
-
label?: string;
|
|
6144
|
-
css?: {
|
|
6145
|
-
background?: string;
|
|
6146
|
-
color?: string;
|
|
6147
|
-
width?: string;
|
|
6148
|
-
};
|
|
6149
|
-
};
|
|
6150
|
-
}
|
|
6151
|
-
|
|
6152
6124
|
declare enum PaypalButtonStyleShapeOption {
|
|
6153
6125
|
PILL = "pill",
|
|
6154
6126
|
RECT = "rect"
|
|
@@ -6173,7 +6145,7 @@ declare interface PaypalCommerceAlternativeMethodsButtonOptions {
|
|
|
6173
6145
|
/**
|
|
6174
6146
|
* A set of styling options for the checkout button.
|
|
6175
6147
|
*/
|
|
6176
|
-
style?:
|
|
6148
|
+
style?: PaypalStyleOptions_2;
|
|
6177
6149
|
/**
|
|
6178
6150
|
* The option that used to initialize a PayPal script with provided currency code.
|
|
6179
6151
|
*/
|
|
@@ -6190,7 +6162,7 @@ declare interface PaypalCommerceButtonInitializeOptions {
|
|
|
6190
6162
|
/**
|
|
6191
6163
|
* A set of styling options for the checkout button.
|
|
6192
6164
|
*/
|
|
6193
|
-
style?:
|
|
6165
|
+
style?: PaypalStyleOptions_2;
|
|
6194
6166
|
/**
|
|
6195
6167
|
* Flag which helps to detect that the strategy initializes on Checkout page.
|
|
6196
6168
|
*/
|
|
@@ -6223,7 +6195,7 @@ declare interface PaypalCommerceCreditButtonInitializeOptions {
|
|
|
6223
6195
|
/**
|
|
6224
6196
|
* A set of styling options for the checkout button.
|
|
6225
6197
|
*/
|
|
6226
|
-
style?:
|
|
6198
|
+
style?: PaypalStyleOptions_2;
|
|
6227
6199
|
/**
|
|
6228
6200
|
* The option that used to initialize a PayPal script with provided currency code.
|
|
6229
6201
|
*/
|
|
@@ -6569,7 +6541,7 @@ declare interface PaypalCommerceVenmoButtonInitializeOptions {
|
|
|
6569
6541
|
/**
|
|
6570
6542
|
* A set of styling options for the checkout button.
|
|
6571
6543
|
*/
|
|
6572
|
-
style?:
|
|
6544
|
+
style?: PaypalStyleOptions_2;
|
|
6573
6545
|
/**
|
|
6574
6546
|
* Flag which helps to detect that the strategy initializes on Checkout page
|
|
6575
6547
|
*/
|
|
@@ -6635,6 +6607,60 @@ declare interface PaypalFieldsStyleOptions {
|
|
|
6635
6607
|
};
|
|
6636
6608
|
}
|
|
6637
6609
|
|
|
6610
|
+
declare enum PaypalStyleButtonColor {
|
|
6611
|
+
gold = "gold",
|
|
6612
|
+
blue = "blue",
|
|
6613
|
+
silver = "silver",
|
|
6614
|
+
black = "black",
|
|
6615
|
+
white = "white"
|
|
6616
|
+
}
|
|
6617
|
+
|
|
6618
|
+
declare enum PaypalStyleButtonLabel {
|
|
6619
|
+
paypal = "paypal",
|
|
6620
|
+
checkout = "checkout",
|
|
6621
|
+
buynow = "buynow",
|
|
6622
|
+
pay = "pay",
|
|
6623
|
+
installment = "installment"
|
|
6624
|
+
}
|
|
6625
|
+
|
|
6626
|
+
declare enum PaypalStyleButtonLayout {
|
|
6627
|
+
vertical = "vertical",
|
|
6628
|
+
horizontal = "horizontal"
|
|
6629
|
+
}
|
|
6630
|
+
|
|
6631
|
+
declare enum PaypalStyleButtonShape {
|
|
6632
|
+
pill = "pill",
|
|
6633
|
+
rect = "rect"
|
|
6634
|
+
}
|
|
6635
|
+
|
|
6636
|
+
declare interface PaypalStyleOptions {
|
|
6637
|
+
layout?: PaypalButtonStyleLayoutOption;
|
|
6638
|
+
size?: PaypalButtonStyleSizeOption;
|
|
6639
|
+
color?: PaypalButtonStyleColorOption;
|
|
6640
|
+
label?: PaypalButtonStyleLabelOption;
|
|
6641
|
+
shape?: PaypalButtonStyleShapeOption;
|
|
6642
|
+
tagline?: boolean;
|
|
6643
|
+
fundingicons?: boolean;
|
|
6644
|
+
height?: number;
|
|
6645
|
+
}
|
|
6646
|
+
|
|
6647
|
+
declare interface PaypalStyleOptions_2 {
|
|
6648
|
+
layout?: PaypalStyleButtonLayout;
|
|
6649
|
+
color?: PaypalStyleButtonColor;
|
|
6650
|
+
shape?: PaypalStyleButtonShape;
|
|
6651
|
+
height?: number;
|
|
6652
|
+
label?: PaypalStyleButtonLabel;
|
|
6653
|
+
tagline?: boolean;
|
|
6654
|
+
custom?: {
|
|
6655
|
+
label?: string;
|
|
6656
|
+
css?: {
|
|
6657
|
+
background?: string;
|
|
6658
|
+
color?: string;
|
|
6659
|
+
width?: string;
|
|
6660
|
+
};
|
|
6661
|
+
};
|
|
6662
|
+
}
|
|
6663
|
+
|
|
6638
6664
|
declare interface PhysicalItem extends LineItem {
|
|
6639
6665
|
isShippingRequired: boolean;
|
|
6640
6666
|
giftWrapping?: {
|
|
@@ -7389,14 +7415,6 @@ declare interface StripeV3PaymentInitializeOptions {
|
|
|
7389
7415
|
}
|
|
7390
7416
|
|
|
7391
7417
|
declare enum StyleButtonColor {
|
|
7392
|
-
gold = "gold",
|
|
7393
|
-
blue = "blue",
|
|
7394
|
-
silver = "silver",
|
|
7395
|
-
black = "black",
|
|
7396
|
-
white = "white"
|
|
7397
|
-
}
|
|
7398
|
-
|
|
7399
|
-
declare enum StyleButtonColor_2 {
|
|
7400
7418
|
GOLD = "gold",
|
|
7401
7419
|
BLUE = "blue",
|
|
7402
7420
|
SILVER = "silver",
|
|
@@ -7405,14 +7423,6 @@ declare enum StyleButtonColor_2 {
|
|
|
7405
7423
|
}
|
|
7406
7424
|
|
|
7407
7425
|
declare enum StyleButtonLabel {
|
|
7408
|
-
paypal = "paypal",
|
|
7409
|
-
checkout = "checkout",
|
|
7410
|
-
buynow = "buynow",
|
|
7411
|
-
pay = "pay",
|
|
7412
|
-
installment = "installment"
|
|
7413
|
-
}
|
|
7414
|
-
|
|
7415
|
-
declare enum StyleButtonLabel_2 {
|
|
7416
7426
|
PAYPAL = "paypal",
|
|
7417
7427
|
CHECKOUT = "checkout",
|
|
7418
7428
|
BUYNOW = "buynow",
|
|
@@ -7421,21 +7431,11 @@ declare enum StyleButtonLabel_2 {
|
|
|
7421
7431
|
}
|
|
7422
7432
|
|
|
7423
7433
|
declare enum StyleButtonLayout {
|
|
7424
|
-
vertical = "vertical",
|
|
7425
|
-
horizontal = "horizontal"
|
|
7426
|
-
}
|
|
7427
|
-
|
|
7428
|
-
declare enum StyleButtonLayout_2 {
|
|
7429
7434
|
VERTICAL = "vertical",
|
|
7430
7435
|
HORIZONTAL = "horizontal"
|
|
7431
7436
|
}
|
|
7432
7437
|
|
|
7433
7438
|
declare enum StyleButtonShape {
|
|
7434
|
-
pill = "pill",
|
|
7435
|
-
rect = "rect"
|
|
7436
|
-
}
|
|
7437
|
-
|
|
7438
|
-
declare enum StyleButtonShape_2 {
|
|
7439
7439
|
PILL = "pill",
|
|
7440
7440
|
RECT = "rect"
|
|
7441
7441
|
}
|
|
@@ -7634,6 +7634,15 @@ declare interface WithApplePayPaymentInitializeOptions {
|
|
|
7634
7634
|
applepay?: ApplePayPaymentInitializeOptions;
|
|
7635
7635
|
}
|
|
7636
7636
|
|
|
7637
|
+
declare interface WithBuyNowFeature {
|
|
7638
|
+
/**
|
|
7639
|
+
* The options that are required to initialize Buy Now functionality.
|
|
7640
|
+
*/
|
|
7641
|
+
buyNowInitializeOptions?: {
|
|
7642
|
+
getBuyNowCartRequestBody?(): BuyNowCartRequestBody | void;
|
|
7643
|
+
};
|
|
7644
|
+
}
|
|
7645
|
+
|
|
7637
7646
|
declare interface WithCheckoutcomFawryInstrument {
|
|
7638
7647
|
customerMobile: string;
|
|
7639
7648
|
customerEmail: string;
|