import { TapClientInterface } from '@iotize/tap/client/api';
import { ComProtocol } from '@iotize/tap/protocol/api';
import { Observable } from 'rxjs';
import { TapEvent } from './definitions';
import { ServiceCallRunner } from './service-call-runner';
import { ServiceContainer } from './service-container';
import { TapConfigurator } from './tap-configurator';
export interface DisconnectOptions {
    clearSession?: boolean;
    clearCache?: boolean;
}
/**
 *
 */
export declare class Tap {
    static TAG: string;
    protected _client: TapClientInterface;
    protected _lwm2m: ServiceCallRunner;
    private _events;
    service: ServiceContainer;
    get events(): Observable<TapEvent<string>>;
    get client(): TapClientInterface;
    get lwm2m(): ServiceCallRunner;
    set client(client: TapClientInterface);
    constructor(client: TapClientInterface);
    notifyEvent<T extends string>(event: TapEvent<T>): void;
    static create(): Tap;
    static fromProtocol(protocol: ComProtocol): Tap;
    get protocol(): ComProtocol;
    /**
     * Connect with the given communication protocol
     * TODO what if there is already a connected communication protocol
     * @param protocol
     */
    connect(protocol?: ComProtocol): Promise<void>;
    /**
     * Disconnect device
     */
    disconnect(): Promise<void>;
    isConnected(): boolean;
    /**
     * Configure current tap instance thanks to a TapConfigurator
     * @param configurator
     */
    configure<DataType>(configurator: TapConfigurator<DataType>): Promise<DataType>;
    /**
     *
     * @param protocol
     */
    useComProtocol(protocol: ComProtocol | string): this;
    /**
     * Send an NFC pairing request
     */
    nfcPairing(): Promise<Uint8Array>;
}
