import { AxiosRequestConfig } from "axios";
import { CoreConfig } from "@/model";
interface Query {
    [key: string]: any;
}
/**
 * @description: REST请求服务
 * @author ChenRui
 * @date 2020/7/29 18:45
 */
declare class ApiService {
    /**
     * @description: 初始化
     * @author ChenRui
     * @date 2020/8/29 23:36
     */
    init(): void;
    /**
     * @description:  创建基础消息头
     * @author ChenRui
     * @date 2020/8/28 15:18
     */
    createBasicHeaders(): any;
    /**
     * @description: 创建认证消息头
     * @author ChenRui
     * @date 2020/8/28 15:18
     */
    createAuthHeaders(): any;
    /**
     * @description: 创建上传认证消息头
     * @author ChenRui
     * @date 2021/4/6 11:17
     */
    createFileUploadAuthorizationHeader(): {
        headers: {
            Accept: string;
            token: string | undefined;
            accessToken: string | undefined;
        };
    };
    /**
     * @description: 创建认证下载消息头
     * @author ChenRui
     * @date 2020/8/28 15:18
     */
    createFileDownloadAuthorizationHeader(): {
        headers: {
            "Content-Type": string;
            token: string | undefined;
            accessToken: string | undefined;
        };
        responseType: string;
    };
    get(path: string, query: Query | undefined, requestConfig: AxiosRequestConfig): any;
    post(path: string, params: any, query: Query | undefined, requestConfig: AxiosRequestConfig): any;
    put(path: string, params: any, query: Query | undefined, requestConfig: AxiosRequestConfig): any;
    delete(path: string, query: Query | undefined, requestConfig: AxiosRequestConfig): any;
    /**
     * @description: 获取全局配置
     * @author ChenRui
     * @date 2020/12/17 16:16
     */
    get coreConfig(): Partial<CoreConfig>;
    /**
     * @description: 通用请求函数
     * @author ChenRui
     * @date 2020/8/28 15:19
     * @param api               调用接口的对象
     * @param query             问号？后参数
     * @param params            post、put、delete参数 非必须
     * @param requestConfig     请求配置，如果上传文件、form提交等配置 非必须
     */
    general(api: any, query: Query | undefined, params?: any | undefined, requestConfig?: AxiosRequestConfig | any): any;
    /**
     * @description: 错误码处理器
     * @author ChenRui
     * @date 2020/8/28 15:19
     */
    createBusCodeHander(): (response: any) => any;
    /**
     * @description: 异常处理器
     * @author ChenRui
     * @date 2020/8/28 15:19
     */
    createErrorHander(): (error: any) => {
        code: number;
        msg: any;
    };
    /**
     * @description: 日期格式化
     * @author ChenRui
     * @date 2020/8/28 15:20
     */
    formatDate(date: any): string;
    /**
     * @description: json格式转表单格式
     * @author ChenRui
     * @date 2020/8/28 15:20
     */
    jsonToFormData(params: any): FormData | undefined;
    /**
     * @description: url请求参数组装
     * @author ChenRui
     * @date 2020/8/28 15:21
     */
    urlQueryConvert(url: string, query: Query): string;
}
declare const apiService: ApiService;
export default apiService;
