Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
type LauncherNoteType = "launcher" | "search" | "doc" | "noteMap" | "contentWidget" | "book" | "file" | "image" | "text" | "relationMap" | "render" | "canvas" | "mermaid" | "webView" | "code" | "mindMap";
enum Command {
jumpToNote,
searchNotes,
createNoteIntoInbox,
showRecentChanges,
showDeletedNotes,
showOptions,
commandPalette,
toggleZenMode
}
export interface HiddenSubtreeAttribute {
type: "label" | "relation";
name: string;
isInheritable?: boolean;
value?: string;
}
export interface HiddenSubtreeItem {
notePosition?: number;
id: string;
title: string;
type: LauncherNoteType;
/**
* The MIME type to use for this item (e.g. `text/x-markdown`). Only relevant for code notes;
* if omitted, the default MIME for the type is used.
*/
mime?: string;
/**
* The icon to use for this item, in the format "bx-icon-name" (e.g., `bx-file-blank`), *without* the leading `bx `.
*/
icon?: string;
attributes?: HiddenSubtreeAttribute[];
children?: HiddenSubtreeItem[];
/**
* Holds the children in the order they are listed in, on every database rather than only on one
* being set up: each is given a position from its place in the list. For a group whose order is
* the app's to decide (the settings pages), not one the user arranges themselves (the launcher
* bar), which would be undone at every start.
*/
enforceChildOrder?: boolean;
isExpanded?: boolean;
baseSize?: string;
growthFactor?: string;
targetNoteId?: "_backendLog" | "_globalNoteMap";
builtinWidget?:
| "todayInJournal"
| "bookmarks"
| "spacer"
| "backInHistoryButton"
| "forwardInHistoryButton"
| "syncStatus"
| "protectedSession"
| "calendar"
| "quickSearch"
| "commandPalette"
| "toggleZenMode"
| "mobileTabSwitcher"
| "sidebarChat"
| "colorSchemeSwitcher"
| "recordMeeting";
command?: keyof typeof Command;
/**
* If set to true, then branches will be enforced to be in the correct place.
* This is useful for ensuring that the launcher is always in the correct place, even if
* the user moves it around.
*/
enforceBranches?: boolean;
/**
* If set to true, then the attributes of this note will be checked. Any owned attribute that does not match the
* definitions will be removed.
*/
enforceAttributes?: boolean;
/**
* If set to true, if a note with the same ID is found, it will be deleted. This is useful to deactivate features in future versions, for example the launch bar.
*/
enforceDeleted?: boolean;
/**
* Optionally, a content to be set in the hidden note. If undefined, an empty string will be set instead.
*
* The value is also checked at every startup to ensure that it's kept up to date according to the definition.
*/
content?: string;
}