@bigcommerce/checkout-sdk 1.204.0 → 1.206.1

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,10 @@ declare interface AdyenBaseCardComponentOptions {
68
68
  }
69
69
 
70
70
  declare interface AdyenComponent {
71
+ componentRef?: {
72
+ showValidation(): void;
73
+ };
74
+ state?: CardState;
71
75
  mount(containerId: string): HTMLElement;
72
76
  unmount(): void;
73
77
  }
@@ -83,6 +87,7 @@ declare interface AdyenComponentEvents {
83
87
  * incomplete field. Called again when errors are cleared.
84
88
  */
85
89
  onError?(state: AdyenComponentState, component: AdyenComponent): void;
90
+ onFieldValid?(state: AdyenComponentState, component: AdyenComponent): void;
86
91
  }
87
92
 
88
93
  declare type AdyenComponentState = (CardState | WechatState);
@@ -252,6 +257,8 @@ declare interface AdyenV2PaymentInitializeOptions {
252
257
  * Optional. Overwriting the default options
253
258
  */
254
259
  options?: Omit<AdyenCreditCardComponentOptions, 'onChange'> | AdyenIdealComponentOptions;
260
+ shouldShowNumberField?: boolean;
261
+ validateCardFields(componentState: AdyenComponentState): void;
255
262
  }
256
263
 
257
264
  /**
@@ -1133,12 +1140,20 @@ declare interface CardPaymentMethodState extends AdyenPaymentMethodState {
1133
1140
  encryptedExpiryMonth: string;
1134
1141
  encryptedExpiryYear: string;
1135
1142
  encryptedSecurityCode: string;
1136
- holderName?: string;
1143
+ holderName: string;
1137
1144
  }
1138
1145
 
1139
1146
  declare interface CardState {
1140
1147
  data: CardDataPaymentMethodState;
1141
1148
  isValid?: boolean;
1149
+ valid?: {
1150
+ [key: string]: boolean;
1151
+ };
1152
+ errors?: CardStateErrors;
1153
+ }
1154
+
1155
+ declare interface CardStateErrors {
1156
+ [key: string]: string;
1142
1157
  }
1143
1158
 
1144
1159
  declare interface Cart {