@bigcommerce/checkout-sdk 1.206.0 → 1.208.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.
@@ -68,6 +68,13 @@ declare interface AdyenBaseCardComponentOptions {
68
68
  }
69
69
 
70
70
  declare interface AdyenComponent {
71
+ componentRef?: {
72
+ showValidation(): void;
73
+ };
74
+ props?: {
75
+ type?: string;
76
+ };
77
+ state?: CardState;
71
78
  mount(containerId: string): HTMLElement;
72
79
  unmount(): void;
73
80
  }
@@ -83,6 +90,7 @@ declare interface AdyenComponentEvents {
83
90
  * incomplete field. Called again when errors are cleared.
84
91
  */
85
92
  onError?(state: AdyenComponentState, component: AdyenComponent): void;
93
+ onFieldValid?(state: AdyenComponentState, component: AdyenComponent): void;
86
94
  }
87
95
 
88
96
  declare type AdyenComponentState = (CardState | WechatState);
@@ -252,6 +260,8 @@ declare interface AdyenV2PaymentInitializeOptions {
252
260
  * Optional. Overwriting the default options
253
261
  */
254
262
  options?: Omit<AdyenCreditCardComponentOptions, 'onChange'> | AdyenIdealComponentOptions;
263
+ shouldShowNumberField?: boolean;
264
+ validateCardFields(componentState: AdyenComponentState): void;
255
265
  }
256
266
 
257
267
  /**
@@ -1133,12 +1143,20 @@ declare interface CardPaymentMethodState extends AdyenPaymentMethodState {
1133
1143
  encryptedExpiryMonth: string;
1134
1144
  encryptedExpiryYear: string;
1135
1145
  encryptedSecurityCode: string;
1136
- holderName?: string;
1146
+ holderName: string;
1137
1147
  }
1138
1148
 
1139
1149
  declare interface CardState {
1140
1150
  data: CardDataPaymentMethodState;
1141
1151
  isValid?: boolean;
1152
+ valid?: {
1153
+ [key: string]: boolean;
1154
+ };
1155
+ errors?: CardStateErrors;
1156
+ }
1157
+
1158
+ declare interface CardStateErrors {
1159
+ [key: string]: string;
1142
1160
  }
1143
1161
 
1144
1162
  declare interface Cart {
@@ -5078,6 +5096,11 @@ declare interface PaymentInitializeOptions extends PaymentRequestOptions {
5078
5096
  * They can be omitted unless you need to support StripeV3.
5079
5097
  */
5080
5098
  stripev3?: StripeV3PaymentInitializeOptions;
5099
+ /**
5100
+ * The options that are required to initialize the StripeUPE payment method.
5101
+ * They can be omitted unless you need to support StripeUPE.
5102
+ */
5103
+ stripeupe?: StripeUPEPaymentInitializeOptions;
5081
5104
  /**
5082
5105
  * The options that are required to initialize the Mollie payment method.
5083
5106
  * They can be omitted unless you need to support Mollie.
@@ -6076,6 +6099,34 @@ declare interface StripeElementStyleVariant extends StripeElementCSSProperties {
6076
6099
  };
6077
6100
  }
6078
6101
 
6102
+ /**
6103
+ * A set of options that are required to initialize the Stripe payment method.
6104
+ *
6105
+ * Once Stripe payment is initialized, credit card form fields, provided by the
6106
+ * payment provider as iframes, will be inserted into the current page. These
6107
+ * options provide a location and styling for each of the form fields.
6108
+ *
6109
+ * ```html
6110
+ * <!-- This is where the credit card component will be inserted -->
6111
+ * <div id="container"></div>
6112
+ * ```
6113
+ *
6114
+ * ```js
6115
+ * service.initializePayment({
6116
+ * methodId: 'stripeupe',
6117
+ * stripeupe {
6118
+ * containerId: 'container',
6119
+ * },
6120
+ * });
6121
+ * ```
6122
+ */
6123
+ declare interface StripeUPEPaymentInitializeOptions {
6124
+ /**
6125
+ * The location to insert the credit card number form field.
6126
+ */
6127
+ containerId: string;
6128
+ }
6129
+
6079
6130
  /**
6080
6131
  * A set of options that are required to initialize the Stripe payment method.
6081
6132
  *