import type Database from 'better-sqlite3'; import type { Domain, DomainWithCount } from '../schema.js'; /** * Repository for domain registry operations. * Handles CRUD operations for the domains table and domain-related queries. */ export declare class DomainRepository { private db; private metadata; constructor(db: Database.Database); /** * Add a new domain to the registry. * @returns The domain ID if created, or null if already exists. */ add(name: string, description?: string): number | null; /** * Get a domain by name. */ get(name: string): Domain | null; /** * Get all domains from the registry. */ getAll(): Domain[]; /** * Get all domains with their symbol counts. */ getAllWithCounts(): DomainWithCount[]; /** * Update a domain's description. */ updateDescription(name: string, description: string): boolean; /** * Rename a domain in both the registry and all symbol metadata. * @returns Number of symbols updated. */ rename(oldName: string, newName: string): { updated: boolean; symbolsUpdated: number; }; /** * Merge one domain into another. The source domain is removed from all symbols * and replaced with the target domain. * @returns Number of symbols updated. */ merge(fromName: string, intoName: string): { symbolsUpdated: number; registryRemoved: boolean; }; /** * Remove a domain from the registry. * @param force If true, removes even if symbols still use this domain. * @returns Object with removed status and count of symbols still using the domain. */ remove(name: string, force?: boolean): { removed: boolean; symbolsUsingDomain: number; }; /** * Sync all domains currently in use to the registry. * Registers any domain found in symbol metadata that isn't already registered. * @returns Array of newly registered domain names. */ syncFromMetadata(): string[]; /** * Get all unregistered domains currently in use. */ getUnregistered(): string[]; /** * Check if a domain is registered. */ isRegistered(name: string): boolean; /** * Get symbols that have a specific domain tag. * Domain is stored as a JSON array in the 'domain' metadata key. */ getSymbolsByDomain(domain: string): Array<{ id: number; name: string; kind: string; filePath: string; line: number; domains: string[]; purpose: string | null; }>; /** * Get symbols filtered by purity (pure = no side effects). */ getSymbolsByPurity(isPure: boolean): Array<{ id: number; name: string; kind: string; filePath: string; line: number; purpose: string | null; }>; } //# sourceMappingURL=domain-repository.d.ts.map