@actual-app/api 25.4.0 → 25.5.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/app/bundle.api.d.ts +1 -5
- package/@types/loot-core/client/budgets/budgetsSlice.d.ts +6 -2
- package/@types/loot-core/client/modals/modalsSlice.d.ts +5 -1
- package/@types/loot-core/client/prefs/prefsSlice.d.ts +2 -8
- package/@types/loot-core/client/queries/queriesSlice.d.ts +1 -1
- package/@types/loot-core/client/users/usersSlice.d.ts +28 -12
- package/@types/loot-core/mocks/index.d.ts +5 -2
- package/@types/loot-core/mocks/util.d.ts +1 -0
- package/@types/loot-core/platform/server/asyncStorage/index.d.ts +7 -6
- package/@types/loot-core/platform/server/indexeddb/index.d.ts +15 -24
- package/@types/loot-core/server/accounts/sync.d.ts +1 -9
- package/@types/loot-core/server/api-models.d.ts +2 -10
- package/@types/loot-core/server/aql/schema/executors.d.ts +2 -0
- package/@types/loot-core/server/auth/app.d.ts +142 -0
- package/@types/loot-core/server/budget/base.d.ts +2 -1
- package/@types/loot-core/server/budget/envelope.d.ts +3 -0
- package/@types/loot-core/server/budget/report.d.ts +4 -1
- package/@types/loot-core/server/budgetfiles/app.d.ts +139 -0
- package/@types/loot-core/server/cloud-storage.d.ts +2 -2
- package/@types/loot-core/server/db/index.d.ts +3 -2
- package/@types/loot-core/server/encryption/app.d.ts +40 -0
- package/@types/loot-core/server/{encryption-internals.d.ts → encryption/encryption-internals.d.ts} +0 -1
- package/@types/loot-core/server/errors.d.ts +4 -0
- package/@types/loot-core/server/importers/index.d.ts +1 -2
- package/@types/loot-core/server/main-app.d.ts +1 -1
- package/@types/loot-core/server/reports/app.d.ts +2 -2
- package/@types/loot-core/server/spreadsheet/spreadsheet.d.ts +9 -2
- package/@types/loot-core/server/transactions/app.d.ts +4 -1
- package/@types/loot-core/server/transactions/import/ofx2json.d.ts +1 -0
- package/@types/loot-core/server/transactions/import/parse-file.d.ts +1 -0
- package/@types/loot-core/server/transactions/index.d.ts +1 -0
- package/@types/loot-core/server/transactions/merge.d.ts +2 -0
- package/@types/loot-core/server/transactions/transaction-rules.d.ts +1 -0
- package/@types/loot-core/server/transactions/transfer.d.ts +2 -2
- package/@types/loot-core/shared/errors.d.ts +4 -4
- package/@types/loot-core/types/api-handlers.d.ts +170 -183
- package/@types/loot-core/types/budget.d.ts +6 -6
- package/@types/loot-core/types/file.d.ts +23 -36
- package/@types/loot-core/types/handlers.d.ts +5 -21
- package/@types/loot-core/types/models/bank-sync.d.ts +10 -17
- package/@types/loot-core/types/models/category-group.d.ts +8 -13
- package/@types/loot-core/types/models/category.d.ts +7 -8
- package/@types/loot-core/types/models/dashboard.d.ts +43 -88
- package/@types/loot-core/types/models/gocardless.d.ts +56 -71
- package/@types/loot-core/types/models/note.d.ts +2 -2
- package/@types/loot-core/types/models/openid.d.ts +6 -6
- package/@types/loot-core/types/models/payee.d.ts +6 -7
- package/@types/loot-core/types/models/reports.d.ts +98 -118
- package/@types/loot-core/types/models/rule.d.ts +62 -161
- package/@types/loot-core/types/models/schedule.d.ts +36 -38
- package/@types/loot-core/types/models/simplefin.d.ts +13 -17
- package/@types/loot-core/types/models/transaction-filter.d.ts +5 -6
- package/@types/loot-core/types/models/transaction.d.ts +29 -30
- package/@types/loot-core/types/prefs.d.ts +2 -4
- package/@types/loot-core/types/server-events.d.ts +43 -68
- package/@types/loot-core/types/server-handlers.d.ts +26 -198
- package/@types/loot-core/types/util.d.ts +7 -18
- package/@types/methods.d.ts +1 -1
- package/@types/vitest.config.d.ts +7 -0
- package/dist/app/bundle.api.js +17541 -110891
- package/dist/package.json +5 -7
- package/dist/vitest.config.js +11 -0
- package/package.json +5 -7
- package/@types/jest.config.d.ts +0 -9
- package/@types/loot-core/client/accounts/accountsSlice.d.ts +0 -175
- package/@types/loot-core/server/backups.test.d.ts +0 -1
- package/@types/loot-core/server/encryption-internals.web.d.ts +0 -23
- package/@types/loot-core/server/encryption.test.d.ts +0 -1
- package/dist/jest.config.js +0 -22
- /package/@types/loot-core/server/{backups.d.ts → budgetfiles/backups.d.ts} +0 -0
- /package/@types/loot-core/server/{encryption.d.ts → encryption/index.d.ts} +0 -0
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actual-app/api",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "An API for Actual",
|
|
6
6
|
"engines": {
|
|
@@ -14,11 +14,12 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build:app": "yarn workspace loot-core build:api",
|
|
17
|
+
"build:crdt": "yarn workspace @actual-app/crdt build",
|
|
17
18
|
"build:node": "tsc --p tsconfig.dist.json && tsc-alias -p tsconfig.dist.json",
|
|
18
19
|
"build:migrations": "cp migrations/*.sql dist/migrations",
|
|
19
20
|
"build:default-db": "cp default-db.sqlite dist/",
|
|
20
21
|
"build": "yarn run clean && yarn run build:app && yarn run build:node && yarn run build:migrations && yarn run build:default-db",
|
|
21
|
-
"test": "yarn run build:app &&
|
|
22
|
+
"test": "yarn run build:app && yarn run build:crdt && vitest",
|
|
22
23
|
"clean": "rm -rf dist @types"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
@@ -29,12 +30,9 @@
|
|
|
29
30
|
"uuid": "^9.0.1"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@swc/core": "^1.5.3",
|
|
33
|
-
"@swc/jest": "^0.2.36",
|
|
34
|
-
"@types/jest": "^29.5.14",
|
|
35
33
|
"@types/uuid": "^9.0.8",
|
|
36
|
-
"jest": "^29.7.0",
|
|
37
34
|
"tsc-alias": "^1.8.11",
|
|
38
|
-
"typescript": "^5.8.2"
|
|
35
|
+
"typescript": "^5.8.2",
|
|
36
|
+
"vitest": "^3.0.2"
|
|
39
37
|
}
|
|
40
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actual-app/api",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "An API for Actual",
|
|
6
6
|
"engines": {
|
|
@@ -14,11 +14,12 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build:app": "yarn workspace loot-core build:api",
|
|
17
|
+
"build:crdt": "yarn workspace @actual-app/crdt build",
|
|
17
18
|
"build:node": "tsc --p tsconfig.dist.json && tsc-alias -p tsconfig.dist.json",
|
|
18
19
|
"build:migrations": "cp migrations/*.sql dist/migrations",
|
|
19
20
|
"build:default-db": "cp default-db.sqlite dist/",
|
|
20
21
|
"build": "yarn run clean && yarn run build:app && yarn run build:node && yarn run build:migrations && yarn run build:default-db",
|
|
21
|
-
"test": "yarn run build:app &&
|
|
22
|
+
"test": "yarn run build:app && yarn run build:crdt && vitest",
|
|
22
23
|
"clean": "rm -rf dist @types"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
@@ -29,12 +30,9 @@
|
|
|
29
30
|
"uuid": "^9.0.1"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@swc/core": "^1.5.3",
|
|
33
|
-
"@swc/jest": "^0.2.36",
|
|
34
|
-
"@types/jest": "^29.5.14",
|
|
35
33
|
"@types/uuid": "^9.0.8",
|
|
36
|
-
"jest": "^29.7.0",
|
|
37
34
|
"tsc-alias": "^1.8.11",
|
|
38
|
-
"typescript": "^5.8.2"
|
|
35
|
+
"typescript": "^5.8.2",
|
|
36
|
+
"vitest": "^3.0.2"
|
|
39
37
|
}
|
|
40
38
|
}
|
package/@types/jest.config.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export let moduleFileExtensions: string[];
|
|
2
|
-
export let testEnvironment: string;
|
|
3
|
-
export let testPathIgnorePatterns: string[];
|
|
4
|
-
export let watchPathIgnorePatterns: string[];
|
|
5
|
-
export let setupFilesAfterEnv: string[];
|
|
6
|
-
export let transformIgnorePatterns: string[];
|
|
7
|
-
export let transform: {
|
|
8
|
-
'^.+\\.(t|j)sx?$': string;
|
|
9
|
-
};
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { type SyncServerGoCardlessAccount, type AccountEntity, type SyncServerSimpleFinAccount, type SyncServerPluggyAiAccount } from '../../types/models';
|
|
2
|
-
import { type AppDispatch } from '../store';
|
|
3
|
-
type AccountState = {
|
|
4
|
-
failedAccounts: {
|
|
5
|
-
[key: AccountEntity['id']]: {
|
|
6
|
-
type: string;
|
|
7
|
-
code: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
accountsSyncing: Array<AccountEntity['id']>;
|
|
11
|
-
};
|
|
12
|
-
type SetAccountsSyncingPayload = {
|
|
13
|
-
ids: Array<AccountEntity['id']>;
|
|
14
|
-
};
|
|
15
|
-
type MarkAccountFailedPayload = {
|
|
16
|
-
id: AccountEntity['id'];
|
|
17
|
-
errorType: string;
|
|
18
|
-
errorCode: string;
|
|
19
|
-
};
|
|
20
|
-
type MarkAccountSuccessPayload = {
|
|
21
|
-
id: AccountEntity['id'];
|
|
22
|
-
};
|
|
23
|
-
type UnlinkAccountPayload = {
|
|
24
|
-
id: AccountEntity['id'];
|
|
25
|
-
};
|
|
26
|
-
export declare const unlinkAccount: import("@reduxjs/toolkit").AsyncThunk<void, UnlinkAccountPayload, {
|
|
27
|
-
state: import("../store").RootState;
|
|
28
|
-
dispatch: AppDispatch;
|
|
29
|
-
extra?: unknown;
|
|
30
|
-
rejectValue?: unknown;
|
|
31
|
-
serializedErrorType?: unknown;
|
|
32
|
-
pendingMeta?: unknown;
|
|
33
|
-
fulfilledMeta?: unknown;
|
|
34
|
-
rejectedMeta?: unknown;
|
|
35
|
-
}>;
|
|
36
|
-
type LinkAccountPayload = {
|
|
37
|
-
requisitionId: string;
|
|
38
|
-
account: SyncServerGoCardlessAccount;
|
|
39
|
-
upgradingId?: AccountEntity['id'] | undefined;
|
|
40
|
-
offBudget?: boolean | undefined;
|
|
41
|
-
};
|
|
42
|
-
export declare const linkAccount: import("@reduxjs/toolkit").AsyncThunk<void, LinkAccountPayload, {
|
|
43
|
-
state: import("../store").RootState;
|
|
44
|
-
dispatch: AppDispatch;
|
|
45
|
-
extra?: unknown;
|
|
46
|
-
rejectValue?: unknown;
|
|
47
|
-
serializedErrorType?: unknown;
|
|
48
|
-
pendingMeta?: unknown;
|
|
49
|
-
fulfilledMeta?: unknown;
|
|
50
|
-
rejectedMeta?: unknown;
|
|
51
|
-
}>;
|
|
52
|
-
type LinkAccountSimpleFinPayload = {
|
|
53
|
-
externalAccount: SyncServerSimpleFinAccount;
|
|
54
|
-
upgradingId?: AccountEntity['id'] | undefined;
|
|
55
|
-
offBudget?: boolean | undefined;
|
|
56
|
-
};
|
|
57
|
-
export declare const linkAccountSimpleFin: import("@reduxjs/toolkit").AsyncThunk<void, LinkAccountSimpleFinPayload, {
|
|
58
|
-
state: import("../store").RootState;
|
|
59
|
-
dispatch: AppDispatch;
|
|
60
|
-
extra?: unknown;
|
|
61
|
-
rejectValue?: unknown;
|
|
62
|
-
serializedErrorType?: unknown;
|
|
63
|
-
pendingMeta?: unknown;
|
|
64
|
-
fulfilledMeta?: unknown;
|
|
65
|
-
rejectedMeta?: unknown;
|
|
66
|
-
}>;
|
|
67
|
-
type LinkAccountPluggyAiPayload = {
|
|
68
|
-
externalAccount: SyncServerPluggyAiAccount;
|
|
69
|
-
upgradingId?: AccountEntity['id'];
|
|
70
|
-
offBudget?: boolean;
|
|
71
|
-
};
|
|
72
|
-
export declare const linkAccountPluggyAi: import("@reduxjs/toolkit").AsyncThunk<void, LinkAccountPluggyAiPayload, {
|
|
73
|
-
state: import("../store").RootState;
|
|
74
|
-
dispatch: AppDispatch;
|
|
75
|
-
extra?: unknown;
|
|
76
|
-
rejectValue?: unknown;
|
|
77
|
-
serializedErrorType?: unknown;
|
|
78
|
-
pendingMeta?: unknown;
|
|
79
|
-
fulfilledMeta?: unknown;
|
|
80
|
-
rejectedMeta?: unknown;
|
|
81
|
-
}>;
|
|
82
|
-
type SyncAccountsPayload = {
|
|
83
|
-
id?: AccountEntity['id'] | undefined;
|
|
84
|
-
};
|
|
85
|
-
export declare const syncAccounts: import("@reduxjs/toolkit").AsyncThunk<boolean, SyncAccountsPayload, {
|
|
86
|
-
state: import("../store").RootState;
|
|
87
|
-
dispatch: AppDispatch;
|
|
88
|
-
extra?: unknown;
|
|
89
|
-
rejectValue?: unknown;
|
|
90
|
-
serializedErrorType?: unknown;
|
|
91
|
-
pendingMeta?: unknown;
|
|
92
|
-
fulfilledMeta?: unknown;
|
|
93
|
-
rejectedMeta?: unknown;
|
|
94
|
-
}>;
|
|
95
|
-
type MoveAccountPayload = {
|
|
96
|
-
id: AccountEntity['id'];
|
|
97
|
-
targetId: AccountEntity['id'] | null;
|
|
98
|
-
};
|
|
99
|
-
export declare const moveAccount: import("@reduxjs/toolkit").AsyncThunk<void, MoveAccountPayload, {
|
|
100
|
-
state: import("../store").RootState;
|
|
101
|
-
dispatch: AppDispatch;
|
|
102
|
-
extra?: unknown;
|
|
103
|
-
rejectValue?: unknown;
|
|
104
|
-
serializedErrorType?: unknown;
|
|
105
|
-
pendingMeta?: unknown;
|
|
106
|
-
fulfilledMeta?: unknown;
|
|
107
|
-
rejectedMeta?: unknown;
|
|
108
|
-
}>;
|
|
109
|
-
export declare const name: "account", reducer: import("redux").Reducer<AccountState>, getInitialState: () => AccountState;
|
|
110
|
-
export declare const actions: {
|
|
111
|
-
linkAccount: import("@reduxjs/toolkit").AsyncThunk<void, LinkAccountPayload, {
|
|
112
|
-
state: import("../store").RootState;
|
|
113
|
-
dispatch: AppDispatch;
|
|
114
|
-
extra?: unknown;
|
|
115
|
-
rejectValue?: unknown;
|
|
116
|
-
serializedErrorType?: unknown;
|
|
117
|
-
pendingMeta?: unknown;
|
|
118
|
-
fulfilledMeta?: unknown;
|
|
119
|
-
rejectedMeta?: unknown;
|
|
120
|
-
}>;
|
|
121
|
-
linkAccountSimpleFin: import("@reduxjs/toolkit").AsyncThunk<void, LinkAccountSimpleFinPayload, {
|
|
122
|
-
state: import("../store").RootState;
|
|
123
|
-
dispatch: AppDispatch;
|
|
124
|
-
extra?: unknown;
|
|
125
|
-
rejectValue?: unknown;
|
|
126
|
-
serializedErrorType?: unknown;
|
|
127
|
-
pendingMeta?: unknown;
|
|
128
|
-
fulfilledMeta?: unknown;
|
|
129
|
-
rejectedMeta?: unknown;
|
|
130
|
-
}>;
|
|
131
|
-
linkAccountPluggyAi: import("@reduxjs/toolkit").AsyncThunk<void, LinkAccountPluggyAiPayload, {
|
|
132
|
-
state: import("../store").RootState;
|
|
133
|
-
dispatch: AppDispatch;
|
|
134
|
-
extra?: unknown;
|
|
135
|
-
rejectValue?: unknown;
|
|
136
|
-
serializedErrorType?: unknown;
|
|
137
|
-
pendingMeta?: unknown;
|
|
138
|
-
fulfilledMeta?: unknown;
|
|
139
|
-
rejectedMeta?: unknown;
|
|
140
|
-
}>;
|
|
141
|
-
moveAccount: import("@reduxjs/toolkit").AsyncThunk<void, MoveAccountPayload, {
|
|
142
|
-
state: import("../store").RootState;
|
|
143
|
-
dispatch: AppDispatch;
|
|
144
|
-
extra?: unknown;
|
|
145
|
-
rejectValue?: unknown;
|
|
146
|
-
serializedErrorType?: unknown;
|
|
147
|
-
pendingMeta?: unknown;
|
|
148
|
-
fulfilledMeta?: unknown;
|
|
149
|
-
rejectedMeta?: unknown;
|
|
150
|
-
}>;
|
|
151
|
-
unlinkAccount: import("@reduxjs/toolkit").AsyncThunk<void, UnlinkAccountPayload, {
|
|
152
|
-
state: import("../store").RootState;
|
|
153
|
-
dispatch: AppDispatch;
|
|
154
|
-
extra?: unknown;
|
|
155
|
-
rejectValue?: unknown;
|
|
156
|
-
serializedErrorType?: unknown;
|
|
157
|
-
pendingMeta?: unknown;
|
|
158
|
-
fulfilledMeta?: unknown;
|
|
159
|
-
rejectedMeta?: unknown;
|
|
160
|
-
}>;
|
|
161
|
-
syncAccounts: import("@reduxjs/toolkit").AsyncThunk<boolean, SyncAccountsPayload, {
|
|
162
|
-
state: import("../store").RootState;
|
|
163
|
-
dispatch: AppDispatch;
|
|
164
|
-
extra?: unknown;
|
|
165
|
-
rejectValue?: unknown;
|
|
166
|
-
serializedErrorType?: unknown;
|
|
167
|
-
pendingMeta?: unknown;
|
|
168
|
-
fulfilledMeta?: unknown;
|
|
169
|
-
rejectedMeta?: unknown;
|
|
170
|
-
}>;
|
|
171
|
-
setAccountsSyncing: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<SetAccountsSyncingPayload, "account/setAccountsSyncing">;
|
|
172
|
-
markAccountFailed: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<MarkAccountFailedPayload, "account/markAccountFailed">;
|
|
173
|
-
markAccountSuccess: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<MarkAccountSuccessPayload, "account/markAccountSuccess">;
|
|
174
|
-
};
|
|
175
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare function sha256String(str: any): Promise<string>;
|
|
2
|
-
export declare function randomBytes(n: any): Buffer<ArrayBuffer>;
|
|
3
|
-
export declare function encrypt(masterKey: any, value: any): Promise<{
|
|
4
|
-
value: ArrayBuffer;
|
|
5
|
-
meta: {
|
|
6
|
-
keyId: any;
|
|
7
|
-
algorithm: string;
|
|
8
|
-
iv: string;
|
|
9
|
-
authTag: string;
|
|
10
|
-
};
|
|
11
|
-
}>;
|
|
12
|
-
export declare function decrypt(masterKey: any, encrypted: any, meta: any): Promise<Buffer<ArrayBuffer>>;
|
|
13
|
-
export declare function createKey({ secret, salt }: {
|
|
14
|
-
secret: any;
|
|
15
|
-
salt: any;
|
|
16
|
-
}): Promise<{
|
|
17
|
-
raw: CryptoKey;
|
|
18
|
-
base64: string;
|
|
19
|
-
}>;
|
|
20
|
-
export declare function importKey(str: any): Promise<{
|
|
21
|
-
raw: CryptoKey;
|
|
22
|
-
base64: any;
|
|
23
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/jest.config.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
moduleFileExtensions: [
|
|
3
|
-
'api.js',
|
|
4
|
-
'api.ts',
|
|
5
|
-
'api.tsx',
|
|
6
|
-
'electron.js',
|
|
7
|
-
'electron.ts',
|
|
8
|
-
'mjs',
|
|
9
|
-
'js',
|
|
10
|
-
'ts',
|
|
11
|
-
'tsx',
|
|
12
|
-
'json',
|
|
13
|
-
],
|
|
14
|
-
testEnvironment: 'node',
|
|
15
|
-
testPathIgnorePatterns: ['/node_modules/'],
|
|
16
|
-
watchPathIgnorePatterns: ['<rootDir>/mocks/budgets/'],
|
|
17
|
-
setupFilesAfterEnv: ['<rootDir>/../loot-core/src/mocks/setup.ts'],
|
|
18
|
-
transformIgnorePatterns: ['/node_modules/'],
|
|
19
|
-
transform: {
|
|
20
|
-
'^.+\\.(t|j)sx?$': '@swc/jest',
|
|
21
|
-
},
|
|
22
|
-
};
|
|
File without changes
|
|
File without changes
|