/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import { IValidateInitialize } from "@appsensorlike/appsensorlike/core/core.js";
import { ActionRequest, ActionResponse } from "../appsensor-websocket.js";
import { ClientRequestArgs } from "http";
import EventEmitter from "events";
import WebSocket from "ws";
declare class WebSocketClientConfig implements IValidateInitialize {
    static DEFAULT_RETRY_INTERVAL: number;
    address: string | URL;
    options?: WebSocket.ClientOptions | ClientRequestArgs | undefined;
    reconnectOnConnectionLost?: boolean;
    reconnectRetryInterval?: number;
    checkValidInitialize(): void;
}
declare class AppSensorWebSocketClient {
    protected socket: WebSocket | null;
    protected myUUID: string;
    protected reconnectTimer: NodeJS.Timer | null;
    protected address: string;
    protected config: WebSocketClientConfig;
    protected accessDenied: boolean;
    protected eventEmmiter: EventEmitter;
    constructor(config: WebSocketClientConfig);
    connect(configParameters?: {
        [propertyName: string]: string | Object;
    }): Promise<boolean>;
    protected sendConfigMsg(configParameters?: {
        [propertyName: string]: string | Object;
    }): Promise<void>;
    protected onOpen(): void;
    protected onError(error: Error): void;
    protected onClose(code: number, reason: Buffer): void;
    protected reconnect(): Promise<void>;
    onMessage(data: WebSocket.RawData, isBinary: boolean): void;
    protected onServerResponse(response: ActionResponse): void;
    protected createRequest(actionName: string, parameters?: {
        [propertyName: string]: string | Object;
    }): ActionRequest;
    protected sendRequest(request: ActionRequest): Promise<void>;
    protected addRequest(request: ActionRequest): Promise<string | number | Object | null>;
    closeSocket(): Promise<void>;
}
export { AppSensorWebSocketClient, WebSocketClientConfig };
