/**
 * Community Conflict Database Service
 *
 * Community-driven conflict knowledge base with reporting,
 * voting, and verified conflict tracking.
 *
 * @since v1.67.0
 */
import type { PluginConflict } from '../health/compatibility-types.js';
/**
 * User-submitted conflict report
 */
export interface ConflictReport {
    /** Unique report ID */
    id: string;
    /** Plugins involved */
    plugins: string[];
    /** Plugin versions (if known) */
    versions?: Record<string, string>;
    /** Type of conflict */
    type: PluginConflict['type'];
    /** User-described severity */
    severity: 'critical' | 'warning' | 'info';
    /** Detailed description */
    description: string;
    /** Steps to reproduce */
    stepsToReproduce?: string[];
    /** Error messages */
    errorMessages?: string[];
    /** Minecraft version */
    minecraftVersion?: string;
    /** Server software (Paper, Spigot, etc.) */
    serverSoftware?: string;
    /** Resolution the user found (if any) */
    userResolution?: string;
    /** Reporter info */
    reporter: {
        id?: string;
        name?: string;
        anonymous: boolean;
    };
    /** Submission timestamp */
    submittedAt: number;
    /** Report status */
    status: 'pending' | 'verified' | 'rejected' | 'duplicate';
}
/**
 * Community vote on a conflict report
 */
export interface ConflictVote {
    /** Report being voted on */
    reportId: string;
    /** User ID */
    userId: string;
    /** Vote type */
    vote: 'confirm' | 'cannot_reproduce' | 'resolved';
    /** Vote comment */
    comment?: string;
    /** Vote timestamp */
    votedAt: number;
}
/**
 * Verified conflict entry in the community database
 */
export interface VerifiedConflict {
    /** Conflict ID */
    id: string;
    /** Plugins involved */
    plugins: string[];
    /** Conflict type */
    type: PluginConflict['type'];
    /** Verified severity */
    severity: 'critical' | 'warning' | 'info';
    /** Description */
    description: string;
    /** Known workarounds */
    workarounds: string[];
    /** Versions affected */
    affectedVersions?: Record<string, string>;
    /** Versions where conflict is fixed */
    fixedInVersions?: Record<string, string>;
    /** Community votes */
    votes: {
        confirms: number;
        cannotReproduce: number;
        resolved: number;
    };
    /** Report IDs that contributed to this entry */
    reportIds: string[];
    /** When first reported */
    firstReportedAt: number;
    /** When last updated */
    lastUpdatedAt: number;
    /** When verified */
    verifiedAt: number;
    /** Whether this is officially verified by maintainers */
    officiallyVerified: boolean;
}
/**
 * Conflict statistics for analytics
 */
export interface ConflictStatistics {
    /** Total verified conflicts */
    totalConflicts: number;
    /** Conflicts by severity */
    bySeverity: Record<'critical' | 'warning' | 'info', number>;
    /** Conflicts by type */
    byType: Record<string, number>;
    /** Most problematic plugins */
    topProblematicPlugins: Array<{
        plugin: string;
        conflictCount: number;
    }>;
    /** Recently reported conflicts */
    recentReports: number;
    /** Pending reports */
    pendingReports: number;
}
/**
 * Search options for conflict database
 */
export interface ConflictSearchOptions {
    /** Plugin name to search */
    plugin?: string;
    /** Multiple plugins */
    plugins?: string[];
    /** Conflict type filter */
    type?: PluginConflict['type'];
    /** Severity filter */
    severity?: 'critical' | 'warning' | 'info';
    /** Only verified conflicts */
    verifiedOnly?: boolean;
    /** Minecraft version filter */
    minecraftVersion?: string;
    /** Pagination */
    limit?: number;
    offset?: number;
}
/**
 * API response wrapper
 */
export interface ApiResponse<T> {
    success: boolean;
    data?: T;
    error?: string;
    message?: string;
}
/**
 * Community Conflict Database Service
 */
export declare class CommunityConflictDatabase {
    private baseUrl;
    private apiKey?;
    private cache;
    private readonly CACHE_TTL;
    constructor(baseUrl?: string, apiKey?: string);
    /**
     * Search for conflicts in the community database
     */
    searchConflicts(options?: ConflictSearchOptions): Promise<VerifiedConflict[]>;
    /**
     * Get conflict by ID
     */
    getConflict(id: string): Promise<VerifiedConflict | null>;
    /**
     * Submit a new conflict report
     */
    submitReport(report: Omit<ConflictReport, 'id' | 'submittedAt' | 'status'>): Promise<{
        success: boolean;
        reportId?: string;
        error?: string;
    }>;
    /**
     * Vote on a conflict report
     */
    voteOnReport(reportId: string, vote: ConflictVote['vote'], comment?: string): Promise<{
        success: boolean;
        error?: string;
    }>;
    /**
     * Get conflict statistics
     */
    getStatistics(): Promise<ConflictStatistics | null>;
    /**
     * Get conflicts for specific plugins
     */
    getConflictsForPlugins(pluginNames: string[]): Promise<VerifiedConflict[]>;
    /**
     * Check if two plugins have known conflicts
     */
    checkPluginPair(pluginA: string, pluginB: string): Promise<VerifiedConflict[]>;
    /**
     * Get top problematic plugins
     */
    getTopProblematicPlugins(limit?: number): Promise<Array<{
        plugin: string;
        conflictCount: number;
    }>>;
    /**
     * Clear cache
     */
    clearCache(): void;
    /**
     * Set API key for authenticated requests
     */
    setApiKey(key: string): void;
    /**
     * Make authenticated fetch request
     */
    private fetch;
    /**
     * Get from cache if not expired
     */
    private getFromCache;
    /**
     * Set cache with TTL
     */
    private setCache;
}
/**
 * Create a community conflict database instance
 */
export declare function createCommunityDatabase(baseUrl?: string, apiKey?: string): CommunityConflictDatabase;
/**
 * Get the singleton community database instance
 */
export declare function getCommunityDatabase(): CommunityConflictDatabase;
/**
 * Reset the singleton (for testing)
 */
export declare function resetCommunityDatabase(): void;
//# sourceMappingURL=community-database.d.ts.map