import { AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';
import URLEndpoint from '../Core/Http/URLEndpoint';
import { Route } from './Route';
export declare function logErrorResponse(response: AxiosResponse): void;
export declare class RequestOptions implements AxiosRequestConfig {
    headers: Record<string, string>;
    params: Record<string | number, string>;
    timeout: number;
    responseType: ResponseType;
    validateStatus: (status: number) => boolean;
    signal?: AbortSignal;
    private constructor();
    static new({ clientId, timeout, queryString, authenticationToken, headers, responseType, signal }?: {
        clientId?: string;
        timeout?: number;
        queryString?: object;
        authenticationToken?: string;
        headers?: object;
        responseType?: ResponseType;
        signal?: AbortSignal;
    }): RequestOptions;
}
export declare class ResponseHandler<T> {
    private axiosPromise;
    private signal;
    constructor(response: Promise<AxiosResponse<T>>, signal?: AbortSignal);
    handle<TResult>(consumer: (response: AxiosResponse<T> | Error) => TResult): Promise<TResult>;
}
export interface ServiceRequest {
    invoke<T>(endpoint: URLEndpoint, route: Route, routeParams: {}, queryString?: {}, payload?: any): ResponseHandler<T>;
}
export declare class AuthorizedServiceRequest implements ServiceRequest {
    private authToken;
    private clientId;
    constructor(clientId: string, authToken: string);
    invoke<T>(endpoint: URLEndpoint, route: Route, routeParams: {}, queryString?: {}, payload?: any, headers?: {}, responseType?: ResponseType, timeout?: number, signal?: AbortSignal): ResponseHandler<T>;
}
export declare class AnonymousServiceRequest implements ServiceRequest {
    private clientId;
    private headers?;
    constructor(clientId: string, headers?: Record<string, string>);
    invoke<T>(endpoint: URLEndpoint, route: Route, routeParams: {}, queryString?: {}, payload?: any, signal?: AbortSignal): ResponseHandler<T>;
}
