@actual-app/api 26.1.0-nightly.20251219 → 26.1.0-nightly.20251221
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/src/platform/exceptions/index.d.ts +1 -1
- package/@types/loot-core/src/platform/server/asyncStorage/index.d.ts +2 -2
- package/@types/loot-core/src/server/accounts/app.d.ts +1 -1
- package/@types/loot-core/src/server/accounts/sync.d.ts +1 -1
- package/@types/loot-core/src/server/admin/app.d.ts +1 -1
- package/@types/loot-core/src/server/api-models.d.ts +2 -2
- package/@types/loot-core/src/server/api.d.ts +2 -3
- package/@types/loot-core/src/server/app.d.ts +1 -1
- package/@types/loot-core/src/server/aql/compiler.d.ts +1 -1
- package/@types/loot-core/src/server/aql/exec.d.ts +2 -2
- package/@types/loot-core/src/server/aql/index.d.ts +2 -2
- package/@types/loot-core/src/server/aql/schema/executors.d.ts +1 -1
- package/@types/loot-core/src/server/aql/schema/index.d.ts +1 -1
- package/@types/loot-core/src/server/auth/app.d.ts +1 -1
- package/@types/loot-core/src/server/budget/actions.d.ts +2 -2
- package/@types/loot-core/src/server/budget/app.d.ts +3 -3
- package/@types/loot-core/src/server/budget/category-template-context.d.ts +2 -2
- package/@types/loot-core/src/server/budget/goal-template.d.ts +2 -2
- package/@types/loot-core/src/server/budget/schedule-template.d.ts +2 -2
- package/@types/loot-core/src/server/budgetfiles/app.d.ts +2 -2
- package/@types/loot-core/src/server/cloud-storage.d.ts +4 -4
- package/@types/loot-core/src/server/db/index.d.ts +4 -4
- package/@types/loot-core/src/server/encryption/app.d.ts +1 -1
- package/@types/loot-core/src/server/filters/app.d.ts +1 -1
- package/@types/loot-core/src/server/importers/ynab4-types.d.ts +24 -24
- package/@types/loot-core/src/server/importers/ynab4.d.ts +1 -1
- package/@types/loot-core/src/server/importers/ynab5-types.d.ts +18 -18
- package/@types/loot-core/src/server/importers/ynab5.d.ts +1 -1
- package/@types/loot-core/src/server/main-app.d.ts +1 -1
- package/@types/loot-core/src/server/main.d.ts +1 -1
- package/@types/loot-core/src/server/migrate/migrations.d.ts +1 -1
- package/@types/loot-core/src/server/models.d.ts +2 -2
- package/@types/loot-core/src/server/notes/app.d.ts +1 -1
- package/@types/loot-core/src/server/payees/app.d.ts +2 -2
- package/@types/loot-core/src/server/preferences/app.d.ts +3 -3
- package/@types/loot-core/src/server/rules/action.d.ts +1 -1
- package/@types/loot-core/src/server/rules/app.d.ts +1 -1
- package/@types/loot-core/src/server/rules/customFunctions.d.ts +2 -2
- package/@types/loot-core/src/server/rules/rule-indexer.d.ts +1 -1
- package/@types/loot-core/src/server/rules/rule-utils.d.ts +1 -1
- package/@types/loot-core/src/server/rules/rule.d.ts +1 -1
- package/@types/loot-core/src/server/schedules/app.d.ts +1 -1
- package/@types/loot-core/src/server/sheet.d.ts +2 -1
- package/@types/loot-core/src/server/spreadsheet/app.d.ts +1 -1
- package/@types/loot-core/src/server/spreadsheet/spreadsheet.d.ts +2 -2
- package/@types/loot-core/src/server/sync/encoder.d.ts +1 -1
- package/@types/loot-core/src/server/tags/app.d.ts +1 -1
- package/@types/loot-core/src/server/tools/app.d.ts +1 -1
- package/@types/loot-core/src/server/transactions/app.d.ts +3 -3
- package/@types/loot-core/src/server/transactions/import/xmlcamt2json.d.ts +2 -2
- package/@types/loot-core/src/server/transactions/index.d.ts +2 -2
- package/@types/loot-core/src/server/undo.d.ts +1 -1
- package/@types/loot-core/src/shared/currencies.d.ts +1 -1
- package/@types/loot-core/src/shared/months.d.ts +1 -1
- package/@types/loot-core/src/shared/query.d.ts +1 -1
- package/@types/loot-core/src/shared/rules.d.ts +1 -1
- package/@types/loot-core/src/shared/schedules.d.ts +1 -1
- package/@types/loot-core/src/types/api-handlers.d.ts +4 -4
- package/@types/loot-core/src/types/handlers.d.ts +1 -2
- package/@types/loot-core/src/types/models/bank-sync.d.ts +1 -1
- package/@types/loot-core/src/types/models/category-group.d.ts +3 -3
- package/@types/loot-core/src/types/models/category.d.ts +3 -3
- package/@types/loot-core/src/types/models/import-transaction.d.ts +2 -2
- package/@types/loot-core/src/types/models/payee.d.ts +3 -3
- package/@types/loot-core/src/types/models/reports.d.ts +12 -12
- package/@types/loot-core/src/types/models/rule.d.ts +16 -16
- package/@types/loot-core/src/types/models/schedule.d.ts +6 -6
- package/@types/loot-core/src/types/models/simplefin.d.ts +4 -4
- package/@types/loot-core/src/types/models/tags.d.ts +2 -2
- package/@types/loot-core/src/types/models/templates.d.ts +28 -28
- package/@types/loot-core/src/types/models/transaction-filter.d.ts +2 -2
- package/@types/loot-core/src/types/models/transaction.d.ts +7 -7
- package/@types/loot-core/src/types/models/user-access.d.ts +4 -4
- package/@types/loot-core/src/types/models/user.d.ts +8 -8
- package/@types/loot-core/src/types/server-events.d.ts +2 -2
- package/@types/loot-core/src/types/server-handlers.d.ts +3 -3
- package/@types/loot-core/typings/window.d.ts +0 -3
- package/@types/methods.d.ts +8 -4
- package/dist/app/bundle.api.js +73 -55
- package/dist/migrations/1722804019000_create_dashboard_table.js +0 -1
- package/dist/package.json +2 -2
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { QueryState } from '../../shared/query';
|
|
2
|
-
import { AccountEntity, CategoryGroupEntity, PayeeEntity, TransactionEntity } from '../../types/models';
|
|
3
|
-
import { ParseFileOptions } from './import/parse-file';
|
|
1
|
+
import { type QueryState } from '../../shared/query';
|
|
2
|
+
import { type AccountEntity, type CategoryGroupEntity, type PayeeEntity, type TransactionEntity } from '../../types/models';
|
|
3
|
+
import { type ParseFileOptions } from './import/parse-file';
|
|
4
4
|
import { mergeTransactions } from './merge';
|
|
5
5
|
import { batchUpdateTransactions } from '.';
|
|
6
6
|
export type TransactionHandlers = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
type TransactionCAMT = {
|
|
2
2
|
amount: number;
|
|
3
3
|
date: string;
|
|
4
4
|
payee_name: string | null;
|
|
5
5
|
imported_payee: string | null;
|
|
6
6
|
notes: string | null;
|
|
7
7
|
imported_id?: string;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
9
|
export declare function xmlCAMT2json(content: string): Promise<TransactionCAMT[]>;
|
|
10
10
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Diff } from '../../shared/util';
|
|
2
|
-
import { TransactionEntity } from '../../types/models';
|
|
1
|
+
import { type Diff } from '../../shared/util';
|
|
2
|
+
import { type TransactionEntity } from '../../types/models';
|
|
3
3
|
export declare function batchUpdateTransactions({ added, deleted, updated, learnCategories, detectOrphanPayees, runTransfers, }: Partial<Diff<TransactionEntity>> & {
|
|
4
4
|
learnCategories?: boolean;
|
|
5
5
|
detectOrphanPayees?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldValueTypes, RuleConditionOp } from '../types/models';
|
|
1
|
+
import { type FieldValueTypes, type RuleConditionOp } from '../types/models';
|
|
2
2
|
export declare const FIELD_TYPES: Map<keyof FieldValueTypes, string>;
|
|
3
3
|
export declare function isValidOp(field: keyof FieldValueTypes, op: RuleConditionOp): any;
|
|
4
4
|
export declare function getValidOps(field: keyof FieldValueTypes): RuleConditionOp[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IRuleOptions } from '@rschedule/core';
|
|
2
|
-
import { Locale } from 'date-fns';
|
|
2
|
+
import { type Locale } from 'date-fns';
|
|
3
3
|
import { type PayeeEntity, type RecurConfig, type ScheduleEntity } from '../types/models';
|
|
4
4
|
import { Condition } from '../server/rules';
|
|
5
5
|
export declare function getStatus(nextDate: string, completed: boolean, hasTrans: boolean, upcomingLength?: string): "completed" | "paid" | "due" | "upcoming" | "missed" | "scheduled";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ImportTransactionsOpts } from '@actual-app/api';
|
|
1
|
+
import { type ImportTransactionsOpts } from '@actual-app/api';
|
|
2
2
|
import type { ImportTransactionsResult } from '../server/accounts/app';
|
|
3
3
|
import type { APIAccountEntity, APICategoryEntity, APICategoryGroupEntity, APIFileEntity, APIPayeeEntity, APIScheduleEntity } from '../server/api-models';
|
|
4
|
-
import { BudgetFileHandlers } from '../server/budgetfiles/app';
|
|
4
|
+
import { type BudgetFileHandlers } from '../server/budgetfiles/app';
|
|
5
5
|
import { type batchUpdateTransactions } from '../server/transactions';
|
|
6
6
|
import type { QueryState } from '../shared/query';
|
|
7
7
|
import type { ImportTransactionEntity, NewRuleEntity, RuleEntity, TransactionEntity, ScheduleEntity } from './models';
|
|
8
|
-
export
|
|
8
|
+
export type ApiHandlers = {
|
|
9
9
|
'api/batch-budget-start': () => Promise<void>;
|
|
10
10
|
'api/batch-budget-end': () => Promise<void>;
|
|
11
11
|
'api/load-budget': (...args: Parameters<BudgetFileHandlers['load-budget']>) => Promise<void>;
|
|
@@ -193,4 +193,4 @@ export interface ApiHandlers {
|
|
|
193
193
|
} | {
|
|
194
194
|
version: string;
|
|
195
195
|
}>;
|
|
196
|
-
}
|
|
196
|
+
};
|
|
@@ -19,6 +19,5 @@ import type { ToolsHandlers } from '../server/tools/app';
|
|
|
19
19
|
import type { TransactionHandlers } from '../server/transactions/app';
|
|
20
20
|
import type { ApiHandlers } from './api-handlers';
|
|
21
21
|
import type { ServerHandlers } from './server-handlers';
|
|
22
|
-
export
|
|
23
|
-
}
|
|
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;
|
|
24
23
|
export type HandlerFunctions = Handlers[keyof Handlers];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GoCardlessAmount, GoCardlessBalance, GoCardlessTransaction } from './gocardless';
|
|
1
|
+
import { type GoCardlessAmount, type GoCardlessBalance, type GoCardlessTransaction } from './gocardless';
|
|
2
2
|
export type BankSyncBalance = GoCardlessBalance;
|
|
3
3
|
export type BankSyncAmount = GoCardlessAmount;
|
|
4
4
|
export type BankSyncTransaction = GoCardlessTransaction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CategoryEntity } from './category';
|
|
2
|
-
export
|
|
1
|
+
import { type CategoryEntity } from './category';
|
|
2
|
+
export type CategoryGroupEntity = {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
is_income?: boolean;
|
|
@@ -7,4 +7,4 @@ export interface CategoryGroupEntity {
|
|
|
7
7
|
tombstone?: boolean;
|
|
8
8
|
hidden?: boolean;
|
|
9
9
|
categories?: CategoryEntity[];
|
|
10
|
-
}
|
|
10
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CategoryGroupEntity } from './category-group';
|
|
2
|
-
export
|
|
1
|
+
import { type CategoryGroupEntity } from './category-group';
|
|
2
|
+
export type CategoryEntity = {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
is_income?: boolean;
|
|
@@ -11,4 +11,4 @@ export interface CategoryEntity {
|
|
|
11
11
|
sort_order?: number;
|
|
12
12
|
tombstone?: boolean;
|
|
13
13
|
hidden?: boolean;
|
|
14
|
-
}
|
|
14
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Represents a transaction object specifically for import operations.
|
|
3
3
|
* This type is used when importing transactions from external sources.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type ImportTransactionEntity = {
|
|
6
6
|
/** Required. The ID of the account this transaction belongs to */
|
|
7
7
|
account: string;
|
|
8
8
|
/** Required. Transaction date in YYYY-MM-DD format */
|
|
@@ -42,4 +42,4 @@ export interface ImportTransactionEntity {
|
|
|
42
42
|
category?: string;
|
|
43
43
|
notes?: string;
|
|
44
44
|
}>;
|
|
45
|
-
}
|
|
45
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AccountEntity } from './account';
|
|
2
|
-
export
|
|
1
|
+
import { type AccountEntity } from './account';
|
|
2
|
+
export type PayeeEntity = {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
transfer_acct?: AccountEntity['id'];
|
|
6
6
|
favorite?: boolean;
|
|
7
7
|
learn_categories?: boolean;
|
|
8
8
|
tombstone?: boolean;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RuleConditionEntity } from './rule';
|
|
2
|
-
export
|
|
2
|
+
export type CustomReportEntity = {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
startDate: string;
|
|
@@ -22,7 +22,7 @@ export interface CustomReportEntity {
|
|
|
22
22
|
conditionsOp: 'and' | 'or';
|
|
23
23
|
data?: GroupedEntity;
|
|
24
24
|
tombstone?: boolean;
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
export type balanceTypeOpType = 'totalAssets' | 'totalDebts' | 'totalTotals' | 'netAssets' | 'netDebts';
|
|
27
27
|
export type sortByOpType = 'asc' | 'desc' | 'name' | 'budget';
|
|
28
28
|
export type SpendingMonthEntity = Record<string | number, {
|
|
@@ -31,14 +31,14 @@ export type SpendingMonthEntity = Record<string | number, {
|
|
|
31
31
|
date: string;
|
|
32
32
|
month: string;
|
|
33
33
|
}>;
|
|
34
|
-
export
|
|
34
|
+
export type SpendingDataEntity = {
|
|
35
35
|
date: string;
|
|
36
36
|
totalAssets: number;
|
|
37
37
|
totalDebts: number;
|
|
38
38
|
totalTotals: number;
|
|
39
39
|
cumulative: number;
|
|
40
|
-
}
|
|
41
|
-
export
|
|
40
|
+
};
|
|
41
|
+
export type SpendingEntity = {
|
|
42
42
|
intervalData: {
|
|
43
43
|
months: SpendingMonthEntity;
|
|
44
44
|
day: string;
|
|
@@ -52,8 +52,8 @@ export interface SpendingEntity {
|
|
|
52
52
|
totalDebts: number;
|
|
53
53
|
totalAssets: number;
|
|
54
54
|
totalTotals: number;
|
|
55
|
-
}
|
|
56
|
-
export
|
|
55
|
+
};
|
|
56
|
+
export type DataEntity = {
|
|
57
57
|
data?: GroupedEntity[];
|
|
58
58
|
intervalData: IntervalEntity[];
|
|
59
59
|
groupedData?: GroupedEntity[] | null;
|
|
@@ -65,7 +65,7 @@ export interface DataEntity {
|
|
|
65
65
|
netAssets: number;
|
|
66
66
|
netDebts: number;
|
|
67
67
|
totalTotals: number;
|
|
68
|
-
}
|
|
68
|
+
};
|
|
69
69
|
export type LegendEntity = {
|
|
70
70
|
name: string;
|
|
71
71
|
id: string | null;
|
|
@@ -82,7 +82,7 @@ export type IntervalEntity = {
|
|
|
82
82
|
netDebts: number;
|
|
83
83
|
totalTotals: number;
|
|
84
84
|
};
|
|
85
|
-
export
|
|
85
|
+
export type GroupedEntity = {
|
|
86
86
|
id: string;
|
|
87
87
|
name: string;
|
|
88
88
|
date?: string;
|
|
@@ -93,11 +93,11 @@ export interface GroupedEntity {
|
|
|
93
93
|
netAssets: number;
|
|
94
94
|
netDebts: number;
|
|
95
95
|
categories?: GroupedEntity[];
|
|
96
|
-
}
|
|
96
|
+
};
|
|
97
97
|
export type Interval = {
|
|
98
98
|
interval: string;
|
|
99
99
|
};
|
|
100
|
-
export
|
|
100
|
+
export type CustomReportData = {
|
|
101
101
|
id: string;
|
|
102
102
|
name: string;
|
|
103
103
|
start_date: string;
|
|
@@ -120,4 +120,4 @@ export interface CustomReportData {
|
|
|
120
120
|
metadata?: GroupedEntity;
|
|
121
121
|
interval: string;
|
|
122
122
|
color_scheme?: string;
|
|
123
|
-
}
|
|
123
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type RecurConfig, type ScheduleEntity } from './schedule';
|
|
2
|
-
export
|
|
2
|
+
export type NewRuleEntity = {
|
|
3
3
|
stage: 'pre' | null | 'post';
|
|
4
4
|
conditionsOp: 'or' | 'and';
|
|
5
5
|
conditions: RuleConditionEntity[];
|
|
6
6
|
actions: RuleActionEntity[];
|
|
7
7
|
tombstone?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export
|
|
8
|
+
};
|
|
9
|
+
export type RuleEntity = {
|
|
10
10
|
id: string;
|
|
11
|
-
}
|
|
11
|
+
} & NewRuleEntity;
|
|
12
12
|
export type RuleConditionOp = RuleConditionEntity['op'];
|
|
13
13
|
export type FieldValueTypes = {
|
|
14
14
|
account: string;
|
|
@@ -47,7 +47,7 @@ type BaseConditionEntity<Field extends keyof FieldValueTypes, Op extends RuleCon
|
|
|
47
47
|
};
|
|
48
48
|
export type RuleConditionEntity = BaseConditionEntity<'account', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches' | 'onBudget' | 'offBudget'> | BaseConditionEntity<'category', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches'> | BaseConditionEntity<'amount', 'is' | 'isapprox' | 'isbetween' | 'gt' | 'gte' | 'lt' | 'lte'> | BaseConditionEntity<'date', 'is' | 'isapprox' | 'isbetween' | 'gt' | 'gte' | 'lt' | 'lte'> | BaseConditionEntity<'notes', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches' | 'hasTags'> | BaseConditionEntity<'payee', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches'> | BaseConditionEntity<'imported_payee', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches'> | BaseConditionEntity<'saved', 'is'> | BaseConditionEntity<'cleared', 'is'> | BaseConditionEntity<'reconciled', 'is'> | BaseConditionEntity<'transfer', 'is'>;
|
|
49
49
|
export type RuleActionEntity = SetRuleActionEntity | SetSplitAmountRuleActionEntity | LinkScheduleRuleActionEntity | PrependNoteRuleActionEntity | AppendNoteRuleActionEntity | DeleteTransactionRuleActionEntity;
|
|
50
|
-
export
|
|
50
|
+
export type SetRuleActionEntity = {
|
|
51
51
|
field: string;
|
|
52
52
|
op: 'set';
|
|
53
53
|
value: unknown;
|
|
@@ -57,29 +57,29 @@ export interface SetRuleActionEntity {
|
|
|
57
57
|
splitIndex?: number;
|
|
58
58
|
};
|
|
59
59
|
type?: string;
|
|
60
|
-
}
|
|
61
|
-
export
|
|
60
|
+
};
|
|
61
|
+
export type SetSplitAmountRuleActionEntity = {
|
|
62
62
|
op: 'set-split-amount';
|
|
63
63
|
value: number;
|
|
64
64
|
options?: {
|
|
65
65
|
splitIndex?: number;
|
|
66
66
|
method: 'fixed-amount' | 'fixed-percent' | 'remainder';
|
|
67
67
|
};
|
|
68
|
-
}
|
|
69
|
-
export
|
|
68
|
+
};
|
|
69
|
+
export type LinkScheduleRuleActionEntity = {
|
|
70
70
|
op: 'link-schedule';
|
|
71
71
|
value: ScheduleEntity;
|
|
72
|
-
}
|
|
73
|
-
export
|
|
72
|
+
};
|
|
73
|
+
export type PrependNoteRuleActionEntity = {
|
|
74
74
|
op: 'prepend-notes';
|
|
75
75
|
value: string;
|
|
76
|
-
}
|
|
77
|
-
export
|
|
76
|
+
};
|
|
77
|
+
export type AppendNoteRuleActionEntity = {
|
|
78
78
|
op: 'append-notes';
|
|
79
79
|
value: string;
|
|
80
|
-
}
|
|
81
|
-
export
|
|
80
|
+
};
|
|
81
|
+
export type DeleteTransactionRuleActionEntity = {
|
|
82
82
|
op: 'delete-transaction';
|
|
83
83
|
value: string;
|
|
84
|
-
}
|
|
84
|
+
};
|
|
85
85
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { AccountEntity } from './account';
|
|
2
2
|
import type { PayeeEntity } from './payee';
|
|
3
3
|
import type { RuleConditionEntity, RuleEntity } from './rule';
|
|
4
|
-
export
|
|
4
|
+
export type RecurPattern = {
|
|
5
5
|
value: number;
|
|
6
6
|
type: 'SU' | 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA' | 'day';
|
|
7
|
-
}
|
|
8
|
-
export
|
|
7
|
+
};
|
|
8
|
+
export type RecurConfig = {
|
|
9
9
|
frequency: 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
10
10
|
interval?: number;
|
|
11
11
|
patterns?: RecurPattern[];
|
|
@@ -15,8 +15,8 @@ export interface RecurConfig {
|
|
|
15
15
|
endOccurrences?: number;
|
|
16
16
|
endDate?: string;
|
|
17
17
|
weekendSolveMode?: 'before' | 'after';
|
|
18
|
-
}
|
|
19
|
-
export
|
|
18
|
+
};
|
|
19
|
+
export type ScheduleEntity = {
|
|
20
20
|
id: string;
|
|
21
21
|
name?: string;
|
|
22
22
|
rule: RuleEntity['id'];
|
|
@@ -36,7 +36,7 @@ export interface ScheduleEntity {
|
|
|
36
36
|
_actions: Array<{
|
|
37
37
|
op: unknown;
|
|
38
38
|
}>;
|
|
39
|
-
}
|
|
39
|
+
};
|
|
40
40
|
export type DiscoverScheduleEntity = {
|
|
41
41
|
id: ScheduleEntity['id'];
|
|
42
42
|
account: AccountEntity['id'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AccountEntity } from './account';
|
|
2
|
-
import { BankSyncResponse } from './bank-sync';
|
|
1
|
+
import { type AccountEntity } from './account';
|
|
2
|
+
import { type BankSyncResponse } from './bank-sync';
|
|
3
3
|
export type SimpleFinOrganization = {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
@@ -11,9 +11,9 @@ export type SimpleFinAccount = {
|
|
|
11
11
|
balance: number;
|
|
12
12
|
org: SimpleFinOrganization;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type SimpleFinBatchSyncResponse = {
|
|
15
15
|
[accountId: NonNullable<AccountEntity['account_id']>]: BankSyncResponse;
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
17
|
export type SyncServerSimpleFinAccount = {
|
|
18
18
|
balance: number;
|
|
19
19
|
account_id: string;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
type BaseTemplate = {
|
|
2
2
|
type: string;
|
|
3
3
|
directive: 'template' | 'goal' | 'error';
|
|
4
|
-
}
|
|
5
|
-
|
|
4
|
+
};
|
|
5
|
+
type BaseTemplateWithPriority = {
|
|
6
6
|
priority: number;
|
|
7
7
|
directive: 'template';
|
|
8
|
-
}
|
|
9
|
-
export
|
|
8
|
+
} & BaseTemplate;
|
|
9
|
+
export type PercentageTemplate = {
|
|
10
10
|
type: 'percentage';
|
|
11
11
|
percent: number;
|
|
12
12
|
previous: boolean;
|
|
13
13
|
category: string;
|
|
14
|
-
}
|
|
15
|
-
export
|
|
14
|
+
} & BaseTemplateWithPriority;
|
|
15
|
+
export type PeriodicTemplate = {
|
|
16
16
|
type: 'periodic';
|
|
17
17
|
amount: number;
|
|
18
18
|
period: {
|
|
@@ -26,24 +26,24 @@ export interface PeriodicTemplate extends BaseTemplateWithPriority {
|
|
|
26
26
|
period: 'daily' | 'weekly' | 'monthly';
|
|
27
27
|
start?: string;
|
|
28
28
|
};
|
|
29
|
-
}
|
|
30
|
-
export
|
|
29
|
+
} & BaseTemplateWithPriority;
|
|
30
|
+
export type ByTemplate = {
|
|
31
31
|
type: 'by';
|
|
32
32
|
amount: number;
|
|
33
33
|
month: string;
|
|
34
34
|
annual?: boolean;
|
|
35
35
|
repeat?: number;
|
|
36
36
|
from?: string;
|
|
37
|
-
}
|
|
38
|
-
export
|
|
37
|
+
} & BaseTemplateWithPriority;
|
|
38
|
+
export type SpendTemplate = {
|
|
39
39
|
type: 'spend';
|
|
40
40
|
amount: number;
|
|
41
41
|
month: string;
|
|
42
42
|
from: string;
|
|
43
43
|
annual?: boolean;
|
|
44
44
|
repeat?: number;
|
|
45
|
-
}
|
|
46
|
-
export
|
|
45
|
+
} & BaseTemplateWithPriority;
|
|
46
|
+
export type SimpleTemplate = {
|
|
47
47
|
type: 'simple';
|
|
48
48
|
monthly?: number;
|
|
49
49
|
limit?: {
|
|
@@ -52,22 +52,22 @@ export interface SimpleTemplate extends BaseTemplateWithPriority {
|
|
|
52
52
|
period: 'daily' | 'weekly' | 'monthly';
|
|
53
53
|
start?: string;
|
|
54
54
|
};
|
|
55
|
-
}
|
|
56
|
-
export
|
|
55
|
+
} & BaseTemplateWithPriority;
|
|
56
|
+
export type ScheduleTemplate = {
|
|
57
57
|
type: 'schedule';
|
|
58
58
|
name: string;
|
|
59
59
|
full?: boolean;
|
|
60
60
|
adjustment?: number;
|
|
61
|
-
}
|
|
62
|
-
export
|
|
61
|
+
} & BaseTemplateWithPriority;
|
|
62
|
+
export type AverageTemplate = {
|
|
63
63
|
type: 'average';
|
|
64
64
|
numMonths: number;
|
|
65
|
-
}
|
|
66
|
-
export
|
|
65
|
+
} & BaseTemplateWithPriority;
|
|
66
|
+
export type CopyTemplate = {
|
|
67
67
|
type: 'copy';
|
|
68
68
|
lookBack: number;
|
|
69
|
-
}
|
|
70
|
-
export
|
|
69
|
+
} & BaseTemplateWithPriority;
|
|
70
|
+
export type RemainderTemplate = {
|
|
71
71
|
type: 'remainder';
|
|
72
72
|
weight: number;
|
|
73
73
|
limit?: {
|
|
@@ -78,13 +78,13 @@ export interface RemainderTemplate extends BaseTemplate {
|
|
|
78
78
|
};
|
|
79
79
|
directive: 'template';
|
|
80
80
|
priority: null;
|
|
81
|
-
}
|
|
82
|
-
export
|
|
81
|
+
} & BaseTemplate;
|
|
82
|
+
export type GoalTemplate = {
|
|
83
83
|
type: 'goal';
|
|
84
84
|
amount: number;
|
|
85
85
|
directive: 'goal';
|
|
86
|
-
}
|
|
87
|
-
export
|
|
86
|
+
} & BaseTemplate;
|
|
87
|
+
export type LimitTemplate = {
|
|
88
88
|
type: 'limit';
|
|
89
89
|
amount: number;
|
|
90
90
|
hold: boolean;
|
|
@@ -92,12 +92,12 @@ export interface LimitTemplate extends BaseTemplate {
|
|
|
92
92
|
start?: string;
|
|
93
93
|
directive: 'template';
|
|
94
94
|
priority: null;
|
|
95
|
-
}
|
|
96
|
-
|
|
95
|
+
} & BaseTemplate;
|
|
96
|
+
type ErrorTemplate = {
|
|
97
97
|
type: 'error';
|
|
98
98
|
line: string;
|
|
99
99
|
error: string;
|
|
100
100
|
directive: 'error';
|
|
101
|
-
}
|
|
101
|
+
} & BaseTemplate;
|
|
102
102
|
export type Template = PercentageTemplate | PeriodicTemplate | ByTemplate | SpendTemplate | SimpleTemplate | ScheduleTemplate | RemainderTemplate | AverageTemplate | GoalTemplate | CopyTemplate | LimitTemplate | ErrorTemplate;
|
|
103
103
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type RuleConditionEntity } from './rule';
|
|
2
|
-
export
|
|
2
|
+
export type TransactionFilterEntity = {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
conditionsOp: 'and' | 'or';
|
|
6
6
|
conditions: RuleConditionEntity[];
|
|
7
7
|
tombstone: boolean;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IntegerAmount } from '../../shared/util';
|
|
2
|
-
import { AccountEntity } from './account';
|
|
3
|
-
import { CategoryEntity } from './category';
|
|
4
|
-
import { PayeeEntity } from './payee';
|
|
5
|
-
import { ScheduleEntity } from './schedule';
|
|
6
|
-
export
|
|
1
|
+
import { type IntegerAmount } from '../../shared/util';
|
|
2
|
+
import { type AccountEntity } from './account';
|
|
3
|
+
import { type CategoryEntity } from './category';
|
|
4
|
+
import { type PayeeEntity } from './payee';
|
|
5
|
+
import { type ScheduleEntity } from './schedule';
|
|
6
|
+
export type TransactionEntity = {
|
|
7
7
|
id: string;
|
|
8
8
|
is_parent?: boolean;
|
|
9
9
|
is_child?: boolean;
|
|
@@ -34,4 +34,4 @@ export interface TransactionEntity {
|
|
|
34
34
|
} | null;
|
|
35
35
|
raw_synced_data?: string | undefined;
|
|
36
36
|
_ruleErrors?: string[];
|
|
37
|
-
}
|
|
37
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type NewUserAccessEntity = {
|
|
2
2
|
fileId: string;
|
|
3
3
|
userId: string;
|
|
4
|
-
}
|
|
5
|
-
export
|
|
4
|
+
};
|
|
5
|
+
export type UserAccessEntity = {
|
|
6
6
|
displayName: string;
|
|
7
7
|
userName: string;
|
|
8
8
|
fileName: string;
|
|
9
|
-
}
|
|
9
|
+
} & NewUserAccessEntity;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type NewUserEntity = {
|
|
2
2
|
userName: string;
|
|
3
3
|
displayName: string;
|
|
4
4
|
role: string;
|
|
5
5
|
enabled: boolean;
|
|
6
|
-
}
|
|
7
|
-
export
|
|
6
|
+
};
|
|
7
|
+
export type UserEntity = {
|
|
8
8
|
id: string;
|
|
9
9
|
owner: boolean;
|
|
10
|
-
}
|
|
11
|
-
export
|
|
10
|
+
} & NewUserEntity;
|
|
11
|
+
export type UserEntityDropdown = {
|
|
12
12
|
userId: string;
|
|
13
13
|
userName: string;
|
|
14
14
|
displayName?: string;
|
|
15
|
-
}
|
|
16
|
-
export
|
|
15
|
+
};
|
|
16
|
+
export type UserAvailable = {
|
|
17
17
|
userId: string;
|
|
18
18
|
displayName?: string;
|
|
19
19
|
userName: string;
|
|
20
20
|
haveAccess?: number;
|
|
21
21
|
owner?: number;
|
|
22
|
-
}
|
|
22
|
+
};
|
|
@@ -41,7 +41,7 @@ type StartImportEvent = {
|
|
|
41
41
|
};
|
|
42
42
|
type StartLoadEvent = undefined;
|
|
43
43
|
type ApiFetchRedirectedEvent = undefined;
|
|
44
|
-
export
|
|
44
|
+
export type ServerEvents = {
|
|
45
45
|
'backups-updated': BackupUpdatedEvent;
|
|
46
46
|
'cells-changed': CellsChangedEvent;
|
|
47
47
|
'fallback-write-error': FallbackWriteErrorEvent;
|
|
@@ -57,5 +57,5 @@ export interface ServerEvents {
|
|
|
57
57
|
'sync-event': SyncEvent;
|
|
58
58
|
'undo-event': UndoState;
|
|
59
59
|
'api-fetch-redirected': ApiFetchRedirectedEvent;
|
|
60
|
-
}
|
|
60
|
+
};
|
|
61
61
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { QueryState } from '../shared/query';
|
|
2
|
-
export
|
|
1
|
+
import { type QueryState } from '../shared/query';
|
|
2
|
+
export type ServerHandlers = {
|
|
3
3
|
undo: () => Promise<void>;
|
|
4
4
|
redo: () => Promise<void>;
|
|
5
5
|
'make-filters-from-conditions': (arg: {
|
|
@@ -27,4 +27,4 @@ export interface ServerHandlers {
|
|
|
27
27
|
error?: string;
|
|
28
28
|
}>;
|
|
29
29
|
'app-focused': () => Promise<void>;
|
|
30
|
-
}
|
|
30
|
+
};
|