think/packages/domains/lib/api/document.js

126 lines
3.0 KiB
JavaScript
Raw Normal View History

2022-05-23 05:05:59 +00:00
"use strict";
exports.__esModule = true;
exports.DocumentApiDefinition = void 0;
exports.DocumentApiDefinition = {
/**
* 搜索文档
*/
search: {
2022-05-23 08:20:56 +00:00
method: 'get',
2022-05-23 05:05:59 +00:00
server: 'search',
client: function () { return '/document/search'; }
},
/**
* 获取用户最近访问的文档
*/
recent: {
2022-05-23 08:20:56 +00:00
method: 'get',
2022-05-23 05:05:59 +00:00
server: 'recent',
client: function () { return '/document/recent'; }
},
/**
* 新建文档
*/
create: {
2022-05-23 08:20:56 +00:00
method: 'post',
2022-05-23 05:05:59 +00:00
server: 'create',
client: function () { return '/document/create'; }
},
/**
* 获取文档详情
*/
getDetailById: {
2022-05-23 08:20:56 +00:00
method: 'get',
2022-05-23 05:05:59 +00:00
server: 'detail/:id',
client: function (id) { return "/document/detail/".concat(id); }
},
/**
* 更新文档
*/
updateById: {
2022-05-23 08:20:56 +00:00
method: 'patch',
2022-05-23 05:05:59 +00:00
server: 'update/:id',
client: function (id) { return "/document/update/".concat(id); }
},
/**
* 获取文档版本记录
*/
getVersionById: {
2022-05-23 08:20:56 +00:00
method: 'get',
2022-05-23 05:05:59 +00:00
server: 'version/:id',
client: function (id) { return "/document/version/".concat(id); }
},
/**
* 获取文档成员
*/
getMemberById: {
2022-05-23 08:20:56 +00:00
method: 'get',
2022-05-23 05:05:59 +00:00
server: 'member/:id',
client: function (id) { return "/document/member/".concat(id); }
},
/**
* 添加文档成员
*/
addMemberById: {
2022-05-23 08:20:56 +00:00
method: 'post',
2022-05-23 05:05:59 +00:00
server: 'member/:id/add',
client: function (id) { return "/document/member/".concat(id, "/add"); }
},
/**
* 更新文档成员
*/
updateMemberById: {
2022-05-23 08:20:56 +00:00
method: 'patch',
2022-05-23 05:05:59 +00:00
server: 'member/:id/update',
client: function (id) { return "/document/member/".concat(id, "/update"); }
},
/**
* 删除文档成员
*/
deleteMemberById: {
2022-05-23 08:20:56 +00:00
method: 'post',
2022-05-23 05:05:59 +00:00
server: 'member/:id/delete',
client: function (id) { return "/document/member/".concat(id, "/delete"); }
},
/**
* 获取子文档
*/
getChildren: {
2022-05-23 08:20:56 +00:00
method: 'get',
2022-05-23 05:05:59 +00:00
server: 'children',
client: function () { return "/document/children"; }
},
/**
* 删除文档
*/
deleteById: {
2022-05-23 08:20:56 +00:00
method: 'delete',
2022-05-23 05:05:59 +00:00
server: 'delete/:id',
client: function (id) { return "/document/delete/".concat(id); }
},
/**
* 分享文档
*/
shareById: {
2022-05-23 08:20:56 +00:00
method: 'post',
2022-05-23 05:05:59 +00:00
server: 'share/:id',
client: function (id) { return "/document/share/".concat(id); }
},
/**
* 获取公开文档详情
*/
getPublicDetailById: {
2022-05-23 08:20:56 +00:00
method: 'get',
2022-05-23 05:05:59 +00:00
server: 'public/detail/:id',
client: function (id) { return "/document/public/detail/".concat(id); }
},
/**
* 获取公开文档的子文档
*/
getPublicChildren: {
2022-05-23 08:20:56 +00:00
method: 'get',
2022-05-23 05:05:59 +00:00
server: 'public/children',
client: function () { return "/document/public/children"; }
}
};