import Model from '@tripian/model';
import { AxiosInstance, AxiosRequestConfig } from 'axios';
import IXhrOptions from './IXhrOptions';
declare class XHR {
    private static instance;
    private axios;
    private token?;
    getToken: () => Model.Token | undefined;
    setToken: (token: Model.Token) => void;
    removeToken: () => void;
    private constructor();
    static getInstance: (xhrOptions: IXhrOptions) => XHR;
    static refreshXhrToken: () => Promise<Model.Token> | undefined;
    private get;
    private getWithPage;
    private post;
    private put;
    private delete;
    req: (httpMethod: string) => <T>(url: string, dataKey: string, params?: any, config?: AxiosRequestConfig) => Promise<T>;
    reqAxios: () => AxiosInstance;
    reqWithPage: (httpMethod: string) => <T>(url: string, dataKey: string, params?: any) => Promise<Model.DataPayload<T>>;
}
export default XHR;
