import type { WidgetCommand, WidgetEvent } from '../sdk/schema';
export type StreamStatus = 'disconnected' | 'connecting' | 'connected' | 'registered' | 'error';
export interface StreamClientCallbacks {
    onStatusChange?: (status: StreamStatus) => void;
    onMessage?: (event: WidgetEvent) => void;
    onError?: (error: Error) => void;
    onRegistered?: (applicationId: number | undefined) => void;
}
export declare class StreamClient {
    private static instance;
    private abortController;
    private chatId;
    private status;
    private callbacks;
    private isIntentionallyDisconnected;
    private reconnectAttempts;
    private readonly maxReconnectAttempts;
    private reconnectDelay;
    private readonly maxReconnectDelay;
    private reconnectTimer;
    private config?;
    private constructor();
    static getInstance(): StreamClient;
    addCallbacks(callbacks: StreamClientCallbacks): void;
    removeCallbacks(callbacks: StreamClientCallbacks): void;
    getStatus(): StreamStatus;
    isConnected(): boolean;
    connect(chatId: string, config?: {
        mtxId?: string;
        mtxKey?: string;
        mtxAgent?: number;
        mtxApp?: number;
    }): Promise<void>;
    private consumeEvents;
    disconnect(): void;
    send(command: WidgetCommand): void;
    private setStatus;
    private notifyError;
    private handleMessage;
    private scheduleReconnect;
    private clearReconnectTimer;
}
//# sourceMappingURL=StreamClient.d.ts.map