export interface FileNode { name: string; path: string; isDirectory: boolean; children?: FileNode[]; } /** * Resolve and validate a relative path within MKDOCS_DOCS_PATH. * Throws if the resolved path escapes the docs root. */ declare function safeResolve(relativePath: string): string; export declare class PathTraversalError extends Error { constructor(); } export declare class FileNotFoundError extends Error { constructor(filePath: string); } /** * Recursively list the file tree under MKDOCS_DOCS_PATH. * Cached in Redis with 1-hour TTL for root calls. */ declare function listTree(dir?: string, relBase?: string): Promise; declare function readFileContent(relativePath: string): Promise; declare function writeFileContent(relativePath: string, content: string): Promise; declare function createFile(relativePath: string, content?: string, isDirectory?: boolean): Promise; declare function deleteFile(relativePath: string): Promise; declare function renameFile(fromPath: string, toPath: string): Promise; declare function isEditableFile(relativePath: string): boolean; declare function uploadFile(relativePath: string, sourcePath: string): Promise; declare function invalidateTreeCache(): Promise; /** * Flatten a FileNode tree into file-only entries, then filter by * case-insensitive query match on name or path. Name matches score * higher so they sort first. */ declare function searchFiles(query: string, limit?: number): Promise<{ name: string; path: string; }[]>; export declare const docsFilesService: { listTree: typeof listTree; readFileContent: typeof readFileContent; writeFileContent: typeof writeFileContent; createFile: typeof createFile; deleteFile: typeof deleteFile; renameFile: typeof renameFile; uploadFile: typeof uploadFile; safeResolve: typeof safeResolve; isEditableFile: typeof isEditableFile; invalidateTreeCache: typeof invalidateTreeCache; searchFiles: typeof searchFiles; }; export {}; //# sourceMappingURL=docs-files.service.d.ts.map