-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathoptions_interface.ts
More file actions
169 lines (155 loc) · 5.54 KB
/
options_interface.ts
File metadata and controls
169 lines (155 loc) · 5.54 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
import type { KeyboardActionNames } from "./keyboard_actions_interface.js";
/**
* A dictionary where the keys are the option keys (e.g. `theme`) and their corresponding values.
*/
export type OptionMap = Record<OptionNames, string>;
/**
* For each keyboard action, there is a corresponding option which identifies the key combination defined by the user.
*/
type KeyboardShortcutsOptions<T extends KeyboardActionNames> = {
[key in T as `keyboardShortcuts${Capitalize<key>}`]: string;
};
export type FontFamily = "theme" | "serif" | "sans-serif" | "monospace" | string;
export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActionNames> {
openNoteContexts: string;
lastDailyBackupDate: string;
lastWeeklyBackupDate: string;
lastMonthlyBackupDate: string;
dbVersion: string;
theme: string;
syncServerHost: string;
syncServerTimeout: string;
syncProxy: string;
mainFontFamily: FontFamily;
treeFontFamily: FontFamily;
detailFontFamily: FontFamily;
monospaceFontFamily: FontFamily;
spellCheckLanguageCode: string;
codeNotesMimeTypes: string;
headingStyle: string;
highlightsList: string;
customSearchEngineName: string;
customSearchEngineUrl: string;
locale: string;
formattingLocale: string;
codeBlockTheme: string;
textNoteEditorType: string;
layoutOrientation: string;
allowedHtmlTags: string;
documentId: string;
documentSecret: string;
passwordVerificationHash: string;
passwordVerificationSalt: string;
passwordDerivedKeySalt: string;
encryptedDataKey: string;
hoistedNoteId: string;
customDateTimeFormat: string;
// Multi-Factor Authentication
mfaEnabled: boolean;
mfaMethod: string;
totpEncryptionSalt: string;
totpEncryptedSecret: string;
totpVerificationHash: string;
encryptedRecoveryCodes: boolean;
userSubjectIdentifierSaved: boolean;
recoveryCodeInitialVector: string;
recoveryCodeSecurityKey: string;
recoveryCodesEncrypted: string;
lastSyncedPull: number;
lastSyncedPush: number;
revisionSnapshotTimeInterval: number;
revisionSnapshotTimeIntervalTimeScale: number;
revisionSnapshotNumberLimit: number;
protectedSessionTimeout: number;
protectedSessionTimeoutTimeScale: number;
zoomFactor: number;
mainFontSize: number;
treeFontSize: number;
detailFontSize: number;
monospaceFontSize: number;
imageMaxWidthHeight: number;
imageJpegQuality: number;
leftPaneWidth: number;
rightPaneWidth: number;
rightPaneCollapsedItems: string;
eraseEntitiesAfterTimeInSeconds: number;
eraseEntitiesAfterTimeScale: number;
autoReadonlySizeText: number;
autoReadonlySizeCode: number;
maxContentWidth: number;
centerContent: boolean;
minTocHeadings: number;
eraseUnusedAttachmentsAfterSeconds: number;
eraseUnusedAttachmentsAfterTimeScale: number;
logRetentionDays: number;
firstDayOfWeek: number;
firstWeekOfYear: number;
minDaysInFirstWeek: number;
languages: string;
// Appearance
splitEditorOrientation: "horziontal" | "vertical";
motionEnabled: boolean;
shadowsEnabled: boolean;
backdropEffectsEnabled: boolean;
smoothScrollEnabled: boolean;
codeNoteTheme: string;
initialized: boolean;
databaseReadonly: boolean;
isPasswordSet: boolean;
overrideThemeFonts: boolean;
spellCheckEnabled: boolean;
autoFixConsistencyIssues: boolean;
vimKeymapEnabled: boolean;
codeLineWrapEnabled: boolean;
leftPaneVisible: boolean;
rightPaneVisible: boolean;
nativeTitleBarVisible: boolean;
hideArchivedNotes_main: boolean;
debugModeEnabled: boolean;
autoCollapseNoteTree: boolean;
dailyBackupEnabled: boolean;
weeklyBackupEnabled: boolean;
monthlyBackupEnabled: boolean;
compressImages: boolean;
downloadImagesAutomatically: boolean;
checkForUpdates: boolean;
disableTray: boolean;
editedNotesOpenInRibbon: boolean;
codeBlockWordWrap: boolean;
textNoteEditorMultilineToolbar: boolean;
/** Whether keyboard auto-completion for emojis is triggered when typing `:`. */
textNoteEmojiCompletionEnabled: boolean;
/** Whether keyboard auto-completion for notes is triggered when typing `@` in text notes (attribute editing is not affected). */
textNoteCompletionEnabled: boolean;
/** Whether keyboard auto-completion for editing commands is triggered when typing `/`. */
textNoteSlashCommandsEnabled: boolean;
backgroundEffects: boolean;
newLayout: boolean;
// Share settings
redirectBareDomain: boolean;
showLoginInShareTheme: boolean;
seenCallToActions: string;
experimentalFeatures: string;
// AI / LLM
/** JSON array of configured LLM providers with their API keys */
llmProviders: string;
/** Whether the MCP (Model Context Protocol) server endpoint is enabled. */
mcpEnabled: boolean;
/** Web search engine for the LLM agent: "provider" | "tavily" | "searxng" */
llmWebSearchEngine: string;
/** Tavily API key for web search */
llmTavilyApiKey: string;
/** SearXNG instance URL for web search */
llmSearxngUrl: string;
/** Timeout in seconds for web search requests */
llmSearchTimeout: string;
// OCR options
ocrEnabled: boolean;
ocrLanguage: string;
ocrAutoProcessImages: boolean;
ocrMinConfidence: string;
}
export type OptionNames = keyof OptionDefinitions;
export type FilterOptionsByType<U> = {
[K in keyof OptionDefinitions]: OptionDefinitions[K] extends U ? K : never;
}[keyof OptionDefinitions];