@actual-app/api 25.5.0 → 25.6.0-edge.23

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.
Files changed (46) hide show
  1. package/@types/loot-core/server/aql/compiler.d.ts +40 -38
  2. package/@types/loot-core/server/aql/exec.d.ts +15 -7
  3. package/@types/loot-core/server/aql/index.d.ts +8 -1
  4. package/@types/loot-core/server/aql/schema/executors.d.ts +2 -7
  5. package/@types/loot-core/server/budget/app.d.ts +1 -1
  6. package/@types/loot-core/server/budget/base.d.ts +1 -1
  7. package/@types/loot-core/server/budget/category-template-context.d.ts +49 -0
  8. package/@types/loot-core/server/budget/cleanup-template.d.ts +8 -1
  9. package/@types/loot-core/server/budget/goal-template.d.ts +29 -0
  10. package/@types/loot-core/server/budget/schedule-template.d.ts +7 -0
  11. package/@types/loot-core/server/budget/template-notes.d.ts +7 -1
  12. package/@types/loot-core/server/budget/types/templates.d.ts +20 -4
  13. package/@types/loot-core/server/prefs.d.ts +1 -1
  14. package/@types/loot-core/server/tools/app.d.ts +1 -0
  15. package/@types/loot-core/shared/locale.d.ts +2 -1
  16. package/@types/loot-core/shared/months.d.ts +6 -0
  17. package/@types/loot-core/shared/schedules.d.ts +2 -1
  18. package/@types/loot-core/shared/transactions.d.ts +7 -67
  19. package/@types/loot-core/shared/util.d.ts +3 -2
  20. package/@types/loot-core/types/models/category.d.ts +1 -0
  21. package/@types/loot-core/types/models/transaction.d.ts +2 -1
  22. package/@types/loot-core/types/prefs.d.ts +0 -1
  23. package/@types/methods.d.ts +5 -0
  24. package/dist/app/bundle.api.js +8091 -9447
  25. package/dist/methods.js +8 -0
  26. package/dist/migrations/1745425408000_update_budgetType_pref.sql +7 -0
  27. package/dist/package.json +6 -6
  28. package/package.json +6 -6
  29. package/@types/loot-core/client/app/appSlice.d.ts +0 -175
  30. package/@types/loot-core/client/budgets/budgetsSlice.d.ts +0 -405
  31. package/@types/loot-core/client/modals/modalsSlice.d.ts +0 -490
  32. package/@types/loot-core/client/notifications/notificationsSlice.d.ts +0 -47
  33. package/@types/loot-core/client/prefs/prefsSlice.d.ts +0 -180
  34. package/@types/loot-core/client/queries/queriesSlice.d.ts +0 -692
  35. package/@types/loot-core/client/redux.d.ts +0 -18546
  36. package/@types/loot-core/client/store/index.d.ts +0 -133
  37. package/@types/loot-core/client/users/usersSlice.d.ts +0 -105
  38. package/@types/loot-core/platform/client/undo/index.d.ts +0 -21
  39. package/@types/loot-core/server/aql/schema/run-query.d.ts +0 -6
  40. package/@types/loot-core/server/budget/categoryTemplate.d.ts +0 -49
  41. package/@types/loot-core/server/budget/goalsSchedule.d.ts +0 -8
  42. package/@types/loot-core/server/budget/goaltemplates.d.ts +0 -16
  43. package/@types/loot-core/server/platform.d.ts +0 -3
  44. package/@types/loot-core/server/platform.web.d.ts +0 -3
  45. package/@types/loot-core/types/file.d.ts +0 -34
  46. /package/@types/loot-core/{client → shared}/platform.d.ts +0 -0
