import { AlExecutionContext } from '@al/core';
import { AlNetworkRequestDescriptor } from '@al/core';
import { AlNetworkResponse } from '@al/core';
import { AxiosInstance } from 'axios';
import { AxiosRequestConfig } from 'axios';
import { AxiosResponse } from 'axios';

export declare class AlNodeExecutionContext extends AlExecutionContext {
    axios: AxiosInstance;
    constructor();
    base64Encode(data: string): string;
    base64Decode(data: string): string;
    handleRequest<YieldType = any>(requestConfig: AlNetworkRequestDescriptor): Promise<AlNetworkResponse<YieldType>>;
    /**
     * Instantiate a properly configured axios client for services
     */
    protected getAxiosInstance(): AxiosInstance;
    protected axiosRequestHook(config: AxiosRequestConfig): AxiosRequestConfig;
    protected axiosResponseHook(response: AxiosResponse<any>): Promise<AxiosResponse<any>>;
}

export declare class WrappedAxiosRequest<Type = any> implements AlNetworkResponse<Type> {
    axios: AxiosInstance;
    request: AlNetworkRequestDescriptor;
    status: number;
    statusText: string;
    headers: {
        [header: string]: string;
    };
    data: Type;
    rawResponse?: AxiosResponse<any>;
    constructor(axios: AxiosInstance, request: AlNetworkRequestDescriptor);
    execute(): Promise<AlNetworkResponse>;
    complete(response: AxiosResponse<Type>): Promise<AxiosResponse<Type>>;
    json(): Type;
    protected convertRequest(request: AlNetworkRequestDescriptor): WrappedAxiosRequestConfig;
}

export declare type WrappedAxiosRequestConfig = AxiosRequestConfig & {
    wrapper?: WrappedAxiosRequest;
};

export { }
