import GcPdfViewer from "../..";
import { ClientMessageType, ClientMessage, ClientRequestType } from "./ClientMessage";
import { ISupportApi } from "../ISupportApi";
import { LogLevel } from "../../SharedDocuments/types";
/**
 * Represent a persistent connection between client and server using Web Sockets.
 * */
export declare class PersistentConnection {
    private _host;
    private _supportApi;
    private _clientId;
    private _reconnectInterval?;
    private _webSocketUrl?;
    private _isLegacyServer?;
    private _connection;
    private _legacyServerHub;
    private _pendingResponseHash;
    private _connected;
    private _legacyServerPromise;
    private _netCoreServerPromise;
    /**
     * PersistentConnection class constructor.
     * @param _host
     * @param _clientID
     * @param apiUrl
     */
    constructor(_host: GcPdfViewer, _supportApi: ISupportApi, _clientId: string, _reconnectInterval?: number | undefined, _webSocketUrl?: string | undefined, _isLegacyServer?: boolean | undefined);
    get logLevel(): LogLevel;
    get clientId(): string;
    get isConnected(): boolean;
    /**
     * Start persistent Web Socket connection.
     * */
    start(): Promise<void>;
    /**
     * Stop persistent Web Socket connection.
     * */
    stop(): void;
    /**
     * Send message without waiting for response.
     * @param messageData
     */
    sendMessage(type: ClientMessageType, messageData: Partial<ClientMessage>): Promise<void>;
    /**
    * Send request message and wait for response.
    * @param messageData
    */
    sendRequest<T>(type: ClientRequestType, messageData?: Partial<ClientMessage>): Promise<T>;
    logError(method: string, message: string): void;
    logDebug(method: string, message: string): void;
    private onServerMessage;
    initLegacyServer(): Promise<any>;
    initNetCoreServer(): Promise<any>;
    private initNetCoreServerInternal;
    private initLegacyServerInternal;
}
