import { CodeError } from '@iotize/common/error';
import { ServiceCallType } from './definitions';
import { TapResponse } from './response-impl';
import { ServiceCallRunner } from './service-call-runner';
export declare class TapError extends CodeError<TapError.Code> {
    cause?: Error | undefined;
    constructor(code: TapError.Code, message: string, cause?: Error | undefined);
    static cannotStartScram(err: Error): TapError;
    static notImplementedYet(msg: string): TapError;
    static initializationVectorNotSupported(err: Error): TapError;
    static executeRequestError<BodyType, ReturnType>(request: ServiceCallType<BodyType, ReturnType>, err: Error): TapError;
    static reponseStatusError(response: TapResponse<any>, call?: ServiceCallType<any, any>): TapResponseStatusError;
    static invalidServiceCallConfiguration(msg: string): TapError;
    static appendChunkError(cause: Error, chunk: Uint8Array, progress: ServiceCallRunner.AppendProgress): AppendChunkError;
    static nfcPairingError(msg: string, cause?: Error): TapError;
}
export declare namespace TapError {
    enum Code {
        CannotStartScram = "TapErrorCannotStartScram",
        NotImplemented = "TapErrorNotImplemented",
        InitializationVectorNotSupported = "TapErrorInitializationVectorNotSupported",
        AppendChunkError = "AppendChunkError",
        ResponseStatusError = "TapErrorTapResponseStatusError",
        InvalidServiceCallConfiguration = "TapErrorInvalidServiceCallConfiguration",
        ExecuteRequestError = "TapErrorTapExecuteRequestError",
        NfcPairingError = "TapErrorNfcPairingError",
        ScramNotStartedYet = "TapErrorScramNotStartedYet",
        InvalidScramKey = "TapErrorInvalidScramKey"
    }
}
export declare class TapResponseStatusError extends TapError {
    response: TapResponse<any>;
    constructor(response: TapResponse<any>, call?: ServiceCallType<any, any>);
}
export declare class AppendChunkError extends TapError {
    chunk: Uint8Array;
    progress: ServiceCallRunner.AppendProgress;
    constructor(cause: Error, chunk: Uint8Array, progress: ServiceCallRunner.AppendProgress);
}
