@bigcommerce/checkout-sdk 1.330.1 → 1.332.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 +28 -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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [1.332.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.331.0...v1.332.0) (2023-01-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **payment:** PAYPAL-1934 move PaymentMethodFailedError to integration package ([a9d1546](https://github.com/bigcommerce/checkout-sdk-js/commit/a9d15463989a98f211ddec6c37e47721afe983fb))
|
|
11
|
+
|
|
12
|
+
## [1.331.0](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.330.1...v1.331.0) (2023-01-30)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **payment:** PAYPAL-000 added an ability to loadCheckout by provided id in payments-integration-api ([#1803](https://github.com/bigcommerce/checkout-sdk-js/issues/1803)) ([a0e3e02](https://github.com/bigcommerce/checkout-sdk-js/commit/a0e3e02c454e92e06002ba9bf8f43aef28a723d6))
|
|
18
|
+
* **payment:** PAYPAL-000 added an ability to use BuyNowCartCreationError from payment-integration-api ([#1804](https://github.com/bigcommerce/checkout-sdk-js/issues/1804)) ([0c7edca](https://github.com/bigcommerce/checkout-sdk-js/commit/0c7edca2a83ad462d185830928efe3f3003ccf7c))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **payment:** PAYPAL-000 updated amazon pay specs with CartSource to fix the issue with failed build ([#1806](https://github.com/bigcommerce/checkout-sdk-js/issues/1806)) ([7fa0ccd](https://github.com/bigcommerce/checkout-sdk-js/commit/7fa0ccd8aa3c9fcc04e27a37bd6cd660e3def123))
|
|
24
|
+
* **payment:** PAYPAL-1635 Buy Now feature for amazon pay ([562ab38](https://github.com/bigcommerce/checkout-sdk-js/commit/562ab380046cec191067d5c68e8f2dde221aab5c))
|
|
25
|
+
* **payment:** PAYPAL-1635 fix after review ([34cc8ee](https://github.com/bigcommerce/checkout-sdk-js/commit/34cc8eebfe25e2df5505c7e941550e29342ed826))
|
|
26
|
+
* **payment:** PAYPAL-1635 update after review ([4696290](https://github.com/bigcommerce/checkout-sdk-js/commit/469629041125b5b200e87576ad655c2cce7cafb4))
|
|
27
|
+
* **payment:** PAYPAL-1635 update after review ([0ce178e](https://github.com/bigcommerce/checkout-sdk-js/commit/0ce178e6a6d3d443e9781a7f2932e23c50f6430a))
|
|
28
|
+
* **payment:** PAYPAL-1635 update after review ([e16ec75](https://github.com/bigcommerce/checkout-sdk-js/commit/e16ec75b31e19eff21bae8b700b8c729e1e84ee8))
|
|
29
|
+
* **payment:** PAYPAL-1635 update after review ([651bc1f](https://github.com/bigcommerce/checkout-sdk-js/commit/651bc1fafbf5de7ed2445012b175ac4ac6edaa56))
|
|
30
|
+
* **payment:** PAYPAL-1763 fixed an issue when we could not proceed checkout after trying to place order with an empty CVV for stored card ([4aea399](https://github.com/bigcommerce/checkout-sdk-js/commit/4aea399b9e483e3862f339da17d1561ac7764341))
|
|
31
|
+
* **payment:** PAYPAL-1929 renamed several PayPal Commerce interfaces to fix the issue with doc files ([#1799](https://github.com/bigcommerce/checkout-sdk-js/issues/1799)) ([05df1e4](https://github.com/bigcommerce/checkout-sdk-js/commit/05df1e4437189b57f6dd05e46fcb6f6eb35d1dec))
|
|
32
|
+
|
|
5
33
|
### [1.330.1](https://github.com/bigcommerce/checkout-sdk-js/compare/v1.330.0...v1.330.1) (2023-01-27)
|
|
6
34
|
|
|
7
35
|
|
|
@@ -64,9 +64,9 @@ declare interface AmazonPayV2ButtonConfig {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
* The required config to render the AmazonPayV2
|
|
67
|
+
* The required config to render the AmazonPayV2 button.
|
|
68
68
|
*/
|
|
69
|
-
declare type AmazonPayV2ButtonInitializeOptions = AmazonPayV2ButtonParameters;
|
|
69
|
+
declare type AmazonPayV2ButtonInitializeOptions = AmazonPayV2ButtonParameters | WithBuyNowFeature;
|
|
70
70
|
|
|
71
71
|
declare type AmazonPayV2ButtonParameters = AmazonPayV2ButtonParams | AmazonPayV2NewButtonParams;
|
|
72
72
|
|
|
@@ -335,7 +335,7 @@ declare interface BraintreePaypalButtonInitializeOptions {
|
|
|
335
335
|
/**
|
|
336
336
|
* A set of styling options for the checkout button.
|
|
337
337
|
*/
|
|
338
|
-
style?: Pick<
|
|
338
|
+
style?: Pick<PaypalStyleOptions, 'layout' | 'size' | 'color' | 'label' | 'shape' | 'tagline' | 'fundingicons' | 'height'>;
|
|
339
339
|
/**
|
|
340
340
|
* Address to be used for shipping.
|
|
341
341
|
* If not provided, it will use the first saved address from the active customer.
|
|
@@ -375,7 +375,7 @@ declare interface BraintreePaypalCreditButtonInitializeOptions {
|
|
|
375
375
|
/**
|
|
376
376
|
* A set of styling options for the checkout button.
|
|
377
377
|
*/
|
|
378
|
-
style?: Pick<
|
|
378
|
+
style?: Pick<PaypalStyleOptions, 'layout' | 'size' | 'color' | 'label' | 'shape' | 'tagline' | 'fundingicons' | 'height'>;
|
|
379
379
|
/**
|
|
380
380
|
* Address to be used for shipping.
|
|
381
381
|
* If not provided, it will use the first saved address from the active customer.
|
|
@@ -633,11 +633,11 @@ declare interface LineItem {
|
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
declare interface PayPalButtonStyleOptions {
|
|
636
|
-
layout?:
|
|
637
|
-
color?:
|
|
638
|
-
shape?:
|
|
636
|
+
layout?: StyleButtonLayout;
|
|
637
|
+
color?: StyleButtonColor;
|
|
638
|
+
shape?: StyleButtonShape;
|
|
639
639
|
height?: number;
|
|
640
|
-
label?:
|
|
640
|
+
label?: StyleButtonLabel;
|
|
641
641
|
tagline?: boolean;
|
|
642
642
|
custom?: {
|
|
643
643
|
label?: string;
|
|
@@ -687,7 +687,7 @@ declare interface PaypalButtonInitializeOptions {
|
|
|
687
687
|
/**
|
|
688
688
|
* A set of styling options for the checkout button.
|
|
689
689
|
*/
|
|
690
|
-
style?: Pick<
|
|
690
|
+
style?: Pick<PaypalStyleOptions, 'layout' | 'size' | 'color' | 'label' | 'shape' | 'tagline' | 'fundingicons'>;
|
|
691
691
|
/**
|
|
692
692
|
* A callback that gets called if unable to authorize and tokenize payment.
|
|
693
693
|
*
|
|
@@ -722,34 +722,6 @@ declare enum PaypalButtonStyleLayoutOption {
|
|
|
722
722
|
VERTICAL = "vertical"
|
|
723
723
|
}
|
|
724
724
|
|
|
725
|
-
declare interface PaypalButtonStyleOptions {
|
|
726
|
-
layout?: PaypalButtonStyleLayoutOption;
|
|
727
|
-
size?: PaypalButtonStyleSizeOption;
|
|
728
|
-
color?: PaypalButtonStyleColorOption;
|
|
729
|
-
label?: PaypalButtonStyleLabelOption;
|
|
730
|
-
shape?: PaypalButtonStyleShapeOption;
|
|
731
|
-
tagline?: boolean;
|
|
732
|
-
fundingicons?: boolean;
|
|
733
|
-
height?: number;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
declare interface PaypalButtonStyleOptions_2 {
|
|
737
|
-
layout?: StyleButtonLayout;
|
|
738
|
-
color?: StyleButtonColor;
|
|
739
|
-
shape?: StyleButtonShape;
|
|
740
|
-
height?: number;
|
|
741
|
-
label?: StyleButtonLabel;
|
|
742
|
-
tagline?: boolean;
|
|
743
|
-
custom?: {
|
|
744
|
-
label?: string;
|
|
745
|
-
css?: {
|
|
746
|
-
background?: string;
|
|
747
|
-
color?: string;
|
|
748
|
-
width?: string;
|
|
749
|
-
};
|
|
750
|
-
};
|
|
751
|
-
}
|
|
752
|
-
|
|
753
725
|
declare enum PaypalButtonStyleShapeOption {
|
|
754
726
|
PILL = "pill",
|
|
755
727
|
RECT = "rect"
|
|
@@ -774,7 +746,7 @@ declare interface PaypalCommerceAlternativeMethodsButtonOptions {
|
|
|
774
746
|
/**
|
|
775
747
|
* A set of styling options for the checkout button.
|
|
776
748
|
*/
|
|
777
|
-
style?:
|
|
749
|
+
style?: PaypalStyleOptions_2;
|
|
778
750
|
/**
|
|
779
751
|
* The option that used to initialize a PayPal script with provided currency code.
|
|
780
752
|
*/
|
|
@@ -791,7 +763,7 @@ declare interface PaypalCommerceButtonInitializeOptions {
|
|
|
791
763
|
/**
|
|
792
764
|
* A set of styling options for the checkout button.
|
|
793
765
|
*/
|
|
794
|
-
style?:
|
|
766
|
+
style?: PaypalStyleOptions_2;
|
|
795
767
|
/**
|
|
796
768
|
* Flag which helps to detect that the strategy initializes on Checkout page.
|
|
797
769
|
*/
|
|
@@ -824,7 +796,7 @@ declare interface PaypalCommerceCreditButtonInitializeOptions {
|
|
|
824
796
|
/**
|
|
825
797
|
* A set of styling options for the checkout button.
|
|
826
798
|
*/
|
|
827
|
-
style?:
|
|
799
|
+
style?: PaypalStyleOptions_2;
|
|
828
800
|
/**
|
|
829
801
|
* The option that used to initialize a PayPal script with provided currency code.
|
|
830
802
|
*/
|
|
@@ -845,7 +817,7 @@ declare interface PaypalCommerceVenmoButtonInitializeOptions {
|
|
|
845
817
|
/**
|
|
846
818
|
* A set of styling options for the checkout button.
|
|
847
819
|
*/
|
|
848
|
-
style?:
|
|
820
|
+
style?: PaypalStyleOptions_2;
|
|
849
821
|
/**
|
|
850
822
|
* Flag which helps to detect that the strategy initializes on Checkout page
|
|
851
823
|
*/
|
|
@@ -862,6 +834,60 @@ declare interface PaypalCommerceVenmoButtonInitializeOptions {
|
|
|
862
834
|
};
|
|
863
835
|
}
|
|
864
836
|
|
|
837
|
+
declare enum PaypalStyleButtonColor {
|
|
838
|
+
gold = "gold",
|
|
839
|
+
blue = "blue",
|
|
840
|
+
silver = "silver",
|
|
841
|
+
black = "black",
|
|
842
|
+
white = "white"
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
declare enum PaypalStyleButtonLabel {
|
|
846
|
+
paypal = "paypal",
|
|
847
|
+
checkout = "checkout",
|
|
848
|
+
buynow = "buynow",
|
|
849
|
+
pay = "pay",
|
|
850
|
+
installment = "installment"
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
declare enum PaypalStyleButtonLayout {
|
|
854
|
+
vertical = "vertical",
|
|
855
|
+
horizontal = "horizontal"
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
declare enum PaypalStyleButtonShape {
|
|
859
|
+
pill = "pill",
|
|
860
|
+
rect = "rect"
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
declare interface PaypalStyleOptions {
|
|
864
|
+
layout?: PaypalButtonStyleLayoutOption;
|
|
865
|
+
size?: PaypalButtonStyleSizeOption;
|
|
866
|
+
color?: PaypalButtonStyleColorOption;
|
|
867
|
+
label?: PaypalButtonStyleLabelOption;
|
|
868
|
+
shape?: PaypalButtonStyleShapeOption;
|
|
869
|
+
tagline?: boolean;
|
|
870
|
+
fundingicons?: boolean;
|
|
871
|
+
height?: number;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
declare interface PaypalStyleOptions_2 {
|
|
875
|
+
layout?: PaypalStyleButtonLayout;
|
|
876
|
+
color?: PaypalStyleButtonColor;
|
|
877
|
+
shape?: PaypalStyleButtonShape;
|
|
878
|
+
height?: number;
|
|
879
|
+
label?: PaypalStyleButtonLabel;
|
|
880
|
+
tagline?: boolean;
|
|
881
|
+
custom?: {
|
|
882
|
+
label?: string;
|
|
883
|
+
css?: {
|
|
884
|
+
background?: string;
|
|
885
|
+
color?: string;
|
|
886
|
+
width?: string;
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
|
|
865
891
|
/**
|
|
866
892
|
* A set of options for configuring an asynchronous request.
|
|
867
893
|
*/
|
|
@@ -889,14 +915,6 @@ declare abstract class StandardError extends Error implements CustomError {
|
|
|
889
915
|
}
|
|
890
916
|
|
|
891
917
|
declare enum StyleButtonColor {
|
|
892
|
-
gold = "gold",
|
|
893
|
-
blue = "blue",
|
|
894
|
-
silver = "silver",
|
|
895
|
-
black = "black",
|
|
896
|
-
white = "white"
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
declare enum StyleButtonColor_2 {
|
|
900
918
|
GOLD = "gold",
|
|
901
919
|
BLUE = "blue",
|
|
902
920
|
SILVER = "silver",
|
|
@@ -905,14 +923,6 @@ declare enum StyleButtonColor_2 {
|
|
|
905
923
|
}
|
|
906
924
|
|
|
907
925
|
declare enum StyleButtonLabel {
|
|
908
|
-
paypal = "paypal",
|
|
909
|
-
checkout = "checkout",
|
|
910
|
-
buynow = "buynow",
|
|
911
|
-
pay = "pay",
|
|
912
|
-
installment = "installment"
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
declare enum StyleButtonLabel_2 {
|
|
916
926
|
PAYPAL = "paypal",
|
|
917
927
|
CHECKOUT = "checkout",
|
|
918
928
|
BUYNOW = "buynow",
|
|
@@ -921,21 +931,11 @@ declare enum StyleButtonLabel_2 {
|
|
|
921
931
|
}
|
|
922
932
|
|
|
923
933
|
declare enum StyleButtonLayout {
|
|
924
|
-
vertical = "vertical",
|
|
925
|
-
horizontal = "horizontal"
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
declare enum StyleButtonLayout_2 {
|
|
929
934
|
VERTICAL = "vertical",
|
|
930
935
|
HORIZONTAL = "horizontal"
|
|
931
936
|
}
|
|
932
937
|
|
|
933
938
|
declare enum StyleButtonShape {
|
|
934
|
-
pill = "pill",
|
|
935
|
-
rect = "rect"
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
declare enum StyleButtonShape_2 {
|
|
939
939
|
PILL = "pill",
|
|
940
940
|
RECT = "rect"
|
|
941
941
|
}
|
|
@@ -944,6 +944,15 @@ declare interface WithApplePayButtonInitializeOptions {
|
|
|
944
944
|
applepay?: ApplePayButtonInitializeOptions_2;
|
|
945
945
|
}
|
|
946
946
|
|
|
947
|
+
declare interface WithBuyNowFeature {
|
|
948
|
+
/**
|
|
949
|
+
* The options that are required to initialize Buy Now functionality.
|
|
950
|
+
*/
|
|
951
|
+
buyNowInitializeOptions?: {
|
|
952
|
+
getBuyNowCartRequestBody?(): BuyNowCartRequestBody | void;
|
|
953
|
+
};
|
|
954
|
+
}
|
|
955
|
+
|
|
947
956
|
declare interface WithPayPalCommerceInlineButtonInitializeOptions {
|
|
948
957
|
paypalcommerceinline?: PayPalCommerceInlineButtonInitializeOptions;
|
|
949
958
|
}
|