import { Resource } from '../model/note'; import { FoamGraph } from '../model/graph'; import { FoamTags } from '../model/tags'; import { FoamWorkspace } from '../model/workspace'; import { URI } from '../model/uri'; import { IDataStore } from '../services/datastore'; export interface RenameNoteResult { old_uri: URI; new_uri: URI; old_id: string; id: string; updated_links: number; } export interface RenameTagResult { old_tag: string; new_tag: string; updated_notes: number; } export interface RenameSectionResult { uri: URI; id: string; updated_links: number; } export interface RenameBlockResult { uri: URI; id: string; updated_links: number; } /** * Renames a note (changing its filename stem, optionally moving it to a * different directory) and rewrites all wikilinks pointing to it across the * workspace. * * `newName` is the filename stem (no extension); the extension of the * existing file is preserved. `targetDir` is an optional URI of the new * parent directory; if omitted, the note keeps its current directory. * * The {@link FoamWorkspace} parameter is used both for link integrity * computations and to update its internal index after the move. */ export declare function renameNote(workspace: FoamWorkspace, graph: FoamGraph, dataStore: IDataStore, resource: Resource, newName: string, targetDir?: URI): Promise; /** * Renames a tag (and its hierarchical children) across all notes in the * workspace. * * Errors with code `invalid_input` if the rename would merge into an * existing tag and `force` is false. The error's `data.isMerge` flag lets * the caller render an appropriate hint (e.g. "use --force"). */ export declare function renameTag(tags: FoamTags, dataStore: IDataStore, oldTag: string, newTag: string, force: boolean): Promise; /** * Renames a heading section in a note and rewrites all `[[note#Section]]` * inbound wikilinks across the workspace. */ export declare function renameSection(workspace: FoamWorkspace, graph: FoamGraph, dataStore: IDataStore, resource: Resource, oldLabel: string, newLabel: string): Promise; /** * Renames a block anchor (`^id`) in a note and rewrites all `[[note#^id]]` * inbound wikilinks across the workspace. */ export declare function renameBlock(workspace: FoamWorkspace, graph: FoamGraph, dataStore: IDataStore, resource: Resource, oldId: string, newId: string): Promise; //# sourceMappingURL=rename.d.ts.map