@satorijs/adapter-dingtalk 2.0.2 → 2.0.4

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 (55) hide show
  1. package/lib/http.d.ts +4 -2
  2. package/lib/index.js +11 -8
  3. package/lib/index.js.map +1 -2
  4. package/package.json +8 -4
  5. package/src/api/.eslintrc.yml +2 -0
  6. package/src/api/alitrip.ts +467 -0
  7. package/src/api/attendance.ts +81 -0
  8. package/src/api/badge.ts +285 -0
  9. package/src/api/blackboard.ts +28 -0
  10. package/src/api/calendar.ts +817 -0
  11. package/src/api/card.ts +215 -0
  12. package/src/api/conference.ts +561 -0
  13. package/src/api/connector.ts +97 -0
  14. package/src/api/contact.ts +56 -0
  15. package/src/api/convFile.ts +166 -0
  16. package/src/api/crm.ts +830 -0
  17. package/src/api/customerService.ts +156 -0
  18. package/src/api/datacenter.ts +672 -0
  19. package/src/api/devicemng.ts +202 -0
  20. package/src/api/diot.ts +19 -0
  21. package/src/api/doc.ts +232 -0
  22. package/src/api/drive.ts +109 -0
  23. package/src/api/edu.ts +30 -0
  24. package/src/api/esign.ts +44 -0
  25. package/src/api/exclusive.ts +372 -0
  26. package/src/api/h3yun.ts +537 -0
  27. package/src/api/hrm.ts +272 -0
  28. package/src/api/im.ts +978 -0
  29. package/src/api/industry.ts +153 -0
  30. package/src/api/jzcrm.ts +304 -0
  31. package/src/api/link.ts +94 -0
  32. package/src/api/live.ts +162 -0
  33. package/src/api/microApp.ts +309 -0
  34. package/src/api/oapi.ts +4083 -0
  35. package/src/api/oauth2.ts +146 -0
  36. package/src/api/pedia.ts +222 -0
  37. package/src/api/project.ts +1519 -0
  38. package/src/api/resident.ts +133 -0
  39. package/src/api/robot.ts +326 -0
  40. package/src/api/rooms.ts +334 -0
  41. package/src/api/serviceGroup.ts +216 -0
  42. package/src/api/storage.ts +1701 -0
  43. package/src/api/swform.ts +94 -0
  44. package/src/api/todo.ts +220 -0
  45. package/src/api/wiki.ts +231 -0
  46. package/src/api/workbench.ts +73 -0
  47. package/src/api/yida.ts +2165 -0
  48. package/src/bot.ts +111 -0
  49. package/src/http.ts +44 -0
  50. package/src/index.ts +9 -0
  51. package/src/internal.ts +47 -0
  52. package/src/message.ts +141 -0
  53. package/src/types/index.ts +140 -0
  54. package/src/utils.ts +51 -0
  55. package/src/ws.ts +55 -0
