@bigcommerce/checkout-sdk 1.248.1 → 1.250.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 +47 -9
- 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 +50 -10
- 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 +13 -1
- package/docs/enums/paypalbuttonstylecoloroption.md +36 -0
- package/docs/enums/paypalbuttonstylelabeloption.md +43 -0
- package/docs/enums/paypalbuttonstylelayoutoption.md +22 -0
- package/docs/enums/paypalbuttonstyleshapeoption.md +22 -0
- package/docs/enums/paypalbuttonstylesizeoption.md +36 -0
- package/docs/interfaces/braintreeerror.md +8 -1
- package/docs/interfaces/{braintreepaypalbuttoninitializeoptions.md → braintreepaypalv1buttoninitializeoptions.md} +26 -9
- package/docs/interfaces/checkoutbuttoninitializeoptions.md +2 -2
- package/docs/interfaces/orderpaymentrequestbody.md +1 -1
- package/docs/interfaces/paypalbuttonstyleoptions.md +5 -5
- package/package.json +1 -1
package/dist/checkout-sdk.d.ts
CHANGED
|
@@ -1039,7 +1039,7 @@ declare interface BoltPaymentInitializeOptions {
|
|
|
1039
1039
|
declare interface BraintreeError extends Error {
|
|
1040
1040
|
type: 'CUSTOMER' | 'MERCHANT' | 'NETWORK' | 'INTERNAL' | 'UNKNOWN';
|
|
1041
1041
|
code: string;
|
|
1042
|
-
|
|
1042
|
+
details?: unknown;
|
|
1043
1043
|
}
|
|
1044
1044
|
|
|
1045
1045
|
declare type BraintreeFormFieldBlurEventData = BraintreeFormFieldKeyboardEventData;
|
|
@@ -1200,7 +1200,7 @@ declare interface BraintreePaymentInitializeOptions {
|
|
|
1200
1200
|
form?: BraintreeFormOptions;
|
|
1201
1201
|
}
|
|
1202
1202
|
|
|
1203
|
-
declare interface
|
|
1203
|
+
declare interface BraintreePaypalV1ButtonInitializeOptions {
|
|
1204
1204
|
/**
|
|
1205
1205
|
* The ID of a container which the messaging should be inserted.
|
|
1206
1206
|
*/
|
|
@@ -1230,6 +1230,12 @@ declare interface BraintreePaypalButtonInitializeOptions {
|
|
|
1230
1230
|
* @param error - The error object describing the failure.
|
|
1231
1231
|
*/
|
|
1232
1232
|
onPaymentError?(error: BraintreeError | StandardError): void;
|
|
1233
|
+
/**
|
|
1234
|
+
* A callback that gets called on any error instead of submit payment or authorization errors.
|
|
1235
|
+
*
|
|
1236
|
+
* @param error - The error object describing the failure.
|
|
1237
|
+
*/
|
|
1238
|
+
onError?(error: BraintreeError | StandardError): void;
|
|
1233
1239
|
}
|
|
1234
1240
|
|
|
1235
1241
|
declare interface BraintreeStoredCardFieldOptions extends BraintreeFormFieldOptions {
|
|
@@ -1624,12 +1630,12 @@ declare interface CheckoutButtonInitializeOptions extends CheckoutButtonOptions
|
|
|
1624
1630
|
* The options that are required to facilitate Braintree PayPal. They can be
|
|
1625
1631
|
* omitted unless you need to support Braintree PayPal.
|
|
1626
1632
|
*/
|
|
1627
|
-
braintreepaypal?:
|
|
1633
|
+
braintreepaypal?: BraintreePaypalV1ButtonInitializeOptions;
|
|
1628
1634
|
/**
|
|
1629
1635
|
* The options that are required to facilitate Braintree Credit. They can be
|
|
1630
1636
|
* omitted unless you need to support Braintree Credit.
|
|
1631
1637
|
*/
|
|
1632
|
-
braintreepaypalcredit?:
|
|
1638
|
+
braintreepaypalcredit?: BraintreePaypalV1ButtonInitializeOptions;
|
|
1633
1639
|
/**
|
|
1634
1640
|
* The options that are required to facilitate PayPal. They can be omitted
|
|
1635
1641
|
* unless you need to support Paypal.
|
|
@@ -5449,6 +5455,8 @@ declare interface OrderPayment {
|
|
|
5449
5455
|
amount: number;
|
|
5450
5456
|
}
|
|
5451
5457
|
|
|
5458
|
+
declare type OrderPaymentInstrument = (CreditCardInstrument | HostedInstrument | HostedCreditCardInstrument | HostedVaultedInstrument | NonceInstrument | VaultedInstrument | CreditCardInstrument & WithDocumentInstrument | CreditCardInstrument & WithCheckoutcomFawryInstrument | CreditCardInstrument & WithCheckoutcomSEPAInstrument | CreditCardInstrument & WithCheckoutcomiDealInstrument | HostedInstrument & WithMollieIssuerInstrument | WithAccountCreation);
|
|
5459
|
+
|
|
5452
5460
|
/**
|
|
5453
5461
|
* An object that contains the payment information required for submitting an
|
|
5454
5462
|
* order.
|
|
@@ -5466,7 +5474,7 @@ declare interface OrderPaymentRequestBody {
|
|
|
5466
5474
|
* An object that contains the details of a credit card, vaulted payment
|
|
5467
5475
|
* instrument or nonce instrument.
|
|
5468
5476
|
*/
|
|
5469
|
-
paymentData?:
|
|
5477
|
+
paymentData?: OrderPaymentInstrument;
|
|
5470
5478
|
}
|
|
5471
5479
|
|
|
5472
5480
|
declare type OrderPayments = Array<GatewayOrderPayment | GiftCertificateOrderPayment>;
|
|
@@ -5799,12 +5807,32 @@ declare interface PaypalButtonInitializeOptions {
|
|
|
5799
5807
|
onPaymentError?(error: StandardError): void;
|
|
5800
5808
|
}
|
|
5801
5809
|
|
|
5810
|
+
declare enum PaypalButtonStyleColorOption {
|
|
5811
|
+
GOLD = "gold",
|
|
5812
|
+
BLUE = "blue",
|
|
5813
|
+
SIlVER = "silver",
|
|
5814
|
+
BLACK = "black"
|
|
5815
|
+
}
|
|
5816
|
+
|
|
5817
|
+
declare enum PaypalButtonStyleLabelOption {
|
|
5818
|
+
CHECKOUT = "checkout",
|
|
5819
|
+
PAY = "pay",
|
|
5820
|
+
BUYNOW = "buynow",
|
|
5821
|
+
PAYPAL = "paypal",
|
|
5822
|
+
CREDIT = "credit"
|
|
5823
|
+
}
|
|
5824
|
+
|
|
5825
|
+
declare enum PaypalButtonStyleLayoutOption {
|
|
5826
|
+
HORIZONTAL = "horizontal",
|
|
5827
|
+
VERTICAL = "vertical"
|
|
5828
|
+
}
|
|
5829
|
+
|
|
5802
5830
|
declare interface PaypalButtonStyleOptions {
|
|
5803
|
-
layout?:
|
|
5804
|
-
size?:
|
|
5805
|
-
color?:
|
|
5806
|
-
label?:
|
|
5807
|
-
shape?:
|
|
5831
|
+
layout?: PaypalButtonStyleLayoutOption;
|
|
5832
|
+
size?: PaypalButtonStyleSizeOption;
|
|
5833
|
+
color?: PaypalButtonStyleColorOption;
|
|
5834
|
+
label?: PaypalButtonStyleLabelOption;
|
|
5835
|
+
shape?: PaypalButtonStyleShapeOption;
|
|
5808
5836
|
tagline?: boolean;
|
|
5809
5837
|
fundingicons?: boolean;
|
|
5810
5838
|
height?: number;
|
|
@@ -5819,6 +5847,18 @@ declare interface PaypalButtonStyleOptions_2 {
|
|
|
5819
5847
|
tagline?: boolean;
|
|
5820
5848
|
}
|
|
5821
5849
|
|
|
5850
|
+
declare enum PaypalButtonStyleShapeOption {
|
|
5851
|
+
PILL = "pill",
|
|
5852
|
+
RECT = "rect"
|
|
5853
|
+
}
|
|
5854
|
+
|
|
5855
|
+
declare enum PaypalButtonStyleSizeOption {
|
|
5856
|
+
SMALL = "small",
|
|
5857
|
+
MEDIUM = "medium",
|
|
5858
|
+
LARGE = "large",
|
|
5859
|
+
RESPONSIVE = "responsive"
|
|
5860
|
+
}
|
|
5861
|
+
|
|
5822
5862
|
declare interface PaypalCommerceButtonInitializeOptions {
|
|
5823
5863
|
/**
|
|
5824
5864
|
* A set of styling options for the checkout button.
|