@basis-theory/basis-theory-js 1.32.0 → 1.34.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/BasisTheory.d.ts +3 -1
- package/BasisTheory.js +11 -0
- package/common/constants.js +2 -1
- package/common/utils.d.ts +2 -2
- package/common/utils.js +5 -5
- package/elements/constants.d.ts +2 -1
- package/elements/constants.js +4 -2
- package/package.json +4 -2
- package/proxies/BasisTheoryProxies.d.ts +7 -0
- package/proxies/BasisTheoryProxies.js +13 -0
- package/proxies/index.d.ts +1 -0
- package/proxies/index.js +18 -0
- package/reactors/BasisTheoryReactors.d.ts +2 -2
- package/tokens/BasisTheoryTokens.d.ts +1 -1
- package/types/elements/options.d.ts +1 -1
- package/types/elements/shared.d.ts +6 -2
- package/types/models/index.d.ts +1 -0
- package/types/models/index.js +13 -0
- package/types/models/proxies.d.ts +12 -0
- package/types/models/proxies.js +1 -0
- package/types/models/reactors.d.ts +6 -1
- package/types/models/tokens.d.ts +2 -1
- package/types/sdk/sdk.d.ts +3 -2
- package/types/sdk/services/index.d.ts +1 -0
- package/types/sdk/services/index.js +13 -0
- package/types/sdk/services/proxies.d.ts +9 -0
- package/types/sdk/services/proxies.js +1 -0
package/BasisTheory.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AtomicBanks as ElementsAtomicBanks, AtomicCards as ElementsAtomicCards, BasisTheoryElements, CardElement, CardNumberElement, CardExpirationDateElement, CardVerificationCodeElement, CreateCardElementOptions, CreateCardNumberElementOptions, CreateCardExpirationDateElementOptions, CreateCardVerificationCodeElementOptions, CreateTextElementOptions, TextElement, TokenizeData as ElementsTokenizeData, Tokens as ElementsTokens } from '@/types/elements';
|
|
2
2
|
import type { TokenizeData } from '@/types/models';
|
|
3
|
-
import type { Applications, AtomicBanks, AtomicCards, BasisTheory as IBasisTheory, BasisTheoryInit, Logs, Permissions, ReactorFormulas, Reactors, RequestOptions, Tenants, Tokens, BasisTheoryInitOptions, BasisTheoryInitOptionsWithElements, BasisTheoryInitOptionsWithoutElements } from '@/types/sdk';
|
|
3
|
+
import type { Applications, AtomicBanks, AtomicCards, BasisTheory as IBasisTheory, BasisTheoryInit, Logs, Permissions, ReactorFormulas, Reactors, RequestOptions, Tenants, Tokens, BasisTheoryInitOptions, BasisTheoryInitOptionsWithElements, BasisTheoryInitOptionsWithoutElements, Proxies } from '@/types/sdk';
|
|
4
4
|
export declare class BasisTheory implements BasisTheoryInit, IBasisTheory, BasisTheoryElements {
|
|
5
5
|
private _initStatus;
|
|
6
6
|
private _initOptions?;
|
|
@@ -15,6 +15,7 @@ export declare class BasisTheory implements BasisTheoryInit, IBasisTheory, Basis
|
|
|
15
15
|
private _atomicBanks?;
|
|
16
16
|
private _atomicCards?;
|
|
17
17
|
private _permissions?;
|
|
18
|
+
private _proxies?;
|
|
18
19
|
init(apiKey: string, options?: BasisTheoryInitOptionsWithoutElements): Promise<IBasisTheory>;
|
|
19
20
|
init(apiKey: string, options: BasisTheoryInitOptionsWithElements): Promise<IBasisTheory & BasisTheoryElements>;
|
|
20
21
|
createElement(type: 'card', options?: CreateCardElementOptions): CardElement;
|
|
@@ -40,6 +41,7 @@ export declare class BasisTheory implements BasisTheoryInit, IBasisTheory, Basis
|
|
|
40
41
|
*/
|
|
41
42
|
get atomicCards(): AtomicCards & ElementsAtomicCards;
|
|
42
43
|
get permissions(): Permissions;
|
|
44
|
+
get proxies(): Proxies;
|
|
43
45
|
/**
|
|
44
46
|
* @deprecated
|
|
45
47
|
*/
|
package/BasisTheory.js
CHANGED
|
@@ -17,6 +17,8 @@ var _logs = require("./logs");
|
|
|
17
17
|
|
|
18
18
|
var _permissions = require("./permissions");
|
|
19
19
|
|
|
20
|
+
var _proxies = require("./proxies");
|
|
21
|
+
|
|
20
22
|
var _reactorFormulas = require("./reactor-formulas");
|
|
21
23
|
|
|
22
24
|
var _reactors = require("./reactors");
|
|
@@ -119,6 +121,11 @@ class BasisTheory {
|
|
|
119
121
|
baseURL: new URL(_common.CLIENT_BASE_PATHS.permissions, baseUrl).toString(),
|
|
120
122
|
appInfo
|
|
121
123
|
});
|
|
124
|
+
this._proxies = new _proxies.BasisTheoryProxies({
|
|
125
|
+
apiKey,
|
|
126
|
+
baseURL: new URL(_common.CLIENT_BASE_PATHS.proxies, baseUrl).toString(),
|
|
127
|
+
appInfo
|
|
128
|
+
});
|
|
122
129
|
this._initStatus = 'done';
|
|
123
130
|
} catch (error) {
|
|
124
131
|
this._initStatus = 'error';
|
|
@@ -204,6 +211,10 @@ class BasisTheory {
|
|
|
204
211
|
get permissions() {
|
|
205
212
|
return (0, _common.assertInit)(this._permissions);
|
|
206
213
|
}
|
|
214
|
+
|
|
215
|
+
get proxies() {
|
|
216
|
+
return (0, _common.assertInit)(this._proxies);
|
|
217
|
+
}
|
|
207
218
|
/* eslint-enable accessor-pairs */
|
|
208
219
|
|
|
209
220
|
/**
|
package/common/constants.js
CHANGED
|
@@ -28,7 +28,8 @@ const CLIENT_BASE_PATHS = {
|
|
|
28
28
|
reactors: 'reactors',
|
|
29
29
|
atomicBanks: 'atomic/banks',
|
|
30
30
|
atomicCards: 'atomic/cards',
|
|
31
|
-
permissions: 'permissions'
|
|
31
|
+
permissions: 'permissions',
|
|
32
|
+
proxies: 'proxies'
|
|
32
33
|
};
|
|
33
34
|
exports.CLIENT_BASE_PATHS = CLIENT_BASE_PATHS;
|
|
34
35
|
const BROWSER_LIST = [{
|
package/common/utils.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare const transformResponseCamelCase: AxiosTransformer;
|
|
|
13
13
|
declare const transformAtomicResponseCamelCase: AxiosTransformer;
|
|
14
14
|
declare const dataExtractor: <T>(res: AxiosResponse<T>) => T;
|
|
15
15
|
declare const concatRequestTransformerWithDefault: (requestTransformer: AxiosTransformer | AxiosTransformer[]) => AxiosTransformer | AxiosTransformer[] | undefined;
|
|
16
|
-
declare const
|
|
16
|
+
declare const concatResponseTransformerWithDefault: (responseTransformer: AxiosTransformer | AxiosTransformer[]) => AxiosTransformer | AxiosTransformer[] | undefined;
|
|
17
17
|
declare const createRequestConfig: (options?: RequestOptions | undefined, transformers?: Pick<AxiosRequestConfig, "transformRequest" | "transformResponse"> | undefined) => AxiosRequestConfig | undefined;
|
|
18
18
|
declare const errorInterceptor: (error: any) => void;
|
|
19
19
|
declare const getQueryParams: <Q>(query?: Q) => string;
|
|
@@ -22,4 +22,4 @@ declare const getBrowser: () => string;
|
|
|
22
22
|
declare const getOSVersion: () => string;
|
|
23
23
|
declare const getRuntime: () => string;
|
|
24
24
|
declare const buildClientUserAgentString: (appInfo?: ApplicationInfo | undefined) => string;
|
|
25
|
-
export { assertInit, transformRequestSnakeCase, proxyRaw, transformReactorRequestSnakeCase, transformAtomicRequestSnakeCase, transformTokenRequestSnakeCase, transformAtomicReactionRequestSnakeCase, transformTokenResponseCamelCase, transformReactorResponseCamelCase, transformResponseCamelCase, transformAtomicResponseCamelCase, dataExtractor, createRequestConfig, concatRequestTransformerWithDefault,
|
|
25
|
+
export { assertInit, transformRequestSnakeCase, proxyRaw, transformReactorRequestSnakeCase, transformAtomicRequestSnakeCase, transformTokenRequestSnakeCase, transformAtomicReactionRequestSnakeCase, transformTokenResponseCamelCase, transformReactorResponseCamelCase, transformResponseCamelCase, transformAtomicResponseCamelCase, dataExtractor, createRequestConfig, concatRequestTransformerWithDefault, concatResponseTransformerWithDefault, errorInterceptor, getQueryParams, buildUserAgentString, buildClientUserAgentString, getOSVersion, getRuntime, getBrowser, };
|
package/common/utils.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.transformTokenResponseCamelCase = exports.transformTokenRequestSnakeCase = exports.transformResponseCamelCase = exports.transformRequestSnakeCase = exports.transformReactorResponseCamelCase = exports.transformReactorRequestSnakeCase = exports.transformAtomicResponseCamelCase = exports.transformAtomicRequestSnakeCase = exports.transformAtomicReactionRequestSnakeCase = exports.proxyRaw = exports.getRuntime = exports.getQueryParams = exports.getOSVersion = exports.getBrowser = exports.errorInterceptor = exports.dataExtractor = exports.createRequestConfig = exports.
|
|
6
|
+
exports.transformTokenResponseCamelCase = exports.transformTokenRequestSnakeCase = exports.transformResponseCamelCase = exports.transformRequestSnakeCase = exports.transformReactorResponseCamelCase = exports.transformReactorRequestSnakeCase = exports.transformAtomicResponseCamelCase = exports.transformAtomicRequestSnakeCase = exports.transformAtomicReactionRequestSnakeCase = exports.proxyRaw = exports.getRuntime = exports.getQueryParams = exports.getOSVersion = exports.getBrowser = exports.errorInterceptor = exports.dataExtractor = exports.createRequestConfig = exports.concatResponseTransformerWithDefault = exports.concatRequestTransformerWithDefault = exports.buildUserAgentString = exports.buildClientUserAgentString = exports.assertInit = void 0;
|
|
7
7
|
|
|
8
8
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9
9
|
|
|
@@ -187,9 +187,9 @@ const concatRequestTransformerWithDefault = requestTransformer => [...[], ...[re
|
|
|
187
187
|
|
|
188
188
|
exports.concatRequestTransformerWithDefault = concatRequestTransformerWithDefault;
|
|
189
189
|
|
|
190
|
-
const
|
|
190
|
+
const concatResponseTransformerWithDefault = responseTransformer => [..._axios.default.defaults.transformResponse, ...[responseTransformer]];
|
|
191
191
|
|
|
192
|
-
exports.
|
|
192
|
+
exports.concatResponseTransformerWithDefault = concatResponseTransformerWithDefault;
|
|
193
193
|
|
|
194
194
|
const createRequestConfig = (options, transformers) => {
|
|
195
195
|
if (!options) {
|
|
@@ -201,7 +201,7 @@ const createRequestConfig = (options, transformers) => {
|
|
|
201
201
|
transformRequest: concatRequestTransformerWithDefault(transformers.transformRequest)
|
|
202
202
|
} : {}),
|
|
203
203
|
...(transformers.transformResponse !== undefined ? {
|
|
204
|
-
transformResponse:
|
|
204
|
+
transformResponse: concatResponseTransformerWithDefault(transformers.transformResponse)
|
|
205
205
|
} : {})
|
|
206
206
|
};
|
|
207
207
|
}
|
|
@@ -224,7 +224,7 @@ const createRequestConfig = (options, transformers) => {
|
|
|
224
224
|
transformRequest: concatRequestTransformerWithDefault(transformers.transformRequest)
|
|
225
225
|
} : {}),
|
|
226
226
|
...((transformers === null || transformers === void 0 ? void 0 : transformers.transformResponse) !== undefined ? {
|
|
227
|
-
transformResponse:
|
|
227
|
+
transformResponse: concatResponseTransformerWithDefault(transformers.transformResponse)
|
|
228
228
|
} : {})
|
|
229
229
|
};
|
|
230
230
|
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/explicit-module-boundary-types
|
package/elements/constants.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ declare const ELEMENTS_NOM_DOM_ERROR_MESSAGE = "Tried to load BasisTheoryElement
|
|
|
3
3
|
declare const ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = "BasisTheoryElements did not load properly.";
|
|
4
4
|
declare const ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = "There was an unknown error when loading BasisTheoryElements";
|
|
5
5
|
declare const CARD_BRANDS: readonly ["visa", "mastercard", "american-express", "discover", "diners-club", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard", "mir", "unknown"];
|
|
6
|
-
|
|
6
|
+
declare const CARD_ICON_POSITIONS: readonly ["left", "right", "none"];
|
|
7
|
+
export { ELEMENTS_INIT_ERROR_MESSAGE, ELEMENTS_NOM_DOM_ERROR_MESSAGE, ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE, ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE, CARD_BRANDS, CARD_ICON_POSITIONS, };
|
package/elements/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = exports.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = exports.ELEMENTS_NOM_DOM_ERROR_MESSAGE = exports.ELEMENTS_INIT_ERROR_MESSAGE = exports.CARD_BRANDS = void 0;
|
|
6
|
+
exports.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = exports.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = exports.ELEMENTS_NOM_DOM_ERROR_MESSAGE = exports.ELEMENTS_INIT_ERROR_MESSAGE = exports.CARD_ICON_POSITIONS = exports.CARD_BRANDS = void 0;
|
|
7
7
|
const ELEMENTS_INIT_ERROR_MESSAGE = 'BasisTheory Elements was not properly initialized.';
|
|
8
8
|
exports.ELEMENTS_INIT_ERROR_MESSAGE = ELEMENTS_INIT_ERROR_MESSAGE;
|
|
9
9
|
const ELEMENTS_NOM_DOM_ERROR_MESSAGE = 'Tried to load BasisTheoryElements in a non-DOM environment.';
|
|
@@ -13,4 +13,6 @@ exports.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE;
|
|
|
13
13
|
const ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = 'There was an unknown error when loading BasisTheoryElements';
|
|
14
14
|
exports.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE;
|
|
15
15
|
const CARD_BRANDS = ['visa', 'mastercard', 'american-express', 'discover', 'diners-club', 'jcb', 'unionpay', 'maestro', 'elo', 'hiper', 'hipercard', 'mir', 'unknown'];
|
|
16
|
-
exports.CARD_BRANDS = CARD_BRANDS;
|
|
16
|
+
exports.CARD_BRANDS = CARD_BRANDS;
|
|
17
|
+
const CARD_ICON_POSITIONS = ['left', 'right', 'none'];
|
|
18
|
+
exports.CARD_ICON_POSITIONS = CARD_ICON_POSITIONS;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basis-theory/basis-theory-js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
4
|
"repository": "https://github.com/Basis-Theory/basis-theory-js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -32,7 +32,9 @@
|
|
|
32
32
|
"mem": "^4.0.0",
|
|
33
33
|
"semver-regex": "^3.1.3",
|
|
34
34
|
"tmpl": "^1.0.5",
|
|
35
|
-
"tar": "^4.4.19"
|
|
35
|
+
"tar": "^4.4.19",
|
|
36
|
+
"minimist": "^1.2.6",
|
|
37
|
+
"json-schema": "^0.4.0"
|
|
36
38
|
},
|
|
37
39
|
"engines": {
|
|
38
40
|
"node": ">=10.12.0"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Proxy } from '@/types/models';
|
|
2
|
+
import type { ListProxyQuery } from '@/types/sdk';
|
|
3
|
+
export declare const BasisTheoryProxies: {
|
|
4
|
+
new (options: import("../service/types").BasisTheoryServiceOptions): {
|
|
5
|
+
readonly client: import("axios").AxiosInstance;
|
|
6
|
+
};
|
|
7
|
+
} & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Proxy, Pick<Proxy, "name" | "destinationUrl" | "requestReactorId">>) & (new (...args: any[]) => import("../types/sdk/services/shared").Retrieve<Proxy>) & (new (...args: any[]) => import("../types/sdk/services/shared").Update<Proxy, Pick<Proxy, "name" | "destinationUrl" | "requestReactorId">>) & (new (...args: any[]) => import("../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../types/sdk/services/shared").List<Proxy, ListProxyQuery>);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BasisTheoryProxies = void 0;
|
|
7
|
+
|
|
8
|
+
var _service = require("./../service");
|
|
9
|
+
|
|
10
|
+
var _CrudBuilder = require("./../service/CrudBuilder");
|
|
11
|
+
|
|
12
|
+
const BasisTheoryProxies = new _CrudBuilder.CrudBuilder(class BasisTheoryProxies extends _service.BasisTheoryService {}).create().retrieve().update().delete().list().build();
|
|
13
|
+
exports.BasisTheoryProxies = BasisTheoryProxies;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BasisTheoryProxies';
|
package/proxies/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _BasisTheoryProxies = require("./BasisTheoryProxies");
|
|
8
|
+
|
|
9
|
+
Object.keys(_BasisTheoryProxies).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _BasisTheoryProxies[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _BasisTheoryProxies[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { BasisTheoryServiceOptions } from '@/service';
|
|
2
|
-
import type { Reactor, CreateReactor, ReactResponse } from '@/types/models';
|
|
2
|
+
import type { Reactor, CreateReactor, UpdateReactor, ReactResponse } from '@/types/models';
|
|
3
3
|
import type { ListReactorQuery, ReactRequest, RequestOptions } from '@/types/sdk';
|
|
4
4
|
export declare const BasisTheoryReactors: {
|
|
5
5
|
new (options: BasisTheoryServiceOptions): {
|
|
6
6
|
react(reactorId: string, request: ReactRequest, options?: RequestOptions | undefined): Promise<ReactResponse>;
|
|
7
7
|
readonly client: import("axios").AxiosInstance;
|
|
8
8
|
};
|
|
9
|
-
} & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Reactor, CreateReactor>) & (new (...args: any[]) => import("../types/sdk/services/shared").Retrieve<Reactor>) & (new (...args: any[]) => import("../types/sdk/services/shared").Update<Reactor,
|
|
9
|
+
} & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Reactor, CreateReactor>) & (new (...args: any[]) => import("../types/sdk/services/shared").Retrieve<Reactor>) & (new (...args: any[]) => import("../types/sdk/services/shared").Update<Reactor, UpdateReactor>) & (new (...args: any[]) => import("../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../types/sdk/services/shared").List<Reactor, ListReactorQuery>);
|
|
10
10
|
export declare type BasisTheoryReactors = InstanceType<typeof BasisTheoryReactors>;
|
|
@@ -11,5 +11,5 @@ export declare const BasisTheoryTokens: {
|
|
|
11
11
|
search(searchRequest: SearchTokensRequest, options?: RequestOptions | undefined): Promise<PaginatedList<Token>>;
|
|
12
12
|
readonly client: import("axios").AxiosInstance;
|
|
13
13
|
};
|
|
14
|
-
} & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Token<import("../types/models/shared").Primitive>, Pick<Token<import("../types/models/shared").Primitive>, "type" | "data" | "privacy" | "metadata" | "encryption" | "searchIndexes">>) & (new (...args: any[]) => import("../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../types/sdk/services/shared").List<Token<import("../types/models/shared").Primitive>, ListTokensQuery>);
|
|
14
|
+
} & (new (...args: any[]) => import("../types/sdk/services/shared").Create<Token<import("../types/models/shared").Primitive>, Pick<Token<import("../types/models/shared").Primitive>, "type" | "data" | "privacy" | "metadata" | "encryption" | "searchIndexes" | "fingerprintExpression">>) & (new (...args: any[]) => import("../types/sdk/services/shared").Delete) & (new (...args: any[]) => import("../types/sdk/services/shared").List<Token<import("../types/models/shared").Primitive>, ListTokensQuery>);
|
|
15
15
|
export declare type BasisTheoryTokens = InstanceType<typeof BasisTheoryTokens>;
|
|
@@ -16,7 +16,7 @@ interface SanitizedElementOptions {
|
|
|
16
16
|
transform?: [RegExp, string] | null;
|
|
17
17
|
ariaDescription?: string;
|
|
18
18
|
ariaLabel?: string;
|
|
19
|
-
iconPosition?:
|
|
19
|
+
iconPosition?: string;
|
|
20
20
|
cardBrand?: string;
|
|
21
21
|
}
|
|
22
22
|
declare type ElementOptions = ElementInternalOptions & SanitizedElementOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CARD_BRANDS } from '@/elements/constants';
|
|
1
|
+
import { CARD_BRANDS, CARD_ICON_POSITIONS } from '@/elements/constants';
|
|
2
2
|
declare type FieldErrorType = 'incomplete' | 'invalid';
|
|
3
3
|
declare type ConfigErrorType = 'missing-configuration' | 'missing-permission' | 'invalid-configuration';
|
|
4
4
|
interface ConfigError {
|
|
@@ -20,4 +20,8 @@ interface PropertyError {
|
|
|
20
20
|
* Card brands type
|
|
21
21
|
*/
|
|
22
22
|
declare type Brand = typeof CARD_BRANDS[number];
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Icon position for card number element
|
|
25
|
+
*/
|
|
26
|
+
declare type CardIconPosition = typeof CARD_ICON_POSITIONS[number];
|
|
27
|
+
export type { FieldErrorType, ConfigErrorType, ConfigError, Targeted, ListenableKey, FieldError, PropertyError, Brand, CardIconPosition, };
|
package/types/models/index.d.ts
CHANGED
package/types/models/index.js
CHANGED
|
@@ -145,4 +145,17 @@ Object.keys(_tokenize).forEach(function (key) {
|
|
|
145
145
|
return _tokenize[key];
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
var _proxies = require("./proxies");
|
|
151
|
+
|
|
152
|
+
Object.keys(_proxies).forEach(function (key) {
|
|
153
|
+
if (key === "default" || key === "__esModule") return;
|
|
154
|
+
if (key in exports && exports[key] === _proxies[key]) return;
|
|
155
|
+
Object.defineProperty(exports, key, {
|
|
156
|
+
enumerable: true,
|
|
157
|
+
get: function () {
|
|
158
|
+
return _proxies[key];
|
|
159
|
+
}
|
|
160
|
+
});
|
|
148
161
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Auditable } from './shared';
|
|
2
|
+
interface Proxy extends Auditable {
|
|
3
|
+
id: string;
|
|
4
|
+
key: string;
|
|
5
|
+
tenantId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
destinationUrl: string;
|
|
8
|
+
requestReactorId: string;
|
|
9
|
+
}
|
|
10
|
+
declare type CreateProxy = Pick<Proxy, 'name' | 'destinationUrl' | 'requestReactorId'>;
|
|
11
|
+
declare type UpdateProxy = CreateProxy;
|
|
12
|
+
export type { Proxy, CreateProxy, UpdateProxy };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Application } from './applications';
|
|
1
2
|
import type { ReactorFormula } from './reactor-formulas';
|
|
2
3
|
import type { Auditable } from './shared';
|
|
3
4
|
interface Reactor extends Auditable {
|
|
@@ -5,10 +6,14 @@ interface Reactor extends Auditable {
|
|
|
5
6
|
tenantId: string;
|
|
6
7
|
name: string;
|
|
7
8
|
formula: ReactorFormula;
|
|
9
|
+
application?: Application;
|
|
8
10
|
configuration: Record<string, string>;
|
|
9
11
|
}
|
|
10
12
|
declare type CreateReactor = Pick<Reactor, 'name' | 'configuration'> & {
|
|
11
13
|
formula: Pick<ReactorFormula, 'id'>;
|
|
14
|
+
application?: Pick<Application, 'id'>;
|
|
15
|
+
};
|
|
16
|
+
declare type UpdateReactor = Pick<Reactor, 'name' | 'configuration'> & {
|
|
17
|
+
application?: Pick<Application, 'id'>;
|
|
12
18
|
};
|
|
13
|
-
declare type UpdateReactor = Pick<Reactor, 'name' | 'configuration'>;
|
|
14
19
|
export type { Reactor, CreateReactor, UpdateReactor };
|
package/types/models/tokens.d.ts
CHANGED
|
@@ -28,7 +28,8 @@ interface Token<DataType = Primitive> extends TokenBase {
|
|
|
28
28
|
privacy?: TokenPrivacy;
|
|
29
29
|
encryption?: TokenEncryption;
|
|
30
30
|
searchIndexes?: string[];
|
|
31
|
+
fingerprintExpression?: string;
|
|
31
32
|
}
|
|
32
|
-
declare type CreateToken<DataType = Primitive> = Pick<Token<DataType>, 'type' | 'data' | 'privacy' | 'metadata' | 'encryption' | 'searchIndexes'>;
|
|
33
|
+
declare type CreateToken<DataType = Primitive> = Pick<Token<DataType>, 'type' | 'data' | 'privacy' | 'metadata' | 'encryption' | 'searchIndexes' | 'fingerprintExpression'>;
|
|
33
34
|
export type { Token, CreateToken, DataArray, DataObject, TokenData, DataClassification, DataImpactLevel, DataRestrictionPolicy, };
|
|
34
35
|
export { DATA_CLASSIFICATIONS, DATA_IMPACT_LEVELS, DATA_RESTRICTION_POLICIES };
|
package/types/sdk/sdk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BasisTheoryElements } from '@/types/elements';
|
|
2
|
-
import type { AtomicBanks, AtomicCards, Tokens, Tokenize, Applications, Tenants, Logs, ReactorFormulas, Reactors, Permissions } from './services';
|
|
2
|
+
import type { AtomicBanks, AtomicCards, Tokens, Tokenize, Applications, Tenants, Logs, ReactorFormulas, Reactors, Permissions, Proxies } from './services';
|
|
3
3
|
interface ApplicationInfo {
|
|
4
4
|
name?: string;
|
|
5
5
|
version?: string;
|
|
@@ -36,6 +36,7 @@ interface BasisTheory extends Tokenize {
|
|
|
36
36
|
reactorFormulas: ReactorFormulas;
|
|
37
37
|
reactors: Reactors;
|
|
38
38
|
permissions: Permissions;
|
|
39
|
+
proxies: Proxies;
|
|
39
40
|
}
|
|
40
41
|
interface ClientUserAgent {
|
|
41
42
|
client: string;
|
|
@@ -44,7 +45,7 @@ interface ClientUserAgent {
|
|
|
44
45
|
runtimeVersion: string;
|
|
45
46
|
application?: ApplicationInfo;
|
|
46
47
|
}
|
|
47
|
-
declare type BasisTheoryServices =
|
|
48
|
+
declare type BasisTheoryServices = keyof BasisTheory;
|
|
48
49
|
declare type BasisTheoryServicesBasePathMap = {
|
|
49
50
|
[key in BasisTheoryServices]: string;
|
|
50
51
|
};
|
|
@@ -145,4 +145,17 @@ Object.keys(_permissions).forEach(function (key) {
|
|
|
145
145
|
return _permissions[key];
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
var _proxies = require("./proxies");
|
|
151
|
+
|
|
152
|
+
Object.keys(_proxies).forEach(function (key) {
|
|
153
|
+
if (key === "default" || key === "__esModule") return;
|
|
154
|
+
if (key in exports && exports[key] === _proxies[key]) return;
|
|
155
|
+
Object.defineProperty(exports, key, {
|
|
156
|
+
enumerable: true,
|
|
157
|
+
get: function () {
|
|
158
|
+
return _proxies[key];
|
|
159
|
+
}
|
|
160
|
+
});
|
|
148
161
|
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CreateProxy, Proxy, UpdateProxy } from '@/types/models/proxies';
|
|
2
|
+
import type { Create, Delete, List, PaginatedQuery, Retrieve, Update } from '@/types/sdk';
|
|
3
|
+
interface ListProxyQuery extends PaginatedQuery {
|
|
4
|
+
id?: string | string[];
|
|
5
|
+
name?: string;
|
|
6
|
+
}
|
|
7
|
+
interface Proxies extends Create<Proxy, CreateProxy>, Retrieve<Proxy>, Update<Proxy, UpdateProxy>, Delete, List<Proxy, ListProxyQuery> {
|
|
8
|
+
}
|
|
9
|
+
export type { Proxies, ListProxyQuery };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|