import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios"; export declare let baseURL: string; export declare let tokenKey: string; export interface AxiosError extends Error { config: AxiosRequestConfig; code?: string | null | number; request?: any; response?: AxiosResponse; } declare let reqApi: AxiosInstance; export interface AxiosSetting { setOpenLogin: (openLogin: boolean) => void; updatedReLoadAppData?: (path: string) => Promise; baseURLStr?: string; tokenKeyStr?: string; noEnUrls?: string[]; zipUrlls?: string[]; noEnAll?: boolean; genUrlToZq?: boolean; timeout?: number; } export declare const getLastReqDate: () => number; export declare const setupAxios: (setOpenLoginProps: (openLogin: boolean) => void, showmsg: any, baseURLStr?: string, tokenKeyStr?: string, timeoutNum?: number) => void; export declare const setupAxiosByObj: (p: AxiosSetting) => void; export declare const genUrlParams: (url: string, param?: any) => string; export declare const getNCode: () => string; export declare const reqByGet: (url: string, param?: any, config?: AxiosRequestConfig) => Promise; export declare const queryMoreApi: (param: Record | Array>) => Promise; export declare const callApiByPath: (type?: "post" | "get" | "delete" | "put", url?: string, param?: any, config?: AxiosRequestConfig, disabledLoadAppData?: boolean) => Promise; export declare const callApiByPathByCatch: (type?: "post" | "get" | "delete" | "put", url?: string, param?: any) => Promise>; export declare const queryByApi: (module: string, entityName: string, api: string, param: any) => Promise; export declare const exeByApi: (module: string, entityName: string, api: string, param: any) => Promise; export declare const loadEntity: (entityPath: string, entityId: string) => Promise>; /** * 获取文件为Blob * @param path * @param param * @returns */ export declare const callApiToBlob: (path: string, param?: any, method?: string, baseUrlProps?: string) => Promise; export declare const callApiToFile: (path: string, param?: any, fileName?: string, method?: string) => Promise; export declare const genApiFileUrl: (path: string, param?: any, fileName?: string) => string; export declare const genApiFileUrlAndToken: (path: string, param?: any, fileName?: string) => string; export interface ReqRCallProps { appName?: string; providerId?: string; providerName?: string; apiName?: string; reqData: any; } /** * 调用远程方法 */ export declare const reqRCall: ({ appName, providerId, providerName, apiName, reqData }: ReqRCallProps) => Promise; export default reqApi;