import { PrefixIndexLine } from "./utils/typs.js"; /** * Interface for index reading operations. * * Decouples IndexBuilder from the concrete PrefixTreeWalker implementation, * enabling mock-based testing and alternative implementations (e.g. BundleReader). */ export interface IIndexReader { findIndexLines(sourceName: string, field: string, value: string, filterCallback?: (indexValue: string, argValue: string) => boolean): Promise; flatPrefixIndexLine(unflattened: PrefixIndexLine[]): PrefixIndexLine[]; readIndexFileLines(indexPath: string, reverse: boolean): AsyncGenerator; readForwardPrefixIndexLines(rootDir: string, pageSize?: number, cursor?: string, orderByKey?: string, isDesc?: boolean): AsyncGenerator; readBackwardPrefixIndexLines(rootDir: string, pageSize?: number, cursor?: string, orderByKey?: string, isDesc?: boolean): AsyncGenerator; }