@yuno-payments/sdk-web-types 1.16.0 → 1.18.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>;
@@ -446,6 +471,7 @@ interface CardConfig {
446
471
  vaultOnSuccess?: boolean;
447
472
  texts?: ButtonTextCard;
448
473
  documentEnable?: boolean;
474
+ isCreditCardProcessingOnly?: boolean;
449
475
  }
450
476
  interface FormElementSelector {
451
477
  apmForm?: string;
@@ -465,7 +491,6 @@ type ExternalPaymentButtons = {
465
491
  };
466
492
  type LoadingType = 'DOCUMENT' | 'ONE_TIME_TOKEN';
467
493
  type Language = 'es' | 'en' | 'pt';
468
- type InputDesignType = "float-label" | "float-label-static" | "label-placeholder";
469
494
  interface YunoConfig {
470
495
  publicApiKey: string;
471
496
  checkoutSession: string;
@@ -489,10 +514,6 @@ interface YunoConfig {
489
514
  isDynamicViewEnabled?: boolean;
490
515
  showOnlyThesePaymentMethods?: string[];
491
516
  showPayButton?: boolean;
492
- keepLoader?: boolean;
493
- enabledRequiredFields?: boolean;
494
- enableRedesign?: boolean;
495
- inputDesignType?: InputDesignType;
496
517
  yunoCreatePayment?: (oneTimeToken: string, tokenWithInformation: OneTimeToken) => void;
497
518
  yunoPaymentMethodSelected?: (arg: {
498
519
  type: string;
@@ -535,6 +556,7 @@ interface SecureFieldsArgs {
535
556
  }
536
557
  type SecureFieldInstance = SecureFields;
537
558
  type OnChangeDataSF = OnChangeArgs['data'];
559
+ type CreateArgsSF = CreateArgs;
538
560
  interface MountStatusPaymentArgs {
539
561
  checkoutSession: string;
540
562
  language: Language;
@@ -547,6 +569,7 @@ interface YunoInstance {
547
569
  mountCheckout(args: MountCheckoutArgs): void;
548
570
  mountCheckoutLite(args: MountCheckoutLiteArgs): void;
549
571
  updateCheckoutSession(checkout: string): void;
572
+ submitOneTimeTokenForm(): void;
550
573
  startPayment(): void;
551
574
  continuePayment(): Promise<void>;
552
575
  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>;
@@ -446,6 +471,7 @@ interface CardConfig {
446
471
  vaultOnSuccess?: boolean;
447
472
  texts?: ButtonTextCard;
448
473
  documentEnable?: boolean;
474
+ isCreditCardProcessingOnly?: boolean;
449
475
  }
450
476
  interface FormElementSelector {
451
477
  apmForm?: string;
@@ -465,7 +491,6 @@ type ExternalPaymentButtons = {
465
491
  };
466
492
  type LoadingType = 'DOCUMENT' | 'ONE_TIME_TOKEN';
467
493
  type Language = 'es' | 'en' | 'pt';
468
- type InputDesignType = "float-label" | "float-label-static" | "label-placeholder";
469
494
  interface YunoConfig {
470
495
  publicApiKey: string;
471
496
  checkoutSession: string;
@@ -489,10 +514,6 @@ interface YunoConfig {
489
514
  isDynamicViewEnabled?: boolean;
490
515
  showOnlyThesePaymentMethods?: string[];
491
516
  showPayButton?: boolean;
492
- keepLoader?: boolean;
493
- enabledRequiredFields?: boolean;
494
- enableRedesign?: boolean;
495
- inputDesignType?: InputDesignType;
496
517
  yunoCreatePayment?: (oneTimeToken: string, tokenWithInformation: OneTimeToken) => void;
497
518
  yunoPaymentMethodSelected?: (arg: {
498
519
  type: string;
@@ -535,6 +556,7 @@ interface SecureFieldsArgs {
535
556
  }
536
557
  type SecureFieldInstance = SecureFields;
537
558
  type OnChangeDataSF = OnChangeArgs['data'];
559
+ type CreateArgsSF = CreateArgs;
538
560
  interface MountStatusPaymentArgs {
539
561
  checkoutSession: string;
540
562
  language: Language;
@@ -547,6 +569,7 @@ interface YunoInstance {
547
569
  mountCheckout(args: MountCheckoutArgs): void;
548
570
  mountCheckoutLite(args: MountCheckoutLiteArgs): void;
549
571
  updateCheckoutSession(checkout: string): void;
572
+ submitOneTimeTokenForm(): void;
550
573
  startPayment(): void;
551
574
  continuePayment(): Promise<void>;
552
575
  notifyError(): void;
@@ -564,4 +587,4 @@ interface Yuno {
564
587
  initialize(publicApiKey: string): YunoInstance;
565
588
  }
566
589
 
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 };
590
+ 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.18.0",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/types.ts",
6
6
  "type": "commonjs",