@satorijs/adapter-dingtalk 2.0.3 → 2.0.5

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 (56) hide show
  1. package/lib/bot.d.ts +1 -1
  2. package/lib/http.d.ts +3 -2
  3. package/lib/index.js +35 -14
  4. package/lib/index.js.map +2 -3
  5. package/package.json +8 -4
  6. package/src/api/.eslintrc.yml +2 -0
  7. package/src/api/alitrip.ts +467 -0
  8. package/src/api/attendance.ts +81 -0
  9. package/src/api/badge.ts +285 -0
  10. package/src/api/blackboard.ts +28 -0
  11. package/src/api/calendar.ts +817 -0
  12. package/src/api/card.ts +215 -0
  13. package/src/api/conference.ts +561 -0
  14. package/src/api/connector.ts +97 -0
  15. package/src/api/contact.ts +56 -0
  16. package/src/api/convFile.ts +166 -0
  17. package/src/api/crm.ts +830 -0
  18. package/src/api/customerService.ts +156 -0
  19. package/src/api/datacenter.ts +672 -0
  20. package/src/api/devicemng.ts +202 -0
  21. package/src/api/diot.ts +19 -0
  22. package/src/api/doc.ts +232 -0
  23. package/src/api/drive.ts +109 -0
  24. package/src/api/edu.ts +30 -0
  25. package/src/api/esign.ts +44 -0
  26. package/src/api/exclusive.ts +372 -0
  27. package/src/api/h3yun.ts +537 -0
  28. package/src/api/hrm.ts +272 -0
  29. package/src/api/im.ts +978 -0
  30. package/src/api/industry.ts +153 -0
  31. package/src/api/jzcrm.ts +304 -0
  32. package/src/api/link.ts +94 -0
  33. package/src/api/live.ts +162 -0
  34. package/src/api/microApp.ts +309 -0
  35. package/src/api/oapi.ts +4083 -0
  36. package/src/api/oauth2.ts +146 -0
  37. package/src/api/pedia.ts +222 -0
  38. package/src/api/project.ts +1519 -0
  39. package/src/api/resident.ts +133 -0
  40. package/src/api/robot.ts +326 -0
  41. package/src/api/rooms.ts +334 -0
  42. package/src/api/serviceGroup.ts +216 -0
  43. package/src/api/storage.ts +1701 -0
  44. package/src/api/swform.ts +94 -0
  45. package/src/api/todo.ts +220 -0
  46. package/src/api/wiki.ts +231 -0
  47. package/src/api/workbench.ts +73 -0
  48. package/src/api/yida.ts +2165 -0
  49. package/src/bot.ts +129 -0
  50. package/src/http.ts +44 -0
  51. package/src/index.ts +9 -0
  52. package/src/internal.ts +47 -0
  53. package/src/message.ts +141 -0
  54. package/src/types/index.ts +140 -0
  55. package/src/utils.ts +53 -0
  56. package/src/ws.ts +55 -0
