import { EpPropMergeType } from 'element-plus/es/utils';
import { Method, AxiosPromise, ResponseType } from 'axios';
import { DEFAULT_PAGE_KEY, DEFAULT_INFO_KEY, DEFAULT_LIST_KEY, DEFAULT_CREATE_KEY, DEFAULT_UPDATE_KEY, DEFAULT_APPEND_KEY, DEFAULT_MODIFY_KEY, DEFAULT_STATUS_KEY, DEFAULT_REMOVE_KEY } from '../config/api';
export type Request = (url: string, params?: any, method?: Method, contentType?: string, responseType?: ResponseType) => AxiosPromise;
export declare type Response = {
    code: number;
    status: EpPropMergeType<StringConstructor, '' | 'error' | 'success' | 'warning' | 'info', unknown>;
    message: string;
    data: any;
};
export type ApiMethod = (data?: any, method?: Method) => Promise<any>;
export declare type BasicApiMethod<T> = {
    [K in keyof T]: ApiMethod;
};
export declare type BasicApiUrls<T> = {
    [K in keyof T]: string;
};
export type BasicApi<T = {}> = BasicApiMethod<T> & {
    urls: BasicApiUrls<T>;
    primaryKey: string;
    requesting: string[];
    executing: string[];
    cacheKey: string[];
};
export interface DefaultRequestingApi {
    [DEFAULT_PAGE_KEY]: string;
    [DEFAULT_INFO_KEY]: string;
    [DEFAULT_LIST_KEY]: string;
}
export interface DefaultExecutingApi {
    [DEFAULT_CREATE_KEY]: string;
    [DEFAULT_UPDATE_KEY]: string;
    [DEFAULT_APPEND_KEY]: string;
    [DEFAULT_MODIFY_KEY]: string;
    [DEFAULT_STATUS_KEY]: string;
    [DEFAULT_REMOVE_KEY]: string;
}
export type RoutineApi<T extends DefaultRequestingApi & DefaultExecutingApi> = BasicApi<T>;
