@actual-app/api 25.4.0 → 25.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/app/bundle.api.d.ts +1 -5
- package/@types/loot-core/client/budgets/budgetsSlice.d.ts +6 -2
- package/@types/loot-core/client/modals/modalsSlice.d.ts +5 -1
- package/@types/loot-core/client/prefs/prefsSlice.d.ts +2 -8
- package/@types/loot-core/client/queries/queriesSlice.d.ts +1 -1
- package/@types/loot-core/client/users/usersSlice.d.ts +28 -12
- 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/schema/executors.d.ts +2 -0
- package/@types/loot-core/server/auth/app.d.ts +142 -0
- package/@types/loot-core/server/budget/base.d.ts +2 -1
- package/@types/loot-core/server/budget/envelope.d.ts +3 -0
- package/@types/loot-core/server/budget/report.d.ts +4 -1
- 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/reports/app.d.ts +2 -2
- package/@types/loot-core/server/spreadsheet/spreadsheet.d.ts +9 -2
- 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/types/api-handlers.d.ts +170 -183
- package/@types/loot-core/types/budget.d.ts +6 -6
- package/@types/loot-core/types/file.d.ts +23 -36
- 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 +7 -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 +29 -30
- package/@types/loot-core/types/prefs.d.ts +2 -4
- 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 +1 -1
- package/@types/vitest.config.d.ts +7 -0
- package/dist/app/bundle.api.js +17541 -110891
- package/dist/package.json +5 -7
- package/dist/vitest.config.js +11 -0
- package/package.json +5 -7
- package/@types/jest.config.d.ts +0 -9
- package/@types/loot-core/client/accounts/accountsSlice.d.ts +0 -175
- package/@types/loot-core/server/backups.test.d.ts +0 -1
- package/@types/loot-core/server/encryption-internals.web.d.ts +0 -23
- package/@types/loot-core/server/encryption.test.d.ts +0 -1
- 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
|
@@ -1,141 +1,121 @@
|
|
|
1
1
|
import { type RuleConditionEntity } from './rule';
|
|
2
|
-
|
|
3
2
|
export interface CustomReportEntity {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
startDate: string;
|
|
6
|
+
endDate: string;
|
|
7
|
+
isDateStatic: boolean;
|
|
8
|
+
dateRange: string;
|
|
9
|
+
mode: string;
|
|
10
|
+
groupBy: string;
|
|
11
|
+
interval: string;
|
|
12
|
+
balanceType: string;
|
|
13
|
+
sortBy?: sortByOpType;
|
|
14
|
+
showEmpty: boolean;
|
|
15
|
+
showOffBudget: boolean;
|
|
16
|
+
showHiddenCategories: boolean;
|
|
17
|
+
includeCurrentInterval: boolean;
|
|
18
|
+
showUncategorized: boolean;
|
|
19
|
+
graphType: string;
|
|
20
|
+
conditions?: RuleConditionEntity[];
|
|
21
|
+
conditionsOp: 'and' | 'or';
|
|
22
|
+
data?: GroupedEntity;
|
|
23
|
+
tombstone?: boolean;
|
|
25
24
|
}
|
|
26
|
-
|
|
27
|
-
export type balanceTypeOpType =
|
|
28
|
-
| 'totalAssets'
|
|
29
|
-
| 'totalDebts'
|
|
30
|
-
| 'totalTotals'
|
|
31
|
-
| 'netAssets'
|
|
32
|
-
| 'netDebts';
|
|
33
|
-
|
|
25
|
+
export type balanceTypeOpType = 'totalAssets' | 'totalDebts' | 'totalTotals' | 'netAssets' | 'netDebts';
|
|
34
26
|
export type sortByOpType = 'asc' | 'desc' | 'name' | 'budget';
|
|
35
|
-
|
|
36
|
-
export type SpendingMonthEntity = Record<
|
|
37
|
-
string | number,
|
|
38
|
-
{
|
|
27
|
+
export type SpendingMonthEntity = Record<string | number, {
|
|
39
28
|
cumulative: number;
|
|
40
29
|
daily: number;
|
|
41
30
|
date: string;
|
|
42
31
|
month: string;
|
|
43
|
-
|
|
44
|
-
>;
|
|
45
|
-
|
|
32
|
+
}>;
|
|
46
33
|
export interface SpendingDataEntity {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
34
|
+
date: string;
|
|
35
|
+
totalAssets: number;
|
|
36
|
+
totalDebts: number;
|
|
37
|
+
totalTotals: number;
|
|
38
|
+
cumulative: number;
|
|
52
39
|
}
|
|
53
|
-
|
|
54
40
|
export interface SpendingEntity {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
41
|
+
intervalData: {
|
|
42
|
+
months: SpendingMonthEntity;
|
|
43
|
+
day: string;
|
|
44
|
+
average: number;
|
|
45
|
+
compare: number;
|
|
46
|
+
compareTo: number;
|
|
47
|
+
budget: number;
|
|
48
|
+
}[];
|
|
49
|
+
startDate?: string;
|
|
50
|
+
endDate?: string;
|
|
51
|
+
totalDebts: number;
|
|
52
|
+
totalAssets: number;
|
|
53
|
+
totalTotals: number;
|
|
68
54
|
}
|
|
69
|
-
|
|
70
55
|
export interface DataEntity {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
56
|
+
data?: GroupedEntity[];
|
|
57
|
+
intervalData: IntervalEntity[];
|
|
58
|
+
groupedData?: GroupedEntity[] | null;
|
|
59
|
+
legend?: LegendEntity[];
|
|
60
|
+
startDate?: string;
|
|
61
|
+
endDate?: string;
|
|
62
|
+
totalDebts: number;
|
|
63
|
+
totalAssets: number;
|
|
64
|
+
netAssets: number;
|
|
65
|
+
netDebts: number;
|
|
66
|
+
totalTotals: number;
|
|
82
67
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
color: string;
|
|
68
|
+
export type LegendEntity = {
|
|
69
|
+
name: string;
|
|
70
|
+
id: string | null;
|
|
71
|
+
color: string;
|
|
88
72
|
};
|
|
89
|
-
|
|
90
73
|
export type IntervalEntity = {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
74
|
+
date?: string;
|
|
75
|
+
change?: number;
|
|
76
|
+
intervalStartDate?: string;
|
|
77
|
+
intervalEndDate?: string;
|
|
78
|
+
totalAssets: number;
|
|
79
|
+
totalDebts: number;
|
|
80
|
+
netAssets: number;
|
|
81
|
+
netDebts: number;
|
|
82
|
+
totalTotals: number;
|
|
100
83
|
};
|
|
101
|
-
|
|
102
84
|
export interface GroupedEntity {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
85
|
+
id: string;
|
|
86
|
+
name: string;
|
|
87
|
+
date?: string;
|
|
88
|
+
intervalData: IntervalEntity[];
|
|
89
|
+
totalAssets: number;
|
|
90
|
+
totalDebts: number;
|
|
91
|
+
totalTotals: number;
|
|
92
|
+
netAssets: number;
|
|
93
|
+
netDebts: number;
|
|
94
|
+
categories?: GroupedEntity[];
|
|
113
95
|
}
|
|
114
|
-
|
|
115
96
|
export type Interval = {
|
|
116
|
-
|
|
97
|
+
interval: string;
|
|
117
98
|
};
|
|
118
|
-
|
|
119
99
|
export interface CustomReportData {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
100
|
+
id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
start_date: string;
|
|
103
|
+
end_date: string;
|
|
104
|
+
date_static: number;
|
|
105
|
+
date_range: string;
|
|
106
|
+
mode: string;
|
|
107
|
+
group_by: string;
|
|
108
|
+
sort_by: sortByOpType;
|
|
109
|
+
balance_type: string;
|
|
110
|
+
show_empty: number;
|
|
111
|
+
show_offbudget: number;
|
|
112
|
+
show_hidden: number;
|
|
113
|
+
include_current: number;
|
|
114
|
+
show_uncategorized: number;
|
|
115
|
+
graph_type: string;
|
|
116
|
+
conditions?: RuleConditionEntity[];
|
|
117
|
+
conditions_op: 'and' | 'or';
|
|
118
|
+
metadata?: GroupedEntity;
|
|
119
|
+
interval: string;
|
|
120
|
+
color_scheme?: string;
|
|
141
121
|
}
|
|
@@ -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
|
}
|