meeglesdk 0.1.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +164 -7
  3. package/RELEASE.md +48 -0
  4. package/dist/client.d.ts +9 -0
  5. package/dist/client.js +10 -0
  6. package/dist/core/base-service.d.ts +2 -0
  7. package/dist/core/base-service.js +12 -0
  8. package/dist/core/request/handler.js +3 -2
  9. package/dist/core/request/types.d.ts +2 -0
  10. package/dist/helpers/event.d.ts +1 -1
  11. package/dist/helpers/event.js +14 -0
  12. package/dist/index.d.ts +14 -10
  13. package/dist/index.js +3 -0
  14. package/dist/service/aifield/index.d.ts +26 -0
  15. package/dist/service/aifield/index.js +27 -0
  16. package/dist/service/config/resource.d.ts +3 -3
  17. package/dist/service/config/resource.js +5 -1
  18. package/dist/service/config/role.d.ts +2 -1
  19. package/dist/service/config/role.js +2 -1
  20. package/dist/service/measure/index.d.ts +8 -0
  21. package/dist/service/measure/index.js +10 -0
  22. package/dist/service/measure/query.d.ts +31 -1
  23. package/dist/service/measure/query.js +31 -16
  24. package/dist/service/view/query.d.ts +10 -1
  25. package/dist/service/view/query.js +15 -0
  26. package/dist/service/workitem/attachment.d.ts +12 -12
  27. package/dist/service/workitem/attachment.js +8 -8
  28. package/dist/service/workitem/comment.d.ts +11 -11
  29. package/dist/service/workitem/comment.js +7 -7
  30. package/dist/service/workitem/search.d.ts +3 -7
  31. package/dist/service/workitem/search.js +8 -8
  32. package/dist/service/workitem/wbsDraft/index.d.ts +191 -0
  33. package/dist/service/workitem/wbsDraft/index.js +264 -0
  34. package/dist/service/workitem/wbsDraft.d.ts +191 -0
  35. package/dist/service/workitem/wbsDraft.js +394 -0
  36. package/dist/service/workitem/wbsProjectKeyResolver.d.ts +34 -0
  37. package/dist/service/workitem/wbsProjectKeyResolver.js +133 -0
  38. package/dist/service/workitem/wbsView/index.d.ts +46 -0
  39. package/dist/service/workitem/wbsView/index.js +51 -0
  40. package/dist/service/workitem/wbsView.d.ts +48 -0
  41. package/dist/service/workitem/wbsView.js +86 -0
  42. package/dist/service/workitem/workItem.d.ts +30 -7
  43. package/dist/service/workitem/workItem.js +43 -10
  44. package/dist/service/workitem/workflow.d.ts +2 -2
  45. package/dist/service/workitem/workflow.js +1 -0
  46. package/dist/service/workitem/workhour.d.ts +3 -3
  47. package/dist/types/aifield.d.ts +12 -0
  48. package/dist/types/aifield.js +4 -0
  49. package/dist/types/ainode.d.ts +70 -40
  50. package/dist/types/ainode.js +0 -3
  51. package/dist/types/common.d.ts +7 -1
  52. package/dist/types/config.d.ts +85 -22
  53. package/dist/types/event.d.ts +176 -9
  54. package/dist/types/index.d.ts +2 -0
  55. package/dist/types/index.js +2 -0
  56. package/dist/types/measure.d.ts +7 -0
  57. package/dist/types/tenant.d.ts +17 -4
  58. package/dist/types/user.d.ts +5 -1
  59. package/dist/types/view.d.ts +6 -0
  60. package/dist/types/workitem.d.ts +1413 -159
  61. package/package.json +8 -4
@@ -97,6 +97,8 @@ export interface WorkflowNode {
97
97
  owner_usage_mode?: OwnerUsageMode;
98
98
  /** 是否差异化排期 */
99
99
  different_schedule?: boolean;
100
+ /** 节点自定义字段 */
101
+ node_custom_fields?: FieldValuePair[];
100
102
  }
101
103
  /**
102
104
  * 状态流节点
@@ -225,6 +227,8 @@ export interface QueryWorkItemExpand {
225
227
  relation_fields_detail?: boolean;
226
228
  /** 是否需要复合字段组标识 */
227
229
  need_group_uuid_for_compound?: boolean;
230
+ /** 是否需要子任务父级信息 */
231
+ need_sub_task_parent?: boolean;
228
232
  }
229
233
  /**
230
234
  * 获取工作项详情请求
@@ -237,6 +241,14 @@ export interface QueryWorkItemRequest {
237
241
  /** 扩展查询选项 */
238
242
  expand?: QueryWorkItemExpand;
239
243
  }
244
+ /**
245
+ * 创建工作项必填模式
246
+ */
247
+ export type WorkItemCreateRequiredMode = 0 | 1;
248
+ /**
249
+ * 创建工作项角色默认值计算模式
250
+ */
251
+ export type WorkItemCreateRoleMode = 0 | 1;
240
252
  /**
241
253
  * 创建工作项请求
242
254
  */
@@ -254,7 +266,13 @@ export interface CreateWorkItemRequest {
254
266
  * - 0: 不校验必填项(默认)
255
267
  * - 1: 校验新建页必填项,未填字段返回创建失败并提示哪些字段未填
256
268
  */
257
- required_mode?: number;
269
+ required_mode?: WorkItemCreateRequiredMode;
270
+ /**
271
+ * 角色可见性计算模式
272
+ * - 0: 不使用角色默认值(默认)
273
+ * - 1: 新建角色未传值时,使用配置侧的角色默认值
274
+ */
275
+ role_mode?: WorkItemCreateRoleMode;
258
276
  }
259
277
  /**
260
278
  * 更新工作项请求
@@ -270,6 +288,17 @@ export interface DeleteWorkItemRequest {
270
288
  /** 工作项 ID */
271
289
  work_item_id: number;
272
290
  }
291
+ /**
292
+ * 冻结/解冻工作项请求
293
+ */
294
+ export interface FreezeWorkItemRequest {
295
+ /** 空间 ID 或域名 */
296
+ project_key: string;
297
+ /** 工作项 ID */
298
+ work_item_id: number;
299
+ /** true 冻结,false 解冻 */
300
+ is_frozen: boolean;
301
+ }
273
302
  /**
274
303
  * 字段选项
275
304
  */
@@ -280,8 +309,18 @@ export interface FieldOption {
280
309
  label: string;
281
310
  /** 是否默认选中 */
282
311
  is_default?: boolean;
312
+ /** 选项颜色 */
313
+ color?: string;
314
+ /** 选项排序 */
315
+ order?: number;
283
316
  /** 子选项(级联) */
284
317
  children?: FieldOption[];
318
+ /** 是否禁用 */
319
+ is_disabled?: number;
320
+ /** 是否可见 */
321
+ is_visibility?: number;
322
+ /** 所属工作项类型 key */
323
+ work_item_type_key?: string;
285
324
  }
286
325
  /**
287
326
  * 字段元数据
@@ -309,6 +348,44 @@ export interface FieldMeta {
309
348
  * API 直接返回字段数组
310
349
  */
311
350
  export type GetWorkItemMetaResponse = FieldMeta[];
351
+ /**
352
+ * 获取工作项字段可选选项请求
353
+ */
354
+ export interface GetFieldOptionsRequest {
355
+ /** 空间 ID 或域名 */
356
+ project_key: string;
357
+ /** 工作项类型 key */
358
+ work_item_type_key: string;
359
+ /** 工作项 ID */
360
+ work_item_id: number;
361
+ /** 字段 key */
362
+ field_key: string;
363
+ /** 查询的第一个选项 key,用于分页 */
364
+ first_option_key?: string;
365
+ }
366
+ /**
367
+ * 获取工作项字段可选选项响应
368
+ */
369
+ export interface GetFieldOptionsResponse {
370
+ /** 可选选项 */
371
+ options?: FieldOption[];
372
+ /** 是否允许用户添加选项 */
373
+ free_add?: boolean;
374
+ /** 是否有更多 */
375
+ has_more?: boolean;
376
+ /** 字段 key */
377
+ field_key?: string;
378
+ /** 字段名称 */
379
+ field_name?: string;
380
+ /** 字段类型 */
381
+ field_type?: string;
382
+ /** 级联字段选项类型 */
383
+ level_mode?: string;
384
+ /** 字段别名 */
385
+ field_alias?: string;
386
+ /** 级联字段可选层级 */
387
+ level_class?: string;
388
+ }
312
389
  /** 操作者类型 */
313
390
  export type OperatorType = 'user' | 'auto' | 'system' | 'calc_field' | 'plugin' | 'others';
314
391
  /** 操作渠道类型 */
