import { TapResponse } from '@iotize/tap';
import { ExecutionContext, TapRequestFrame } from '@iotize/tap/client/api';
import { ConnectionStateChangeEvent } from '@iotize/tap/protocol/api';
export interface OnErrorCallback {
    onError(err: Error): void;
}
export interface OnTapEvent {
    onTapRequestError?: (event: OnTapEvent.TapRequestError) => void;
    onTapRequestUnauthorized?: (event: {
        request: ExecutionContext;
        response: TapResponse<any>;
    }) => void;
    onTapConnectionStateChange(newSate: ConnectionStateChangeEvent): void;
}
export declare namespace OnTapEvent {
    interface TapRequestError {
        request: TapRequestFrame;
        error: Error;
        response?: TapResponse<any>;
    }
}
