type WsState = 'connecting' | 'connected' | 'disconnected' | 'reconnecting';
export interface WebSocketClientOptions<R> {
    /** WebSocket endpoint path (e.g., "/sessions/{id}/events/ws") */
    path: string;
    /** Query parameters to append to the URL */
    queryParams?: Record<string, string>;
    /** Called for each received JSON message */
    onMessage: (message: R) => void;
    /** Called when the connection fails permanently (auth error, max retries) */
    onError?: (error: Error) => void;
    /** Returns the last seen ID for reconnection resume via from_id */
    getFromId?: () => string | undefined;
    /** Debug label for logging */
    label: string;
}
/**
 * Node.js WebSocket client for Guild backend endpoints.
 *
 * Handles auth headers (Bearer + IAP), auto-reconnect with exponential
 * backoff + jitter, connection timeout, and from_id resume on reconnect.
 */
export declare class GuildWebSocketClient<R> {
    private ws;
    private state;
    private readonly options;
    private reconnectTimer;
    private connectTimeout;
    private reconnectAttempts;
    private constructor();
    /**
     * Create and connect a WebSocket client.
     * Rejects if initial connection or auth fails.
     */
    static create<R>(options: WebSocketClientOptions<R>): Promise<GuildWebSocketClient<R>>;
    private buildUrl;
    private getHeaders;
    private cleanupSocket;
    private connect;
    private scheduleReconnect;
    /** Close the connection cleanly. No reconnection will be attempted. */
    close(): void;
    /** Current connection state */
    getState(): WsState;
}
export {};
//# sourceMappingURL=websocket-client.d.ts.map