import { ErrorContext, ErrorReport } from './errorTypes'; /** * Error reporter configuration */ export interface ErrorReporterConfig { enabled: boolean; dsn?: string; environment: string; version: string; sampleRate?: number; beforeSend?: (report: ErrorReport) => ErrorReport | null; ignoredErrors?: (string | RegExp)[]; } /** * Initialize the error reporter */ export declare function initErrorReporter(options?: Partial): void; /** * Clean up error handlers * Call this when resetting the error reporter or before re-initialization */ export declare function cleanupErrorHandlers(): void; /** * Reset error reporter state * Useful for testing or when unmounting the application */ export declare function resetErrorReporter(): void; /** * Set the user context for error reports */ export declare function setUserContext(userId?: string, sessionId?: string): void; /** * Set additional context for error reports */ export declare function setErrorContext(context: Partial): void; /** * Clear error context */ export declare function clearErrorContext(): void; /** * Report an error */ export declare function reportError(error: unknown, context?: Partial): void; /** * Report a warning (lower severity) */ export declare function reportWarning(message: string, context?: Partial): void; /** * Report an info event */ export declare function reportInfo(message: string, metadata?: Record): void; /** * Add a breadcrumb for error context */ export declare function addBreadcrumb(type: string, message: string, data?: Record): void; /** * Export error reporter as singleton object */ export declare const ErrorReporter: { init: typeof initErrorReporter; cleanup: typeof cleanupErrorHandlers; reset: typeof resetErrorReporter; setUserContext: typeof setUserContext; setErrorContext: typeof setErrorContext; clearErrorContext: typeof clearErrorContext; reportError: typeof reportError; reportWarning: typeof reportWarning; reportInfo: typeof reportInfo; addBreadcrumb: typeof addBreadcrumb; };