-
-
Notifications
You must be signed in to change notification settings - Fork 947
/
prefs.d.ts
68 lines (65 loc) · 2.12 KB
/
prefs.d.ts
1
2
3
4
5
6
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import { type numberFormats } from '../shared/util';
export type FeatureFlag =
| 'reportBudget'
| 'goalTemplatesEnabled'
| 'spendingReport'
| 'simpleFinSync'
| 'iterableTopologicalSort';
export type LocalPrefs = Partial<
{
firstDayOfWeekIdx: `${0 | 1 | 2 | 3 | 4 | 5 | 6}`;
dateFormat:
| 'MM/dd/yyyy'
| 'dd/MM/yyyy'
| 'yyyy-MM-dd'
| 'MM.dd.yyyy'
| 'dd.MM.yyyy';
numberFormat: (typeof numberFormats)[number]['value'];
hideFraction: boolean;
hideClosedAccounts: boolean;
hideMobileMessage: boolean;
isPrivacyEnabled: boolean;
budgetName: string;
'ui.showClosedAccounts': boolean;
'expand-splits': boolean;
[key: `show-extra-balances-${string}`]: boolean;
[key: `hide-cleared-${string}`]: boolean;
[key: `hide-reconciled-${string}`]: boolean;
'budget.collapsed': string[];
'budget.summaryCollapsed': boolean;
'budget.showHiddenCategories': boolean;
'budget.startMonth': string;
// TODO: pull from src/components/modals/ImportTransactions.js
[key: `parse-date-${string}-${'csv' | 'qif'}`]: string;
[key: `csv-mappings-${string}`]: string;
[key: `csv-delimiter-${string}`]: ',' | ';' | '\t';
[key: `csv-has-header-${string}`]: boolean;
[key: `ofx-fallback-missing-payee-${string}`]: boolean;
[key: `flip-amount-${string}-${'csv' | 'qif'}`]: boolean;
'flags.updateNotificationShownForVersion': string;
id: string;
isCached: boolean;
lastUploaded: string;
cloudFileId: string;
groupId: string;
budgetType: 'report' | 'rollover';
encryptKeyId: string;
lastSyncedTimestamp: string;
userId: string;
resetClock: boolean;
lastScheduleRun: string;
reportsViewLegend: boolean;
reportsViewSummary: boolean;
reportsViewLabel: boolean;
'mobile.showSpentColumn': boolean;
} & Record<`flags.${FeatureFlag}`, boolean>
>;
export type Theme = 'light' | 'dark' | 'auto' | 'midnight' | 'development';
export type GlobalPrefs = Partial<{
floatingSidebar: boolean;
maxMonths: number;
autoUpdate: boolean;
keyId?: string;
theme: Theme;
documentDir: string; // Electron only
}>;