export type NotesScope = "project" | "global"; export interface ScopeSelection { readonly forceProject: boolean; readonly forceGlobal: boolean; } export interface NotesStorageOptions { readonly cwd: string; readonly globalNotesDir?: string; } export interface StoredNote { readonly name: string; readonly fileName: string; readonly path: string; readonly scope: NotesScope; readonly markdown: string; } export interface CreateNoteInput { readonly name: string; readonly title?: string; readonly scope: NotesScope; } export interface WriteNoteInput { readonly name: string; readonly markdown: string; readonly scope: NotesScope; readonly updatedIso: string; } export interface AppendNoteInput { readonly name: string; readonly text: string; readonly selection: ScopeSelection; readonly updatedIso: string; } export interface SetupNotesInput { readonly starterGlobalMarkdown: string; } export interface SetupNotesResult { readonly projectDirectoryPath: string; readonly globalDirectoryPath: string; readonly starterGlobalNotePath: string; readonly createdProjectDirectory: boolean; readonly createdGlobalDirectory: boolean; readonly createdStarterGlobalNote: boolean; } export interface MoveNoteInput { readonly name: string; readonly selection: ScopeSelection; readonly destinationScope: NotesScope; readonly overwrite: boolean; } export interface MoveNoteResult { readonly source: StoredNote; readonly destination: StoredNote; readonly overwrittenDestination: boolean; } export interface RenameNoteInput { readonly fromName: string; readonly toName: string; readonly selection: ScopeSelection; readonly overwrite: boolean; } export interface RenameNoteResult { readonly source: StoredNote; readonly destination: StoredNote; readonly overwrittenDestination: boolean; } export declare function resolveScopePreference(selection: ScopeSelection): NotesScope | "default"; export declare class NotesStorage { private static readonly mutationQueues; private readonly cwd; private readonly globalNotesDir; constructor(options: NotesStorageOptions); getNotesDirectory(scope: NotesScope): string; getNotePath(scope: NotesScope, fileName: string): string; ensureScopeDirectory(scope: NotesScope): Promise; setupNotes(input: SetupNotesInput): Promise; noteExists(scope: NotesScope, fileName: string): Promise; createNote(input: CreateNoteInput): Promise; readNoteByFileName(fileName: string, selection: ScopeSelection): Promise; readNote(name: string, selection: ScopeSelection): Promise; writeNote(input: WriteNoteInput): Promise; appendToNote(input: AppendNoteInput): Promise; deleteNote(name: string, selection: ScopeSelection): Promise; removeScopeDirectory(scope: NotesScope): Promise<{ path: string; removed: boolean; }>; moveNote(input: MoveNoteInput): Promise; renameNote(input: RenameNoteInput): Promise; listNotes(selection: ScopeSelection): Promise; grepNotes(query: string, selection: ScopeSelection): Promise; private writeNoteInternal; private withMutationQueue; private readFromScope; private pathExists; private listFromScope; } //# sourceMappingURL=storage.d.ts.map