接口说明
获取文档任务详情,对于子任务中md类型,支持返回富文本
请求API
| 名称 | 内容 |
|---|
| 请求方式 | GET |
| Action | DocumentTaskDetail |
请求参数
| 参数名 | 是否必填 | 类型 | 描述 |
|---|
| projectId | required | number | 文档项目id |
| taskId | required | number | 文档任务id |
| raw | optional | number | 是否返回纯文本/富文本,该字段目前只支持markdown。0: 不返回、1: 返回。default: 0 |
返回数据
// HTTP Status: 200
{
data: {
taskInfo: {
taskId: 32815279,
taskName: 'openapi测试',
state: 2, // 整个任务进度 1: 刚提交、2: 处理中、3: 完成、4: 停止、5: 删除
sourceLocale: 'zh',
targetLocale: ['en'],
deadline: '2021-11-05T10:00:00.000Z',
procedures: 1,
comment: '',
referenceDoc: {
referenceDocUrl: '',
referenceDocType: 0,
referenceDocName: ''
},
createdAt: '2021-11-04T05:02:38.000Z'
},
list: [
{
// 原文档信息
doc: {
docId: 15652713,
docName: 'test',
wordCount: 105,
url: 'https://lf3-cdn-tos.draftstatic.com/obj/ies.fe.starling/test_1636002157082.md',
locale: 'zh',
docType: 11
},
// 子任务列表
subtasks: [
{
taskId: 32815279,
subTaskId: 86596056,
targetLocale: 'en',
procedures: [
{
procedure: 1, // 翻译流程。1: 仅翻译、2: 仅校对、3:翻译+校对
state: 3, // 该子任务该流程进度 1: 刚提交、2: 处理中、3: 完成、4: 停止、5: 删除
deadline: '2021-11-05T10:00:00.000Z',
progress: 100, // 进度比例
comment: '',
targetDocId: 13086836,
createdAt: '2021-11-04T05:02:38.000Z',
updatedAt: '2021-11-04T05:03:43.000Z'
}
],
state: 3, // 该子任务进度 1: 刚提交、2: 处理中、3: 完成、4: 停止、5: 删除
targetDocId: 13086836,
targetDocUrl:
'https://lf3-cdn-tos.draftstatic.com/obj/ies.fe.starling/2a43d12fdf98c38ce23c014457cf2774.txt', // 翻译文档链接,与原文档同类型格式
sourceDocId: 0,
sourceDocUrl: '',
totalRuneCount: '0',
completedRuneCount: '0',
catType: 0,
catStage: 0,
rawContent:
'<blockquote><p>争做国内使用体验Z好的开源 Web 富文本编辑器!</p></blockquote>' // 翻译内容富文本,目前只支持md格式
}
]
}
]
}
}