@payrails/web-sdk 5.30.0 → 5.31.1-RC.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.30.0",
3
+ "version": "5.31.1-RC.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
@@ -461,17 +461,6 @@ interface BinLookupResponse {
461
461
  type?: string;
462
462
  }
463
463
 
464
- declare enum ElementType$1 {
465
- CVV = "CVV",
466
- EXPIRATION_DATE = "EXPIRATION_DATE",
467
- CARD_NUMBER = "CARD_NUMBER",
468
- CARDHOLDER_NAME = "CARDHOLDER_NAME",
469
- INPUT_FIELD = "INPUT_FIELD",
470
- PIN = "PIN",
471
- EXPIRATION_MONTH = "EXPIRATION_MONTH",
472
- EXPIRATION_YEAR = "EXPIRATION_YEAR"
473
- }
474
-
475
464
  declare enum RedactionType {
476
465
  DEFAULT = "DEFAULT",
477
466
  PLAIN_TEXT = "PLAIN_TEXT",
@@ -529,6 +518,17 @@ interface IUpsertOptions {
529
518
  column: string;
530
519
  }
531
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
+
532
532
  declare abstract class Container {
533
533
  }
534
534
 
@@ -616,6 +616,26 @@ declare class CollectContainer extends Container {
616
616
  unmount: () => void;
617
617
  }
618
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
+
619
639
  declare class ComposableElement {
620
640
  #private;
621
641
  type: string;
@@ -859,6 +879,7 @@ interface CollectContainerOptions {
859
879
  errorTextStyles?: {
860
880
  base?: Partial<CSSStyleDeclaration>;
861
881
  };
882
+ fonts?: FontDescriptor[];
862
883
  }
863
884
  type PayrailsSecureFieldEvent = 'CHANGE' | 'FOCUS' | 'BLUR' | 'READY' | 'SUBMIT';
864
885
  interface PayrailsSecureField {
@@ -1063,6 +1084,7 @@ interface CardFormOptions extends StoreInstrumentElementOptions {
1063
1084
  };
1064
1085
  addressSelector?: AddressSelectorElementOptions['translations'];
1065
1086
  };
1087
+ fonts?: FontDescriptor[];
1066
1088
  events?: {
1067
1089
  onFocus?: () => void;
1068
1090
  onChange?: (e: OnChange) => void;
@@ -1288,6 +1310,7 @@ declare enum AuthorizationFailureReasons {
1288
1310
  VALIDATION_FAILED = "VALIDATION_FAILED",
1289
1311
  AUTHORIZATION_ERROR = "AUTHORIZATION_ERROR",
1290
1312
  AUTHENTICATION_ERROR = "AUTHENTICATION_ERROR",
1313
+ FRAUD_RISK_DECLINED = "FRAUD_RISK_DECLINED",
1291
1314
  UNKNOWN_ERROR = "UNKNOWN_ERROR",
1292
1315
  USER_CANCELLED = "USER_CANCELLED"
1293
1316
  }
@@ -1613,6 +1636,7 @@ interface DropinOptions {
1613
1636
  addressSelector?: AddressSelectorElementOptions['styles'];
1614
1637
  mercadoPago?: GenericRedirectDropinOptions['styles'];
1615
1638
  };
1639
+ fonts?: FontDescriptor[];
1616
1640
  configuration?: {
1617
1641
  authFailMsg?: AuthFailedMsgOptions['configuration'];
1618
1642
  };