@@ -0,0 +1,1519 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface CreateProjectCustomfieldStatusParams {
5
+ /** 自定义字段ID。 */
6
+ customFieldId?: string
7
+ /** 自定义字段名称(如果提供自定义字段ID 则忽略)。 */
8
+ customFieldName?: string
9
+ /** 自定义字段InstanceId(如果提供自定义字段ID 或者 自定义字段名称 则忽略)。 */
10
+ customFieldInstanceId?: string
11
+ /** 字段值集合。 */
12
+ value: object[]
13
+ }
14
+
15
+ export interface CreateProjectCustomfieldStatusResponse {
16
+ result?: {
17
+ customFieldId?: string
18
+ originalId?: string
19
+ name?: string
20
+ type?: string
21
+ advancedCustomFieldObjectType?: string
22
+ value?: number
23
+ }
24
+ }
25
+
26
+ export interface UpdateTaskContentParams {
27
+ /** 任务标题。 */
28
+ content?: string
29
+ }
30
+
31
+ export interface UpdateTaskContentResponse {
32
+ result?: {
33
+ content?: string
34
+ updated?: string
35
+ }
36
+ }
37
+
38
+ export interface UpdateTaskNoteParams {
39
+ /** 任务备注。 */
40
+ note?: string
41
+ }
42
+
43
+ export interface UpdateTaskNoteResponse {
44
+ result?: {
45
+ note?: string
46
+ updated?: string
47
+ }
48
+ }
49
+
50
+ export interface UpdateTaskInvolvemembersParams {
51
+ /** 参与者用户userId。 */
52
+ involveMembers?: string[]
53
+ /** 参与者用户userId。 */
54
+ addInvolvers?: string[]
55
+ /** 参与者用户userId。 */
56
+ delInvolvers?: string[]
57
+ }
58
+
59
+ export interface UpdateTaskInvolvemembersResponse {
60
+ result?: {
61
+ involveMembers?: number
62
+ updated?: string
63
+ }
64
+ }
65
+
66
+ export interface UpdateTaskExecutorParams {
67
+ /** 执行者用户userId。 */
68
+ executorId?: string
69
+ }
70
+
71
+ export interface UpdateTaskExecutorResponse {
72
+ result?: {
73
+ executorId?: string
74
+ updated?: string
75
+ }
76
+ }
77
+
78
+ export interface UpdateTaskPriorityParams {
79
+ /** 优先级。 */
80
+ priority?: number
81
+ }
82
+
83
+ export interface UpdateTaskPriorityResponse {
84
+ result?: {
85
+ priority?: number
86
+ updated?: string
87
+ }
88
+ }
89
+
90
+ export interface UpdateTaskDueDateParams {
91
+ /** 截止时间,格式:YYYY-MM-DDTHH:mm:ssZ(ISO 8601/RFC 3339)。 */
92
+ dueDate?: string
93
+ }
94
+
95
+ export interface UpdateTaskDueDateResponse {
96
+ result?: {
97
+ dueDate?: string
98
+ updated?: string
99
+ }
100
+ }
101
+
102
+ export interface GetTaskByIdsQuery {
103
+ /** 任务ID集合,多个taskId,使用逗号分隔。 */
104
+ taskId?: string
105
+ /** 父任务ID。 */
106
+ parentTaskId?: string
107
+ }
108
+
109
+ export interface GetTaskByIdsResponse {
110
+ result?: {
111
+ taskId?: string
112
+ content?: string
113
+ note?: string
114
+ projectId?: string
115
+ ancestorIds?: number
116
+ parentTaskId?: string
117
+ taskflowStatusId?: string
118
+ taskListId?: string
119
+ taskStageId?: string
120
+ tagIds?: number
121
+ creatorId?: string
122
+ executorId?: string
123
+ involveMembers?: number
124
+ priority?: number
125
+ storyPoint?: string
126
+ recurrence?: number
127
+ isDone?: number
128
+ isArchived?: number
129
+ visible?: string
130
+ uniqueId?: string
131
+ startDate?: string
132
+ dueDate?: string
133
+ accomplishTime?: string
134
+ created?: string
135
+ updated?: string
136
+ scenarioFieldConfigId?: string
137
+ sprintId?: string
138
+ customFields?: number
139
+ }[]
140
+ }
141
+
142
+ export interface ArchiveTaskResponse {
143
+ result?: {
144
+ updated?: string
145
+ }
146
+ }
147
+
148
+ export interface SearchUserTaskQuery {
149
+ /** 用户的任务角色。 */
150
+ roleTypes: string
151
+ /** tql内容,详情参见[任务筛选TQL](https://open.dingtalk.com/document/orgapp/the-description-of-the-tql-task)使用说明。 */
152
+ tql?: string
153
+ /** 分页标,从上一次请求结果中获取。 */
154
+ nextToken?: string
155
+ /** 每页返回最大数量。 */
156
+ maxResults?: string
157
+ }
158
+
159
+ export interface SearchUserTaskResponse {
160
+ result?: {
161
+ taskId?: string
162
+ content?: string
163
+ note?: string
164
+ projectId?: string
165
+ ancestorIds?: number
166
+ parentTaskId?: string
167
+ taskflowStatusId?: string
168
+ taskListId?: string
169
+ taskStageId?: string
170
+ tagIds?: number
171
+ creatorId?: string
172
+ executorId?: string
173
+ involveMembers?: number
174
+ priority?: number
175
+ storyPoint?: string
176
+ recurrence?: number
177
+ isDone?: number
178
+ isArchived?: number
179
+ visible?: string
180
+ uniqueId?: string
181
+ startDate?: string
182
+ dueDate?: string
183
+ accomplishTime?: string
184
+ created?: string
185
+ updated?: string
186
+ scenarioFieldConfigId?: string
187
+ sprintId?: string
188
+ customFields?: number
189
+ }[]
190
+ requestId?: string
191
+ }
192
+
193
+ export interface SeachTaskStageQuery {
194
+ /** 任务分组ID: */
195
+ taskListId?: string
196
+ /** 任务列表名字。 */
197
+ query?: string
198
+ /** 每页返回最大数量。 */
199
+ maxResults?: number
200
+ /** 分页标,从上一次请求结果中获取。 */
201
+ nextToken?: string
202
+ /** 任务列表 ID 集合。 */
203
+ taskStageIds?: string
204
+ }
205
+
206
+ export interface SeachTaskStageResponse {
207
+ result?: {
208
+ taskStageId?: string
209
+ name?: string
210
+ description?: string
211
+ projectId?: string
212
+ taskListId?: string
213
+ creatorId?: string
214
+ created?: string
215
+ updated?: string
216
+ }[]
217
+ nextToken?: string
218
+ }
219
+
220
+ export interface SearchTaskListQuery {
221
+ /** 模糊任务分组名字。 */
222
+ query?: string
223
+ /** 每页返回最大数量。 */
224
+ maxResults?: number
225
+ /** 分页标,从上一次请求结果中获取。 */
226
+ nextToken?: string
227
+ /** 任务分组ID集合,多个使用英文逗号隔开。 */
228
+ taskListIds?: string
229
+ }
230
+
231
+ export interface SearchTaskListResponse {
232
+ result?: {
233
+ taskListId?: string
234
+ title?: string
235
+ description?: string
236
+ projectId?: string
237
+ creatorId?: string
238
+ created?: string
239
+ updated?: string
240
+ }[]
241
+ nextToken?: string
242
+ }
243
+
244
+ export interface SearchTaskFlowQuery {
245
+ /** 模糊查询工作流名字。 */
246
+ query?: string
247
+ /** 每页返回最大数量。 */
248
+ maxResults?: number
249
+ /** 分页标,从上一次请求结果中获取。 */
250
+ nextToken?: string
251
+ /** 工作流ID集合。 */
252
+ taskflowIds?: string
253
+ }
254
+
255
+ export interface SearchTaskFlowResponse {
256
+ result?: {
257
+ taskflowId?: string
258
+ name?: string
259
+ boundToObjectId?: string
260
+ boundToObjectType?: string
261
+ creatorId?: string
262
+ isDeleted?: number
263
+ created?: string
264
+ updated?: string
265
+ }[]
266
+ }
267
+
268
+ export interface GetProjectStatusListResponse {
269
+ result?: {
270
+ projectId?: string
271
+ name?: string
272
+ content?: string
273
+ degree?: string
274
+ creatorId?: string
275
+ created?: string
276
+ }[]
277
+ }
278
+
279
+ export interface DeleteProjectMemberParams {
280
+ /** 用户userId。 */
281
+ userIds: string[]
282
+ }
283
+
284
+ export interface DeleteProjectMemberResponse {
285
+ result?: string[]
286
+ }
287
+
288
+ export interface GetProjectMemebersQuery {
289
+ /** 用户ID。 */
290
+ userIds?: string
291
+ /** 项目角色ID。 */
292
+ projectRoleId?: string
293
+ /** 每页返回最大数量。默认10,最大300。 */
294
+ maxResults?: number
295
+ /** 跳过的数据数量。 */
296
+ skip?: number
297
+ }
298
+
299
+ export interface GetProjectMemebersResponse {
300
+ result?: {
301
+ memberId?: string
302
+ userId?: string
303
+ role?: number
304
+ roleIds?: number
305
+ }[]
306
+ }
307
+
308
+ export interface QueryProjectQuery {
309
+ /** 项目ID集合: */
310
+ projectIds?: string
311
+ /** 项目名字(模糊匹配)。 */
312
+ name?: string
313
+ /** 分页大小。每页返回最大数量。 */
314
+ maxResults?: number
315
+ /** 分页标。供分页使用,下一页token,从当前页结果中获取。 */
316
+ nextToken?: string
317
+ /** 原始项目ID。 */
318
+ sourceId?: string
319
+ }
320
+
321
+ export interface QueryProjectResponse {
322
+ result?: {
323
+ projectId?: string
324
+ name?: string
325
+ logo?: string
326
+ description?: string
327
+ organizationId?: string
328
+ visibility?: string
329
+ isTemplate?: number
330
+ creatorId?: string
331
+ isArchived?: number
332
+ isSuspended?: number
333
+ uniqueIdPrefix?: string
334
+ created?: string
335
+ updated?: string
336
+ startDate?: string
337
+ endDate?: string
338
+ customFields?: number
339
+ }[]
340
+ nextToken?: string
341
+ requestId?: string
342
+ }
343
+
344
+ export interface SearchTaskflowStatusQuery {
345
+ /** 模糊查询工作流状态名字。 */
346
+ query?: string
347
+ /** 每页返回最大数量。 */
348
+ maxResults?: number
349
+ /** 分页标,从上一次请求结果中获取。 */
350
+ nextToken?: string
351
+ /** 工作流ID集合。 */
352
+ tfIds?: string
353
+ /** 工作流状态ID集合。 */
354
+ tfsIds?: string
355
+ }
356
+
357
+ export interface SearchTaskflowStatusResponse {
358
+ result?: {
359
+ taskflowStatusId?: string
360
+ name?: string
361
+ pos?: number
362
+ taskflowId?: string
363
+ rejectStatusIds?: number
364
+ kind?: string
365
+ creatorId?: string
366
+ isDeleted?: number
367
+ created?: string
368
+ updated?: string
369
+ isTaskflowstatusruleexector?: number
370
+ }[]
371
+ }
372
+
373
+ export interface UpdateTaskTaskflowstatusParams {
374
+ /** 任务状态ID。 */
375
+ taskflowStatusId?: string
376
+ taskflowStatusUpdateNote?: string
377
+ }
378
+
379
+ export interface UpdateTaskTaskflowstatusResponse {
380
+ result?: {
381
+ updated?: string
382
+ }
383
+ }
384
+
385
+ export interface UpdateTaskStartdateParams {
386
+ /** 任务开始时间,格式:YYYY-MM-DDTHH:mm:ssZ(ISO 8601/RFC 3339)。 */
387
+ startDate?: string
388
+ }
389
+
390
+ export interface UpdateTaskStartdateResponse {
391
+ result?: {
392
+ startDate?: string
393
+ updated?: string
394
+ }
395
+ }
396
+
397
+ export interface CreateProjectParams {
398
+ /** 项目名称。 */
399
+ name?: string
400
+ }
401
+
402
+ export interface CreateProjectResponse {
403
+ result?: {
404
+ projectId?: string
405
+ name?: string
406
+ creatorId?: string
407
+ logo?: string
408
+ visibility?: string
409
+ uniqueIdPrefix?: string
410
+ created?: string
411
+ updated?: string
412
+ isArchived?: number
413
+ isSuspended?: number
414
+ normalType?: string
415
+ rootCollectionId?: string
416
+ sourceId?: string
417
+ defaultCollectionId?: string
418
+ isTemplate?: number
419
+ customFields?: number
420
+ }
421
+ }
422
+
423
+ export interface GetUserJoinedProjectQuery {
424
+ /** 分页大小。 */
425
+ maxResults?: number
426
+ /** 分页标。 */
427
+ nextToken?: string
428
+ }
429
+
430
+ export interface GetUserJoinedProjectResponse {
431
+ result?: string[]
432
+ nextToken?: string
433
+ }
434
+
435
+ export interface ArchiveProjectResponse {
436
+ result?: {
437
+ isArchived?: number
438
+ updated?: string
439
+ }
440
+ }
441
+
442
+ export interface UnSuspendProjectResponse {
443
+ result?: {
444
+ updated?: string
445
+ }
446
+ }
447
+
448
+ export interface SuspendProjectResponse {
449
+ result?: {
450
+ updated?: string
451
+ }
452
+ }
453
+
454
+ export interface QueryTaskOfProjectQuery {
455
+ /** 分页游标。 */
456
+ nextToken?: string
457
+ /** 每页返回最大数量。默认10,最大500。 */
458
+ maxResults?: number
459
+ /** 查询条件。 */
460
+ query?: string
461
+ }
462
+
463
+ export interface QueryTaskOfProjectResponse {
464
+ totalCount: number
465
+ nextToken: string
466
+ result?: {
467
+ taskId?: string
468
+ content?: string
469
+ involveMembers?: number
470
+ projectId?: string
471
+ executorId?: string
472
+ creatorId?: string
473
+ isDeleted?: number
474
+ labels?: number
475
+ created?: string
476
+ updated?: string
477
+ scenariofieldconfigId?: string
478
+ customfields?: number
479
+ note?: string
480
+ startDate?: string
481
+ dueDate?: string
482
+ priority?: number
483
+ taskflowstatusId?: string
484
+ isDone?: number
485
+ isArchived?: number
486
+ visible?: string
487
+ tagIds?: number
488
+ stageId?: string
489
+ sprintId?: string
490
+ accomplished?: string
491
+ storyPoint?: number
492
+ progress?: number
493
+ ancestorIds?: number
494
+ }[]
495
+ }
496
+
497
+ export interface CreateWorkTimeParams {
498
+ /** 任务执行者userId。 */
499
+ executorId: string
500
+ /** 对象ID,传项目任务ID。 */
501
+ objectId: string
502
+ /** 对象类型,固定值为task,表示项目任务。 */
503
+ objectType: string
504
+ /** 工时提交人员的userId。 */
505
+ submitterId: string
506
+ /** 当startDate和endDate指定的时间跨天时,添加的工时时长是否连续。 */
507
+ isDuration: unknown
508
+ /** 添加实际工时的日期是否包含假期。 */
509
+ includesHolidays: unknown
510
+ /** 添加实际工时的开始日期。 */
511
+ startDate: string
512
+ /** 结束时间。 */
513
+ endDate: string
514
+ /** 实际工时时长,单位毫秒,1小时即为3600000。 */
515
+ workTime: number
516
+ }
517
+
518
+ export interface CreateWorkTimeQuery {
519
+ /** 接口校验类型,固定值:organization。 */
520
+ tenantType: string
521
+ }
522
+
523
+ export interface CreateWorkTimeResponse {
524
+ result?: {
525
+ ok?: number
526
+ message?: string
527
+ body?: number
528
+ }
529
+ }
530
+
531
+ export interface CreatePlanTimeParams {
532
+ /** 目标任务的执行者userId。 */
533
+ executorId: string
534
+ /** 对象ID,传项目任务ID。 */
535
+ objectId: string
536
+ /** 对象类型,固定值为task,表示项目任务。 */
537
+ objectType: string
538
+ /** 当startDate和endDate指定的时间跨天时,添加的工时时长是否连续。 */
539
+ isDuration: unknown
540
+ /** 添加计划工时的日期是否包含假期。 */
541
+ includesHolidays: unknown
542
+ /** 工时提交人员的userId。 */
543
+ submitterId: string
544
+ /** 开始时间。 */
545
+ startDate: string
546
+ /** 结束时间。 */
547
+ endDate: string
548
+ /** 计划工时时长,单位毫秒,1小时即为3600000。 */
549
+ planTime: number
550
+ }
551
+
552
+ export interface CreatePlanTimeQuery {
553
+ /** 接口校验类型,目前为固定值:organization。 */
554
+ tenantType: string
555
+ }
556
+
557
+ export interface CreatePlanTimeResponse {
558
+ result?: {
559
+ ok?: number
560
+ message?: string
561
+ body?: number
562
+ }
563
+ }
564
+
565
+ export interface UpdateCustomfieldValueParams {
566
+ /** 自定义字段名。 */
567
+ customFieldName?: string
568
+ /** 自定义对象值。 */
569
+ value: object[]
570
+ /** 自定义字段id。 */
571
+ customFieldId?: string
572
+ }
573
+
574
+ export interface UpdateCustomfieldValueResponse {
575
+ result?: {
576
+ customFields?: number
577
+ }
578
+ }
579
+
580
+ export interface GetTbUserIdByStaffIdQuery {
581
+ /** 操作者userId。 */
582
+ optUserId: string
583
+ /** 需要被查询的用户userId。 */
584
+ userId: string
585
+ }
586
+
587
+ export interface GetTbUserIdByStaffIdResponse {
588
+ result: {
589
+ tbUserId: string
590
+ }
591
+ }
592
+
593
+ export interface GetTbOrgIdByDingOrgIdQuery {
594
+ /** 操作者userId。 */
595
+ optUserId: string
596
+ }
597
+
598
+ export interface GetTbOrgIdByDingOrgIdResponse {
599
+ result: {
600
+ tbOrganizationId: string
601
+ }
602
+ }
603
+
604
+ export interface UpdateProjectGroupParams {
605
+ /** 将项目添加到的目标项目分组Id列表,最大值5。 */
606
+ addProjectGroupIds?: string[]
607
+ /** 移除该项目的项目分组Id列表,最大值5。 */
608
+ delProjectGroupIds?: string[]
609
+ }
610
+
611
+ export interface UpdateProjectGroupResponse {
612
+ result?: {
613
+ ok?: number
614
+ }
615
+ }
616
+
617
+ export interface AddProjectMemberParams {
618
+ /** 被添加的用户userId列表,建议一次不超过10个。 */
619
+ userIds: string[]
620
+ }
621
+
622
+ export interface AddProjectMemberResponse {
623
+ result?: {
624
+ nickname?: string
625
+ joined?: string
626
+ }[]
627
+ }
628
+
629
+ export interface CreateProjectByTemplateParams {
630
+ /** 项目名字。 */
631
+ name: string
632
+ /** 模板Id。 */
633
+ templateId: string
634
+ }
635
+
636
+ export interface CreateProjectByTemplateResponse {
637
+ result?: {
638
+ id?: string
639
+ name?: string
640
+ created?: string
641
+ logo?: string
642
+ }
643
+ }
644
+
645
+ export interface GetProjectGroupQuery {
646
+ /** 查看者userId,即查询该员工可见的项目分组。 */
647
+ viewerId?: string
648
+ /** 分页大小。从1开始,默认值10,最大值1000。 */
649
+ pageSize?: number
650
+ }
651
+
652
+ export interface GetProjectGroupResponse {
653
+ result?: {
654
+ id?: string
655
+ visible?: string
656
+ name?: string
657
+ created?: string
658
+ updated?: string
659
+ }[]
660
+ }
661
+
662
+ export interface SearchProjectTemplateQuery {
663
+ /** 项目模板名称关键词。 */
664
+ keyword?: string
665
+ }
666
+
667
+ export interface SearchProjectTemplateResponse {
668
+ result?: {
669
+ id?: string
670
+ description?: string
671
+ visible?: string
672
+ isDemo?: number
673
+ isDeleted?: number
674
+ name?: string
675
+ logo?: string
676
+ created?: string
677
+ updated?: string
678
+ }[]
679
+ }
680
+
681
+ export interface CreateTaskObjectLinkParams {
682
+ /** 关联内容信息。 */
683
+ linkedData?: unknown
684
+ }
685
+
686
+ export interface CreateTaskObjectLinkResponse {
687
+ result?: {
688
+ created?: string
689
+ objectLinkId?: string
690
+ }
691
+ }
692
+
693
+ export interface CreateTaskParams {
694
+ /** 项目id。 */
695
+ projectId: string
696
+ /** 任务标题。 */
697
+ content: string
698
+ /** 任务执行者userId。 */
699
+ executorId?: string
700
+ /** 任务截止时间,格式:YYYY-MM-DDTHH:mm:ssZ(ISO 8601/RFC 3339)。 */
701
+ dueDate?: string
702
+ /** 任务备注。 */
703
+ note?: string
704
+ /** 任务优先级。 */
705
+ priority?: number
706
+ /** 自定义业务字段。 */
707
+ customfields?: object[]
708
+ /** 任务列表ID。 */
709
+ stageId?: string
710
+ /** 父任务id。 */
711
+ parentTaskId?: string
712
+ /** 任务类型id,任务类型比如:缺陷、需求。 */
713
+ scenariofieldconfigId?: string
714
+ /** 任务开始时间,iso8601格式,例如:2022-07-29T14:55Z。 */
715
+ startDate?: string
716
+ /** 任务的可见性规则。 */
717
+ visible?: string
718
+ }
719
+
720
+ export interface CreateTaskResponse {
721
+ result?: {
722
+ taskId?: string
723
+ content?: string
724
+ involveMembers?: number
725
+ projectId?: string
726
+ executorId?: string
727
+ creatorId?: string
728
+ created?: string
729
+ updated?: string
730
+ note?: string
731
+ dueDate?: string
732
+ priority?: number
733
+ customfields?: number
734
+ }
735
+ }
736
+
737
+ export interface GetOrganizatioTaskByIdsQuery {
738
+ /** 任务id列表,建议不超过20个,多个任务id之间使用`,`分开。 */
739
+ taskIds: string
740
+ }
741
+
742
+ export interface GetOrganizatioTaskByIdsResponse {
743
+ result?: {
744
+ note?: string
745
+ visible?: string
746
+ executorId?: string
747
+ created?: string
748
+ dueDate?: string
749
+ creatorId?: string
750
+ involveMembers?: number
751
+ priority?: number
752
+ isDone?: number
753
+ content?: string
754
+ labels?: number
755
+ isDeleted?: number
756
+ ancestorIds?: number
757
+ taskId?: string
758
+ updated?: string
759
+ startDate?: string
760
+ }[]
761
+ }
762
+
763
+ export interface UpdateOrganizationTaskPriorityParams {
764
+ /** 自由任务优先级。 */
765
+ priority: number
766
+ /** 是否禁止动态。 */
767
+ disableActivity?: unknown
768
+ /** 是否禁止通知。 */
769
+ disableNotification?: unknown
770
+ }
771
+
772
+ export interface UpdateOrganizationTaskPriorityResponse {
773
+ result?: {
774
+ priority?: number
775
+ updated?: string
776
+ }
777
+ }
778
+
779
+ export interface UpdateOrganizationTaskNoteParams {
780
+ /** 任务备注。 */
781
+ note: string
782
+ /** 是否禁止动态。 */
783
+ disableActivity?: unknown
784
+ /** 是否禁止通知。 */
785
+ disableNotification?: unknown
786
+ }
787
+
788
+ export interface UpdateOrganizationTaskNoteResponse {
789
+ result?: {
790
+ note?: string
791
+ updated?: string
792
+ }
793
+ }
794
+
795
+ export interface UpdateOrganizationTaskInvolveMembersParams {
796
+ /** 所有参与者userId列表,建议参与者总人数不超过20个。 */
797
+ involveMembers?: string[]
798
+ /** 增加的参与者userId列表,建议参与者总人数不超过20个。 */
799
+ addInvolvers?: string[]
800
+ /** 删除的参与者userId列表。 */
801
+ delInvolvers?: string[]
802
+ /** 是否禁止动态。 */
803
+ disableActivity?: unknown
804
+ /** 是否禁止通知。 */
805
+ disableNotification?: unknown
806
+ }
807
+
808
+ export interface UpdateOrganizationTaskInvolveMembersResponse {
809
+ result?: {
810
+ involvers?: number
811
+ updated?: string
812
+ }
813
+ }
814
+
815
+ export interface UpdateOrganizationTaskExecutorParams {
816
+ /** 任务执行者userId。 */
817
+ executorId: string
818
+ /** 是否禁止动态。 */
819
+ disableActivity?: unknown
820
+ /** 是否禁止通知。 */
821
+ disableNotification?: unknown
822
+ }
823
+
824
+ export interface UpdateOrganizationTaskExecutorResponse {
825
+ result?: {
826
+ executorId?: string
827
+ updated?: string
828
+ executor?: number
829
+ involvers?: number
830
+ }
831
+ }
832
+
833
+ export interface UpdateOrganizationTaskDueDateParams {
834
+ /** 任务截止时间,格式:YYYY-MM-DDTHH:mm:ssZ(ISO 8601/RFC 3339)。 */
835
+ dueDate: string
836
+ /** 是否禁止动态。 */
837
+ disableActivity?: unknown
838
+ /** 是否禁止通知。 */
839
+ disableNotification?: unknown
840
+ }
841
+
842
+ export interface UpdateOrganizationTaskDueDateResponse {
843
+ result?: {
844
+ dueDate?: string
845
+ updateTime?: string
846
+ }
847
+ }
848
+
849
+ export interface UpdateOrganizationTaskContentParams {
850
+ /** 任务标题。 */
851
+ content: string
852
+ /** 是否禁止动态。 */
853
+ disableActivity?: unknown
854
+ /** 是否禁止通知。 */
855
+ disableNotification?: unknown
856
+ }
857
+
858
+ export interface UpdateOrganizationTaskContentResponse {
859
+ result?: {
860
+ content?: string
861
+ updated?: string
862
+ }
863
+ }
864
+
865
+ export interface UpdateOrganizationTaskStatusParams {
866
+ /** 自由任务状态。 */
867
+ isDone: unknown
868
+ /** 是否禁止动态。 */
869
+ disableActivity?: unknown
870
+ /** 是否禁止通知。 */
871
+ disableNotification?: unknown
872
+ }
873
+
874
+ export interface UpdateOrganizationTaskStatusResponse {
875
+ result?: {
876
+ isDone?: number
877
+ updateTime?: string
878
+ }
879
+ }
880
+
881
+ export interface GetOrganizationPriorityListResponse {
882
+ result?: {
883
+ color?: string
884
+ name?: string
885
+ priorityId?: string
886
+ priority?: string
887
+ }[]
888
+ }
889
+
890
+ export interface GetOrganizationTaskResponse {
891
+ result?: {
892
+ note?: string
893
+ visible?: string
894
+ executorId?: string
895
+ created?: string
896
+ dueDate?: string
897
+ creatorId?: string
898
+ involveMembers?: number
899
+ priority?: number
900
+ isDone?: number
901
+ content?: string
902
+ labels?: number
903
+ isDeleted?: number
904
+ ancestorIds?: number
905
+ taskId?: string
906
+ updated?: string
907
+ startDate?: string
908
+ }
909
+ }
910
+
911
+ export interface DeleteTaskResponse {
912
+ result?: unknown
913
+ }
914
+
915
+ export interface CreateOrganizationTaskParams {
916
+ /** 任务标题。 */
917
+ content: string
918
+ /** 任务备注。 */
919
+ note?: string
920
+ /** 自由任务优先级,如下图所示。用户是否有自定义更新优先级,获取该参数方法不同。 */
921
+ priority: number
922
+ /** 参与者userId列表,建议参与者总人数不超过20个。 */
923
+ involveMembers?: string[]
924
+ /** 执行者userId。 */
925
+ executorId?: string
926
+ /** 任务截止日期,格式:YYYY-MM-DDTHH:mm:ssZ(ISO 8601/RFC 3339)。 */
927
+ dueDate?: string
928
+ /** 任务创建日期,格式:YYYY-MM-DDTHH:mm:ssZ(ISO 8601/RFC 3339)。 */
929
+ createTime?: string
930
+ /** 任务可见性。 */
931
+ visible: string
932
+ /** 是否禁止通知。 */
933
+ disableNotification?: unknown
934
+ /** 是否禁止动态。 */
935
+ disableActivity?: unknown
936
+ }
937
+
938
+ export interface CreateOrganizationTaskResponse {
939
+ result?: {
940
+ dueDate?: string
941
+ executor?: number
942
+ id?: string
943
+ visible?: string
944
+ created?: string
945
+ priority?: number
946
+ involvers?: number
947
+ updated?: string
948
+ note?: string
949
+ hasReminder?: number
950
+ creatorId?: string
951
+ content?: string
952
+ attachmentsCount?: number
953
+ isDeleted?: number
954
+ ancestorIds?: number
955
+ creator?: number
956
+ executorId?: string
957
+ involveMembers?: number
958
+ isDone?: string
959
+ }
960
+ }
961
+
962
+ // funcName: isOldApi
963
+ Internal.define({
964
+ '/project/users/{userId}/projects/{projectId}/customfields': {
965
+ PUT: { createProjectCustomfieldStatus: false },
966
+ },
967
+ '/project/users/{userId}/tasks/{taskId}/contents': {
968
+ PUT: { updateTaskContent: false },
969
+ },
970
+ '/project/users/{userId}/tasks/{taskId}/notes': {
971
+ PUT: { updateTaskNote: false },
972
+ },
973
+ '/project/users/{userId}/tasks/{taskId}/involveMembers': {
974
+ PUT: { updateTaskInvolvemembers: false },
975
+ },
976
+ '/project/users/{userId}/tasks/{taskId}/executors': {
977
+ PUT: { updateTaskExecutor: false },
978
+ },
979
+ '/project/users/{userId}/tasks/{taskId}/priorities': {
980
+ PUT: { updateTaskPriority: false },
981
+ },
982
+ '/project/users/{userId}/tasks/{taskId}/dueDates': {
983
+ PUT: { updateTaskDueDate: false },
984
+ },
985
+ '/project/users/{userId}/tasks': {
986
+ GET: { getTaskByIds: false },
987
+ POST: { createTask: false },
988
+ },
989
+ '/project/users/{userId}/tasks/{taskId}/archive': {
990
+ POST: { archiveTask: false },
991
+ },
992
+ '/project/users/{userId}/tasks/search': { POST: { searchUserTask: false } },
993
+ '/project/users/{userId}/projects/{projectId}/taskStages/search': {
994
+ POST: { seachTaskStage: false },
995
+ },
996
+ '/project/users/{userId}/projects/{projectId}/taskLists/search': {
997
+ POST: { searchTaskList: false },
998
+ },
999
+ '/project/users/{userId}/projects/{projectId}/taskflows/search': {
1000
+ POST: { searchTaskFlow: false },
1001
+ },
1002
+ '/project/users/{userId}/projects/{projectId}/statuses': {
1003
+ GET: { getProjectStatusList: false },
1004
+ },
1005
+ '/project/users/{userId}/projects/{projectId}/members/remove': {
1006
+ POST: { deleteProjectMember: false },
1007
+ },
1008
+ '/project/users/{userId}/projects/{projectId}/members': {
1009
+ GET: { getProjectMemebers: false },
1010
+ POST: { addProjectMember: false },
1011
+ },
1012
+ '/project/users/{userId}/projects/query': { POST: { queryProject: false } },
1013
+ '/project/users/{userId}/projects/{projectId}/taskflowStatuses/search': {
1014
+ GET: { searchTaskflowStatus: false },
1015
+ },
1016
+ '/project/users/{userId}/tasks/{taskId}/taskflowStatuses': {
1017
+ PUT: { updateTaskTaskflowstatus: false },
1018
+ },
1019
+ '/project/users/{userId}/tasks/{taskId}/startDates': {
1020
+ PUT: { updateTaskStartdate: false },
1021
+ },
1022
+ '/project/users/{userId}/projects': { POST: { createProject: false } },
1023
+ '/project/users/{userId}/joinProjects': {
1024
+ GET: { getUserJoinedProject: false },
1025
+ },
1026
+ '/project/users/{userId}/projects/{projectId}/archive': {
1027
+ POST: { archiveProject: false },
1028
+ },
1029
+ '/project/users/{userId}/projects/{projectId}/unsuspend': {
1030
+ POST: { unSuspendProject: false },
1031
+ },
1032
+ '/project/users/{userId}/projects/{projectId}/suspend': {
1033
+ POST: { suspendProject: false },
1034
+ },
1035
+ '/project/users/{userId}/projectIds/{projectId}/tasks': {
1036
+ GET: { queryTaskOfProject: false },
1037
+ },
1038
+ '/project/users/{userId}/workTimes': { POST: { createWorkTime: false } },
1039
+ '/project/users/{userId}/planTimes': { POST: { createPlanTime: false } },
1040
+ '/project/users/{userId}/tasks/{taskId}/customFields': {
1041
+ PUT: { updateCustomfieldValue: false },
1042
+ },
1043
+ '/project/teambition/users': { GET: { getTbUserIdByStaffId: false } },
1044
+ '/project/teambition/organizations': {
1045
+ GET: { getTbOrgIdByDingOrgId: false },
1046
+ },
1047
+ '/project/users/{userId}/projects/{projectId}/groups': {
1048
+ PUT: { updateProjectGroup: false },
1049
+ },
1050
+ '/project/users/{userId}/templates/projects': {
1051
+ POST: { createProjectByTemplate: false },
1052
+ },
1053
+ '/project/organizations/users/{userId}/groups': {
1054
+ GET: { getProjectGroup: false },
1055
+ },
1056
+ '/project/organizations/users/{userId}/templates': {
1057
+ GET: { searchProjectTemplate: false },
1058
+ },
1059
+ '/project/users/{userId}/tasks/{taskId}/objectLinks': {
1060
+ POST: { createTaskObjectLink: false },
1061
+ },
1062
+ '/project/organizations/users/{userId}/tasks': {
1063
+ GET: { getOrganizatioTaskByIds: false },
1064
+ POST: { createOrganizationTask: false },
1065
+ },
1066
+ '/project/organizations/users/{userId}/tasks/{taskId}/priorities': {
1067
+ PUT: { updateOrganizationTaskPriority: false },
1068
+ },
1069
+ '/project/organizations/users/{userId}/tasks/{taskId}/notes': {
1070
+ PUT: { updateOrganizationTaskNote: false },
1071
+ },
1072
+ '/project/organizations/users/{userId}/tasks/{taskId}/involveMembers': {
1073
+ PUT: { updateOrganizationTaskInvolveMembers: false },
1074
+ },
1075
+ '/project/organizations/users/{userId}/tasks/{taskId}/executors': {
1076
+ PUT: { updateOrganizationTaskExecutor: false },
1077
+ },
1078
+ '/project/organizations/users/{userId}/tasks/{taskId}/dueDates': {
1079
+ PUT: { updateOrganizationTaskDueDate: false },
1080
+ },
1081
+ '/project/organizations/users/{userId}/tasks/{taskId}/contents': {
1082
+ PUT: { updateOrganizationTaskContent: false },
1083
+ },
1084
+ '/project/organizations/users/{userId}/tasks/{taskId}/states': {
1085
+ PUT: { updateOrganizationTaskStatus: false },
1086
+ },
1087
+ '/project/organizations/users/{userId}/priorities': {
1088
+ GET: { getOrganizationPriorityList: false },
1089
+ },
1090
+ '/project/organizations/users/{userId}/tasks/{taskId}': {
1091
+ GET: { getOrganizationTask: false },
1092
+ },
1093
+ '/project/users/{userId}/tasks/{taskId}': { DELETE: { deleteTask: false } },
1094
+ })
1095
+
1096
+ declare module '../internal' {
1097
+ interface Internal {
1098
+ /**
1099
+ * 创建或更新项目概览中自定义字段值
1100
+ * @see https://open.dingtalk.com/document/orgapp/create-project-custom-fields
1101
+ */
1102
+ createProjectCustomfieldStatus(
1103
+ userId: string,
1104
+ projectId: string,
1105
+ params: CreateProjectCustomfieldStatusParams,
1106
+ ): Promise<CreateProjectCustomfieldStatusResponse>
1107
+ /**
1108
+ * 更新任务标题
1109
+ * @see https://open.dingtalk.com/document/orgapp/update-task-content
1110
+ */
1111
+ updateTaskContent(
1112
+ userId: string,
1113
+ taskId: string,
1114
+ params: UpdateTaskContentParams,
1115
+ ): Promise<UpdateTaskContentResponse>
1116
+ /**
1117
+ * 更新任务备注
1118
+ * @see https://open.dingtalk.com/document/orgapp/update-task-notes
1119
+ */
1120
+ updateTaskNote(
1121
+ userId: string,
1122
+ taskId: string,
1123
+ params: UpdateTaskNoteParams,
1124
+ ): Promise<UpdateTaskNoteResponse>
1125
+ /**
1126
+ * 更新任务参与者
1127
+ * @see https://open.dingtalk.com/document/orgapp/update-task-participants
1128
+ */
1129
+ updateTaskInvolvemembers(
1130
+ userId: string,
1131
+ taskId: string,
1132
+ params: UpdateTaskInvolvemembersParams,
1133
+ ): Promise<UpdateTaskInvolvemembersResponse>
1134
+ /**
1135
+ * 更新任务执行者
1136
+ * @see https://open.dingtalk.com/document/orgapp/update-task-performer
1137
+ */
1138
+ updateTaskExecutor(
1139
+ userId: string,
1140
+ taskId: string,
1141
+ params: UpdateTaskExecutorParams,
1142
+ ): Promise<UpdateTaskExecutorResponse>
1143
+ /**
1144
+ * 更新任务优先级
1145
+ * @see https://open.dingtalk.com/document/orgapp/update-task-priority
1146
+ */
1147
+ updateTaskPriority(
1148
+ userId: string,
1149
+ taskId: string,
1150
+ params: UpdateTaskPriorityParams,
1151
+ ): Promise<UpdateTaskPriorityResponse>
1152
+ /**
1153
+ * 更新任务截止时间
1154
+ * @see https://open.dingtalk.com/document/orgapp/update-task-deadline
1155
+ */
1156
+ updateTaskDueDate(
1157
+ userId: string,
1158
+ taskId: string,
1159
+ params: UpdateTaskDueDateParams,
1160
+ ): Promise<UpdateTaskDueDateResponse>
1161
+ /**
1162
+ * 获取任务详情
1163
+ * @see https://open.dingtalk.com/document/orgapp/get-task-details
1164
+ */
1165
+ getTaskByIds(
1166
+ userId: string,
1167
+ query: GetTaskByIdsQuery,
1168
+ ): Promise<GetTaskByIdsResponse>
1169
+ /**
1170
+ * 任务迁移至回收站
1171
+ * @see https://open.dingtalk.com/document/orgapp/archive-tasks
1172
+ */
1173
+ archiveTask(userId: string, taskId: string): Promise<ArchiveTaskResponse>
1174
+ /**
1175
+ * 查询用户任务列表
1176
+ * @see https://open.dingtalk.com/document/orgapp/querying-user-tasks
1177
+ */
1178
+ searchUserTask(
1179
+ userId: string,
1180
+ query: SearchUserTaskQuery,
1181
+ ): Promise<SearchUserTaskResponse>
1182
+ /**
1183
+ * 获取任务列表
1184
+ * @see https://open.dingtalk.com/document/orgapp/get-task-list
1185
+ */
1186
+ seachTaskStage(
1187
+ userId: string,
1188
+ projectId: string,
1189
+ query: SeachTaskStageQuery,
1190
+ ): Promise<SeachTaskStageResponse>
1191
+ /**
1192
+ * 查询任务分组
1193
+ * @see https://open.dingtalk.com/document/orgapp/query-task-grouping
1194
+ */
1195
+ searchTaskList(
1196
+ userId: string,
1197
+ projectId: string,
1198
+ query: SearchTaskListQuery,
1199
+ ): Promise<SearchTaskListResponse>
1200
+ /**
1201
+ * 查询任务工作流
1202
+ * @see https://open.dingtalk.com/document/orgapp/query-task-workflow
1203
+ */
1204
+ searchTaskFlow(
1205
+ userId: string,
1206
+ projectId: string,
1207
+ query: SearchTaskFlowQuery,
1208
+ ): Promise<SearchTaskFlowResponse>
1209
+ /**
1210
+ * 查询项目状态
1211
+ * @see https://open.dingtalk.com/document/orgapp/query-project-status
1212
+ */
1213
+ getProjectStatusList(
1214
+ userId: string,
1215
+ projectId: string,
1216
+ ): Promise<GetProjectStatusListResponse>
1217
+ /**
1218
+ * 删除项目成员
1219
+ * @see https://open.dingtalk.com/document/orgapp/delete-project-members
1220
+ */
1221
+ deleteProjectMember(
1222
+ userId: string,
1223
+ projectId: string,
1224
+ params: DeleteProjectMemberParams,
1225
+ ): Promise<DeleteProjectMemberResponse>
1226
+ /**
1227
+ * 获取项目成员
1228
+ * @see https://open.dingtalk.com/document/orgapp/get-project-members
1229
+ */
1230
+ getProjectMemebers(
1231
+ userId: string,
1232
+ projectId: string,
1233
+ query: GetProjectMemebersQuery,
1234
+ ): Promise<GetProjectMemebersResponse>
1235
+ /**
1236
+ * 查询项目
1237
+ * @see https://open.dingtalk.com/document/orgapp/query-enterprise-all-projects
1238
+ */
1239
+ queryProject(
1240
+ userId: string,
1241
+ query: QueryProjectQuery,
1242
+ ): Promise<QueryProjectResponse>
1243
+ /**
1244
+ * 搜索任务工作流状态
1245
+ * @see https://open.dingtalk.com/document/isvapp/search-task-workflow-status
1246
+ */
1247
+ searchTaskflowStatus(
1248
+ userId: string,
1249
+ projectId: string,
1250
+ query: SearchTaskflowStatusQuery,
1251
+ ): Promise<SearchTaskflowStatusResponse>
1252
+ /**
1253
+ * 更新任务工作流状态
1254
+ * @see https://open.dingtalk.com/document/isvapp/update-task-workflow-status
1255
+ */
1256
+ updateTaskTaskflowstatus(
1257
+ userId: string,
1258
+ taskId: string,
1259
+ params: UpdateTaskTaskflowstatusParams,
1260
+ ): Promise<UpdateTaskTaskflowstatusResponse>
1261
+ /**
1262
+ * 更新任务开始时间
1263
+ * @see https://open.dingtalk.com/document/orgapp/update-task-start-time
1264
+ */
1265
+ updateTaskStartdate(
1266
+ userId: string,
1267
+ taskId: string,
1268
+ params: UpdateTaskStartdateParams,
1269
+ ): Promise<UpdateTaskStartdateResponse>
1270
+ /**
1271
+ * 创建项目
1272
+ * @see https://open.dingtalk.com/document/orgapp/create-project
1273
+ */
1274
+ createProject(
1275
+ userId: string,
1276
+ params: CreateProjectParams,
1277
+ ): Promise<CreateProjectResponse>
1278
+ /**
1279
+ * 获取用户加入的项目
1280
+ * @see https://open.dingtalk.com/document/orgapp/get-projects-joined-by-users
1281
+ */
1282
+ getUserJoinedProject(
1283
+ userId: string,
1284
+ query: GetUserJoinedProjectQuery,
1285
+ ): Promise<GetUserJoinedProjectResponse>
1286
+ /**
1287
+ * 项目放入回收站
1288
+ * @see https://open.dingtalk.com/document/orgapp/items-in-recycle-bin
1289
+ */
1290
+ archiveProject(
1291
+ userId: string,
1292
+ projectId: string,
1293
+ ): Promise<ArchiveProjectResponse>
1294
+ /**
1295
+ * 恢复项目归档
1296
+ * @see https://open.dingtalk.com/document/orgapp/cancel-project-archiving
1297
+ */
1298
+ unSuspendProject(
1299
+ projectId: string,
1300
+ userId: string,
1301
+ ): Promise<UnSuspendProjectResponse>
1302
+ /**
1303
+ * 归档项目
1304
+ * @see https://open.dingtalk.com/document/orgapp/archiving-project
1305
+ */
1306
+ suspendProject(
1307
+ projectId: string,
1308
+ userId: string,
1309
+ ): Promise<SuspendProjectResponse>
1310
+ /**
1311
+ * 查询项目中的任务
1312
+ * @see https://open.dingtalk.com/document/isvapp/query-tasks-in-a-project
1313
+ */
1314
+ queryTaskOfProject(
1315
+ userId: string,
1316
+ projectId: string,
1317
+ query: QueryTaskOfProjectQuery,
1318
+ ): Promise<QueryTaskOfProjectResponse>
1319
+ /**
1320
+ * 录入实际工时接口
1321
+ * @see https://open.dingtalk.com/document/isvapp/create-actual-work
1322
+ */
1323
+ createWorkTime(
1324
+ userId: string,
1325
+ query: CreateWorkTimeQuery,
1326
+ params: CreateWorkTimeParams,
1327
+ ): Promise<CreateWorkTimeResponse>
1328
+ /**
1329
+ * 录入计划工时
1330
+ * @see https://open.dingtalk.com/document/isvapp/create-planned-work
1331
+ */
1332
+ createPlanTime(
1333
+ userId: string,
1334
+ query: CreatePlanTimeQuery,
1335
+ params: CreatePlanTimeParams,
1336
+ ): Promise<CreatePlanTimeResponse>
1337
+ /**
1338
+ * 更新任务自定义字段的值
1339
+ * @see https://open.dingtalk.com/document/isvapp/update-task-custom-field-value
1340
+ */
1341
+ updateCustomfieldValue(
1342
+ userId: string,
1343
+ taskId: string,
1344
+ params: UpdateCustomfieldValueParams,
1345
+ ): Promise<UpdateCustomfieldValueResponse>
1346
+ /**
1347
+ * 根据钉钉UserId获取Teambition用户Id
1348
+ * @see https://open.dingtalk.com/document/isvapp/obtain-dingtalk-teambition-user-id-based-on-userid
1349
+ */
1350
+ getTbUserIdByStaffId(
1351
+ query: GetTbUserIdByStaffIdQuery,
1352
+ ): Promise<GetTbUserIdByStaffIdResponse>
1353
+ /**
1354
+ * 获取Teambition企业Id
1355
+ * @see https://open.dingtalk.com/document/isvapp/obtain-the-teambition-enterprise-id
1356
+ */
1357
+ getTbOrgIdByDingOrgId(
1358
+ query: GetTbOrgIdByDingOrgIdQuery,
1359
+ ): Promise<GetTbOrgIdByDingOrgIdResponse>
1360
+ /**
1361
+ * 更新项目的分组
1362
+ * @see https://open.dingtalk.com/document/isvapp/update-project-grouping
1363
+ */
1364
+ updateProjectGroup(
1365
+ userId: string,
1366
+ projectId: string,
1367
+ params: UpdateProjectGroupParams,
1368
+ ): Promise<UpdateProjectGroupResponse>
1369
+ /**
1370
+ * 增加项目成员
1371
+ * @see https://open.dingtalk.com/document/isvapp/add-project-members
1372
+ */
1373
+ addProjectMember(
1374
+ userId: string,
1375
+ projectId: string,
1376
+ params: AddProjectMemberParams,
1377
+ ): Promise<AddProjectMemberResponse>
1378
+ /**
1379
+ * 根据项目模板创建项目
1380
+ * @see https://open.dingtalk.com/document/isvapp/create-a-project-from-a-project-template
1381
+ */
1382
+ createProjectByTemplate(
1383
+ userId: string,
1384
+ params: CreateProjectByTemplateParams,
1385
+ ): Promise<CreateProjectByTemplateResponse>
1386
+ /**
1387
+ * 查询可见的项目分组
1388
+ * @see https://open.dingtalk.com/document/isvapp/query-available-project-groups
1389
+ */
1390
+ getProjectGroup(
1391
+ userId: string,
1392
+ query: GetProjectGroupQuery,
1393
+ ): Promise<GetProjectGroupResponse>
1394
+ /**
1395
+ * 按项目模板名字搜索企业自定义模板
1396
+ * @see https://open.dingtalk.com/document/isvapp/search-for-enterprise-custom-templates-by-project-template-name
1397
+ */
1398
+ searchProjectTemplate(
1399
+ userId: string,
1400
+ query: SearchProjectTemplateQuery,
1401
+ ): Promise<SearchProjectTemplateResponse>
1402
+ /**
1403
+ * 创建任务关联对象
1404
+ * @see https://open.dingtalk.com/document/isvapp/create-a-linked-object-associated-with-a-task
1405
+ */
1406
+ createTaskObjectLink(
1407
+ userId: string,
1408
+ taskId: string,
1409
+ params: CreateTaskObjectLinkParams,
1410
+ ): Promise<CreateTaskObjectLinkResponse>
1411
+ /**
1412
+ * 创建项目任务
1413
+ * @see https://open.dingtalk.com/document/isvapp/create-a-project-task
1414
+ */
1415
+ createTask(
1416
+ userId: string,
1417
+ params: CreateTaskParams,
1418
+ ): Promise<CreateTaskResponse>
1419
+ /**
1420
+ * 批量获取任务详情
1421
+ * @see https://open.dingtalk.com/document/isvapp/obtains-details-about-multiple-free-tasks-isv
1422
+ */
1423
+ getOrganizatioTaskByIds(
1424
+ userId: string,
1425
+ query: GetOrganizatioTaskByIdsQuery,
1426
+ ): Promise<GetOrganizatioTaskByIdsResponse>
1427
+ /**
1428
+ * 更新自由任务优先级
1429
+ * @see https://open.dingtalk.com/document/isvapp/update-the-priority-of-a-free-migration-job
1430
+ */
1431
+ updateOrganizationTaskPriority(
1432
+ taskId: string,
1433
+ userId: string,
1434
+ params: UpdateOrganizationTaskPriorityParams,
1435
+ ): Promise<UpdateOrganizationTaskPriorityResponse>
1436
+ /**
1437
+ * 更改自由任务备注
1438
+ * @see https://open.dingtalk.com/document/isvapp/update-free-task-notes-isv
1439
+ */
1440
+ updateOrganizationTaskNote(
1441
+ taskId: string,
1442
+ userId: string,
1443
+ params: UpdateOrganizationTaskNoteParams,
1444
+ ): Promise<UpdateOrganizationTaskNoteResponse>
1445
+ /**
1446
+ * 更新自由任务参与者
1447
+ * @see https://open.dingtalk.com/document/isvapp/add-or-remove-participants-of-free-tasks
1448
+ */
1449
+ updateOrganizationTaskInvolveMembers(
1450
+ taskId: string,
1451
+ userId: string,
1452
+ params: UpdateOrganizationTaskInvolveMembersParams,
1453
+ ): Promise<UpdateOrganizationTaskInvolveMembersResponse>
1454
+ /**
1455
+ * 更改自由任务执行者
1456
+ * @see https://open.dingtalk.com/document/isvapp/update-free-task-executor
1457
+ */
1458
+ updateOrganizationTaskExecutor(
1459
+ taskId: string,
1460
+ userId: string,
1461
+ params: UpdateOrganizationTaskExecutorParams,
1462
+ ): Promise<UpdateOrganizationTaskExecutorResponse>
1463
+ /**
1464
+ * 更新自由任务截止时间
1465
+ * @see https://open.dingtalk.com/document/isvapp/update-free-task-deadline
1466
+ */
1467
+ updateOrganizationTaskDueDate(
1468
+ taskId: string,
1469
+ userId: string,
1470
+ params: UpdateOrganizationTaskDueDateParams,
1471
+ ): Promise<UpdateOrganizationTaskDueDateResponse>
1472
+ /**
1473
+ * 更改自由任务标题
1474
+ * @see https://open.dingtalk.com/document/isvapp/update-free-task-title
1475
+ */
1476
+ updateOrganizationTaskContent(
1477
+ taskId: string,
1478
+ userId: string,
1479
+ params: UpdateOrganizationTaskContentParams,
1480
+ ): Promise<UpdateOrganizationTaskContentResponse>
1481
+ /**
1482
+ * 更改自由任务状态
1483
+ * @see https://open.dingtalk.com/document/isvapp/update-free-task-status
1484
+ */
1485
+ updateOrganizationTaskStatus(
1486
+ taskId: string,
1487
+ userId: string,
1488
+ params: UpdateOrganizationTaskStatusParams,
1489
+ ): Promise<UpdateOrganizationTaskStatusResponse>
1490
+ /**
1491
+ * 获取企业优先级列表
1492
+ * @see https://open.dingtalk.com/document/isvapp/query-a-priority-list-isv
1493
+ */
1494
+ getOrganizationPriorityList(
1495
+ userId: string,
1496
+ ): Promise<GetOrganizationPriorityListResponse>
1497
+ /**
1498
+ * 获取自由任务详情
1499
+ * @see https://open.dingtalk.com/document/isvapp/queries-free-task-details-isv
1500
+ */
1501
+ getOrganizationTask(
1502
+ taskId: string,
1503
+ userId: string,
1504
+ ): Promise<GetOrganizationTaskResponse>
1505
+ /**
1506
+ * 删除任务
1507
+ * @see https://open.dingtalk.com/document/orgapp/delete-task
1508
+ */
1509
+ deleteTask(userId: string, taskId: string): Promise<DeleteTaskResponse>
1510
+ /**
1511
+ * 创建自由任务
1512
+ * @see https://open.dingtalk.com/document/isvapp/create-a-free-task-isv
1513
+ */
1514
+ createOrganizationTask(
1515
+ userId: string,
1516
+ params: CreateOrganizationTaskParams,
1517
+ ): Promise<CreateOrganizationTaskResponse>
1518
+ }
1519
+ }