import { AxiosRequestHeaders } from 'axios'; export namespace App { export interface Option { label: string; value: string | number; } export interface Dict { [key: string]: any; } export enum AjaxMethod { GET = 'GET', POST = 'POST', } export enum AjaxContentType { 'application/x-www-form-urlencoded' = 'application/x-www-form-urlencoded', 'multipart/form-data' = 'multipart/form-data', 'application/json' = 'application/json', } export interface RequestConfig { url: string; method: AjaxMethod; headers: AxiosRequestHeaders, data?: Dict | string, params?: Dict, } export interface Ajax { url: string; 'local.url'?: string; method?: AjaxMethod; contentType?: AjaxContentType; notSwitchArrToStr?: boolean; switchArrToStrSeparator?: string; fixedParam?: Dict; locationSearchParam?: string[]; accept?: string[]; urlParams?: string[]; responseKey?: string; listStr?: boolean; acceptEmptyStr?: boolean } export enum ImageType { FILE, BASE64, } export interface ImageUploadConfig { type?: ImageType, id: string, logotext?: string, name?: string, } export namespace Image { export enum UploadStatus { FAIL, SUCCESS, LOADING, } export interface ImageInstance { id: string, src: string, status: UploadStatus, type?: string, file?: Blob, progress?: number, errorText?: string, } } }