import type { DeepPartial } from '../types/helper'; import type { AxiosRequestConfig, AxiosResponse } from 'axios'; /** * 请求接口 */ export declare const defaultApiConfig: { /** * 文件上传 */ upload: ((data: Blob, config?: AxiosRequestConfig, extra?: Record) => Promise) | null; /** * 登录 */ login: ((data: any, config?: AxiosRequestConfig) => Promise) | null; /** * 修改密码 */ changePassword: ((data: any, config?: AxiosRequestConfig) => Promise) | null; /** * 退出 */ logout: ((config?: AxiosRequestConfig) => Promise) | null; /** * 刷新 access token */ refreshToken: ((config?: AxiosRequestConfig) => Promise) | null; /** * 判断是否为 access token 过期(有可能是refresh token过期) */ isAccessTokenExpired: ((response: AxiosResponse) => boolean) | null; }; export type ApiConfig = DeepPartial; export type RequiredApiConfig = typeof defaultApiConfig;