import { Observable } from "rxjs";
import { ApiRequest } from "./request";
import { IoTizeClient, ResponseInterface } from "../api";
export interface ExecutionContext {
    command: ApiRequest;
    bodyDecoder?: any;
    client: IoTizeClient;
    [key: string]: any;
}
export declare class InterceptorChain {
    private target;
    interceptors: Array<RequestInterceptor>;
    constructor(target: (context: ExecutionContext) => Observable<ResponseInterface<any>>);
    addInterceptor(interceptor: RequestInterceptorType): this;
    execute<T>(context: ExecutionContext): Observable<ResponseInterface<any>>;
}
export interface RequestHandler {
    handle(req: ExecutionContext): Observable<ResponseInterface<any>>;
}
export interface RequestInterceptor {
    intercept(req: ExecutionContext, next: RequestHandler): Observable<ResponseInterface<any>>;
}
export declare type RequestInterceptorFct = (req: ExecutionContext, next: RequestHandler) => Observable<ResponseInterface<any>>;
export declare type RequestInterceptorType = RequestInterceptorFct | RequestInterceptor;
