@bigcommerce/checkout-sdk 1.272.1 → 1.273.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.
@@ -147,8 +147,8 @@ declare interface AdyenComponentEvents {
147
147
  * Called in case of an invalid card number, invalid expiry date, or
148
148
  * incomplete field. Called again when errors are cleared.
149
149
  */
150
- onError?(state: AdyenComponentState, component: AdyenComponent): void;
151
- onFieldValid?(state: AdyenComponentState, component: AdyenComponent): void;
150
+ onError?(state: AdyenV2ValidationState, component: AdyenComponent): void;
151
+ onFieldValid?(state: AdyenV2ValidationState, component: AdyenComponent): void;
152
152
  }
153
153
 
154
154
  declare interface AdyenComponentEvents_2 {
@@ -161,8 +161,8 @@ declare interface AdyenComponentEvents_2 {
161
161
  * Called in case of an invalid card number, invalid expiry date, or
162
162
  * incomplete field. Called again when errors are cleared.
163
163
  */
164
- onError?(state: AdyenV3ComponentState, component: AdyenComponent_2): void;
165
- onFieldValid?(state: AdyenV3ComponentState, component: AdyenComponent_2): void;
164
+ onError?(state: AdyenV3ValidationState, component: AdyenComponent_2): void;
165
+ onFieldValid?(state: AdyenV3ValidationState, component: AdyenComponent_2): void;
166
166
  }
167
167
 
168
168
  declare type AdyenComponentState = (CardState | WechatState);
@@ -267,6 +267,12 @@ declare interface AdyenThreeDS2Options extends AdyenAdditionalActionCallbacks {
267
267
  widgetSize?: string;
268
268
  }
269
269
 
270
+ declare enum AdyenV2CardFields {
271
+ CardNumber = "encryptedCardNumber",
272
+ SecurityCode = "encryptedSecurityCode",
273
+ ExpiryDate = "encryptedExpiryDate"
274
+ }
275
+
270
276
  /**
271
277
  * A set of options that are required to initialize the AdyenV2 payment method.
272
278
  *
@@ -361,7 +367,23 @@ declare interface AdyenV2PaymentInitializeOptions {
361
367
  */
362
368
  options?: Omit<AdyenCreditCardComponentOptions, 'onChange'> | AdyenIdealComponentOptions;
363
369
  shouldShowNumberField?: boolean;
364
- validateCardFields(componentState: AdyenComponentState): void;
370
+ validateCardFields(validateState: AdyenV2ValidationState): void;
371
+ }
372
+
373
+ declare interface AdyenV2ValidationState {
374
+ valid: boolean;
375
+ fieldType?: AdyenV2CardFields;
376
+ endDigits?: string;
377
+ encryptedFieldName?: string;
378
+ i18n?: string;
379
+ error?: string;
380
+ errorKey?: string;
381
+ }
382
+
383
+ declare enum AdyenV3CardFields {
384
+ CardNumber = "encryptedCardNumber",
385
+ SecurityCode = "encryptedSecurityCode",
386
+ ExpiryDate = "encryptedExpiryDate"
365
387
  }
366
388
 
367
389
  declare type AdyenV3ComponentState = CardState_2 | WechatState_2;
@@ -479,7 +501,17 @@ declare interface AdyenV3PaymentInitializeOptions {
479
501
  */
480
502
  options?: Omit<AdyenV3CreditCardComponentOptions, 'onChange'>;
481
503
  shouldShowNumberField?: boolean;
482
- validateCardFields(componentState: AdyenV3ComponentState): void;
504
+ validateCardFields(validateState: AdyenV3ValidationState): void;
505
+ }
506
+
507
+ declare interface AdyenV3ValidationState {
508
+ valid: boolean;
509
+ fieldType?: AdyenV3CardFields;
510
+ endDigits?: string;
511
+ encryptedFieldName?: string;
512
+ i18n?: string;
513
+ error?: string;
514
+ errorKey?: string;
483
515
  }
484
516
 
485
517
  /**