@@ -1,490 +0,0 @@
1
- import { type File } from '../../types/file';
2
- import { type AccountEntity, type AccountSyncSource, type CategoryEntity, type CategoryGroupEntity, type GoCardlessToken, type NewRuleEntity, type RuleEntity, type ScheduleEntity, type TransactionEntity, type UserEntity, type UserAccessEntity, type NewUserEntity, type NoteEntity } from '../../types/models';
3
- export type Modal = {
4
- name: 'import-transactions';
5
- options: {
6
- accountId: string;
7
- filename: string;
8
- categories?: {
9
- list: CategoryEntity[];
10
- grouped: CategoryGroupEntity[];
11
- };
12
- onImported: (didChange: boolean) => void;
13
- };
14
- } | {
15
- name: 'add-account';
16
- options: {
17
- upgradingAccountId?: string;
18
- };
19
- } | {
20
- name: 'add-local-account';
21
- } | {
22
- name: 'close-account';
23
- options: {
24
- account: AccountEntity;
25
- balance: number;
26
- canDelete: boolean;
27
- };
28
- } | {
29
- name: 'select-linked-accounts';
30
- options: {
31
- externalAccounts: unknown[];
32
- requisitionId?: string;
33
- upgradingAccountId?: string | undefined;
34
- syncSource?: AccountSyncSource;
35
- };
36
- } | {
37
- name: 'confirm-category-delete';
38
- options: {
39
- onDelete: (transferCategoryId: CategoryEntity['id']) => void;
40
- category?: CategoryEntity['id'];
41
- group?: CategoryGroupEntity['id'];
42
- };
43
- } | {
44
- name: 'load-backup';
45
- options: {
46
- budgetId?: string;
47
- watchUpdates?: boolean;
48
- backupDisabled?: boolean;
49
- };
50
- } | {
51
- name: 'manage-rules';
52
- options: {
53
- payeeId?: string;
54
- };
55
- } | {
56
- name: 'edit-rule';
57
- options: {
58
- rule: RuleEntity | NewRuleEntity;
59
- onSave?: (rule: RuleEntity) => void;
60
- };
61
- } | {
62
- name: 'merge-unused-payees';
63
- options: {
64
- payeeIds: string[];
65
- targetPayeeId: string;
66
- };
67
- } | {
68
- name: 'gocardless-init';
69
- options: {
70
- onSuccess: () => void;
71
- };
72
- } | {
73
- name: 'simplefin-init';
74
- options: {
75
- onSuccess: () => void;
76
- };
77
- } | {
78
- name: 'pluggyai-init';
79
- options: {
80
- onSuccess: () => void;
81
- };
82
- } | {
83
- name: 'gocardless-external-msg';
84
- options: {
85
- onMoveExternal: (arg: {
86
- institutionId: string;
87
- }) => Promise<{
88
- error: 'timeout';
89
- } | {
90
- error: 'unknown';
91
- message?: string;
92
- } | {
93
- data: GoCardlessToken;
94
- }>;
95
- onClose?: (() => void) | undefined;
96
- onSuccess: (data: GoCardlessToken) => Promise<void>;
97
- };
98
- } | {
99
- name: 'delete-budget';
100
- options: {
101
- file: File;
102
- };
103
- } | {
104
- name: 'duplicate-budget';
105
- options: {
106
- /** The budget file to be duplicated */
107
- file: File;
108
- /**
109
- * Indicates whether the duplication is initiated from the budget
110
- * management page. This may affect the behavior or UI of the
111
- * duplication process.
112
- */
113
- managePage?: boolean;
114
- /**
115
- * loadBudget indicates whether to open the 'original' budget, the
116
- * new duplicated 'copy' budget, or no budget ('none'). If 'none'
117
- * duplicate-budget stays on the same page.
118
- */
119
- loadBudget?: 'none' | 'original' | 'copy';
120
- /**
121
- * onComplete is called when the DuplicateFileModal is closed.
122
- * @param event the event object will pass back the status of the
123
- * duplicate process.
124
- * 'success' if the budget was duplicated.
125
- * 'failed' if the budget could not be duplicated. This will also
126
- * pass an error on the event object.
127
- * 'canceled' if the DuplicateFileModal was canceled.
128
- * @returns
129
- */
130
- onComplete?: (event: {
131
- status: 'success' | 'failed' | 'canceled';
132
- error?: Error;
133
- }) => void;
134
- };
135
- } | {
136
- name: 'import';
137
- } | {
138
- name: 'import-ynab4';
139
- } | {
140
- name: 'import-ynab5';
141
- } | {
142
- name: 'import-actual';
143
- } | {
144
- name: 'out-of-sync-migrations';
145
- } | {
146
- name: 'files-settings';
147
- } | {
148
- name: 'confirm-change-document-dir';
149
- options: {
150
- currentBudgetDirectory: string;
151
- newDirectory: string;
152
- };
153
- } | {
154
- name: 'create-encryption-key';
155
- options: {
156
- recreate?: boolean;
157
- };
158
- } | {
159
- name: 'fix-encryption-key';
160
- options: {
161
- hasExistingKey?: boolean;
162
- cloudFileId?: string;
163
- onSuccess?: () => void;
164
- };
165
- } | {
166
- name: 'edit-field';
167
- options: {
168
- name: keyof Pick<TransactionEntity, 'date' | 'amount' | 'notes'>;
169
- onSubmit: (name: keyof Pick<TransactionEntity, 'date' | 'amount' | 'notes'>, value: string | number, mode?: 'prepend' | 'append' | 'replace' | null) => void;
170
- onClose?: () => void;
171
- };
172
- } | {
173
- name: 'category-autocomplete';
174
- options: {
175
- title?: string;
176
- categoryGroups?: CategoryGroupEntity[];
177
- onSelect: (categoryId: string, categoryName: string) => void;
178
- month?: string | undefined;
179
- showHiddenCategories?: boolean;
180
- closeOnSelect?: boolean;
181
- clearOnSelect?: boolean;
182
- onClose?: () => void;
183
- };
184
- } | {
185
- name: 'account-autocomplete';
186
- options: {
187
- onSelect: (accountId: string, accountName: string) => void;
188
- includeClosedAccounts?: boolean;
189
- onClose?: () => void;
190
- };
191
- } | {
192
- name: 'payee-autocomplete';
193
- options: {
194
- onSelect: (payeeId: string) => void;
195
- onClose?: () => void;
196
- };
197
- } | {
198
- name: 'budget-summary';
199
- options: {
200
- month: string;
201
- };
202
- } | {
203
- name: 'schedule-edit';
204
- options: {
205
- id?: string;
206
- transaction?: TransactionEntity;
207
- } | null;
208
- } | {
209
- name: 'schedule-link';
210
- options: {
211
- transactionIds: string[];
212
- getTransaction: (transactionId: TransactionEntity['id']) => TransactionEntity;
213
- accountName?: string;
214
- onScheduleLinked?: (schedule: ScheduleEntity) => void;
215
- };
216
- } | {
217
- name: 'schedules-discover';
218
- } | {
219
- name: 'schedule-posts-offline-notification';
220
- } | {
221
- name: 'synced-account-edit';
222
- options: {
223
- account: AccountEntity;
224
- };
225
- } | {
226
- name: 'account-menu';
227
- options: {
228
- accountId: AccountEntity['id'];
229
- onSave: (account: AccountEntity) => void;
230
- onCloseAccount: (accountId: AccountEntity['id']) => void;
231
- onReopenAccount: (accountId: AccountEntity['id']) => void;
232
- onEditNotes: (id: NoteEntity['id']) => void;
233
- onClose?: () => void;
234
- };
235
- } | {
236
- name: 'category-menu';
237
- options: {
238
- categoryId: CategoryEntity['id'];
239
- onSave: (category: CategoryEntity) => void;
240
- onEditNotes: (id: NoteEntity['id']) => void;
241
- onDelete: (categoryId: CategoryEntity['id']) => void;
242
- onToggleVisibility: (categoryId: CategoryEntity['id']) => void;
243
- onClose?: () => void;
244
- };
245
- } | {
246
- name: 'envelope-budget-menu';
247
- options: {
248
- categoryId: CategoryEntity['id'];
249
- month: string;
250
- onUpdateBudget: (amount: number) => void;
251
- onCopyLastMonthAverage: () => void;
252
- onSetMonthsAverage: (numberOfMonths: number) => void;
253
- onApplyBudgetTemplate: () => void;
254
- };
255
- } | {
256
- name: 'tracking-budget-menu';
257
- options: {
258
- categoryId: CategoryEntity['id'];
259
- month: string;
260
- onUpdateBudget: (amount: number) => void;
261
- onCopyLastMonthAverage: () => void;
262
- onSetMonthsAverage: (numberOfMonths: number) => void;
263
- onApplyBudgetTemplate: () => void;
264
- };
265
- } | {
266
- name: 'category-group-menu';
267
- options: {
268
- groupId: CategoryGroupEntity['id'];
269
- onSave: (group: CategoryGroupEntity) => void;
270
- onAddCategory: (groupId: CategoryGroupEntity['id'], isIncome: CategoryGroupEntity['is_income']) => void;
271
- onEditNotes: (id: NoteEntity['id']) => void;
272
- onDelete: (groupId: CategoryGroupEntity['id']) => void;
273
- onToggleVisibility: (groupId: CategoryGroupEntity['id']) => void;
274
- onClose?: () => void;
275
- };
276
- } | {
277
- name: 'notes';
278
- options: {
279
- id: NoteEntity['id'];
280
- name: string;
281
- onSave: (id: NoteEntity['id'], contents: string) => void;
282
- };
283
- } | {
284
- name: 'tracking-budget-summary';
285
- options: {
286
- month: string;
287
- };
288
- } | {
289
- name: 'envelope-budget-summary';
290
- options: {
291
- month: string;
292
- onBudgetAction: (month: string, type: string, args?: unknown) => Promise<void>;
293
- };
294
- } | {
295
- name: 'new-category-group';
296
- options: {
297
- onValidate?: (value: string) => string | null;
298
- onSubmit: (value: string) => Promise<void>;
299
- };
300
- } | {
301
- name: 'new-category';
302
- options: {
303
- onValidate?: (value: string) => string | null;
304
- onSubmit: (value: string) => Promise<void>;
305
- };
306
- } | {
307
- name: 'envelope-balance-menu';
308
- options: {
309
- categoryId: CategoryEntity['id'];
310
- month: string;
311
- onCarryover: (carryover: boolean) => void;
312
- onTransfer: () => void;
313
- onCover: () => void;
314
- };
315
- } | {
316
- name: 'envelope-summary-to-budget-menu';
317
- options: {
318
- month: string;
319
- onTransfer: () => void;
320
- onCover: () => void;
321
- onHoldBuffer: () => void;
322
- onResetHoldBuffer: () => void;
323
- };
324
- } | {
325
- name: 'tracking-balance-menu';
326
- options: {
327
- categoryId: CategoryEntity['id'];
328
- month: string;
329
- onCarryover: (carryover: boolean) => void;
330
- };
331
- } | {
332
- name: 'transfer';
333
- options: {
334
- title: string;
335
- categoryId?: CategoryEntity['id'];
336
- month: string;
337
- amount: number;
338
- onSubmit: (amount: number, toCategoryId: CategoryEntity['id']) => void;
339
- showToBeBudgeted?: boolean;
340
- };
341
- } | {
342
- name: 'cover';
343
- options: {
344
- title: string;
345
- categoryId?: CategoryEntity['id'];
346
- month: string;
347
- showToBeBudgeted?: boolean;
348
- onSubmit: (fromCategoryId: CategoryEntity['id']) => void;
349
- };
350
- } | {
351
- name: 'hold-buffer';
352
- options: {
353
- month: string;
354
- onSubmit: (amount: number) => void;
355
- };
356
- } | {
357
- name: 'scheduled-transaction-menu';
358
- options: {
359
- transactionId: TransactionEntity['id'];
360
- onPost: (transactionId: TransactionEntity['id']) => void;
361
- onSkip: (transactionId: TransactionEntity['id']) => void;
362
- onComplete: (transactionId: TransactionEntity['id']) => void;
363
- };
364
- } | {
365
- name: 'budget-page-menu';
366
- options: {
367
- onAddCategoryGroup: () => void;
368
- onToggleHiddenCategories: () => void;
369
- onSwitchBudgetFile: () => void;
370
- };
371
- } | {
372
- name: 'envelope-budget-month-menu';
373
- options: {
374
- month: string;
375
- onBudgetAction: (month: string, action: string, arg?: unknown) => void;
376
- onEditNotes: (id: NoteEntity['id']) => void;
377
- };
378
- } | {
379
- name: 'tracking-budget-month-menu';
380
- options: {
381
- month: string;
382
- onBudgetAction: (month: string, action: string, arg?: unknown) => void;
383
- onEditNotes: (id: NoteEntity['id']) => void;
384
- };
385
- } | {
386
- name: 'budget-file-selection';
387
- } | {
388
- name: 'confirm-transaction-edit';
389
- options: {
390
- onConfirm: () => void;
391
- onCancel?: () => void;
392
- confirmReason: string;
393
- };
394
- } | {
395
- name: 'confirm-transaction-delete';
396
- options: {
397
- message?: string | undefined;
398
- onConfirm: () => void;
399
- };
400
- } | {
401
- name: 'edit-user';
402
- options: {
403
- user: UserEntity | NewUserEntity;
404
- onSave: (user: UserEntity) => void;
405
- };
406
- } | {
407
- name: 'edit-access';
408
- options: {
409
- access: UserAccessEntity;
410
- onSave: (userAccess: UserAccessEntity) => void;
411
- };
412
- } | {
413
- name: 'transfer-ownership';
414
- options: {
415
- onSave: () => void;
416
- };
417
- } | {
418
- name: 'enable-openid';
419
- options: {
420
- onSave: () => void;
421
- };
422
- } | {
423
- name: 'enable-password-auth';
424
- options: {
425
- onSave: () => void;
426
- };
427
- } | {
428
- name: 'confirm-unlink-account';
429
- options: {
430
- accountName: string;
431
- isViewBankSyncSettings: boolean;
432
- onUnlink: () => void;
433
- };
434
- } | {
435
- name: 'keyboard-shortcuts';
436
- } | {
437
- name: 'goal-templates';
438
- } | {
439
- name: 'schedules-upcoming-length';
440
- } | {
441
- name: 'payee-category-learning';
442
- } | {
443
- name: 'category-automations-edit';
444
- };
445
- type OpenAccountCloseModalPayload = {
446
- accountId: AccountEntity['id'];
447
- };
448
- export declare const openAccountCloseModal: import("@reduxjs/toolkit").AsyncThunk<void, OpenAccountCloseModalPayload, {
449
- state: import("../store").RootState;
450
- dispatch: import("../store").AppDispatch;
451
- extra?: unknown;
452
- rejectValue?: unknown;
453
- serializedErrorType?: unknown;
454
- pendingMeta?: unknown;
455
- fulfilledMeta?: unknown;
456
- rejectedMeta?: unknown;
457
- }>;
458
- type ModalsState = {
459
- modalStack: Modal[];
460
- isHidden: boolean;
461
- };
462
- type PushModalPayload = {
463
- modal: Modal;
464
- };
465
- type ReplaceModalPayload = {
466
- modal: Modal;
467
- };
468
- type CollapseModalPayload = {
469
- rootModalName: Modal['name'];
470
- };
471
- export declare const name: "modals", reducer: import("redux").Reducer<ModalsState>, getInitialState: () => ModalsState;
472
- export declare const actions: {
473
- openAccountCloseModal: import("@reduxjs/toolkit").AsyncThunk<void, OpenAccountCloseModalPayload, {
474
- state: import("../store").RootState;
475
- dispatch: import("../store").AppDispatch;
476
- extra?: unknown;
477
- rejectValue?: unknown;
478
- serializedErrorType?: unknown;
479
- pendingMeta?: unknown;
480
- fulfilledMeta?: unknown;
481
- rejectedMeta?: unknown;
482
- }>;
483
- pushModal: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<PushModalPayload, "modals/pushModal">;
484
- replaceModal: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<ReplaceModalPayload, "modals/replaceModal">;
485
- popModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"modals/popModal">;
486
- closeModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"modals/closeModal">;
487
- collapseModals: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<CollapseModalPayload, "modals/collapseModals">;
488
- };
489
- export declare const pushModal: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<PushModalPayload, "modals/pushModal">, closeModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"modals/closeModal">, collapseModals: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<CollapseModalPayload, "modals/collapseModals">, popModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"modals/popModal">, replaceModal: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<ReplaceModalPayload, "modals/replaceModal">;
490
- export {};
@@ -1,47 +0,0 @@
1
- export type Notification = {
2
- id?: string | undefined;
3
- type?: 'message' | 'error' | 'warning' | undefined;
4
- pre?: string | undefined;
5
- title?: string | undefined;
6
- message: string;
7
- sticky?: boolean | undefined;
8
- timeout?: number | undefined;
9
- button?: {
10
- title: string;
11
- action: () => void | Promise<void>;
12
- } | undefined;
13
- messageActions?: Record<string, () => void> | undefined;
14
- onClose?: (() => void) | undefined;
15
- internal?: string | undefined;
16
- };
17
- export type NotificationWithId = Notification & {
18
- id: string;
19
- };
20
- type NotificationsState = {
21
- notifications: NotificationWithId[];
22
- inset?: {
23
- bottom?: number;
24
- top?: number;
25
- right?: number;
26
- left?: number;
27
- };
28
- };
29
- type AddNotificationPayload = {
30
- notification: Notification;
31
- };
32
- type RemoveNotificationPayload = {
33
- id: NotificationWithId['id'];
34
- };
35
- export declare const name: "notifications", reducer: import("redux").Reducer<NotificationsState>, getInitialState: () => NotificationsState;
36
- export declare const actions: {
37
- addNotification: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<AddNotificationPayload, "notifications/addNotification">;
38
- addGenericErrorNotification: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notifications/addGenericErrorNotification">;
39
- removeNotification: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<RemoveNotificationPayload, "notifications/removeNotification">;
40
- setNotificationInset: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
41
- inset: NotificationsState["inset"];
42
- }, "notifications/setNotificationInset">;
43
- };
44
- export declare const addGenericErrorNotification: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notifications/addGenericErrorNotification">, addNotification: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<AddNotificationPayload, "notifications/addNotification">, removeNotification: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<RemoveNotificationPayload, "notifications/removeNotification">, setNotificationInset: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
45
- inset: NotificationsState["inset"];
46
- }, "notifications/setNotificationInset">;
47
- export {};