bkper 3.3.0 → 3.3.2
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 +86 -105
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,8 +32,8 @@ yarn global add bkper
|
|
|
32
32
|
|
|
33
33
|
- ```login``` - Logs the user in. Saves the client credentials to a ```~/.bkper-credentials.json``` file.
|
|
34
34
|
- ```logout``` - Logs out the user by deleting client credentials.
|
|
35
|
-
- ```app -c``` - Create a new App based on ```./bkperapp.
|
|
36
|
-
- ```app -u``` - Update an existing App based on ```./bkperapp.
|
|
35
|
+
- ```app -c``` - Create a new App based on ```./bkperapp.yaml``` file.
|
|
36
|
+
- ```app -u``` - Update an existing App based on ```./bkperapp.yaml``` file.
|
|
37
37
|
|
|
38
38
|
### Examples
|
|
39
39
|
```
|
|
@@ -64,113 +64,82 @@ Follow [these](https://bkper.com/docs/#rest-api-enabling) steps in order to conf
|
|
|
64
64
|
> WARNING: Never upload variables to the source code repository.
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
### ```./bkperapp.
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
"
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
"group": {
|
|
139
|
-
"keys": [
|
|
140
|
-
"key1",
|
|
141
|
-
"key2"
|
|
142
|
-
],
|
|
143
|
-
"values": [
|
|
144
|
-
"value2",
|
|
145
|
-
"value2"
|
|
146
|
-
]
|
|
147
|
-
},
|
|
148
|
-
"account": {
|
|
149
|
-
"keys": [
|
|
150
|
-
"key1",
|
|
151
|
-
"key2"
|
|
152
|
-
],
|
|
153
|
-
"values": [
|
|
154
|
-
"value2",
|
|
155
|
-
"value2"
|
|
156
|
-
]
|
|
157
|
-
},
|
|
158
|
-
"transaction": {
|
|
159
|
-
"keys": [
|
|
160
|
-
"key1",
|
|
161
|
-
"key2"
|
|
162
|
-
],
|
|
163
|
-
"values": [
|
|
164
|
-
"value2",
|
|
165
|
-
"value2"
|
|
166
|
-
]
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
67
|
+
### ```./bkperapp.yaml``` Reference
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
id: "The App agent id. It can NOT be changed after the App created."
|
|
71
|
+
name: "The name of the App or Bot."
|
|
72
|
+
logoUrl: "Set your logo url from public host. Best fit 200x200 px. Use https://"
|
|
73
|
+
|
|
74
|
+
# Context menu configuration
|
|
75
|
+
menuUrl: "The menu url to open in the popup window. See reference bellow."
|
|
76
|
+
menuUrlDev: "The menu url to open in the popup window, when opened by the developer user."
|
|
77
|
+
menuText: "The context menu call to action."
|
|
78
|
+
menuPopupWidth: 500 # width in pixels. Default to 80% of screen width.
|
|
79
|
+
menuPopupHeight: 300 # height in pixels. Default to 90% of screen height.
|
|
80
|
+
|
|
81
|
+
# Bot events configuration
|
|
82
|
+
events:
|
|
83
|
+
- "TRANSACTION_POSTED"
|
|
84
|
+
- "TRANSACTION_CHECKED"
|
|
85
|
+
- "TRANSACTION_UNCHECKED"
|
|
86
|
+
- "TRANSACTION_UPDATED"
|
|
87
|
+
- "TRANSACTION_DELETED"
|
|
88
|
+
- "TRANSACTION_RESTORED"
|
|
89
|
+
- "ACCOUNT_CREATED"
|
|
90
|
+
- "ACCOUNT_UPDATED"
|
|
91
|
+
- "ACCOUNT_DELETED"
|
|
92
|
+
- "GROUP_CREATED"
|
|
93
|
+
- "GROUP_UPDATED"
|
|
94
|
+
- "GROUP_DELETED"
|
|
95
|
+
- "FILE_CREATED"
|
|
96
|
+
- "BOOK_UPDATED"
|
|
97
|
+
|
|
98
|
+
filePatterns:
|
|
99
|
+
- "The file patterns the Bot is capable of process. It accepts wildcard. E.g."
|
|
100
|
+
- "radiusbank*.ofx"
|
|
101
|
+
- "-*.qif"
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
# Webhook bot configuration
|
|
105
|
+
webhookUrl: "The production webhook url"
|
|
106
|
+
webhookUrlDev: "The development webhook url"
|
|
107
|
+
|
|
108
|
+
# Schema to provide autocompletion
|
|
109
|
+
propertiesSchema:
|
|
110
|
+
book:
|
|
111
|
+
keys:
|
|
112
|
+
- "key1"
|
|
113
|
+
- "key2"
|
|
114
|
+
values:
|
|
115
|
+
- "value2"
|
|
116
|
+
- "value2"
|
|
117
|
+
group:
|
|
118
|
+
keys:
|
|
119
|
+
- "key1"
|
|
120
|
+
- "key2"
|
|
121
|
+
values:
|
|
122
|
+
- "value2"
|
|
123
|
+
- "value2"
|
|
124
|
+
account:
|
|
125
|
+
keys:
|
|
126
|
+
- "key1"
|
|
127
|
+
- "key2"
|
|
128
|
+
values:
|
|
129
|
+
- "value2"
|
|
130
|
+
- "value2"
|
|
131
|
+
transaction:
|
|
132
|
+
keys:
|
|
133
|
+
- "key1"
|
|
134
|
+
- "key2"
|
|
135
|
+
values:
|
|
136
|
+
- "value2"
|
|
137
|
+
- "value2"
|
|
170
138
|
|
|
171
139
|
```
|
|
172
140
|
|
|
173
141
|
#### Accepted expressions in menuUrl property:
|
|
142
|
+
|
|
174
143
|
- ```${book.id}``` - the current book id
|
|
175
144
|
- ```${book.properties.xxxxx}``` - any property value from the current book
|
|
176
145
|
- ```${transactions.query}``` - the current query being executed on transactions list
|
|
@@ -190,6 +159,18 @@ Follow [these](https://bkper.com/docs/#rest-api-enabling) steps in order to conf
|
|
|
190
159
|
|
|
191
160
|
The ```getOAuthToken``` returns a Promise that resolves to a valid OAuth token, to be used by the [```bkper-js```](https://github.com/bkper/bkper-js) library
|
|
192
161
|
|
|
162
|
+
Example:
|
|
163
|
+
|
|
164
|
+
```javascript
|
|
165
|
+
import { Bkper } from 'bkper-js';
|
|
166
|
+
import { getOAuthToken } from 'bkper';
|
|
167
|
+
|
|
168
|
+
Bkper.setConfig({
|
|
169
|
+
oauthTokenProvider: async () => getOAuthToken(),
|
|
170
|
+
})
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
|
|
193
174
|
|
|
194
175
|
## Documentation
|
|
195
176
|
|