@basis-theory/basis-theory-reactor-formulas-sdk-js 1.0.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/README.md +18 -0
- package/package.json +47 -0
- package/src/errors/AuthenticationError.js +9 -0
- package/src/errors/BadRequestError.js +9 -0
- package/src/errors/BasisTheoryReactorError.js +16 -0
- package/src/errors/InvalidCardError.js +9 -0
- package/src/errors/InvalidReactorFormulaError.js +9 -0
- package/src/errors/RateLimitError.js +9 -0
- package/src/errors/ReactorRuntimeError.js +9 -0
- package/src/errors/index.js +13 -0
- package/src/index.js +5 -0
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# basistheory-reactor-formulas-sdk-js
|
|
2
|
+
|
|
3
|
+
Javascript SDK for building Basis Theory reactor formulas
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Install the package:
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
yarn add @basis-theory/basis-theory-reactor-formulas-sdk-js
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Development
|
|
14
|
+
|
|
15
|
+
### Dependencies
|
|
16
|
+
|
|
17
|
+
- [NodeJS](https://nodejs.org/en/) >= 14.17.5
|
|
18
|
+
- [Yarn](https://classic.yarnpkg.com/en/docs/)
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@basis-theory/basis-theory-reactor-formulas-sdk-js",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Javascript SDK for building Basis Theory reactor formulas",
|
|
5
|
+
"repository": "https://github.com/Basis-Theory/basistheory-reactor-formulas-sdk-js",
|
|
6
|
+
"main": "src/index.js",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Basis Theory",
|
|
9
|
+
"email": "support@basistheory.com"
|
|
10
|
+
},
|
|
11
|
+
"license": "UNLICENSED",
|
|
12
|
+
"files": [
|
|
13
|
+
"src"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"lint": "eslint . --quiet --ignore-path .gitignore",
|
|
17
|
+
"release": "semantic-release",
|
|
18
|
+
"postinstall": "husky install"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@commitlint/cli": "^12.1.1",
|
|
22
|
+
"@commitlint/config-conventional": "^12.1.1",
|
|
23
|
+
"@semantic-release/changelog": "^5.0.1",
|
|
24
|
+
"@semantic-release/commit-analyzer": "^8.0.1",
|
|
25
|
+
"@semantic-release/git": "^9.0.0",
|
|
26
|
+
"@semantic-release/github": "^7.2.0",
|
|
27
|
+
"@semantic-release/npm": "^7.0.10",
|
|
28
|
+
"@semantic-release/release-notes-generator": "^9.0.1",
|
|
29
|
+
"eslint": "^7.32.0",
|
|
30
|
+
"eslint-config-standard": "^16.0.3",
|
|
31
|
+
"eslint-plugin-import": "^2.23.4",
|
|
32
|
+
"eslint-plugin-node": "^11.1.0",
|
|
33
|
+
"eslint-plugin-promise": "^5.1.0",
|
|
34
|
+
"eslint-config-prettier": "^8.3.0",
|
|
35
|
+
"eslint-plugin-prettier": "^3.4.0",
|
|
36
|
+
"husky": "^5.1.1",
|
|
37
|
+
"prettier": "^2.3.2",
|
|
38
|
+
"pretty-quick": "^3.1.0",
|
|
39
|
+
"semantic-release": "^17.3.9"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=14"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "restricted"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
class BasisTheoryReactorError extends Error {
|
|
2
|
+
constructor(message, status, data) {
|
|
3
|
+
super(message);
|
|
4
|
+
this.status = status;
|
|
5
|
+
this.data = data;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
toRFC7807() {
|
|
9
|
+
return {
|
|
10
|
+
title: this.message,
|
|
11
|
+
status: this.status,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports = BasisTheoryReactorError;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const AuthenticationError = require('./AuthenticationError');
|
|
2
|
+
const BadRequestError = require('./BadRequestError');
|
|
3
|
+
const InvalidCardError = require('./InvalidCardError');
|
|
4
|
+
const RateLimitError = require('./RateLimitError');
|
|
5
|
+
const ReactorRuntimeError = require('./ReactorRuntimeError');
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
AuthenticationError,
|
|
9
|
+
BadRequestError,
|
|
10
|
+
InvalidCardError,
|
|
11
|
+
RateLimitError,
|
|
12
|
+
ReactorRuntimeError,
|
|
13
|
+
};
|