@@ -428,9 +505,9 @@ export interface GetOperationRecordsResponse {
428
505
  /** 复合字段操作类型 */
429
506
  export type CompoundFieldAction = 'add' | 'update' | 'delete';
430
507
  /**
431
- * 更新复合字段请求
508
+ * 按组更新复合字段值请求
432
509
  */
433
- export interface UpdateCompoundFieldRequest {
510
+ export interface UpdateCompoundFieldValueRequest {
434
511
  /** 空间 ID 或域名 */
435
512
  project_key: string;
436
513
  /** 工作项 ID */
@@ -484,18 +561,25 @@ export interface DownloadAttachmentRequest {
484
561
  /**
485
562
  * 删除附件请求参数
486
563
  */
487
- export interface DeleteAttachmentRequest {
564
+ export type DeleteAttachmentFieldSelector = {
565
+ /** 附件字段 key(与 field_alias 二选一) */
566
+ field_key: string;
567
+ /** 附件字段对接标识(与 field_key 二选一) */
568
+ field_alias?: never;
569
+ } | {
570
+ /** 附件字段 key(与 field_alias 二选一) */
571
+ field_key?: never;
572
+ /** 附件字段对接标识(与 field_key 二选一) */
573
+ field_alias: string;
574
+ };
575
+ export type DeleteAttachmentRequest = {
488
576
  /** 空间 ID 或域名 */
489
577
  project_key: string;
490
578
  /** 工作项 ID */
491
- work_item_id: number;
492
- /** 附件字段 key(与 field_alias 二选一) */
493
- field_key?: string;
494
- /** 附件字段对接标识(与 field_key 二选一) */
495
- field_alias?: string;
579
+ work_item_id: number | string;
496
580
  /** 要删除的附件 UUID 列表 */
497
581
  uuids: string[];
498
- }
582
+ } & DeleteAttachmentFieldSelector;
499
583
  /**
500
584
  * 创建子任务请求
501
585
  */
@@ -552,10 +636,14 @@ export interface CompleteRollbackSubtaskRequest {
552
636
  assignee?: string[];
553
637
  /** 子任务角色负责人列表(角色联动模式使用) */
554
638
  role_assignee?: RoleOwner[];
639
+ /** 单个估分排期信息 */
640
+ schedule?: Schedule;
555
641
  /** 估分排期信息 */
556
642
  schedules?: Schedule[];
557
643
  /** 交付物字段列表 */
558
644
  deliverable?: FieldValuePair[];
645
+ /** 目标更新的字段列表 */
646
+ update_fields?: FieldValuePair[];
559
647
  /** 备注信息 */
560
648
  note?: string;
561
649
  }
@@ -639,6 +727,12 @@ export interface NodeTask {
639
727
  id: string;
640
728
  /** 节点 state_key */
641
729
  state_key: string;
730
+ /** 节点名称 */
731
+ node_name?: string;
732
+ /** 流程模板 ID */
733
+ template_id?: number;
734
+ /** 流程模板版本 */
735
+ version?: number;
642
736
  /** 子任务列表 */
643
737
  sub_tasks: SubTask[];
644
738
  }
@@ -694,7 +788,7 @@ export interface Comment {
694
788
  /** 评论 ID(字符串格式,避免大整数精度丢失) */
695
789
  id: string;
696
790
  /** 评论所属工作项 ID */
697
- work_item_id: number;
791
+ work_item_id: number | string;
698
792
  /** 评论所属工作项类型 */
699
793
  work_item_type_key: string;
700
794
  /** 评论创建时间,毫秒精度 */
@@ -710,34 +804,98 @@ export interface Comment {
710
804
  * 富文本元素(用于创建/更新评论)
711
805
  * 参考: 富文本格式
712
806
  */
807
+ export interface RichTextAttrs {
808
+ /** 背景色 */
809
+ backgroundColor?: string;
810
+ /** 是否加粗 */
811
+ bold?: string | boolean;
812
+ /** 字体色 */
813
+ fontColor?: string;
814
+ /** 字体大小 */
815
+ fontSize?: string;
816
+ /** 是否斜体 */
817
+ italic?: string | boolean;
818
+ /** 是否删除线 */
819
+ strikethrough?: string | boolean;
820
+ /** 是否下划线 */
821
+ underline?: string | boolean;
822
+ /** 超链接标题 */
823
+ title?: string;
824
+ /** 链接地址 */
825
+ url?: string;
826
+ /** 图片地址 */
827
+ src?: string;
828
+ /** 图片宽度 */
829
+ width?: string | number;
830
+ /** 兼容新增富文本属性 */
831
+ [key: string]: unknown;
832
+ }
833
+ /**
834
+ * 富文本行属性
835
+ */
836
+ export interface RichTextLineAttrs {
837
+ /** 缩进层级 */
838
+ indent?: string | number;
839
+ /** 对齐方式 */
840
+ align?: string;
841
+ /** 是否引用 */
842
+ blockquote?: string | boolean;
843
+ /** 列表标识 */
844
+ list?: string;
845
+ /** 兼容新增行属性 */
846
+ [key: string]: unknown;
847
+ }
848
+ /**
849
+ * 富文本表格单元格
850
+ */
851
+ export interface RichTextTableCell {
852
+ /** 行号 */
853
+ row: number;
854
+ /** 列号 */
855
+ col: number;
856
+ /** 单元格内容 */
857
+ cellContent: RichTextElement[];
858
+ }
859
+ /**
860
+ * 富文本表格信息
861
+ */
862
+ export interface RichTextTableInfo {
863
+ /** 行数 */
864
+ rowSize: number;
865
+ /** 列数 */
866
+ colSize: number;
867
+ /** 单元格列表 */
868
+ cellList: RichTextTableCell[];
869
+ }
713
870
  export interface RichTextElement {
714
- /** 元素类型: paragraph, text, image 等 */
871
+ /** 元素类型 */
715
872
  type: string;
716
873
  /** 文本内容(type=text 时使用) */
717
874
  text?: string;
718
875
  /** 元素属性 */
719
- attrs?: Record<string, unknown>;
876
+ attrs?: RichTextAttrs;
720
877
  /** 子元素(type=paragraph 时使用) */
721
878
  content?: RichTextElement[];
879
+ /** 行属性 */
880
+ lineAttrs?: RichTextLineAttrs;
881
+ /** 表格信息 */
882
+ tableInfo?: RichTextTableInfo;
722
883
  }
723
- /**
724
- * 创建评论请求
725
- */
726
- export interface CreateCommentRequest {
884
+ export type CommentContentRequest = {
727
885
  /** 评论内容,仅支持原生文本(与 rich_text 二选一,都有值时 rich_text 优先) */
728
- content?: string;
886
+ content: string;
729
887
  /** 评论内容,支持富文本格式(与 content 二选一,都有值时 rich_text 优先) */
730
888
  rich_text?: RichTextElement[];
731
- }
732
- /**
733
- * 更新评论请求
734
- */
735
- export interface UpdateCommentRequest {
889
+ } | {
736
890
  /** 评论内容,仅支持原生文本(与 rich_text 二选一,都有值时 rich_text 优先) */
737
891
  content?: string;
738
892
  /** 评论内容,支持富文本格式(与 content 二选一,都有值时 rich_text 优先) */
739
- rich_text?: RichTextElement[];
740
- }
893
+ rich_text: RichTextElement[];
894
+ };
895
+ /** 创建评论请求 */
896
+ export type CreateCommentRequest = CommentContentRequest;
897
+ /** 更新评论请求 */
898
+ export type UpdateCommentRequest = CommentContentRequest;
741
899
  /**
742
900
  * 查询评论请求参数
743
901
  */
@@ -892,14 +1050,6 @@ export interface SearchWorkItemsByParamsRequest {
892
1050
  fields?: string[];
893
1051
  expand?: QueryWorkItemExpand;
894
1052
  }
895
- /**
896
- * 通用搜索数据源
897
- * 接口: /open_api/view_search/universal_search
898
- */
899
- export interface UniversalSearchDataSource {
900
- project_key: string;
901
- work_item_type_keys: string;
902
- }
903
1053
  /**
904
1054
  * 通用搜索分页请求
905
1055
  */
@@ -917,7 +1067,8 @@ export interface UniversalSearchPagination extends SearchAfterPagination {
917
1067
  * 接口: /open_api/view_search/universal_search
918
1068
  */
919
1069
  export interface UniversalSearchRequest {
920
- data_sources: UniversalSearchDataSource[];
1070
+ project_key: string;
1071
+ work_item_type_key: string;
921
1072
  search_group: SearchGroup;
922
1073
  field_selected?: string[];
923
1074
  pagination?: UniversalSearchPaginationRequest;
@@ -926,7 +1077,7 @@ export interface UniversalSearchRequest {
926
1077
  * 通用搜索响应
927
1078
  */
928
1079
  export interface UniversalSearchResponse {
929
- data: WorkItemInfo[];
1080
+ datas: WorkItemInfo[];
930
1081
  pagination: UniversalSearchPagination;
931
1082
  }
932
1083
  /**
@@ -946,7 +1097,7 @@ export interface SearchByRelationRequest {
946
1097
  relation_key: string;
947
1098
  /** 关联类型:0=关联字段ID,1=关联字段对接标识 */
948
1099
  relation_type?: RelationType;
949
- /** 分页大小,最大 200 */
1100
+ /** 分页大小,最大 50 */
950
1101
  page_size?: number;
951
1102
  /** 页码,从 1 开始 */
952
1103
  page_num?: number;
@@ -966,6 +1117,8 @@ export interface CompositiveSearchRequest {
966
1117
  query: string;
967
1118
  /** 空间 key 列表(限定搜索范围) */
968
1119
  project_keys?: string[];
1120
+ /** 空间域名列表(限定搜索范围) */
1121
+ simple_names?: string[];
969
1122
  /** 工作项类型列表(query_type=workitem 时生效) */
970
1123
  query_sub_type?: string[];
971
1124
  /** 分页大小,默认 50 */
@@ -1175,6 +1328,19 @@ export interface NodeOperateRequest {
1175
1328
  /** 角色负责人(节点与角色绑定时使用) */
1176
1329
  role_assignee?: RoleOwner[];
1177
1330
  }
1331
+ /**
1332
+ * 排期联动子项规则
1333
+ */
1334
+ export interface ScheduleConstraintRule {
1335
+ /** 是否联动节点 */
1336
+ node?: boolean;
1337
+ /** 是否联动任务 */
1338
+ sub_task?: boolean;
1339
+ /** 是否联动子流程 */
1340
+ sub_process_node?: boolean;
1341
+ /** 按工作项类型区分的 WBS 子实例联动配置 */
1342
+ wbs_sub_instance_type?: Record<string, boolean>;
1343
+ }
1178
1344
  /**
1179
1345
  * 更新节点请求(节点流工作项)
1180
1346
  * 接口: PUT /open_api/:project_key/workflow/:work_item_type_key/:work_item_id/node/:node_id
@@ -1190,6 +1356,10 @@ export interface UpdateNodeRequest {
1190
1356
  fields?: FieldValuePair[];
1191
1357
  /** 角色负责人(节点与角色绑定时使用) */
1192
1358
  role_assignee?: RoleOwner[];
1359
+ /** 排期联动子项规则 */
1360
+ schedule_constraint_rule?: ScheduleConstraintRule;
1361
+ /** 节点自定义字段 */
1362
+ node_custom_fields?: FieldValuePair[];
1193
1363
  }
1194
1364
  /** 流转必填信息查询模式 */
1195
1365
  export type TransitionRequiredMode = 'unfinished';
@@ -1309,6 +1479,8 @@ export interface WbsViewQueryParams {
1309
1479
  export interface WbsViewExpand {
1310
1480
  /** 是否需要融合交付物信息 */
1311
1481
  need_union_deliverable?: boolean;
1482
+ /** 是否需要计划表自定义列聚合字段 */
1483
+ need_schedule_table_agg?: boolean;
1312
1484
  /** 是否需要 WBS 链路层级信息 */
1313
1485
  need_wbs_relation_chain_path?: boolean;
1314
1486
  /** 是否需要 WBS 链路实例信息 */
@@ -1347,175 +1519,1253 @@ export interface WbsWorkflowNode {
1347
1519
  }>;
1348
1520
  }
1349
1521
  /**
1350
- * WBS 工作项视图(行业专版)
1522
+ * WBS 视图关联子工作项
1523
+ */
1524
+ export interface WbsViewRelatedSubWorkItem {
1525
+ /** 工作项 ID */
1526
+ id?: number;
1527
+ /** 工作项名称 */
1528
+ name?: string;
1529
+ /** 工作项类型 key */
1530
+ work_item_type_key?: string;
1531
+ /** 空间 key */
1532
+ project_key?: string;
1533
+ /** 字段聚合值 */
1534
+ field_values?: FieldValuePair[];
1535
+ /** 融合交付物 */
1536
+ union_deliverable?: Array<Record<string, unknown>>;
1537
+ /** 模板 key */
1538
+ template_key?: string;
1539
+ /** 模板版本 */
1540
+ template_version?: number;
1541
+ }
1542
+ /**
1543
+ * WBS 视图响应(行业专版)
1351
1544
  * 接口: GET /open_api/:project_key/work_item/:work_item_type_key/:work_item_id/wbs_view
1352
1545
  */
1353
- export interface WbsWorkItem {
1546
+ export interface WbsViewResponse {
1354
1547
  /** 工作项 ID */
1355
- id: number;
1548
+ id?: number;
1356
1549
  /** 工作项名称 */
1357
- name: string;
1550
+ name?: string;
1358
1551
  /** 工作项类型 key */
1359
- work_item_type_key: string;
1552
+ work_item_type_key?: string;
1360
1553
  /** 空间 key */
1361
- project_key: string;
1554
+ project_key?: string;
1555
+ /** 模板 key */
1556
+ template_key?: string;
1557
+ /** 模板版本 */
1558
+ template_version?: number;
1559
+ /** 模板名称 */
1560
+ template_name?: string;
1561
+ /** 模板 ID */
1562
+ template_id?: string;
1362
1563
  /** WBS 工作流节点列表 */
1363
1564
  workflow_nodes?: WbsWorkflowNode[];
1565
+ /** 节点连接信息 */
1566
+ connections?: WbsExpandConnection[];
1567
+ /** 父工作项信息 */
1568
+ related_parent_work_item?: WbsRelatedParentWorkItem;
1569
+ /** 子工作项信息 */
1570
+ related_sub_work_items?: WbsViewRelatedSubWorkItem[];
1364
1571
  /** WBS 链路层级信息 */
1365
- wbs_relation_chain_path?: string[];
1572
+ relation_chain_path?: WbsRelationChainPathInfo;
1366
1573
  /** WBS 链路实例信息 */
1367
- wbs_relation_chain_entity?: Array<{
1368
- work_item_id: number;
1369
- work_item_type_key: string;
1370
- project_key: string;
1371
- }>;
1574
+ relation_chain_entity?: WbsRelationChainEntityInfo;
1575
+ /** 兼容接口直接返回的链路层级字段 */
1576
+ wbs_relation_chain_path?: WbsRelationChainPathItem[];
1577
+ /** 兼容接口直接返回的链路实例字段 */
1578
+ wbs_relation_chain_entity?: WbsRelationChainEntityItem[];
1372
1579
  }
1373
1580
  /**
1374
- * 工时关联对象类型
1581
+ * 查询 WBS 草稿请求
1375
1582
  */
1376
- export type WorkHourResourceType = 'node' | 'sub_task';
1583
+ export interface QueryWbsDraftRequest {
1584
+ /** 空间 ID */
1585
+ project_key: string;
1586
+ /** 工作项 ID */
1587
+ work_item_id: number;
1588
+ /** 工作项类型 key */
1589
+ work_item_type_key: string;
1590
+ /**
1591
+ * 是否在未命中时初始化草稿
1592
+ * 查询接口本身承担“读不到时可转创建”的能力,因此单独保留这个开关。
1593
+ */
1594
+ need_init?: boolean;
1595
+ }
1377
1596
  /**
1378
- * 创建工时记录条目
1597
+ * 创建 WBS 草稿请求
1379
1598
  */
1380
- export interface CreateWorkingHourRecord {
1381
- /** 关联对象类型 */
1382
- resource_type: WorkHourResourceType;
1383
- /** 关联对象 ID */
1384
- resource_id: string;
1385
- /** 实际工时(单位:天) */
1386
- work_time: number | string;
1387
- /** 工作描述 */
1388
- work_description?: string;
1599
+ export interface CreateWbsDraftRequest {
1600
+ /** 空间 ID */
1601
+ project_key: string;
1602
+ /** 工作项类型 key */
1603
+ work_item_type_key: string;
1604
+ /** 工作项 ID */
1605
+ work_item_id: number;
1389
1606
  }
1390
1607
  /**
1391
- * 创建工时登记记录请求
1608
+ * 创建 WBS 草稿返回值
1392
1609
  */
1393
- export interface CreateWorkHourRecordRequest {
1394
- /** 工作开始日期(毫秒时间戳) */
1395
- work_begin_date: number;
1396
- /** 工作结束日期(毫秒时间戳) */
1397
- work_end_date: number;
1398
- /** 是否包含节假日 */
1399
- include_holidays: boolean;
1400
- /** 待创建工时记录列表 */
1401
- working_hour_records: CreateWorkingHourRecord[];
1610
+ export interface CreateWbsDraftResponse {
1611
+ draft_meta: {
1612
+ draft_id: string;
1613
+ /**
1614
+ * 创建进度
1615
+ * 0-未知状态;1-创建中;2-创建完成
1616
+ */
1617
+ draft_status: 0 | 1 | 2 | number;
1618
+ };
1402
1619
  }
1403
1620
  /**
1404
- * 更新工时记录条目
1621
+ * 重置 WBS 草稿请求
1405
1622
  */
1406
- export interface UpdateWorkingHourRecord {
1407
- /** 工时记录 ID */
1408
- id: number;
1409
- /** 实际工时 */
1410
- work_time?: number | string;
1411
- /** 工作描述 */
1412
- work_description?: string;
1623
+ export interface ResetWbsDraftRequest {
1624
+ /** 空间 ID */
1625
+ project_key: string;
1626
+ /** 工作项 ID */
1627
+ work_item_id: number;
1628
+ /** 草稿 ID */
1629
+ draft_id: string;
1413
1630
  }
1414
1631
  /**
1415
- * 更新工时登记记录请求
1632
+ * 发布 WBS 草稿请求
1416
1633
  */
1417
- export interface UpdateWorkHourRecordRequest {
1418
- /** 待更新记录列表 */
1419
- working_hour_records: UpdateWorkingHourRecord[];
1634
+ export interface PublishWbsDraftRequest {
1635
+ /** 空间 ID */
1636
+ project_key: string;
1637
+ /** 工作项 ID */
1638
+ work_item_id: number;
1639
+ /** 草稿 ID */
1640
+ draft_id: string;
1420
1641
  }
1421
1642
  /**
1422
- * 删除工时登记记录请求
1643
+ * 完成创建草稿审核请求
1644
+ *
1645
+ * 平台把这条链路独立成单独接口,因此这里单独建模,
1646
+ * 避免后续把 commit 相关字段继续塞进通用发布接口里。
1423
1647
  */
1424
- export interface DeleteWorkHourRecordRequest {
1425
- /** 工时记录 ID 列表 */
1426
- working_hour_record_ids: number[];
1648
+ export interface CompleteCreateAuditDraftRequest {
1649
+ /** 空间 ID */
1650
+ project_key: string;
1651
+ /** 工作项 ID */
1652
+ work_item_id: number;
1653
+ /** 草稿 ID */
1654
+ draft_id: string;
1655
+ /** 提交版本 ID */
1656
+ commit_id: string;
1427
1657
  }
1428
1658
  /**
1429
- * 查询工时登记记录请求
1659
+ * 更新草稿冻结行请求
1430
1660
  */
1431
- export interface ListWorkHourRecordsRequest {
1661
+ export interface UpdateWbsDraftFrozenRowsRequest {
1432
1662
  /** 空间 ID */
1433
1663
  project_key: string;
1434
- /** 工作项类型 key */
1435
- work_item_type_key: string;
1436
1664
  /** 工作项 ID */
1437
1665
  work_item_id: number;
1438
- /** 页码 */
1439
- page_num?: number;
1440
- /** 分页大小 */
1441
- page_size?: number;
1666
+ /** 草稿 ID */
1667
+ draft_id: string;
1668
+ /** 冻结行更新类型 */
1669
+ update_type: number;
1670
+ /** 提交版本 ID */
1671
+ commit_id: string;
1442
1672
  }
1443
1673
  /**
1444
- * 工时登记记录
1674
+ * 基于提交版本发布 WBS 草稿请求
1445
1675
  */
1446
- export interface WorkHourRecord {
1447
- /** 工时记录 ID */
1448
- id: number;
1449
- /** 工作日期(毫秒时间戳) */
1450
- work_date?: number;
1451
- /** 实际工时 */
1452
- work_time?: number;
1453
- /** 创建时间 */
1454
- created_at?: number;
1455
- /** 更新时间 */
1456
- updated_at?: number;
1457
- /** 关联对象 ID */
1458
- resource_id?: string;
1459
- /** 关联对象名称 */
1460
- resource_name?: string;
1461
- /** 关联对象类型 */
1462
- resource_type?: WorkHourResourceType;
1463
- /** 工时归属人 user_key */
1464
- work_user_key?: string;
1465
- /** 工作描述 */
1466
- work_description?: string;
1467
- /** 关联工作项 ID */
1468
- related_work_item_id?: number;
1469
- /** 关联工作项名称 */
1470
- related_work_item_name?: string;
1471
- /** 关联工作项类型 */
1472
- related_work_item_type_key?: string;
1676
+ export interface PublishWbsDraftByCommitRequest {
1677
+ /** 空间 ID */
1678
+ project_key: string;
1679
+ /** 工作项 ID */
1680
+ work_item_id: number;
1681
+ /** 草稿 ID */
1682
+ draft_id: string;
1683
+ /** 提交版本 ID */
1684
+ commit_id: string;
1473
1685
  }
1474
1686
  /**
1475
- * 评审结论标签
1687
+ * 审批拒绝后切回草稿请求
1476
1688
  */
1477
- export interface ReviewConclusionOptionItem {
1478
- /** 标签 key */
1479
- key: string;
1480
- /** 标签名称 */
1481
- label: string;
1482
- /** 原始标签名称 */
1483
- origin_label?: string;
1689
+ export interface SwitchBackWbsDraftRequest {
1690
+ /** 空间 ID */
1691
+ project_key: string;
1692
+ /** 工作项 ID */
1693
+ work_item_id: number;
1694
+ /** 草稿 ID */
1695
+ draft_id: string;
1696
+ /** 提交版本 ID */
1697
+ commit_id: string;
1484
1698
  }
1485
1699
  /**
1486
- * 评审意见(个人)
1700
+ * 查询 WBS 草稿子工作项配置请求
1487
1701
  */
1488
- export interface ReviewOwnerOpinionInfo {
1489
- /** 用户 user_key */
1490
- owner: string;
1491
- /** 评审意见 */
1492
- finished_opinion_result: string;
1702
+ export interface GetWbsDraftSubWorkItemConfRequest {
1703
+ /** 草稿 ID */
1704
+ draft_id: string;
1705
+ /** 工作项 ID */
1706
+ work_item_id: number;
1707
+ /** 节点 UUID */
1708
+ node_uuid: string;
1709
+ /** 空间 ID */
1710
+ project_key: string;
1493
1711
  }
1494
1712
  /**
1495
- * 评审意见(汇总)
1713
+ * WBS 草稿中的顺序引用
1496
1714
  */
1497
- export interface ReviewOpinionInfo {
1498
- /** 汇总意见 */
1499
- finished_opinion_result?: string;
1500
- /** 人员意见 */
1501
- owners_finished_opinion_result?: ReviewOwnerOpinionInfo[];
1715
+ export interface WbsDraftOrderInfo {
1716
+ value_type?: string;
1717
+ vaule?: string;
1718
+ path?: string;
1502
1719
  }
1503
1720
  /**
1504
- * 评审结论(个人)
1721
+ * WBS 草稿中的前后序信息
1505
1722
  */
1506
- export interface ReviewOwnerConclusionInfo {
1507
- /** 用户 user_key */
1508
- owner: string;
1509
- /** 结论 */
1510
- finished_conclusion_result: ReviewConclusionOptionItem;
1723
+ export interface WbsDraftSeqOrderInfo {
1724
+ pre?: WbsDraftOrderInfo[];
1725
+ post?: WbsDraftOrderInfo[];
1726
+ parent?: WbsDraftOrderInfo;
1511
1727
  }
1512
1728
  /**
1513
- * 评审结论(汇总)
1729
+ * WBS 草稿依赖信息
1514
1730
  */
1515
- export interface ReviewConclusionInfo {
1516
- /** 汇总结论 */
1517
- finished_conclusion_result?: ReviewConclusionOptionItem;
1518
- /** 人员结论 */
1731
+ export interface WbsDraftDependencyInfo {
1732
+ work_item_id?: number;
1733
+ state_key?: string;
1734
+ name?: string;
1735
+ type?: string;
1736
+ }
1737
+ /**
1738
+ * WBS 草稿相对排期引用
1739
+ */
1740
+ export interface WbsDraftScheduleReferenceValue {
1741
+ work_item_id?: number;
1742
+ state_key?: string;
1743
+ name?: string;
1744
+ type?: string;
1745
+ }
1746
+ /**
1747
+ * WBS 草稿负责人配置
1748
+ */
1749
+ export interface WbsDraftOwnerConf {
1750
+ owner_usage_mode?: string;
1751
+ owner_roles?: string[];
1752
+ user_keys?: string[];
1753
+ }
1754
+ /**
1755
+ * WBS 节点角色负责人
1756
+ */
1757
+ export interface WbsDraftNodeRoleOwners {
1758
+ path?: string;
1759
+ work_item_id?: number;
1760
+ name?: string;
1761
+ role_owners?: RoleOwner[];
1762
+ work_item_type_key?: string;
1763
+ }
1764
+ /**
1765
+ * WBS 草稿字段交付物
1766
+ */
1767
+ export interface WbsDraftFieldDeliverableItem {
1768
+ field_info?: FieldValuePair;
1769
+ placeholder?: string;
1770
+ remark?: string;
1771
+ status?: number;
1772
+ }
1773
+ /**
1774
+ * WBS 草稿实例交付物
1775
+ */
1776
+ export interface WbsDraftInstanceDeliverableItem {
1777
+ name?: string;
1778
+ work_item_id?: number;
1779
+ deletable?: boolean;
1780
+ must_complete?: boolean;
1781
+ state_key?: string;
1782
+ state_name?: string;
1783
+ owners?: string[];
1784
+ remark?: string;
1785
+ }
1786
+ /**
1787
+ * WBS 草稿融合交付物
1788
+ */
1789
+ export interface WbsDraftUnionDeliverable {
1790
+ field_deliverables?: WbsDraftFieldDeliverableItem[];
1791
+ instance_deliverables?: WbsDraftInstanceDeliverableItem[];
1792
+ }
1793
+ /**
1794
+ * WBS 草稿节点/子项
1795
+ */
1796
+ export interface WbsDraftWorkItem {
1797
+ node_uuid?: string;
1798
+ work_item_id?: number;
1799
+ type?: string;
1800
+ wbs_status?: string;
1801
+ wbs_status_map?: Record<string, string>;
1802
+ sub_work_item?: WbsDraftWorkItem[];
1803
+ name?: string;
1804
+ deliverable?: FieldValuePair[];
1805
+ schedule?: Schedule;
1806
+ schedules?: Schedule[];
1807
+ points?: number;
1808
+ role_owners?: RoleOwner[];
1809
+ work_item_type_key?: string;
1810
+ milestone?: boolean;
1811
+ connections?: Connection[];
1812
+ state_key?: string;
1813
+ start_time?: number;
1814
+ finish_time?: number;
1815
+ owner_conf?: WbsDraftOwnerConf;
1816
+ is_draft_create?: boolean;
1817
+ need_actual_work_time?: boolean;
1818
+ node_wbs_role_owners?: WbsDraftNodeRoleOwners[];
1819
+ task_type?: number;
1820
+ uuid_in_conf?: string;
1821
+ union_deliverable?: WbsDraftUnionDeliverable;
1822
+ seq_order_info?: WbsDraftSeqOrderInfo;
1823
+ dismantle_mode?: number;
1824
+ status?: number;
1825
+ dependencies?: WbsDraftDependencyInfo[];
1826
+ relative_schedule_v2?: WbsDraftScheduleReferenceValue[];
1827
+ is_schedule_agg_item?: boolean;
1828
+ field_values?: FieldValuePair[];
1829
+ }
1830
+ /**
1831
+ * WBS 草稿
1832
+ */
1833
+ export interface WbsDraft {
1834
+ template_uuid?: string;
1835
+ template_version?: number;
1836
+ work_item_type_key?: string;
1837
+ related_sub_work_items?: WbsDraftWorkItem[];
1838
+ connections?: Connection[];
1839
+ draft_id?: string;
1840
+ delete_uuids?: string[];
1841
+ role_owners?: Record<string, RoleOwner[]>;
1842
+ user_details?: UserDetail[];
1843
+ work_item_id?: number;
1844
+ }
1845
+ /**
1846
+ * WBS 草稿子工作项关系配置
1847
+ */
1848
+ export interface WbsDraftSubWorkItemConfRelation {
1849
+ relation_key?: string;
1850
+ relation_name?: string;
1851
+ relation_conf_uuid?: string;
1852
+ }
1853
+ /**
1854
+ * WBS 草稿子工作项配置
1855
+ */
1856
+ export interface WbsDraftSubWorkItemConf {
1857
+ work_item_type_key?: string;
1858
+ work_item_type_name?: string;
1859
+ relations?: WbsDraftSubWorkItemConfRelation[];
1860
+ enable_model_resource_lib?: boolean;
1861
+ }
1862
+ /**
1863
+ * WBS 草稿 patch 请求
1864
+ */
1865
+ export interface PatchWbsDraftRequest {
1866
+ /** 空间 ID */
1867
+ project_key: string;
1868
+ /** 工作项 ID */
1869
+ work_item_id: number;
1870
+ /** 草稿 ID */
1871
+ draft_id: string;
1872
+ /** 单个操作描述 */
1873
+ operation: WbsDraftOperation;
1874
+ }
1875
+ /**
1876
+ * 差异化负责人类型
1877
+ */
1878
+ export type WbsDraftAssigneeType = 0 | 1 | 2 | 3;
1879
+ /**
1880
+ * 计划表 value 包装
1881
+ */
1882
+ export interface WbsDraftValueRef<T> {
1883
+ value: T;
1884
+ }
1885
+ /**
1886
+ * 计划表日期范围
1887
+ */
1888
+ export interface WbsDraftScheduleDateRange {
1889
+ estimate_finish?: WbsDraftValueRef<number>;
1890
+ estimate_start?: WbsDraftValueRef<number>;
1891
+ }
1892
+ /**
1893
+ * 计划表差异化排期
1894
+ */
1895
+ export interface WbsDraftAssigneeSchedule {
1896
+ assignee?: string[];
1897
+ assignee_type: WbsDraftAssigneeType;
1898
+ schedule_date?: WbsDraftScheduleDateRange;
1899
+ schedule_point?: WbsDraftValueRef<number>;
1900
+ }
1901
+ /**
1902
+ * 计划表差异化实际工时
1903
+ */
1904
+ export interface WbsDraftAssigneeActualTime {
1905
+ assignee?: string[];
1906
+ assignee_type: WbsDraftAssigneeType;
1907
+ value: number;
1908
+ }
1909
+ /**
1910
+ * 计划表整体排期
1911
+ */
1912
+ export interface WbsDraftWholeSchedule {
1913
+ schedule_date?: WbsDraftScheduleDateRange;
1914
+ schedule_point?: WbsDraftValueRef<number>;
1915
+ }
1916
+ /**
1917
+ * 计划表整体实际工时
1918
+ */
1919
+ export interface WbsDraftActualTime {
1920
+ value: number;
1921
+ }
1922
+ /**
1923
+ * WBS 草稿角色负责人更新值
1924
+ */
1925
+ export interface WbsDraftRoleOwnersValue {
1926
+ role_key?: string;
1927
+ owners: string[];
1928
+ work_item_id?: number;
1929
+ }
1930
+ /**
1931
+ * WBS 草稿字段交付物更新值
1932
+ */
1933
+ export interface WbsDraftFieldDeliverableValue {
1934
+ field_key: string;
1935
+ }
1936
+ /**
1937
+ * WBS 草稿实例交付物更新值
1938
+ */
1939
+ export interface WbsDraftInstanceDeliverableValue {
1940
+ resourceID: number;
1941
+ }
1942
+ /**
1943
+ * WBS 草稿 patch 操作
1944
+ *
1945
+ * 开放文档当前以“单 key 联合体”的方式展示操作值,这里保持同形态,
1946
+ * 这样用户可以直接把文档示例粘过来使用。
1947
+ */
1948
+ export type WbsDraftPatchOperationValue = {
1949
+ add_task_row: {
1950
+ parent_uuid: string;
1951
+ pre_uuid?: string;
1952
+ name?: string;
1953
+ element_key?: string;
1954
+ };
1955
+ } | {
1956
+ add_node_row: {
1957
+ parent_uuid: string;
1958
+ parent_group_uuid?: string;
1959
+ pre_uuid?: string;
1960
+ name?: string;
1961
+ element_key?: string;
1962
+ };
1963
+ } | {
1964
+ add_sub_instance_row: {
1965
+ parent_uuid: string;
1966
+ work_item_type_key: string;
1967
+ pre_uuid?: string;
1968
+ /**
1969
+ * 文档示例展示为字符串化 JSON。
1970
+ * 这里同时接受结构化数组,方便调用方直接复用已有字段值对象。
1971
+ */
1972
+ field_values?: FieldValuePair[] | string;
1973
+ };
1974
+ } | {
1975
+ add_resource_sub_instance_row: {
1976
+ parent_uuid: string;
1977
+ work_item_type_key: string;
1978
+ pre_uuid?: string;
1979
+ resource_work_item_ids: number[];
1980
+ };
1981
+ } | {
1982
+ delete_row: {
1983
+ uuid: string;
1984
+ reason?: string;
1985
+ delete_action_type?: 'delete' | 'move_out' | string;
1986
+ };
1987
+ } | {
1988
+ restore_row: {
1989
+ uuid: string;
1990
+ };
1991
+ } | {
1992
+ update_dismantle_mode: {
1993
+ uuid: string;
1994
+ dismantle_mode: 0 | 1 | number;
1995
+ };
1996
+ } | {
1997
+ adjust_row_order: {
1998
+ uuid: string;
1999
+ parent_uuid?: string;
2000
+ pre_uuid?: string;
2001
+ };
2002
+ } | {
2003
+ update_node_sequence: {
2004
+ uuid: string;
2005
+ pre_list?: string[];
2006
+ next_list?: string[];
2007
+ };
2008
+ } | {
2009
+ update_node_phase: {
2010
+ uuid: string;
2011
+ phase: string;
2012
+ };
2013
+ } | {
2014
+ update_name: {
2015
+ uuid: string;
2016
+ name: string;
2017
+ };
2018
+ } | {
2019
+ update_role_owner: {
2020
+ uuid: string;
2021
+ role_owners: WbsDraftRoleOwnersValue;
2022
+ };
2023
+ } | {
2024
+ update_delivery: {
2025
+ uuid: string;
2026
+ field_deliverables?: WbsDraftFieldDeliverableValue[];
2027
+ instance_deliverables?: WbsDraftInstanceDeliverableValue[];
2028
+ };
2029
+ } | {
2030
+ update_planned_schedule: {
2031
+ uuid: string;
2032
+ assignee_schedules?: WbsDraftAssigneeSchedule[];
2033
+ schedule?: WbsDraftWholeSchedule;
2034
+ different_schedule: boolean;
2035
+ };
2036
+ } | {
2037
+ update_schedule_actual_time: {
2038
+ uuid: string;
2039
+ assignee_actual_times?: WbsDraftAssigneeActualTime[];
2040
+ actual_time?: WbsDraftActualTime;
2041
+ different_schedule: boolean;
2042
+ };
2043
+ };
2044
+ /**
2045
+ * WBS 草稿单次操作
2046
+ */
2047
+ export interface WbsDraftOperation {
2048
+ operation_type: 'AddTaskRow' | 'AddNodeRow' | 'AddSubInstanceRow' | 'AddResourceSubInstanceRow' | 'DeleteRow' | 'RestoreRow' | 'UpdateDismantleMode' | 'AdjustRowOrder' | 'UpdateNodeSequence' | 'UpdateNodePhase' | 'UpdateName' | 'UpdateRoleOwner' | 'UpdateDelivery' | 'UpdatePlannedSchedule' | 'UpdateSchedulePoint' | 'UpdateScheduleActualTime' | string;
2049
+ operation_value: WbsDraftPatchOperationValue;
2050
+ }
2051
+ /**
2052
+ * WBS 草稿 patch 返回值
2053
+ */
2054
+ export interface PatchWbsDraftResponse {
2055
+ /** 更新计划表操作标识 */
2056
+ transaction_id: string;
2057
+ /** 状态 saving/success/failed */
2058
+ status: 'saving' | 'success' | 'failed' | string;
2059
+ /** 报错信息 */
2060
+ msg?: string;
2061
+ }
2062
+ /**
2063
+ * WBS 草稿布尔结果
2064
+ */
2065
+ export interface WbsDraftSuccessResponse {
2066
+ success?: boolean;
2067
+ }
2068
+ /**
2069
+ * 创建草稿进度查询请求
2070
+ */
2071
+ export interface CreateWbsDraftProgressRequest {
2072
+ project_key: string;
2073
+ work_item_id: number;
2074
+ draft_id: string;
2075
+ }
2076
+ /**
2077
+ * 创建草稿进度
2078
+ */
2079
+ export interface CreateWbsDraftProgressResponse {
2080
+ /** 创建进度:0-未知状态;1-创建中;2-创建完成 */
2081
+ draft_status: 0 | 1 | 2 | number;
2082
+ }
2083
+ /**
2084
+ * 更新草稿进度
2085
+ */
2086
+ export interface PatchWbsDraftProgressResponse {
2087
+ transaction_id: string;
2088
+ status: 'saving' | 'success' | 'failed' | string;
2089
+ create_time: number;
2090
+ max_saving_ttl: number;
2091
+ }
2092
+ /**
2093
+ * 更新草稿进度查询请求
2094
+ */
2095
+ export interface PatchWbsDraftProgressRequest {
2096
+ project_key: string;
2097
+ transaction_id: string;
2098
+ }
2099
+ /**
2100
+ * 发布草稿进度
2101
+ */
2102
+ export interface PublishWbsDraftProgressResponse {
2103
+ publish_order_id: string;
2104
+ /** 0-发布中;1-成功;2-失败 */
2105
+ publish_status: 0 | 1 | 2 | number;
2106
+ }
2107
+ /**
2108
+ * 发布草稿进度查询请求
2109
+ */
2110
+ export interface PublishWbsDraftProgressRequest {
2111
+ project_key: string;
2112
+ work_item_id: number;
2113
+ draft_id: string;
2114
+ publish_order_id: string;
2115
+ }
2116
+ /**
2117
+ * 重置草稿进度
2118
+ */
2119
+ export interface ResetWbsDraftProgressResponse {
2120
+ /** 0-未知状态; 2-重置完成; 3-重置中; 4-部分重置中 */
2121
+ draft_status: 0 | 2 | 3 | 4 | number;
2122
+ }
2123
+ /**
2124
+ * 重置草稿进度查询请求
2125
+ */
2126
+ export interface ResetWbsDraftProgressRequest {
2127
+ project_key: string;
2128
+ work_item_id: number;
2129
+ draft_id: string;
2130
+ }
2131
+ /**
2132
+ * 计划表当前行
2133
+ */
2134
+ export interface WbsDraftCurrentRow {
2135
+ uuid: string;
2136
+ type: 'Creator' | 'General' | 'CardGroup' | 'GridGroup' | string;
2137
+ [key: string]: unknown;
2138
+ }
2139
+ /**
2140
+ * 计划表草稿骨架
2141
+ */
2142
+ export interface WbsDraftStructure {
2143
+ current_row: WbsDraftCurrentRow;
2144
+ children?: WbsDraftStructure[];
2145
+ [key: string]: unknown;
2146
+ }
2147
+ /**
2148
+ * 草稿骨架查询请求
2149
+ */
2150
+ export interface QueryWbsDraftStructureRequest {
2151
+ project_key: string;
2152
+ work_item_id: number;
2153
+ draft_id: string;
2154
+ }
2155
+ /**
2156
+ * 草稿骨架查询响应
2157
+ */
2158
+ export interface QueryWbsDraftStructureResponse {
2159
+ wbs_draft_structure: WbsDraftStructure;
2160
+ }
2161
+ /**
2162
+ * 草稿行详情查询请求
2163
+ */
2164
+ export interface QueryWbsDraftRowDetailRequest {
2165
+ project_key: string;
2166
+ work_item_id: number;
2167
+ draft_id: string;
2168
+ uuids: string[];
2169
+ row_field_marks: WbsRowFieldMark[];
2170
+ }
2171
+ /**
2172
+ * 文档把字段掩码写成枚举列表,直接收紧可以把拼写错误提前拦在编译期。
2173
+ */
2174
+ export type WbsRowFieldMark = 'meta.*' | 'meta.uuid' | 'meta.type' | 'meta.conf_uuid' | 'meta.parent_uuid' | 'meta.belong_work_item_info' | 'meta.editable_conf' | 'base.*' | 'base.name' | 'base.start_time' | 'base.finish_time' | 'base.owners' | 'base.schedule' | 'base.schedule_dependency' | 'base.dependencies' | 'base.union_deliveries' | 'base.process_status' | 'node_extra.*' | 'node_extra.is_milestone' | 'node_extra.phase' | 'node_extra.predecessor' | 'node_extra.state_key' | 'sub_instance_extra.*' | 'sub_instance_extra.dismantle_mode';
2175
+ /**
2176
+ * 草稿/发布态明细共用同一套行类型,统一成字面量后更容易跟文档持续对齐。
2177
+ */
2178
+ export type WbsRowDetailType = 'node' | 'sub_instance' | 'sub_task' | string;
2179
+ /**
2180
+ * 负责人分配模式
2181
+ */
2182
+ export type WbsOwnerAssignType = 'AssignUnknown' | 'AssignLimited' | 'AssignRoleBind' | 'AssignFree' | string;
2183
+ /**
2184
+ * 负责人候选范围
2185
+ */
2186
+ export type WbsOwnerCandidateScopeType = 'CandidateScopeUnknown' | 'CandidateScopeNone' | 'CandidateScopeFromRole' | 'CandidateScopeFromParentOwner' | string;
2187
+ /**
2188
+ * 排期依赖类型
2189
+ */
2190
+ export type WbsScheduleDependencyType = 'FF' | 'FS' | 'SF' | 'SS' | string;
2191
+ /**
2192
+ * 启动完成依赖类型
2193
+ */
2194
+ export type WbsDependencyType = 'FF' | 'FS' | string;
2195
+ /**
2196
+ * 启动完成依赖源类型
2197
+ */
2198
+ export type WbsDependencySourceType = 'WbsTask' | 'node' | 'task' | 'sub_instance' | 'sub_task' | string;
2199
+ /**
2200
+ * 目前文档仅给出了 ongoing,先把已知值显式化,同时保留平台后续扩展空间。
2201
+ */
2202
+ export type WbsProcessStatus = 'ongoing' | string;
2203
+ /**
2204
+ * 子工作项拆解模式
2205
+ */
2206
+ export type WbsSubInstanceDismantleMode = 'item' | 'flow' | string;
2207
+ /**
2208
+ * WBS 链路节点类型
2209
+ */
2210
+ export type WbsRelationChainItemType = 'rootWorkItem' | 'subWorkItem' | 'node' | 'subTask' | string;
2211
+ /**
2212
+ * 草稿行元信息
2213
+ */
2214
+ export interface WbsTemplateInfo {
2215
+ template_version?: number;
2216
+ templateUUID?: string;
2217
+ }
2218
+ /**
2219
+ * 草稿行所属工作项信息
2220
+ */
2221
+ export interface WbsBelongWorkItemInfo {
2222
+ work_item_id?: number;
2223
+ work_item_type_key?: string;
2224
+ template_info?: WbsTemplateInfo;
2225
+ }
2226
+ /**
2227
+ * 草稿行可编辑配置
2228
+ */
2229
+ export interface WbsFieldEditableState {
2230
+ uneditable?: boolean;
2231
+ }
2232
+ /**
2233
+ * 草稿行字段可编辑配置
2234
+ */
2235
+ export interface WbsFieldsEditableConf {
2236
+ actual_work_effort_editable?: WbsFieldEditableState;
2237
+ [key: string]: WbsFieldEditableState | undefined;
2238
+ }
2239
+ /**
2240
+ * 草稿行编辑配置
2241
+ */
2242
+ export interface WbsEditableConf {
2243
+ fields_editable_conf?: WbsFieldsEditableConf;
2244
+ }
2245
+ /**
2246
+ * 计划表工期/工时单位
2247
+ */
2248
+ export type WbsTimeUnit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | number;
2249
+ /**
2250
+ * 带单位的数值
2251
+ */
2252
+ export interface WbsValueWithUnit {
2253
+ value: number;
2254
+ unit: WbsTimeUnit;
2255
+ }
2256
+ /**
2257
+ * 负责人范围中的角色成员
2258
+ */
2259
+ export interface WbsOwnerRoleMemberInfo {
2260
+ work_item_id?: number;
2261
+ role_key?: string;
2262
+ members?: string[];
2263
+ role_name?: string;
2264
+ is_member_multi?: boolean;
2265
+ }
2266
+ /**
2267
+ * 行负责人信息
2268
+ */
2269
+ export interface WbsOwnersInfo {
2270
+ owner_assign_type?: WbsOwnerAssignType;
2271
+ candidate_scope_type?: WbsOwnerCandidateScopeType;
2272
+ owners?: string[];
2273
+ owners_with_role?: WbsOwnerRoleMemberInfo[];
2274
+ }
2275
+ /**
2276
+ * 计划排期
2277
+ */
2278
+ export interface WbsPlannedSchedule {
2279
+ estimate_start_time?: number;
2280
+ estimate_finish_time?: number;
2281
+ }
2282
+ /**
2283
+ * 估分信息
2284
+ */
2285
+ export interface WbsEstimatedEffort {
2286
+ estimated_effort_value?: WbsValueWithUnit;
2287
+ }
2288
+ /**
2289
+ * 实际工时信息
2290
+ */
2291
+ export interface WbsActualWorkEffort {
2292
+ actual_work_effort_value?: WbsValueWithUnit;
2293
+ }
2294
+ /**
2295
+ * 计划工期信息
2296
+ */
2297
+ export interface WbsPlannedDuration {
2298
+ planned_duration_value?: WbsValueWithUnit;
2299
+ }
2300
+ /**
2301
+ * 差异化负责人排期
2302
+ */
2303
+ export interface WbsAssigneeScheduleDetail {
2304
+ user_key?: string;
2305
+ planned_schedule?: WbsPlannedSchedule;
2306
+ estimated_effort?: WbsEstimatedEffort;
2307
+ actual_work_effort?: WbsActualWorkEffort;
2308
+ planned_duration?: WbsPlannedDuration;
2309
+ }
2310
+ /**
2311
+ * 单行排期汇总配置
2312
+ */
2313
+ export interface WbsScheduleRuleConf {
2314
+ need_aggregate?: boolean;
2315
+ }
2316
+ /**
2317
+ * 行排期信息
2318
+ */
2319
+ export interface WbsScheduleInfo {
2320
+ schedule_rule_conf?: WbsScheduleRuleConf;
2321
+ planned_schedule?: WbsPlannedSchedule;
2322
+ estimated_effort?: WbsEstimatedEffort;
2323
+ assignee_schedule?: WbsAssigneeScheduleDetail[];
2324
+ planned_duration?: WbsPlannedDuration;
2325
+ actual_work_effort?: WbsActualWorkEffort;
2326
+ }
2327
+ /**
2328
+ * 排期依赖里的延迟
2329
+ */
2330
+ export interface WbsDayOffset {
2331
+ value?: number;
2332
+ }
2333
+ /**
2334
+ * 排期依赖
2335
+ */
2336
+ export interface WbsScheduleDependencyItem {
2337
+ day_offset?: WbsDayOffset;
2338
+ type?: WbsScheduleDependencyType;
2339
+ from_uuid?: string;
2340
+ to_uuid?: string;
2341
+ from_name?: string;
2342
+ }
2343
+ /**
2344
+ * 排期依赖集合
2345
+ */
2346
+ export interface WbsScheduleDependencyInfo {
2347
+ schedule_dependencies?: WbsScheduleDependencyItem[];
2348
+ }
2349
+ /**
2350
+ * 启动完成依赖
2351
+ */
2352
+ export interface WbsDependencyItem {
2353
+ type?: WbsDependencyType;
2354
+ from_type?: WbsDependencySourceType;
2355
+ from_uuid?: string;
2356
+ from_uuid_belonged_wid?: number;
2357
+ from_name?: string;
2358
+ }
2359
+ /**
2360
+ * 字段交付物引用
2361
+ */
2362
+ export interface WbsFieldDeliveryRef {
2363
+ project_key?: string;
2364
+ work_item_type_key?: string;
2365
+ field_key?: string;
2366
+ }
2367
+ /**
2368
+ * 实例交付物引用
2369
+ */
2370
+ export interface WbsInstanceDeliveryRef {
2371
+ project_key?: string;
2372
+ work_item_type_key?: string;
2373
+ resource_id?: number;
2374
+ }
2375
+ /**
2376
+ * 融合交付物
2377
+ */
2378
+ export interface WbsUnionDeliveryItem {
2379
+ type?: 'field' | 'instance' | string;
2380
+ field_delivery?: WbsFieldDeliveryRef;
2381
+ instance_delivery?: WbsInstanceDeliveryRef;
2382
+ }
2383
+ export interface WbsDraftRowDetailMeta {
2384
+ uuid?: string;
2385
+ type?: WbsRowDetailType;
2386
+ conf_uuid?: string;
2387
+ parent_uuid?: string;
2388
+ belong_work_item_info?: WbsBelongWorkItemInfo;
2389
+ editable_conf?: WbsEditableConf;
2390
+ [key: string]: unknown;
2391
+ }
2392
+ /**
2393
+ * 草稿行基本信息
2394
+ */
2395
+ export interface WbsDraftRowDetailBase {
2396
+ name?: string;
2397
+ start_time?: number;
2398
+ finish_time?: number;
2399
+ owners?: WbsOwnersInfo;
2400
+ schedule?: WbsScheduleInfo;
2401
+ schedule_dependency?: WbsScheduleDependencyInfo;
2402
+ dependencies?: WbsDependencyItem[];
2403
+ union_deliveries?: WbsUnionDeliveryItem[];
2404
+ process_status?: WbsProcessStatus;
2405
+ [key: string]: unknown;
2406
+ }
2407
+ /**
2408
+ * 草稿行详情
2409
+ */
2410
+ export interface WbsSubInstanceExtra {
2411
+ dismantle_mode?: WbsSubInstanceDismantleMode;
2412
+ }
2413
+ /**
2414
+ * 节点阶段信息
2415
+ */
2416
+ export interface WbsPhaseInfo {
2417
+ phase_key?: string;
2418
+ phase_name?: string;
2419
+ }
2420
+ /**
2421
+ * 节点额外信息
2422
+ */
2423
+ export interface WbsNodeExtra {
2424
+ is_milestone?: boolean;
2425
+ phase?: WbsPhaseInfo;
2426
+ predecessor?: string[];
2427
+ state_key?: string;
2428
+ }
2429
+ export interface WbsDraftRowDetail {
2430
+ meta?: WbsDraftRowDetailMeta;
2431
+ base?: WbsDraftRowDetailBase;
2432
+ sub_instance_extra?: WbsSubInstanceExtra;
2433
+ node_extra?: WbsNodeExtra;
2434
+ [key: string]: unknown;
2435
+ }
2436
+ /**
2437
+ * 草稿行详情查询响应
2438
+ */
2439
+ export interface QueryWbsDraftRowDetailResponse {
2440
+ draft_row_details: WbsDraftRowDetail[];
2441
+ }
2442
+ /**
2443
+ * 草稿行配置查询请求
2444
+ */
2445
+ export interface QueryWbsDraftRowConfigRequest {
2446
+ project_key: string;
2447
+ work_item_id: number;
2448
+ draft_id: string;
2449
+ uuid: string;
2450
+ }
2451
+ /**
2452
+ * 草稿行配置里的工作项类型信息
2453
+ */
2454
+ export interface WbsDraftTaskConfWorkItemTypeInfo {
2455
+ work_item_type_key: string;
2456
+ name: string;
2457
+ }
2458
+ /**
2459
+ * 草稿行配置
2460
+ */
2461
+ export interface WbsDraftTaskConf {
2462
+ sub_work_instance_create_info?: {
2463
+ work_item_type_infos?: WbsDraftTaskConfWorkItemTypeInfo[];
2464
+ };
2465
+ }
2466
+ /**
2467
+ * 草稿行配置查询响应
2468
+ */
2469
+ export interface QueryWbsDraftRowConfigResponse {
2470
+ sub_work_instance_create_info?: {
2471
+ work_item_type_infos?: WbsDraftTaskConfWorkItemTypeInfo[];
2472
+ };
2473
+ }
2474
+ /**
2475
+ * 发布态计划表骨架查询请求
2476
+ */
2477
+ export interface QueryWbsViewStructureRequest {
2478
+ project_key: string;
2479
+ work_item_id: number;
2480
+ }
2481
+ /**
2482
+ * 发布态计划表骨架查询响应
2483
+ */
2484
+ export interface QueryWbsViewStructureResponse {
2485
+ wbs_structure: WbsDraftStructure;
2486
+ }
2487
+ /**
2488
+ * 发布态计划表行详情查询请求
2489
+ */
2490
+ export interface QueryWbsViewRowDetailRequest {
2491
+ project_key: string;
2492
+ work_item_id: number;
2493
+ uuids: string[];
2494
+ row_field_marks: WbsRowFieldMark[];
2495
+ }
2496
+ /**
2497
+ * 发布态计划表行详情查询响应
2498
+ */
2499
+ export interface QueryWbsViewRowDetailResponse {
2500
+ view_row_details: WbsDraftRowDetail[];
2501
+ }
2502
+ /**
2503
+ * 发布态计划表扩展查询参数
2504
+ */
2505
+ export interface QueryWbsInstanceExpand {
2506
+ need_wbs_relation_chain_entity?: boolean;
2507
+ need_wbs_relation_chain_path?: boolean;
2508
+ need_parent_work_item?: boolean;
2509
+ }
2510
+ /**
2511
+ * 发布态计划表扩展信息查询请求
2512
+ */
2513
+ export interface QueryWbsInstanceExpandInfoRequest {
2514
+ project_key: string;
2515
+ work_item_id: number;
2516
+ work_item_type_key: string;
2517
+ expand: QueryWbsInstanceExpand;
2518
+ }
2519
+ /**
2520
+ * 发布态计划表扩展信息查询响应
2521
+ */
2522
+ export interface WbsRelatedParentWorkItem {
2523
+ is_top?: boolean;
2524
+ work_item_id?: number;
2525
+ work_item_type_key?: string;
2526
+ name?: string;
2527
+ template_id?: string;
2528
+ template_key?: string;
2529
+ template_name?: string;
2530
+ template_version?: number;
2531
+ relation_node_id?: string;
2532
+ relation_node_name?: string;
2533
+ relation_node_tags?: string[];
2534
+ relation_node_uuid?: string;
2535
+ }
2536
+ /**
2537
+ * 扩展信息里的节点间连接字段
2538
+ */
2539
+ export interface WbsExpandConnectionField {
2540
+ name?: string;
2541
+ type?: string;
2542
+ value?: string;
2543
+ }
2544
+ /**
2545
+ * 扩展信息里的节点间连接
2546
+ */
2547
+ export interface WbsExpandConnection {
2548
+ source_state_key?: string;
2549
+ target_state_key?: string;
2550
+ transition_id?: number;
2551
+ fields?: WbsExpandConnectionField[];
2552
+ }
2553
+ /**
2554
+ * WBS 链路层级条目
2555
+ */
2556
+ export interface WbsRelationChainPathItem {
2557
+ project_key?: string;
2558
+ level?: number;
2559
+ type?: WbsRelationChainItemType;
2560
+ work_item_type_key?: string;
2561
+ name?: string;
2562
+ node_name?: string;
2563
+ }
2564
+ /**
2565
+ * WBS 链路层级信息
2566
+ */
2567
+ export interface WbsRelationChainPathInfo {
2568
+ wbs_relation_chain_path?: WbsRelationChainPathItem[];
2569
+ work_item_id?: number;
2570
+ }
2571
+ /**
2572
+ * WBS 链路实例条目
2573
+ */
2574
+ export interface WbsRelationChainEntityItem {
2575
+ project_key?: string;
2576
+ work_item_type_key?: string;
2577
+ work_item_id?: number;
2578
+ type?: WbsRelationChainItemType;
2579
+ work_item_name?: string;
2580
+ state_key?: string;
2581
+ node_name?: string;
2582
+ sub_task_id?: number;
2583
+ sub_task_name?: string;
2584
+ level?: number;
2585
+ }
2586
+ /**
2587
+ * WBS 链路实例信息
2588
+ */
2589
+ export interface WbsRelationChainEntityInfo {
2590
+ wbs_relation_chain_entity?: WbsRelationChainEntityItem[];
2591
+ work_item_id?: number;
2592
+ }
2593
+ export interface QueryWbsInstanceExpandInfoResponse {
2594
+ template_key?: string;
2595
+ template_version?: number;
2596
+ template_name?: string;
2597
+ template_id?: string;
2598
+ related_parent_work_item?: WbsRelatedParentWorkItem;
2599
+ connections?: WbsExpandConnection[];
2600
+ relation_chain_path?: WbsRelationChainPathInfo;
2601
+ relation_chain_entity?: WbsRelationChainEntityInfo;
2602
+ }
2603
+ /**
2604
+ * 发布 WBS 草稿返回值
2605
+ */
2606
+ export interface PublishWbsDraftResponse {
2607
+ publish_order_id: string;
2608
+ recommend_interval_ms: number;
2609
+ }
2610
+ /**
2611
+ * 重置 WBS 草稿返回值
2612
+ */
2613
+ export interface ResetWbsDraftResponse {
2614
+ new_draft_id: string;
2615
+ recommend_interval_ms: number;
2616
+ }
2617
+ /**
2618
+ * 工时关联对象类型
2619
+ */
2620
+ export type WorkHourResourceType = 'node' | 'sub_task';
2621
+ /**
2622
+ * 创建工时记录条目
2623
+ */
2624
+ export interface CreateWorkingHourRecord {
2625
+ /** 关联对象类型 */
2626
+ resource_type: WorkHourResourceType;
2627
+ /** 关联对象 ID */
2628
+ resource_id: string;
2629
+ /** 实际工时(单位:天) */
2630
+ work_time: number | string;
2631
+ /** 工作描述 */
2632
+ work_description?: string;
2633
+ }
2634
+ /**
2635
+ * 创建工时登记记录请求
2636
+ */
2637
+ export interface CreateWorkHourRecordRequest {
2638
+ /** 工作开始日期(毫秒时间戳) */
2639
+ work_begin_date: number;
2640
+ /** 工作结束日期(毫秒时间戳) */
2641
+ work_end_date: number;
2642
+ /** 是否包含节假日 */
2643
+ include_holidays: boolean;
2644
+ /** 待创建工时记录列表 */
2645
+ working_hour_records: CreateWorkingHourRecord[];
2646
+ }
2647
+ /**
2648
+ * 更新工时记录条目
2649
+ */
2650
+ export interface UpdateWorkingHourRecord {
2651
+ /** 工时记录 ID */
2652
+ id: number;
2653
+ /** 实际工时 */
2654
+ work_time?: number | string;
2655
+ /** 工作描述 */
2656
+ work_description?: string;
2657
+ }
2658
+ /**
2659
+ * 更新工时登记记录请求
2660
+ */
2661
+ export interface UpdateWorkHourRecordRequest {
2662
+ /** 待更新记录列表 */
2663
+ working_hour_records: UpdateWorkingHourRecord[];
2664
+ }
2665
+ /**
2666
+ * 删除工时登记记录请求
2667
+ */
2668
+ export interface DeleteWorkHourRecordRequest {
2669
+ /** 工时记录 ID 列表 */
2670
+ working_hour_record_ids: number[];
2671
+ }
2672
+ /**
2673
+ * 查询工时登记记录请求
2674
+ */
2675
+ export interface ListWorkHourRecordsRequest {
2676
+ /** 空间 ID */
2677
+ project_key: string;
2678
+ /** 工作项类型 key */
2679
+ work_item_type_key: string;
2680
+ /** 工作项 ID */
2681
+ work_item_id: number;
2682
+ /** 页码 */
2683
+ page_num?: number;
2684
+ /** 分页大小 */
2685
+ page_size?: number;
2686
+ }
2687
+ /**
2688
+ * 工时登记记录
2689
+ */
2690
+ export interface WorkHourRecord {
2691
+ /** 工时记录 ID */
2692
+ id: number;
2693
+ /** 工作日期(毫秒时间戳) */
2694
+ work_date?: number;
2695
+ /** 实际工时 */
2696
+ work_time?: number;
2697
+ /** 创建时间 */
2698
+ created_at?: number;
2699
+ /** 更新时间 */
2700
+ updated_at?: number;
2701
+ /** 关联对象 ID */
2702
+ resource_id?: string;
2703
+ /** 关联对象名称 */
2704
+ resource_name?: string;
2705
+ /** 关联对象类型 */
2706
+ resource_type?: WorkHourResourceType;
2707
+ /** 工时归属人 user_key */
2708
+ work_user_key?: string;
2709
+ /** 工作描述 */
2710
+ work_description?: string;
2711
+ /** 关联工作项 ID */
2712
+ related_work_item_id?: number;
2713
+ /** 关联工作项名称 */
2714
+ related_work_item_name?: string;
2715
+ /** 关联工作项类型 */
2716
+ related_work_item_type_key?: string;
2717
+ }
2718
+ /**
2719
+ * 评审结论标签
2720
+ */
2721
+ export interface ReviewConclusionOptionItem {
2722
+ /** 标签 key */
2723
+ key: string;
2724
+ /** 标签名称 */
2725
+ label: string;
2726
+ /** 原始标签名称 */
2727
+ origin_label?: string;
2728
+ }
2729
+ /**
2730
+ * 评审意见(个人)
2731
+ */
2732
+ export interface ReviewOwnerOpinionInfo {
2733
+ /** 用户 user_key */
2734
+ owner: string;
2735
+ /** 评审意见 */
2736
+ finished_opinion_result: string;
2737
+ }
2738
+ /**
2739
+ * 评审意见(汇总)
2740
+ */
2741
+ export interface ReviewOpinionInfo {
2742
+ /** 汇总意见 */
2743
+ finished_opinion_result?: string;
2744
+ /** 人员意见 */
2745
+ owners_finished_opinion_result?: ReviewOwnerOpinionInfo[];
2746
+ }
2747
+ /**
2748
+ * 评审结论(个人)
2749
+ */
2750
+ export interface ReviewOwnerConclusionInfo {
2751
+ /** 用户 user_key */
2752
+ owner: string;
2753
+ /** 结论 */
2754
+ finished_conclusion_result?: ReviewConclusionOptionItem;
2755
+ /** 结论,兼容文档结构表中的字段名 */
2756
+ owners_finished_conclusion_result?: ReviewConclusionOptionItem;
2757
+ }
2758
+ /**
2759
+ * 评审汇总模式
2760
+ */
2761
+ export type ReviewSummaryMode = 'calculation' | 'independence';
2762
+ /**
2763
+ * 评审结论(汇总)
2764
+ */
2765
+ export interface ReviewConclusionInfo {
2766
+ /** 汇总结论 */
2767
+ finished_conclusion_result?: ReviewConclusionOptionItem;
2768
+ /** 人员结论 */
1519
2769
  owners_finished_conclusion_result?: ReviewOwnerConclusionInfo[];
1520
2770
  }
1521
2771
  /**
@@ -1529,7 +2779,7 @@ export interface ReviewFinishedInfoItem {
1529
2779
  /** 评审结论 */
1530
2780
  conclusion?: ReviewConclusionInfo;
1531
2781
  /** 汇总模式 */
1532
- summary_mode?: string;
2782
+ summary_mode?: ReviewSummaryMode;
1533
2783
  }
1534
2784
  /**
1535
2785
  * 批量查询评审信息请求
@@ -1539,7 +2789,7 @@ export interface ReviewBatchQueryRequest {
1539
2789
  /** 空间 ID(必填) */
1540
2790
  project_key: string;
1541
2791
  /** 工作项 ID(必填) */
1542
- work_item_id: number;
2792
+ work_item_id: number | string;
1543
2793
  /** 节点 ID 列表(必填,最多 10 个) */
1544
2794
  node_ids: string[];
1545
2795
  }
@@ -1548,7 +2798,7 @@ export interface ReviewBatchQueryRequest {
1548
2798
  */
1549
2799
  export interface ReviewBatchQueryResponse {
1550
2800
  project_key: string;
1551
- work_item_id: number;
2801
+ work_item_id: number | string;
1552
2802
  finished_infos: ReviewFinishedInfoItem[];
1553
2803
  }
1554
2804
  /**
@@ -1558,7 +2808,7 @@ export interface ReviewConclusionOptionRequest {
1558
2808
  /** 空间 ID */
1559
2809
  project_key: string;
1560
2810
  /** 工作项 ID */
1561
- work_item_id: number;
2811
+ work_item_id: number | string;
1562
2812
  /** 节点 ID 列表 */
1563
2813
  node_ids: string[];
1564
2814
  }
@@ -1575,6 +2825,10 @@ export interface ReviewConclusionOption {
1575
2825
  /** 整体评审结论标签 */
1576
2826
  finished_overall_conclusion_option?: ReviewConclusionOptionItem[];
1577
2827
  }
2828
+ /**
2829
+ * 评审更新操作类型
2830
+ */
2831
+ export type ReviewOperationType = 'node' | 'owner';
1578
2832
  /**
1579
2833
  * 修改评审意见/结论请求
1580
2834
  */
@@ -1582,7 +2836,7 @@ export interface UpdateReviewRequest {
1582
2836
  /** 空间 ID */
1583
2837
  project_key: string;
1584
2838
  /** 工作项 ID */
1585
- work_item_id: number;
2839
+ work_item_id: number | string;
1586
2840
  /** 节点 ID */
1587
2841
  node_id: string;
1588
2842
  /** 评审意见 */
@@ -1590,7 +2844,7 @@ export interface UpdateReviewRequest {
1590
2844
  /** 评审结论标签 key */
1591
2845
  finished_conclusion_option_key?: string;
1592
2846
  /** 操作类型 */
1593
- operation_type?: string;
2847
+ operation_type?: ReviewOperationType;
1594
2848
  /** 是否置空 */
1595
2849
  reset?: boolean;
1596
2850
  }