@bigcommerce/checkout-sdk 1.248.2 → 1.249.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.
@@ -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
- message: string;
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 BraintreePaypalButtonInitializeOptions {
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?: BraintreePaypalButtonInitializeOptions;
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?: BraintreePaypalButtonInitializeOptions;
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.
@@ -5799,12 +5805,32 @@ declare interface PaypalButtonInitializeOptions {
5799
5805
  onPaymentError?(error: StandardError): void;
5800
5806
  }
5801
5807
 
5808
+ declare enum PaypalButtonStyleColorOption {
5809
+ GOLD = "gold",
5810
+ BLUE = "blue",
5811
+ SIlVER = "silver",
5812
+ BLACK = "black"
5813
+ }
5814
+
5815
+ declare enum PaypalButtonStyleLabelOption {
5816
+ CHECKOUT = "checkout",
5817
+ PAY = "pay",
5818
+ BUYNOW = "buynow",
5819
+ PAYPAL = "paypal",
5820
+ CREDIT = "credit"
5821
+ }
5822
+
5823
+ declare enum PaypalButtonStyleLayoutOption {
5824
+ HORIZONTAL = "horizontal",
5825
+ VERTICAL = "vertical"
5826
+ }
5827
+
5802
5828
  declare interface PaypalButtonStyleOptions {
5803
- layout?: 'horizontal' | 'vertical';
5804
- size?: 'small' | 'medium' | 'large' | 'responsive';
5805
- color?: 'gold' | 'blue' | 'silver' | 'black';
5806
- label?: 'checkout' | 'pay' | 'buynow' | 'paypal' | 'credit';
5807
- shape?: 'pill' | 'rect';
5829
+ layout?: PaypalButtonStyleLayoutOption;
5830
+ size?: PaypalButtonStyleSizeOption;
5831
+ color?: PaypalButtonStyleColorOption;
5832
+ label?: PaypalButtonStyleLabelOption;
5833
+ shape?: PaypalButtonStyleShapeOption;
5808
5834
  tagline?: boolean;
5809
5835
  fundingicons?: boolean;
5810
5836
  height?: number;
@@ -5819,6 +5845,18 @@ declare interface PaypalButtonStyleOptions_2 {
5819
5845
  tagline?: boolean;
5820
5846
  }
5821
5847
 
5848
+ declare enum PaypalButtonStyleShapeOption {
5849
+ PILL = "pill",
5850
+ RECT = "rect"
5851
+ }
5852
+
5853
+ declare enum PaypalButtonStyleSizeOption {
5854
+ SMALL = "small",
5855
+ MEDIUM = "medium",
5856
+ LARGE = "large",
5857
+ RESPONSIVE = "responsive"
5858
+ }
5859
+
5822
5860
  declare interface PaypalCommerceButtonInitializeOptions {
5823
5861
  /**
5824
5862
  * A set of styling options for the checkout button.