@yuno-payments/sdk-web-types 1.14.0 → 1.14.2

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/dist/index.d.ts CHANGED
@@ -208,7 +208,7 @@ type Name = 'cvv' | 'pan' | 'expiration';
208
208
  type Installment = {
209
209
  installmentId: string;
210
210
  installment: number;
211
- amount: {
211
+ amount?: {
212
212
  currency: string;
213
213
  value: string;
214
214
  total_value: string;
@@ -239,6 +239,41 @@ interface CardIINResponse {
239
239
  zip_code: string;
240
240
  };
241
241
  }
242
+ declare enum CardNetwork {
243
+ DISCOVER = "DISCOVER",
244
+ MAESTRO = "MAESTRO",
245
+ MASTERCARD = "MASTERCARD",
246
+ DINERS_CLUB_INTERNATIONAL = "DINERS_CLUB_INTERNATIONAL",
247
+ DINERS = "DINERS",
248
+ AMERICAN_EXPRESS = "AMERICAN_EXPRESS",
249
+ VISA = "VISA",
250
+ UATP = "UATP",
251
+ SODEXO = "SODEXO",
252
+ VR_VALE_REFEICAO = "VR_VALE_REFEICAO",
253
+ DEFAULT = "default"
254
+ }
255
+ type CardConfig$1 = {
256
+ numberRegex: RegExp;
257
+ maxLength: number;
258
+ minLength: number;
259
+ cvvRegex: RegExp;
260
+ scheme: CardNetwork;
261
+ brand: CardNetwork;
262
+ altCardLogo: string;
263
+ cardLogo: string;
264
+ cardInputIcon: string;
265
+ groupSizes: number[];
266
+ placeHolder: string;
267
+ cardType: CardType;
268
+ styles: {
269
+ backgroundColor: string;
270
+ valueColor: string;
271
+ labelColor: string;
272
+ magneticStripeColor: string;
273
+ signatureBackgroundColor: string;
274
+ signatureLineColor: string;
275
+ };
276
+ };
242
277
  type OnChangeArgs = {
243
278
  error: boolean;
244
279
  data?: {
@@ -246,6 +281,7 @@ type OnChangeArgs = {
246
281
  cardIIN?: CardIINResponse;
247
282
  isCardIINLoading: boolean;
248
283
  isInstallmentLoading: boolean;
284
+ cardConfig: CardConfig$1 | null;
249
285
  };
250
286
  };
251
287
  type ValidationTypeSecureFields = 'on_change' | 'on_blur' | 'on_blur_full';
@@ -477,6 +513,7 @@ interface SecureFieldsArgs {
477
513
  enableMultiplesCard?: boolean;
478
514
  }
479
515
  type SecureFieldInstance = SecureFields;
516
+ type OnChangeDataSF = OnChangeArgs['data'];
480
517
  interface MountStatusPaymentArgs {
481
518
  checkoutSession: string;
482
519
  language: Language;
package/dist/types.ts CHANGED
@@ -208,7 +208,7 @@ type Name = 'cvv' | 'pan' | 'expiration';
208
208
  type Installment = {
209
209
  installmentId: string;
210
210
  installment: number;
211
- amount: {
211
+ amount?: {
212
212
  currency: string;
213
213
  value: string;
214
214
  total_value: string;
@@ -239,6 +239,41 @@ interface CardIINResponse {
239
239
  zip_code: string;
240
240
  };
241
241
  }
242
+ declare enum CardNetwork {
243
+ DISCOVER = "DISCOVER",
244
+ MAESTRO = "MAESTRO",
245
+ MASTERCARD = "MASTERCARD",
246
+ DINERS_CLUB_INTERNATIONAL = "DINERS_CLUB_INTERNATIONAL",
247
+ DINERS = "DINERS",
248
+ AMERICAN_EXPRESS = "AMERICAN_EXPRESS",
249
+ VISA = "VISA",
250
+ UATP = "UATP",
251
+ SODEXO = "SODEXO",
252
+ VR_VALE_REFEICAO = "VR_VALE_REFEICAO",
253
+ DEFAULT = "default"
254
+ }
255
+ type CardConfig$1 = {
256
+ numberRegex: RegExp;
257
+ maxLength: number;
258
+ minLength: number;
259
+ cvvRegex: RegExp;
260
+ scheme: CardNetwork;
261
+ brand: CardNetwork;
262
+ altCardLogo: string;
263
+ cardLogo: string;
264
+ cardInputIcon: string;
265
+ groupSizes: number[];
266
+ placeHolder: string;
267
+ cardType: CardType;
268
+ styles: {
269
+ backgroundColor: string;
270
+ valueColor: string;
271
+ labelColor: string;
272
+ magneticStripeColor: string;
273
+ signatureBackgroundColor: string;
274
+ signatureLineColor: string;
275
+ };
276
+ };
242
277
  type OnChangeArgs = {
243
278
  error: boolean;
244
279
  data?: {
@@ -246,6 +281,7 @@ type OnChangeArgs = {
246
281
  cardIIN?: CardIINResponse;
247
282
  isCardIINLoading: boolean;
248
283
  isInstallmentLoading: boolean;
284
+ cardConfig: CardConfig$1 | null;
249
285
  };
250
286
  };
251
287
  type ValidationTypeSecureFields = 'on_change' | 'on_blur' | 'on_blur_full';
@@ -477,6 +513,7 @@ interface SecureFieldsArgs {
477
513
  enableMultiplesCard?: boolean;
478
514
  }
479
515
  type SecureFieldInstance = SecureFields;
516
+ type OnChangeDataSF = OnChangeArgs['data'];
480
517
  interface MountStatusPaymentArgs {
481
518
  checkoutSession: string;
482
519
  language: Language;
@@ -506,4 +543,4 @@ interface Yuno {
506
543
  initialize(publicApiKey: string): YunoInstance;
507
544
  }
508
545
 
509
- export { type ButtonTextCard, type CardConfig, type ExternalPaymentButtons, ExternalPaymentButtonsTypes, type FormElementSelector, type Language, type LoadingType, type MountCheckoutArgs, type MountCheckoutLiteArgs, type MountEnrollmentLiteArgs, type MountStatusPaymentArgs, type RenderMode, type SecureFieldInstance, type SecureFieldsArgs, type StartCheckoutArgs, type TextsCustom, type Yuno, type YunoConfig, type YunoInstance, type mountFraudArgs };
546
+ export { type ButtonTextCard, type CardConfig, type ExternalPaymentButtons, ExternalPaymentButtonsTypes, type FormElementSelector, type Language, type LoadingType, type MountCheckoutArgs, type MountCheckoutLiteArgs, type MountEnrollmentLiteArgs, type MountStatusPaymentArgs, type OnChangeDataSF, type RenderMode, type SecureFieldInstance, type SecureFieldsArgs, type StartCheckoutArgs, type TextsCustom, type Yuno, type YunoConfig, type YunoInstance, type mountFraudArgs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuno-payments/sdk-web-types",
3
- "version": "1.14.0",
3
+ "version": "1.14.2",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/types.ts",
6
6
  "type": "commonjs",