bkper 2.6.3 → 2.7.1
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 -9
- package/lib/index.d.ts +8 -0
- package/lib/model/Transaction.js +11 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ It also provide a **command line** utility to create and update [Bkper Apps and
|
|
|
8
8
|
|
|
9
9
|
## Instalation
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Add the package:
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
npm i -S bkper
|
|
@@ -22,21 +22,33 @@ yarn add bkper
|
|
|
22
22
|
|
|
23
23
|
- ```login``` - Logs the user in. Saves the client credentials to a ```~/.bkper-credentials.json``` file.
|
|
24
24
|
- ```logout``` - Logs out the user by deleting client credentials.
|
|
25
|
-
- ```app -c``` - Create a new App based on ```./bkperapp.json``` file
|
|
26
|
-
- ```app -u``` - Update an existing App based on ```./bkperapp.json``` file
|
|
25
|
+
- ```app -c``` - Create a new App based on ```./bkperapp.json``` file.
|
|
26
|
+
- ```app -u``` - Update an existing App based on ```./bkperapp.json``` file.
|
|
27
27
|
|
|
28
|
-
###
|
|
28
|
+
### Examples
|
|
29
|
+
```
|
|
30
|
+
npm bkper login
|
|
31
|
+
```
|
|
32
|
+
```
|
|
33
|
+
yarn bkper login
|
|
34
|
+
```
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
### Environment Variables
|
|
37
|
+
The following environment variable is necessary in order to communicate with the Bkper REST API:
|
|
31
38
|
|
|
32
39
|
```
|
|
33
40
|
BKPER_API_KEY=XXXX
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The ```app``` command also uses the following variables in order to perform App create/update operations:
|
|
44
|
+
|
|
45
|
+
```
|
|
34
46
|
BKPER_CLIENT_SECRET=YYYY
|
|
35
47
|
BKPER_USER_EMAILS="someone@gmail.com anotherone@altrostat.com"
|
|
36
48
|
BKPER_DEVELOPER_EMAIL=somedeveloer@mycompany.com
|
|
37
49
|
```
|
|
38
50
|
|
|
39
|
-
You can add a ```.env``` file at the root of your project with those variables and bkper will automatically load from it.
|
|
51
|
+
You can add a ```.env``` file at the root of your project with those variables and bkper will automatically load from it. Follow [these](https://bkper.com/docs/#rest-api-enabling) steps in order to configure a valid Bkper API key.
|
|
40
52
|
|
|
41
53
|
> WARNING: Never upload variables to the source code repository.
|
|
42
54
|
|
|
@@ -45,6 +57,3 @@ You can add a ```.env``` file at the root of your project with those variables a
|
|
|
45
57
|
- [Developer Docs](https://bkper.com/docs)
|
|
46
58
|
- [API Reference](https://bkper.com/docs/bkper-node/)
|
|
47
59
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
package/lib/index.d.ts
CHANGED
|
@@ -1388,6 +1388,14 @@ export declare class Transaction {
|
|
|
1388
1388
|
* @returns True if transaction is checked.
|
|
1389
1389
|
*/
|
|
1390
1390
|
isChecked(): boolean;
|
|
1391
|
+
/**
|
|
1392
|
+
* Set the check state of the Transaction.
|
|
1393
|
+
*
|
|
1394
|
+
* @param checked - The check state.
|
|
1395
|
+
*
|
|
1396
|
+
* @returns This Transaction, for chainning.
|
|
1397
|
+
*/
|
|
1398
|
+
setChecked(checked: boolean): Transaction;
|
|
1391
1399
|
/**
|
|
1392
1400
|
* @returns True if transaction is in trash.
|
|
1393
1401
|
*/
|
package/lib/model/Transaction.js
CHANGED
|
@@ -98,6 +98,17 @@ class Transaction {
|
|
|
98
98
|
isChecked() {
|
|
99
99
|
return this.wrapped.checked;
|
|
100
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Set the check state of the Transaction.
|
|
103
|
+
*
|
|
104
|
+
* @param checked - The check state.
|
|
105
|
+
*
|
|
106
|
+
* @returns This Transaction, for chainning.
|
|
107
|
+
*/
|
|
108
|
+
setChecked(checked) {
|
|
109
|
+
this.wrapped.checked = checked;
|
|
110
|
+
return this;
|
|
111
|
+
}
|
|
101
112
|
/**
|
|
102
113
|
* @returns True if transaction is in trash.
|
|
103
114
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bkper",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "Node.js client for Bkper REST API",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"open": "^7.3.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@bkper/bkper-api-types": "^5.
|
|
49
|
+
"@bkper/bkper-api-types": "^5.9.0",
|
|
50
50
|
"@microsoft/api-extractor": "^7.12.1",
|
|
51
51
|
"@types/big.js": "^6.0.2",
|
|
52
52
|
"@types/chai": "^4.2.14",
|