/** * ErrorReporter is a singleton service that reports client-side errors and events to the backend. * These reports are displayed in the RT analytics table, associated with the same row as the session * they occurred in. This helps track and debug issues that happen during a user's session. * * The reporter needs to be initialized with session context (apiKey, apiUrl, sessionId, userId) * before it can send reports. This is typically done when the AI Assistant Engine is created. */ declare class ErrorReporter { private apiKey; private apiUrl; private sessionId; private generatedEndUserId; /** * Initialize the ErrorReporter with context needed for error reporting. * Call this after session creation or when context changes. */ init({ apiKey, apiUrl, sessionId, generatedEndUserId, }: { apiKey: string; apiUrl: string; sessionId: string; generatedEndUserId: string; }): void; /** * Logs a client-side error to the backend for the current session. * @param errorMessage - High-level error message string * @param errorDetails - Optional error object or string for extra context (not full stack) */ report(errorMessage: string, errorDetails?: any): Promise; } declare const errorReporter: ErrorReporter; export default errorReporter;