import { EventEmitter } from 'events';
import { ConnectionManager } from './ConnectionManager';
import { ClientConfig, ErrorReport } from '../types/index';
/**
 * Objetivo 4: Reportar erros, bugs e falhas da aplicação externa
 */
export declare class ErrorReporter extends EventEmitter {
    private config;
    private connectionManager;
    private errorQueue;
    private reportInterval;
    private isActive;
    private errorStats;
    constructor(config: ClientConfig);
    /**
     * Iniciar serviço de relatório de erros
     */
    start(connectionManager?: ConnectionManager): Promise<void>;
    /**
     * Definir o gerenciador de conexão
     */
    setConnectionManager(connectionManager: ConnectionManager): void;
    /**
     * Parar serviço de relatório de erros
     */
    stop(): Promise<void>;
    /**
     * Reportar erro manualmente
     */
    reportError(error: ErrorReport): Promise<void>;
    /**
     * Reportar erro a partir de exception
     */
    reportException(exception: Error, context?: Record<string, any>): Promise<void>;
    /**
     * Reportar erro de aplicação
     */
    reportAppError(message: string, errorCode?: string, context?: Record<string, any>, sessionId?: string, userId?: string, tenantId?: string): Promise<void>;
    /**
     * Obter estatísticas de erros
     */
    getErrorStats(): any;
    /**
     * Obter erros pendentes na fila
     */
    getPendingErrors(): ErrorReport[];
    /**
     * Forçar envio dos erros na fila
     */
    forceFlush(): Promise<void>;
    private setupGlobalErrorHandlers;
    private startReportInterval;
    private stopReportInterval;
    private flushQueue;
    private updateStats;
    private isCriticalError;
}
