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
@@ -104,6 +104,10 @@ export interface PagedWorkItemIds {
104
104
  page_size: number;
105
105
  total: number;
106
106
  }
107
+ /**
108
+ * 字段更新模式
109
+ */
110
+ export type FieldUpdateMode = 0 | 1;
107
111
  /**
108
112
  * 字段值对
109
113
  * 参考: FieldValuePair
@@ -120,7 +124,7 @@ export interface FieldValuePair {
120
124
  /** 指代流转至该目标状态需要填写对应字段,状态流使用 */
121
125
  target_state?: TargetState;
122
126
  /** 字段更新模式(0: 全局替换, 1: 增量更新) */
123
- update_mode?: number;
127
+ update_mode?: FieldUpdateMode;
124
128
  /** 字段描述 */
125
129
  help_description?: string;
126
130
  }
@@ -294,6 +298,8 @@ export interface ExpandParams {
294
298
  relation_fields_detail?: boolean;
295
299
  /** 是否需要返回用户信息 */
296
300
  need_user_detail?: boolean;
301
+ /** 是否需要子任务父级信息 */
302
+ need_sub_task_parent?: boolean;
297
303
  /** 是否融合需要交付物 */
298
304
  need_union_deliverable?: boolean;
299
305
  /** 是否需要返回WBS链路实例 */
@@ -4,6 +4,8 @@
4
4
  */
5
5
  import type { FieldValue, FieldValuePair, FieldConf, SimpleField, MultiText, UserDetail, Connection } from './common.js';
6
6
  import type { RelationFieldDetail, SearchGroup } from './workitem.js';
7
+ export type ResourceId = number | string;
8
+ export type ResourceUserDetail = Partial<UserDetail>;
7
9
  export type FlowMode = 'stateflow' | 'workflow';
8
10
  export interface RoleInfo {
9
11
  id: string;
@@ -56,10 +58,22 @@ export interface TeamOption {
56
58
  team_data_scopes?: TeamDataScope[];
57
59
  team_mode?: 'all' | 'custom';
58
60
  }
61
+ export interface NumberSymbolSetting {
62
+ display?: string;
63
+ value?: string;
64
+ layout?: string;
65
+ }
66
+ export interface NumberConfig {
67
+ scaling_ratio?: string;
68
+ display_digits?: number;
69
+ symbol_setting?: NumberSymbolSetting;
70
+ thousandth?: boolean;
71
+ }
59
72
  export interface CreateCustomFieldRequest {
60
73
  field_name: string;
61
74
  field_alias?: string;
62
75
  field_type_key: string;
76
+ parent_field_key?: string;
63
77
  value_type?: number;
64
78
  field_value?: FieldValue[];
65
79
  reference_work_item_type_key?: string;
@@ -72,6 +86,7 @@ export interface CreateCustomFieldRequest {
72
86
  help_description?: string;
73
87
  authorized_roles?: string[];
74
88
  team_option?: TeamOption;
89
+ number_config?: NumberConfig;
75
90
  }
76
91
  export interface UpdateCustomFieldRequest {
77
92
  field_key: string;
@@ -84,6 +99,7 @@ export interface UpdateCustomFieldRequest {
84
99
  help_description?: string;
85
100
  authorized_roles?: string[];
86
101
  team_option?: TeamOption;
102
+ number_config?: NumberConfig;
87
103
  }
88
104
  export interface RelationDetail {
89
105
  project_key: string;
@@ -118,6 +134,8 @@ export interface DeleteWorkItemRelationRequest {
118
134
  }
119
135
  export type RoleAppearMode = 1 | 2 | 3;
120
136
  export type MemberAssignMode = 1 | 2 | 3 | 4;
137
+ export type FlowRoleWritableMemberAssignMode = 1 | 2 | 3;
138
+ export type RoleLockScope = 'all' | 'basic' | 'role' | 'member' | 'auth';
121
139
  export interface FlowRoleInfo {
122
140
  id: string;
123
141
  name: string;
@@ -131,22 +149,23 @@ export interface FlowRoleInfo {
131
149
  }
132
150
  export interface FlowRoleRequest {
133
151
  id?: string;
134
- name?: string;
152
+ name: string;
135
153
  role_alias?: string;
136
- member_assign_mode?: MemberAssignMode;
154
+ member_assign_mode?: FlowRoleWritableMemberAssignMode;
137
155
  members?: string[];
138
156
  is_member_multi?: boolean;
139
157
  is_owner?: boolean;
140
158
  auto_enter_group?: boolean;
141
- lock_scope?: string[];
159
+ lock_scope?: RoleLockScope[];
142
160
  }
161
+ export type FlowRoleUpdateRequest = Partial<Omit<FlowRoleRequest, 'id'>>;
143
162
  export interface CreateFlowRoleRequest {
144
163
  role: FlowRoleRequest;
145
164
  }
146
165
  export interface UpdateFlowRoleRequest {
147
166
  role_id?: string;
148
167
  role_alias?: string;
149
- role: Partial<FlowRoleRequest>;
168
+ role: FlowRoleUpdateRequest;
150
169
  }
151
170
  export interface DeleteFlowRoleRequest {
152
171
  role_id?: string;
@@ -160,42 +179,69 @@ export interface TemplateConf {
160
179
  template_id: number;
161
180
  template_key: string;
162
181
  }
182
+ export type TemplateAction = 1 | 2 | 3;
183
+ export type TemplateDisabled = 1 | 2;
184
+ export type WorkflowOwnerUsageMode = 1 | 2 | 3 | 4;
185
+ export type WorkflowVisibilityUsageMode = 1 | 2;
186
+ export type WorkflowPassMode = 1 | 2 | 3;
187
+ export type WorkflowTaskPassMode = 1 | 2;
188
+ export type WorkflowTaskRequiredMode = 1 | 2;
189
+ export type StateFlowStateType = 1 | 2 | 3;
163
190
  export interface TaskConf {
164
- action?: number;
191
+ action?: TemplateAction;
165
192
  name?: string;
166
193
  id?: string;
167
194
  deliverable_field_id?: string;
168
- pass_mode?: number;
169
- node_pass_required_mode?: number;
195
+ pass_mode?: WorkflowTaskPassMode;
196
+ node_pass_required_mode?: WorkflowTaskRequiredMode;
197
+ }
198
+ export interface WorkflowSubWorkItem {
199
+ name?: string;
200
+ relation_uuid?: string;
201
+ relation_name?: string;
202
+ work_item_type_key?: string;
203
+ work_item_type_name?: string;
204
+ }
205
+ export interface WorkflowSubTask {
206
+ id?: string;
207
+ name?: string;
208
+ owner_usage_mode?: WorkflowOwnerUsageMode;
209
+ owner_roles?: string[];
210
+ owners?: string[];
170
211
  }
171
212
  export interface WorkflowConf {
172
- action?: number;
213
+ action?: TemplateAction;
173
214
  state_key: string;
174
215
  name?: string;
175
216
  tags?: string[];
176
217
  pre_node_state_key?: string[];
177
- owner_usage_mode?: number;
218
+ owner_usage_mode?: WorkflowOwnerUsageMode;
178
219
  owner_roles?: string[];
179
220
  owners?: string[];
180
221
  need_schedule?: boolean;
181
222
  different_schedule?: boolean;
182
- visibility_usage_mode?: number;
223
+ visibility_usage_mode?: WorkflowVisibilityUsageMode;
183
224
  completion_tips?: string;
184
225
  deletable?: boolean;
185
226
  deletable_operation_role?: string[];
186
- pass_mode?: number;
227
+ pass_mode?: WorkflowPassMode;
187
228
  is_limit_node?: boolean;
229
+ is_milestone?: boolean;
188
230
  done_operation_role?: string[];
189
231
  done_schedule?: boolean;
190
232
  done_allocate_owner?: boolean;
233
+ done_actual_point?: boolean;
234
+ done_finish_time?: boolean;
235
+ sub_work_items?: WorkflowSubWorkItem[];
236
+ sub_tasks?: WorkflowSubTask[];
191
237
  task_confs?: TaskConf[];
192
238
  fields?: FieldConf[];
193
239
  }
194
240
  export interface StateFlowConf {
195
- action?: number;
241
+ action?: TemplateAction;
196
242
  state_key: string;
197
243
  name?: string;
198
- state_type?: number;
244
+ state_type?: StateFlowStateType;
199
245
  authorized_roles?: string[];
200
246
  }
201
247
  export interface TemplateDetail {
@@ -204,8 +250,9 @@ export interface TemplateDetail {
204
250
  connections?: Connection[];
205
251
  template_id?: number;
206
252
  template_name?: string;
253
+ work_item_type_key?: string;
207
254
  version?: number;
208
- is_disabled?: number;
255
+ is_disabled?: TemplateDisabled;
209
256
  }
210
257
  export interface TemplateCreateRequest {
211
258
  project_key: string;
@@ -223,7 +270,7 @@ export interface TemplateUpdateRequest {
223
270
  export type TemplateOperateRequest = TemplateCreateRequest | TemplateUpdateRequest;
224
271
  export interface ResourceQueryRequest {
225
272
  project_key: string;
226
- work_item_ids: number[];
273
+ work_item_ids: ResourceId[];
227
274
  fields?: string[];
228
275
  work_item_type_key: string;
229
276
  expand?: {
@@ -231,21 +278,37 @@ export interface ResourceQueryRequest {
231
278
  relation_fields_detail?: boolean;
232
279
  };
233
280
  }
281
+ export interface ResourceTemplateInfo {
282
+ id?: ResourceId;
283
+ work_flow_key?: string;
284
+ state_flow_key?: string;
285
+ }
286
+ export interface ResourceRoleOwner {
287
+ role: string;
288
+ role_key?: string;
289
+ owners?: ResourceUserDetail[];
290
+ }
234
291
  export interface ResourceWorkItemDetail {
235
- id: number;
292
+ id?: ResourceId;
293
+ work_item_id?: ResourceId;
236
294
  name: string;
295
+ owner?: ResourceUserDetail;
237
296
  work_item_type_key?: string;
238
297
  project_key?: string;
239
298
  template_type?: string;
240
- created_by?: string | UserDetail;
241
- updated_by?: string | UserDetail;
299
+ created_by?: string | ResourceUserDetail;
300
+ updated_by?: string | ResourceUserDetail;
242
301
  created_at?: number;
243
302
  updated_at?: number;
303
+ role_owners?: ResourceRoleOwner[];
244
304
  fields?: FieldValuePair[];
245
305
  simple_name?: string;
246
- template_id?: number;
306
+ template_id?: ResourceId;
307
+ template?: ResourceTemplateInfo;
308
+ template_version?: ResourceId;
247
309
  multi_texts?: MultiText[];
248
310
  relation_fields_detail?: RelationFieldDetail[];
311
+ user_details?: ResourceUserDetail[];
249
312
  }
250
313
  export interface ResourceQueryResponse {
251
314
  data: ResourceWorkItemDetail[];
@@ -257,12 +320,12 @@ export interface ResourceCreateRequest {
257
320
  field_value_pairs?: FieldValuePair[];
258
321
  }
259
322
  export interface ResourceCreateResponse {
260
- work_item_id: number;
323
+ work_item_id: ResourceId;
261
324
  }
262
325
  export interface ResourceUpdateRequest {
263
326
  project_key: string;
264
327
  work_item_type_key: string;
265
- work_item_id: number;
328
+ work_item_id: ResourceId;
266
329
  update_fields: FieldValuePair[];
267
330
  }
268
331
  export interface ResourceCreateInstanceRequest {
@@ -272,7 +335,7 @@ export interface ResourceCreateInstanceRequest {
272
335
  template_id?: number;
273
336
  }
274
337
  export interface ResourceCreateInstanceResponseData {
275
- work_item_id: number;
338
+ work_item_id: ResourceId;
276
339
  ignore_create_info?: {
277
340
  field_keys?: string[];
278
341
  role_ids?: string[];
@@ -2,8 +2,9 @@
2
2
  * 事件相关类型定义
3
3
  * 包含监听事件、拦截事件、插件装卸事件的类型
4
4
  */
5
+ import type { AINodeAppIdentity, AINodeField, AINodeInfo, AINodeNodeState, AINodeStatus, AINodeSubTask, AINodeSubWorkItem } from './ainode.js';
5
6
  /** 事件来源类型 */
6
- export type EventSource = 'normal' | 'openapi' | 'open_api' | 'system' | 'automation';
7
+ export type EventSource = 'normal' | 'openapi' | 'system' | 'automation';
7
8
  /** 工作项事件类型 (100x) */
8
9
  export type WorkItemEventType = 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012;
9
10
  /** 节点事件类型 (200x) */
@@ -16,8 +17,12 @@ export type SubtaskEventType = 4001 | 4002 | 4003 | 4004 | 4005 | 4006 | 4007 |
16
17
  export type SpaceEventType = 5001 | 5002;
17
18
  /** 插件事件类型 (600x) */
18
19
  export type PluginEventType = 6001 | 6002 | 6003 | 6004;
20
+ /** AI 节点事件类型 (800x) */
21
+ export type AINodeEventType = 8001 | 8002 | 8003 | 8004 | 8005 | 8006;
22
+ /** AI 字段事件类型 (810x) */
23
+ export type AIFieldEventType = 8101 | 8102;
19
24
  /** 所有事件类型 */
20
- export type EventType = WorkItemEventType | NodeEventType | StatusEventType | SubtaskEventType | SpaceEventType | PluginEventType;
25
+ export type EventType = WorkItemEventType | NodeEventType | StatusEventType | SubtaskEventType | SpaceEventType | PluginEventType | AINodeEventType | AIFieldEventType;
21
26
  /** 事件用户信息 */
22
27
  export interface EventUserInfo {
23
28
  /** 用户唯一 Key */
@@ -34,7 +39,7 @@ export interface EventWorkItemInfo {
34
39
  /** 工作项 ID */
35
40
  work_item_id: number;
36
41
  /** 工作项名称 */
37
- work_item_name: string;
42
+ work_item_name?: string;
38
43
  /** 工作项类型 Key */
39
44
  work_item_type_key: string;
40
45
  }
@@ -231,10 +236,156 @@ export type PluginEventData = PluginInstallEventData | PluginUninstallEventData
231
236
  export interface PluginListenEvent extends ListenEventBase {
232
237
  data: PluginEventData;
233
238
  }
239
+ /** AI 节点实体状态 */
240
+ export interface AINodeEntityInfo {
241
+ /** AI 实体唯一 ID */
242
+ entity_id: string;
243
+ /** AI 应用标识 */
244
+ app_identity: AINodeAppIdentity;
245
+ /** AI 运行状态 */
246
+ status: AINodeStatus;
247
+ }
248
+ /** AI 节点状态变更信息 */
249
+ export interface AINodeChangeInfo {
250
+ /** 变更前状态 */
251
+ before: AINodeEntityInfo | null;
252
+ /** 变更后状态 */
253
+ after: AINodeEntityInfo | null;
254
+ }
255
+ /** AI 节点事件中的节点信息 */
256
+ export interface AINodeEventNodeInfo {
257
+ /** 节点 key */
258
+ state_key: string;
259
+ /** 节点状态 */
260
+ node_state: AINodeNodeState;
261
+ /** AI 信息 */
262
+ ai_info: AINodeInfo;
263
+ /** 节点字段 */
264
+ node_fields?: AINodeField[] | null;
265
+ /** 节点表单字段 */
266
+ conform_fields?: AINodeField[] | null;
267
+ /** 子任务 */
268
+ sub_tasks?: AINodeSubTask[] | null;
269
+ /** 子项 */
270
+ sub_work_items?: AINodeSubWorkItem[] | null;
271
+ }
272
+ /** AI 节点操作信息 */
273
+ export interface AINodeOperationInfo {
274
+ /** 更新的节点 key */
275
+ update_nodes?: string[] | null;
276
+ /** 删除的节点 key */
277
+ del_nodes?: string[] | null;
278
+ /** 恢复的节点 key */
279
+ recover_nodes?: string[] | null;
280
+ /** 操作原因 */
281
+ reason?: string;
282
+ /** 当前负责人 */
283
+ owner_in_charge?: unknown;
284
+ /** 排期信息 */
285
+ schedule_info?: unknown;
286
+ }
287
+ /** AI 节点事件数据 */
288
+ export interface AINodeEventData extends ListenEventDataBase {
289
+ event_type: AINodeEventType;
290
+ /** 工作流类型:0=节点流,1=状态流 */
291
+ flow_type: 0 | 1;
292
+ /** 工作项类型 Key */
293
+ work_item_type_key: string;
294
+ /** 关联工作项类型 Key */
295
+ link_work_item_type_key?: string;
296
+ /** 用户信息 */
297
+ user_info: EventUserInfo;
298
+ /** 工作项信息 */
299
+ work_item_info: EventWorkItemInfo[];
300
+ /** AI 节点变更信息 */
301
+ change_ai_node_info?: AINodeChangeInfo;
302
+ /** AI 节点信息 */
303
+ ai_node_info?: AINodeEventNodeInfo;
304
+ /** 节点操作信息 */
305
+ node_info?: AINodeOperationInfo;
306
+ }
307
+ /** AI 节点监听事件 */
308
+ export interface AINodeListenEvent extends ListenEventBase {
309
+ data: AINodeEventData;
310
+ }
311
+ /** AI 字段自定义属性类型 */
312
+ export type AIFieldCustomPropertyType = 'custom_input_select' | 'custom_input_multi_select' | 'custom_input_text' | 'custom_input_number';
313
+ /** AI 字段自定义属性 */
314
+ export interface AIFieldCustomProperty {
315
+ /** 属性 key */
316
+ key: string;
317
+ /** 属性值 */
318
+ value: string;
319
+ /** 属性类型 */
320
+ type: AIFieldCustomPropertyType | string;
321
+ }
322
+ /** AI 字段引用字段值 */
323
+ export interface AIFieldReferenceValue {
324
+ /** 字段值 */
325
+ field_value: unknown;
326
+ /** 字段 key */
327
+ field_key: string;
328
+ /** 字段类型 */
329
+ field_type: string;
330
+ /** 字段名称 */
331
+ field_name: string;
332
+ /** 是否内置字段 */
333
+ internal: boolean;
334
+ /** 更新时间 */
335
+ updated_at: number;
336
+ }
337
+ /** AI 字段引用字段变更 */
338
+ export interface AIFieldReferenceChange {
339
+ /** 变更前值 */
340
+ before: AIFieldReferenceValue | null;
341
+ /** 变更后值 */
342
+ after: AIFieldReferenceValue | null;
343
+ }
344
+ /** AI 字段实体信息 */
345
+ export interface AIFieldEntity {
346
+ /** 字段名称 */
347
+ field_name: string;
348
+ /** 字段 key */
349
+ field_key: string;
350
+ /** 字段值 */
351
+ field_value: unknown;
352
+ /** 字段类型 */
353
+ field_type: string;
354
+ /** 是否内置字段 */
355
+ internal: boolean;
356
+ /** 更新时间 */
357
+ updated_at: number;
358
+ /** 引用字段变更信息 */
359
+ reference_changed?: Record<string, AIFieldReferenceChange>;
360
+ /** AI 计算任务 ID */
361
+ task_id: string;
362
+ /** 自定义属性列表 */
363
+ custom_property?: AIFieldCustomProperty[];
364
+ }
365
+ /** AI 字段事件数据 */
366
+ export interface AIFieldEventData extends ListenEventDataBase {
367
+ event_type: AIFieldEventType;
368
+ /** 工作流类型:0=节点流,1=状态流 */
369
+ flow_type: 0 | 1;
370
+ /** 工作项类型 Key */
371
+ work_item_type_key: string;
372
+ /** 关联工作项类型 Key */
373
+ link_work_item_type_key?: string;
374
+ /** 用户信息 */
375
+ user_info: EventUserInfo;
376
+ /** 工作项信息 */
377
+ work_item_info: EventWorkItemInfo[];
378
+ /** AI 字段实体 */
379
+ field_ai_entity: AIFieldEntity;
380
+ }
381
+ /** AI 字段监听事件 */
382
+ export interface AIFieldListenEvent extends ListenEventBase {
383
+ data: AIFieldEventData;
384
+ }
234
385
  /** 所有监听事件数据联合类型 */
235
- export type ListenEventData = WorkItemEventData | NodeEventData | StatusEventData | SubtaskEventData | SpaceMemberEventData | PluginEventData;
386
+ export type ListenEventData = WorkItemEventData | NodeEventData | StatusEventData | SubtaskEventData | SpaceMemberEventData | PluginEventData | AINodeEventData | AIFieldEventData;
236
387
  /** 所有监听事件联合类型 */
237
- export type ListenEvent = WorkItemListenEvent | NodeListenEvent | StatusListenEvent | SubtaskListenEvent | SpaceListenEvent | PluginListenEvent;
388
+ export type ListenEvent = WorkItemListenEvent | NodeListenEvent | StatusListenEvent | SubtaskListenEvent | SpaceListenEvent | PluginListenEvent | AINodeListenEvent | AIFieldListenEvent;
238
389
  /** 拦截事件基础请求体 */
239
390
  export interface InterceptEventBase {
240
391
  /** 日志 ID */
@@ -298,27 +449,39 @@ export interface InterceptResponse {
298
449
  /** 节点拦截配置 */
299
450
  export interface NodeInterceptConfig {
300
451
  /** 节点模板 ID */
301
- template_id: string;
452
+ template_id?: string;
453
+ /** 模板版本,不传时按服务端最新版本处理 */
454
+ version?: number;
302
455
  /** 要拦截的节点 ID 列表 */
303
456
  node_ids?: string[];
304
457
  }
305
458
  /** 状态拦截配置 */
306
459
  export interface StateInterceptConfig {
460
+ /** 工作项类型 */
461
+ work_item_type?: string;
307
462
  /** 状态模板 ID */
308
463
  template_id?: string;
309
464
  /** 兼容旧字段拼写 */
310
465
  tempate_id?: string;
466
+ /** 模板版本,不传时按服务端最新版本处理 */
467
+ version?: number;
311
468
  /** 要拦截的状态流转 ID 列表 */
312
469
  transition_ids?: string[];
470
+ /** 查询示例中的状态 ID 列表别名 */
471
+ state_ids?: string[];
313
472
  }
314
473
  /** 工作项拦截配置 */
315
474
  export interface WorkItemInterceptConfig {
316
475
  /** 工作项类型 */
317
- work_item_type: string;
476
+ work_item_type?: string;
477
+ /** 查询示例中的工作项类型字段别名 */
478
+ workitem_type?: string;
318
479
  /** 要拦截的字段范围(仅 1009、1010 事件适用) */
319
480
  fields?: string[];
320
481
  /** 要拦截的流程模板列表(仅 1006、1007 事件适用) */
321
482
  template_ids?: string[];
483
+ /** 查询示例中的流程模板列表别名 */
484
+ templates?: string[];
322
485
  /** 节点拦截配置(节点系列 2001-2007、子任务系列 4001-4008 适用) */
323
486
  node_intercept_config?: NodeInterceptConfig[];
324
487
  /** 状态拦截配置(3001 适用) */
@@ -329,11 +492,15 @@ export interface ProjectInterceptConfig {
329
492
  /** 拦截配置 ID(查询时返回) */
330
493
  project_intercept_config_id?: string;
331
494
  /** 事件类型列表 */
332
- events: number[];
495
+ events?: number[];
333
496
  /** 工作项类型列表 */
334
- work_item_type: string[];
497
+ work_item_type?: string[];
498
+ /** 查询示例中的工作项类型列表别名 */
499
+ workitem_type?: string[];
335
500
  /** 精细化拦截配置 */
336
501
  work_item_intercept_config?: WorkItemInterceptConfig[];
502
+ /** 查询示例中的精细化拦截配置别名 */
503
+ workitem_intercept_config?: WorkItemInterceptConfig[];
337
504
  }
338
505
  /** 创建拦截配置请求 */
339
506
  export interface CreateInterceptConfigRequest {
@@ -11,3 +11,5 @@ export * from './view.js';
11
11
  export * from './measure.js';
12
12
  export * from './tenant.js';
13
13
  export * from './ainode.js';
14
+ export * from './event.js';
15
+ export * from './aifield.js';
@@ -11,3 +11,5 @@ export * from './view.js';
11
11
  export * from './measure.js';
12
12
  export * from './tenant.js';
13
13
  export * from './ainode.js';
14
+ export * from './event.js';
15
+ export * from './aifield.js';
@@ -33,6 +33,13 @@ export interface MeasureChartsByViewRequest {
33
33
  page_num?: number;
34
34
  page_size?: number;
35
35
  }
36
+ /**
37
+ * 便捷查询视图图表分页参数
38
+ */
39
+ export interface MeasureChartsByViewPageOptions {
40
+ pageNum?: number;
41
+ pageSize?: number;
42
+ }
36
43
  /**
37
44
  * 图表摘要信息
38
45
  */
@@ -37,38 +37,51 @@ export interface TenantRichText {
37
37
  export interface TenantProductPrice {
38
38
  product_key?: string;
39
39
  price_key?: string;
40
+ version?: number;
41
+ name?: string;
42
+ name_i18n?: Record<string, string>;
43
+ external_platform?: string;
40
44
  external_price_key?: string;
41
45
  payment_mode?: string;
42
46
  period_unit?: string;
43
47
  trial_period?: number;
44
48
  trial_product_price?: string;
45
49
  publish_status?: string;
46
- name?: string;
47
- name_i18n?: Record<string, string>;
50
+ purchasable_tenants?: string[];
51
+ currency_code?: string;
48
52
  price?: number;
49
- version?: number;
50
53
  extra?: Record<string, unknown>;
51
54
  }
52
55
  /**
53
56
  * 商品信息
54
57
  */
55
58
  export interface TenantProductInfo {
59
+ product_key?: string;
56
60
  product_type?: string;
57
61
  product_version?: number;
58
- product_key?: string;
62
+ external_product_key?: string;
59
63
  icon_url?: string;
64
+ icon_url_i18n?: Record<string, string>;
60
65
  cover_url?: string;
66
+ cover_url_i18n?: Record<string, string>;
61
67
  name?: string;
68
+ name_i18n?: Record<string, string>;
62
69
  short_desc?: string;
70
+ short_desc_i18n?: Record<string, string>;
63
71
  long_desc?: TenantRichText;
72
+ long_desc_i18n?: Record<string, TenantRichText>;
64
73
  external_platform?: string;
74
+ publish_status?: string;
75
+ app_key?: string;
65
76
  approval_status?: string;
66
77
  product_prices?: TenantProductPrice[];
67
78
  product_price_display?: TenantRichText;
68
79
  product_price_display_i18n?: Record<string, TenantRichText>;
69
80
  sales_tenant?: {
81
+ display_id?: string;
70
82
  tenant_key?: string;
71
83
  tenant_name?: string;
84
+ tenant_key_lark?: string;
72
85
  };
73
86
  extra?: Record<string, unknown>;
74
87
  }
@@ -49,6 +49,10 @@ export interface SearchUsersRequest {
49
49
  * 用户组类型
50
50
  */
51
51
  export type UserGroupType = 'PROJECT_ADMIN' | 'PROJECT_MEMBER' | 'CUSTOMIZE';
52
+ /**
53
+ * 可更新成员的用户组类型
54
+ */
55
+ export type MutableUserGroupType = 'PROJECT_MEMBER' | 'CUSTOMIZE';
52
56
  /**
53
57
  * 创建自定义用户组请求
54
58
  * 接口: POST /open_api/:project_key/user_group
@@ -71,7 +75,7 @@ export interface CreateUserGroupResponse {
71
75
  * 接口: PATCH /open_api/:project_key/user_group/members
72
76
  */
73
77
  export interface UpdateUserGroupMembersRequest {
74
- user_group_type: UserGroupType;
78
+ user_group_type: MutableUserGroupType;
75
79
  user_group_id?: string;
76
80
  add_users?: string[];
77
81
  delete_users?: string[];
@@ -61,6 +61,12 @@ export interface ViewConfListRequest {
61
61
  page_num?: number;
62
62
  is_query_quick_filter?: boolean;
63
63
  }
64
+ /**
65
+ * 按标题模糊查询视图请求
66
+ */
67
+ export interface SearchViewByTitleRequest extends Omit<ViewConfListRequest, 'view_name'> {
68
+ title: string;
69
+ }
64
70
  /**
65
71
  * 视图配置条目
66
72
  */