@basis-theory/basis-theory-js 4.15.0 → 4.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/package.json
CHANGED
|
@@ -18,6 +18,7 @@ interface BaseElement<UpdateOptions, ElementEvents> {
|
|
|
18
18
|
type CardElement = BaseElement<UpdateCardElementOptions, CardElementEvents> & {
|
|
19
19
|
readonly cardMetadata?: CardMetadata;
|
|
20
20
|
setValue(value: CardElementValue<'reference'>): void;
|
|
21
|
+
validate(): void;
|
|
21
22
|
};
|
|
22
23
|
type TextElement = BaseElement<UpdateTextElementOptions, TextElementEvents> & {
|
|
23
24
|
setValueRef(value: TextElement): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface CardDetails {
|
|
2
|
+
bin?: string;
|
|
3
|
+
last4?: string;
|
|
4
|
+
expirationMonth?: number;
|
|
5
|
+
expirationYear?: number;
|
|
6
|
+
brand?: CardBrandType;
|
|
7
|
+
funding?: FundingType;
|
|
8
|
+
authentication?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const enrichmentCardBrands: readonly ["american-express", "diners-club", "discover", "ebt", "elo", "hiper", "hipercard", "jcb", "maestro", "mastercard", "mir", "private-label", "proprietary", "unionpay", "visa"];
|
|
11
|
+
type CardBrandType = typeof enrichmentCardBrands[number];
|
|
12
|
+
declare const enrichmentFundingTypes: readonly ["prepaid", "credit", "debit"];
|
|
13
|
+
type FundingType = typeof enrichmentFundingTypes[number];
|
|
14
|
+
export type { CardDetails, CardBrandType, FundingType };
|
|
15
|
+
export { enrichmentCardBrands, enrichmentFundingTypes };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.enrichmentFundingTypes = exports.enrichmentCardBrands = void 0;
|
|
7
|
+
const enrichmentCardBrands = ['american-express', 'diners-club', 'discover', 'ebt', 'elo', 'hiper', 'hipercard', 'jcb', 'maestro', 'mastercard', 'mir', 'private-label', 'proprietary', 'unionpay', 'visa'];
|
|
8
|
+
exports.enrichmentCardBrands = enrichmentCardBrands;
|
|
9
|
+
const enrichmentFundingTypes = ['prepaid', 'credit', 'debit'];
|
|
10
|
+
exports.enrichmentFundingTypes = enrichmentFundingTypes;
|
package/types/models/tokens.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BinDetails } from './bin-details';
|
|
2
|
+
import { CardDetails } from './card-details';
|
|
2
3
|
import type { Primitive, TokenBase } from './shared';
|
|
3
4
|
declare const DATA_CLASSIFICATIONS: readonly ["general", "bank", "pci", "pii"];
|
|
4
5
|
type DataClassification = typeof DATA_CLASSIFICATIONS[number];
|
|
@@ -26,6 +27,7 @@ interface TokenPrivacy {
|
|
|
26
27
|
}
|
|
27
28
|
interface TokenEnrichments {
|
|
28
29
|
binDetails?: BinDetails;
|
|
30
|
+
cardDetails?: CardDetails;
|
|
29
31
|
}
|
|
30
32
|
type Token<DataType = Primitive> = TokenBase<DataType> & {
|
|
31
33
|
id: string;
|