mirror of
https://github.com/Teamlinker/Teamlinker.git
synced 2025-06-03 03:00:17 +00:00
191 lines
5.8 KiB
TypeScript
191 lines
5.8 KiB
TypeScript
import { ECommon_Model_Project_Member_Type } from '../model/project_member';
|
|
import { ICommon_Model_Project_Role } from '../model/project_role';
|
|
import { ICommon_Model_Project } from './../model/project';
|
|
import { ICommon_Model_Project_Module } from './../model/project_module';
|
|
import { ECommon_Services } from './../types';
|
|
import { ICommon_Route_Res_Project_CreateModule_Data, ICommon_Route_Res_Project_List, ICommon_Route_Res_Project_ListMemeber, ICommon_Route_Res_Project_ListTag } from './response';
|
|
import { ECommon_HttpApi_Method } from "./types";
|
|
const api={
|
|
baseUrl:"/project",
|
|
service:ECommon_Services.Cooperation,
|
|
routes:{
|
|
basic:{//项目基本信息
|
|
method:ECommon_HttpApi_Method.GET,
|
|
path:"/basic",
|
|
req:<{
|
|
projectId:string
|
|
}>{},
|
|
res:<ICommon_Model_Project>{}
|
|
},
|
|
create:{//创建项目
|
|
method:ECommon_HttpApi_Method.POST,
|
|
path:"/create",
|
|
req:<{
|
|
keyword :string,
|
|
name :string,
|
|
photo? :string,
|
|
description? :string,
|
|
}>{},
|
|
res:<ICommon_Model_Project>{}
|
|
},
|
|
edit:{//编辑项目
|
|
method:ECommon_HttpApi_Method.PUT,
|
|
path:"/edit",
|
|
req:<{
|
|
keyword? :string,
|
|
name? :string,
|
|
photo? :string,
|
|
description? :string,
|
|
projectId:string
|
|
}>{},
|
|
res:<ICommon_Model_Project>{}
|
|
},
|
|
remove:{//删除项目
|
|
method:ECommon_HttpApi_Method.DELETE,
|
|
path:"/remove",
|
|
req:<{
|
|
projectId:string
|
|
}>{},
|
|
res:{}
|
|
},
|
|
listTag:{//tag列表
|
|
method:ECommon_HttpApi_Method.GET,
|
|
path:"/tag/list",
|
|
req:<{
|
|
projectId:string,
|
|
page:number,
|
|
size:number,
|
|
keyword?:string
|
|
}>{},
|
|
res:<ICommon_Route_Res_Project_ListTag>{}
|
|
},
|
|
createTag:{//创建tag
|
|
method:ECommon_HttpApi_Method.POST,
|
|
path:"/tag/item",
|
|
req:<{
|
|
projectId:string,
|
|
name:string
|
|
}>{},
|
|
res:<{
|
|
id:string,
|
|
name:string
|
|
}>{}
|
|
},
|
|
editTag:{//编辑tag
|
|
method:ECommon_HttpApi_Method.PUT,
|
|
path:"/tag/item",
|
|
req:<{
|
|
tagId:string,
|
|
name:string
|
|
}>{},
|
|
res:<{
|
|
id:string,
|
|
name:string
|
|
}>{}
|
|
},
|
|
removeTag:{//删除tag
|
|
method:ECommon_HttpApi_Method.DELETE,
|
|
path:"/tag/item",
|
|
req:<{
|
|
tagId:string
|
|
}>{},
|
|
res:{}
|
|
},
|
|
listModule:{//module列表
|
|
method:ECommon_HttpApi_Method.GET,
|
|
path:"/module/list",
|
|
req:<{
|
|
projectId:string
|
|
}>{},
|
|
res:<ICommon_Route_Res_Project_CreateModule_Data[]>{}
|
|
},
|
|
createModule:{//创建module
|
|
method:ECommon_HttpApi_Method.POST,
|
|
path:"/module/item",
|
|
req:<{
|
|
projectId:string,
|
|
parentModuleId?:string,
|
|
name:string
|
|
}>{},
|
|
res:<ICommon_Model_Project_Module>{}
|
|
},
|
|
editModule:{//编辑module
|
|
method:ECommon_HttpApi_Method.PUT,
|
|
path:"/module/item",
|
|
req:<{
|
|
parentModuleId?:string,
|
|
name?:string
|
|
moduleId:string
|
|
}>{},
|
|
res:<ICommon_Model_Project_Module>{}
|
|
},
|
|
removeModule:{//删除module
|
|
method:ECommon_HttpApi_Method.DELETE,
|
|
path:"/module/item",
|
|
req:<{
|
|
moduleId:string
|
|
}>{},
|
|
res:{}
|
|
},
|
|
listMember:{//成员列表
|
|
method:ECommon_HttpApi_Method.GET,
|
|
path:"/member/list",
|
|
req:<{
|
|
projectId:string,
|
|
page:number,
|
|
size:number
|
|
}>{},
|
|
res:<ICommon_Route_Res_Project_ListMemeber>{}
|
|
},
|
|
addMember:{//添加成员(用户,团队)
|
|
method:ECommon_HttpApi_Method.POST,
|
|
path:"/member/item",
|
|
req:<{
|
|
projectId:string,
|
|
memberId:string,
|
|
type:ECommon_Model_Project_Member_Type,
|
|
roleId:string
|
|
}>{},
|
|
res:{}
|
|
},
|
|
editMember:{//编辑成员
|
|
method:ECommon_HttpApi_Method.PUT,
|
|
path:"/member/item",
|
|
req:<{
|
|
projectId:string,
|
|
memberId:string,
|
|
roleId:string
|
|
}>{},
|
|
res:{}
|
|
},
|
|
removeMember:{//删除成员
|
|
method:ECommon_HttpApi_Method.DELETE,
|
|
path:"/member/item",
|
|
req:<{
|
|
projectId:string,
|
|
memberId:string,
|
|
}>{},
|
|
res:{}
|
|
},
|
|
list:{
|
|
method:ECommon_HttpApi_Method.GET,
|
|
path:"/list",
|
|
req:<{
|
|
keyword?:string,
|
|
page:number,
|
|
size:number,
|
|
userId?:string
|
|
}>{},
|
|
res:<ICommon_Route_Res_Project_List>{},
|
|
},
|
|
roles:{
|
|
method:ECommon_HttpApi_Method.GET,
|
|
path:"/roles",
|
|
req:<{
|
|
projectId:string
|
|
}>{},
|
|
res:<ICommon_Model_Project_Role[]>{}
|
|
},
|
|
}
|
|
}
|
|
export=api |