@payrails/web-sdk 5.30.0 → 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/README.md +4 -3
- package/index.js +4 -4
- package/package.json +1 -1
- package/payrails.d.ts +34 -11
- package/payrails.js +4 -4
package/package.json
CHANGED
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;
|
|
@@ -1613,6 +1635,7 @@ interface DropinOptions {
|
|
|
1613
1635
|
addressSelector?: AddressSelectorElementOptions['styles'];
|
|
1614
1636
|
mercadoPago?: GenericRedirectDropinOptions['styles'];
|
|
1615
1637
|
};
|
|
1638
|
+
fonts?: FontDescriptor[];
|
|
1616
1639
|
configuration?: {
|
|
1617
1640
|
authFailMsg?: AuthFailedMsgOptions['configuration'];
|
|
1618
1641
|
};
|