import { IResponseMessage, IWatchOptions } from '@cloudbase/types/realtime'; import { RealtimeListener } from './listener'; import { IWSSendOptions } from './websocket-client'; interface IVirtualWebSocketClientConstructorOptions extends IWatchOptions { envId?: string; collectionName: string; query: string; limit?: number; orderBy?: Record; send: (opts: IWSSendOptions) => Promise; login: (envId?: string, refresh?: boolean) => Promise; isWSConnected: () => boolean; onceWSConnected: () => Promise; getWaitExpectedTimeoutLength: () => number; onWatchStart: (client: VirtualWebSocketClient, queryID: string) => void; onWatchClose: (client: VirtualWebSocketClient, queryID: string) => void; debug?: boolean; } export declare class VirtualWebSocketClient { watchId: string; listener: RealtimeListener; private envId?; private collectionName; private query; private limit; private orderBy; private send; private login; private isWSConnected; private onceWSConnected; private getWaitExpectedTimeoutLength; private onWatchStart; private onWatchClose; private debug?; private watchStatus; private availableRetries; private ackTimeoutId?; private initWatchPromise?; private rebuildWatchPromise?; private sessionInfo?; private waitExpectedTimeoutId?; constructor(options: IVirtualWebSocketClientConstructorOptions); onMessage(msg: IResponseMessage): void; closeWithError(error: any): void; pause(): void; resume(): Promise; private wsLogin; private initWatch; private rebuildWatch; private handleWatchEstablishmentError; private closeWatch; private scheduleSendACK; private clearACKSchedule; private sendACK; private handleCommonError; private useRetryTicket; private handleServerEvents; private handleServerEventsInternel; private postHandleServerEventsValidityCheck; private clearWaitExpectedEvent; } export {};