export declare const WIDGET_ERROR_TYPES: { readonly API_ERROR: "api_error"; readonly WEBSOCKET_ERROR: "websocket_error"; readonly COMPONENT_ERROR: "component_error"; readonly STORAGE_ERROR: "storage_error"; }; interface APIErrorContext { endpoint: string; method: string; nameSpace?: string; requestPayload?: Record; responseStatus?: number; responseData?: any; messagesCount?: number; } interface WebSocketErrorContext { socketEvent?: string; socketConnected?: boolean; socketData?: any; } interface StorageErrorContext { operation: string; storageType: "localStorage" | "sessionStorage"; dataSize?: number; } /** * Generic widget error capture function * Use this for capturing any widget error with custom context */ export declare function captureWidgetError(error: Error, additionalContext?: Record): void; /** * Captures API request errors with request/response context * Use this in catch blocks of fetch/API calls */ export declare function captureAPIError(error: Error, context: APIErrorContext): void; /** * Captures WebSocket connection/communication errors * Use this for socket.io errors and system events */ export declare function captureWebSocketError(error: Error, context: WebSocketErrorContext): void; /** * Captures storage (localStorage/sessionStorage) errors * Use this for quota exceeded or storage access errors */ export declare function captureStorageError(error: Error, context: StorageErrorContext): void; /** * Higher-order function that wraps async functions with automatic error tracking * Use this to wrap API calls or other async operations for automatic error capture * * @example * const trackedFetch = withErrorTracking( * () => fetch('/api/endpoint'), * { endpoint: '/api/endpoint', method: 'GET' } * ); */ export declare function withErrorTracking(fn: () => Promise, context: APIErrorContext): () => Promise; export {};