type MonitraceClient = 'axios' | 'fetch' | 'xhr'; interface MonitraceConfig { client: MonitraceClient; endpoint: string; appName: string; version?: string; localFallback?: boolean; count?: number; userContext?: () => Record; } /** * Inicializa Monitrace para captura de errores frontend. */ declare function initMonitrace(userConfig: MonitraceConfig): void; declare function setUserContext(contextOrFn: Record | (() => Record)): void; declare function getCurrentUserContext(): Record | null; declare function isMonitraceInitialized(): boolean; declare function getMonitraceStatus(): { isInitialized: boolean; hasEndpoint: boolean; hasAppName: boolean; }; interface ErrorPayload { message: string; stack?: string; route: string; appName?: string; version?: string; type: 'global' | 'http' | 'promise' | 'manual' | 'global-onerror'; timestamp: string; userContext?: Record; count?: number; metadata?: Record; } type ErrorInput = { message: string; stack?: string; route: string; type: 'global' | 'http' | 'promise' | 'manual' | 'global-onerror'; metadata?: Record; appName?: string; version?: string; }; declare function sendError(error: ErrorInput, config: MonitraceConfig): void; declare function flushAllPendingErrors(config: MonitraceConfig): void; declare function flushStoredErrors(config: MonitraceConfig): void; declare function startErrorFlusher(config: MonitraceConfig, interval?: number): void; export { type ErrorPayload, type MonitraceConfig, flushAllPendingErrors, flushStoredErrors, getCurrentUserContext, getMonitraceStatus, initMonitrace, isMonitraceInitialized, sendError, setUserContext, startErrorFlusher };