@payrails/web-sdk 5.29.6 → 5.31.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payrails/web-sdk",
3
- "version": "5.29.6",
3
+ "version": "5.31.0",
4
4
  "description": "SDK providing tokenization options on the client for merchants",
5
5
  "main": "index.js",
6
6
  "types": "payrails.d.ts",
package/payrails.d.ts CHANGED
@@ -93,7 +93,8 @@ declare enum PAYMENT_METHOD_CODES {
93
93
  'GENERIC_REDIRECT' = "genericRedirect",
94
94
  'MERCADO_PAGO' = "mercadoPago",
95
95
  'PIX' = "pix",
96
- 'BANK_ACCOUNT' = "bankAccount"
96
+ 'BANK_ACCOUNT' = "bankAccount",
97
+ 'IDEAL' = "iDeal"
97
98
  }
98
99
  declare enum PAYMENT_INSTRUMENT_STATUS {
99
100
  'ENABLED' = "enabled",
@@ -460,17 +461,6 @@ interface BinLookupResponse {
460
461
  type?: string;
461
462
  }
462
463
 
463
- declare enum ElementType$1 {
464
- CVV = "CVV",
465
- EXPIRATION_DATE = "EXPIRATION_DATE",
466
- CARD_NUMBER = "CARD_NUMBER",
467
- CARDHOLDER_NAME = "CARDHOLDER_NAME",
468
- INPUT_FIELD = "INPUT_FIELD",
469
- PIN = "PIN",
470
- EXPIRATION_MONTH = "EXPIRATION_MONTH",
471
- EXPIRATION_YEAR = "EXPIRATION_YEAR"
472
- }
473
-
474
464
  declare enum RedactionType {
475
465
  DEFAULT = "DEFAULT",
476
466
  PLAIN_TEXT = "PLAIN_TEXT",
@@ -528,6 +518,17 @@ interface IUpsertOptions {
528
518
  column: string;
529
519
  }
530
520
 
521
+ declare enum ElementType$1 {
522
+ CVV = "CVV",
523
+ EXPIRATION_DATE = "EXPIRATION_DATE",
524
+ CARD_NUMBER = "CARD_NUMBER",
525
+ CARDHOLDER_NAME = "CARDHOLDER_NAME",
526
+ INPUT_FIELD = "INPUT_FIELD",
527
+ PIN = "PIN",
528
+ EXPIRATION_MONTH = "EXPIRATION_MONTH",
529
+ EXPIRATION_YEAR = "EXPIRATION_YEAR"
530
+ }
531
+
531
532
  declare abstract class Container {
532
533
  }
533
534
 
@@ -615,6 +616,26 @@ declare class CollectContainer extends Container {
615
616
  unmount: () => void;
616
617
  }
617
618
 
619
+ /**
620
+ * Descriptor for a custom font to be injected or referenced by the card/secure-fields iframes.
621
+ *
622
+ * This mirrors Stripe-like font configuration where you can provide either a CSS URL that
623
+ * includes @font-face declarations (cssSrc) or provide full @font-face fields to be injected.
624
+ *
625
+ * Examples:
626
+ * - { cssSrc: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap' }
627
+ * - { family: 'Inter', src: 'https://cdn.example.com/fonts/Inter.woff2', weight: 400, style: 'normal', display: 'swap' }
628
+ */
629
+ interface FontDescriptor {
630
+ cssSrc?: string;
631
+ family?: string;
632
+ src?: string;
633
+ style?: string;
634
+ weight?: string | number;
635
+ unicodeRange?: string;
636
+ display?: string;
637
+ }
638
+
618
639
  declare class ComposableElement {
619
640
  #private;
620
641
  type: string;
@@ -858,6 +879,7 @@ interface CollectContainerOptions {
858
879
  errorTextStyles?: {
859
880
  base?: Partial<CSSStyleDeclaration>;
860
881
  };
882
+ fonts?: FontDescriptor[];
861
883
  }
862
884
  type PayrailsSecureFieldEvent = 'CHANGE' | 'FOCUS' | 'BLUR' | 'READY' | 'SUBMIT';
863
885
  interface PayrailsSecureField {
@@ -1062,6 +1084,7 @@ interface CardFormOptions extends StoreInstrumentElementOptions {
1062
1084
  };
1063
1085
  addressSelector?: AddressSelectorElementOptions['translations'];
1064
1086
  };
1087
+ fonts?: FontDescriptor[];
1065
1088
  events?: {
1066
1089
  onFocus?: () => void;
1067
1090
  onChange?: (e: OnChange) => void;
@@ -1612,6 +1635,7 @@ interface DropinOptions {
1612
1635
  addressSelector?: AddressSelectorElementOptions['styles'];
1613
1636
  mercadoPago?: GenericRedirectDropinOptions['styles'];
1614
1637
  };
1638
+ fonts?: FontDescriptor[];
1615
1639
  configuration?: {
1616
1640
  authFailMsg?: AuthFailedMsgOptions['configuration'];
1617
1641
  };