import { ComProtocol, ConnectionStateChangeEvent } from '@iotize/device-client.js/protocol/api';
import { Observable } from 'rxjs';
import { Command } from './request/definitions';
import { Response } from './response/definitions';
import { BodyDecoder } from './converter/definitions';
import { RequestInterceptorType } from './definitions';
import { Decoder, Encoder } from '@iotize/common/converter/api';
export interface ProtocolChangeEvent {
    newProtocol: ComProtocol;
    oldProtocol?: ComProtocol;
}
export interface IoTizeClient {
    commandEncoder: Encoder<Command, Uint8Array>;
    responseDecoder: Decoder<Uint8Array, Response<any>>;
    getCurrentProtocol(): ComProtocol;
    addComProtocol(newProtocol: ComProtocol, id: string): this;
    switchProtocol(type: string): this;
    useComProtocol(protocol: ComProtocol | string): this;
    connect(): Observable<any>;
    disconnect(): Observable<any>;
    command<T>(request: Command, bodyDecoder?: BodyDecoder<T>): Observable<Response<T>>;
    onConnectionStateChange(): Observable<ConnectionStateChangeEvent>;
    isConnected(): boolean;
    send<T>(dataIn: Uint8Array, bodyDecoder?: BodyDecoder<T>): Observable<Response<T>>;
    addInterceptor(interceptor: RequestInterceptorType): this;
}
