@actual-app/api 24.12.0 → 25.2.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/@types/loot-core/client/constants.d.ts +0 -11
- package/@types/loot-core/client/state-types/index.d.ts +0 -14
- package/@types/loot-core/client/state-types/modals.d.ts +57 -2
- package/@types/loot-core/mocks/index.d.ts +9 -20
- package/@types/loot-core/platform/client/fetch/index.d.ts +10 -1
- package/@types/loot-core/platform/client/undo/index.d.ts +8 -4
- package/@types/loot-core/platform/server/connection/index.d.ts +1 -1
- package/@types/loot-core/server/accounts/sync.d.ts +1 -1
- package/@types/loot-core/server/accounts/transaction-rules.d.ts +4 -6
- package/@types/loot-core/server/accounts/transactions.d.ts +0 -3
- package/@types/loot-core/server/accounts/transfer.d.ts +0 -11
- package/@types/loot-core/server/admin/app.d.ts +17 -0
- package/@types/loot-core/server/admin/types/handlers.d.ts +43 -0
- package/@types/loot-core/server/app.d.ts +14 -4
- package/@types/loot-core/server/aql/compiler.d.ts +4 -6
- package/@types/loot-core/server/aql/schema/index.d.ts +3 -0
- package/@types/loot-core/server/budget/actions.d.ts +6 -0
- package/@types/loot-core/server/budget/app.d.ts +10 -5
- package/@types/loot-core/server/budget/categoryTemplate.d.ts +3 -2
- package/@types/loot-core/server/budget/goalsSchedule.d.ts +7 -5
- package/@types/loot-core/server/budget/types/handlers.d.ts +4 -0
- package/@types/loot-core/server/cloud-storage.d.ts +9 -0
- package/@types/loot-core/server/dashboard/app.d.ts +9 -4
- package/@types/loot-core/server/db/index.d.ts +1 -0
- package/@types/loot-core/server/filters/app.d.ts +9 -4
- package/@types/loot-core/server/importers/ynab4-types.d.ts +0 -2
- package/@types/loot-core/server/importers/ynab5-types.d.ts +0 -2
- package/@types/loot-core/server/main-app.d.ts +10 -5
- package/@types/loot-core/server/main.d.ts +2 -2
- package/@types/loot-core/server/notes/app.d.ts +9 -4
- package/@types/loot-core/server/post.d.ts +2 -0
- package/@types/loot-core/server/preferences/app.d.ts +9 -4
- package/@types/loot-core/server/reports/app.d.ts +11 -4
- package/@types/loot-core/server/rules/app.d.ts +9 -4
- package/@types/loot-core/server/rules/types/handlers.d.ts +4 -4
- package/@types/loot-core/server/schedules/app.d.ts +10 -7
- package/@types/loot-core/server/schedules/types/handlers.d.ts +5 -5
- package/@types/loot-core/server/tools/app.d.ts +9 -4
- package/@types/loot-core/server/tools/types/handlers.d.ts +4 -0
- package/@types/loot-core/server/util/budget-name.d.ts +6 -2
- package/@types/loot-core/shared/errors.d.ts +3 -0
- package/@types/loot-core/shared/query.d.ts +13 -12
- package/@types/loot-core/shared/schedules.d.ts +5 -31
- package/@types/loot-core/shared/transactions.d.ts +101 -17
- package/@types/loot-core/shared/util.d.ts +30 -10
- package/@types/loot-core/types/api-handlers.d.ts +3 -0
- package/@types/loot-core/types/budget.d.ts +1 -0
- package/@types/loot-core/types/file.d.ts +7 -0
- package/@types/loot-core/types/handlers.d.ts +2 -0
- package/@types/loot-core/types/models/dashboard.d.ts +13 -2
- package/@types/loot-core/types/models/index.d.ts +1 -0
- package/@types/loot-core/types/models/openid.d.ts +7 -0
- package/@types/loot-core/types/models/payee.d.ts +1 -0
- package/@types/loot-core/types/models/reports.d.ts +4 -0
- package/@types/loot-core/types/models/rule.d.ts +11 -5
- package/@types/loot-core/types/models/schedule.d.ts +5 -18
- package/@types/loot-core/types/models/simplefin.d.ts +2 -0
- package/@types/loot-core/types/models/transaction.d.ts +6 -0
- package/@types/loot-core/types/models/user.d.ts +26 -0
- package/@types/loot-core/types/models/userAccess.d.ts +9 -0
- package/@types/loot-core/types/prefs.d.ts +7 -3
- package/@types/loot-core/types/server-events.d.ts +80 -17
- package/@types/loot-core/types/server-handlers.d.ts +106 -17
- package/@types/loot-core/types/util.d.ts +5 -0
- package/@types/methods.d.ts +4 -4
- package/dist/app/bundle.api.js +1804 -916
- package/dist/methods.js +8 -2
- package/dist/migrations/1736640000000__custom_report_sorting.sql +7 -0
- package/dist/migrations/1737158400000_add_learn_categories_to_payees.sql +5 -0
- package/dist/migrations/1738491452000__sorting_rename.sql +13 -0
- package/dist/package.json +2 -2
- package/package.json +2 -2
- package/@types/loot-core/client/actions/types.d.ts +0 -6
- package/@types/loot-core/client/state-types/account.d.ts +0 -27
- package/@types/loot-core/client/state-types/app.d.ts +0 -37
- package/@types/loot-core/client/state-types/queries.d.ts +0 -76
package/dist/methods.js
CHANGED
|
@@ -133,8 +133,14 @@ function addTransactions(accountId, transactions, { learnCategories = false, run
|
|
|
133
133
|
runTransfers,
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
-
function importTransactions(accountId, transactions
|
|
137
|
-
|
|
136
|
+
function importTransactions(accountId, transactions, opts = {
|
|
137
|
+
defaultCleared: true,
|
|
138
|
+
}) {
|
|
139
|
+
return send('api/transactions-import', {
|
|
140
|
+
accountId,
|
|
141
|
+
transactions,
|
|
142
|
+
opts,
|
|
143
|
+
});
|
|
138
144
|
}
|
|
139
145
|
function getTransactions(accountId, startDate, endDate) {
|
|
140
146
|
return send('api/transactions-get', { accountId, startDate, endDate });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
BEGIN TRANSACTION;
|
|
2
|
+
|
|
3
|
+
ALTER TABLE custom_reports RENAME COLUMN sort_by TO sort_by_old;
|
|
4
|
+
ALTER TABLE custom_reports ADD COLUMN sort_by TEXT DEFAULT 'desc';
|
|
5
|
+
|
|
6
|
+
UPDATE custom_reports SET sort_by = 'desc' where sort_by_old = 'Descending';
|
|
7
|
+
UPDATE custom_reports SET sort_by = 'asc' where sort_by_old = 'Ascending';
|
|
8
|
+
UPDATE custom_reports SET sort_by = 'budget' where sort_by_old = 'Budget';
|
|
9
|
+
UPDATE custom_reports SET sort_by = 'name' where sort_by_old = 'Name';
|
|
10
|
+
|
|
11
|
+
ALTER TABLE custom_reports DROP COLUMN sort_by_old;
|
|
12
|
+
|
|
13
|
+
COMMIT;
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actual-app/api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "An API for Actual",
|
|
6
6
|
"engines": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@actual-app/crdt": "workspace:^",
|
|
26
|
-
"better-sqlite3": "^
|
|
26
|
+
"better-sqlite3": "^11.7.0",
|
|
27
27
|
"compare-versions": "^6.1.0",
|
|
28
28
|
"node-fetch": "^3.3.2",
|
|
29
29
|
"uuid": "^9.0.1"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actual-app/api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "An API for Actual",
|
|
6
6
|
"engines": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@actual-app/crdt": "^2.1.0",
|
|
26
|
-
"better-sqlite3": "^
|
|
26
|
+
"better-sqlite3": "^11.7.0",
|
|
27
27
|
"compare-versions": "^6.1.0",
|
|
28
28
|
"node-fetch": "^3.3.2",
|
|
29
29
|
"uuid": "^9.0.1"
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type * as constants from '../constants';
|
|
2
|
-
|
|
3
|
-
export type AccountState = {
|
|
4
|
-
failedAccounts: Map<string, { type: string; code: string }>;
|
|
5
|
-
accountsSyncing: string[];
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export type SetAccountsSyncingAction = {
|
|
9
|
-
type: typeof constants.SET_ACCOUNTS_SYNCING;
|
|
10
|
-
ids: string[];
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export type AccountSyncStatusAction = {
|
|
14
|
-
type: typeof constants.ACCOUNT_SYNC_STATUS;
|
|
15
|
-
id: string;
|
|
16
|
-
} & (
|
|
17
|
-
| {
|
|
18
|
-
failed: false;
|
|
19
|
-
}
|
|
20
|
-
| {
|
|
21
|
-
failed: true;
|
|
22
|
-
errorType: string;
|
|
23
|
-
errorCode: string;
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
export type AccountActions = SetAccountsSyncingAction | AccountSyncStatusAction;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { UndoState } from '../../server/undo';
|
|
2
|
-
import type * as constants from '../constants';
|
|
3
|
-
|
|
4
|
-
export type SplitState = { ids: Set<string>; mode: 'collapse' | 'expand' };
|
|
5
|
-
|
|
6
|
-
export type AppState = {
|
|
7
|
-
loadingText: string | null;
|
|
8
|
-
updateInfo: {
|
|
9
|
-
version: string;
|
|
10
|
-
releaseDate: string;
|
|
11
|
-
releaseNotes: string;
|
|
12
|
-
} | null;
|
|
13
|
-
showUpdateNotification: boolean;
|
|
14
|
-
managerHasInitialized: boolean;
|
|
15
|
-
lastUndoState: { current: UndoState | null };
|
|
16
|
-
lastSplitState: { current: SplitState | null };
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type SetAppStateAction = {
|
|
20
|
-
type: typeof constants.SET_APP_STATE;
|
|
21
|
-
state: Partial<AppState>;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type SetLastUndoStateAction = {
|
|
25
|
-
type: typeof constants.SET_LAST_UNDO_STATE;
|
|
26
|
-
undoState: UndoState | null;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export type SetLastSplitStateAction = {
|
|
30
|
-
type: typeof constants.SET_LAST_SPLIT_STATE;
|
|
31
|
-
splitState: SplitState | null;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export type AppActions =
|
|
35
|
-
| SetAppStateAction
|
|
36
|
-
| SetLastUndoStateAction
|
|
37
|
-
| SetLastSplitStateAction;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type { Handlers } from '../../types/handlers';
|
|
2
|
-
import { type TransactionEntity, type AccountEntity } from '../../types/models';
|
|
3
|
-
import type * as constants from '../constants';
|
|
4
|
-
|
|
5
|
-
export type QueriesState = {
|
|
6
|
-
newTransactions: Array<TransactionEntity['id']>;
|
|
7
|
-
matchedTransactions: Array<TransactionEntity['id']>;
|
|
8
|
-
lastTransaction: TransactionEntity | null;
|
|
9
|
-
updatedAccounts: Array<AccountEntity['id']>;
|
|
10
|
-
accounts: AccountEntity[];
|
|
11
|
-
accountsLoaded: boolean;
|
|
12
|
-
categories: Awaited<ReturnType<Handlers['get-categories']>>;
|
|
13
|
-
categoriesLoaded: boolean;
|
|
14
|
-
commonPayeesLoaded: boolean;
|
|
15
|
-
commonPayees: Awaited<ReturnType<Handlers['common-payees-get']>>;
|
|
16
|
-
payees: Awaited<ReturnType<Handlers['payees-get']>>;
|
|
17
|
-
payeesLoaded: boolean;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
type SetNewTransactionsAction = {
|
|
21
|
-
type: typeof constants.SET_NEW_TRANSACTIONS;
|
|
22
|
-
newTransactions?: Array<TransactionEntity['id']>;
|
|
23
|
-
matchedTransactions?: Array<TransactionEntity['id']>;
|
|
24
|
-
updatedAccounts?: Array<AccountEntity['id']>;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
type UpdateNewTransactionsAction = {
|
|
28
|
-
type: typeof constants.UPDATE_NEW_TRANSACTIONS;
|
|
29
|
-
changedId: string;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
type SetLastTransactionAction = {
|
|
33
|
-
type: typeof constants.SET_LAST_TRANSACTION;
|
|
34
|
-
transaction: TransactionEntity;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
type MarkAccountReadAction = {
|
|
38
|
-
type: typeof constants.MARK_ACCOUNT_READ;
|
|
39
|
-
accountId: string;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
type LoadAccountsAction = {
|
|
43
|
-
type: typeof constants.LOAD_ACCOUNTS;
|
|
44
|
-
accounts: AccountEntity[];
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
type UpdateAccountAction = {
|
|
48
|
-
type: typeof constants.UPDATE_ACCOUNT;
|
|
49
|
-
account: AccountEntity;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
type LoadCategoriesAction = {
|
|
53
|
-
type: typeof constants.LOAD_CATEGORIES;
|
|
54
|
-
categories: State['categories'];
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
type LoadPayeesAction = {
|
|
58
|
-
type: typeof constants.LOAD_PAYEES;
|
|
59
|
-
payees: State['payees'];
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
type LoadCommonPayeesAction = {
|
|
63
|
-
type: typeof constants.LOAD_COMMON_PAYEES;
|
|
64
|
-
payees: State['common_payees'];
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export type QueriesActions =
|
|
68
|
-
| SetNewTransactionsAction
|
|
69
|
-
| UpdateNewTransactionsAction
|
|
70
|
-
| SetLastTransactionAction
|
|
71
|
-
| MarkAccountReadAction
|
|
72
|
-
| LoadAccountsAction
|
|
73
|
-
| UpdateAccountAction
|
|
74
|
-
| LoadCategoriesAction
|
|
75
|
-
| LoadCommonPayeesAction
|
|
76
|
-
| LoadPayeesAction;
|