@actual-app/api 25.1.0 → 25.2.1
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 +7 -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 +0 -3
- 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 +9 -4
- package/@types/loot-core/server/admin/types/handlers.d.ts +4 -2
- 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/types/handlers.d.ts +4 -0
- package/@types/loot-core/server/dashboard/app.d.ts +9 -4
- 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/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 +2 -1
- 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 +23 -9
- package/@types/loot-core/types/api-handlers.d.ts +3 -0
- package/@types/loot-core/types/models/dashboard.d.ts +1 -1
- 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 +6 -4
- 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/prefs.d.ts +3 -2
- package/@types/loot-core/types/server-events.d.ts +80 -17
- package/@types/loot-core/types/server-handlers.d.ts +19 -7
- package/@types/loot-core/types/util.d.ts +5 -0
- package/@types/methods.d.ts +4 -4
- package/dist/app/bundle.api.js +334 -187
- package/dist/methods.js +4 -1
- 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 +1 -1
- package/package.json +1 -1
- 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 -42
- package/@types/loot-core/client/state-types/queries.d.ts +0 -76
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
export declare const SET_NEW_TRANSACTIONS = "SET_NEW_TRANSACTIONS";
|
|
2
|
-
export declare const UPDATE_NEW_TRANSACTIONS = "UPDATE_NEW_TRANSACTIONS";
|
|
3
|
-
export declare const SET_LAST_TRANSACTION = "SET_LAST_TRANSACTION";
|
|
4
|
-
export declare const MARK_ACCOUNT_READ = "MARK_ACCOUNT_READ";
|
|
5
|
-
export declare const LOAD_ACCOUNTS = "LOAD_ACCOUNTS";
|
|
6
|
-
export declare const UPDATE_ACCOUNT = "UPDATE_ACCOUNT";
|
|
7
|
-
export declare const LOAD_CATEGORIES = "LOAD_CATEGORIES";
|
|
8
|
-
export declare const LOAD_COMMON_PAYEES = "LOAD_COMMON_PAYEES";
|
|
9
|
-
export declare const LOAD_PAYEES = "LOAD_PAYEES";
|
|
10
1
|
export declare const SET_PREFS = "SET_PREFS";
|
|
11
2
|
export declare const MERGE_LOCAL_PREFS = "MERGE_LOCAL_PREFS";
|
|
12
3
|
export declare const MERGE_GLOBAL_PREFS = "MERGE_GLOBAL_PREFS";
|
|
@@ -25,8 +16,6 @@ export declare const ADD_NOTIFICATION = "ADD_NOTIFICATION";
|
|
|
25
16
|
export declare const REMOVE_NOTIFICATION = "REMOVE_NOTIFICATION";
|
|
26
17
|
export declare const SET_NOTIFICATION_INSET = "SET_NOTIFICATION_INSET";
|
|
27
18
|
export declare const GET_USER_DATA = "GET_USER_DATA";
|
|
28
|
-
export declare const SET_LAST_UNDO_STATE = "SET_LAST_UNDO_STATE";
|
|
29
|
-
export declare const SET_LAST_SPLIT_STATE = "SET_LAST_SPLIT_STATE";
|
|
30
19
|
export declare const SET_ACCOUNTS_SYNCING = "SET_ACCOUNTS_SYNCING";
|
|
31
20
|
export declare const ACCOUNT_SYNC_STATUS = "ACCOUNT_SYNC_STATUS";
|
|
32
21
|
export declare const SIGN_OUT = "SIGN_OUT";
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type * as constants from '../constants';
|
|
2
2
|
|
|
3
|
-
import type { AccountActions, AccountState } from './account';
|
|
4
|
-
import type { AppActions, AppState } from './app';
|
|
5
3
|
import type { BudgetsActions, BudgetsState } from './budgets';
|
|
6
4
|
import type { ModalsActions, ModalsState } from './modals';
|
|
7
5
|
import type { NotificationsActions, NotificationsState } from './notifications';
|
|
8
6
|
import type { PrefsActions, PrefsState } from './prefs';
|
|
9
|
-
import type { QueriesActions, QueriesState } from './queries';
|
|
10
7
|
import type { UserActions, UserState } from './user';
|
|
11
8
|
|
|
12
9
|
export type CloseBudgetAction = {
|
|
@@ -14,28 +11,17 @@ export type CloseBudgetAction = {
|
|
|
14
11
|
};
|
|
15
12
|
|
|
16
13
|
export type Action =
|
|
17
|
-
| AccountActions
|
|
18
|
-
| AppActions
|
|
19
14
|
| BudgetsActions
|
|
20
15
|
| ModalsActions
|
|
21
16
|
| NotificationsActions
|
|
22
17
|
| PrefsActions
|
|
23
|
-
| QueriesActions
|
|
24
18
|
| UserActions
|
|
25
19
|
| CloseBudgetAction;
|
|
26
20
|
|
|
27
21
|
export type State = {
|
|
28
|
-
account: AccountState;
|
|
29
|
-
app: AppState;
|
|
30
22
|
budgets: BudgetsState;
|
|
31
23
|
modals: ModalsState;
|
|
32
24
|
notifications: NotificationsState;
|
|
33
25
|
prefs: PrefsState;
|
|
34
|
-
queries: QueriesState;
|
|
35
26
|
user: UserState;
|
|
36
27
|
};
|
|
37
|
-
|
|
38
|
-
declare module 'react-redux' {
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/consistent-type-definitions
|
|
40
|
-
export interface DefaultRootState extends State {}
|
|
41
|
-
}
|
|
@@ -148,7 +148,7 @@ type FinanceModals = {
|
|
|
148
148
|
'category-autocomplete': {
|
|
149
149
|
categoryGroups?: CategoryGroupEntity[];
|
|
150
150
|
onSelect: (categoryId: string, categoryName: string) => void;
|
|
151
|
-
month?: string;
|
|
151
|
+
month?: string | undefined;
|
|
152
152
|
showHiddenCategories?: boolean;
|
|
153
153
|
onClose?: () => void;
|
|
154
154
|
};
|
|
@@ -164,6 +164,8 @@ type FinanceModals = {
|
|
|
164
164
|
onClose?: () => void;
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
+
'payee-category-learning': null;
|
|
168
|
+
|
|
167
169
|
'budget-summary': {
|
|
168
170
|
month: string;
|
|
169
171
|
};
|
|
@@ -181,6 +183,8 @@ type FinanceModals = {
|
|
|
181
183
|
|
|
182
184
|
'schedules-discover': null;
|
|
183
185
|
|
|
186
|
+
'schedules-upcoming-length': null;
|
|
187
|
+
|
|
184
188
|
'schedule-posts-offline-notification': null;
|
|
185
189
|
'account-menu': {
|
|
186
190
|
accountId: string;
|
|
@@ -288,6 +292,7 @@ type FinanceModals = {
|
|
|
288
292
|
transactionId: string;
|
|
289
293
|
onPost: (transactionId: string) => void;
|
|
290
294
|
onSkip: (transactionId: string) => void;
|
|
295
|
+
onComplete: (transactionId: string) => void;
|
|
291
296
|
};
|
|
292
297
|
'budget-page-menu': {
|
|
293
298
|
onAddCategoryGroup: () => void;
|
|
@@ -311,7 +316,7 @@ type FinanceModals = {
|
|
|
311
316
|
confirmReason: string;
|
|
312
317
|
};
|
|
313
318
|
'confirm-transaction-delete': {
|
|
314
|
-
message?: string;
|
|
319
|
+
message?: string | undefined;
|
|
315
320
|
onConfirm: () => void;
|
|
316
321
|
};
|
|
317
322
|
'edit-user': {
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import type { AccountEntity } from '../types/models';
|
|
2
|
-
export declare function generateAccount(name:
|
|
3
|
-
bankId: number;
|
|
4
|
-
bankName: string;
|
|
1
|
+
import type { AccountEntity, CategoryEntity, CategoryGroupEntity, NewCategoryGroupEntity, TransactionEntity } from '../types/models';
|
|
2
|
+
export declare function generateAccount(name: AccountEntity['name'], isConnected?: boolean, offbudget?: boolean): AccountEntity & {
|
|
3
|
+
bankId: number | null;
|
|
4
|
+
bankName: string | null;
|
|
5
5
|
};
|
|
6
|
-
export declare function generateCategory(name:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
sort_order: number;
|
|
12
|
-
};
|
|
13
|
-
export declare function generateCategoryGroup(name: any, isIncome?: boolean): {
|
|
14
|
-
id: string;
|
|
15
|
-
name: any;
|
|
16
|
-
is_income: number;
|
|
17
|
-
sort_order: number;
|
|
18
|
-
};
|
|
19
|
-
export declare function generateCategoryGroups(definition: any): any;
|
|
20
|
-
export declare function generateTransaction(data: any, splitAmount?: any, showError?: boolean): any[];
|
|
21
|
-
export declare function generateTransactions(count: any, accountId: any, groupId: any, splitAtIndexes?: any[], showError?: boolean): any[];
|
|
6
|
+
export declare function generateCategory(name: string, group: string, isIncome?: boolean): CategoryEntity;
|
|
7
|
+
export declare function generateCategoryGroup(name: string, isIncome?: boolean): CategoryGroupEntity;
|
|
8
|
+
export declare function generateCategoryGroups(definition: Partial<NewCategoryGroupEntity>[]): CategoryGroupEntity[];
|
|
9
|
+
export declare function generateTransaction(data: Partial<TransactionEntity> & Pick<TransactionEntity, 'account'>, splitAmount?: number, showError?: boolean): TransactionEntity[];
|
|
10
|
+
export declare function generateTransactions(count: number, accountId: string, groupId: string, splitAtIndexes?: number[], showError?: boolean): TransactionEntity[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Handlers } from '../../../types/handlers';
|
|
2
|
+
import type { CategoryGroupEntity } from '../../../types/models';
|
|
2
3
|
import type { ServerEvents } from '../../../types/server-events';
|
|
3
4
|
|
|
4
5
|
export function init(socketName: string): Promise<unknown>;
|
|
@@ -38,7 +39,15 @@ export function unlisten(name: string): void;
|
|
|
38
39
|
export type Unlisten = typeof unlisten;
|
|
39
40
|
|
|
40
41
|
/** Mock functions */
|
|
41
|
-
export function initServer(handlers:
|
|
42
|
+
export function initServer(handlers: {
|
|
43
|
+
query: (query: { table: string; selectExpressions: unknown }) => Promise<{
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
|
+
data: any;
|
|
46
|
+
dependencies: string[];
|
|
47
|
+
}>;
|
|
48
|
+
getCell?: () => { value: number };
|
|
49
|
+
'get-categories'?: () => { grouped: CategoryGroupEntity[] };
|
|
50
|
+
}): void;
|
|
42
51
|
export type InitServer = typeof initServer;
|
|
43
52
|
|
|
44
53
|
export function serverPush(name: string, args: unknown): void;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OptionlessModal } from '../../../client/state-types/modals';
|
|
2
|
+
import { UndoState as ServerUndoState } from '../../../server/undo';
|
|
2
3
|
|
|
3
4
|
export type UndoState = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
url: string | null;
|
|
6
|
+
// Right now, only the payees page uses this. It's only being set to
|
|
7
|
+
// `manage-rules` which is an optionless modal. Do we want to also
|
|
8
|
+
// support modals with options?
|
|
9
|
+
openModal: OptionlessModal | null;
|
|
7
10
|
selectedItems: {
|
|
8
11
|
name: string;
|
|
9
12
|
items: Set<string>;
|
|
10
13
|
} | null;
|
|
14
|
+
undoEvent: ServerUndoState | null;
|
|
11
15
|
};
|
|
12
16
|
|
|
13
17
|
export function setUndoState<K extends keyof Omit<UndoState, 'id'>>(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AccountEntity } from '../../types/models';
|
|
2
2
|
export declare function getGoCardlessAccounts(userId: any, userKey: any, id: any): Promise<any>;
|
|
3
|
-
export declare function reconcileTransactions(acctId: any, transactions: any, isBankSyncAccount?: boolean, strictIdChecking?: boolean, isPreview?: boolean): Promise<{
|
|
3
|
+
export declare function reconcileTransactions(acctId: any, transactions: any, isBankSyncAccount?: boolean, strictIdChecking?: boolean, isPreview?: boolean, defaultCleared?: boolean): Promise<{
|
|
4
4
|
added: any[];
|
|
5
5
|
updated: any[];
|
|
6
6
|
updatedPreview: any[];
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
export declare function addTransfer(transaction: any, transferredAccount: any): Promise<{
|
|
2
|
-
id: any;
|
|
3
|
-
payee: any;
|
|
4
|
-
} | {
|
|
5
2
|
category?: any;
|
|
6
3
|
id: any;
|
|
7
4
|
transfer_id: any;
|
|
8
|
-
payee?: undefined;
|
|
9
5
|
}>;
|
|
10
6
|
export declare function removeTransfer(transaction: any): Promise<{
|
|
11
7
|
id: any;
|
|
@@ -16,21 +12,14 @@ export declare function updateTransfer(transaction: any, transferredAccount: any
|
|
|
16
12
|
category: any;
|
|
17
13
|
}>;
|
|
18
14
|
export declare function onInsert(transaction: any): Promise<{
|
|
19
|
-
id: any;
|
|
20
|
-
payee: any;
|
|
21
|
-
} | {
|
|
22
15
|
category?: any;
|
|
23
16
|
id: any;
|
|
24
17
|
transfer_id: any;
|
|
25
|
-
payee?: undefined;
|
|
26
18
|
}>;
|
|
27
19
|
export declare function onDelete(transaction: any): Promise<void>;
|
|
28
20
|
export declare function onUpdate(transaction: any): Promise<{
|
|
29
21
|
id: any;
|
|
30
22
|
transfer_id: any;
|
|
31
|
-
} | {
|
|
32
|
-
id: any;
|
|
33
|
-
payee: any;
|
|
34
23
|
} | {
|
|
35
24
|
id: any;
|
|
36
25
|
category: any;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { AdminHandlers } from './types/handlers';
|
|
2
2
|
export declare const app: {
|
|
3
|
-
events:
|
|
3
|
+
events: import("mitt").Emitter<{
|
|
4
|
+
sync: import("../../types/server-events").ServerEvents["sync-event"];
|
|
5
|
+
'load-budget': {
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
4
9
|
handlers: AdminHandlers;
|
|
5
|
-
services:
|
|
6
|
-
unlistenServices:
|
|
10
|
+
services: (() => () => void)[];
|
|
11
|
+
unlistenServices: (() => void)[];
|
|
7
12
|
method<Name extends "users-get" | "user-delete-all" | "user-add" | "user-update" | "access-add" | "access-delete-all" | "access-get-available-users" | "transfer-ownership" | "owner-created">(name: Name, func: AdminHandlers[Name]): void;
|
|
8
|
-
service(func:
|
|
13
|
+
service(func: () => () => void): void;
|
|
9
14
|
combine(...apps: any[]): void;
|
|
10
15
|
startServices(): void;
|
|
11
16
|
stopServices(): void;
|
|
@@ -7,14 +7,16 @@ export interface AdminHandlers {
|
|
|
7
7
|
'user-delete-all': (ids: string[]) => Promise<{
|
|
8
8
|
someDeletionsFailed: boolean;
|
|
9
9
|
ids?: number[];
|
|
10
|
+
} | {
|
|
11
|
+
error: string;
|
|
10
12
|
}>;
|
|
11
13
|
'user-add': (user: Omit<UserEntity, 'id'>) => Promise<{
|
|
12
|
-
error
|
|
14
|
+
error: string;
|
|
13
15
|
} | {
|
|
14
16
|
id: string;
|
|
15
17
|
}>;
|
|
16
18
|
'user-update': (user: Omit<UserEntity, 'id'>) => Promise<{
|
|
17
|
-
error
|
|
19
|
+
error: string;
|
|
18
20
|
} | {
|
|
19
21
|
id: string;
|
|
20
22
|
}>;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
+
import { type Emitter } from 'mitt';
|
|
2
|
+
import { ServerEvents } from '../types/server-events';
|
|
3
|
+
type Events = {
|
|
4
|
+
sync: ServerEvents['sync-event'];
|
|
5
|
+
'load-budget': {
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
type UnlistenService = () => void;
|
|
10
|
+
type Service = () => UnlistenService;
|
|
1
11
|
declare class App<Handlers> {
|
|
2
|
-
events:
|
|
12
|
+
events: Emitter<Events>;
|
|
3
13
|
handlers: Handlers;
|
|
4
|
-
services:
|
|
5
|
-
unlistenServices:
|
|
14
|
+
services: Service[];
|
|
15
|
+
unlistenServices: UnlistenService[];
|
|
6
16
|
constructor();
|
|
7
17
|
method<Name extends string & keyof Handlers>(name: Name, func: Handlers[Name]): void;
|
|
8
|
-
service(func:
|
|
18
|
+
service(func: Service): void;
|
|
9
19
|
combine(...apps: any[]): void;
|
|
10
20
|
startServices(): void;
|
|
11
21
|
stopServices(): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { QueryState } from '../../shared/query';
|
|
1
2
|
export declare function quoteAlias(alias: any): any;
|
|
2
3
|
export declare function isAggregateQuery(queryState: any): boolean;
|
|
3
4
|
export type SchemaConfig = {
|
|
@@ -7,10 +8,7 @@ export type SchemaConfig = {
|
|
|
7
8
|
tableOptions: any;
|
|
8
9
|
}) => unknown);
|
|
9
10
|
tableFilters?: (name: string) => unknown[];
|
|
10
|
-
customizeQuery?:
|
|
11
|
-
table: string;
|
|
12
|
-
orderExpressions: unknown[];
|
|
13
|
-
}>(queryString: T) => T;
|
|
11
|
+
customizeQuery?: (queryString: QueryState) => QueryState;
|
|
14
12
|
views?: Record<string, {
|
|
15
13
|
fields?: Record<string, string>;
|
|
16
14
|
[key: `v_${string}`]: string | ((internalFields: any, publicFields: any) => string);
|
|
@@ -24,8 +22,8 @@ export declare function compileQuery(queryState: any, schema: any, schemaConfig?
|
|
|
24
22
|
where: string;
|
|
25
23
|
groupBy: string;
|
|
26
24
|
orderBy: string;
|
|
27
|
-
limit:
|
|
28
|
-
offset:
|
|
25
|
+
limit: number;
|
|
26
|
+
offset: number;
|
|
29
27
|
};
|
|
30
28
|
state: {
|
|
31
29
|
schema: any;
|
|
@@ -30,6 +30,12 @@ export declare function setZero({ month }: {
|
|
|
30
30
|
export declare function set3MonthAvg({ month, }: {
|
|
31
31
|
month: string;
|
|
32
32
|
}): Promise<void>;
|
|
33
|
+
export declare function set12MonthAvg({ month, }: {
|
|
34
|
+
month: string;
|
|
35
|
+
}): Promise<void>;
|
|
36
|
+
export declare function set6MonthAvg({ month, }: {
|
|
37
|
+
month: string;
|
|
38
|
+
}): Promise<void>;
|
|
33
39
|
export declare function setNMonthAvg({ month, N, category, }: {
|
|
34
40
|
month: string;
|
|
35
41
|
N: number;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { BudgetHandlers } from './types/handlers';
|
|
2
2
|
export declare const app: {
|
|
3
|
-
events:
|
|
3
|
+
events: import("mitt").Emitter<{
|
|
4
|
+
sync: import("../../types/server-events").ServerEvents["sync-event"];
|
|
5
|
+
'load-budget': {
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
4
9
|
handlers: BudgetHandlers;
|
|
5
|
-
services:
|
|
6
|
-
unlistenServices:
|
|
7
|
-
method<Name extends "budget/budget-amount" | "budget/copy-previous-month" | "budget/set-zero" | "budget/set-3month-avg" | "budget/check-templates" | "budget/apply-goal-template" | "budget/overwrite-goal-template" | "budget/cleanup-goal-template" | "budget/hold-for-next-month" | "budget/reset-hold" | "budget/cover-overspending" | "budget/transfer-available" | "budget/cover-overbudgeted" | "budget/transfer-category" | "budget/set-carryover" | "budget/apply-single-template" | "budget/set-n-month-avg" | "budget/copy-single-month" | "budget/apply-multiple-templates">(name: Name, func: BudgetHandlers[Name]): void;
|
|
8
|
-
service(func:
|
|
10
|
+
services: (() => () => void)[];
|
|
11
|
+
unlistenServices: (() => void)[];
|
|
12
|
+
method<Name extends "budget/budget-amount" | "budget/copy-previous-month" | "budget/set-zero" | "budget/set-3month-avg" | "budget/set-6month-avg" | "budget/set-12month-avg" | "budget/check-templates" | "budget/apply-goal-template" | "budget/overwrite-goal-template" | "budget/cleanup-goal-template" | "budget/hold-for-next-month" | "budget/reset-hold" | "budget/cover-overspending" | "budget/transfer-available" | "budget/cover-overbudgeted" | "budget/transfer-category" | "budget/set-carryover" | "budget/apply-single-template" | "budget/set-n-month-avg" | "budget/copy-single-month" | "budget/apply-multiple-templates">(name: Name, func: BudgetHandlers[Name]): void;
|
|
13
|
+
service(func: () => () => void): void;
|
|
9
14
|
combine(...apps: any[]): void;
|
|
10
15
|
startServices(): void;
|
|
11
16
|
stopServices(): void;
|
|
@@ -13,6 +13,10 @@ export interface BudgetHandlers {
|
|
|
13
13
|
|
|
14
14
|
'budget/set-3month-avg': (arg: { month: string }) => Promise<void>;
|
|
15
15
|
|
|
16
|
+
'budget/set-6month-avg': (arg: { month: string }) => Promise<void>;
|
|
17
|
+
|
|
18
|
+
'budget/set-12month-avg': (arg: { month: string }) => Promise<void>;
|
|
19
|
+
|
|
16
20
|
'budget/check-templates': () => Promise<Notification>;
|
|
17
21
|
|
|
18
22
|
'budget/apply-goal-template': (arg: {
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { DashboardHandlers } from './types/handlers';
|
|
2
2
|
export declare const app: {
|
|
3
|
-
events:
|
|
3
|
+
events: import("mitt").Emitter<{
|
|
4
|
+
sync: import("../../types/server-events").ServerEvents["sync-event"];
|
|
5
|
+
'load-budget': {
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
4
9
|
handlers: DashboardHandlers;
|
|
5
|
-
services:
|
|
6
|
-
unlistenServices:
|
|
10
|
+
services: (() => () => void)[];
|
|
11
|
+
unlistenServices: (() => void)[];
|
|
7
12
|
method<Name extends "dashboard-update" | "dashboard-update-widget" | "dashboard-reset" | "dashboard-add-widget" | "dashboard-remove-widget" | "dashboard-import">(name: Name, func: DashboardHandlers[Name]): void;
|
|
8
|
-
service(func:
|
|
13
|
+
service(func: () => () => void): void;
|
|
9
14
|
combine(...apps: any[]): void;
|
|
10
15
|
startServices(): void;
|
|
11
16
|
stopServices(): void;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { FiltersHandlers } from './types/handlers';
|
|
2
2
|
export declare const app: {
|
|
3
|
-
events:
|
|
3
|
+
events: import("mitt").Emitter<{
|
|
4
|
+
sync: import("../../types/server-events").ServerEvents["sync-event"];
|
|
5
|
+
'load-budget': {
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
4
9
|
handlers: FiltersHandlers;
|
|
5
|
-
services:
|
|
6
|
-
unlistenServices:
|
|
10
|
+
services: (() => () => void)[];
|
|
11
|
+
unlistenServices: (() => void)[];
|
|
7
12
|
method<Name extends "filter-create" | "filter-update" | "filter-delete">(name: Name, func: FiltersHandlers[Name]): void;
|
|
8
|
-
service(func:
|
|
13
|
+
service(func: () => () => void): void;
|
|
9
14
|
combine(...apps: any[]): void;
|
|
10
15
|
startServices(): void;
|
|
11
16
|
stopServices(): void;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { Handlers } from '../types/handlers';
|
|
2
2
|
export declare const app: {
|
|
3
|
-
events:
|
|
3
|
+
events: import("mitt").Emitter<{
|
|
4
|
+
sync: import("../types/server-events").ServerEvents["sync-event"];
|
|
5
|
+
'load-budget': {
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
4
9
|
handlers: Handlers;
|
|
5
|
-
services:
|
|
6
|
-
unlistenServices:
|
|
7
|
-
method<Name extends "
|
|
8
|
-
service(func:
|
|
10
|
+
services: (() => () => void)[];
|
|
11
|
+
unlistenServices: (() => void)[];
|
|
12
|
+
method<Name extends "transaction-update" | "undo" | "redo" | "transactions-batch-update" | "transaction-add" | "transaction-delete" | "transactions-parse-file" | "transactions-export" | "transactions-export-query" | "get-categories" | "get-earliest-transaction" | "get-budget-bounds" | "envelope-budget-month" | "tracking-budget-month" | "category-create" | "category-update" | "category-move" | "category-delete" | "category-group-create" | "category-group-update" | "category-group-move" | "category-group-delete" | "must-category-transfer" | "payee-create" | "common-payees-get" | "payees-get" | "payees-get-rule-counts" | "payees-merge" | "payees-batch-change" | "payees-check-orphaned" | "payees-get-orphaned" | "payees-get-rules" | "make-filters-from-conditions" | "getCell" | "getCells" | "getCellNamesInSheet" | "debugCell" | "create-query" | "query" | "account-update" | "accounts-get" | "account-properties" | "gocardless-accounts-link" | "simplefin-accounts-link" | "account-create" | "account-close" | "account-reopen" | "account-move" | "secret-set" | "secret-check" | "gocardless-poll-web-token" | "gocardless-status" | "simplefin-status" | "simplefin-accounts" | "simplefin-batch-sync" | "gocardless-get-banks" | "gocardless-poll-web-token-stop" | "gocardless-create-web-token" | "accounts-bank-sync" | "transactions-import" | "account-unlink" | "save-global-prefs" | "load-global-prefs" | "save-prefs" | "load-prefs" | "sync-reset" | "sync-repair" | "key-make" | "key-test" | "get-did-bootstrap" | "subscribe-needs-bootstrap" | "subscribe-get-login-methods" | "subscribe-bootstrap" | "subscribe-get-user" | "subscribe-change-password" | "subscribe-sign-in" | "subscribe-sign-out" | "subscribe-set-token" | "get-server-version" | "get-server-url" | "set-server-url" | "sync" | "validate-budget-name" | "unique-budget-name" | "get-budgets" | "get-remote-files" | "get-user-file-info" | "reset-budget-cache" | "upload-budget" | "download-budget" | "sync-budget" | "load-budget" | "create-demo-budget" | "close-budget" | "delete-budget" | "duplicate-budget" | "create-budget" | "import-budget" | "export-budget" | "upload-file-web" | "backups-get" | "backup-load" | "backup-make" | "get-last-opened-backup" | "app-focused" | "enable-openid" | "enable-password" | "get-openid-config" | "api/batch-budget-start" | "api/batch-budget-end" | "api/load-budget" | "api/download-budget" | "api/get-budgets" | "api/start-import" | "api/finish-import" | "api/abort-import" | "api/query" | "api/budget-months" | "api/budget-month" | "api/budget-set-amount" | "api/budget-set-carryover" | "api/budget-hold-for-next-month" | "api/budget-reset-hold" | "api/transactions-export" | "api/transactions-import" | "api/transactions-add" | "api/transactions-get" | "api/transaction-update" | "api/transaction-delete" | "api/sync" | "api/bank-sync" | "api/accounts-get" | "api/account-create" | "api/account-update" | "api/account-close" | "api/account-reopen" | "api/account-delete" | "api/account-balance" | "api/categories-get" | "api/category-groups-get" | "api/category-group-create" | "api/category-group-update" | "api/category-group-delete" | "api/category-create" | "api/category-update" | "api/category-delete" | "api/payees-get" | "api/common-payees-get" | "api/payee-create" | "api/payee-update" | "api/payee-delete" | "api/payees-merge" | "api/rules-get" | "api/payee-rules-get" | "api/rule-create" | "api/rule-update" | "api/rule-delete" | "budget/budget-amount" | "budget/copy-previous-month" | "budget/set-zero" | "budget/set-3month-avg" | "budget/set-6month-avg" | "budget/set-12month-avg" | "budget/check-templates" | "budget/apply-goal-template" | "budget/overwrite-goal-template" | "budget/cleanup-goal-template" | "budget/hold-for-next-month" | "budget/reset-hold" | "budget/cover-overspending" | "budget/transfer-available" | "budget/cover-overbudgeted" | "budget/transfer-category" | "budget/set-carryover" | "budget/apply-single-template" | "budget/set-n-month-avg" | "budget/copy-single-month" | "budget/apply-multiple-templates" | "dashboard-update" | "dashboard-update-widget" | "dashboard-reset" | "dashboard-add-widget" | "dashboard-remove-widget" | "dashboard-import" | "filter-create" | "filter-update" | "filter-delete" | "notes-save" | "preferences/save" | "preferences/get" | "report/create" | "report/update" | "report/delete" | "rule-validate" | "rule-add" | "rule-update" | "rule-delete" | "rule-delete-all" | "rule-apply-actions" | "rule-add-payee-rename" | "rules-get" | "rule-get" | "rules-run" | "schedule/create" | "schedule/update" | "schedule/delete" | "schedule/skip-next-date" | "schedule/post-transaction" | "schedule/force-run-service" | "schedule/discover" | "schedule/get-upcoming-dates" | "users-get" | "user-delete-all" | "user-add" | "user-update" | "access-add" | "access-delete-all" | "access-get-available-users" | "transfer-ownership" | "owner-created" | "tools/fix-split-transactions">(name: Name, func: Handlers[Name]): void;
|
|
13
|
+
service(func: () => () => void): void;
|
|
9
14
|
combine(...apps: any[]): void;
|
|
10
15
|
startServices(): void;
|
|
11
16
|
stopServices(): void;
|
|
@@ -14,7 +14,7 @@ export declare function init(config: InitConfig): Promise<{
|
|
|
14
14
|
getDataDir: typeof fs.getDataDir;
|
|
15
15
|
sendMessage: (msg: any, args: any) => void;
|
|
16
16
|
send: <K extends keyof Handlers, T extends Handlers[K]>(name: K, args?: Parameters<T>[0]) => Promise<Awaited<ReturnType<T>>>;
|
|
17
|
-
on: (name: any, func: any) =>
|
|
17
|
+
on: (name: any, func: any) => void;
|
|
18
18
|
q: typeof q;
|
|
19
19
|
db: typeof db;
|
|
20
20
|
}>;
|
|
@@ -22,7 +22,7 @@ export declare const lib: {
|
|
|
22
22
|
getDataDir: typeof fs.getDataDir;
|
|
23
23
|
sendMessage: (msg: any, args: any) => void;
|
|
24
24
|
send: <K extends keyof Handlers, T extends Handlers[K]>(name: K, args?: Parameters<T>[0]) => Promise<Awaited<ReturnType<T>>>;
|
|
25
|
-
on: (name: any, func: any) =>
|
|
25
|
+
on: (name: any, func: any) => void;
|
|
26
26
|
q: typeof q;
|
|
27
27
|
db: typeof db;
|
|
28
28
|
};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { NotesHandlers } from './types/handlers';
|
|
2
2
|
export declare const app: {
|
|
3
|
-
events:
|
|
3
|
+
events: import("mitt").Emitter<{
|
|
4
|
+
sync: import("../../types/server-events").ServerEvents["sync-event"];
|
|
5
|
+
'load-budget': {
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
4
9
|
handlers: NotesHandlers;
|
|
5
|
-
services:
|
|
6
|
-
unlistenServices:
|
|
10
|
+
services: (() => () => void)[];
|
|
11
|
+
unlistenServices: (() => void)[];
|
|
7
12
|
method<Name extends "notes-save">(name: Name, func: NotesHandlers[Name]): void;
|
|
8
|
-
service(func:
|
|
13
|
+
service(func: () => () => void): void;
|
|
9
14
|
combine(...apps: any[]): void;
|
|
10
15
|
startServices(): void;
|
|
11
16
|
stopServices(): void;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { PreferencesHandlers } from './types/handlers';
|
|
2
2
|
export declare const app: {
|
|
3
|
-
events:
|
|
3
|
+
events: import("mitt").Emitter<{
|
|
4
|
+
sync: import("../../types/server-events").ServerEvents["sync-event"];
|
|
5
|
+
'load-budget': {
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
4
9
|
handlers: PreferencesHandlers;
|
|
5
|
-
services:
|
|
6
|
-
unlistenServices:
|
|
10
|
+
services: (() => () => void)[];
|
|
11
|
+
unlistenServices: (() => void)[];
|
|
7
12
|
method<Name extends "preferences/save" | "preferences/get">(name: Name, func: PreferencesHandlers[Name]): void;
|
|
8
|
-
service(func:
|
|
13
|
+
service(func: () => () => void): void;
|
|
9
14
|
combine(...apps: any[]): void;
|
|
10
15
|
startServices(): void;
|
|
11
16
|
stopServices(): void;
|
|
@@ -13,6 +13,7 @@ export declare const reportModel: {
|
|
|
13
13
|
dateRange: string;
|
|
14
14
|
mode: string;
|
|
15
15
|
groupBy: string;
|
|
16
|
+
sortBy: import("../../types/models").sortByOpType;
|
|
16
17
|
interval: string;
|
|
17
18
|
balanceType: string;
|
|
18
19
|
showEmpty: boolean;
|
|
@@ -33,6 +34,7 @@ export declare const reportModel: {
|
|
|
33
34
|
date_range: string;
|
|
34
35
|
mode: string;
|
|
35
36
|
group_by: string;
|
|
37
|
+
sort_by: import("../../types/models").sortByOpType;
|
|
36
38
|
interval: string;
|
|
37
39
|
balance_type: string;
|
|
38
40
|
show_empty: number;
|
|
@@ -46,12 +48,17 @@ export declare const reportModel: {
|
|
|
46
48
|
};
|
|
47
49
|
};
|
|
48
50
|
export declare const app: {
|
|
49
|
-
events:
|
|
51
|
+
events: import("mitt").Emitter<{
|
|
52
|
+
sync: import("../../types/server-events").ServerEvents["sync-event"];
|
|
53
|
+
'load-budget': {
|
|
54
|
+
id: string;
|
|
55
|
+
};
|
|
56
|
+
}>;
|
|
50
57
|
handlers: ReportsHandlers;
|
|
51
|
-
services:
|
|
52
|
-
unlistenServices:
|
|
58
|
+
services: (() => () => void)[];
|
|
59
|
+
unlistenServices: (() => void)[];
|
|
53
60
|
method<Name extends "report/create" | "report/update" | "report/delete">(name: Name, func: ReportsHandlers[Name]): void;
|
|
54
|
-
service(func:
|
|
61
|
+
service(func: () => () => void): void;
|
|
55
62
|
combine(...apps: any[]): void;
|
|
56
63
|
startServices(): void;
|
|
57
64
|
stopServices(): void;
|