@@ -0,0 +1,1701 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface SearchWorkspacesParams {
5
+ /** 搜索关键词。 */
6
+ keyword: string
7
+ /** 可选参数。 */
8
+ option?: unknown
9
+ }
10
+
11
+ export interface SearchWorkspacesQuery {
12
+ /** 操作人unionId。 */
13
+ operatorId: string
14
+ }
15
+
16
+ export interface SearchWorkspacesResponse {
17
+ items?: {
18
+ workspaceId?: string
19
+ name?: string
20
+ url?: string
21
+ }[]
22
+ nextToken?: string
23
+ }
24
+
25
+ export interface SetPermissionInheritanceParams {
26
+ /** 权限继承模式,枚举值: */
27
+ inheritance: string
28
+ }
29
+
30
+ export interface SetPermissionInheritanceQuery {
31
+ /** 用户unionId。 */
32
+ unionId: string
33
+ }
34
+
35
+ export interface SetPermissionInheritanceResponse {
36
+ success?: unknown
37
+ }
38
+
39
+ export interface GetPermissionInheritanceQuery {
40
+ /** 用户unionId。 */
41
+ unionId: string
42
+ }
43
+
44
+ export interface GetPermissionInheritanceResponse {
45
+ inheritance?: string
46
+ }
47
+
48
+ export interface StorageUpdatePermissionParams {
49
+ /** 角色id,枚举值: */
50
+ roleId: string
51
+ /** 权限成员。 */
52
+ members: object[]
53
+ /** 可选参数。 */
54
+ option?: unknown
55
+ }
56
+
57
+ export interface StorageUpdatePermissionQuery {
58
+ /** 用户unionId。 */
59
+ unionId: string
60
+ }
61
+
62
+ export interface StorageUpdatePermissionResponse {
63
+ success?: unknown
64
+ }
65
+
66
+ export interface StorageDeletePermissionParams {
67
+ /** 角色id,枚举值: */
68
+ roleId: string
69
+ /** 权限成员。 */
70
+ members: object[]
71
+ }
72
+
73
+ export interface StorageDeletePermissionQuery {
74
+ /** 用户unionId。 */
75
+ unionId: string
76
+ }
77
+
78
+ export interface StorageDeletePermissionResponse {
79
+ success?: unknown
80
+ }
81
+
82
+ export interface StorageAddPermissionParams {
83
+ /** 角色id,枚举值: */
84
+ roleId: string
85
+ /** 权限成员。 */
86
+ members: object[]
87
+ /** 可选参数。 */
88
+ option?: unknown
89
+ }
90
+
91
+ export interface StorageAddPermissionQuery {
92
+ /** 用户id */
93
+ unionId: string
94
+ }
95
+
96
+ export interface StorageAddPermissionResponse {
97
+ success?: unknown
98
+ }
99
+
100
+ export interface ListPermissionsOrgParams {
101
+ /** 可选参数。 */
102
+ option?: unknown
103
+ }
104
+
105
+ export interface ListPermissionsOrgQuery {
106
+ /** 用户unionId。 */
107
+ unionId: string
108
+ }
109
+
110
+ export interface ListPermissionsOrgResponse {
111
+ permissions?: {
112
+ dentryUuid?: string
113
+ member?: number
114
+ role?: number
115
+ duration?: number
116
+ }[]
117
+ nextToken?: string
118
+ }
119
+
120
+ export interface SearchDentriesParams {
121
+ /** 搜索关键词。 */
122
+ keyword: string
123
+ /** 可选参数。 */
124
+ option?: unknown
125
+ }
126
+
127
+ export interface SearchDentriesQuery {
128
+ /** 操作人unionId。 */
129
+ operatorId: string
130
+ }
131
+
132
+ export interface SearchDentriesResponse {
133
+ items?: {
134
+ dentryUuid?: string
135
+ name?: string
136
+ creator?: number
137
+ modifier?: number
138
+ }[]
139
+ nextToken?: string
140
+ }
141
+
142
+ export interface StorageCommitFileParams {
143
+ /** 添加文件唯一标识,可通过DentryService.getUploadInfo来生成。 */
144
+ uploadKey: string
145
+ /** 名称(文件名+后缀), 规则: */
146
+ name: string
147
+ /** 可选参数 */
148
+ option?: unknown
149
+ }
150
+
151
+ export interface StorageCommitFileQuery {
152
+ /** 用户unionId。 */
153
+ unionId: string
154
+ }
155
+
156
+ export interface StorageCommitFileResponse {
157
+ dentry?: {
158
+ id?: string
159
+ spaceId?: string
160
+ parentId?: string
161
+ type?: string
162
+ name?: string
163
+ size?: number
164
+ path?: string
165
+ version?: number
166
+ status?: string
167
+ extension?: string
168
+ creatorId?: string
169
+ modifierId?: string
170
+ createTime?: string
171
+ modifiedTime?: string
172
+ properties?: number
173
+ appProperties?: number
174
+ uuid?: string
175
+ partitionType?: string
176
+ storageDriver?: string
177
+ thumbnail?: number
178
+ category?: string
179
+ }
180
+ }
181
+
182
+ export interface StorageGetFileUploadInfoParams {
183
+ /** 通过指定上传协议返回不同协议上传所需要的信息 */
184
+ protocol: string
185
+ /** 可选参数 */
186
+ option?: unknown
187
+ }
188
+
189
+ export interface StorageGetFileUploadInfoQuery {
190
+ /** 用户id */
191
+ unionId: string
192
+ }
193
+
194
+ export interface StorageGetFileUploadInfoResponse {
195
+ uploadKey?: string
196
+ storageDriver?: string
197
+ protocol?: string
198
+ headerSignatureInfo?: {
199
+ resourceUrls?: number
200
+ headers?: number
201
+ expirationSeconds?: number
202
+ region?: string
203
+ internalResourceUrls?: number
204
+ }
205
+ }
206
+
207
+ export interface UnsubscribeEventParams {
208
+ /** 订阅范围对应的id */
209
+ scopeId: string
210
+ /** 订阅范围 */
211
+ scope: string
212
+ }
213
+
214
+ export interface UnsubscribeEventQuery {
215
+ /** 用户id */
216
+ unionId: string
217
+ }
218
+
219
+ export interface UnsubscribeEventResponse {
220
+ success?: unknown
221
+ }
222
+
223
+ export interface ListAllDentriesParams {
224
+ /** 可选参数。 */
225
+ option?: unknown
226
+ }
227
+
228
+ export interface ListAllDentriesQuery {
229
+ /** 操作人的unionId。 */
230
+ unionId: string
231
+ }
232
+
233
+ export interface ListAllDentriesResponse {
234
+ dentries?: {
235
+ id?: string
236
+ spaceId?: string
237
+ parentId?: string
238
+ type?: string
239
+ name?: string
240
+ size?: number
241
+ path?: string
242
+ version?: number
243
+ status?: string
244
+ extension?: string
245
+ creatorId?: string
246
+ modifierId?: string
247
+ createTime?: string
248
+ modifiedTime?: string
249
+ properties?: number
250
+ appProperties?: number
251
+ uuid?: string
252
+ partitionType?: string
253
+ storageDriver?: string
254
+ thumbnail?: number
255
+ }[]
256
+ nextToken?: string
257
+ }
258
+
259
+ export interface GetDentriesParams {
260
+ /** 文件或文件夹的ID列表,最大值30。 */
261
+ dentryIds: string[]
262
+ /** 可选参数。 */
263
+ option?: unknown
264
+ }
265
+
266
+ export interface GetDentriesQuery {
267
+ /** 操作人的unionId。 */
268
+ unionId: string
269
+ }
270
+
271
+ export interface GetDentriesResponse {
272
+ resultItems?: {
273
+ spaceId?: string
274
+ dentryId?: string
275
+ success?: number
276
+ errorCode?: string
277
+ dentry?: number
278
+ }[]
279
+ }
280
+
281
+ export interface GetDentryThumbnailsParams {
282
+ /** 文件ID,最大值30。 */
283
+ dentryIds: string[]
284
+ }
285
+
286
+ export interface GetDentryThumbnailsQuery {
287
+ /** 操作人的unionId。 */
288
+ unionId: string
289
+ }
290
+
291
+ export interface GetDentryThumbnailsResponse {
292
+ resultItems?: {
293
+ spaceId?: string
294
+ dentryId?: string
295
+ success?: number
296
+ errorCode?: string
297
+ thumbnail?: number
298
+ }[]
299
+ }
300
+
301
+ export interface MoveDentriesParams {
302
+ /** 目标空间ID。 */
303
+ targetSpaceId: string
304
+ /** 目标文件夹id, 根目录id值为0。 */
305
+ targetFolderId: string
306
+ /** 源文件或文件夹的ID列表,最大值30。 */
307
+ dentryIds: string[]
308
+ /** 可选参数。 */
309
+ option?: unknown
310
+ }
311
+
312
+ export interface MoveDentriesQuery {
313
+ /** 操作人的unionId。 */
314
+ unionId: string
315
+ }
316
+
317
+ export interface MoveDentriesResponse {
318
+ resultItems?: {
319
+ spaceId?: string
320
+ dentryId?: string
321
+ async?: number
322
+ success?: number
323
+ errorCode?: string
324
+ taskId?: string
325
+ targetSpaceId?: string
326
+ targetDentryId?: string
327
+ }[]
328
+ }
329
+
330
+ export interface CopyDentriesParams {
331
+ /** 目标文件或文件夹所在的空间ID。 */
332
+ targetSpaceId: string
333
+ /** 目标文件夹ID, 根目录ID值为0。 */
334
+ targetFolderId: string
335
+ /** 源文件或文件夹的ID列表,最大值30。 */
336
+ dentryIds: string[]
337
+ /** 可选参数。 */
338
+ option?: unknown
339
+ }
340
+
341
+ export interface CopyDentriesQuery {
342
+ /** 操作人的unionId。 */
343
+ unionId: string
344
+ }
345
+
346
+ export interface CopyDentriesResponse {
347
+ resultItems?: {
348
+ spaceId?: string
349
+ dentryId?: string
350
+ async?: number
351
+ success?: number
352
+ errorCode?: string
353
+ taskId?: string
354
+ targetSpaceId?: string
355
+ targetDentryId?: string
356
+ }[]
357
+ }
358
+
359
+ export interface DeleteDentriesParams {
360
+ /** 文件或文件夹ID列表,最大值50。 */
361
+ dentryIds: string[]
362
+ /** 可选参数。 */
363
+ option?: unknown
364
+ }
365
+
366
+ export interface DeleteDentriesQuery {
367
+ /** 操作人的unionId。 */
368
+ unionId: string
369
+ }
370
+
371
+ export interface DeleteDentriesResponse {
372
+ resultItems?: {
373
+ spaceId?: string
374
+ dentryId?: string
375
+ async?: number
376
+ success?: number
377
+ errorCode?: string
378
+ taskId?: string
379
+ }[]
380
+ }
381
+
382
+ export interface GetTaskQuery {
383
+ /** 操作人的unionId。 */
384
+ unionId: string
385
+ }
386
+
387
+ export interface GetTaskResponse {
388
+ task?: {
389
+ id?: string
390
+ status?: string
391
+ totalCount?: number
392
+ successCount?: number
393
+ failCount?: number
394
+ failMessage?: string
395
+ beginTime?: string
396
+ endTime?: string
397
+ }
398
+ }
399
+
400
+ export interface InitMultipartFileUploadParams {
401
+ /** 可选参数。 */
402
+ option?: unknown
403
+ }
404
+
405
+ export interface InitMultipartFileUploadQuery {
406
+ /** 操作者unionId。 */
407
+ unionId: string
408
+ }
409
+
410
+ export interface InitMultipartFileUploadResponse {
411
+ uploadKey?: string
412
+ storageDriver?: string
413
+ }
414
+
415
+ export interface GetMultipartFileUploadInfosParams {
416
+ /** 上传唯一标识。 */
417
+ uploadKey: string
418
+ /** 每片文件的Id,文件的分片数量最大值10000,每片文件大小限制范围是100KB~5GB,最多传30。 */
419
+ partNumbers: number[]
420
+ /** 可选参数。 */
421
+ option?: unknown
422
+ }
423
+
424
+ export interface GetMultipartFileUploadInfosQuery {
425
+ /** 操作者unionId。 */
426
+ unionId: string
427
+ }
428
+
429
+ export interface GetMultipartFileUploadInfosResponse {
430
+ multipartHeaderSignatureInfos?: {
431
+ partNumber?: number
432
+ headerSignatureInfo?: number
433
+ }[]
434
+ }
435
+
436
+ export interface GetOrgQuery {
437
+ /** 用户unionId。 */
438
+ unionId: string
439
+ }
440
+
441
+ export interface GetOrgResponse {
442
+ org?: {
443
+ corpId?: string
444
+ partitions?: number
445
+ }
446
+ }
447
+
448
+ export interface RestoreRecycleItemParams {
449
+ /** 可选参数。 */
450
+ option?: unknown
451
+ }
452
+
453
+ export interface RestoreRecycleItemQuery {
454
+ /** 操作者unionId。 */
455
+ unionId: string
456
+ }
457
+
458
+ export interface RestoreRecycleItemResponse {
459
+ async?: unknown
460
+ taskId?: string
461
+ spaceId?: string
462
+ dentryId?: string
463
+ }
464
+
465
+ export interface GetRecycleBinQuery {
466
+ /** 回收站范围类型。 */
467
+ recycleBinScope: string
468
+ /** 回收站范围Id。 */
469
+ scopeId: string
470
+ /** 操作者unionId。 */
471
+ unionId: string
472
+ }
473
+
474
+ export interface GetRecycleBinResponse {
475
+ recycleBin?: {
476
+ id?: string
477
+ scope?: string
478
+ scopeId?: string
479
+ }
480
+ }
481
+
482
+ export interface GetRecycleItemQuery {
483
+ /** 操作者unionId。 */
484
+ unionId: string
485
+ }
486
+
487
+ export interface GetRecycleItemResponse {
488
+ item?: {
489
+ id?: string
490
+ spaceId?: string
491
+ dentryId?: string
492
+ size?: number
493
+ type?: string
494
+ originalName?: string
495
+ originalPath?: string
496
+ operatorId?: string
497
+ operatorTime?: string
498
+ }
499
+ }
500
+
501
+ export interface DeleteRecycleItemQuery {
502
+ /** 操作者unionId。 */
503
+ unionId: string
504
+ }
505
+
506
+ export interface DeleteRecycleItemResponse {
507
+ success?: unknown
508
+ }
509
+
510
+ export interface ClearRecycleBinQuery {
511
+ /** 操作者unionId。 */
512
+ unionId: string
513
+ }
514
+
515
+ export interface ClearRecycleBinResponse {
516
+ success?: unknown
517
+ }
518
+
519
+ export interface DeleteRecycleItemsParams {
520
+ /** 回收项Id列表,最大值50。 */
521
+ recycleItemIds: string[]
522
+ }
523
+
524
+ export interface DeleteRecycleItemsQuery {
525
+ /** 操作者unionId。 */
526
+ unionId: string
527
+ }
528
+
529
+ export interface DeleteRecycleItemsResponse {
530
+ success?: unknown
531
+ }
532
+
533
+ export interface RestoreRecycleItemsParams {
534
+ /** 回收项ID列表,最大值30。 */
535
+ recycleItemIds: string[]
536
+ /** 可选参数。 */
537
+ option?: unknown
538
+ }
539
+
540
+ export interface RestoreRecycleItemsQuery {
541
+ /** 操作人的unionId。 */
542
+ unionId: string
543
+ }
544
+
545
+ export interface RestoreRecycleItemsResponse {
546
+ resultItems?: {
547
+ recycleBinId?: string
548
+ recycleItemId?: string
549
+ async?: number
550
+ success?: number
551
+ errorCode?: string
552
+ taskId?: string
553
+ spaceId?: string
554
+ dentryId?: string
555
+ }[]
556
+ }
557
+
558
+ export interface ListDentryVersionsQuery {
559
+ /** 分页游标。 */
560
+ nextToken?: string
561
+ /** 每页条目数,默认100,最大100。 */
562
+ maxResults?: number
563
+ /** 操作者unionId。 */
564
+ unionId: string
565
+ }
566
+
567
+ export interface ListDentryVersionsResponse {
568
+ dentries?: {
569
+ id?: string
570
+ spaceId?: string
571
+ parentId?: string
572
+ type?: string
573
+ name?: string
574
+ size?: number
575
+ path?: string
576
+ version?: number
577
+ status?: string
578
+ extension?: string
579
+ creatorId?: string
580
+ modifierId?: string
581
+ createTime?: string
582
+ modifiedTime?: string
583
+ properties?: number
584
+ appProperties?: number
585
+ uuid?: string
586
+ partitionType?: string
587
+ storageDriver?: string
588
+ }[]
589
+ nextToken?: string
590
+ }
591
+
592
+ export interface GetDentryOpenInfoParams {
593
+ /** 可选参数。 */
594
+ option?: unknown
595
+ }
596
+
597
+ export interface GetDentryOpenInfoQuery {
598
+ /** 操作用户unionId。 */
599
+ unionId: string
600
+ }
601
+
602
+ export interface GetDentryOpenInfoResponse {
603
+ url?: string
604
+ hasWaterMark?: unknown
605
+ }
606
+
607
+ export interface MoveDentryParams {
608
+ /** 需要存放的目标空间Id。 */
609
+ targetSpaceId: string
610
+ /** 需要存放的位置父目录Id。根目录时,该参数是0。 */
611
+ targetFolderId: string
612
+ /** 可选参数。 */
613
+ option?: unknown
614
+ }
615
+
616
+ export interface MoveDentryQuery {
617
+ /** 操作者unionId。 */
618
+ unionId: string
619
+ }
620
+
621
+ export interface MoveDentryResponse {
622
+ dentry?: {
623
+ id?: string
624
+ spaceId?: string
625
+ parentId?: string
626
+ type?: string
627
+ name?: string
628
+ size?: number
629
+ path?: string
630
+ version?: number
631
+ status?: string
632
+ extension?: string
633
+ creatorId?: string
634
+ modifierId?: string
635
+ createTime?: string
636
+ modifiedTime?: string
637
+ properties?: number
638
+ appProperties?: number
639
+ uuid?: string
640
+ partitionType?: string
641
+ storageDriver?: string
642
+ }
643
+ async?: unknown
644
+ taskId?: string
645
+ }
646
+
647
+ export interface ListPermissionsIsvParams {
648
+ /** 可选参数。 */
649
+ option?: unknown
650
+ }
651
+
652
+ export interface ListPermissionsIsvQuery {
653
+ /** 操作者的unionId。 */
654
+ unionId: string
655
+ }
656
+
657
+ export interface ListPermissionsIsvResponse {
658
+ permissions?: {
659
+ spaceId?: string
660
+ dentryId?: string
661
+ member?: number
662
+ role?: number
663
+ duration?: number
664
+ createTime?: string
665
+ modifiedTime?: string
666
+ operatorId?: string
667
+ }[]
668
+ nextToken?: string
669
+ }
670
+
671
+ export interface GetFileDownloadInfoParams {
672
+ /** 可选参数。 */
673
+ option?: unknown
674
+ }
675
+
676
+ export interface GetFileDownloadInfoQuery {
677
+ /** 操作者unionId。 */
678
+ unionId: string
679
+ }
680
+
681
+ export interface GetFileDownloadInfoResponse {
682
+ protocol?: string
683
+ headerSignatureInfo?: {
684
+ resourceUrls?: number
685
+ headers?: number
686
+ expirationSeconds?: number
687
+ region?: string
688
+ internalResourceUrls?: number
689
+ }
690
+ }
691
+
692
+ export interface ListRecycleItemsQuery {
693
+ /** 分页游标。 */
694
+ nextToken?: string
695
+ /** 每页最大条目数,默认值50,最大值50。 */
696
+ maxResults?: number
697
+ /** 操作者unionId。 */
698
+ unionId: string
699
+ }
700
+
701
+ export interface ListRecycleItemsResponse {
702
+ recycleItems?: {
703
+ id?: string
704
+ spaceId?: string
705
+ dentryId?: string
706
+ size?: number
707
+ type?: string
708
+ originalName?: string
709
+ originalPath?: string
710
+ operatorId?: string
711
+ operatorTime?: string
712
+ }[]
713
+ nextToken?: string
714
+ }
715
+
716
+ export interface DeleteDentryQuery {
717
+ /** 删除后,是否备份到回收站。 */
718
+ toRecycleBin?: unknown
719
+ /** 操作者unionId。 */
720
+ unionId: string
721
+ }
722
+
723
+ export interface DeleteDentryResponse {
724
+ async?: unknown
725
+ taskId?: string
726
+ }
727
+
728
+ export interface RenameDentryParams {
729
+ /** 文件或文件夹的新名称,命名规则如下: */
730
+ newName: string
731
+ }
732
+
733
+ export interface RenameDentryQuery {
734
+ /** 操作者unionId。 */
735
+ unionId: string
736
+ }
737
+
738
+ export interface RenameDentryResponse {
739
+ dentry?: {
740
+ id?: string
741
+ spaceId?: string
742
+ parentId?: string
743
+ type?: string
744
+ name?: string
745
+ size?: number
746
+ path?: string
747
+ version?: number
748
+ status?: string
749
+ extension?: string
750
+ creatorId?: string
751
+ modifierId?: string
752
+ createTime?: string
753
+ modifiedTime?: string
754
+ properties?: number
755
+ appProperties?: number
756
+ uuid?: string
757
+ partitionType?: string
758
+ storageDriver?: string
759
+ }
760
+ }
761
+
762
+ export interface ListDentriesQuery {
763
+ /** 父目录Id。根目录时,该参数是0。 */
764
+ parentId: string
765
+ /** 分页游标。 */
766
+ nextToken?: string
767
+ /** 每页条目数,最大值50。 */
768
+ maxResults?: number
769
+ /** 排序字段。 */
770
+ orderBy?: string
771
+ /** 排序规则。 */
772
+ order?: string
773
+ /** 是否获取文件缩略图临时链接。按需获取,会影响接口耗时。 */
774
+ withThumbnail?: unknown
775
+ /** 操作者的unionId。 */
776
+ unionId: string
777
+ }
778
+
779
+ export interface ListDentriesResponse {
780
+ dentries?: {
781
+ id?: string
782
+ spaceId?: string
783
+ parentId?: string
784
+ type?: string
785
+ name?: string
786
+ size?: number
787
+ path?: string
788
+ version?: number
789
+ status?: string
790
+ extension?: string
791
+ creatorId?: string
792
+ modifierId?: string
793
+ createTime?: string
794
+ modifiedTime?: string
795
+ properties?: number
796
+ appProperties?: number
797
+ uuid?: string
798
+ partitionType?: string
799
+ storageDriver?: string
800
+ thumbnail?: number
801
+ }[]
802
+ nextToken?: string
803
+ }
804
+
805
+ export interface RevertDentryVersionQuery {
806
+ /** 操作者unionId。 */
807
+ unionId: string
808
+ }
809
+
810
+ export interface RevertDentryVersionResponse {
811
+ success?: unknown
812
+ }
813
+
814
+ export interface CopyDentryParams {
815
+ /** 需要存放的目标空间Id。 */
816
+ targetSpaceId: string
817
+ /** 需要存放的位置父目录Id。 */
818
+ targetFolderId: string
819
+ /** 可选参数。 */
820
+ option?: unknown
821
+ }
822
+
823
+ export interface CopyDentryQuery {
824
+ /** 操作者unionId。 */
825
+ unionId: string
826
+ }
827
+
828
+ export interface CopyDentryResponse {
829
+ dentry?: {
830
+ id?: string
831
+ spaceId?: string
832
+ parentId?: string
833
+ type?: string
834
+ name?: string
835
+ size?: number
836
+ path?: string
837
+ version?: number
838
+ status?: string
839
+ extension?: string
840
+ creatorId?: string
841
+ modifierId?: string
842
+ createTime?: string
843
+ modifiedTime?: string
844
+ properties?: number
845
+ appProperties?: number
846
+ uuid?: string
847
+ partitionType?: string
848
+ storageDriver?: string
849
+ }
850
+ async?: unknown
851
+ taskId?: string
852
+ }
853
+
854
+ export interface GetCurrentAppQuery {
855
+ /** 操作者unionId。 */
856
+ unionId: string
857
+ }
858
+
859
+ export interface GetCurrentAppResponse {
860
+ app?: {
861
+ corpId?: string
862
+ appId?: string
863
+ name?: string
864
+ createTime?: string
865
+ modifiedTime?: string
866
+ partitions?: number
867
+ }
868
+ }
869
+
870
+ export interface StorageGetSpaceQuery {
871
+ /** 操作者unionId。 */
872
+ unionId: string
873
+ }
874
+
875
+ export interface StorageGetSpaceResponse {
876
+ space?: {
877
+ id?: string
878
+ corpId?: string
879
+ creatorId?: string
880
+ ownerType?: string
881
+ ownerId?: string
882
+ modifierId?: string
883
+ usedQuota?: number
884
+ quota?: number
885
+ status?: string
886
+ createTime?: string
887
+ modifiedTime?: string
888
+ appId?: string
889
+ scene?: string
890
+ sceneId?: string
891
+ capabilities?: number
892
+ name?: string
893
+ partitions?: number
894
+ }
895
+ }
896
+
897
+ export interface AddFolderParams {
898
+ /** 文件夹的名称,命名有以下要求: */
899
+ name: string
900
+ /** 可选参数。 */
901
+ option?: unknown
902
+ }
903
+
904
+ export interface AddFolderQuery {
905
+ /** 操作者unionId。 */
906
+ unionId: string
907
+ }
908
+
909
+ export interface AddFolderResponse {
910
+ dentry?: {
911
+ id?: string
912
+ spaceId?: string
913
+ parentId?: string
914
+ type?: string
915
+ name?: string
916
+ size?: number
917
+ path?: string
918
+ version?: number
919
+ status?: string
920
+ extension?: string
921
+ creatorId?: string
922
+ modifierId?: string
923
+ createTime?: string
924
+ modifiedTime?: string
925
+ properties?: number
926
+ appProperties?: number
927
+ uuid?: string
928
+ partitionType?: string
929
+ storageDriver?: string
930
+ }
931
+ }
932
+
933
+ export interface GetDentryParams {
934
+ /** 可选参数。 */
935
+ option?: unknown
936
+ }
937
+
938
+ export interface GetDentryQuery {
939
+ /** 操作者unionId。 */
940
+ unionId: string
941
+ }
942
+
943
+ export interface GetDentryResponse {
944
+ dentry?: {
945
+ id?: string
946
+ spaceId?: string
947
+ parentId?: string
948
+ type?: string
949
+ name?: string
950
+ size?: number
951
+ path?: string
952
+ version?: number
953
+ status?: string
954
+ extension?: string
955
+ creatorId?: string
956
+ modifierId?: string
957
+ createTime?: string
958
+ modifiedTime?: string
959
+ properties?: number
960
+ appProperties?: number
961
+ uuid?: string
962
+ partitionType?: string
963
+ storageDriver?: string
964
+ thumbnail?: number
965
+ }
966
+ }
967
+
968
+ export interface DeleteDentryAppPropertiesParams {
969
+ /** 文件或文件夹的应用属性名称列表,最大值3。 */
970
+ propertyNames: string[]
971
+ }
972
+
973
+ export interface DeleteDentryAppPropertiesQuery {
974
+ /** 操作者unionId。 */
975
+ unionId: string
976
+ }
977
+
978
+ export interface DeleteDentryAppPropertiesResponse {
979
+ success?: unknown
980
+ }
981
+
982
+ export interface UpdateDentryAppPropertiesParams {
983
+ /** 应用属性列表,最大值3。 */
984
+ appProperties: object[]
985
+ }
986
+
987
+ export interface UpdateDentryAppPropertiesQuery {
988
+ /** 操作者unionId。 */
989
+ unionId: string
990
+ }
991
+
992
+ export interface UpdateDentryAppPropertiesResponse {
993
+ success?: unknown
994
+ }
995
+
996
+ export interface StorageCommitFileParams {
997
+ /** 添加文件唯一标识。 */
998
+ uploadKey: string
999
+ /** 文件的名称,带后缀。命名有以下要求: */
1000
+ name: string
1001
+ /** 父目录Id。根目录时,该参数是0。 */
1002
+ parentId: string
1003
+ /** 可选参数。 */
1004
+ option?: unknown
1005
+ }
1006
+
1007
+ export interface StorageCommitFileQuery {
1008
+ /** 操作者unionId。 */
1009
+ unionId: string
1010
+ }
1011
+
1012
+ export interface StorageGetFileUploadInfoParams {
1013
+ /** 通过指定上传协议返回不同协议上传所需要的信息。 */
1014
+ protocol: string
1015
+ /** 是否需要分片上传。 */
1016
+ multipart: unknown
1017
+ /** 可选参数。 */
1018
+ option?: unknown
1019
+ }
1020
+
1021
+ export interface StorageGetFileUploadInfoQuery {
1022
+ /** 操作者unionId。 */
1023
+ unionId: string
1024
+ }
1025
+
1026
+ export interface StorageGetFileUploadInfoResponse {
1027
+ uploadKey?: string
1028
+ storageDriver?: string
1029
+ protocol?: string
1030
+ headerSignatureInfo?: {
1031
+ resourceUrls?: number
1032
+ headers?: number
1033
+ expirationSeconds?: number
1034
+ region?: string
1035
+ internalResourceUrls?: number
1036
+ }
1037
+ }
1038
+
1039
+ export interface StorageUpdatePermissionParams {
1040
+ /** 权限角色Id。 */
1041
+ roleId: string
1042
+ /** 权限成员信息。 */
1043
+ members: object[]
1044
+ /** 可选参数。 */
1045
+ option?: unknown
1046
+ }
1047
+
1048
+ export interface StorageUpdatePermissionQuery {
1049
+ /** 操作用户的unionId。 */
1050
+ unionId: string
1051
+ }
1052
+
1053
+ export interface StorageUpdatePermissionResponse {
1054
+ success?: unknown
1055
+ }
1056
+
1057
+ export interface StorageDeletePermissionParams {
1058
+ /** 权限角色Id。 */
1059
+ roleId: string
1060
+ /** 权限成员信息。 */
1061
+ members: object[]
1062
+ }
1063
+
1064
+ export interface StorageDeletePermissionQuery {
1065
+ /** 操作者的unionId。 */
1066
+ unionId: string
1067
+ }
1068
+
1069
+ export interface StorageDeletePermissionResponse {
1070
+ success?: unknown
1071
+ }
1072
+
1073
+ export interface StorageAddPermissionParams {
1074
+ /** 权限角色Id。 */
1075
+ roleId: string
1076
+ /** 权限成员信息。 */
1077
+ members: object[]
1078
+ /** 可选参数。 */
1079
+ option?: unknown
1080
+ }
1081
+
1082
+ export interface StorageAddPermissionQuery {
1083
+ /** 操作用户的unionId。 */
1084
+ unionId: string
1085
+ }
1086
+
1087
+ export interface StorageAddPermissionResponse {
1088
+ success?: unknown
1089
+ }
1090
+
1091
+ export interface StorageAddSpaceParams {
1092
+ /** 可选参数。 */
1093
+ option?: unknown
1094
+ }
1095
+
1096
+ export interface StorageAddSpaceQuery {
1097
+ /** 操作者unionId。 */
1098
+ unionId: string
1099
+ }
1100
+
1101
+ export interface StorageAddSpaceResponse {
1102
+ space?: {
1103
+ id?: string
1104
+ corpId?: string
1105
+ creatorId?: string
1106
+ ownerType?: string
1107
+ ownerId?: string
1108
+ modifierId?: string
1109
+ usedQuota?: number
1110
+ quota?: number
1111
+ status?: string
1112
+ createTime?: string
1113
+ modifiedTime?: string
1114
+ appId?: string
1115
+ scene?: string
1116
+ sceneId?: string
1117
+ capabilities?: number
1118
+ name?: string
1119
+ partitions?: number
1120
+ }
1121
+ }
1122
+
1123
+ // funcName: isOldApi
1124
+ Internal.define({
1125
+ '/storage/workspaces/search': { POST: { searchWorkspaces: false } },
1126
+ '/storage/spaces/dentries/{dentryUuid}/permissions/inheritances': {
1127
+ PUT: { setPermissionInheritance: false },
1128
+ GET: { getPermissionInheritance: false },
1129
+ },
1130
+ '/storage/spaces/dentries/{dentryUuid}/permissions': {
1131
+ PUT: { storageUpdatePermission: false },
1132
+ POST: { storageAddPermission: false },
1133
+ },
1134
+ '/storage/spaces/dentries/{dentryUuid}/permissions/remove': {
1135
+ POST: { storageDeletePermission: false },
1136
+ },
1137
+ '/storage/spaces/dentries/{dentryUuid}/permissions/query': {
1138
+ POST: { listPermissionsOrg: false },
1139
+ },
1140
+ '/storage/dentries/search': { POST: { searchDentries: false } },
1141
+ '/storage/spaces/files/{parentDentryUuid}/commit': {
1142
+ POST: { storageCommitFile: false },
1143
+ },
1144
+ '/storage/spaces/files/{parentDentryUuid}/uploadInfos/query': {
1145
+ POST: { storageGetFileUploadInfo: false },
1146
+ },
1147
+ '/storage/events/unsubscribe': { POST: { unsubscribeEvent: false } },
1148
+ '/storage/spaces/{spaceId}/dentries/listAll': {
1149
+ POST: { listAllDentries: false },
1150
+ },
1151
+ '/storage/spaces/{spaceId}/dentries/query': { POST: { getDentries: false } },
1152
+ '/storage/spaces/{spaceId}/thumbnails/query': {
1153
+ POST: { getDentryThumbnails: false },
1154
+ },
1155
+ '/storage/spaces/{spaceId}/dentries/batchMove': {
1156
+ POST: { moveDentries: false },
1157
+ },
1158
+ '/storage/spaces/{spaceId}/dentries/batchCopy': {
1159
+ POST: { copyDentries: false },
1160
+ },
1161
+ '/storage/spaces/{spaceId}/dentries/batchRemove': {
1162
+ POST: { deleteDentries: false },
1163
+ },
1164
+ '/storage/tasks/{taskId}': { GET: { getTask: false } },
1165
+ '/storage/spaces/{spaceId}/files/multiPartUploadInfos/init': {
1166
+ POST: { initMultipartFileUpload: false },
1167
+ },
1168
+ '/storage/spaces/files/multiPartUploadInfos/query': {
1169
+ POST: { getMultipartFileUploadInfos: false },
1170
+ },
1171
+ '/storage/orgs/{corpId}': { GET: { getOrg: false } },
1172
+ '/storage/recycleBins/{recycleBinId}/recycleItems/{recycleItemId}/restore': {
1173
+ POST: { restoreRecycleItem: false },
1174
+ },
1175
+ '/storage/recycleBins': { GET: { getRecycleBin: false } },
1176
+ '/storage/recycleBins/{recycleBinId}/recycleItems/{recycleItemId}': {
1177
+ GET: { getRecycleItem: false },
1178
+ DELETE: { deleteRecycleItem: false },
1179
+ },
1180
+ '/storage/recycleBins/{recycleBinId}/clear': {
1181
+ POST: { clearRecycleBin: false },
1182
+ },
1183
+ '/storage/recycleBins/{recycleBinId}/recycleItems/batchRemove': {
1184
+ POST: { deleteRecycleItems: false },
1185
+ },
1186
+ '/storage/recycleBins/{recycleBinId}/recycleItems/batchRestore': {
1187
+ POST: { restoreRecycleItems: false },
1188
+ },
1189
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/versions': {
1190
+ GET: { listDentryVersions: false },
1191
+ },
1192
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/openInfos/query': {
1193
+ POST: { getDentryOpenInfo: false },
1194
+ },
1195
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/move': {
1196
+ POST: { moveDentry: false },
1197
+ },
1198
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/permissions/query': {
1199
+ POST: { listPermissionsIsv: false },
1200
+ },
1201
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/downloadInfos/query': {
1202
+ POST: { getFileDownloadInfo: false },
1203
+ },
1204
+ '/storage/recycleBins/{recycleBinId}/recycleItems': {
1205
+ GET: { listRecycleItems: false },
1206
+ },
1207
+ '/storage/spaces/{spaceId}/dentries/{dentryId}': {
1208
+ DELETE: { deleteDentry: false },
1209
+ },
1210
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/rename': {
1211
+ POST: { renameDentry: false },
1212
+ },
1213
+ '/storage/spaces/{spaceId}/dentries': { GET: { listDentries: false } },
1214
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/versions/{version}/revert': {
1215
+ POST: { revertDentryVersion: false },
1216
+ },
1217
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/copy': {
1218
+ POST: { copyDentry: false },
1219
+ },
1220
+ '/storage/currentApps/query': { POST: { getCurrentApp: false } },
1221
+ '/storage/spaces/{spaceId}': { GET: { storageGetSpace: false } },
1222
+ '/storage/spaces/{spaceId}/dentries/{parentId}/folders': {
1223
+ POST: { addFolder: false },
1224
+ },
1225
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/query': {
1226
+ POST: { getDentry: false },
1227
+ },
1228
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/appProperties/remove': {
1229
+ POST: { deleteDentryAppProperties: false },
1230
+ },
1231
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/appProperties': {
1232
+ PUT: { updateDentryAppProperties: false },
1233
+ },
1234
+ '/storage/spaces/{spaceId}/files/commit': {
1235
+ POST: { storageCommitFile: false },
1236
+ },
1237
+ '/storage/spaces/{spaceId}/files/uploadInfos/query': {
1238
+ POST: { storageGetFileUploadInfo: false },
1239
+ },
1240
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/permissions': {
1241
+ PUT: { storageUpdatePermission: false },
1242
+ POST: { storageAddPermission: false },
1243
+ },
1244
+ '/storage/spaces/{spaceId}/dentries/{dentryId}/permissions/remove': {
1245
+ POST: { storageDeletePermission: false },
1246
+ },
1247
+ '/storage/spaces': { POST: { storageAddSpace: false } },
1248
+ })
1249
+
1250
+ declare module '../internal' {
1251
+ interface Internal {
1252
+ /**
1253
+ * 搜索知识库
1254
+ * @see https://open.dingtalk.com/document/orgapp/search-knowledge-base
1255
+ */
1256
+ searchWorkspaces(
1257
+ query: SearchWorkspacesQuery,
1258
+ params: SearchWorkspacesParams,
1259
+ ): Promise<SearchWorkspacesResponse>
1260
+ /**
1261
+ * 设置权限继承模式
1262
+ * @see https://open.dingtalk.com/document/orgapp/set-permission-inheritance-mode
1263
+ */
1264
+ setPermissionInheritance(
1265
+ dentryUuid: string,
1266
+ query: SetPermissionInheritanceQuery,
1267
+ params: SetPermissionInheritanceParams,
1268
+ ): Promise<SetPermissionInheritanceResponse>
1269
+ /**
1270
+ * 获取权限继承模式
1271
+ * @see https://open.dingtalk.com/document/orgapp/get-permission-inheritance-mode
1272
+ */
1273
+ getPermissionInheritance(
1274
+ dentryUuid: string,
1275
+ query: GetPermissionInheritanceQuery,
1276
+ ): Promise<GetPermissionInheritanceResponse>
1277
+ /**
1278
+ * 修改权限
1279
+ * @see https://open.dingtalk.com/document/orgapp/modify-permissions-file
1280
+ */
1281
+ storageUpdatePermission(
1282
+ dentryUuid: string,
1283
+ query: StorageUpdatePermissionQuery,
1284
+ params: StorageUpdatePermissionParams,
1285
+ ): Promise<StorageUpdatePermissionResponse>
1286
+ /**
1287
+ * 删除权限
1288
+ * @see https://open.dingtalk.com/document/orgapp/delete-permissions-file
1289
+ */
1290
+ storageDeletePermission(
1291
+ dentryUuid: string,
1292
+ query: StorageDeletePermissionQuery,
1293
+ params: StorageDeletePermissionParams,
1294
+ ): Promise<StorageDeletePermissionResponse>
1295
+ /**
1296
+ * 添加权限
1297
+ * @see https://open.dingtalk.com/document/orgapp/add-permissions-file
1298
+ */
1299
+ storageAddPermission(
1300
+ dentryUuid: string,
1301
+ query: StorageAddPermissionQuery,
1302
+ params: StorageAddPermissionParams,
1303
+ ): Promise<StorageAddPermissionResponse>
1304
+ /**
1305
+ * 获取权限列表
1306
+ * @see https://open.dingtalk.com/document/orgapp/get-permission-list
1307
+ */
1308
+ listPermissionsOrg(
1309
+ dentryUuid: string,
1310
+ query: ListPermissionsOrgQuery,
1311
+ params: ListPermissionsOrgParams,
1312
+ ): Promise<ListPermissionsOrgResponse>
1313
+ /**
1314
+ * 搜索文件
1315
+ * @see https://open.dingtalk.com/document/orgapp/search-for-files
1316
+ */
1317
+ searchDentries(
1318
+ query: SearchDentriesQuery,
1319
+ params: SearchDentriesParams,
1320
+ ): Promise<SearchDentriesResponse>
1321
+ /**
1322
+ * 提交文件
1323
+ * @see https://open.dingtalk.com/document/app/submittal-file
1324
+ */
1325
+ storageCommitFile(
1326
+ parentDentryUuid: string,
1327
+ query: StorageCommitFileQuery,
1328
+ params: StorageCommitFileParams,
1329
+ ): Promise<StorageCommitFileResponse>
1330
+ /**
1331
+ * 获取文件上传信息
1332
+ * @see https://open.dingtalk.com/document/app/obtain-file-upload-informations
1333
+ */
1334
+ storageGetFileUploadInfo(
1335
+ parentDentryUuid: string,
1336
+ query: StorageGetFileUploadInfoQuery,
1337
+ params: StorageGetFileUploadInfoParams,
1338
+ ): Promise<StorageGetFileUploadInfoResponse>
1339
+ /**
1340
+ * 取消订阅文件变更事件
1341
+ * @see https://open.dingtalk.com/document/isvapp/unsubscribe-from-file-change-event
1342
+ */
1343
+ unsubscribeEvent(
1344
+ query: UnsubscribeEventQuery,
1345
+ params: UnsubscribeEventParams,
1346
+ ): Promise<UnsubscribeEventResponse>
1347
+ /**
1348
+ * 获取文件列表
1349
+ * @see https://open.dingtalk.com/document/isvapp/get-the-list-of-files-or-folders-under-a-space
1350
+ */
1351
+ listAllDentries(
1352
+ spaceId: string,
1353
+ query: ListAllDentriesQuery,
1354
+ params: ListAllDentriesParams,
1355
+ ): Promise<ListAllDentriesResponse>
1356
+ /**
1357
+ * 批量获取文件(夹)信息
1358
+ * @see https://open.dingtalk.com/document/isvapp/get-file-or-folder-information-in-bulk
1359
+ */
1360
+ getDentries(
1361
+ spaceId: string,
1362
+ query: GetDentriesQuery,
1363
+ params: GetDentriesParams,
1364
+ ): Promise<GetDentriesResponse>
1365
+ /**
1366
+ * 批量获取文件缩略图
1367
+ * @see https://open.dingtalk.com/document/isvapp/get-file-thumbnails-in-bulk
1368
+ */
1369
+ getDentryThumbnails(
1370
+ spaceId: string,
1371
+ query: GetDentryThumbnailsQuery,
1372
+ params: GetDentryThumbnailsParams,
1373
+ ): Promise<GetDentryThumbnailsResponse>
1374
+ /**
1375
+ * 批量移动文件或文件夹
1376
+ * @see https://open.dingtalk.com/document/isvapp/bulk-move-files-or-folders
1377
+ */
1378
+ moveDentries(
1379
+ spaceId: string,
1380
+ query: MoveDentriesQuery,
1381
+ params: MoveDentriesParams,
1382
+ ): Promise<MoveDentriesResponse>
1383
+ /**
1384
+ * 批量拷贝文件或文件夹
1385
+ * @see https://open.dingtalk.com/document/isvapp/copy-files-or-folders-in-bulk
1386
+ */
1387
+ copyDentries(
1388
+ spaceId: string,
1389
+ query: CopyDentriesQuery,
1390
+ params: CopyDentriesParams,
1391
+ ): Promise<CopyDentriesResponse>
1392
+ /**
1393
+ * 批量删除文件或文件夹
1394
+ * @see https://open.dingtalk.com/document/isvapp/delete-files-or-folders-in-bulk
1395
+ */
1396
+ deleteDentries(
1397
+ spaceId: string,
1398
+ query: DeleteDentriesQuery,
1399
+ params: DeleteDentriesParams,
1400
+ ): Promise<DeleteDentriesResponse>
1401
+ /**
1402
+ * 获取异步任务信息
1403
+ * @see https://open.dingtalk.com/document/isvapp/get-the-asynchronous-task-information-in-storage
1404
+ */
1405
+ getTask(taskId: string, query: GetTaskQuery): Promise<GetTaskResponse>
1406
+ /**
1407
+ * 初始化文件分片上传
1408
+ * @see https://open.dingtalk.com/document/isvapp/initialize-a-multipart-upload-object
1409
+ */
1410
+ initMultipartFileUpload(
1411
+ spaceId: string,
1412
+ query: InitMultipartFileUploadQuery,
1413
+ params: InitMultipartFileUploadParams,
1414
+ ): Promise<InitMultipartFileUploadResponse>
1415
+ /**
1416
+ * 获取文件上传信息(分片上传)
1417
+ * @see https://open.dingtalk.com/document/isvapp/obtains-the-information-about-multipart-uploads-of-an-object
1418
+ */
1419
+ getMultipartFileUploadInfos(
1420
+ query: GetMultipartFileUploadInfosQuery,
1421
+ params: GetMultipartFileUploadInfosParams,
1422
+ ): Promise<GetMultipartFileUploadInfosResponse>
1423
+ /**
1424
+ * 获取企业存储中企业维度的信息
1425
+ * @see https://open.dingtalk.com/document/isvapp/obtain-enterprise-information-1
1426
+ */
1427
+ getOrg(corpId: string, query: GetOrgQuery): Promise<GetOrgResponse>
1428
+ /**
1429
+ * 还原回收站中的回收项
1430
+ * @see https://open.dingtalk.com/document/isvapp/restore-recycle-items
1431
+ */
1432
+ restoreRecycleItem(
1433
+ recycleBinId: string,
1434
+ recycleItemId: string,
1435
+ query: RestoreRecycleItemQuery,
1436
+ params: RestoreRecycleItemParams,
1437
+ ): Promise<RestoreRecycleItemResponse>
1438
+ /**
1439
+ * 获取回收站信息
1440
+ * @see https://open.dingtalk.com/document/isvapp/obtain-information-about-the-recycle-bin
1441
+ */
1442
+ getRecycleBin(query: GetRecycleBinQuery): Promise<GetRecycleBinResponse>
1443
+ /**
1444
+ * 获取回收项详情
1445
+ * @see https://open.dingtalk.com/document/isvapp/obtain-recycling-item-information
1446
+ */
1447
+ getRecycleItem(
1448
+ recycleBinId: string,
1449
+ recycleItemId: string,
1450
+ query: GetRecycleItemQuery,
1451
+ ): Promise<GetRecycleItemResponse>
1452
+ /**
1453
+ * 删除回收项, 删除之后该记录从回收站删除, 后续文件就无法恢复了
1454
+ * @see https://open.dingtalk.com/document/isvapp/delete-recycle-item
1455
+ */
1456
+ deleteRecycleItem(
1457
+ recycleBinId: string,
1458
+ recycleItemId: string,
1459
+ query: DeleteRecycleItemQuery,
1460
+ ): Promise<DeleteRecycleItemResponse>
1461
+ /**
1462
+ * 清空回收站
1463
+ * @see https://open.dingtalk.com/document/isvapp/empty-the-recycle-bin
1464
+ */
1465
+ clearRecycleBin(
1466
+ recycleBinId: string,
1467
+ query: ClearRecycleBinQuery,
1468
+ ): Promise<ClearRecycleBinResponse>
1469
+ /**
1470
+ * 批量删除回收项, 删除之后该记录从回收站删除, 后续文件就无法恢复了
1471
+ * @see https://open.dingtalk.com/document/isvapp/batch-delete-recycle-items
1472
+ */
1473
+ deleteRecycleItems(
1474
+ recycleBinId: string,
1475
+ query: DeleteRecycleItemsQuery,
1476
+ params: DeleteRecycleItemsParams,
1477
+ ): Promise<DeleteRecycleItemsResponse>
1478
+ /**
1479
+ * 批量还原回收站中的回收项
1480
+ * @see https://open.dingtalk.com/document/isvapp/batch-restore-recycled-items
1481
+ */
1482
+ restoreRecycleItems(
1483
+ recycleBinId: string,
1484
+ query: RestoreRecycleItemsQuery,
1485
+ params: RestoreRecycleItemsParams,
1486
+ ): Promise<RestoreRecycleItemsResponse>
1487
+ /**
1488
+ * 获取文件历史版本
1489
+ * @see https://open.dingtalk.com/document/isvapp/obtains-a-list-of-file-versions
1490
+ */
1491
+ listDentryVersions(
1492
+ spaceId: string,
1493
+ dentryId: string,
1494
+ query: ListDentryVersionsQuery,
1495
+ ): Promise<ListDentryVersionsResponse>
1496
+ /**
1497
+ * 获取文件打开链接
1498
+ * @see https://open.dingtalk.com/document/isvapp/obtains-the-object-preview-or-editing-information
1499
+ */
1500
+ getDentryOpenInfo(
1501
+ spaceId: string,
1502
+ dentryId: string,
1503
+ query: GetDentryOpenInfoQuery,
1504
+ params: GetDentryOpenInfoParams,
1505
+ ): Promise<GetDentryOpenInfoResponse>
1506
+ /**
1507
+ * 移动文件或文件夹
1508
+ * @see https://open.dingtalk.com/document/isvapp/move-a-file-or-folder
1509
+ */
1510
+ moveDentry(
1511
+ spaceId: string,
1512
+ dentryId: string,
1513
+ query: MoveDentryQuery,
1514
+ params: MoveDentryParams,
1515
+ ): Promise<MoveDentryResponse>
1516
+ /**
1517
+ * 获取权限列表
1518
+ * @see https://open.dingtalk.com/document/isvapp/obtain-a-permission-list-storage
1519
+ */
1520
+ listPermissionsIsv(
1521
+ spaceId: string,
1522
+ dentryId: string,
1523
+ query: ListPermissionsIsvQuery,
1524
+ params: ListPermissionsIsvParams,
1525
+ ): Promise<ListPermissionsIsvResponse>
1526
+ /**
1527
+ * 获取文件下载信息
1528
+ * @see https://open.dingtalk.com/document/orgapp/obtains-the-download-information-about-a-file
1529
+ */
1530
+ getFileDownloadInfo(
1531
+ spaceId: string,
1532
+ dentryId: string,
1533
+ query: GetFileDownloadInfoQuery,
1534
+ params: GetFileDownloadInfoParams,
1535
+ ): Promise<GetFileDownloadInfoResponse>
1536
+ /**
1537
+ * 获取回收项列表
1538
+ * @see https://open.dingtalk.com/document/isvapp/gets-the-list-of-recycle-items
1539
+ */
1540
+ listRecycleItems(
1541
+ recycleBinId: string,
1542
+ query: ListRecycleItemsQuery,
1543
+ ): Promise<ListRecycleItemsResponse>
1544
+ /**
1545
+ * 删除文件或文件夹
1546
+ * @see https://open.dingtalk.com/document/isvapp/delete-a-file-or-folder
1547
+ */
1548
+ deleteDentry(
1549
+ spaceId: string,
1550
+ dentryId: string,
1551
+ query: DeleteDentryQuery,
1552
+ ): Promise<DeleteDentryResponse>
1553
+ /**
1554
+ * 重命名文件或文件夹
1555
+ * @see https://open.dingtalk.com/document/isvapp/rename-a-file-or-folder
1556
+ */
1557
+ renameDentry(
1558
+ spaceId: string,
1559
+ dentryId: string,
1560
+ query: RenameDentryQuery,
1561
+ params: RenameDentryParams,
1562
+ ): Promise<RenameDentryResponse>
1563
+ /**
1564
+ * 获取文件列表
1565
+ * @see https://open.dingtalk.com/document/isvapp/obtain-the-file-list-storage
1566
+ */
1567
+ listDentries(
1568
+ spaceId: string,
1569
+ query: ListDentriesQuery,
1570
+ ): Promise<ListDentriesResponse>
1571
+ /**
1572
+ * 恢复文件历史版本
1573
+ * @see https://open.dingtalk.com/document/isvapp/restore-previous-versions-of-files
1574
+ */
1575
+ revertDentryVersion(
1576
+ spaceId: string,
1577
+ dentryId: string,
1578
+ version: number,
1579
+ query: RevertDentryVersionQuery,
1580
+ ): Promise<RevertDentryVersionResponse>
1581
+ /**
1582
+ * 拷贝文件或文件夹
1583
+ * @see https://open.dingtalk.com/document/isvapp/copy-an-object
1584
+ */
1585
+ copyDentry(
1586
+ spaceId: string,
1587
+ dentryId: string,
1588
+ query: CopyDentryQuery,
1589
+ params: CopyDentryParams,
1590
+ ): Promise<CopyDentryResponse>
1591
+ /**
1592
+ * 获取开放平台应用在企业存储中的相关应用信息
1593
+ * @see https://open.dingtalk.com/document/isvapp/queries-application-information-1
1594
+ */
1595
+ getCurrentApp(query: GetCurrentAppQuery): Promise<GetCurrentAppResponse>
1596
+ /**
1597
+ * 获取空间信息
1598
+ * @see https://open.dingtalk.com/document/isvapp/get-space-information
1599
+ */
1600
+ storageGetSpace(
1601
+ spaceId: string,
1602
+ query: StorageGetSpaceQuery,
1603
+ ): Promise<StorageGetSpaceResponse>
1604
+ /**
1605
+ * 添加文件夹
1606
+ * @see https://open.dingtalk.com/document/isvapp/add-folder
1607
+ */
1608
+ addFolder(
1609
+ spaceId: string,
1610
+ parentId: string,
1611
+ query: AddFolderQuery,
1612
+ params: AddFolderParams,
1613
+ ): Promise<AddFolderResponse>
1614
+ /**
1615
+ * 获取文件(夹)信息
1616
+ * @see https://open.dingtalk.com/document/isvapp/obtain-file-or-folder-information
1617
+ */
1618
+ getDentry(
1619
+ spaceId: string,
1620
+ dentryId: string,
1621
+ query: GetDentryQuery,
1622
+ params: GetDentryParams,
1623
+ ): Promise<GetDentryResponse>
1624
+ /**
1625
+ * 删除文件上的App属性值
1626
+ * @see https://open.dingtalk.com/document/isvapp/delete-file-app-attribute
1627
+ */
1628
+ deleteDentryAppProperties(
1629
+ spaceId: number,
1630
+ dentryId: number,
1631
+ query: DeleteDentryAppPropertiesQuery,
1632
+ params: DeleteDentryAppPropertiesParams,
1633
+ ): Promise<DeleteDentryAppPropertiesResponse>
1634
+ /**
1635
+ * 修改文件上的App属性值
1636
+ * @see https://open.dingtalk.com/document/isvapp/update-the-application-properties-of-a-file-or-folder
1637
+ */
1638
+ updateDentryAppProperties(
1639
+ spaceId: number,
1640
+ dentryId: number,
1641
+ query: UpdateDentryAppPropertiesQuery,
1642
+ params: UpdateDentryAppPropertiesParams,
1643
+ ): Promise<UpdateDentryAppPropertiesResponse>
1644
+ /**
1645
+ * 提交文件
1646
+ * @see https://open.dingtalk.com/document/orgapp/submit-documents
1647
+ */
1648
+ storageCommitFile(
1649
+ spaceId: string,
1650
+ query: StorageCommitFileQuery,
1651
+ params: StorageCommitFileParams,
1652
+ ): Promise<StorageCommitFileResponse>
1653
+ /**
1654
+ * 获取文件上传信息
1655
+ * @see https://open.dingtalk.com/document/orgapp/obtain-storage-upload-information
1656
+ */
1657
+ storageGetFileUploadInfo(
1658
+ spaceId: string,
1659
+ query: StorageGetFileUploadInfoQuery,
1660
+ params: StorageGetFileUploadInfoParams,
1661
+ ): Promise<StorageGetFileUploadInfoResponse>
1662
+ /**
1663
+ * 修改权限
1664
+ * @see https://open.dingtalk.com/document/isvapp/modify-storage-permissions
1665
+ */
1666
+ storageUpdatePermission(
1667
+ spaceId: string,
1668
+ dentryId: string,
1669
+ query: StorageUpdatePermissionQuery,
1670
+ params: StorageUpdatePermissionParams,
1671
+ ): Promise<StorageUpdatePermissionResponse>
1672
+ /**
1673
+ * 删除权限
1674
+ * @see https://open.dingtalk.com/document/isvapp/delete-storage-permissions
1675
+ */
1676
+ storageDeletePermission(
1677
+ spaceId: string,
1678
+ dentryId: string,
1679
+ query: StorageDeletePermissionQuery,
1680
+ params: StorageDeletePermissionParams,
1681
+ ): Promise<StorageDeletePermissionResponse>
1682
+ /**
1683
+ * 添加权限
1684
+ * @see https://open.dingtalk.com/document/isvapp/add-permissions-storage
1685
+ */
1686
+ storageAddPermission(
1687
+ spaceId: string,
1688
+ dentryId: string,
1689
+ query: StorageAddPermissionQuery,
1690
+ params: StorageAddPermissionParams,
1691
+ ): Promise<StorageAddPermissionResponse>
1692
+ /**
1693
+ * 添加空间
1694
+ * @see https://open.dingtalk.com/document/isvapp/add-space
1695
+ */
1696
+ storageAddSpace(
1697
+ query: StorageAddSpaceQuery,
1698
+ params: StorageAddSpaceParams,
1699
+ ): Promise<StorageAddSpaceResponse>
1700
+ }
1701
+ }