/**
 * SessionRecorder manages real-time RRWeb session recording,
 * sending batched events to the API via HTTP POST (widget message endpoint).
 */
export declare class SessionRecorder {
    private eventQueue;
    private estimatedQueueBytes;
    private sessionId;
    private stopRecording;
    private isRecording;
    private chatId;
    private applicationId;
    private metadataSent;
    private startPromise;
    private stopRequested;
    private flushTimer;
    private consecutiveFailures;
    constructor(chatId: string, applicationId: number);
    /**
     * Send rrweb/metadata command via POST
     */
    private sendMetadata;
    /**
     * Buffer an event and trigger flush if thresholds are met
     */
    private bufferEvent;
    /**
     * Flush buffered events via POST.
     *
     * Batches are capped at MAX_BATCH_BYTES to stay within the API body-parser limit.
     * On transient server errors (5xx / network) the batch is re-queued up to
     * MAX_CONSECUTIVE_FAILURES times before being dropped.
     * On permanent client errors (4xx) the batch is dropped immediately — re-sending
     * would never succeed and would create an infinite retry loop.
     */
    private flush;
    /**
     * Start recording session.
     * Safe against concurrent calls (returns existing startPromise).
     */
    start(): Promise<void>;
    /**
     * Internal start implementation. Checks stopRequested at each async boundary.
     */
    private doStart;
    /**
     * Stop recording session. Flushes remaining events before stopping.
     */
    stop(): void;
    /**
     * Get current session ID
     */
    getSessionId(): string;
    /**
     * Check if recording is active
     */
    isActive(): boolean;
}
//# sourceMappingURL=SessionRecorder.d.ts.map