export interface ApiInterface { _id: string; title: string; path: string; method: string; req_params: any[]; req_body_form: any[]; req_headers: any[]; req_query: any[]; req_body_type: string; req_body_other: string; res_body_type: string; res_body: string; desc: string; markdown: string; } export interface SaveApiInterfaceParams { id?: string; catid: string; token?: string; method: string; path: string; title: string; project_id: string; req_params?: any[]; req_headers?: any[]; req_query?: any[]; req_body_type?: string; req_body_form?: any[]; req_body_other?: string; res_body_type?: string; res_body?: string; desc?: string; markdown?: string; switch_notice?: boolean; api_opened?: boolean; tag?: string[]; } export interface ProjectInfo { _id: number | string; name: string; desc: string; group_id: number; uid: number; basepath: string; } export interface CategoryInfo { _id: string; name: string; desc: string; project_id: number | string; uid: number; add_time: number; up_time: number; index: number; } export interface ApiSearchResultItem { _id: string; title: string; path: string; method: string; project_id: number | string; catid: string; add_time: number; up_time: number; project_name?: string; cat_name?: string; } export interface ApiResponse { errcode: number; errmsg: string; data: T; } export interface GetApiResponse extends ApiResponse { } export interface GetProjectResponse extends ApiResponse { } export interface GetCategoryListResponse extends ApiResponse { } export interface SaveApiResponse extends ApiResponse<{ _id: string; [key: string]: any; }> { } export interface ApiSearchResponse extends ApiResponse<{ total: number; count: number; list: ApiSearchResultItem[]; }> { }