import { AxiosRequestConfig, InternalAxiosRequestConfig, AxiosResponse } from 'axios'; import { CreateAxiosDefaults } from 'axios'; type ResponseDataWrapper = { data: T; code: number; msg: string; }; export type RequestInterceptors = (args: InternalAxiosRequestConfig) => InternalAxiosRequestConfig; export type ResponseInterceptors = (arg: AxiosResponse) => AxiosResponse; export type RequestMethod = 'postJson' | 'get' | 'post' | 'postForm'; export default class AxiosHttp { private readonly axiosInstance; constructor(config: CreateAxiosDefaults); requestInterceptors(callback: RequestInterceptors): void; responseInterceptors(callback?: ResponseInterceptors): void; private initInterceptors; request>(config: AxiosRequestConfig): Promise; get(url: string, params?: Record, config?: AxiosRequestConfig): Promise>; post(url: string, data?: Record, config?: AxiosRequestConfig): Promise>; postForm(url: string, data?: Record, config?: AxiosRequestConfig): Promise>; postJson(url: string, data?: Record, config?: AxiosRequestConfig): Promise>; download(url: string, params: Record): void; upload(url: string, file: File, fieldName?: string, config?: AxiosRequestConfig): Promise>; } export {};