@actual-app/api 26.3.0 → 26.4.0-nightly.20260305
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 +10 -9
- package/@types/app/bundle.api.d.ts.map +1 -0
- package/@types/app/query.d.ts +1 -0
- package/@types/app/query.d.ts.map +1 -0
- package/@types/index.d.ts +2 -1
- package/@types/index.d.ts.map +1 -0
- package/@types/injected.d.ts +1 -0
- package/@types/injected.d.ts.map +1 -0
- package/@types/methods.d.ts +8 -10
- package/@types/methods.d.ts.map +1 -0
- package/@types/migrations/1632571489012_remove_cache.d.ts +1 -0
- package/@types/migrations/1632571489012_remove_cache.d.ts.map +1 -0
- package/@types/migrations/1722717601000_reports_move_selected_categories.d.ts +1 -0
- package/@types/migrations/1722717601000_reports_move_selected_categories.d.ts.map +1 -0
- package/@types/migrations/1722804019000_create_dashboard_table.d.ts +1 -0
- package/@types/migrations/1722804019000_create_dashboard_table.d.ts.map +1 -0
- package/@types/migrations/1723665565000_prefs.d.ts +1 -0
- package/@types/migrations/1723665565000_prefs.d.ts.map +1 -0
- package/@types/migrations/1765518577215_multiple_dashboards.d.ts +1 -0
- package/@types/migrations/1765518577215_multiple_dashboards.d.ts.map +1 -0
- package/@types/utils.d.ts +1 -0
- package/@types/utils.d.ts.map +1 -0
- package/@types/validateNodeVersion.d.ts +1 -0
- package/@types/validateNodeVersion.d.ts.map +1 -0
- package/@types/vitest.config.d.ts +1 -0
- package/@types/vitest.config.d.ts.map +1 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/app/bundle.api.js +275 -230
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/@types/loot-core/src/mocks/budget.d.ts +0 -2
- package/@types/loot-core/src/mocks/index.d.ts +0 -10
- package/@types/loot-core/src/mocks/random.d.ts +0 -1
- package/@types/loot-core/src/mocks/util.d.ts +0 -8
- package/@types/loot-core/src/platform/exceptions/index.d.ts +0 -2
- package/@types/loot-core/src/platform/server/asyncStorage/index-types.d.ts +0 -19
- package/@types/loot-core/src/platform/server/asyncStorage/index.d.ts +0 -11
- package/@types/loot-core/src/platform/server/connection/index-types.d.ts +0 -11
- package/@types/loot-core/src/platform/server/connection/index.d.ts +0 -5
- package/@types/loot-core/src/platform/server/fetch/index.d.ts +0 -1
- package/@types/loot-core/src/platform/server/fs/index.d.ts +0 -22
- package/@types/loot-core/src/platform/server/fs/path-join.d.ts +0 -1
- package/@types/loot-core/src/platform/server/fs/shared.d.ts +0 -3
- package/@types/loot-core/src/platform/server/indexeddb/index.d.ts +0 -15
- package/@types/loot-core/src/platform/server/log/index.d.ts +0 -11
- package/@types/loot-core/src/platform/server/sqlite/index.d.ts +0 -53
- package/@types/loot-core/src/platform/server/sqlite/normalise.d.ts +0 -1
- package/@types/loot-core/src/platform/server/sqlite/unicodeLike.d.ts +0 -1
- package/@types/loot-core/src/server/accounts/app.d.ts +0 -159
- package/@types/loot-core/src/server/accounts/link.d.ts +0 -6
- package/@types/loot-core/src/server/accounts/payees.d.ts +0 -5
- package/@types/loot-core/src/server/accounts/sync.d.ts +0 -25
- package/@types/loot-core/src/server/accounts/title/index.d.ts +0 -3
- package/@types/loot-core/src/server/accounts/title/lower-case.d.ts +0 -1
- package/@types/loot-core/src/server/accounts/title/specials.d.ts +0 -1
- package/@types/loot-core/src/server/admin/app.d.ts +0 -70
- package/@types/loot-core/src/server/api-models.d.ts +0 -94
- package/@types/loot-core/src/server/api.d.ts +0 -2
- package/@types/loot-core/src/server/api.test.d.ts +0 -1
- package/@types/loot-core/src/server/app.d.ts +0 -24
- package/@types/loot-core/src/server/aql/compiler.d.ts +0 -56
- package/@types/loot-core/src/server/aql/exec.d.ts +0 -17
- package/@types/loot-core/src/server/aql/index.d.ts +0 -13
- package/@types/loot-core/src/server/aql/schema/executors.d.ts +0 -3
- package/@types/loot-core/src/server/aql/schema/index.d.ts +0 -427
- package/@types/loot-core/src/server/aql/schema-helpers.d.ts +0 -8
- package/@types/loot-core/src/server/aql/views.d.ts +0 -1
- package/@types/loot-core/src/server/auth/app.d.ts +0 -144
- package/@types/loot-core/src/server/budget/actions.d.ts +0 -85
- package/@types/loot-core/src/server/budget/app.d.ts +0 -118
- package/@types/loot-core/src/server/budget/base.d.ts +0 -18
- package/@types/loot-core/src/server/budget/category-template-context.d.ts +0 -54
- package/@types/loot-core/src/server/budget/cleanup-template.d.ts +0 -11
- package/@types/loot-core/src/server/budget/envelope.d.ts +0 -7
- package/@types/loot-core/src/server/budget/goal-template.d.ts +0 -38
- package/@types/loot-core/src/server/budget/report.d.ts +0 -5
- package/@types/loot-core/src/server/budget/schedule-template.d.ts +0 -8
- package/@types/loot-core/src/server/budget/statements.d.ts +0 -9
- package/@types/loot-core/src/server/budget/template-notes.d.ts +0 -13
- package/@types/loot-core/src/server/budget/util.d.ts +0 -4
- package/@types/loot-core/src/server/budgetfiles/app.d.ts +0 -137
- package/@types/loot-core/src/server/budgetfiles/backups.d.ts +0 -16
- package/@types/loot-core/src/server/cloud-storage.d.ts +0 -40
- package/@types/loot-core/src/server/dashboard/app.d.ts +0 -54
- package/@types/loot-core/src/server/db/index.d.ts +0 -138
- package/@types/loot-core/src/server/db/mappings.d.ts +0 -3
- package/@types/loot-core/src/server/db/sort.d.ts +0 -11
- package/@types/loot-core/src/server/db/types/index.d.ts +0 -287
- package/@types/loot-core/src/server/db/util.d.ts +0 -2
- package/@types/loot-core/src/server/encryption/app.d.ts +0 -40
- package/@types/loot-core/src/server/encryption/encryption-internals.d.ts +0 -22
- package/@types/loot-core/src/server/encryption/index.d.ts +0 -40
- package/@types/loot-core/src/server/errors.d.ts +0 -92
- package/@types/loot-core/src/server/filters/app.d.ts +0 -26
- package/@types/loot-core/src/server/importers/actual.d.ts +0 -3
- package/@types/loot-core/src/server/importers/index.d.ts +0 -4
- package/@types/loot-core/src/server/importers/ynab4-types.d.ts +0 -135
- package/@types/loot-core/src/server/importers/ynab4.d.ts +0 -4
- package/@types/loot-core/src/server/importers/ynab5-types.d.ts +0 -181
- package/@types/loot-core/src/server/importers/ynab5.d.ts +0 -4
- package/@types/loot-core/src/server/main-app.d.ts +0 -17
- package/@types/loot-core/src/server/main.d.ts +0 -50
- package/@types/loot-core/src/server/main.test.d.ts +0 -1
- package/@types/loot-core/src/server/migrate/migrations.d.ts +0 -9
- package/@types/loot-core/src/server/models.d.ts +0 -39
- package/@types/loot-core/src/server/mutators.d.ts +0 -17
- package/@types/loot-core/src/server/notes/app.d.ts +0 -23
- package/@types/loot-core/src/server/payees/app.d.ts +0 -48
- package/@types/loot-core/src/server/polyfills.d.ts +0 -1
- package/@types/loot-core/src/server/post.d.ts +0 -5
- package/@types/loot-core/src/server/preferences/app.d.ts +0 -43
- package/@types/loot-core/src/server/prefs.d.ts +0 -15
- package/@types/loot-core/src/server/reports/app.d.ts +0 -35
- package/@types/loot-core/src/server/rules/action.d.ts +0 -24
- package/@types/loot-core/src/server/rules/app.d.ts +0 -67
- package/@types/loot-core/src/server/rules/condition.d.ts +0 -59
- package/@types/loot-core/src/server/rules/customFunctions.d.ts +0 -13
- package/@types/loot-core/src/server/rules/handlebars-helpers.d.ts +0 -1
- package/@types/loot-core/src/server/rules/index.d.ts +0 -11
- package/@types/loot-core/src/server/rules/rule-indexer.d.ts +0 -17
- package/@types/loot-core/src/server/rules/rule-utils.d.ts +0 -19
- package/@types/loot-core/src/server/rules/rule.d.ts +0 -24
- package/@types/loot-core/src/server/schedules/app.d.ts +0 -62
- package/@types/loot-core/src/server/schedules/find-schedules.d.ts +0 -1
- package/@types/loot-core/src/server/server-config.d.ts +0 -12
- package/@types/loot-core/src/server/sheet.d.ts +0 -12
- package/@types/loot-core/src/server/sheet.test.d.ts +0 -1
- package/@types/loot-core/src/server/spreadsheet/app.d.ts +0 -38
- package/@types/loot-core/src/server/spreadsheet/globals.d.ts +0 -1
- package/@types/loot-core/src/server/spreadsheet/graph-data-structure.d.ts +0 -15
- package/@types/loot-core/src/server/spreadsheet/spreadsheet.d.ts +0 -87
- package/@types/loot-core/src/server/spreadsheet/util.d.ts +0 -5
- package/@types/loot-core/src/server/sync/app.d.ts +0 -38
- package/@types/loot-core/src/server/sync/encoder.d.ts +0 -9
- package/@types/loot-core/src/server/sync/index.d.ts +0 -47
- package/@types/loot-core/src/server/sync/make-test-message.d.ts +0 -9
- package/@types/loot-core/src/server/sync/migrate.d.ts +0 -2
- package/@types/loot-core/src/server/sync/repair.d.ts +0 -6
- package/@types/loot-core/src/server/sync/reset.d.ts +0 -6
- package/@types/loot-core/src/server/sync/utils.d.ts +0 -3
- package/@types/loot-core/src/server/tags/app.d.ts +0 -32
- package/@types/loot-core/src/server/tools/app.d.ts +0 -30
- package/@types/loot-core/src/server/transactions/app.d.ts +0 -64
- package/@types/loot-core/src/server/transactions/export/export-to-csv.d.ts +0 -2
- package/@types/loot-core/src/server/transactions/import/ofx2json.d.ts +0 -15
- package/@types/loot-core/src/server/transactions/import/parse-file.d.ts +0 -27
- package/@types/loot-core/src/server/transactions/import/qif2json.d.ts +0 -26
- package/@types/loot-core/src/server/transactions/import/xmlcamt2json.d.ts +0 -10
- package/@types/loot-core/src/server/transactions/index.d.ts +0 -18
- package/@types/loot-core/src/server/transactions/merge.d.ts +0 -2
- package/@types/loot-core/src/server/transactions/transaction-rules.d.ts +0 -57
- package/@types/loot-core/src/server/transactions/transfer.d.ts +0 -26
- package/@types/loot-core/src/server/undo.d.ts +0 -14
- package/@types/loot-core/src/server/update.d.ts +0 -1
- package/@types/loot-core/src/server/util/budget-name.d.ts +0 -6
- package/@types/loot-core/src/server/util/custom-sync-mapping.d.ts +0 -4
- package/@types/loot-core/src/server/util/rschedule.d.ts +0 -7
- package/@types/loot-core/src/shared/async.d.ts +0 -4
- package/@types/loot-core/src/shared/currencies.d.ts +0 -11
- package/@types/loot-core/src/shared/dashboard.d.ts +0 -2
- package/@types/loot-core/src/shared/environment.d.ts +0 -4
- package/@types/loot-core/src/shared/errors.d.ts +0 -25
- package/@types/loot-core/src/shared/locale.d.ts +0 -2
- package/@types/loot-core/src/shared/months.d.ts +0 -71
- package/@types/loot-core/src/shared/normalisation.d.ts +0 -1
- package/@types/loot-core/src/shared/platform.d.ts +0 -5
- package/@types/loot-core/src/shared/query.d.ts +0 -46
- package/@types/loot-core/src/shared/rules.d.ts +0 -40
- package/@types/loot-core/src/shared/schedules.d.ts +0 -36
- package/@types/loot-core/src/shared/transactions.d.ts +0 -68
- package/@types/loot-core/src/shared/util.d.ts +0 -95
- package/@types/loot-core/src/types/api-handlers.d.ts +0 -199
- package/@types/loot-core/src/types/budget.d.ts +0 -8
- package/@types/loot-core/src/types/handlers.d.ts +0 -23
- package/@types/loot-core/src/types/models/account.d.ts +0 -21
- package/@types/loot-core/src/types/models/bank-sync.d.ts +0 -16
- package/@types/loot-core/src/types/models/bank.d.ts +0 -6
- package/@types/loot-core/src/types/models/category-group.d.ts +0 -10
- package/@types/loot-core/src/types/models/category.d.ts +0 -14
- package/@types/loot-core/src/types/models/dashboard.d.ts +0 -126
- package/@types/loot-core/src/types/models/gocardless.d.ts +0 -71
- package/@types/loot-core/src/types/models/import-transaction.d.ts +0 -45
- package/@types/loot-core/src/types/models/index.d.ts +0 -21
- package/@types/loot-core/src/types/models/note.d.ts +0 -4
- package/@types/loot-core/src/types/models/openid.d.ts +0 -8
- package/@types/loot-core/src/types/models/payee.d.ts +0 -9
- package/@types/loot-core/src/types/models/pluggyai.d.ts +0 -17
- package/@types/loot-core/src/types/models/reports.d.ts +0 -124
- package/@types/loot-core/src/types/models/rule.d.ts +0 -86
- package/@types/loot-core/src/types/models/schedule.d.ts +0 -47
- package/@types/loot-core/src/types/models/simplefin.d.ts +0 -24
- package/@types/loot-core/src/types/models/tags.d.ts +0 -6
- package/@types/loot-core/src/types/models/templates.d.ts +0 -109
- package/@types/loot-core/src/types/models/transaction-filter.d.ts +0 -8
- package/@types/loot-core/src/types/models/transaction.d.ts +0 -37
- package/@types/loot-core/src/types/models/user-access.d.ts +0 -9
- package/@types/loot-core/src/types/models/user.d.ts +0 -22
- package/@types/loot-core/src/types/prefs.d.ts +0 -94
- package/@types/loot-core/src/types/server-events.d.ts +0 -61
- package/@types/loot-core/src/types/server-handlers.d.ts +0 -30
- package/@types/loot-core/src/types/util.d.ts +0 -13
- package/@types/loot-core/typings/pegjs.d.ts +0 -1
- package/@types/loot-core/typings/process-worker.d.ts +0 -9
- package/@types/loot-core/typings/vite-plugin-peggy-loader.d.ts +0 -1
- package/@types/loot-core/typings/window.d.ts +0 -45
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import type { TransactionEntity } from '../types/models';
|
|
2
|
-
import { applyChanges, diffItems } from './util';
|
|
3
|
-
export declare function isTemporaryId(id: string): boolean;
|
|
4
|
-
export declare function isPreviewId(id: string): boolean;
|
|
5
|
-
type GenericTransactionEntity = TransactionEntity;
|
|
6
|
-
export declare function makeChild<T extends GenericTransactionEntity>(parent: T, data?: object): T;
|
|
7
|
-
export declare function recalculateSplit(trans: TransactionEntity): {
|
|
8
|
-
error: {
|
|
9
|
-
type: "SplitTransactionError";
|
|
10
|
-
version: 1;
|
|
11
|
-
difference: number;
|
|
12
|
-
};
|
|
13
|
-
id: string;
|
|
14
|
-
is_parent?: boolean;
|
|
15
|
-
is_child?: boolean;
|
|
16
|
-
parent_id?: TransactionEntity["id"];
|
|
17
|
-
account: import("../types/models").AccountEntity["id"];
|
|
18
|
-
category?: import("../types/models").CategoryEntity["id"];
|
|
19
|
-
amount: import("./util").IntegerAmount;
|
|
20
|
-
payee?: import("../types/models").PayeeEntity["id"] | null;
|
|
21
|
-
notes?: string;
|
|
22
|
-
date: string;
|
|
23
|
-
imported_id?: string;
|
|
24
|
-
imported_payee?: string;
|
|
25
|
-
starting_balance_flag?: boolean;
|
|
26
|
-
transfer_id?: TransactionEntity["id"];
|
|
27
|
-
sort_order?: number;
|
|
28
|
-
cleared?: boolean;
|
|
29
|
-
reconciled?: boolean;
|
|
30
|
-
tombstone?: boolean;
|
|
31
|
-
forceUpcoming?: boolean;
|
|
32
|
-
schedule?: import("../types/models").ScheduleEntity["id"];
|
|
33
|
-
subtransactions?: TransactionEntity[];
|
|
34
|
-
_unmatched?: boolean;
|
|
35
|
-
_deleted?: boolean;
|
|
36
|
-
raw_synced_data?: string | undefined;
|
|
37
|
-
_ruleErrors?: string[];
|
|
38
|
-
};
|
|
39
|
-
export declare function ungroupTransactions(transactions: TransactionEntity[]): TransactionEntity[];
|
|
40
|
-
export declare function groupTransaction(split: TransactionEntity[]): TransactionEntity;
|
|
41
|
-
export declare function ungroupTransaction(split: TransactionEntity | null): TransactionEntity[];
|
|
42
|
-
export declare function applyTransactionDiff(groupedTrans: Parameters<typeof ungroupTransaction>[0], diff: Parameters<typeof applyChanges>[0]): TransactionEntity;
|
|
43
|
-
export declare function addSplitTransaction(transactions: readonly TransactionEntity[], id: string): {
|
|
44
|
-
data: TransactionEntity[];
|
|
45
|
-
newTransaction: TransactionEntity | null;
|
|
46
|
-
diff: ReturnType<typeof diffItems<TransactionEntity>>;
|
|
47
|
-
};
|
|
48
|
-
export declare function updateTransaction(transactions: readonly TransactionEntity[], transaction: TransactionEntity): {
|
|
49
|
-
data: TransactionEntity[];
|
|
50
|
-
newTransaction: TransactionEntity | null;
|
|
51
|
-
diff: ReturnType<typeof diffItems<TransactionEntity>>;
|
|
52
|
-
};
|
|
53
|
-
export declare function deleteTransaction(transactions: TransactionEntity[], id: string): {
|
|
54
|
-
data: TransactionEntity[];
|
|
55
|
-
newTransaction: TransactionEntity | null;
|
|
56
|
-
diff: ReturnType<typeof diffItems<TransactionEntity>>;
|
|
57
|
-
};
|
|
58
|
-
export declare function splitTransaction(transactions: readonly TransactionEntity[], id: string, createSubtransactions?: (parentTransaction: TransactionEntity) => TransactionEntity[]): {
|
|
59
|
-
data: TransactionEntity[];
|
|
60
|
-
newTransaction: TransactionEntity | null;
|
|
61
|
-
diff: ReturnType<typeof diffItems<TransactionEntity>>;
|
|
62
|
-
};
|
|
63
|
-
export declare function realizeTempTransactions(transactions: TransactionEntity[]): TransactionEntity[];
|
|
64
|
-
export declare function makeAsNonChildTransactions(childTransactionsToUpdate: TransactionEntity[], transactions: TransactionEntity[]): {
|
|
65
|
-
updated: TransactionEntity[];
|
|
66
|
-
deleted: TransactionEntity[];
|
|
67
|
-
};
|
|
68
|
-
export {};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import type { Locale } from 'date-fns';
|
|
2
|
-
export declare function last<T>(arr: Array<T>): T;
|
|
3
|
-
export declare function getChangedValues<T extends {
|
|
4
|
-
id?: string;
|
|
5
|
-
}>(obj1: T, obj2: T): Partial<T>;
|
|
6
|
-
export declare function hasFieldsChanged<T extends object>(obj1: T, obj2: T, fields: Array<keyof T>): boolean;
|
|
7
|
-
export type Diff<T extends {
|
|
8
|
-
id: string;
|
|
9
|
-
}> = {
|
|
10
|
-
added: T[];
|
|
11
|
-
updated: Partial<T>[];
|
|
12
|
-
deleted: Pick<T, 'id'>[];
|
|
13
|
-
};
|
|
14
|
-
export declare function applyChanges<T extends {
|
|
15
|
-
id: string;
|
|
16
|
-
}>(changes: Diff<T>, items: T[]): T[];
|
|
17
|
-
export declare function partitionByField<T, K extends keyof T>(data: T[], field: K): Map<any, any>;
|
|
18
|
-
export declare function groupBy<T, K extends keyof T>(data: T[], field: K): Map<T[K], T[]>;
|
|
19
|
-
export declare function diffItems<T extends {
|
|
20
|
-
id: string;
|
|
21
|
-
}>(items: T[], newItems: T[]): Diff<T>;
|
|
22
|
-
export declare function groupById<T extends {
|
|
23
|
-
id: string;
|
|
24
|
-
}>(data: T[] | null | undefined): Record<string, T>;
|
|
25
|
-
export declare function setIn(map: Map<string, unknown>, keys: string[], item: unknown): void;
|
|
26
|
-
export declare function getIn(map: any, keys: any): any;
|
|
27
|
-
export declare function fastSetMerge<T>(set1: Set<T>, set2: Set<T>): Set<T>;
|
|
28
|
-
export declare function titleFirst(str: string | null | undefined): string;
|
|
29
|
-
export declare function reapplyThousandSeparators(amountText: string): string;
|
|
30
|
-
export declare function appendDecimals(amountText: string, hideDecimals?: boolean): string;
|
|
31
|
-
declare const NUMBER_FORMATS: readonly ["comma-dot", "dot-comma", "space-comma", "apostrophe-dot", "comma-dot", "comma-dot-in"];
|
|
32
|
-
export type NumberFormats = (typeof NUMBER_FORMATS)[number];
|
|
33
|
-
export declare const numberFormats: Array<{
|
|
34
|
-
value: NumberFormats;
|
|
35
|
-
label: string;
|
|
36
|
-
labelNoFraction: string;
|
|
37
|
-
}>;
|
|
38
|
-
declare let numberFormatConfig: {
|
|
39
|
-
format: NumberFormats;
|
|
40
|
-
hideFraction: boolean;
|
|
41
|
-
};
|
|
42
|
-
export declare function parseNumberFormat({ format, hideFraction, }: {
|
|
43
|
-
format?: string;
|
|
44
|
-
hideFraction?: string | boolean;
|
|
45
|
-
}): {
|
|
46
|
-
format: "comma-dot" | "dot-comma" | "space-comma" | "apostrophe-dot" | "comma-dot-in";
|
|
47
|
-
hideFraction: boolean;
|
|
48
|
-
};
|
|
49
|
-
export declare function setNumberFormat(config: typeof numberFormatConfig): void;
|
|
50
|
-
export declare function getNumberFormat({ format, hideFraction, decimalPlaces, }?: {
|
|
51
|
-
format?: NumberFormats;
|
|
52
|
-
hideFraction?: boolean;
|
|
53
|
-
decimalPlaces?: number;
|
|
54
|
-
}): {
|
|
55
|
-
value: "comma-dot" | "dot-comma" | "space-comma" | "apostrophe-dot" | "comma-dot-in";
|
|
56
|
-
thousandsSeparator: any;
|
|
57
|
-
decimalSeparator: any;
|
|
58
|
-
formatter: {
|
|
59
|
-
format: (value: number) => string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* The exact amount.
|
|
64
|
-
*/
|
|
65
|
-
export type Amount = number;
|
|
66
|
-
/**
|
|
67
|
-
* The exact amount that is formatted based on the configured number format.
|
|
68
|
-
* For example, 123.45 would be '123.45' or '123,45'.
|
|
69
|
-
*/
|
|
70
|
-
export type CurrencyAmount = string;
|
|
71
|
-
/**
|
|
72
|
-
* The amount with the decimal point removed.
|
|
73
|
-
* For example, 123.45 would be 12345.
|
|
74
|
-
*/
|
|
75
|
-
export type IntegerAmount = number;
|
|
76
|
-
export declare function safeNumber(value: number): number;
|
|
77
|
-
export declare function toRelaxedNumber(currencyAmount: CurrencyAmount): Amount;
|
|
78
|
-
export declare function integerToCurrency(integerAmount: IntegerAmount, formatter?: {
|
|
79
|
-
format: (value: number) => string;
|
|
80
|
-
}, decimalPlaces?: number): string;
|
|
81
|
-
export declare function integerToCurrencyWithDecimal(integerAmount: IntegerAmount): string;
|
|
82
|
-
export declare function amountToCurrency(amount: Amount): CurrencyAmount;
|
|
83
|
-
export declare function amountToCurrencyNoDecimal(amount: Amount): CurrencyAmount;
|
|
84
|
-
export declare function currencyToAmount(currencyAmount: string): Amount | null;
|
|
85
|
-
export declare function currencyToInteger(currencyAmount: CurrencyAmount): IntegerAmount | null;
|
|
86
|
-
export declare function stringToInteger(str: string): number | null;
|
|
87
|
-
export declare function amountToInteger(amount: Amount, decimalPlaces?: number): IntegerAmount;
|
|
88
|
-
export declare function integerToAmount(integerAmount: IntegerAmount, decimalPlaces?: number): Amount;
|
|
89
|
-
export declare function looselyParseAmount(amount: string): number;
|
|
90
|
-
export declare function sortByKey<T>(arr: T[], key: keyof T): T[];
|
|
91
|
-
export declare function tsToRelativeTime(ts: string | null, locale: Locale, options?: {
|
|
92
|
-
capitalize: boolean;
|
|
93
|
-
}): string;
|
|
94
|
-
export declare function applyFindReplace(text: string | null | undefined, find: string, replace: string, useRegex: boolean): string;
|
|
95
|
-
export {};
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import type { ImportTransactionsOpts } from '@actual-app/api';
|
|
2
|
-
import type { ImportTransactionsResult } from '../server/accounts/app';
|
|
3
|
-
import type { APIAccountEntity, APICategoryEntity, APICategoryGroupEntity, APIFileEntity, APIPayeeEntity, APIScheduleEntity, APITagEntity } from '../server/api-models';
|
|
4
|
-
import type { BudgetFileHandlers } from '../server/budgetfiles/app';
|
|
5
|
-
import type { batchUpdateTransactions } from '../server/transactions';
|
|
6
|
-
import type { QueryState } from '../shared/query';
|
|
7
|
-
import type { ImportTransactionEntity, NewRuleEntity, RuleEntity, ScheduleEntity, TransactionEntity } from './models';
|
|
8
|
-
export type ApiHandlers = {
|
|
9
|
-
'api/batch-budget-start': () => Promise<void>;
|
|
10
|
-
'api/batch-budget-end': () => Promise<void>;
|
|
11
|
-
'api/load-budget': (...args: Parameters<BudgetFileHandlers['load-budget']>) => Promise<void>;
|
|
12
|
-
'api/download-budget': (arg: {
|
|
13
|
-
syncId: string;
|
|
14
|
-
password?: string;
|
|
15
|
-
}) => Promise<void>;
|
|
16
|
-
'api/get-budgets': () => Promise<APIFileEntity[]>;
|
|
17
|
-
'api/start-import': (arg: {
|
|
18
|
-
budgetName: string;
|
|
19
|
-
}) => Promise<void>;
|
|
20
|
-
'api/finish-import': () => Promise<void>;
|
|
21
|
-
'api/abort-import': () => Promise<void>;
|
|
22
|
-
'api/query': (arg: {
|
|
23
|
-
query: QueryState;
|
|
24
|
-
}) => Promise<unknown>;
|
|
25
|
-
'api/budget-months': () => Promise<string[]>;
|
|
26
|
-
'api/budget-month': (arg: {
|
|
27
|
-
month: string;
|
|
28
|
-
}) => Promise<{
|
|
29
|
-
month: string;
|
|
30
|
-
incomeAvailable: number;
|
|
31
|
-
lastMonthOverspent: number;
|
|
32
|
-
forNextMonth: number;
|
|
33
|
-
totalBudgeted: number;
|
|
34
|
-
toBudget: number;
|
|
35
|
-
fromLastMonth: number;
|
|
36
|
-
totalIncome: number;
|
|
37
|
-
totalSpent: number;
|
|
38
|
-
totalBalance: number;
|
|
39
|
-
categoryGroups: Record<string, unknown>[];
|
|
40
|
-
}>;
|
|
41
|
-
'api/budget-set-amount': (arg: {
|
|
42
|
-
month: string;
|
|
43
|
-
categoryId: string;
|
|
44
|
-
amount: number;
|
|
45
|
-
}) => Promise<void>;
|
|
46
|
-
'api/budget-set-carryover': (arg: {
|
|
47
|
-
month: string;
|
|
48
|
-
categoryId: string;
|
|
49
|
-
flag: boolean;
|
|
50
|
-
}) => Promise<void>;
|
|
51
|
-
'api/budget-hold-for-next-month': (arg: {
|
|
52
|
-
month: string;
|
|
53
|
-
amount: number;
|
|
54
|
-
}) => Promise<boolean>;
|
|
55
|
-
'api/budget-reset-hold': (arg: {
|
|
56
|
-
month: string;
|
|
57
|
-
}) => Promise<void>;
|
|
58
|
-
'api/transactions-export': (arg: {
|
|
59
|
-
transactions: any;
|
|
60
|
-
categoryGroups: any;
|
|
61
|
-
payees: any;
|
|
62
|
-
accounts: any;
|
|
63
|
-
}) => Promise<unknown>;
|
|
64
|
-
'api/transactions-import': (arg: {
|
|
65
|
-
accountId: APIAccountEntity['id'];
|
|
66
|
-
transactions: ImportTransactionEntity[];
|
|
67
|
-
isPreview?: boolean;
|
|
68
|
-
opts?: ImportTransactionsOpts;
|
|
69
|
-
}) => Promise<ImportTransactionsResult>;
|
|
70
|
-
'api/transactions-add': (arg: {
|
|
71
|
-
accountId: APIAccountEntity['id'];
|
|
72
|
-
transactions: Omit<ImportTransactionEntity, 'account'>[];
|
|
73
|
-
runTransfers?: boolean;
|
|
74
|
-
learnCategories?: boolean;
|
|
75
|
-
}) => Promise<'ok'>;
|
|
76
|
-
'api/transactions-get': (arg: {
|
|
77
|
-
accountId?: APIAccountEntity['id'];
|
|
78
|
-
startDate?: string;
|
|
79
|
-
endDate?: string;
|
|
80
|
-
}) => Promise<TransactionEntity[]>;
|
|
81
|
-
'api/transaction-update': (arg: {
|
|
82
|
-
id: TransactionEntity['id'];
|
|
83
|
-
fields: any;
|
|
84
|
-
}) => Promise<Awaited<ReturnType<typeof batchUpdateTransactions>>['updated']>;
|
|
85
|
-
'api/transaction-delete': (arg: {
|
|
86
|
-
id: TransactionEntity['id'];
|
|
87
|
-
}) => Promise<Awaited<ReturnType<typeof batchUpdateTransactions>>['deleted']>;
|
|
88
|
-
'api/sync': () => Promise<void>;
|
|
89
|
-
'api/bank-sync': (arg?: {
|
|
90
|
-
accountId: APIAccountEntity['id'];
|
|
91
|
-
}) => Promise<void>;
|
|
92
|
-
'api/accounts-get': () => Promise<APIAccountEntity[]>;
|
|
93
|
-
'api/account-create': (arg: {
|
|
94
|
-
account: Omit<APIAccountEntity, 'id'>;
|
|
95
|
-
initialBalance?: number;
|
|
96
|
-
}) => Promise<string>;
|
|
97
|
-
'api/account-update': (arg: {
|
|
98
|
-
id: APIAccountEntity['id'];
|
|
99
|
-
fields: any;
|
|
100
|
-
}) => Promise<void>;
|
|
101
|
-
'api/account-close': (arg: {
|
|
102
|
-
id: APIAccountEntity['id'];
|
|
103
|
-
transferAccountId?: APIAccountEntity['id'];
|
|
104
|
-
transferCategoryId?: APICategoryEntity['id'];
|
|
105
|
-
}) => Promise<void>;
|
|
106
|
-
'api/account-reopen': (arg: {
|
|
107
|
-
id: APIAccountEntity['id'];
|
|
108
|
-
}) => Promise<void>;
|
|
109
|
-
'api/account-delete': (arg: {
|
|
110
|
-
id: APIAccountEntity['id'];
|
|
111
|
-
}) => Promise<void>;
|
|
112
|
-
'api/account-balance': (arg: {
|
|
113
|
-
id: APIAccountEntity['id'];
|
|
114
|
-
cutoff?: Date;
|
|
115
|
-
}) => Promise<number>;
|
|
116
|
-
'api/categories-get': (arg: {
|
|
117
|
-
grouped?: boolean;
|
|
118
|
-
}) => Promise<Array<APICategoryGroupEntity | APICategoryEntity>>;
|
|
119
|
-
'api/category-groups-get': () => Promise<APICategoryGroupEntity[]>;
|
|
120
|
-
'api/category-group-create': (arg: {
|
|
121
|
-
group: Omit<APICategoryGroupEntity, 'id'>;
|
|
122
|
-
}) => Promise<APICategoryGroupEntity['id']>;
|
|
123
|
-
'api/category-group-update': (arg: {
|
|
124
|
-
id: APICategoryGroupEntity['id'];
|
|
125
|
-
fields: any;
|
|
126
|
-
}) => Promise<void>;
|
|
127
|
-
'api/category-group-delete': (arg: {
|
|
128
|
-
id: APICategoryGroupEntity['id'];
|
|
129
|
-
transferCategoryId?: APICategoryEntity['id'];
|
|
130
|
-
}) => Promise<void>;
|
|
131
|
-
'api/category-create': (arg: {
|
|
132
|
-
category: Omit<APICategoryEntity, 'id'>;
|
|
133
|
-
}) => Promise<APICategoryEntity['id']>;
|
|
134
|
-
'api/category-update': (arg: {
|
|
135
|
-
id: APICategoryEntity['id'];
|
|
136
|
-
fields: any;
|
|
137
|
-
}) => Promise<void>;
|
|
138
|
-
'api/category-delete': (arg: {
|
|
139
|
-
id: APICategoryEntity['id'];
|
|
140
|
-
transferCategoryId?: APICategoryEntity['id'];
|
|
141
|
-
}) => Promise<void>;
|
|
142
|
-
'api/payees-get': () => Promise<APIPayeeEntity[]>;
|
|
143
|
-
'api/common-payees-get': () => Promise<APIPayeeEntity[]>;
|
|
144
|
-
'api/payee-create': (arg: {
|
|
145
|
-
payee: Omit<APIPayeeEntity, 'id'>;
|
|
146
|
-
}) => Promise<APIPayeeEntity['id']>;
|
|
147
|
-
'api/payee-update': (arg: {
|
|
148
|
-
id: APIPayeeEntity['id'];
|
|
149
|
-
fields: any;
|
|
150
|
-
}) => Promise<void>;
|
|
151
|
-
'api/payee-delete': (arg: {
|
|
152
|
-
id: APIPayeeEntity['id'];
|
|
153
|
-
}) => Promise<void>;
|
|
154
|
-
'api/payees-merge': (arg: {
|
|
155
|
-
targetId: APIPayeeEntity['id'];
|
|
156
|
-
mergeIds: string[];
|
|
157
|
-
}) => Promise<void>;
|
|
158
|
-
'api/tags-get': () => Promise<APITagEntity[]>;
|
|
159
|
-
'api/tag-create': (arg: {
|
|
160
|
-
tag: Omit<APITagEntity, 'id'>;
|
|
161
|
-
}) => Promise<APITagEntity['id']>;
|
|
162
|
-
'api/tag-update': (arg: {
|
|
163
|
-
id: APITagEntity['id'];
|
|
164
|
-
fields: Partial<Omit<APITagEntity, 'id'>>;
|
|
165
|
-
}) => Promise<void>;
|
|
166
|
-
'api/tag-delete': (arg: {
|
|
167
|
-
id: APITagEntity['id'];
|
|
168
|
-
}) => Promise<void>;
|
|
169
|
-
'api/rules-get': () => Promise<RuleEntity[]>;
|
|
170
|
-
'api/payee-rules-get': (arg: {
|
|
171
|
-
id: APIPayeeEntity['id'];
|
|
172
|
-
}) => Promise<RuleEntity[]>;
|
|
173
|
-
'api/rule-create': (arg: {
|
|
174
|
-
rule: NewRuleEntity;
|
|
175
|
-
}) => Promise<RuleEntity>;
|
|
176
|
-
'api/rule-update': (arg: {
|
|
177
|
-
rule: RuleEntity;
|
|
178
|
-
}) => Promise<RuleEntity>;
|
|
179
|
-
'api/rule-delete': (id: RuleEntity['id']) => Promise<boolean>;
|
|
180
|
-
'api/schedule-create': (schedule: Omit<APIScheduleEntity, 'id'>) => Promise<ScheduleEntity['id']>;
|
|
181
|
-
'api/schedule-update': (arg: {
|
|
182
|
-
id: ScheduleEntity['id'];
|
|
183
|
-
fields: Partial<APIScheduleEntity>;
|
|
184
|
-
resetNextDate?: boolean;
|
|
185
|
-
}) => Promise<ScheduleEntity['id']>;
|
|
186
|
-
'api/schedule-delete': (id: string) => Promise<void>;
|
|
187
|
-
'api/schedules-get': () => Promise<APIScheduleEntity[]>;
|
|
188
|
-
'api/get-id-by-name': (arg: {
|
|
189
|
-
type: string;
|
|
190
|
-
name: string;
|
|
191
|
-
}) => Promise<string>;
|
|
192
|
-
'api/get-server-version': () => Promise<{
|
|
193
|
-
error: 'no-server';
|
|
194
|
-
} | {
|
|
195
|
-
error: 'network-failure';
|
|
196
|
-
} | {
|
|
197
|
-
version: string;
|
|
198
|
-
}>;
|
|
199
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { AccountHandlers } from '../server/accounts/app';
|
|
2
|
-
import type { AdminHandlers } from '../server/admin/app';
|
|
3
|
-
import type { AuthHandlers } from '../server/auth/app';
|
|
4
|
-
import type { BudgetHandlers } from '../server/budget/app';
|
|
5
|
-
import type { BudgetFileHandlers } from '../server/budgetfiles/app';
|
|
6
|
-
import type { DashboardHandlers } from '../server/dashboard/app';
|
|
7
|
-
import type { EncryptionHandlers } from '../server/encryption/app';
|
|
8
|
-
import type { FiltersHandlers } from '../server/filters/app';
|
|
9
|
-
import type { NotesHandlers } from '../server/notes/app';
|
|
10
|
-
import type { PayeesHandlers } from '../server/payees/app';
|
|
11
|
-
import type { PreferencesHandlers } from '../server/preferences/app';
|
|
12
|
-
import type { ReportsHandlers } from '../server/reports/app';
|
|
13
|
-
import type { RulesHandlers } from '../server/rules/app';
|
|
14
|
-
import type { SchedulesHandlers } from '../server/schedules/app';
|
|
15
|
-
import type { SpreadsheetHandlers } from '../server/spreadsheet/app';
|
|
16
|
-
import type { SyncHandlers } from '../server/sync/app';
|
|
17
|
-
import type { TagsHandlers } from '../server/tags/app';
|
|
18
|
-
import type { ToolsHandlers } from '../server/tools/app';
|
|
19
|
-
import type { TransactionHandlers } from '../server/transactions/app';
|
|
20
|
-
import type { ApiHandlers } from './api-handlers';
|
|
21
|
-
import type { ServerHandlers } from './server-handlers';
|
|
22
|
-
export type Handlers = {} & ServerHandlers & ApiHandlers & BudgetHandlers & DashboardHandlers & FiltersHandlers & NotesHandlers & PreferencesHandlers & ReportsHandlers & RulesHandlers & SchedulesHandlers & TransactionHandlers & AdminHandlers & ToolsHandlers & AccountHandlers & PayeesHandlers & SpreadsheetHandlers & SyncHandlers & BudgetFileHandlers & EncryptionHandlers & TagsHandlers & AuthHandlers;
|
|
23
|
-
export type HandlerFunctions = Handlers[keyof Handlers];
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type AccountEntity = {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
offbudget: 0 | 1;
|
|
5
|
-
closed: 0 | 1;
|
|
6
|
-
sort_order: number;
|
|
7
|
-
last_reconciled: string | null;
|
|
8
|
-
tombstone: 0 | 1;
|
|
9
|
-
account_id: string | null;
|
|
10
|
-
bank: string | null;
|
|
11
|
-
bankName: string | null;
|
|
12
|
-
bankId: string | null;
|
|
13
|
-
mask: string | null;
|
|
14
|
-
official_name: string | null;
|
|
15
|
-
balance_current: number | null;
|
|
16
|
-
balance_available: number | null;
|
|
17
|
-
balance_limit: number | null;
|
|
18
|
-
account_sync_source: AccountSyncSource | null;
|
|
19
|
-
last_sync: string | null;
|
|
20
|
-
};
|
|
21
|
-
export type AccountSyncSource = 'simpleFin' | 'goCardless' | 'pluggyai';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { GoCardlessAmount, GoCardlessBalance, GoCardlessTransaction } from './gocardless';
|
|
2
|
-
export type BankSyncBalance = GoCardlessBalance;
|
|
3
|
-
export type BankSyncAmount = GoCardlessAmount;
|
|
4
|
-
export type BankSyncTransaction = GoCardlessTransaction;
|
|
5
|
-
export type BankSyncResponse = {
|
|
6
|
-
transactions: {
|
|
7
|
-
all: BankSyncTransaction[];
|
|
8
|
-
booked: BankSyncTransaction[];
|
|
9
|
-
pending: BankSyncTransaction[];
|
|
10
|
-
};
|
|
11
|
-
balances: BankSyncBalance[];
|
|
12
|
-
startingBalance: number;
|
|
13
|
-
error_type: string;
|
|
14
|
-
error_code: string;
|
|
15
|
-
};
|
|
16
|
-
export type BankSyncProviders = 'goCardless' | 'simpleFin' | 'pluggyai';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { CategoryGroupEntity } from './category-group';
|
|
2
|
-
export type CategoryEntity = {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
is_income?: boolean;
|
|
6
|
-
group: CategoryGroupEntity['id'];
|
|
7
|
-
goal_def?: string;
|
|
8
|
-
template_settings?: {
|
|
9
|
-
source: 'notes' | 'ui';
|
|
10
|
-
};
|
|
11
|
-
sort_order?: number;
|
|
12
|
-
tombstone?: boolean;
|
|
13
|
-
hidden?: boolean;
|
|
14
|
-
};
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import type { CustomReportEntity } from './reports';
|
|
2
|
-
import type { RuleConditionEntity } from './rule';
|
|
3
|
-
export type DashboardPageEntity = {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
tombstone: boolean;
|
|
7
|
-
};
|
|
8
|
-
export type TimeFrame = {
|
|
9
|
-
start: string;
|
|
10
|
-
end: string;
|
|
11
|
-
mode: 'sliding-window' | 'static' | 'full' | 'lastMonth' | 'lastYear' | 'yearToDate' | 'priorYearToDate';
|
|
12
|
-
};
|
|
13
|
-
type AbstractWidget<T extends string, Meta extends Record<string, unknown> | null = null> = {
|
|
14
|
-
id: string;
|
|
15
|
-
dashboard_page_id: string;
|
|
16
|
-
type: T;
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
width: number;
|
|
20
|
-
height: number;
|
|
21
|
-
meta: Meta;
|
|
22
|
-
tombstone: boolean;
|
|
23
|
-
};
|
|
24
|
-
export type NetWorthWidget = AbstractWidget<'net-worth-card', {
|
|
25
|
-
name?: string;
|
|
26
|
-
conditions?: RuleConditionEntity[];
|
|
27
|
-
conditionsOp?: 'and' | 'or';
|
|
28
|
-
timeFrame?: TimeFrame;
|
|
29
|
-
interval?: 'Daily' | 'Weekly' | 'Monthly' | 'Yearly';
|
|
30
|
-
mode?: 'trend' | 'stacked';
|
|
31
|
-
} | null>;
|
|
32
|
-
export type CashFlowWidget = AbstractWidget<'cash-flow-card', {
|
|
33
|
-
name?: string;
|
|
34
|
-
conditions?: RuleConditionEntity[];
|
|
35
|
-
conditionsOp?: 'and' | 'or';
|
|
36
|
-
timeFrame?: TimeFrame;
|
|
37
|
-
showBalance?: boolean;
|
|
38
|
-
} | null>;
|
|
39
|
-
export type SpendingWidget = AbstractWidget<'spending-card', {
|
|
40
|
-
name?: string;
|
|
41
|
-
conditions?: RuleConditionEntity[];
|
|
42
|
-
conditionsOp?: 'and' | 'or';
|
|
43
|
-
compare?: string;
|
|
44
|
-
compareTo?: string;
|
|
45
|
-
isLive?: boolean;
|
|
46
|
-
mode?: 'single-month' | 'budget' | 'average';
|
|
47
|
-
} | null>;
|
|
48
|
-
export type BudgetAnalysisWidget = AbstractWidget<'budget-analysis-card', {
|
|
49
|
-
name?: string;
|
|
50
|
-
conditions?: RuleConditionEntity[];
|
|
51
|
-
conditionsOp?: 'and' | 'or';
|
|
52
|
-
timeFrame?: TimeFrame;
|
|
53
|
-
interval?: 'Daily' | 'Weekly' | 'Monthly' | 'Yearly';
|
|
54
|
-
graphType?: 'Line' | 'Bar';
|
|
55
|
-
showBalance?: boolean;
|
|
56
|
-
} | null>;
|
|
57
|
-
export type CustomReportWidget = AbstractWidget<'custom-report', {
|
|
58
|
-
id: string;
|
|
59
|
-
}>;
|
|
60
|
-
export type CrossoverWidget = AbstractWidget<'crossover-card', {
|
|
61
|
-
name?: string;
|
|
62
|
-
expenseCategoryIds?: string[];
|
|
63
|
-
incomeAccountIds?: string[];
|
|
64
|
-
timeFrame?: TimeFrame;
|
|
65
|
-
safeWithdrawalRate?: number;
|
|
66
|
-
estimatedReturn?: number | null;
|
|
67
|
-
expectedContribution?: number | null;
|
|
68
|
-
projectionType?: 'hampel' | 'median' | 'mean';
|
|
69
|
-
showHiddenCategories?: boolean;
|
|
70
|
-
expenseAdjustmentFactor?: number;
|
|
71
|
-
} | null>;
|
|
72
|
-
export type MarkdownWidget = AbstractWidget<'markdown-card', {
|
|
73
|
-
content: string;
|
|
74
|
-
text_align?: 'left' | 'right' | 'center';
|
|
75
|
-
}>;
|
|
76
|
-
type SpecializedWidget = NetWorthWidget | CashFlowWidget | SpendingWidget | BudgetAnalysisWidget | CrossoverWidget | MarkdownWidget | SummaryWidget | CalendarWidget | FormulaWidget;
|
|
77
|
-
export type DashboardWidgetEntity = SpecializedWidget | CustomReportWidget;
|
|
78
|
-
export type NewDashboardWidgetEntity = Omit<DashboardWidgetEntity, 'id' | 'tombstone' | 'dashboard_page_id'>;
|
|
79
|
-
export type ExportImportCustomReportWidget = Omit<CustomReportWidget, 'id' | 'meta' | 'tombstone'> & {
|
|
80
|
-
meta: Omit<CustomReportEntity, 'tombstone'>;
|
|
81
|
-
};
|
|
82
|
-
export type ExportImportDashboardWidget = Omit<ExportImportCustomReportWidget | SpecializedWidget, 'tombstone'>;
|
|
83
|
-
export type ExportImportDashboard = {
|
|
84
|
-
version: 1;
|
|
85
|
-
widgets: ExportImportDashboardWidget[];
|
|
86
|
-
};
|
|
87
|
-
export type SummaryWidget = AbstractWidget<'summary-card', {
|
|
88
|
-
name?: string;
|
|
89
|
-
conditions?: RuleConditionEntity[];
|
|
90
|
-
conditionsOp?: 'and' | 'or';
|
|
91
|
-
timeFrame?: TimeFrame;
|
|
92
|
-
content?: string;
|
|
93
|
-
} | null>;
|
|
94
|
-
export type BaseSummaryContent = {
|
|
95
|
-
type: 'sum' | 'avgPerMonth' | 'avgPerYear' | 'avgPerTransact';
|
|
96
|
-
fontSize?: number;
|
|
97
|
-
};
|
|
98
|
-
export type PercentageSummaryContent = {
|
|
99
|
-
type: 'percentage';
|
|
100
|
-
divisorConditions: RuleConditionEntity[];
|
|
101
|
-
divisorConditionsOp: 'and' | 'or';
|
|
102
|
-
divisorAllTimeDateRange?: boolean;
|
|
103
|
-
fontSize?: number;
|
|
104
|
-
};
|
|
105
|
-
export type SummaryContent = BaseSummaryContent | PercentageSummaryContent;
|
|
106
|
-
export type CalendarWidget = AbstractWidget<'calendar-card', {
|
|
107
|
-
name?: string;
|
|
108
|
-
conditions?: RuleConditionEntity[];
|
|
109
|
-
conditionsOp?: 'and' | 'or';
|
|
110
|
-
timeFrame?: TimeFrame;
|
|
111
|
-
} | null>;
|
|
112
|
-
export type FormulaWidget = AbstractWidget<'formula-card', {
|
|
113
|
-
name?: string;
|
|
114
|
-
formula?: string;
|
|
115
|
-
fontSize?: number;
|
|
116
|
-
fontSizeMode?: 'dynamic' | 'static';
|
|
117
|
-
staticFontSize?: number;
|
|
118
|
-
colorFormula?: string;
|
|
119
|
-
queriesVersion?: number;
|
|
120
|
-
queries?: Record<string, {
|
|
121
|
-
conditions?: RuleConditionEntity[];
|
|
122
|
-
conditionsOp?: 'and' | 'or';
|
|
123
|
-
timeFrame?: TimeFrame;
|
|
124
|
-
}>;
|
|
125
|
-
} | null>;
|
|
126
|
-
export {};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
export type GoCardlessToken = {
|
|
2
|
-
id: string;
|
|
3
|
-
accounts: SyncServerGoCardlessAccount[];
|
|
4
|
-
};
|
|
5
|
-
export type GoCardlessInstitution = {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
bic?: string;
|
|
9
|
-
transaction_total_days?: string;
|
|
10
|
-
countries: string[];
|
|
11
|
-
logo: string;
|
|
12
|
-
identification_codes: string[];
|
|
13
|
-
};
|
|
14
|
-
export type GoCardlessBalance = {
|
|
15
|
-
balanceAmount: GoCardlessAmount;
|
|
16
|
-
balanceType: 'closingBooked' | 'expected' | 'forwardAvailable' | 'interimAvailable' | 'interimBooked' | 'nonInvoiced' | 'openingBooked';
|
|
17
|
-
creditLimitIncluded?: boolean;
|
|
18
|
-
lastChangeDateTime?: string;
|
|
19
|
-
lastCommittedTransaction?: string;
|
|
20
|
-
referenceDate?: string;
|
|
21
|
-
};
|
|
22
|
-
export type GoCardlessAmount = {
|
|
23
|
-
amount: string;
|
|
24
|
-
currency: string;
|
|
25
|
-
};
|
|
26
|
-
export type GoCardlessTransaction = {
|
|
27
|
-
additionalInformation?: string;
|
|
28
|
-
bookingStatus?: string;
|
|
29
|
-
balanceAfterTransaction?: Pick<GoCardlessBalance, 'balanceType' | 'balanceAmount'>;
|
|
30
|
-
bankTransactionCode?: string;
|
|
31
|
-
bookingDate?: string;
|
|
32
|
-
bookingDateTime?: string;
|
|
33
|
-
checkId?: string;
|
|
34
|
-
creditorAccount?: string;
|
|
35
|
-
creditorAgent?: string;
|
|
36
|
-
creditorId?: string;
|
|
37
|
-
creditorName?: string;
|
|
38
|
-
currencyExchange?: string[];
|
|
39
|
-
debtorAccount?: {
|
|
40
|
-
iban: string;
|
|
41
|
-
};
|
|
42
|
-
debtorAgent?: string;
|
|
43
|
-
debtorName?: string;
|
|
44
|
-
endToEndId?: string;
|
|
45
|
-
entryReference?: string;
|
|
46
|
-
internalTransactionId?: string;
|
|
47
|
-
mandateId?: string;
|
|
48
|
-
merchantCategoryCode?: string;
|
|
49
|
-
proprietaryBankTransactionCode?: string;
|
|
50
|
-
purposeCode?: string;
|
|
51
|
-
remittanceInformationStructured?: string;
|
|
52
|
-
remittanceInformationStructuredArray?: string[];
|
|
53
|
-
remittanceInformationUnstructured?: string;
|
|
54
|
-
remittanceInformationUnstructuredArray?: string[];
|
|
55
|
-
transactionAmount: GoCardlessAmount;
|
|
56
|
-
transactionId?: string;
|
|
57
|
-
ultimateCreditor?: string;
|
|
58
|
-
ultimateDebtor?: string;
|
|
59
|
-
valueDate?: string;
|
|
60
|
-
valueDateTime?: string;
|
|
61
|
-
};
|
|
62
|
-
export type SyncServerGoCardlessAccount = {
|
|
63
|
-
balance: number;
|
|
64
|
-
institution: string | {
|
|
65
|
-
name: string;
|
|
66
|
-
};
|
|
67
|
-
account_id: string;
|
|
68
|
-
mask: string;
|
|
69
|
-
name: string;
|
|
70
|
-
official_name: string;
|
|
71
|
-
};
|