@actual-app/api 4.1.6 → 5.1.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/app/bundle.api.js +33958 -25658
- package/app/bundle.api.js.map +1 -0
- package/index.js +3 -3
- package/methods.js +7 -2
- package/package.json +5 -2
package/index.js
CHANGED
|
@@ -4,14 +4,14 @@ let methods = require('./methods');
|
|
|
4
4
|
let utils = require('./utils');
|
|
5
5
|
let actualApp;
|
|
6
6
|
|
|
7
|
-
async function init(
|
|
7
|
+
async function init(config = {}) {
|
|
8
8
|
if (actualApp) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
global.fetch = require('node-fetch');
|
|
13
13
|
|
|
14
|
-
await bundle.init(
|
|
14
|
+
await bundle.init(config);
|
|
15
15
|
actualApp = bundle.lib;
|
|
16
16
|
|
|
17
17
|
injected.send = bundle.lib.send;
|
|
@@ -30,5 +30,5 @@ module.exports = {
|
|
|
30
30
|
shutdown,
|
|
31
31
|
utils,
|
|
32
32
|
internal: bundle.lib,
|
|
33
|
-
...methods
|
|
33
|
+
...methods,
|
|
34
34
|
};
|
package/methods.js
CHANGED
|
@@ -20,6 +20,10 @@ async function loadBudget(budgetId) {
|
|
|
20
20
|
return send('api/load-budget', { id: budgetId });
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
async function downloadBudget(syncId, { password } = {}) {
|
|
24
|
+
return send('api/download-budget', { syncId, password });
|
|
25
|
+
}
|
|
26
|
+
|
|
23
27
|
async function batchBudgetUpdates(func) {
|
|
24
28
|
await send('api/batch-budget-start');
|
|
25
29
|
try {
|
|
@@ -89,7 +93,7 @@ function closeAccount(id, transferAccountId, transferCategoryId) {
|
|
|
89
93
|
return send('api/account-close', {
|
|
90
94
|
id,
|
|
91
95
|
transferAccountId,
|
|
92
|
-
transferCategoryId
|
|
96
|
+
transferCategoryId,
|
|
93
97
|
});
|
|
94
98
|
}
|
|
95
99
|
|
|
@@ -172,6 +176,7 @@ module.exports = {
|
|
|
172
176
|
q,
|
|
173
177
|
|
|
174
178
|
loadBudget,
|
|
179
|
+
downloadBudget,
|
|
175
180
|
batchBudgetUpdates,
|
|
176
181
|
getBudgetMonths,
|
|
177
182
|
getBudgetMonth,
|
|
@@ -207,5 +212,5 @@ module.exports = {
|
|
|
207
212
|
getPayeeRules,
|
|
208
213
|
createPayeeRule,
|
|
209
214
|
deletePayeeRule,
|
|
210
|
-
updatePayeeRule
|
|
215
|
+
updatePayeeRule,
|
|
211
216
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actual-app/api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "An API for Actual",
|
|
6
6
|
"main": "index.js",
|
|
@@ -13,8 +13,11 @@
|
|
|
13
13
|
"migrations",
|
|
14
14
|
"utils.js"
|
|
15
15
|
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "yarn workspace loot-core build:api"
|
|
18
|
+
},
|
|
16
19
|
"dependencies": {
|
|
17
|
-
"better-sqlite3": "^
|
|
20
|
+
"better-sqlite3": "^8.2.0",
|
|
18
21
|
"node-fetch": "^2.6.9",
|
|
19
22
|
"uuid": "3.3.2"
|
|
20
23
|
}
|