import type { ErrorRecord } from '../types/error.types.js';
import type { ErrorRepository } from '../db/repositories/error.repository.js';
import type { SolutionRepository } from '../db/repositories/solution.repository.js';
import type { CodeModuleRepository } from '../db/repositories/code-module.repository.js';
import type { RuleRepository } from '../db/repositories/rule.repository.js';
import type { AntipatternRepository } from '../db/repositories/antipattern.repository.js';
import type { InsightRepository } from '../db/repositories/insight.repository.js';
import type { MemoryRepository } from '../db/repositories/memory.repository.js';
import type { SessionRepository } from '../db/repositories/session.repository.js';
import type { SynapseManager } from '../synapses/synapse-manager.js';
import type { NetworkStats } from '../types/synapse.types.js';
export interface ProjectSummary {
    errors: {
        total: number;
        unresolved: number;
        last7d: number;
    };
    solutions: {
        total: number;
    };
    rules: {
        active: number;
    };
    antipatterns: {
        total: number;
    };
    modules: {
        total: number;
    };
    insights: {
        active: number;
    };
    memories: {
        active: number;
        byCategory: Record<string, number>;
    };
    sessions: {
        total: number;
        last?: string;
    };
    healthScore?: number;
}
export interface NetworkOverview {
    stats: NetworkStats;
    strongestSynapses: Array<{
        id: number;
        source: string;
        target: string;
        type: string;
        weight: number;
    }>;
}
export declare class AnalyticsService {
    private errorRepo;
    private solutionRepo;
    private codeModuleRepo;
    private ruleRepo;
    private antipatternRepo;
    private insightRepo;
    private synapseManager;
    private memoryRepo;
    private sessionRepo;
    constructor(errorRepo: ErrorRepository, solutionRepo: SolutionRepository, codeModuleRepo: CodeModuleRepository, ruleRepo: RuleRepository, antipatternRepo: AntipatternRepository, insightRepo: InsightRepository, synapseManager: SynapseManager);
    setMemoryRepos(memoryRepo: MemoryRepository, sessionRepo: SessionRepository): void;
    getSummary(projectId?: number): ProjectSummary;
    computeHealthScore(projectId?: number): number;
    getTimeSeries(projectId?: number, days?: number): Array<{
        date: string;
        errors: number;
        solutions: number;
    }>;
    explainError(errorId: number): {
        error: ErrorRecord | undefined;
        solutions: Array<{
            id: number;
            description: string;
            confidence: number;
            successRate: number;
        }>;
        chain: {
            parents: ErrorRecord[];
            children: ErrorRecord[];
        };
        relatedErrors: Array<{
            id: number;
            type: string;
            message: string;
            similarity: number;
        }>;
        rules: Array<{
            id: number;
            pattern: string;
            action: string;
            confidence: number;
        }>;
        insights: Array<{
            id: number;
            type: string;
            title: string;
        }>;
        synapseConnections: number;
    };
    getNetworkOverview(limit?: number): NetworkOverview;
}
