@basis-theory/basis-theory-js 1.13.1 → 1.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/BasisTheory.d.ts +23 -27
- package/BasisTheory.js +33 -30
- package/README.md +5 -1
- 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 +5 -5
- package/atomic/banks/index.d.ts +0 -1
- package/atomic/banks/index.js +0 -17
- package/atomic/cards/BasisTheoryAtomicCards.d.ts +5 -5
- 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.d.ts +1 -1
- package/common/constants.js +1 -2
- package/common/index.d.ts +0 -1
- package/common/index.js +0 -13
- package/common/utils.d.ts +1 -1
- package/common/utils.js +0 -6
- 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 +3 -3
- package/tokenize/BasisTheoryTokenize.js +0 -9
- package/tokens/BasisTheoryTokens.d.ts +6 -5
- 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 -15
- package/atomic/cards/types.js +0 -1
- package/atomic/types.d.ts +0 -18
- 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/tokenize/types.d.ts +0 -7
- package/tokenize/types.js +0 -1
- package/tokens/types.d.ts +0 -36
- package/tokens/types.js +0 -1
|
@@ -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.17.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.2.0",
|
|
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");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
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';
|
|
3
4
|
export declare class BasisTheoryTokenize extends BasisTheoryService {
|
|
4
|
-
constructor(options: BasisTheoryServiceOptions);
|
|
5
5
|
tokenize(tokens: TokenizeData, options?: RequestOptions): Promise<TokenizeData>;
|
|
6
6
|
}
|
|
@@ -12,15 +12,6 @@ var _utils = require("../common/utils");
|
|
|
12
12
|
var _service = require("../service");
|
|
13
13
|
|
|
14
14
|
class BasisTheoryTokenize extends _service.BasisTheoryService {
|
|
15
|
-
constructor(options) {
|
|
16
|
-
const _options = options; // eslint-disable-next-line unicorn/prefer-spread
|
|
17
|
-
|
|
18
|
-
_options.transformRequest = [].concat(_utils.transformTokenRequestSnakeCase, options.transformRequest || []); // eslint-disable-next-line unicorn/prefer-spread
|
|
19
|
-
|
|
20
|
-
_options.transformResponse = [].concat(_utils.transformTokenResponseCamelCase, options.transformResponse || []);
|
|
21
|
-
super(_options);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
15
|
tokenize(tokens, options = {}) {
|
|
25
16
|
return this.client.post('/', tokens, (0, _common.createRequestConfig)(options, {
|
|
26
17
|
transformRequest: _utils.proxyRaw,
|
|
@@ -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
6
|
retrieve(id: string, options?: RequestOptions): Promise<Token>;
|
|
6
7
|
retrieveDecrypted(id: string, options?: RequestOptions): Promise<Token>;
|
|
7
|
-
listDecrypted(query?:
|
|
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" | "privacy" | "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>;
|
package/tokens/index.d.ts
CHANGED
package/tokens/index.js
CHANGED
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
BasisTheoryTokens: true
|
|
8
|
-
};
|
|
9
6
|
Object.defineProperty(exports, "BasisTheoryTokens", {
|
|
10
7
|
enumerable: true,
|
|
11
8
|
get: function () {
|
|
@@ -13,18 +10,4 @@ Object.defineProperty(exports, "BasisTheoryTokens", {
|
|
|
13
10
|
}
|
|
14
11
|
});
|
|
15
12
|
|
|
16
|
-
var _BasisTheoryTokens = require("./BasisTheoryTokens");
|
|
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 _BasisTheoryTokens = require("./BasisTheoryTokens");
|
package/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BasisTheoryElementsInternal } from '@basis-theory/basis-theory-elements-interfaces/elements';
|
|
2
2
|
declare type InitStatus = 'not-started' | 'in-progress' | 'done' | 'error';
|
|
3
|
-
declare type Clients = 'tokens' | 'tokenize' | '
|
|
3
|
+
declare type Clients = 'tokens' | 'tokenize' | 'applications' | 'reactorFormulas' | 'reactors' | 'atomicBanks' | 'atomicCards' | 'permissions' | 'logs' | 'tenants';
|
|
4
4
|
declare type ClientsBasePathMap = {
|
|
5
5
|
[key in Clients]: string;
|
|
6
6
|
};
|
|
@@ -17,19 +17,18 @@ interface EncryptionOptions {
|
|
|
17
17
|
}
|
|
18
18
|
interface BasisTheoryInitOptions {
|
|
19
19
|
apiBaseUrl?: string;
|
|
20
|
-
elements?: boolean;
|
|
21
|
-
elementsBaseUrl?: string;
|
|
22
20
|
}
|
|
23
|
-
interface
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
interface BasisTheoryInitOptionsWithoutElements extends BasisTheoryInitOptions {
|
|
22
|
+
elements?: false;
|
|
23
|
+
}
|
|
24
|
+
interface BasisTheoryInitOptionsWithElements extends BasisTheoryInitOptions {
|
|
25
|
+
elements: true;
|
|
26
|
+
elementsBaseUrl?: string;
|
|
28
27
|
}
|
|
29
28
|
declare global {
|
|
30
29
|
interface Window {
|
|
31
|
-
BasisTheoryElements?:
|
|
30
|
+
BasisTheoryElements?: BasisTheoryElementsInternal;
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
33
|
export { algorithm };
|
|
35
|
-
export type { InitStatus, Clients, ClientsBasePathMap, Providers, Algorithm, EncryptionProviderOptions, EncryptionOptions, BasisTheoryInitOptions,
|
|
34
|
+
export type { InitStatus, Clients, ClientsBasePathMap, Providers, Algorithm, EncryptionProviderOptions, EncryptionOptions, BasisTheoryInitOptions, BasisTheoryInitOptionsWithoutElements, BasisTheoryInitOptionsWithElements, };
|
package/applications/types.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { PaginatedQuery } from '../service';
|
|
2
|
-
import type { Auditable } from '../types';
|
|
3
|
-
declare const APPLICATION_TYPES: readonly ["server_to_server", "public", "elements", "management"];
|
|
4
|
-
declare type ApplicationType = typeof APPLICATION_TYPES[number];
|
|
5
|
-
interface Application extends Auditable {
|
|
6
|
-
id: string;
|
|
7
|
-
tenantId: string;
|
|
8
|
-
name: string;
|
|
9
|
-
key?: string;
|
|
10
|
-
type: ApplicationType;
|
|
11
|
-
permissions: string[];
|
|
12
|
-
}
|
|
13
|
-
declare type CreateApplicationModel = Pick<Application, 'name' | 'type'> & Partial<Pick<Application, 'permissions'>>;
|
|
14
|
-
declare type UpdateApplicationModel = Partial<Pick<Application, 'name' | 'permissions'>>;
|
|
15
|
-
interface ApplicationQuery extends PaginatedQuery {
|
|
16
|
-
id?: string | string[];
|
|
17
|
-
}
|
|
18
|
-
export { APPLICATION_TYPES, ApplicationType, Application, CreateApplicationModel, UpdateApplicationModel, ApplicationQuery, };
|