@basis-theory/basis-theory-js 1.11.0 → 1.14.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 +24 -25
- package/BasisTheory.js +37 -24
- package/README.md +4 -0
- package/applications/BasisTheoryApplications.d.ts +3 -3
- package/applications/index.d.ts +0 -1
- package/applications/index.js +0 -17
- package/atomic/banks/BasisTheoryAtomicBanks.d.ts +6 -8
- package/atomic/banks/BasisTheoryAtomicBanks.js +1 -7
- package/atomic/banks/index.d.ts +0 -1
- package/atomic/banks/index.js +0 -17
- package/atomic/cards/BasisTheoryAtomicCards.d.ts +6 -8
- package/atomic/cards/BasisTheoryAtomicCards.js +1 -7
- package/atomic/cards/index.d.ts +0 -1
- package/atomic/cards/index.js +0 -17
- package/atomic/index.d.ts +2 -2
- package/atomic/index.js +8 -8
- package/common/constants.js +1 -1
- package/common/index.d.ts +0 -1
- package/common/index.js +0 -13
- package/common/utils.d.ts +3 -2
- package/common/utils.js +5 -4
- package/elements/constants.d.ts +5 -0
- package/elements/constants.js +14 -0
- package/elements/index.d.ts +3 -6
- package/elements/index.js +44 -1
- package/elements/load.d.ts +3 -0
- package/{common/elements.js → elements/load.js} +5 -3
- package/{common → elements}/script.d.ts +0 -0
- package/{common → elements}/script.js +0 -0
- package/elements/services/banks.d.ts +5 -0
- package/elements/services/banks.js +21 -0
- package/elements/services/cards.d.ts +5 -0
- package/elements/services/cards.js +21 -0
- package/elements/services/index.d.ts +4 -0
- package/elements/services/index.js +57 -0
- package/elements/services/tokenize.d.ts +5 -0
- package/elements/services/tokenize.js +21 -0
- package/elements/services/tokens.d.ts +5 -0
- package/elements/services/tokens.js +21 -0
- package/index.d.ts +2 -2
- package/logs/BasisTheoryLogs.d.ts +3 -2
- package/logs/index.d.ts +0 -1
- package/logs/index.js +0 -17
- package/package.json +2 -1
- package/permissions/BasisTheoryPermissions.d.ts +3 -2
- package/permissions/index.d.ts +0 -1
- package/permissions/index.js +1 -18
- package/reactor-formulas/BasisTheoryReactorFormulas.d.ts +3 -2
- package/reactor-formulas/index.d.ts +0 -1
- package/reactor-formulas/index.js +0 -17
- package/reactors/BasisTheoryReactors.d.ts +3 -2
- package/reactors/index.d.ts +0 -1
- package/reactors/index.js +0 -17
- package/service/CrudBuilder.d.ts +2 -17
- package/service/types.d.ts +1 -21
- package/tenants/BasisTheoryTenants.d.ts +3 -3
- package/tenants/index.d.ts +0 -1
- package/tenants/index.js +0 -17
- package/tokenize/BasisTheoryTokenize.d.ts +6 -0
- package/tokenize/BasisTheoryTokenize.js +24 -0
- package/tokenize/index.d.ts +1 -0
- package/tokenize/index.js +13 -0
- package/tokens/BasisTheoryTokens.d.ts +8 -7
- package/tokens/BasisTheoryTokens.js +4 -4
- package/tokens/index.d.ts +0 -1
- package/tokens/index.js +1 -18
- package/types.d.ts +10 -11
- package/applications/types.d.ts +0 -18
- package/applications/types.js +0 -8
- package/atomic/BasisTheoryAtomic.d.ts +0 -16
- package/atomic/BasisTheoryAtomic.js +0 -33
- package/atomic/banks/types.d.ts +0 -13
- package/atomic/banks/types.js +0 -1
- package/atomic/cards/types.d.ts +0 -31
- package/atomic/cards/types.js +0 -1
- package/atomic/types.d.ts +0 -15
- package/atomic/types.js +0 -1
- package/common/elements.d.ts +0 -2
- package/logs/types.d.ts +0 -18
- package/logs/types.js +0 -1
- package/permissions/types.d.ts +0 -10
- package/permissions/types.js +0 -8
- package/reactor-formulas/types.d.ts +0 -33
- package/reactor-formulas/types.js +0 -1
- package/reactors/types.d.ts +0 -21
- package/reactors/types.js +0 -1
- package/tenants/types.d.ts +0 -20
- package/tenants/types.js +0 -1
- package/tokens/types.d.ts +0 -42
- package/tokens/types.js +0 -1
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.loadElements = void 0;
|
|
7
7
|
|
|
8
|
+
var _constants = require("./constants");
|
|
9
|
+
|
|
8
10
|
var _script = require("./script");
|
|
9
11
|
|
|
10
12
|
let elementsPromise;
|
|
@@ -13,7 +15,7 @@ const loadElements = () => {
|
|
|
13
15
|
if (!elementsPromise) {
|
|
14
16
|
elementsPromise = new Promise((resolve, reject) => {
|
|
15
17
|
if (typeof window !== 'object') {
|
|
16
|
-
reject(new Error(
|
|
18
|
+
reject(new Error(_constants.ELEMENTS_NOM_DOM_ERROR_MESSAGE));
|
|
17
19
|
return;
|
|
18
20
|
}
|
|
19
21
|
|
|
@@ -34,11 +36,11 @@ const loadElements = () => {
|
|
|
34
36
|
if (window.BasisTheoryElements) {
|
|
35
37
|
resolve(window.BasisTheoryElements);
|
|
36
38
|
} else {
|
|
37
|
-
reject(new Error(
|
|
39
|
+
reject(new Error(_constants.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE));
|
|
38
40
|
}
|
|
39
41
|
});
|
|
40
42
|
script.addEventListener('error', event => {
|
|
41
|
-
reject((event === null || event === void 0 ? void 0 : event.error) || new Error(
|
|
43
|
+
reject((event === null || event === void 0 ? void 0 : event.error) || new Error(_constants.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE));
|
|
42
44
|
});
|
|
43
45
|
} catch (error) {
|
|
44
46
|
reject(error);
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AtomicBanks as ElementsAtomicBanks, BasisTheoryElementsInternal } from '@basis-theory/basis-theory-elements-interfaces/elements';
|
|
2
|
+
import type { AtomicBanks } from '@basis-theory/basis-theory-elements-interfaces/sdk';
|
|
3
|
+
import { BasisTheoryAtomicBanks } from '../../atomic';
|
|
4
|
+
declare const delegateAtomicBanks: (elements?: BasisTheoryElementsInternal | undefined) => new (options: import("../../service/types").BasisTheoryServiceOptions) => ElementsAtomicBanks & AtomicBanks;
|
|
5
|
+
export { delegateAtomicBanks };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.delegateAtomicBanks = void 0;
|
|
7
|
+
|
|
8
|
+
var _atomic = require("../../atomic");
|
|
9
|
+
|
|
10
|
+
const delegateAtomicBanks = elements => class BasisTheoryAtomicBanksElementsDelegate extends _atomic.BasisTheoryAtomicBanks {
|
|
11
|
+
create(payload, requestOptions) {
|
|
12
|
+
if (elements !== null && elements !== void 0 && elements.hasElement(payload)) {
|
|
13
|
+
return elements.atomicBanks.create(payload, requestOptions);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return super.create(payload, requestOptions);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.delegateAtomicBanks = delegateAtomicBanks;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AtomicCards as ElementsAtomicCards, BasisTheoryElementsInternal } from '@basis-theory/basis-theory-elements-interfaces/elements';
|
|
2
|
+
import type { AtomicCards } from '@basis-theory/basis-theory-elements-interfaces/sdk';
|
|
3
|
+
import { BasisTheoryAtomicCards } from '../../atomic';
|
|
4
|
+
declare const delegateAtomicCards: (elements?: BasisTheoryElementsInternal | undefined) => new (options: import("../../service/types").BasisTheoryServiceOptions) => ElementsAtomicCards & AtomicCards;
|
|
5
|
+
export { delegateAtomicCards };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.delegateAtomicCards = void 0;
|
|
7
|
+
|
|
8
|
+
var _atomic = require("../../atomic");
|
|
9
|
+
|
|
10
|
+
const delegateAtomicCards = elements => class BasisTheoryAtomicCardsElementsDelegate extends _atomic.BasisTheoryAtomicCards {
|
|
11
|
+
create(payload, requestOptions) {
|
|
12
|
+
if (elements !== null && elements !== void 0 && elements.hasElement(payload)) {
|
|
13
|
+
return elements.atomicCards.create(payload, requestOptions);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return super.create(payload, requestOptions);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.delegateAtomicCards = delegateAtomicCards;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _cards = require("./cards");
|
|
8
|
+
|
|
9
|
+
Object.keys(_cards).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _cards[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _cards[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var _tokenize = require("./tokenize");
|
|
21
|
+
|
|
22
|
+
Object.keys(_tokenize).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _tokenize[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _tokenize[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var _banks = require("./banks");
|
|
34
|
+
|
|
35
|
+
Object.keys(_banks).forEach(function (key) {
|
|
36
|
+
if (key === "default" || key === "__esModule") return;
|
|
37
|
+
if (key in exports && exports[key] === _banks[key]) return;
|
|
38
|
+
Object.defineProperty(exports, key, {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return _banks[key];
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
var _tokens = require("./tokens");
|
|
47
|
+
|
|
48
|
+
Object.keys(_tokens).forEach(function (key) {
|
|
49
|
+
if (key === "default" || key === "__esModule") return;
|
|
50
|
+
if (key in exports && exports[key] === _tokens[key]) return;
|
|
51
|
+
Object.defineProperty(exports, key, {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () {
|
|
54
|
+
return _tokens[key];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Tokenize as ElementsTokenize, BasisTheoryElementsInternal } from '@basis-theory/basis-theory-elements-interfaces/elements';
|
|
2
|
+
import type { Tokenize } from '@basis-theory/basis-theory-elements-interfaces/sdk';
|
|
3
|
+
import { BasisTheoryTokenize } from '../../tokenize';
|
|
4
|
+
declare const delegateTokenize: (elements?: BasisTheoryElementsInternal | undefined) => new (options: import("../../service/types").BasisTheoryServiceOptions) => ElementsTokenize & Tokenize;
|
|
5
|
+
export { delegateTokenize };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.delegateTokenize = void 0;
|
|
7
|
+
|
|
8
|
+
var _tokenize = require("../../tokenize");
|
|
9
|
+
|
|
10
|
+
const delegateTokenize = elements => class BasisTheoryTokenizesElementsDelegate extends _tokenize.BasisTheoryTokenize {
|
|
11
|
+
tokenize(payload, requestOptions) {
|
|
12
|
+
if (elements !== null && elements !== void 0 && elements.hasElement(payload)) {
|
|
13
|
+
return elements.tokenize.tokenize(payload, requestOptions);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return super.tokenize(payload, requestOptions);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.delegateTokenize = delegateTokenize;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Tokens as ElementsTokens, BasisTheoryElementsInternal } from '@basis-theory/basis-theory-elements-interfaces/elements';
|
|
2
|
+
import type { Tokens } from '@basis-theory/basis-theory-elements-interfaces/sdk';
|
|
3
|
+
import { BasisTheoryTokens } from '../../tokens';
|
|
4
|
+
declare const delegateTokens: (elements?: BasisTheoryElementsInternal | undefined) => new (options: import("../../service/types").BasisTheoryServiceOptions) => ElementsTokens & Tokens;
|
|
5
|
+
export { delegateTokens };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.delegateTokens = void 0;
|
|
7
|
+
|
|
8
|
+
var _tokens = require("../../tokens");
|
|
9
|
+
|
|
10
|
+
const delegateTokens = elements => class BasisTheoryTokensElementsDelegate extends _tokens.BasisTheoryTokens {
|
|
11
|
+
create(payload, requestOptions) {
|
|
12
|
+
if (elements !== null && elements !== void 0 && elements.hasElement(payload)) {
|
|
13
|
+
return elements.tokens.create(payload, requestOptions);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return super.create(payload, requestOptions);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.delegateTokens = delegateTokens;
|
package/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BasisTheoryInit } from '@basis-theory/basis-theory-elements-interfaces/sdk';
|
|
2
2
|
/**
|
|
3
3
|
* Default instance used to expose bundle in <script> tags. <br/>
|
|
4
4
|
* Not meant to be used in Node environment.
|
|
5
5
|
*/
|
|
6
|
-
export declare const _instance:
|
|
6
|
+
export declare const _instance: BasisTheoryInit;
|
|
7
7
|
export * from './BasisTheory';
|
|
8
8
|
export * from './encryption';
|
|
9
9
|
export * from './applications';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { Log
|
|
1
|
+
import type { Log } from '@basis-theory/basis-theory-elements-interfaces/models';
|
|
2
|
+
import type { ListLogQuery } from '@basis-theory/basis-theory-elements-interfaces/sdk';
|
|
2
3
|
export declare const BasisTheoryLogs: {
|
|
3
4
|
new (options: import("../service/types").BasisTheoryServiceOptions): {
|
|
4
5
|
readonly client: import("axios").AxiosInstance;
|
|
5
6
|
};
|
|
6
|
-
} & (new (...args: any[]) => import("
|
|
7
|
+
} & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").List<Log, ListLogQuery>);
|
|
7
8
|
export declare type BasisTheoryLogs = InstanceType<typeof BasisTheoryLogs>;
|
package/logs/index.d.ts
CHANGED
package/logs/index.js
CHANGED
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
BasisTheoryLogs: true
|
|
8
|
-
};
|
|
9
6
|
Object.defineProperty(exports, "BasisTheoryLogs", {
|
|
10
7
|
enumerable: true,
|
|
11
8
|
get: function () {
|
|
@@ -13,18 +10,4 @@ Object.defineProperty(exports, "BasisTheoryLogs", {
|
|
|
13
10
|
}
|
|
14
11
|
});
|
|
15
12
|
|
|
16
|
-
var _types = require("./types");
|
|
17
|
-
|
|
18
|
-
Object.keys(_types).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
21
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
22
|
-
Object.defineProperty(exports, key, {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () {
|
|
25
|
-
return _types[key];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
|
|
30
13
|
var _BasisTheoryLogs = require("./BasisTheoryLogs");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basis-theory/basis-theory-js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"repository": "https://github.com/Basis-Theory/basis-theory-js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"!*.bundle.js"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
+
"@basis-theory/basis-theory-elements-interfaces": "^2.0.1",
|
|
18
19
|
"axios": "^0.21.2",
|
|
19
20
|
"camelcase-keys": "^6.2.2",
|
|
20
21
|
"snake-case": "^3.0.4",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Permission } from '@basis-theory/basis-theory-elements-interfaces/models';
|
|
2
|
+
import type { RequestOptions } from '@basis-theory/basis-theory-elements-interfaces/sdk';
|
|
3
|
+
import { BasisTheoryService } from '../service';
|
|
3
4
|
export declare class BasisTheoryPermissions extends BasisTheoryService {
|
|
4
5
|
list(options?: RequestOptions): Promise<Permission[]>;
|
|
5
6
|
}
|
package/permissions/index.d.ts
CHANGED
package/permissions/index.js
CHANGED
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
BasisTheoryPermissions: true
|
|
8
|
-
};
|
|
9
6
|
Object.defineProperty(exports, "BasisTheoryPermissions", {
|
|
10
7
|
enumerable: true,
|
|
11
8
|
get: function () {
|
|
@@ -13,18 +10,4 @@ Object.defineProperty(exports, "BasisTheoryPermissions", {
|
|
|
13
10
|
}
|
|
14
11
|
});
|
|
15
12
|
|
|
16
|
-
var _BasisTheoryPermissions = require("./BasisTheoryPermissions");
|
|
17
|
-
|
|
18
|
-
var _types = require("./types");
|
|
19
|
-
|
|
20
|
-
Object.keys(_types).forEach(function (key) {
|
|
21
|
-
if (key === "default" || key === "__esModule") return;
|
|
22
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
23
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
24
|
-
Object.defineProperty(exports, key, {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _types[key];
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
});
|
|
13
|
+
var _BasisTheoryPermissions = require("./BasisTheoryPermissions");
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { ReactorFormula
|
|
1
|
+
import type { ReactorFormula } from '@basis-theory/basis-theory-elements-interfaces/models';
|
|
2
|
+
import type { ListReactorFormulaQuery } from '@basis-theory/basis-theory-elements-interfaces/sdk';
|
|
2
3
|
export declare const BasisTheoryReactorFormulas: {
|
|
3
4
|
new (options: import("../service/types").BasisTheoryServiceOptions): {
|
|
4
5
|
readonly client: import("axios").AxiosInstance;
|
|
5
6
|
};
|
|
6
|
-
} & (new (...args: any[]) => import("
|
|
7
|
+
} & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Create<ReactorFormula, Pick<ReactorFormula, "name" | "type" | "code" | "description" | "sourceTokenType" | "icon" | "configuration" | "requestParameters">>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Retrieve<ReactorFormula>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Update<ReactorFormula, Pick<ReactorFormula, "name" | "type" | "code" | "description" | "sourceTokenType" | "icon" | "configuration" | "requestParameters">>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Delete) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").List<ReactorFormula, ListReactorFormulaQuery>);
|
|
7
8
|
export declare type BasisTheoryReactorFormulas = InstanceType<typeof BasisTheoryReactorFormulas>;
|
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
BasisTheoryReactorFormulas: true
|
|
8
|
-
};
|
|
9
6
|
Object.defineProperty(exports, "BasisTheoryReactorFormulas", {
|
|
10
7
|
enumerable: true,
|
|
11
8
|
get: function () {
|
|
@@ -13,18 +10,4 @@ Object.defineProperty(exports, "BasisTheoryReactorFormulas", {
|
|
|
13
10
|
}
|
|
14
11
|
});
|
|
15
12
|
|
|
16
|
-
var _types = require("./types");
|
|
17
|
-
|
|
18
|
-
Object.keys(_types).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
21
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
22
|
-
Object.defineProperty(exports, key, {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () {
|
|
25
|
-
return _types[key];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
|
|
30
13
|
var _BasisTheoryReactorFormulas = require("./BasisTheoryReactorFormulas");
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { Reactor, CreateReactor } from '@basis-theory/basis-theory-elements-interfaces/models';
|
|
2
|
+
import type { ListReactorQuery } from '@basis-theory/basis-theory-elements-interfaces/sdk';
|
|
1
3
|
import type { BasisTheoryServiceOptions } from '../service';
|
|
2
|
-
import type { Reactor, CreateReactorModel, ReactorQuery } from './types';
|
|
3
4
|
export declare const BasisTheoryReactors: {
|
|
4
5
|
new (options: BasisTheoryServiceOptions): {
|
|
5
6
|
readonly client: import("axios").AxiosInstance;
|
|
6
7
|
};
|
|
7
|
-
} & (new (...args: any[]) => import("
|
|
8
|
+
} & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Create<Reactor, CreateReactor>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Retrieve<Reactor>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Update<Reactor, Pick<Reactor, "name" | "configuration">>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Delete) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").List<Reactor, ListReactorQuery>);
|
|
8
9
|
export declare type BasisTheoryReactors = InstanceType<typeof BasisTheoryReactors>;
|
package/reactors/index.d.ts
CHANGED
package/reactors/index.js
CHANGED
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
BasisTheoryReactors: true
|
|
8
|
-
};
|
|
9
6
|
Object.defineProperty(exports, "BasisTheoryReactors", {
|
|
10
7
|
enumerable: true,
|
|
11
8
|
get: function () {
|
|
@@ -13,18 +10,4 @@ Object.defineProperty(exports, "BasisTheoryReactors", {
|
|
|
13
10
|
}
|
|
14
11
|
});
|
|
15
12
|
|
|
16
|
-
var _types = require("./types");
|
|
17
|
-
|
|
18
|
-
Object.keys(_types).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
21
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
22
|
-
Object.defineProperty(exports, key, {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () {
|
|
25
|
-
return _types[key];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
|
|
30
13
|
var _BasisTheoryReactors = require("./BasisTheoryReactors");
|
package/service/CrudBuilder.d.ts
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
|
+
import type { PaginatedQuery, Create as ICreate, Retrieve as IRetrieve, Update as IUpdate, Delete as IDelete, List as IList } from '@basis-theory/basis-theory-elements-interfaces/sdk';
|
|
1
2
|
import { BasisTheoryService } from './BasisTheoryService';
|
|
2
|
-
import type { RequestOptions, PaginatedList, PaginatedQuery } from './types';
|
|
3
3
|
declare type BasisTheoryServiceConstructor<T extends BasisTheoryService = BasisTheoryService> = new (...params: any[]) => T;
|
|
4
|
-
declare type ICreate<T, C> = {
|
|
5
|
-
create(model: C, options?: RequestOptions): Promise<T>;
|
|
6
|
-
};
|
|
7
|
-
declare type IRetrieve<T> = {
|
|
8
|
-
retrieve(id: string, options?: RequestOptions): Promise<T>;
|
|
9
|
-
};
|
|
10
|
-
declare type IUpdate<T, U> = {
|
|
11
|
-
update(id: string, model: U, options?: RequestOptions): Promise<T>;
|
|
12
|
-
};
|
|
13
|
-
declare type IDelete = {
|
|
14
|
-
delete(id: string, options?: RequestOptions): Promise<void>;
|
|
15
|
-
};
|
|
16
|
-
declare type IList<T, Q extends PaginatedQuery> = {
|
|
17
|
-
list(query?: Q, options?: RequestOptions): Promise<PaginatedList<T>>;
|
|
18
|
-
};
|
|
19
4
|
declare type ICreateConstructor<T, C> = new (...args: any[]) => ICreate<T, C>;
|
|
20
5
|
declare type IRetrieveConstructor<T> = new (...args: any[]) => IRetrieve<T>;
|
|
21
6
|
declare type IUpdateConstructor<T, U> = new (...args: any[]) => IUpdate<T, U>;
|
|
@@ -32,4 +17,4 @@ declare class CrudBuilder<Class extends BasisTheoryServiceConstructor> {
|
|
|
32
17
|
build(): Class;
|
|
33
18
|
}
|
|
34
19
|
export { CrudBuilder };
|
|
35
|
-
export type { ICreate, IRetrieve, IUpdate, IDelete, IList };
|
|
20
|
+
export type { ICreate, IRetrieve, IUpdate, IDelete, IList, BasisTheoryServiceConstructor, };
|
package/service/types.d.ts
CHANGED
|
@@ -3,25 +3,5 @@ interface BasisTheoryServiceOptions extends Pick<AxiosRequestConfig, 'transformR
|
|
|
3
3
|
apiKey: string;
|
|
4
4
|
baseURL: string;
|
|
5
5
|
}
|
|
6
|
-
interface PaginatedList<T> {
|
|
7
|
-
pagination: {
|
|
8
|
-
totalItems: number;
|
|
9
|
-
pageNumber: number;
|
|
10
|
-
pageSize: number;
|
|
11
|
-
totalPages: number;
|
|
12
|
-
};
|
|
13
|
-
data: T[];
|
|
14
|
-
}
|
|
15
|
-
declare type QueryValue = boolean | number | string | null | undefined | (number | string)[];
|
|
16
|
-
interface PaginatedQuery {
|
|
17
|
-
[key: string]: QueryValue;
|
|
18
|
-
[key: number]: QueryValue;
|
|
19
|
-
page?: number;
|
|
20
|
-
size?: number;
|
|
21
|
-
}
|
|
22
|
-
interface RequestOptions {
|
|
23
|
-
apiKey?: string;
|
|
24
|
-
correlationId?: string;
|
|
25
|
-
}
|
|
26
6
|
declare type RequestTransformers = Pick<AxiosRequestConfig, 'transformRequest' | 'transformResponse'>;
|
|
27
|
-
export type { BasisTheoryServiceOptions,
|
|
7
|
+
export type { BasisTheoryServiceOptions, RequestTransformers };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Tenant, TenantUsageReport, UpdateTenant } from '@basis-theory/basis-theory-elements-interfaces/models';
|
|
2
|
+
import type { RequestOptions } from '@basis-theory/basis-theory-elements-interfaces/sdk/services';
|
|
3
3
|
export declare const BasisTheoryTenants: {
|
|
4
4
|
new (options: import("../service/types").BasisTheoryServiceOptions): {
|
|
5
5
|
retrieve(options?: RequestOptions | undefined): Promise<Tenant>;
|
|
6
|
-
update(model:
|
|
6
|
+
update(model: UpdateTenant, options?: RequestOptions | undefined): Promise<Tenant>;
|
|
7
7
|
delete(options?: RequestOptions | undefined): Promise<void>;
|
|
8
8
|
retrieveUsageReport(options?: RequestOptions | undefined): Promise<TenantUsageReport>;
|
|
9
9
|
readonly client: import("axios").AxiosInstance;
|
package/tenants/index.d.ts
CHANGED
package/tenants/index.js
CHANGED
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
BasisTheoryTenants: true
|
|
8
|
-
};
|
|
9
6
|
Object.defineProperty(exports, "BasisTheoryTenants", {
|
|
10
7
|
enumerable: true,
|
|
11
8
|
get: function () {
|
|
@@ -13,18 +10,4 @@ Object.defineProperty(exports, "BasisTheoryTenants", {
|
|
|
13
10
|
}
|
|
14
11
|
});
|
|
15
12
|
|
|
16
|
-
var _types = require("./types");
|
|
17
|
-
|
|
18
|
-
Object.keys(_types).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
21
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
22
|
-
Object.defineProperty(exports, key, {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () {
|
|
25
|
-
return _types[key];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
|
|
30
13
|
var _BasisTheoryTenants = require("./BasisTheoryTenants");
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TokenizeData } from '@basis-theory/basis-theory-elements-interfaces/models';
|
|
2
|
+
import type { RequestOptions } from '@basis-theory/basis-theory-elements-interfaces/sdk';
|
|
3
|
+
import { BasisTheoryService } from '../service';
|
|
4
|
+
export declare class BasisTheoryTokenize extends BasisTheoryService {
|
|
5
|
+
tokenize(tokens: TokenizeData, options?: RequestOptions): Promise<TokenizeData>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BasisTheoryTokenize = void 0;
|
|
7
|
+
|
|
8
|
+
var _common = require("../common");
|
|
9
|
+
|
|
10
|
+
var _utils = require("../common/utils");
|
|
11
|
+
|
|
12
|
+
var _service = require("../service");
|
|
13
|
+
|
|
14
|
+
class BasisTheoryTokenize extends _service.BasisTheoryService {
|
|
15
|
+
tokenize(tokens, options = {}) {
|
|
16
|
+
return this.client.post('/', tokens, (0, _common.createRequestConfig)(options, {
|
|
17
|
+
transformRequest: _utils.proxyRaw,
|
|
18
|
+
transformResponse: _utils.proxyRaw
|
|
19
|
+
})).then(_utils.dataExtractor);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports.BasisTheoryTokenize = BasisTheoryTokenize;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BasisTheoryTokenize } from './BasisTheoryTokenize';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "BasisTheoryTokenize", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _BasisTheoryTokenize.BasisTheoryTokenize;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _BasisTheoryTokenize = require("./BasisTheoryTokenize");
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Token, CreateToken } from '@basis-theory/basis-theory-elements-interfaces/models';
|
|
2
|
+
import type { PaginatedList, RequestOptions, ListDecryptedTokensQuery, ListTokensQuery } from '@basis-theory/basis-theory-elements-interfaces/sdk';
|
|
3
|
+
import { BasisTheoryServiceOptions } from '../service';
|
|
3
4
|
export declare const BasisTheoryTokens: {
|
|
4
5
|
new (options: BasisTheoryServiceOptions): {
|
|
5
|
-
retrieve(id: string,
|
|
6
|
-
retrieveDecrypted(id: string,
|
|
7
|
-
listDecrypted(query?:
|
|
6
|
+
retrieve(id: string, options?: RequestOptions): Promise<Token>;
|
|
7
|
+
retrieveDecrypted(id: string, options?: RequestOptions): Promise<Token>;
|
|
8
|
+
listDecrypted(query?: ListDecryptedTokensQuery, options?: RequestOptions): Promise<PaginatedList<Token>>;
|
|
8
9
|
createAssociation(parentId: string, childId: string, options?: RequestOptions | undefined): Promise<void>;
|
|
9
10
|
deleteAssociation(parentId: string, childId: string, options?: RequestOptions | undefined): Promise<void>;
|
|
10
|
-
createChild(parentId: string, token:
|
|
11
|
+
createChild(parentId: string, token: CreateToken, options?: RequestOptions | undefined): Promise<Token>;
|
|
11
12
|
listChildren(parentId: string, query?: ListTokensQuery, options?: RequestOptions): Promise<PaginatedList<Token>>;
|
|
12
13
|
readonly client: import("axios").AxiosInstance;
|
|
13
14
|
};
|
|
14
|
-
} & (new (...args: any[]) => import("
|
|
15
|
+
} & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Create<Token<import("@basis-theory/basis-theory-elements-interfaces/models/shared").Primitive>, Pick<Token<import("@basis-theory/basis-theory-elements-interfaces/models/shared").Primitive>, "data" | "type" | "metadata" | "encryption">>) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").Delete) & (new (...args: any[]) => import("@basis-theory/basis-theory-elements-interfaces/sdk/services/shared").List<Token<import("@basis-theory/basis-theory-elements-interfaces/models/shared").Primitive>, ListTokensQuery>);
|
|
15
16
|
export declare type BasisTheoryTokens = InstanceType<typeof BasisTheoryTokens>;
|
|
@@ -23,13 +23,13 @@ const BasisTheoryTokens = new _CrudBuilder.CrudBuilder(class BasisTheoryTokens e
|
|
|
23
23
|
super(_options);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
retrieve(id,
|
|
27
|
-
const url = `/${id}
|
|
26
|
+
retrieve(id, options = {}) {
|
|
27
|
+
const url = `/${id}`;
|
|
28
28
|
return this.client.get(url, (0, _common.createRequestConfig)(options)).then(_utils.dataExtractor);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
retrieveDecrypted(id,
|
|
32
|
-
const url = `/${id}/decrypt
|
|
31
|
+
retrieveDecrypted(id, options = {}) {
|
|
32
|
+
const url = `/${id}/decrypt`;
|
|
33
33
|
return this.client.get(url, (0, _common.createRequestConfig)(options)).then(_utils.dataExtractor);
|
|
34
34
|
}
|
|
35
35
|
|