@actual-app/api 24.12.0 → 25.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/@types/loot-core/client/state-types/app.d.ts +6 -1
- package/@types/loot-core/client/state-types/modals.d.ts +50 -0
- package/@types/loot-core/server/accounts/transaction-rules.d.ts +4 -3
- package/@types/loot-core/server/admin/app.d.ts +12 -0
- package/@types/loot-core/server/admin/types/handlers.d.ts +41 -0
- 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/cloud-storage.d.ts +9 -0
- package/@types/loot-core/server/db/index.d.ts +1 -0
- package/@types/loot-core/server/main-app.d.ts +1 -1
- package/@types/loot-core/server/post.d.ts +2 -0
- package/@types/loot-core/server/tools/types/handlers.d.ts +3 -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/util.d.ts +7 -1
- 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 +12 -1
- 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/rule.d.ts +5 -1
- 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 +4 -1
- package/@types/loot-core/types/server-handlers.d.ts +89 -12
- package/dist/app/bundle.api.js +1476 -735
- package/dist/methods.js +4 -1
- package/dist/package.json +2 -2
- package/package.json +2 -2
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
RuleEntity,
|
|
18
18
|
PayeeEntity,
|
|
19
19
|
} from './models';
|
|
20
|
+
import { OpenIdConfig } from './models/openid';
|
|
20
21
|
import { GlobalPrefs, MetadataPrefs } from './prefs';
|
|
21
22
|
import { Query } from './query';
|
|
22
23
|
import { EmptyObject } from './util';
|
|
@@ -178,7 +179,7 @@ export interface ServerHandlers {
|
|
|
178
179
|
|
|
179
180
|
'account-move': (arg: { id; targetId }) => Promise<unknown>;
|
|
180
181
|
|
|
181
|
-
'secret-set': (arg: { name: string; value: string }) => Promise<null>;
|
|
182
|
+
'secret-set': (arg: { name: string; value: string | null }) => Promise<null>;
|
|
182
183
|
'secret-check': (arg: string) => Promise<string | { error?: string }>;
|
|
183
184
|
|
|
184
185
|
'gocardless-poll-web-token': (arg: {
|
|
@@ -269,27 +270,64 @@ export interface ServerHandlers {
|
|
|
269
270
|
|
|
270
271
|
'get-did-bootstrap': () => Promise<boolean>;
|
|
271
272
|
|
|
272
|
-
'subscribe-needs-bootstrap': (args: {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
'subscribe-needs-bootstrap': (args: { url }) => Promise<
|
|
274
|
+
| { error: string }
|
|
275
|
+
| {
|
|
276
|
+
bootstrapped: boolean;
|
|
277
|
+
hasServer: false;
|
|
278
|
+
}
|
|
279
|
+
| {
|
|
280
|
+
bootstrapped: boolean;
|
|
281
|
+
hasServer: true;
|
|
282
|
+
availableLoginMethods: {
|
|
283
|
+
method: string;
|
|
284
|
+
displayName: string;
|
|
285
|
+
active: boolean;
|
|
286
|
+
}[];
|
|
287
|
+
multiuser: boolean;
|
|
288
|
+
}
|
|
276
289
|
>;
|
|
277
290
|
|
|
278
|
-
'subscribe-
|
|
291
|
+
'subscribe-get-login-methods': () => Promise<{
|
|
292
|
+
methods?: { method: string; displayName: string; active: boolean }[];
|
|
293
|
+
error?: string;
|
|
294
|
+
}>;
|
|
295
|
+
|
|
296
|
+
'subscribe-bootstrap': (arg: {
|
|
297
|
+
password?: string;
|
|
298
|
+
openId?: OpenIdConfig;
|
|
299
|
+
}) => Promise<{ error?: string }>;
|
|
279
300
|
|
|
280
|
-
'subscribe-get-user': () => Promise<{
|
|
301
|
+
'subscribe-get-user': () => Promise<{
|
|
302
|
+
offline: boolean;
|
|
303
|
+
userName?: string;
|
|
304
|
+
userId?: string;
|
|
305
|
+
displayName?: string;
|
|
306
|
+
permission?: string;
|
|
307
|
+
loginMethod?: string;
|
|
308
|
+
tokenExpired?: boolean;
|
|
309
|
+
} | null>;
|
|
281
310
|
|
|
282
311
|
'subscribe-change-password': (arg: {
|
|
283
312
|
password;
|
|
284
313
|
}) => Promise<{ error?: string }>;
|
|
285
314
|
|
|
286
|
-
'subscribe-sign-in': (
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
315
|
+
'subscribe-sign-in': (
|
|
316
|
+
arg:
|
|
317
|
+
| {
|
|
318
|
+
password;
|
|
319
|
+
loginMethod?: string;
|
|
320
|
+
}
|
|
321
|
+
| {
|
|
322
|
+
return_url;
|
|
323
|
+
loginMethod?: 'openid';
|
|
324
|
+
},
|
|
325
|
+
) => Promise<{ error?: string }>;
|
|
290
326
|
|
|
291
327
|
'subscribe-sign-out': () => Promise<'ok'>;
|
|
292
328
|
|
|
329
|
+
'subscribe-set-token': (arg: { token: string }) => Promise<void>;
|
|
330
|
+
|
|
293
331
|
'get-server-version': () => Promise<{ error?: string } | { version: string }>;
|
|
294
332
|
|
|
295
333
|
'get-server-url': () => Promise<string | null>;
|
|
@@ -304,10 +342,18 @@ export interface ServerHandlers {
|
|
|
304
342
|
| { messages: Message[] }
|
|
305
343
|
>;
|
|
306
344
|
|
|
345
|
+
'validate-budget-name': (arg: {
|
|
346
|
+
name: string;
|
|
347
|
+
}) => Promise<{ valid: boolean; message?: string }>;
|
|
348
|
+
|
|
349
|
+
'unique-budget-name': (arg: { name: string }) => Promise<string>;
|
|
350
|
+
|
|
307
351
|
'get-budgets': () => Promise<Budget[]>;
|
|
308
352
|
|
|
309
353
|
'get-remote-files': () => Promise<RemoteFile[]>;
|
|
310
354
|
|
|
355
|
+
'get-user-file-info': (fileId: string) => Promise<RemoteFile | null>;
|
|
356
|
+
|
|
311
357
|
'reset-budget-cache': () => Promise<unknown>;
|
|
312
358
|
|
|
313
359
|
'upload-budget': (arg: { id }) => Promise<{ error?: string }>;
|
|
@@ -327,7 +373,24 @@ export interface ServerHandlers {
|
|
|
327
373
|
'delete-budget': (arg: {
|
|
328
374
|
id?: string;
|
|
329
375
|
cloudFileId?: string;
|
|
330
|
-
}) => Promise<'ok'>;
|
|
376
|
+
}) => Promise<'ok' | 'fail'>;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Duplicates a budget file.
|
|
380
|
+
* @param {Object} arg - The arguments for duplicating a budget.
|
|
381
|
+
* @param {string} [arg.id] - The ID of the local budget to duplicate.
|
|
382
|
+
* @param {string} [arg.cloudId] - The ID of the cloud-synced budget to duplicate.
|
|
383
|
+
* @param {string} arg.newName - The name for the duplicated budget.
|
|
384
|
+
* @param {boolean} [arg.cloudSync] - Whether to sync the duplicated budget to the cloud.
|
|
385
|
+
* @returns {Promise<string>} The ID of the newly created budget.
|
|
386
|
+
*/
|
|
387
|
+
'duplicate-budget': (arg: {
|
|
388
|
+
id?: string;
|
|
389
|
+
cloudId?: string;
|
|
390
|
+
newName: string;
|
|
391
|
+
cloudSync?: boolean;
|
|
392
|
+
open: 'none' | 'original' | 'copy';
|
|
393
|
+
}) => Promise<string>;
|
|
331
394
|
|
|
332
395
|
'create-budget': (arg: {
|
|
333
396
|
budgetName?;
|
|
@@ -357,4 +420,18 @@ export interface ServerHandlers {
|
|
|
357
420
|
'get-last-opened-backup': () => Promise<string | null>;
|
|
358
421
|
|
|
359
422
|
'app-focused': () => Promise<void>;
|
|
423
|
+
|
|
424
|
+
'enable-openid': (arg: {
|
|
425
|
+
openId?: OpenIdConfig;
|
|
426
|
+
}) => Promise<{ error?: string }>;
|
|
427
|
+
|
|
428
|
+
'enable-password': (arg: { password: string }) => Promise<{ error?: string }>;
|
|
429
|
+
|
|
430
|
+
'get-openid-config': () => Promise<
|
|
431
|
+
| {
|
|
432
|
+
openId: OpenIdConfig;
|
|
433
|
+
}
|
|
434
|
+
| { error: string }
|
|
435
|
+
| null
|
|
436
|
+
>;
|
|
360
437
|
}
|