UNPKG

@aliretail/react-materials-components

Version:
39 lines (38 loc) 1.18 kB
import Axios, { AxiosRequestConfig, Method } from 'axios'; export default Axios; export declare function getUrlParam(name: any): string; declare global { interface Window { devEnv?: string; } } interface ApiOptions { code: string; app?: string; method?: Method; data?: any; contentType?: string; headers?: any; onError?: (e: Error) => void; } export declare function request(options: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any>>; export declare function callApi(options: ApiOptions): Promise<any>; export declare function getAppCodeFromCtx(ctx: any): any; export declare const Status: { IMPORTING: string; DONE: string; ERROR: string; PARTIALSUCCESS: string; }; export declare const UploadStatus: { UPLOADING: string; DONE: string; ERROR: string; }; export declare function queryImportState(jobId: any, cb: any, retryCount?: number): void; export declare function excelImport(params: any, callback: any): Promise<void>; export declare function getTemplateUrl(service: any, app: any): string; export declare function getDownloadUrl({ path, name }: { path: any; name: any; }): string;