import { AxiosInstance, AxiosRequestConfig } from 'axios';
export interface CustomAxiosRequestConfig extends AxiosRequestConfig {
    loading?: boolean;
}
export declare const service: AxiosInstance;
export declare const accessTokenKey = "access-token";
export declare const refreshAccessTokenKey = "x-access-token";
export declare const getToken: () => any;
export declare const getHeader: () => {
    authorization: string;
};
export declare const clearAccessTokens: () => void;
export declare const clearTokens: () => void;
export declare const axiosInstance: AxiosInstance;
export declare const cancelRequest: (url: string | string[]) => void;
export declare const cancelAllRequest: () => void;
/**
 *  参数处理
 * @param {*} params  参数
 */
export declare function tansParams(params: any): string;
/**
 * 解密 JWT token 的信息
 * @param token jwt token 字符串
 * @returns <any>object
 */
export declare function decryptJWT(token: string): any;
/**
 * 将 JWT 时间戳转换成 Date
 * @description 主要针对 `exp`，`iat`，`nbf`
 * @param timestamp 时间戳
 * @returns Date 对象
 */
export declare function getJWTDate(timestamp: number): Date;
/**
 * Ajax请求，如果成功返回result字段，如果不成功提示错误信息
 * @description Ajax请求
 * @config AxiosRequestConfig 请求参数
 * @returns 返回对象
 */
export declare function request2(config: AxiosRequestConfig<any>): any;
/**
 * 使用新的令牌登录
 * @param accessInfo
 */
export declare function reLoadLoginAccessToken(accessInfo: any): void;
/**
 * 实现异步延迟
 * @param delay 延迟时间（毫秒）
 * @returns
 */
export declare function sleep(delay: number): Promise<unknown>;
export default service;
