import type Database from 'better-sqlite3'; import type { EnhancedRelationshipContext, RelationshipAnnotation, RelationshipType, RelationshipWithDetails } from '../schema.js'; export interface UnannotatedInheritance { id: number; fromId: number; fromName: string; fromKind: string; fromFilePath: string; toId: number; toName: string; toKind: string; toFilePath: string; relationshipType: 'extends' | 'implements'; } export interface UnannotatedRelationship { fromDefinitionId: number; fromName: string; fromKind: string; fromFilePath: string; fromLine: number; toDefinitionId: number; toName: string; toKind: string; toFilePath: string; toLine: number; } /** * Repository for relationship annotation operations. * Handles CRUD operations for the relationship_annotations table. */ export declare class RelationshipRepository { private db; constructor(db: Database.Database); /** * Set (insert or update) a semantic annotation for a relationship between two definitions. */ set(fromDefinitionId: number, toDefinitionId: number, semantic: string, relationshipType?: RelationshipType): void; /** * Get a relationship annotation between two definitions. */ get(fromDefinitionId: number, toDefinitionId: number): RelationshipAnnotation | null; /** * Update only the relationship type for an existing annotation. */ updateType(fromDefinitionId: number, toDefinitionId: number, relationshipType: RelationshipType): boolean; /** * Remove a relationship annotation. */ remove(fromDefinitionId: number, toDefinitionId: number): boolean; /** * Get all relationship annotations from a specific definition. */ getFrom(fromDefinitionId: number): RelationshipWithDetails[]; /** * Get all relationship annotations to a specific definition. */ getTo(toDefinitionId: number): RelationshipWithDetails[]; /** * Get all relationship annotations. */ getAll(options?: { limit?: number; }): RelationshipWithDetails[]; /** * Delete all relationship annotations originating from the given definitions. * Used by incremental sync to clear stale annotations for modified definitions. */ deleteAnnotationsForDefinitions(definitionIds: number[]): number; /** * Get count of relationship annotations. */ getCount(): number; /** * Get unannotated inheritance relationships (extends/implements with placeholder semantic). */ getUnannotatedInheritance(limit?: number): UnannotatedInheritance[]; /** * Get count of unannotated inheritance relationships. */ getUnannotatedInheritanceCount(): number; /** * Get definitions that have calls to other definitions but no annotation. */ getUnannotated(options?: { limit?: number; fromDefinitionId?: number; }): UnannotatedRelationship[]; /** * Get count of unannotated relationships. */ getUnannotatedCount(fromDefinitionId?: number): number; /** * Get the next relationship(s) that need annotation with rich context. */ getNextToAnnotate(options: { limit?: number; fromDefinitionId?: number; } | undefined, getDefinitionMetadata: (id: number) => Record, getDefinitionDependencies: (id: number) => Array<{ dependencyId: number; name: string; }>): EnhancedRelationshipContext[]; } //# sourceMappingURL=relationship-repository.d.ts.map