@yuno-payments/sdk-web-types 1.16.0 → 1.17.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.
package/dist/index.d.ts CHANGED
@@ -274,6 +274,28 @@ type CardConfig$1 = {
274
274
  signatureLineColor: string;
275
275
  };
276
276
  };
277
+ type InstallmentTypesList = {
278
+ type: string;
279
+ description: string;
280
+ id: string;
281
+ };
282
+ interface FullInstallmentInfo {
283
+ installment: number;
284
+ rate: string;
285
+ amount?: {
286
+ currency: string;
287
+ value: string;
288
+ total_value: string;
289
+ };
290
+ type?: string;
291
+ first_installment_deferral?: string;
292
+ }
293
+ interface FullInstallmentsInfo {
294
+ installments: FullInstallmentInfo[];
295
+ id: string;
296
+ filter_by?: string;
297
+ types_list?: InstallmentTypesList[];
298
+ }
277
299
  type OnChangeArgs = {
278
300
  error: boolean;
279
301
  data?: {
@@ -282,6 +304,7 @@ type OnChangeArgs = {
282
304
  isCardIINLoading: boolean;
283
305
  isInstallmentLoading: boolean;
284
306
  cardConfig: CardConfig$1 | null;
307
+ fullInstallmentsInfo?: FullInstallmentsInfo;
285
308
  };
286
309
  };
287
310
  type CardLoadPreviewSecureConfig = {
@@ -297,7 +320,7 @@ type CardLoadPreviewSecureConfig = {
297
320
  };
298
321
  type ValidationTypeSecureFields = 'on_change' | 'on_blur' | 'on_blur_full';
299
322
  type DesignType = 'float-label' | 'float-label-static' | 'label-placeholder';
300
- type Create = {
323
+ type CreateArgs = {
301
324
  name: Name;
302
325
  options: {
303
326
  label?: string;
@@ -313,6 +336,8 @@ type Create = {
313
336
  validationType?: ValidationTypeSecureFields;
314
337
  designType?: DesignType;
315
338
  errorIcon?: string | null;
339
+ enableFocusAnimation?: boolean;
340
+ defaultCardConfig?: CardConfig$1;
316
341
  };
317
342
  cardLoadPreviewConfig?: CardLoadPreviewSecureConfig;
318
343
  };
@@ -383,7 +408,7 @@ interface VaultedToken {
383
408
  created_at: Date;
384
409
  updated_at: Date;
385
410
  }
386
- type CardType = 'CREDIT' | 'DEBIT';
411
+ type CardType = 'CREDIT' | 'DEBIT' | 'VOUCHER';
387
412
  interface SecureField {
388
413
  render(elementSelector: string): Promise<void>;
389
414
  focus(): Promise<void>;
@@ -399,7 +424,7 @@ interface SecureField {
399
424
  setCardHolderName(value: string): Promise<void>;
400
425
  }
401
426
  interface SecureFields {
402
- create({ name, options }: Create): SecureField;
427
+ create({ name, options }: CreateArgs): SecureField;
403
428
  getElement({ name }: GetElement): SecureField;
404
429
  generateToken(params: GenerateTokenArgs): Promise<string>;
405
430
  generateTokenWithInformation(params: GenerateTokenArgs): Promise<OneTimeToken>;
@@ -465,7 +490,6 @@ type ExternalPaymentButtons = {
465
490
  };
466
491
  type LoadingType = 'DOCUMENT' | 'ONE_TIME_TOKEN';
467
492
  type Language = 'es' | 'en' | 'pt';
468
- type InputDesignType = "float-label" | "float-label-static" | "label-placeholder";
469
493
  interface YunoConfig {
470
494
  publicApiKey: string;
471
495
  checkoutSession: string;
@@ -489,10 +513,6 @@ interface YunoConfig {
489
513
  isDynamicViewEnabled?: boolean;
490
514
  showOnlyThesePaymentMethods?: string[];
491
515
  showPayButton?: boolean;
492
- keepLoader?: boolean;
493
- enabledRequiredFields?: boolean;
494
- enableRedesign?: boolean;
495
- inputDesignType?: InputDesignType;
496
516
  yunoCreatePayment?: (oneTimeToken: string, tokenWithInformation: OneTimeToken) => void;
497
517
  yunoPaymentMethodSelected?: (arg: {
498
518
  type: string;
@@ -535,6 +555,7 @@ interface SecureFieldsArgs {
535
555
  }
536
556
  type SecureFieldInstance = SecureFields;
537
557
  type OnChangeDataSF = OnChangeArgs['data'];
558
+ type CreateArgsSF = CreateArgs;
538
559
  interface MountStatusPaymentArgs {
539
560
  checkoutSession: string;
540
561
  language: Language;
@@ -547,6 +568,7 @@ interface YunoInstance {
547
568
  mountCheckout(args: MountCheckoutArgs): void;
548
569
  mountCheckoutLite(args: MountCheckoutLiteArgs): void;
549
570
  updateCheckoutSession(checkout: string): void;
571
+ submitOneTimeTokenForm(): void;
550
572
  startPayment(): void;
551
573
  continuePayment(): Promise<void>;
552
574
  notifyError(): void;
package/dist/types.ts CHANGED
@@ -274,6 +274,28 @@ type CardConfig$1 = {
274
274
  signatureLineColor: string;
275
275
  };
276
276
  };
277
+ type InstallmentTypesList = {
278
+ type: string;
279
+ description: string;
280
+ id: string;
281
+ };
282
+ interface FullInstallmentInfo {
283
+ installment: number;
284
+ rate: string;
285
+ amount?: {
286
+ currency: string;
287
+ value: string;
288
+ total_value: string;
289
+ };
290
+ type?: string;
291
+ first_installment_deferral?: string;
292
+ }
293
+ interface FullInstallmentsInfo {
294
+ installments: FullInstallmentInfo[];
295
+ id: string;
296
+ filter_by?: string;
297
+ types_list?: InstallmentTypesList[];
298
+ }
277
299
  type OnChangeArgs = {
278
300
  error: boolean;
279
301
  data?: {
@@ -282,6 +304,7 @@ type OnChangeArgs = {
282
304
  isCardIINLoading: boolean;
283
305
  isInstallmentLoading: boolean;
284
306
  cardConfig: CardConfig$1 | null;
307
+ fullInstallmentsInfo?: FullInstallmentsInfo;
285
308
  };
286
309
  };
287
310
  type CardLoadPreviewSecureConfig = {
@@ -297,7 +320,7 @@ type CardLoadPreviewSecureConfig = {
297
320
  };
298
321
  type ValidationTypeSecureFields = 'on_change' | 'on_blur' | 'on_blur_full';
299
322
  type DesignType = 'float-label' | 'float-label-static' | 'label-placeholder';
300
- type Create = {
323
+ type CreateArgs = {
301
324
  name: Name;
302
325
  options: {
303
326
  label?: string;
@@ -313,6 +336,8 @@ type Create = {
313
336
  validationType?: ValidationTypeSecureFields;
314
337
  designType?: DesignType;
315
338
  errorIcon?: string | null;
339
+ enableFocusAnimation?: boolean;
340
+ defaultCardConfig?: CardConfig$1;
316
341
  };
317
342
  cardLoadPreviewConfig?: CardLoadPreviewSecureConfig;
318
343
  };
@@ -383,7 +408,7 @@ interface VaultedToken {
383
408
  created_at: Date;
384
409
  updated_at: Date;
385
410
  }
386
- type CardType = 'CREDIT' | 'DEBIT';
411
+ type CardType = 'CREDIT' | 'DEBIT' | 'VOUCHER';
387
412
  interface SecureField {
388
413
  render(elementSelector: string): Promise<void>;
389
414
  focus(): Promise<void>;
@@ -399,7 +424,7 @@ interface SecureField {
399
424
  setCardHolderName(value: string): Promise<void>;
400
425
  }
401
426
  interface SecureFields {
402
- create({ name, options }: Create): SecureField;
427
+ create({ name, options }: CreateArgs): SecureField;
403
428
  getElement({ name }: GetElement): SecureField;
404
429
  generateToken(params: GenerateTokenArgs): Promise<string>;
405
430
  generateTokenWithInformation(params: GenerateTokenArgs): Promise<OneTimeToken>;
@@ -465,7 +490,6 @@ type ExternalPaymentButtons = {
465
490
  };
466
491
  type LoadingType = 'DOCUMENT' | 'ONE_TIME_TOKEN';
467
492
  type Language = 'es' | 'en' | 'pt';
468
- type InputDesignType = "float-label" | "float-label-static" | "label-placeholder";
469
493
  interface YunoConfig {
470
494
  publicApiKey: string;
471
495
  checkoutSession: string;
@@ -489,10 +513,6 @@ interface YunoConfig {
489
513
  isDynamicViewEnabled?: boolean;
490
514
  showOnlyThesePaymentMethods?: string[];
491
515
  showPayButton?: boolean;
492
- keepLoader?: boolean;
493
- enabledRequiredFields?: boolean;
494
- enableRedesign?: boolean;
495
- inputDesignType?: InputDesignType;
496
516
  yunoCreatePayment?: (oneTimeToken: string, tokenWithInformation: OneTimeToken) => void;
497
517
  yunoPaymentMethodSelected?: (arg: {
498
518
  type: string;
@@ -535,6 +555,7 @@ interface SecureFieldsArgs {
535
555
  }
536
556
  type SecureFieldInstance = SecureFields;
537
557
  type OnChangeDataSF = OnChangeArgs['data'];
558
+ type CreateArgsSF = CreateArgs;
538
559
  interface MountStatusPaymentArgs {
539
560
  checkoutSession: string;
540
561
  language: Language;
@@ -547,6 +568,7 @@ interface YunoInstance {
547
568
  mountCheckout(args: MountCheckoutArgs): void;
548
569
  mountCheckoutLite(args: MountCheckoutLiteArgs): void;
549
570
  updateCheckoutSession(checkout: string): void;
571
+ submitOneTimeTokenForm(): void;
550
572
  startPayment(): void;
551
573
  continuePayment(): Promise<void>;
552
574
  notifyError(): void;
@@ -564,4 +586,4 @@ interface Yuno {
564
586
  initialize(publicApiKey: string): YunoInstance;
565
587
  }
566
588
 
567
- export { type ButtonTextCard, type CardConfig, type ExternalPaymentButtons, ExternalPaymentButtonsTypes, type FormElementSelector, type InputDesignType, 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 };
589
+ export { type ButtonTextCard, type CardConfig, type CreateArgsSF, 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.16.0",
3
+ "version": "1.17.0",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/types.ts",
6
6
  "type": "commonjs",