import type { AdjacentEdgeRow, CallableNodeRow, CallEdgeRow, ChildNodeRow, ComplexityMetrics, FileNodeRow, ImportEdgeRow, ImportGraphEdgeRow, IntraFileCallEdge, Repository as IRepository, ListFunctionOpts, NodeIdRow, NodeRow, NodeRowWithFanIn, QueryOpts, RelatedNodeRow, TriageNodeRow, TriageQueryOpts } from '../../types.js';
/**
 * Abstract Repository base class.
 *
 * Defines the contract for all graph data access. Every method throws
 * "not implemented" by default — concrete subclasses override what they support.
 */
export declare class Repository implements IRepository {
    findNodeById(_id: number): NodeRow | undefined;
    findNodesByFile(_file: string): NodeRow[];
    findFileNodes(_fileLike: string): NodeRow[];
    findNodesWithFanIn(_namePattern: string, _opts?: QueryOpts): NodeRowWithFanIn[];
    countNodes(): number;
    countEdges(): number;
    countFiles(): number;
    getNodeId(_name: string, _kind: string, _file: string, _line: number): number | undefined;
    getFunctionNodeId(_name: string, _file: string, _line: number): number | undefined;
    bulkNodeIdsByFile(_file: string): NodeIdRow[];
    findNodeChildren(_parentId: number): ChildNodeRow[];
    findNodesByScope(_scopeName: string, _opts?: QueryOpts): NodeRow[];
    findNodeByQualifiedName(_qualifiedName: string, _opts?: {
        file?: string;
    }): NodeRow[];
    listFunctionNodes(_opts?: ListFunctionOpts): NodeRow[];
    iterateFunctionNodes(_opts?: ListFunctionOpts): IterableIterator<NodeRow>;
    findNodesForTriage(_opts?: TriageQueryOpts): TriageNodeRow[];
    findCallees(_nodeId: number): RelatedNodeRow[];
    findCallers(_nodeId: number): RelatedNodeRow[];
    /**
     * Batch version of findCallers — returns callers for multiple node IDs in a
     * single query. Default implementation loops; subclasses override with SQL
     * `IN (...)` for efficiency.
     */
    findCallersBatch(nodeIds: number[]): Map<number, RelatedNodeRow[]>;
    findDistinctCallers(_nodeId: number): RelatedNodeRow[];
    findAllOutgoingEdges(_nodeId: number): AdjacentEdgeRow[];
    findAllIncomingEdges(_nodeId: number): AdjacentEdgeRow[];
    findCalleeNames(_nodeId: number): string[];
    findCallerNames(_nodeId: number): string[];
    findImportTargets(_nodeId: number): ImportEdgeRow[];
    findImportSources(_nodeId: number): ImportEdgeRow[];
    findImportDependents(_nodeId: number): NodeRow[];
    findCrossFileCallTargets(_file: string): Set<number>;
    countCrossFileCallers(_nodeId: number, _file: string): number;
    getClassHierarchy(_classNodeId: number): Set<number>;
    findImplementors(_nodeId: number): RelatedNodeRow[];
    findInterfaces(_nodeId: number): RelatedNodeRow[];
    findIntraFileCallEdges(_file: string): IntraFileCallEdge[];
    getCallableNodes(): CallableNodeRow[];
    getCallEdges(): CallEdgeRow[];
    getFileNodesAll(): FileNodeRow[];
    getImportEdges(): ImportGraphEdgeRow[];
    hasCfgTables(): boolean;
    hasEmbeddings(): boolean;
    hasDataflowTable(): boolean;
    getComplexityForNode(_nodeId: number): ComplexityMetrics | undefined;
    /**
     * Look up the stored content hash for a file.
     * Returns null when the file is not in file_hashes or the method is
     * not yet implemented on the concrete repository.
     */
    getFileHash(_file: string): string | null;
    /** Check whether the graph contains any 'implements' edges. */
    hasImplementsEdges(): boolean;
    /** Check whether the co_changes table exists and has data. */
    hasCoChangesTable(): boolean;
    /**
     * Complete fnDeps query in a single call. Returns null when not natively
     * supported — callers should fall back to the JS-orchestrated path.
     */
    fnDeps(_name: string, _opts?: {
        depth?: number;
        noTests?: boolean;
        file?: string;
        kind?: string;
    }): FnDepsResult | null;
}
export interface FnDepsNode {
    name: string;
    kind: string;
    file: string;
    line: number | null;
}
export interface FnDepsCallerNode extends FnDepsNode {
    viaHierarchy?: string;
}
export interface FnDepsEntry {
    name: string;
    kind: string;
    file: string;
    line: number | null;
    endLine: number | null;
    role: string | null;
    fileHash: string | null;
    callees: FnDepsNode[];
    callers: FnDepsCallerNode[];
    transitiveCallers: Record<number, FnDepsNode[]>;
}
export interface FnDepsResult {
    name: string;
    results: FnDepsEntry[];
}
//# sourceMappingURL=base.d.ts.map