export interface CodeMetrics {
    complexity: ComplexityMetrics;
    maintainability: MaintainabilityMetrics;
    duplication: DuplicationMetrics;
    quality: QualityMetrics;
}
export interface ComplexityMetrics {
    cyclomatic: number;
    cognitive: number;
    halstead: {
        difficulty: number;
        volume: number;
        effort: number;
    };
    functions: FunctionComplexity[];
    average: number;
    max: number;
    total: number;
}
export interface FunctionComplexity {
    name: string;
    complexity: number;
    lines: number;
    parameters: number;
    location: CodeLocation;
}
export interface MaintainabilityMetrics {
    index: number;
    rating: 'A' | 'B' | 'C' | 'D' | 'F';
    factors: {
        complexity: number;
        lineCount: number;
        commentRatio: number;
        testCoverage?: number;
    };
    average: number;
    min: number;
    distribution: Record<string, number>;
}
export interface DuplicationMetrics {
    percentage: number;
    duplicateBlocks: DuplicateBlock[];
    totalLines: number;
    duplicatedLines: number;
    blocks: number;
}
export interface DuplicateBlock {
    locations: CodeLocation[];
    lines: number;
    tokens: number;
    hash: string;
}
export interface QualityMetrics {
    issues: {
        total: number;
        high: number;
        medium: number;
        low: number;
    };
    codeSmells: number;
    technicalDebt: number;
    score: number;
    grade: 'A' | 'B' | 'C' | 'D' | 'F';
    trends?: QualityTrend;
}
export interface CodeIssue {
    type: 'error' | 'warning' | 'info' | 'style';
    severity: 'critical' | 'high' | 'medium' | 'low';
    rule: string;
    message: string;
    location: CodeLocation;
    fixable: boolean;
    category: IssueCategory;
    suggestion?: string;
}
export type IssueCategory = 'security' | 'performance' | 'maintainability' | 'reliability' | 'style' | 'complexity' | 'duplication';
export interface CodeLocation {
    file: string;
    line: number;
    column: number;
    endLine?: number;
    endColumn?: number;
}
export interface CodeReview {
    id: string;
    fileHash?: string;
    fileName?: string;
    file: string;
    timestamp: string;
    findings: Finding[];
    suggestions: Suggestion[];
    metrics?: CodeMetrics;
    overallScore?: number;
    approved?: boolean;
    score: number;
    summary: string;
    comparison?: any;
}
export interface Finding {
    type: 'bug' | 'improvement' | 'style';
    severity: 'critical' | 'high' | 'medium' | 'low';
    title: string;
    description: string;
    location: CodeLocation;
    suggestedFix?: string;
}
export interface Suggestion {
    title: string;
    description: string;
    priority?: 'high' | 'medium' | 'low';
    type?: string;
}
export interface ReviewFinding {
    type: 'bug' | 'vulnerability' | 'code-smell' | 'performance' | 'style';
    severity: 'critical' | 'high' | 'medium' | 'low';
    title: string;
    description: string;
    location: CodeLocation;
    suggestedFix?: string;
    references?: string[];
}
export interface ReviewSuggestion {
    category: 'refactoring' | 'optimization' | 'simplification' | 'documentation';
    title: string;
    description: string;
    impact: 'high' | 'medium' | 'low';
    effort: 'high' | 'medium' | 'low';
    location?: CodeLocation;
    example?: string;
}
export interface Trend {
    metric: string;
    direction: 'improving' | 'stable' | 'degrading';
    change: number;
    percentage: number;
}
export interface MetricsTrend {
    metric: string;
    values: TimeSeriesData[];
    trend: 'improving' | 'stable' | 'degrading';
    changePercentage: number;
}
export interface TimeSeriesData {
    timestamp: string;
    value: number;
    label?: string;
}
export interface QualityTrend {
    period: string;
    complexityTrend: 'increasing' | 'stable' | 'decreasing';
    maintainabilityTrend: 'improving' | 'stable' | 'degrading';
    issuesTrend: 'increasing' | 'stable' | 'decreasing';
    coverageTrend?: 'increasing' | 'stable' | 'decreasing';
}
export interface AnalysisOptions {
    files?: string[];
    directories?: string[];
    includeHistory?: boolean;
    compareWithBaseline?: boolean;
    maxIssues?: number;
    excludePatterns?: string[];
    customRules?: CustomRule[];
}
export interface CustomRule {
    name: string;
    description: string;
    pattern: string;
    severity: 'error' | 'warning' | 'info';
    category: IssueCategory;
    message: string;
}
export interface AnalysisResult {
    id: string;
    timestamp: string;
    files: FileAnalysis[];
    summary: AnalysisSummary;
    trends?: MetricsTrend[];
    recommendations: string[];
}
export interface FileAnalysis {
    path: string;
    metrics: CodeMetrics;
    issues: CodeIssue[];
    size: number;
    language: string;
    lastModified: string;
}
export interface AnalysisSummary {
    totalFiles: number;
    totalLines: number;
    averageComplexity: number;
    averageMaintainability: number;
    totalIssues: number;
    criticalIssues: number;
    duplicatePercentage: number;
    overallScore: number;
    overallGrade: 'A' | 'B' | 'C' | 'D' | 'F';
}
export interface BaselineComparison {
    current: AnalysisSummary;
    baseline: AnalysisSummary;
    improvements: string[];
    regressions: string[];
    unchanged: string[];
}
export interface ReviewOptions {
    file?: string;
    content?: string;
    language?: string;
    compareWith?: string;
    includeHistory?: boolean;
    securityScan?: boolean;
    performanceScan?: boolean;
    styleScan?: boolean;
}
export interface TrackingOptions {
    projectId?: string;
    branch?: string;
    commit?: string;
    tags?: string[];
}
export interface MetricsHistory {
    projectId: string;
    entries: HistoryEntry[];
    baseline?: HistoryEntry;
    trends: Trend[];
}
export interface HistoryEntry {
    id?: string;
    timestamp: string;
    commit?: string;
    branch?: string;
    metrics: CodeMetrics;
    summary?: AnalysisSummary;
    tags?: string[];
}
//# sourceMappingURL=types.d.ts.map