@basis-theory/basis-theory-js 2.2.0 → 2.3.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
CHANGED
|
@@ -33,6 +33,10 @@ export declare class BasisTheory implements BasisTheoryInit, IBasisTheory, Basis
|
|
|
33
33
|
get client(): HttpClient | undefined;
|
|
34
34
|
get tenants(): Tenants;
|
|
35
35
|
get logs(): Logs;
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Reactor Formulas are now deprecated and will be removed in a future release.
|
|
38
|
+
* @description We have introduced a `code` property for Reactors to replace Formula's code. For more details visit [our API reference](https://developers.basistheory.com/docs/api/reactors#create-reactor).
|
|
39
|
+
*/
|
|
36
40
|
get reactorFormulas(): ReactorFormulas;
|
|
37
41
|
get reactors(): Reactors;
|
|
38
42
|
get permissions(): Permissions;
|
package/BasisTheory.js
CHANGED
|
@@ -204,6 +204,11 @@ class BasisTheory {
|
|
|
204
204
|
get logs() {
|
|
205
205
|
return (0, _common.assertInit)(this._logs);
|
|
206
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* @deprecated Reactor Formulas are now deprecated and will be removed in a future release.
|
|
209
|
+
* @description We have introduced a `code` property for Reactors to replace Formula's code. For more details visit [our API reference](https://developers.basistheory.com/docs/api/reactors#create-reactor).
|
|
210
|
+
*/
|
|
211
|
+
|
|
207
212
|
|
|
208
213
|
get reactorFormulas() {
|
|
209
214
|
return (0, _common.assertInit)(this._reactorFormulas);
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ For a complete list of endpoints and examples, please refer to our [API docs](ht
|
|
|
31
31
|
```javascript
|
|
32
32
|
import { BasisTheory } from '@basis-theory/basis-theory-js';
|
|
33
33
|
|
|
34
|
-
const bt = await new BasisTheory().init('
|
|
34
|
+
const bt = await new BasisTheory().init('<API Key>'); // replace with your application key
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### Per-request configuration
|
|
@@ -45,7 +45,7 @@ import { v4 as uuid } from 'uuid';
|
|
|
45
45
|
await bt.applications.list(
|
|
46
46
|
{},
|
|
47
47
|
{
|
|
48
|
-
apiKey: '
|
|
48
|
+
apiKey: '<Management API Key>',
|
|
49
49
|
correlationId: 'aa5d3379-6385-4ef4-9fdb-ca1341572153',
|
|
50
50
|
idempotencyKey: 'bb5d3379-6385-4ef4-9fdb-ca1341572154',
|
|
51
51
|
}
|
|
@@ -57,7 +57,7 @@ await bt.tokens.create(
|
|
|
57
57
|
data: "Sensitive Value",
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
apiKey: '
|
|
60
|
+
apiKey: '<API Key>',
|
|
61
61
|
correlationId: 'aa5d3379-6385-4ef4-9fdb-ca1341572153',
|
|
62
62
|
idempotencyKey: 'bb5d3379-6385-4ef4-9fdb-ca1341572154',
|
|
63
63
|
transactionId: 'cc5d3379-3921-4ef4-9fdb-ca1341572169',
|
|
@@ -72,7 +72,7 @@ You can set a custom API Url to be used across all clients when creating a new S
|
|
|
72
72
|
```javascript
|
|
73
73
|
import { BasisTheory } from '@basis-theory/basis-theory-js';
|
|
74
74
|
|
|
75
|
-
const bt = await new BasisTheory().init('
|
|
75
|
+
const bt = await new BasisTheory().init('<API Key>', {
|
|
76
76
|
apiBaseUrl: 'https://api.somedomain.com',
|
|
77
77
|
}); // replace with your application key and api base URL.
|
|
78
78
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basis-theory/basis-theory-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"repository": "https://github.com/Basis-Theory/basis-theory-js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"tar": "^4.4.19",
|
|
36
36
|
"minimist": "^1.2.6",
|
|
37
37
|
"json-schema": "^0.4.0",
|
|
38
|
-
"terser": "^5.14.2"
|
|
38
|
+
"terser": "^5.14.2",
|
|
39
|
+
"word-wrap": "^1.2.5"
|
|
39
40
|
},
|
|
40
41
|
"engines": {
|
|
41
42
|
"node": ">=10.12.0"
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { Auditable } from './shared';
|
|
2
2
|
type FormulaType = 'official' | 'private';
|
|
3
3
|
type DataType = 'string' | 'boolean' | 'number';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Reactor Formulas are now deprecated and will be removed in a future release.
|
|
6
|
+
* @description We have introduced a `code` property for Reactors to replace Formula's code. For more details visit [our API reference](https://developers.basistheory.com/docs/api/reactors#create-reactor).
|
|
7
|
+
*/
|
|
4
8
|
interface ReactorFormula extends Auditable {
|
|
5
9
|
id: string;
|
|
6
10
|
name: string;
|
|
@@ -22,5 +26,9 @@ interface ReactorFormulaRequestParam {
|
|
|
22
26
|
type: DataType;
|
|
23
27
|
optional?: boolean;
|
|
24
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Reactor Formulas are now deprecated and will be removed in a future release.
|
|
31
|
+
* @description We have introduced a `code` property for Reactors to replace Formula's code. For more details visit [our API reference](https://developers.basistheory.com/docs/api/reactors#create-reactor).
|
|
32
|
+
*/
|
|
25
33
|
type CreateReactorFormula = Omit<ReactorFormula, 'id' | 'createdAt' | 'createdBy' | 'modifiedAt' | 'modifiedBy'>;
|
|
26
34
|
export type { FormulaType, DataType, ReactorFormula, ReactorFormulaConfig, ReactorFormulaRequestParam, CreateReactorFormula, };
|
|
@@ -6,15 +6,20 @@ interface Reactor extends Auditable {
|
|
|
6
6
|
id: string;
|
|
7
7
|
tenantId: string;
|
|
8
8
|
name: string;
|
|
9
|
-
formula: ReactorFormula;
|
|
10
9
|
application?: Application;
|
|
10
|
+
code?: string;
|
|
11
11
|
configuration?: Record<string, string>;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Reactor Formulas are now deprecated and will be removed in a future release.
|
|
14
|
+
* @description We have introduced a `code` property for Reactors to replace Formula's code. For more details visit [our API reference](https://developers.basistheory.com/docs/api/reactors#create-reactor).
|
|
15
|
+
*/
|
|
16
|
+
formula?: ReactorFormula;
|
|
12
17
|
}
|
|
13
18
|
type CreateReactor = Pick<Reactor, 'name' | 'configuration'> & {
|
|
14
|
-
|
|
19
|
+
code?: string;
|
|
15
20
|
application?: Pick<Application, 'id'>;
|
|
16
21
|
};
|
|
17
|
-
type UpdateReactor = Pick<Reactor, 'name' | 'configuration'> & {
|
|
22
|
+
type UpdateReactor = Pick<Reactor, 'name' | 'configuration' | 'code'> & {
|
|
18
23
|
application?: Pick<Application, 'id'>;
|
|
19
24
|
};
|
|
20
25
|
type PatchReactor = Omit<Partial<UpdateReactor>, 'configuration'> & {
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import type { CreateReactorFormula, ReactorFormula } from '../../../types/models';
|
|
2
2
|
import type { Create, Delete, List, PaginatedQuery, Retrieve, Update } from './shared';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Reactor Formulas are now deprecated and will be removed in a future release.
|
|
5
|
+
* @description We have introduced a `code` property for Reactors to replace Formula's code. For more details visit [our API reference](https://developers.basistheory.com/docs/api/reactors#create-reactor).
|
|
6
|
+
*/
|
|
3
7
|
interface ListReactorFormulaQuery extends PaginatedQuery {
|
|
4
8
|
name?: string;
|
|
5
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Reactor Formulas are now deprecated and will be removed in a future release.
|
|
12
|
+
* @description We have introduced a `code` property for Reactors to replace Formula's code. For more details visit [our API reference](https://developers.basistheory.com/docs/api/reactors#create-reactor).
|
|
13
|
+
*/
|
|
6
14
|
interface ReactorFormulas extends Create<ReactorFormula, CreateReactorFormula>, Retrieve<ReactorFormula>, Update<ReactorFormula, CreateReactorFormula>, Delete, List<ReactorFormula, ListReactorFormulaQuery> {
|
|
7
15
|
}
|
|
8
16
|
export type { ListReactorFormulaQuery, ReactorFormulas };
|