@actual-app/api 25.4.0 → 25.6.0-edge.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/app/bundle.api.d.ts +1 -5
- package/@types/loot-core/mocks/index.d.ts +5 -2
- package/@types/loot-core/mocks/util.d.ts +1 -0
- package/@types/loot-core/platform/server/asyncStorage/index.d.ts +7 -6
- package/@types/loot-core/platform/server/indexeddb/index.d.ts +15 -24
- package/@types/loot-core/server/accounts/sync.d.ts +1 -9
- package/@types/loot-core/server/api-models.d.ts +2 -10
- package/@types/loot-core/server/aql/compiler.d.ts +40 -38
- package/@types/loot-core/server/aql/exec.d.ts +15 -7
- package/@types/loot-core/server/aql/index.d.ts +8 -1
- package/@types/loot-core/server/aql/schema/executors.d.ts +2 -5
- package/@types/loot-core/server/auth/app.d.ts +142 -0
- package/@types/loot-core/server/budget/app.d.ts +1 -1
- package/@types/loot-core/server/budget/base.d.ts +2 -1
- package/@types/loot-core/server/budget/category-template-context.d.ts +49 -0
- package/@types/loot-core/server/budget/cleanup-template.d.ts +8 -1
- package/@types/loot-core/server/budget/envelope.d.ts +3 -0
- package/@types/loot-core/server/budget/goal-template.d.ts +29 -0
- package/@types/loot-core/server/budget/report.d.ts +4 -1
- package/@types/loot-core/server/budget/schedule-template.d.ts +7 -0
- package/@types/loot-core/server/budget/template-notes.d.ts +7 -1
- package/@types/loot-core/server/budget/types/templates.d.ts +20 -4
- package/@types/loot-core/server/budgetfiles/app.d.ts +139 -0
- package/@types/loot-core/server/cloud-storage.d.ts +2 -2
- package/@types/loot-core/server/db/index.d.ts +3 -2
- package/@types/loot-core/server/encryption/app.d.ts +40 -0
- package/@types/loot-core/server/{encryption-internals.d.ts → encryption/encryption-internals.d.ts} +0 -1
- package/@types/loot-core/server/errors.d.ts +4 -0
- package/@types/loot-core/server/importers/index.d.ts +1 -2
- package/@types/loot-core/server/main-app.d.ts +1 -1
- package/@types/loot-core/server/prefs.d.ts +1 -1
- package/@types/loot-core/server/reports/app.d.ts +2 -2
- package/@types/loot-core/server/spreadsheet/spreadsheet.d.ts +9 -2
- package/@types/loot-core/server/tools/app.d.ts +1 -0
- package/@types/loot-core/server/transactions/app.d.ts +4 -1
- package/@types/loot-core/server/transactions/import/ofx2json.d.ts +1 -0
- package/@types/loot-core/server/transactions/import/parse-file.d.ts +1 -0
- package/@types/loot-core/server/transactions/index.d.ts +1 -0
- package/@types/loot-core/server/transactions/merge.d.ts +2 -0
- package/@types/loot-core/server/transactions/transaction-rules.d.ts +1 -0
- package/@types/loot-core/server/transactions/transfer.d.ts +2 -2
- package/@types/loot-core/shared/errors.d.ts +4 -4
- package/@types/loot-core/shared/locale.d.ts +2 -1
- package/@types/loot-core/shared/months.d.ts +6 -0
- package/@types/loot-core/shared/schedules.d.ts +2 -1
- package/@types/loot-core/shared/transactions.d.ts +7 -67
- package/@types/loot-core/shared/util.d.ts +3 -2
- package/@types/loot-core/types/api-handlers.d.ts +170 -183
- package/@types/loot-core/types/budget.d.ts +6 -6
- package/@types/loot-core/types/handlers.d.ts +5 -21
- package/@types/loot-core/types/models/bank-sync.d.ts +10 -17
- package/@types/loot-core/types/models/category-group.d.ts +8 -13
- package/@types/loot-core/types/models/category.d.ts +8 -8
- package/@types/loot-core/types/models/dashboard.d.ts +43 -88
- package/@types/loot-core/types/models/gocardless.d.ts +56 -71
- package/@types/loot-core/types/models/note.d.ts +2 -2
- package/@types/loot-core/types/models/openid.d.ts +6 -6
- package/@types/loot-core/types/models/payee.d.ts +6 -7
- package/@types/loot-core/types/models/reports.d.ts +98 -118
- package/@types/loot-core/types/models/rule.d.ts +62 -161
- package/@types/loot-core/types/models/schedule.d.ts +36 -38
- package/@types/loot-core/types/models/simplefin.d.ts +13 -17
- package/@types/loot-core/types/models/transaction-filter.d.ts +5 -6
- package/@types/loot-core/types/models/transaction.d.ts +30 -30
- package/@types/loot-core/types/prefs.d.ts +2 -5
- package/@types/loot-core/types/server-events.d.ts +43 -68
- package/@types/loot-core/types/server-handlers.d.ts +26 -198
- package/@types/loot-core/types/util.d.ts +7 -18
- package/@types/methods.d.ts +6 -1
- package/@types/vitest.config.d.ts +7 -0
- package/dist/app/bundle.api.js +16159 -110865
- package/dist/methods.js +8 -0
- package/dist/migrations/1745425408000_update_budgetType_pref.sql +7 -0
- package/dist/package.json +8 -10
- package/dist/vitest.config.js +11 -0
- package/package.json +8 -10
- package/@types/jest.config.d.ts +0 -9
- package/@types/loot-core/client/accounts/accountsSlice.d.ts +0 -175
- package/@types/loot-core/client/app/appSlice.d.ts +0 -175
- package/@types/loot-core/client/budgets/budgetsSlice.d.ts +0 -401
- package/@types/loot-core/client/modals/modalsSlice.d.ts +0 -486
- package/@types/loot-core/client/notifications/notificationsSlice.d.ts +0 -47
- package/@types/loot-core/client/prefs/prefsSlice.d.ts +0 -186
- package/@types/loot-core/client/queries/queriesSlice.d.ts +0 -692
- package/@types/loot-core/client/redux.d.ts +0 -18546
- package/@types/loot-core/client/store/index.d.ts +0 -133
- package/@types/loot-core/client/users/usersSlice.d.ts +0 -89
- package/@types/loot-core/platform/client/undo/index.d.ts +0 -21
- package/@types/loot-core/server/aql/schema/run-query.d.ts +0 -6
- package/@types/loot-core/server/backups.test.d.ts +0 -1
- package/@types/loot-core/server/budget/categoryTemplate.d.ts +0 -49
- package/@types/loot-core/server/budget/goalsSchedule.d.ts +0 -8
- package/@types/loot-core/server/budget/goaltemplates.d.ts +0 -16
- package/@types/loot-core/server/encryption-internals.web.d.ts +0 -23
- package/@types/loot-core/server/encryption.test.d.ts +0 -1
- package/@types/loot-core/server/platform.d.ts +0 -3
- package/@types/loot-core/server/platform.web.d.ts +0 -3
- package/@types/loot-core/types/file.d.ts +0 -47
- package/dist/jest.config.js +0 -22
- /package/@types/loot-core/server/{backups.d.ts → budgetfiles/backups.d.ts} +0 -0
- /package/@types/loot-core/server/{encryption.d.ts → encryption/index.d.ts} +0 -0
- /package/@types/loot-core/{client → shared}/platform.d.ts +0 -0
|
@@ -1,179 +1,80 @@
|
|
|
1
1
|
import { type RecurConfig, type ScheduleEntity } from './schedule';
|
|
2
|
-
|
|
3
2
|
export interface NewRuleEntity {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
stage: 'pre' | null | 'post';
|
|
4
|
+
conditionsOp: 'or' | 'and';
|
|
5
|
+
conditions: RuleConditionEntity[];
|
|
6
|
+
actions: RuleActionEntity[];
|
|
7
|
+
tombstone?: boolean;
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
export interface RuleEntity extends NewRuleEntity {
|
|
12
|
-
|
|
10
|
+
id: string;
|
|
13
11
|
}
|
|
14
|
-
|
|
15
|
-
export type RuleConditionOp =
|
|
16
|
-
| 'is'
|
|
17
|
-
| 'isNot'
|
|
18
|
-
| 'oneOf'
|
|
19
|
-
| 'notOneOf'
|
|
20
|
-
| 'isapprox'
|
|
21
|
-
| 'isbetween'
|
|
22
|
-
| 'gt'
|
|
23
|
-
| 'gte'
|
|
24
|
-
| 'lt'
|
|
25
|
-
| 'lte'
|
|
26
|
-
| 'contains'
|
|
27
|
-
| 'doesNotContain'
|
|
28
|
-
| 'hasTags'
|
|
29
|
-
| 'and'
|
|
30
|
-
| 'matches'
|
|
31
|
-
| 'onBudget'
|
|
32
|
-
| 'offBudget';
|
|
33
|
-
|
|
12
|
+
export type RuleConditionOp = 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'isapprox' | 'isbetween' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'doesNotContain' | 'hasTags' | 'and' | 'matches' | 'onBudget' | 'offBudget';
|
|
34
13
|
export type FieldValueTypes = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
14
|
+
account: string;
|
|
15
|
+
amount: number;
|
|
16
|
+
category: string;
|
|
17
|
+
date: string | RecurConfig;
|
|
18
|
+
notes: string;
|
|
19
|
+
payee: string;
|
|
20
|
+
payee_name: string;
|
|
21
|
+
imported_payee: string;
|
|
22
|
+
saved: string;
|
|
23
|
+
transfer: boolean;
|
|
24
|
+
parent: boolean;
|
|
25
|
+
cleared: boolean;
|
|
26
|
+
reconciled: boolean;
|
|
48
27
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
type?: 'id' | 'boolean' | 'date' | 'number' | 'string';
|
|
69
|
-
customName?: string;
|
|
70
|
-
queryFilter?: Record<string, { $oneof: string[] }>;
|
|
28
|
+
type BaseConditionEntity<Field extends keyof FieldValueTypes, Op extends RuleConditionOp> = {
|
|
29
|
+
field: Field;
|
|
30
|
+
op: Op;
|
|
31
|
+
value: Op extends 'oneOf' | 'notOneOf' ? Array<FieldValueTypes[Field]> : Op extends 'isbetween' ? {
|
|
32
|
+
num1: number;
|
|
33
|
+
num2: number;
|
|
34
|
+
} : FieldValueTypes[Field];
|
|
35
|
+
options?: {
|
|
36
|
+
inflow?: boolean;
|
|
37
|
+
outflow?: boolean;
|
|
38
|
+
month?: boolean;
|
|
39
|
+
year?: boolean;
|
|
40
|
+
};
|
|
41
|
+
conditionsOp?: string;
|
|
42
|
+
type?: 'id' | 'boolean' | 'date' | 'number' | 'string';
|
|
43
|
+
customName?: string;
|
|
44
|
+
queryFilter?: Record<string, {
|
|
45
|
+
$oneof: string[];
|
|
46
|
+
}>;
|
|
71
47
|
};
|
|
72
|
-
|
|
73
|
-
export type
|
|
74
|
-
| BaseConditionEntity<
|
|
75
|
-
'account',
|
|
76
|
-
| 'is'
|
|
77
|
-
| 'isNot'
|
|
78
|
-
| 'oneOf'
|
|
79
|
-
| 'notOneOf'
|
|
80
|
-
| 'contains'
|
|
81
|
-
| 'doesNotContain'
|
|
82
|
-
| 'matches'
|
|
83
|
-
| 'onBudget'
|
|
84
|
-
| 'offBudget'
|
|
85
|
-
>
|
|
86
|
-
| BaseConditionEntity<
|
|
87
|
-
'category',
|
|
88
|
-
| 'is'
|
|
89
|
-
| 'isNot'
|
|
90
|
-
| 'oneOf'
|
|
91
|
-
| 'notOneOf'
|
|
92
|
-
| 'contains'
|
|
93
|
-
| 'doesNotContain'
|
|
94
|
-
| 'matches'
|
|
95
|
-
>
|
|
96
|
-
| BaseConditionEntity<
|
|
97
|
-
'amount',
|
|
98
|
-
'is' | 'isapprox' | 'isbetween' | 'gt' | 'gte' | 'lt' | 'lte'
|
|
99
|
-
>
|
|
100
|
-
| BaseConditionEntity<
|
|
101
|
-
'date',
|
|
102
|
-
'is' | 'isapprox' | 'isbetween' | 'gt' | 'gte' | 'lt' | 'lte'
|
|
103
|
-
>
|
|
104
|
-
| BaseConditionEntity<
|
|
105
|
-
'notes',
|
|
106
|
-
| 'is'
|
|
107
|
-
| 'isNot'
|
|
108
|
-
| 'oneOf'
|
|
109
|
-
| 'notOneOf'
|
|
110
|
-
| 'contains'
|
|
111
|
-
| 'doesNotContain'
|
|
112
|
-
| 'matches'
|
|
113
|
-
| 'hasTags'
|
|
114
|
-
>
|
|
115
|
-
| BaseConditionEntity<
|
|
116
|
-
'payee',
|
|
117
|
-
| 'is'
|
|
118
|
-
| 'isNot'
|
|
119
|
-
| 'oneOf'
|
|
120
|
-
| 'notOneOf'
|
|
121
|
-
| 'contains'
|
|
122
|
-
| 'doesNotContain'
|
|
123
|
-
| 'matches'
|
|
124
|
-
>
|
|
125
|
-
| BaseConditionEntity<
|
|
126
|
-
'imported_payee',
|
|
127
|
-
| 'is'
|
|
128
|
-
| 'isNot'
|
|
129
|
-
| 'oneOf'
|
|
130
|
-
| 'notOneOf'
|
|
131
|
-
| 'contains'
|
|
132
|
-
| 'doesNotContain'
|
|
133
|
-
| 'matches'
|
|
134
|
-
>
|
|
135
|
-
| BaseConditionEntity<'saved', 'is'>
|
|
136
|
-
| BaseConditionEntity<'cleared', 'is'>
|
|
137
|
-
| BaseConditionEntity<'reconciled', 'is'>;
|
|
138
|
-
|
|
139
|
-
export type RuleActionEntity =
|
|
140
|
-
| SetRuleActionEntity
|
|
141
|
-
| SetSplitAmountRuleActionEntity
|
|
142
|
-
| LinkScheduleRuleActionEntity
|
|
143
|
-
| PrependNoteRuleActionEntity
|
|
144
|
-
| AppendNoteRuleActionEntity;
|
|
145
|
-
|
|
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'>;
|
|
49
|
+
export type RuleActionEntity = SetRuleActionEntity | SetSplitAmountRuleActionEntity | LinkScheduleRuleActionEntity | PrependNoteRuleActionEntity | AppendNoteRuleActionEntity;
|
|
146
50
|
export interface SetRuleActionEntity {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
51
|
+
field: string;
|
|
52
|
+
op: 'set';
|
|
53
|
+
value: unknown;
|
|
54
|
+
options?: {
|
|
55
|
+
template?: string;
|
|
56
|
+
splitIndex?: number;
|
|
57
|
+
};
|
|
58
|
+
type?: string;
|
|
155
59
|
}
|
|
156
|
-
|
|
157
60
|
export interface SetSplitAmountRuleActionEntity {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
61
|
+
op: 'set-split-amount';
|
|
62
|
+
value: number;
|
|
63
|
+
options?: {
|
|
64
|
+
splitIndex?: number;
|
|
65
|
+
method: 'fixed-amount' | 'fixed-percent' | 'remainder';
|
|
66
|
+
};
|
|
164
67
|
}
|
|
165
|
-
|
|
166
68
|
export interface LinkScheduleRuleActionEntity {
|
|
167
|
-
|
|
168
|
-
|
|
69
|
+
op: 'link-schedule';
|
|
70
|
+
value: ScheduleEntity;
|
|
169
71
|
}
|
|
170
|
-
|
|
171
72
|
export interface PrependNoteRuleActionEntity {
|
|
172
|
-
|
|
173
|
-
|
|
73
|
+
op: 'prepend-notes';
|
|
74
|
+
value: string;
|
|
174
75
|
}
|
|
175
|
-
|
|
176
76
|
export interface AppendNoteRuleActionEntity {
|
|
177
|
-
|
|
178
|
-
|
|
77
|
+
op: 'append-notes';
|
|
78
|
+
value: string;
|
|
179
79
|
}
|
|
80
|
+
export {};
|
|
@@ -1,49 +1,47 @@
|
|
|
1
1
|
import type { AccountEntity } from './account';
|
|
2
2
|
import type { PayeeEntity } from './payee';
|
|
3
3
|
import type { RuleConditionEntity, RuleEntity } from './rule';
|
|
4
|
-
|
|
5
4
|
export interface RecurPattern {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
value: number;
|
|
6
|
+
type: 'SU' | 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA' | 'day';
|
|
8
7
|
}
|
|
9
|
-
|
|
10
8
|
export interface RecurConfig {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
frequency: 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
10
|
+
interval?: number;
|
|
11
|
+
patterns?: RecurPattern[];
|
|
12
|
+
skipWeekend?: boolean;
|
|
13
|
+
start: string;
|
|
14
|
+
endMode: 'never' | 'after_n_occurrences' | 'on_date';
|
|
15
|
+
endOccurrences?: number;
|
|
16
|
+
endDate?: string;
|
|
17
|
+
weekendSolveMode?: 'before' | 'after';
|
|
20
18
|
}
|
|
21
|
-
|
|
22
19
|
export interface ScheduleEntity {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
id: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
rule: RuleEntity['id'];
|
|
23
|
+
next_date: string;
|
|
24
|
+
completed: boolean;
|
|
25
|
+
posts_transaction: boolean;
|
|
26
|
+
tombstone: boolean;
|
|
27
|
+
_payee: PayeeEntity['id'];
|
|
28
|
+
_account: AccountEntity['id'];
|
|
29
|
+
_amount: number | {
|
|
30
|
+
num1: number;
|
|
31
|
+
num2: number;
|
|
32
|
+
};
|
|
33
|
+
_amountOp: string;
|
|
34
|
+
_date: RecurConfig;
|
|
35
|
+
_conditions: RuleConditionEntity[];
|
|
36
|
+
_actions: Array<{
|
|
37
|
+
op: unknown;
|
|
38
|
+
}>;
|
|
40
39
|
}
|
|
41
|
-
|
|
42
40
|
export type DiscoverScheduleEntity = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
id: ScheduleEntity['id'];
|
|
42
|
+
account: AccountEntity['id'];
|
|
43
|
+
payee: PayeeEntity['id'];
|
|
44
|
+
date: ScheduleEntity['_date'];
|
|
45
|
+
amount: ScheduleEntity['_amount'];
|
|
46
|
+
_conditions: ScheduleEntity['_conditions'];
|
|
49
47
|
};
|
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
import { AccountEntity } from './account';
|
|
2
2
|
import { BankSyncResponse } from './bank-sync';
|
|
3
|
-
|
|
4
3
|
export type SimpleFinOrganization = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
domain: string;
|
|
8
7
|
};
|
|
9
|
-
|
|
10
8
|
export type SimpleFinAccount = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
balance: number;
|
|
12
|
+
org: SimpleFinOrganization;
|
|
15
13
|
};
|
|
16
|
-
|
|
17
14
|
export interface SimpleFinBatchSyncResponse {
|
|
18
|
-
|
|
15
|
+
[accountId: NonNullable<AccountEntity['account_id']>]: BankSyncResponse;
|
|
19
16
|
}
|
|
20
|
-
|
|
21
17
|
export type SyncServerSimpleFinAccount = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
account_id: string;
|
|
19
|
+
institution?: string;
|
|
20
|
+
orgDomain?: string;
|
|
21
|
+
orgId?: string;
|
|
22
|
+
name: string;
|
|
27
23
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type RuleConditionEntity } from './rule';
|
|
2
|
-
|
|
3
2
|
export interface TransactionFilterEntity {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
conditionsOp: 'and' | 'or';
|
|
6
|
+
conditions: RuleConditionEntity[];
|
|
7
|
+
tombstone: boolean;
|
|
9
8
|
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
+
import { IntegerAmount } from '../../shared/util';
|
|
1
2
|
import { AccountEntity } from './account';
|
|
2
3
|
import { CategoryEntity } from './category';
|
|
3
4
|
import { PayeeEntity } from './payee';
|
|
4
5
|
import { ScheduleEntity } from './schedule';
|
|
5
|
-
|
|
6
6
|
export interface TransactionEntity {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
7
|
+
id: string;
|
|
8
|
+
is_parent?: boolean;
|
|
9
|
+
is_child?: boolean;
|
|
10
|
+
parent_id?: TransactionEntity['id'];
|
|
11
|
+
account: AccountEntity['id'];
|
|
12
|
+
category?: CategoryEntity['id'];
|
|
13
|
+
amount: IntegerAmount;
|
|
14
|
+
payee?: PayeeEntity['id'];
|
|
15
|
+
notes?: string;
|
|
16
|
+
date: string;
|
|
17
|
+
imported_id?: string;
|
|
18
|
+
imported_payee?: string;
|
|
19
|
+
starting_balance_flag?: boolean;
|
|
20
|
+
transfer_id?: TransactionEntity['id'];
|
|
21
|
+
sort_order?: number;
|
|
22
|
+
cleared?: boolean;
|
|
23
|
+
reconciled?: boolean;
|
|
24
|
+
tombstone?: boolean;
|
|
25
|
+
forceUpcoming?: boolean;
|
|
26
|
+
schedule?: ScheduleEntity['id'];
|
|
27
|
+
subtransactions?: TransactionEntity[];
|
|
28
|
+
_unmatched?: boolean;
|
|
29
|
+
_deleted?: boolean;
|
|
30
|
+
error?: {
|
|
31
|
+
type: 'SplitTransactionError';
|
|
32
|
+
version: 1;
|
|
33
|
+
difference: number;
|
|
34
|
+
} | null;
|
|
35
|
+
raw_synced_data?: string | undefined;
|
|
36
36
|
}
|
|
@@ -3,7 +3,6 @@ export type FeatureFlag =
|
|
|
3
3
|
| 'goalTemplatesUIEnabled'
|
|
4
4
|
| 'actionTemplating'
|
|
5
5
|
| 'contextMenus'
|
|
6
|
-
| 'openidAuth'
|
|
7
6
|
| 'pluggyAiBankSync';
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -84,6 +83,7 @@ export type DarkTheme = 'dark' | 'midnight';
|
|
|
84
83
|
export type GlobalPrefs = Partial<{
|
|
85
84
|
floatingSidebar: boolean;
|
|
86
85
|
maxMonths: number;
|
|
86
|
+
categoryExpandedState: number;
|
|
87
87
|
keyId?: string;
|
|
88
88
|
language: string;
|
|
89
89
|
theme: Theme;
|
|
@@ -94,10 +94,6 @@ export type GlobalPrefs = Partial<{
|
|
|
94
94
|
// Electron only
|
|
95
95
|
autoStart?: boolean;
|
|
96
96
|
port?: number;
|
|
97
|
-
ngrokConfig?: {
|
|
98
|
-
domain?: string;
|
|
99
|
-
authToken?: string;
|
|
100
|
-
};
|
|
101
97
|
};
|
|
102
98
|
}>;
|
|
103
99
|
|
|
@@ -113,6 +109,7 @@ export type GlobalPrefsJson = Partial<{
|
|
|
113
109
|
'user-token'?: string;
|
|
114
110
|
'floating-sidebar'?: string; // "true" or "false"
|
|
115
111
|
'max-months'?: string; // e.g. "2" or "3"
|
|
112
|
+
'category-expanded-state'?: string; // "0" or "1" or "2"
|
|
116
113
|
'document-dir'?: GlobalPrefs['documentDir'];
|
|
117
114
|
'encrypt-key'?: string;
|
|
118
115
|
language?: GlobalPrefs['language'];
|
|
@@ -1,86 +1,61 @@
|
|
|
1
|
-
import { type Backup } from '../server/backups';
|
|
1
|
+
import { type Backup } from '../server/budgetfiles/backups';
|
|
2
2
|
import { type UndoState } from '../server/undo';
|
|
3
|
-
|
|
4
|
-
type SyncSubtype =
|
|
5
|
-
| 'out-of-sync'
|
|
6
|
-
| 'apply-failure'
|
|
7
|
-
| 'decrypt-failure'
|
|
8
|
-
| 'encrypt-failure'
|
|
9
|
-
| 'invalid-schema'
|
|
10
|
-
| 'network'
|
|
11
|
-
| 'file-old-version'
|
|
12
|
-
| 'file-key-mismatch'
|
|
13
|
-
| 'file-not-found'
|
|
14
|
-
| 'file-needs-upload'
|
|
15
|
-
| 'file-has-reset'
|
|
16
|
-
| 'file-has-new-key'
|
|
17
|
-
| 'token-expired'
|
|
18
|
-
| string;
|
|
19
|
-
|
|
3
|
+
type SyncSubtype = 'out-of-sync' | 'apply-failure' | 'decrypt-failure' | 'encrypt-failure' | 'invalid-schema' | 'network' | 'file-old-version' | 'file-key-mismatch' | 'file-not-found' | 'file-needs-upload' | 'file-has-reset' | 'file-has-new-key' | 'token-expired' | string;
|
|
20
4
|
type SyncEvent = {
|
|
21
|
-
|
|
22
|
-
} & (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
type: 'start';
|
|
40
|
-
}
|
|
41
|
-
| {
|
|
42
|
-
type: 'unauthorized';
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
|
|
5
|
+
meta?: Record<string, unknown>;
|
|
6
|
+
} & ({
|
|
7
|
+
type: 'applied';
|
|
8
|
+
tables: string[];
|
|
9
|
+
data?: Map<string, unknown>;
|
|
10
|
+
prevData?: Map<string, unknown>;
|
|
11
|
+
} | {
|
|
12
|
+
type: 'success';
|
|
13
|
+
tables: string[];
|
|
14
|
+
syncDisabled?: boolean;
|
|
15
|
+
} | {
|
|
16
|
+
type: 'error';
|
|
17
|
+
subtype?: SyncSubtype;
|
|
18
|
+
} | {
|
|
19
|
+
type: 'start';
|
|
20
|
+
} | {
|
|
21
|
+
type: 'unauthorized';
|
|
22
|
+
});
|
|
46
23
|
type BackupUpdatedEvent = Backup[];
|
|
47
|
-
|
|
48
24
|
type CellsChangedEvent = Array<{
|
|
49
|
-
|
|
50
|
-
|
|
25
|
+
name: string;
|
|
26
|
+
value: string | number | boolean;
|
|
51
27
|
}>;
|
|
52
|
-
|
|
53
28
|
type FallbackWriteErrorEvent = undefined;
|
|
54
29
|
type FinishImportEvent = undefined;
|
|
55
30
|
type FinishLoadEvent = undefined;
|
|
56
|
-
|
|
57
31
|
type OrphanedPayeesEvent = {
|
|
58
|
-
|
|
59
|
-
|
|
32
|
+
orphanedIds: string[];
|
|
33
|
+
updatedPayeeIds: string[];
|
|
60
34
|
};
|
|
61
|
-
|
|
62
35
|
type PrefsUpdatedEvent = undefined;
|
|
63
36
|
type SchedulesOfflineEvent = undefined;
|
|
64
37
|
type ServerErrorEvent = undefined;
|
|
65
38
|
type ShowBudgetsEvent = undefined;
|
|
66
|
-
type StartImportEvent = {
|
|
39
|
+
type StartImportEvent = {
|
|
40
|
+
budgetName: string;
|
|
41
|
+
};
|
|
67
42
|
type StartLoadEvent = undefined;
|
|
68
43
|
type ApiFetchRedirectedEvent = undefined;
|
|
69
|
-
|
|
70
44
|
export interface ServerEvents {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
45
|
+
'backups-updated': BackupUpdatedEvent;
|
|
46
|
+
'cells-changed': CellsChangedEvent;
|
|
47
|
+
'fallback-write-error': FallbackWriteErrorEvent;
|
|
48
|
+
'finish-import': FinishImportEvent;
|
|
49
|
+
'finish-load': FinishLoadEvent;
|
|
50
|
+
'orphaned-payees': OrphanedPayeesEvent;
|
|
51
|
+
'prefs-updated': PrefsUpdatedEvent;
|
|
52
|
+
'schedules-offline': SchedulesOfflineEvent;
|
|
53
|
+
'server-error': ServerErrorEvent;
|
|
54
|
+
'show-budgets': ShowBudgetsEvent;
|
|
55
|
+
'start-import': StartImportEvent;
|
|
56
|
+
'start-load': StartLoadEvent;
|
|
57
|
+
'sync-event': SyncEvent;
|
|
58
|
+
'undo-event': UndoState;
|
|
59
|
+
'api-fetch-redirected': ApiFetchRedirectedEvent;
|
|
86
60
|
}
|
|
61
|
+
export {};
|