import { type DocEntry, type SearchIndex, type SearchResult } from './types.js';
/**
 * Loads the pre-built search index from the bundled data directory.
 *
 * @returns The search index with all documentation entries
 * @throws Error if the index file cannot be read
 */
export declare function loadSearchIndex(): SearchIndex;
/**
 * Searches the documentation index with fuzzy matching.
 *
 * @param query - The search query string
 * @param limit - Maximum number of results to return (default: 20)
 * @returns Array of search results sorted by relevance
 *
 * @example
 * ```typescript
 * const results = searchDocs('ProductMgr');
 * results.forEach(r => console.log(r.entry.id, r.score));
 * ```
 */
export declare function searchDocs(query: string, limit?: number): SearchResult[];
/**
 * Reads the content of a documentation file by its ID.
 *
 * @param id - The documentation ID (filename without .md extension)
 * @returns The raw markdown content of the document
 * @throws Error if the document is not found
 *
 * @example
 * ```typescript
 * const content = readDoc('dw.catalog.ProductMgr');
 * console.log(content);
 * ```
 */
export declare function readDoc(id: string): string;
/**
 * Reads documentation by fuzzy-matching the query and returning the best match.
 *
 * @param query - The search query string
 * @returns The best matching entry and its content, or null if no match
 *
 * @example
 * ```typescript
 * const doc = readDocByQuery('ProductMgr');
 * if (doc) {
 *   console.log(`Found: ${doc.entry.title}`);
 *   console.log(doc.content);
 * }
 * ```
 */
export declare function readDocByQuery(query: string): {
    entry: DocEntry;
    content: string;
} | null;
/**
 * Lists all available documentation entries.
 *
 * @returns Array of all documentation entries in the index
 *
 * @example
 * ```typescript
 * const docs = listDocs();
 * console.log(`${docs.length} documentation files available`);
 * ```
 */
export declare function listDocs(): DocEntry[];
