import WebSocket from 'ws';
import { signalservice as SignalService } from '../../../protos/compiled';
export type WSRequest = SignalService.WebSocketRequestMessage.Params;
export type WSResponse = SignalService.WebSocketResponseMessage.Params;
interface RequestOptions {
    readonly body?: Uint8Array<ArrayBuffer>;
    readonly headers?: Array<string> | null;
}
export declare abstract class Service {
    protected readonly ws: WebSocket;
    private readonly requests;
    private lastSentId;
    constructor(ws: WebSocket);
    send(verb: string, path: string, options: RequestOptions): Promise<WSResponse>;
    private onMessage;
    private onClose;
    protected abstract handleRequest(request: WSRequest): Promise<WSResponse>;
}
export {};
