@actual-app/api 6.7.1 → 6.8.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 +6 -0
- package/@types/app/query.d.ts +19 -0
- package/@types/index.d.ts +7 -0
- package/@types/injected.d.ts +2 -0
- package/@types/jest.config.d.ts +9 -0
- package/@types/loot-core/client/actions/types.d.ts +6 -0
- package/@types/loot-core/client/constants.d.ts +29 -0
- package/@types/loot-core/client/platform.d.ts +4 -0
- package/@types/loot-core/client/state-types/account.d.ts +27 -0
- package/@types/loot-core/client/state-types/app.d.ts +37 -0
- package/@types/loot-core/client/state-types/budgets.d.ts +36 -0
- package/@types/loot-core/client/state-types/index.d.ts +41 -0
- package/@types/loot-core/client/state-types/modals.d.ts +292 -0
- package/@types/loot-core/client/state-types/notifications.d.ts +38 -0
- package/@types/loot-core/client/state-types/prefs.d.ts +28 -0
- package/@types/loot-core/client/state-types/queries.d.ts +69 -0
- package/@types/loot-core/client/state-types/user.d.ts +13 -0
- package/@types/loot-core/mocks/budget.d.ts +2 -0
- package/@types/loot-core/mocks/index.d.ts +26 -0
- package/@types/loot-core/mocks/random.d.ts +1 -0
- package/@types/loot-core/mocks/util.d.ts +7 -0
- package/@types/loot-core/platform/client/fetch/index.d.ts +48 -0
- package/@types/loot-core/platform/client/undo/index.d.ts +29 -0
- package/@types/loot-core/platform/exceptions/index.d.ts +5 -0
- package/@types/loot-core/platform/server/asyncStorage/index.d.ts +20 -0
- package/@types/loot-core/platform/server/connection/index.d.ts +23 -0
- package/@types/loot-core/platform/server/fetch/index.d.ts +4 -0
- package/@types/loot-core/platform/server/fs/index.d.ts +71 -0
- package/@types/loot-core/platform/server/fs/path-join.d.ts +2 -0
- package/@types/loot-core/platform/server/indexeddb/index.d.ts +24 -0
- package/@types/loot-core/platform/server/log/index.d.ts +9 -0
- package/@types/loot-core/platform/server/sqlite/index.d.ts +35 -0
- package/@types/loot-core/server/accounts/export-to-csv.d.ts +2 -0
- package/@types/loot-core/server/accounts/link.d.ts +1 -0
- package/@types/loot-core/server/accounts/ofx2json.d.ts +14 -0
- package/@types/loot-core/server/accounts/parse-file.d.ts +15 -0
- package/@types/loot-core/server/accounts/payees.d.ts +5 -0
- package/@types/loot-core/server/accounts/qif2json.d.ts +26 -0
- package/@types/loot-core/server/accounts/rules.d.ts +90 -0
- package/@types/loot-core/server/accounts/sync.d.ts +13 -0
- package/@types/loot-core/server/accounts/title/index.d.ts +3 -0
- package/@types/loot-core/server/accounts/title/lower-case.d.ts +1 -0
- package/@types/loot-core/server/accounts/title/specials.d.ts +1 -0
- package/@types/loot-core/server/accounts/transaction-rules.d.ts +47 -0
- package/@types/loot-core/server/accounts/transactions.d.ts +33 -0
- package/@types/loot-core/server/accounts/transfer.d.ts +37 -0
- package/@types/loot-core/server/accounts/xmlcamt2json.d.ts +10 -0
- package/@types/loot-core/server/api-models.d.ts +66 -0
- package/@types/loot-core/server/api.d.ts +3 -0
- package/@types/loot-core/server/app.d.ts +14 -0
- package/@types/loot-core/server/aql/compiler.d.ts +56 -0
- package/@types/loot-core/server/aql/exec.d.ts +9 -0
- package/@types/loot-core/server/aql/index.d.ts +5 -0
- package/@types/loot-core/server/aql/schema/executors.d.ts +6 -0
- package/@types/loot-core/server/aql/schema/index.d.ts +340 -0
- package/@types/loot-core/server/aql/schema/run-query.d.ts +6 -0
- package/@types/loot-core/server/aql/schema-helpers.d.ts +8 -0
- package/@types/loot-core/server/aql/views.d.ts +1 -0
- package/@types/loot-core/server/backups.d.ts +16 -0
- package/@types/loot-core/server/backups.test.d.ts +1 -0
- package/@types/loot-core/server/budget/actions.d.ts +63 -0
- package/@types/loot-core/server/budget/app.d.ts +12 -0
- package/@types/loot-core/server/budget/base.d.ts +17 -0
- package/@types/loot-core/server/budget/cleanup-template.d.ts +4 -0
- package/@types/loot-core/server/budget/goals/goalsAverage.d.ts +4 -0
- package/@types/loot-core/server/budget/goals/goalsBy.d.ts +5 -0
- package/@types/loot-core/server/budget/goals/goalsPercentage.d.ts +4 -0
- package/@types/loot-core/server/budget/goals/goalsRemainder.d.ts +8 -0
- package/@types/loot-core/server/budget/goals/goalsSchedule.d.ts +6 -0
- package/@types/loot-core/server/budget/goals/goalsSimple.d.ts +7 -0
- package/@types/loot-core/server/budget/goals/goalsSpend.d.ts +4 -0
- package/@types/loot-core/server/budget/goals/goalsWeek.d.ts +7 -0
- package/@types/loot-core/server/budget/goaltemplates.d.ts +12 -0
- package/@types/loot-core/server/budget/report.d.ts +2 -0
- package/@types/loot-core/server/budget/rollover.d.ts +4 -0
- package/@types/loot-core/server/budget/types/handlers.d.ts +77 -0
- package/@types/loot-core/server/budget/util.d.ts +4 -0
- package/@types/loot-core/server/cloud-storage.d.ts +33 -0
- package/@types/loot-core/server/db/index.d.ts +60 -0
- package/@types/loot-core/server/db/mappings.d.ts +3 -0
- package/@types/loot-core/server/db/sort.d.ts +11 -0
- package/@types/loot-core/server/db/util.d.ts +2 -0
- package/@types/loot-core/server/encryption-internals.d.ts +24 -0
- package/@types/loot-core/server/encryption-internals.web.d.ts +24 -0
- package/@types/loot-core/server/encryption.d.ts +41 -0
- package/@types/loot-core/server/encryption.test.d.ts +1 -0
- package/@types/loot-core/server/errors.d.ts +73 -0
- package/@types/loot-core/server/filters/app.d.ts +12 -0
- package/@types/loot-core/server/filters/types/handlers.d.ts +7 -0
- package/@types/loot-core/server/importers/actual.d.ts +4 -0
- package/@types/loot-core/server/importers/index.d.ts +6 -0
- package/@types/loot-core/server/importers/ynab4-types.d.ts +167 -0
- package/@types/loot-core/server/importers/ynab4.d.ts +5 -0
- package/@types/loot-core/server/importers/ynab5-types.d.ts +79 -0
- package/@types/loot-core/server/importers/ynab5.d.ts +5 -0
- package/@types/loot-core/server/main-app.d.ts +12 -0
- package/@types/loot-core/server/main.d.ts +28 -0
- package/@types/loot-core/server/main.test.d.ts +1 -0
- package/@types/loot-core/server/migrate/migrations.d.ts +9 -0
- package/@types/loot-core/server/models.d.ts +38 -0
- package/@types/loot-core/server/mutators.d.ts +17 -0
- package/@types/loot-core/server/notes/app.d.ts +12 -0
- package/@types/loot-core/server/notes/types/handlers.d.ts +3 -0
- package/@types/loot-core/server/platform.d.ts +3 -0
- package/@types/loot-core/server/platform.web.d.ts +3 -0
- package/@types/loot-core/server/polyfills.d.ts +0 -0
- package/@types/loot-core/server/post.d.ts +3 -0
- package/@types/loot-core/server/prefs.d.ts +10 -0
- package/@types/loot-core/server/reports/app.d.ts +12 -0
- package/@types/loot-core/server/reports/types/handlers.d.ts +6 -0
- package/@types/loot-core/server/rules/app.d.ts +12 -0
- package/@types/loot-core/server/rules/types/handlers.d.ts +42 -0
- package/@types/loot-core/server/schedules/app.d.ts +35 -0
- package/@types/loot-core/server/schedules/find-schedules.d.ts +1 -0
- package/@types/loot-core/server/schedules/types/handlers.d.ts +31 -0
- package/@types/loot-core/server/server-config.d.ts +10 -0
- package/@types/loot-core/server/sheet.d.ts +11 -0
- package/@types/loot-core/server/sheet.test.d.ts +1 -0
- package/@types/loot-core/server/spreadsheet/globals.d.ts +1 -0
- package/@types/loot-core/server/spreadsheet/graph-data-structure.d.ts +15 -0
- package/@types/loot-core/server/spreadsheet/spreadsheet.d.ts +79 -0
- package/@types/loot-core/server/spreadsheet/util.d.ts +5 -0
- package/@types/loot-core/server/sync/encoder.d.ts +9 -0
- package/@types/loot-core/server/sync/index.d.ts +47 -0
- package/@types/loot-core/server/sync/make-test-message.d.ts +10 -0
- package/@types/loot-core/server/sync/migrate.d.ts +2 -0
- package/@types/loot-core/server/sync/repair.d.ts +6 -0
- package/@types/loot-core/server/sync/reset.d.ts +6 -0
- package/@types/loot-core/server/sync/utils.d.ts +3 -0
- package/@types/loot-core/server/tools/app.d.ts +12 -0
- package/@types/loot-core/server/tools/types/handlers.d.ts +7 -0
- package/@types/loot-core/server/undo.d.ts +14 -0
- package/@types/loot-core/server/update.d.ts +1 -0
- package/@types/loot-core/server/util/budget-name.d.ts +2 -0
- package/@types/loot-core/server/util/rschedule.d.ts +5 -0
- package/@types/loot-core/shared/async.d.ts +3 -0
- package/@types/loot-core/shared/environment.d.ts +4 -0
- package/@types/loot-core/shared/errors.d.ts +22 -0
- package/@types/loot-core/shared/months.d.ts +62 -0
- package/@types/loot-core/shared/query.d.ts +31 -0
- package/@types/loot-core/shared/rules.d.ts +62 -0
- package/@types/loot-core/shared/schedules.d.ts +43 -0
- package/@types/loot-core/shared/transactions.d.ts +91 -0
- package/@types/loot-core/shared/util.d.ts +67 -0
- package/@types/loot-core/types/api-handlers.d.ts +158 -0
- package/@types/loot-core/types/budget.d.ts +7 -0
- package/@types/loot-core/types/file.d.ts +38 -0
- package/@types/loot-core/types/handlers.d.ts +23 -0
- package/@types/loot-core/types/models/account.d.ts +21 -0
- package/@types/loot-core/types/models/category-group.d.ts +11 -0
- package/@types/loot-core/types/models/category.d.ts +9 -0
- package/@types/loot-core/types/models/gocardless.d.ts +14 -0
- package/@types/loot-core/types/models/index.d.ts +12 -0
- package/@types/loot-core/types/models/note.d.ts +4 -0
- package/@types/loot-core/types/models/payee.d.ts +10 -0
- package/@types/loot-core/types/models/reports.d.ts +123 -0
- package/@types/loot-core/types/models/rule.d.ts +71 -0
- package/@types/loot-core/types/models/schedule.d.ts +58 -0
- package/@types/loot-core/types/models/simplefin.d.ts +10 -0
- package/@types/loot-core/types/models/transaction-filter.d.ts +7 -0
- package/@types/loot-core/types/models/transaction.d.ts +40 -0
- package/@types/loot-core/types/prefs.d.ts +69 -0
- package/@types/loot-core/types/server-events.d.ts +21 -0
- package/@types/loot-core/types/server-handlers.d.ts +344 -0
- package/@types/loot-core/types/util.d.ts +5 -0
- package/@types/methods.d.ts +85 -0
- package/@types/methods.test.d.ts +1 -0
- package/@types/migrations/1632571489012_remove_cache.d.ts +1 -0
- package/@types/utils.d.ts +2 -0
- package/@types/validateNodeVersion.d.ts +1 -0
- package/dist/app/bundle.api.js +430 -5643
- package/dist/methods.js +25 -1
- package/dist/methods.test.js +205 -5
- package/dist/package.json +7 -5
- package/package.json +7 -5
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { AccountEntity, CategoryEntity, CategoryGroupEntity, PayeeEntity } from '../types/models';
|
|
2
|
+
export type APIAccountEntity = Pick<AccountEntity, 'id' | 'name'> & {
|
|
3
|
+
offbudget: boolean;
|
|
4
|
+
closed: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const accountModel: {
|
|
7
|
+
toExternal(account: AccountEntity): APIAccountEntity;
|
|
8
|
+
fromExternal(account: APIAccountEntity): AccountEntity;
|
|
9
|
+
validate(account: AccountEntity, { update }?: {
|
|
10
|
+
update?: boolean;
|
|
11
|
+
}): AccountEntity;
|
|
12
|
+
};
|
|
13
|
+
export type APICategoryEntity = Pick<CategoryEntity, 'id' | 'name' | 'is_income' | 'hidden'> & {
|
|
14
|
+
group_id?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const categoryModel: {
|
|
17
|
+
toExternal(category: CategoryEntity): APICategoryEntity;
|
|
18
|
+
fromExternal(category: APICategoryEntity): {
|
|
19
|
+
id?: string;
|
|
20
|
+
name: string;
|
|
21
|
+
is_income?: boolean;
|
|
22
|
+
cat_group?: string;
|
|
23
|
+
sort_order?: number;
|
|
24
|
+
tombstone?: boolean;
|
|
25
|
+
hidden?: boolean;
|
|
26
|
+
};
|
|
27
|
+
validate(category: CategoryEntity, { update }?: {
|
|
28
|
+
update?: boolean;
|
|
29
|
+
}): {
|
|
30
|
+
hidden: number;
|
|
31
|
+
id?: string;
|
|
32
|
+
name: string;
|
|
33
|
+
is_income?: boolean;
|
|
34
|
+
cat_group?: string;
|
|
35
|
+
tombstone?: boolean;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export type APICategoryGroupEntity = Pick<CategoryGroupEntity, 'id' | 'name' | 'is_income' | 'hidden'> & {
|
|
39
|
+
categories: APICategoryEntity[];
|
|
40
|
+
};
|
|
41
|
+
export declare const categoryGroupModel: {
|
|
42
|
+
toExternal(group: CategoryGroupEntity): APICategoryGroupEntity;
|
|
43
|
+
fromExternal(group: APICategoryGroupEntity): CategoryGroupEntity;
|
|
44
|
+
validate(categoryGroup: CategoryGroupEntity, { update }?: {
|
|
45
|
+
update?: boolean;
|
|
46
|
+
}): {
|
|
47
|
+
hidden: number;
|
|
48
|
+
id?: string;
|
|
49
|
+
name: string;
|
|
50
|
+
is_income?: boolean;
|
|
51
|
+
tombstone?: boolean;
|
|
52
|
+
categories?: CategoryEntity[];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export type APIPayeeEntity = Pick<PayeeEntity, 'id' | 'name' | 'transfer_acct'>;
|
|
56
|
+
export declare const payeeModel: {
|
|
57
|
+
toExternal(payee: PayeeEntity): {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
transfer_acct: string;
|
|
61
|
+
};
|
|
62
|
+
fromExternal(payee: APIPayeeEntity): PayeeEntity;
|
|
63
|
+
validate(payee: PayeeEntity, { update }?: {
|
|
64
|
+
update?: boolean;
|
|
65
|
+
}): PayeeEntity;
|
|
66
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare class App<Handlers> {
|
|
2
|
+
events: any;
|
|
3
|
+
handlers: Handlers;
|
|
4
|
+
services: any;
|
|
5
|
+
unlistenServices: any;
|
|
6
|
+
constructor();
|
|
7
|
+
method<Name extends string & keyof Handlers>(name: Name, func: Handlers[Name]): void;
|
|
8
|
+
service(func: any): void;
|
|
9
|
+
combine(...apps: any[]): void;
|
|
10
|
+
startServices(): void;
|
|
11
|
+
stopServices(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare function createApp<T>(): App<T>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare function quoteAlias(alias: any): any;
|
|
2
|
+
export declare function isAggregateQuery(queryState: any): boolean;
|
|
3
|
+
export type SchemaConfig = {
|
|
4
|
+
tableViews?: Record<string, unknown> | ((name: string, config: {
|
|
5
|
+
withDead: any;
|
|
6
|
+
isJoin: any;
|
|
7
|
+
tableOptions: any;
|
|
8
|
+
}) => unknown);
|
|
9
|
+
tableFilters?: (name: string) => unknown[];
|
|
10
|
+
customizeQuery?: <T extends {
|
|
11
|
+
table: string;
|
|
12
|
+
orderExpressions: unknown[];
|
|
13
|
+
}>(queryString: T) => T;
|
|
14
|
+
views?: Record<string, {
|
|
15
|
+
fields?: Record<string, string>;
|
|
16
|
+
[key: `v_${string}`]: string | ((internalFields: any, publicFields: any) => string);
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
export declare function compileQuery(queryState: any, schema: any, schemaConfig?: SchemaConfig): {
|
|
20
|
+
sqlPieces: {
|
|
21
|
+
select: string;
|
|
22
|
+
from: unknown;
|
|
23
|
+
joins: string;
|
|
24
|
+
where: string;
|
|
25
|
+
groupBy: string;
|
|
26
|
+
orderBy: string;
|
|
27
|
+
limit: any;
|
|
28
|
+
offset: any;
|
|
29
|
+
};
|
|
30
|
+
state: {
|
|
31
|
+
schema: any;
|
|
32
|
+
implicitTableName: any;
|
|
33
|
+
implicitTableId: unknown;
|
|
34
|
+
paths: Map<any, any>;
|
|
35
|
+
dependencies: any[];
|
|
36
|
+
compileStack: any[];
|
|
37
|
+
outputTypes: Map<any, any>;
|
|
38
|
+
validateRefs: any;
|
|
39
|
+
namedParameters: any[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export declare function defaultConstructQuery(queryState: any, state: any, sqlPieces: any): string;
|
|
43
|
+
export declare function generateSQLWithState(queryState: any, schema?: unknown, schemaConfig?: unknown): {
|
|
44
|
+
sql: string;
|
|
45
|
+
state: {
|
|
46
|
+
schema: any;
|
|
47
|
+
implicitTableName: any;
|
|
48
|
+
implicitTableId: unknown;
|
|
49
|
+
paths: Map<any, any>;
|
|
50
|
+
dependencies: any[];
|
|
51
|
+
compileStack: any[];
|
|
52
|
+
outputTypes: Map<any, any>;
|
|
53
|
+
validateRefs: any;
|
|
54
|
+
namedParameters: any[];
|
|
55
|
+
};
|
|
56
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function execQuery(queryState: any, state: any, sqlPieces: any, params: any, outputTypes: any): Promise<any>;
|
|
2
|
+
export declare function runCompiledQuery(query: any, pieces: any, state: any, { params, executors }?: {
|
|
3
|
+
params?: {};
|
|
4
|
+
executors?: {};
|
|
5
|
+
}): Promise<any>;
|
|
6
|
+
export declare function runQuery(schema: any, schemaConfig: any, query: any, options: any): Promise<{
|
|
7
|
+
data: any;
|
|
8
|
+
dependencies: any[];
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { convertForInsert, convertForUpdate, convertFromSelect, convertInputType, } from './schema-helpers';
|
|
2
|
+
export { compileQuery } from './compiler';
|
|
3
|
+
export { makeViews } from './views';
|
|
4
|
+
export { schema, schemaConfig } from './schema';
|
|
5
|
+
export { runQuery, runCompiledQuery } from './schema/run-query';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare function execTransactions(state: any, query: any, sql: any, params: any, outputTypes: any): Promise<any>;
|
|
2
|
+
export declare function isHappyPathQuery(queryState: any): boolean;
|
|
3
|
+
export declare const schemaExecutors: {
|
|
4
|
+
transactions: typeof execTransactions;
|
|
5
|
+
};
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import { SchemaConfig } from '../compiler';
|
|
2
|
+
export declare const schema: {
|
|
3
|
+
transactions: {
|
|
4
|
+
id: {
|
|
5
|
+
type: string;
|
|
6
|
+
};
|
|
7
|
+
is_parent: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
is_child: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
parent_id: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
account: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
category: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
amount: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
payee: {
|
|
26
|
+
type: string;
|
|
27
|
+
};
|
|
28
|
+
notes: {
|
|
29
|
+
type: string;
|
|
30
|
+
};
|
|
31
|
+
date: {
|
|
32
|
+
type: string;
|
|
33
|
+
};
|
|
34
|
+
imported_id: {
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
error: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
imported_payee: {
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
starting_balance_flag: {
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
transfer_id: {
|
|
47
|
+
type: string;
|
|
48
|
+
};
|
|
49
|
+
sort_order: {
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
cleared: {
|
|
53
|
+
type: string;
|
|
54
|
+
};
|
|
55
|
+
reconciled: {
|
|
56
|
+
type: string;
|
|
57
|
+
};
|
|
58
|
+
tombstone: {
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
61
|
+
schedule: {
|
|
62
|
+
type: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
payees: {
|
|
66
|
+
id: {
|
|
67
|
+
type: string;
|
|
68
|
+
};
|
|
69
|
+
name: {
|
|
70
|
+
type: string;
|
|
71
|
+
};
|
|
72
|
+
transfer_acct: {
|
|
73
|
+
type: string;
|
|
74
|
+
};
|
|
75
|
+
tombstone: {
|
|
76
|
+
type: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
accounts: {
|
|
80
|
+
id: {
|
|
81
|
+
type: string;
|
|
82
|
+
};
|
|
83
|
+
name: {
|
|
84
|
+
type: string;
|
|
85
|
+
};
|
|
86
|
+
offbudget: {
|
|
87
|
+
type: string;
|
|
88
|
+
};
|
|
89
|
+
closed: {
|
|
90
|
+
type: string;
|
|
91
|
+
};
|
|
92
|
+
sort_order: {
|
|
93
|
+
type: string;
|
|
94
|
+
};
|
|
95
|
+
tombstone: {
|
|
96
|
+
type: string;
|
|
97
|
+
};
|
|
98
|
+
account_sync_source: {
|
|
99
|
+
type: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
categories: {
|
|
103
|
+
id: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
name: {
|
|
107
|
+
type: string;
|
|
108
|
+
};
|
|
109
|
+
is_income: {
|
|
110
|
+
type: string;
|
|
111
|
+
};
|
|
112
|
+
hidden: {
|
|
113
|
+
type: string;
|
|
114
|
+
};
|
|
115
|
+
group: {
|
|
116
|
+
type: string;
|
|
117
|
+
};
|
|
118
|
+
sort_order: {
|
|
119
|
+
type: string;
|
|
120
|
+
};
|
|
121
|
+
tombstone: {
|
|
122
|
+
type: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
category_groups: {
|
|
126
|
+
id: {
|
|
127
|
+
type: string;
|
|
128
|
+
};
|
|
129
|
+
name: {
|
|
130
|
+
type: string;
|
|
131
|
+
};
|
|
132
|
+
is_income: {
|
|
133
|
+
type: string;
|
|
134
|
+
};
|
|
135
|
+
hidden: {
|
|
136
|
+
type: string;
|
|
137
|
+
};
|
|
138
|
+
sort_order: {
|
|
139
|
+
type: string;
|
|
140
|
+
};
|
|
141
|
+
tombstone: {
|
|
142
|
+
type: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
schedules: {
|
|
146
|
+
id: {
|
|
147
|
+
type: string;
|
|
148
|
+
};
|
|
149
|
+
name: {
|
|
150
|
+
type: string;
|
|
151
|
+
};
|
|
152
|
+
rule: {
|
|
153
|
+
type: string;
|
|
154
|
+
};
|
|
155
|
+
next_date: {
|
|
156
|
+
type: string;
|
|
157
|
+
};
|
|
158
|
+
completed: {
|
|
159
|
+
type: string;
|
|
160
|
+
};
|
|
161
|
+
posts_transaction: {
|
|
162
|
+
type: string;
|
|
163
|
+
};
|
|
164
|
+
tombstone: {
|
|
165
|
+
type: string;
|
|
166
|
+
};
|
|
167
|
+
_payee: {
|
|
168
|
+
type: string;
|
|
169
|
+
};
|
|
170
|
+
_account: {
|
|
171
|
+
type: string;
|
|
172
|
+
};
|
|
173
|
+
_amount: {
|
|
174
|
+
type: string;
|
|
175
|
+
};
|
|
176
|
+
_amountOp: {
|
|
177
|
+
type: string;
|
|
178
|
+
};
|
|
179
|
+
_date: {
|
|
180
|
+
type: string;
|
|
181
|
+
};
|
|
182
|
+
_conditions: {
|
|
183
|
+
type: string;
|
|
184
|
+
};
|
|
185
|
+
_actions: {
|
|
186
|
+
type: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
rules: {
|
|
190
|
+
id: {
|
|
191
|
+
type: string;
|
|
192
|
+
};
|
|
193
|
+
stage: {
|
|
194
|
+
type: string;
|
|
195
|
+
};
|
|
196
|
+
conditions_op: {
|
|
197
|
+
type: string;
|
|
198
|
+
};
|
|
199
|
+
conditions: {
|
|
200
|
+
type: string;
|
|
201
|
+
};
|
|
202
|
+
actions: {
|
|
203
|
+
type: string;
|
|
204
|
+
};
|
|
205
|
+
tombstone: {
|
|
206
|
+
type: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
notes: {
|
|
210
|
+
id: {
|
|
211
|
+
type: string;
|
|
212
|
+
};
|
|
213
|
+
note: {
|
|
214
|
+
type: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
transaction_filters: {
|
|
218
|
+
id: {
|
|
219
|
+
type: string;
|
|
220
|
+
};
|
|
221
|
+
name: {
|
|
222
|
+
type: string;
|
|
223
|
+
};
|
|
224
|
+
conditions_op: {
|
|
225
|
+
type: string;
|
|
226
|
+
};
|
|
227
|
+
conditions: {
|
|
228
|
+
type: string;
|
|
229
|
+
};
|
|
230
|
+
tombstone: {
|
|
231
|
+
type: string;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
custom_reports: {
|
|
235
|
+
id: {
|
|
236
|
+
type: string;
|
|
237
|
+
};
|
|
238
|
+
name: {
|
|
239
|
+
type: string;
|
|
240
|
+
};
|
|
241
|
+
start_date: {
|
|
242
|
+
type: string;
|
|
243
|
+
};
|
|
244
|
+
end_date: {
|
|
245
|
+
type: string;
|
|
246
|
+
};
|
|
247
|
+
date_static: {
|
|
248
|
+
type: string;
|
|
249
|
+
};
|
|
250
|
+
date_range: {
|
|
251
|
+
type: string;
|
|
252
|
+
};
|
|
253
|
+
mode: {
|
|
254
|
+
type: string;
|
|
255
|
+
};
|
|
256
|
+
group_by: {
|
|
257
|
+
type: string;
|
|
258
|
+
};
|
|
259
|
+
balance_type: {
|
|
260
|
+
type: string;
|
|
261
|
+
};
|
|
262
|
+
show_empty: {
|
|
263
|
+
type: string;
|
|
264
|
+
};
|
|
265
|
+
show_offbudget: {
|
|
266
|
+
type: string;
|
|
267
|
+
};
|
|
268
|
+
show_hidden: {
|
|
269
|
+
type: string;
|
|
270
|
+
};
|
|
271
|
+
show_uncategorized: {
|
|
272
|
+
type: string;
|
|
273
|
+
};
|
|
274
|
+
selected_categories: {
|
|
275
|
+
type: string;
|
|
276
|
+
};
|
|
277
|
+
graph_type: {
|
|
278
|
+
type: string;
|
|
279
|
+
};
|
|
280
|
+
conditions: {
|
|
281
|
+
type: string;
|
|
282
|
+
};
|
|
283
|
+
conditions_op: {
|
|
284
|
+
type: string;
|
|
285
|
+
};
|
|
286
|
+
metadata: {
|
|
287
|
+
type: string;
|
|
288
|
+
};
|
|
289
|
+
interval: {
|
|
290
|
+
type: string;
|
|
291
|
+
};
|
|
292
|
+
color_scheme: {
|
|
293
|
+
type: string;
|
|
294
|
+
};
|
|
295
|
+
tombstone: {
|
|
296
|
+
type: string;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
reflect_budgets: {
|
|
300
|
+
id: {
|
|
301
|
+
type: string;
|
|
302
|
+
};
|
|
303
|
+
month: {
|
|
304
|
+
type: string;
|
|
305
|
+
};
|
|
306
|
+
category: {
|
|
307
|
+
type: string;
|
|
308
|
+
};
|
|
309
|
+
amount: {
|
|
310
|
+
type: string;
|
|
311
|
+
};
|
|
312
|
+
carryover: {
|
|
313
|
+
type: string;
|
|
314
|
+
};
|
|
315
|
+
goal: {
|
|
316
|
+
type: string;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
zero_budgets: {
|
|
320
|
+
id: {
|
|
321
|
+
type: string;
|
|
322
|
+
};
|
|
323
|
+
month: {
|
|
324
|
+
type: string;
|
|
325
|
+
};
|
|
326
|
+
category: {
|
|
327
|
+
type: string;
|
|
328
|
+
};
|
|
329
|
+
amount: {
|
|
330
|
+
type: string;
|
|
331
|
+
};
|
|
332
|
+
carryover: {
|
|
333
|
+
type: string;
|
|
334
|
+
};
|
|
335
|
+
goal: {
|
|
336
|
+
type: string;
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
export declare const schemaConfig: SchemaConfig;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Query, type QueryState } from '../../../shared/query';
|
|
2
|
+
export declare function runCompiledQuery(query: any, sqlPieces: any, state: any, params?: unknown): Promise<any>;
|
|
3
|
+
export declare function runQuery(query: Query | QueryState, params?: unknown): Promise<{
|
|
4
|
+
data: any;
|
|
5
|
+
dependencies: any[];
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function convertInputType(value: any, type: any): any;
|
|
2
|
+
export declare function convertOutputType(value: any, type: any): any;
|
|
3
|
+
export declare function conform(schema: any, schemaConfig: any, table: any, obj: any, { skipNull }?: {
|
|
4
|
+
skipNull?: boolean;
|
|
5
|
+
}): any;
|
|
6
|
+
export declare function convertForInsert(schema: any, schemaConfig: any, table: any, rawObj: any): any;
|
|
7
|
+
export declare function convertForUpdate(schema: any, schemaConfig: any, table: any, rawObj: any): any;
|
|
8
|
+
export declare function convertFromSelect(schema: any, schemaConfig: any, table: any, obj: any): {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function makeViews(schema: any, schemaConfig: any): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type Backup = {
|
|
2
|
+
id: string;
|
|
3
|
+
date: string;
|
|
4
|
+
} | LatestBackup;
|
|
5
|
+
type LatestBackup = {
|
|
6
|
+
id: string;
|
|
7
|
+
date: null;
|
|
8
|
+
isLatest: true;
|
|
9
|
+
};
|
|
10
|
+
export declare function getAvailableBackups(id: string): Promise<Backup[]>;
|
|
11
|
+
export declare function updateBackups(backups: any): Promise<any[]>;
|
|
12
|
+
export declare function makeBackup(id: string): Promise<void>;
|
|
13
|
+
export declare function loadBackup(id: string, backupId: string): Promise<void>;
|
|
14
|
+
export declare function startBackupService(id: string): void;
|
|
15
|
+
export declare function stopBackupService(): void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare function getSheetValue(sheetName: string, cell: string): Promise<number>;
|
|
2
|
+
export declare function isReflectBudget(): boolean;
|
|
3
|
+
export declare function getBudget({ category, month, }: {
|
|
4
|
+
category: string;
|
|
5
|
+
month: string;
|
|
6
|
+
}): number;
|
|
7
|
+
export declare function setBudget({ category, month, amount, }: {
|
|
8
|
+
category: string;
|
|
9
|
+
month: string;
|
|
10
|
+
amount: unknown;
|
|
11
|
+
}): Promise<void>;
|
|
12
|
+
export declare function setGoal({ month, category, goal }: {
|
|
13
|
+
month: any;
|
|
14
|
+
category: any;
|
|
15
|
+
goal: any;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
export declare function setBuffer(month: string, amount: unknown): Promise<void>;
|
|
18
|
+
export declare function copyPreviousMonth({ month, }: {
|
|
19
|
+
month: string;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
export declare function copySinglePreviousMonth({ month, category, }: {
|
|
22
|
+
month: string;
|
|
23
|
+
category: string;
|
|
24
|
+
}): Promise<void>;
|
|
25
|
+
export declare function setZero({ month }: {
|
|
26
|
+
month: string;
|
|
27
|
+
}): Promise<void>;
|
|
28
|
+
export declare function set3MonthAvg({ month, }: {
|
|
29
|
+
month: string;
|
|
30
|
+
}): Promise<void>;
|
|
31
|
+
export declare function setNMonthAvg({ month, N, category, }: {
|
|
32
|
+
month: string;
|
|
33
|
+
N: number;
|
|
34
|
+
category: string;
|
|
35
|
+
}): Promise<void>;
|
|
36
|
+
export declare function holdForNextMonth({ month, amount, }: {
|
|
37
|
+
month: string;
|
|
38
|
+
amount: number;
|
|
39
|
+
}): Promise<boolean>;
|
|
40
|
+
export declare function resetHold({ month }: {
|
|
41
|
+
month: string;
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
export declare function coverOverspending({ month, to, from, }: {
|
|
44
|
+
month: string;
|
|
45
|
+
to: string;
|
|
46
|
+
from: string;
|
|
47
|
+
}): Promise<void>;
|
|
48
|
+
export declare function transferAvailable({ month, amount, category, }: {
|
|
49
|
+
month: string;
|
|
50
|
+
amount: number;
|
|
51
|
+
category: string;
|
|
52
|
+
}): Promise<void>;
|
|
53
|
+
export declare function transferCategory({ month, amount, from, to, }: {
|
|
54
|
+
month: string;
|
|
55
|
+
amount: number;
|
|
56
|
+
to: string;
|
|
57
|
+
from: string;
|
|
58
|
+
}): Promise<void>;
|
|
59
|
+
export declare function setCategoryCarryover({ startMonth, category, flag, }: {
|
|
60
|
+
startMonth: string;
|
|
61
|
+
category: string;
|
|
62
|
+
flag: boolean;
|
|
63
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BudgetHandlers } from './types/handlers';
|
|
2
|
+
export declare const app: {
|
|
3
|
+
events: any;
|
|
4
|
+
handlers: BudgetHandlers;
|
|
5
|
+
services: any;
|
|
6
|
+
unlistenServices: any;
|
|
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/transfer-category" | "budget/set-carryover" | "budget/apply-single-template" | "budget/set-n-month-avg" | "budget/copy-single-month">(name: Name, func: BudgetHandlers[Name]): void;
|
|
8
|
+
service(func: any): void;
|
|
9
|
+
combine(...apps: any[]): void;
|
|
10
|
+
startServices(): void;
|
|
11
|
+
stopServices(): void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function getBudgetType(): any;
|
|
2
|
+
export declare function getBudgetRange(start: string, end: string): {
|
|
3
|
+
start: string;
|
|
4
|
+
end: string;
|
|
5
|
+
range: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare function triggerBudgetChanges(oldValues: any, newValues: any): void;
|
|
8
|
+
export declare function doTransfer(categoryIds: any, transferId: any): Promise<void>;
|
|
9
|
+
export declare function createBudget(months: any): Promise<void>;
|
|
10
|
+
export declare function createAllBudgets(): Promise<{
|
|
11
|
+
start: string;
|
|
12
|
+
end: string;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function setType(type: any): Promise<{
|
|
15
|
+
start: string;
|
|
16
|
+
end: string;
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function goalsRemainder(template: any, budgetAvailable: any, remainder_scale: any, to_budget: any): Promise<{
|
|
2
|
+
to_budget: any;
|
|
3
|
+
}>;
|
|
4
|
+
export declare function findRemainder(priority_list: any, categories: any, category_templates: any): {
|
|
5
|
+
remainder_found: any;
|
|
6
|
+
remainder_priority: any;
|
|
7
|
+
remainder_weight_total: number;
|
|
8
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function goalsSchedule(scheduleFlag: any, template_lines: any, current_month: any, balance: any, remainder: any, last_month_balance: any, to_budget: any, errors: any, category: any): Promise<{
|
|
2
|
+
to_budget: any;
|
|
3
|
+
errors: any;
|
|
4
|
+
remainder: any;
|
|
5
|
+
scheduleFlag: any;
|
|
6
|
+
}>;
|