@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,561 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface InviteUsersParams {
5
+ /** 操作用户unionId。 */
6
+ unionId?: string
7
+ /** 被邀请人对象。 */
8
+ inviteeList?: object[]
9
+ }
10
+
11
+ export interface InviteUsersResponse {
12
+ success?: unknown
13
+ }
14
+
15
+ export interface FocusParams {
16
+ /** 行为动作: */
17
+ action: string
18
+ /** 被操作用户unionId。 */
19
+ unionId: string
20
+ }
21
+
22
+ export interface FocusResponse {
23
+ success?: unknown
24
+ }
25
+
26
+ export interface CohostsParams {
27
+ /** 行为动作: */
28
+ action: string
29
+ /** 被操作用户对象。 */
30
+ userList: object[]
31
+ }
32
+
33
+ export interface CohostsResponse {
34
+ success?: unknown
35
+ }
36
+
37
+ export interface MuteMembersParams {
38
+ /** 操作类型: */
39
+ action: string
40
+ /** 被操作用户对象。 */
41
+ userList: object[]
42
+ }
43
+
44
+ export interface MuteMembersResponse {
45
+ success?: unknown
46
+ }
47
+
48
+ export interface QueryScheduleConferenceInfoQuery {
49
+ /** 标记当前开始读取的位置,置空表示从头开始 */
50
+ nextToken?: string
51
+ /** 本次读取的最大数据记录数量 */
52
+ maxResults?: number
53
+ }
54
+
55
+ export interface QueryScheduleConferenceInfoResponse {
56
+ totalCount?: number
57
+ nextToken: string
58
+ conferenceList?: {
59
+ conferenceId?: string
60
+ title?: string
61
+ roomCode?: string
62
+ status?: number
63
+ startTime?: number
64
+ endTime?: number
65
+ }[]
66
+ }
67
+
68
+ export interface QueryCloudRecordVideoQuery {
69
+ /** 用户unionId。 */
70
+ unionId: string
71
+ }
72
+
73
+ export interface QueryCloudRecordVideoResponse {
74
+ videoList?: {
75
+ recordId?: string
76
+ unionId?: string
77
+ startTime?: number
78
+ recordType?: number
79
+ duration?: number
80
+ fileSize?: number
81
+ endTime?: number
82
+ mediaId?: string
83
+ regionId?: string
84
+ }[]
85
+ }
86
+
87
+ export interface QueryCloudRecordTextQuery {
88
+ /** 用户unionId。 */
89
+ unionId?: string
90
+ /** 开始时间的千分之一秒,单位毫秒。 */
91
+ startTime?: number
92
+ /** 查询方式: */
93
+ direction?: string
94
+ /** 单词查询条数,最大2000。 */
95
+ maxResults?: number
96
+ /** 分页游标。 */
97
+ nextToken?: number
98
+ }
99
+
100
+ export interface QueryCloudRecordTextResponse {
101
+ hasMore?: unknown
102
+ paragraphList?: {
103
+ nextTtoken?: number
104
+ status?: number
105
+ unionId?: string
106
+ nickName?: string
107
+ recordId?: number
108
+ startTime?: number
109
+ endTime?: number
110
+ paragraph?: string
111
+ sentenceList?: number
112
+ }[]
113
+ }
114
+
115
+ export interface QueryCloudRecordVideoPlayInfoQuery {
116
+ /** 用户unionId。 */
117
+ unionId: string
118
+ /** 媒体文件ID。 */
119
+ mediaId: string
120
+ /** 地域ID。 */
121
+ regionId: string
122
+ }
123
+
124
+ export interface QueryCloudRecordVideoPlayInfoResponse {
125
+ playUrl?: string
126
+ mp4FileUrl?: string
127
+ fileSize?: number
128
+ duration?: number
129
+ status?: number
130
+ }
131
+
132
+ export interface StopCloudRecordParams {
133
+ /** 用户unionId。 */
134
+ unionId: string
135
+ }
136
+
137
+ export interface StopCloudRecordResponse {
138
+ code?: string
139
+ }
140
+
141
+ export interface StopStreamOutParams {
142
+ /** 推流ID,开启视频会议直播推流后生成。 */
143
+ streamId: string
144
+ /** 是否停止所有流,为true时**streamId**参数无效。 */
145
+ stopAllStream: unknown
146
+ /** 用户unionId,可以调用[通过免登码获取用户信息(v2)](https://open.dingtalk.com/document/app/obtain-the-userid-of-a-user-by-using-the-log-free)接口获取。 */
147
+ unionId: string
148
+ }
149
+
150
+ export interface StopStreamOutResponse {
151
+ code: string
152
+ }
153
+
154
+ export interface StartStreamOutParams {
155
+ /** 用户unionId,可以调用[通过免登码获取用户信息(v2)](https://open.dingtalk.com/document/app/obtain-the-userid-of-a-user-by-using-the-log-free)接口获取。 */
156
+ unionId: string
157
+ /** 是否需要主持人加入后才允许推流。 */
158
+ needHostJoin: unknown
159
+ /** 推流地址列表,最多10个,需要以rtmp开头。 */
160
+ streamUrlList: string[]
161
+ /** 推流名称。 */
162
+ streamName: string
163
+ /** 布局,取值: */
164
+ mode: string
165
+ /** 小窗位置,取值: */
166
+ smallWindowPosition: string
167
+ }
168
+
169
+ export interface StartStreamOutResponse {
170
+ successStreamMap?: unknown
171
+ failStreamMap?: unknown
172
+ }
173
+
174
+ export interface StartCloudRecordParams {
175
+ /** 用户unionId。 */
176
+ unionId: string
177
+ /** 小窗位置,取值: */
178
+ smallWindowPosition?: string
179
+ /** 布局,取值: */
180
+ mode?: string
181
+ }
182
+
183
+ export interface StartCloudRecordResponse {
184
+ code?: string
185
+ }
186
+
187
+ export interface QueryConferenceInfoBatchParams {
188
+ /** 会议ID列表。 */
189
+ conferenceIdList: string[]
190
+ }
191
+
192
+ export interface QueryConferenceInfoBatchResponse {
193
+ infos?: {
194
+ conferenceId?: string
195
+ title?: string
196
+ startTime?: number
197
+ status?: number
198
+ mediaStatus?: number
199
+ userList?: number
200
+ }[]
201
+ }
202
+
203
+ export interface CloseVideoConferenceQuery {
204
+ /** 员工在当前开发者企业账号范围内的唯一标识。 */
205
+ unionId: string
206
+ }
207
+
208
+ export interface CloseVideoConferenceResponse {
209
+ code: number
210
+ cause?: string
211
+ }
212
+
213
+ export interface CreateVideoConferenceParams {
214
+ /** 会议发起人的unionId。 */
215
+ userId: string
216
+ /** 会议主题,最多不能超20个中文。 */
217
+ confTitle: string
218
+ /** 邀请参会人员unionId列表。 */
219
+ inviteUserIds?: string[]
220
+ /** 是否邀请主叫。 */
221
+ inviteCaller?: unknown
222
+ }
223
+
224
+ export interface CreateVideoConferenceResponse {
225
+ conferenceId: string
226
+ conferencePassword?: string
227
+ hostPassword?: string
228
+ externalLinkUrl?: string
229
+ phoneNumbers?: string[]
230
+ roomCode?: string
231
+ }
232
+
233
+ export interface QueryConferenceMembersQuery {
234
+ /** 分页游标。 */
235
+ nextToken?: string
236
+ /** 每页最大条目数,默认值300,无最大值限制。 */
237
+ maxResults?: number
238
+ }
239
+
240
+ export interface QueryConferenceMembersResponse {
241
+ memberModels?: {
242
+ unionId?: string
243
+ conferenceId?: string
244
+ userNick?: string
245
+ joinTime?: number
246
+ leaveTime?: number
247
+ duration?: number
248
+ host?: number
249
+ attendStatus?: number
250
+ outerOrgMember?: number
251
+ pstnJoin?: number
252
+ coHost?: number
253
+ }[]
254
+ nextToken?: string
255
+ totalCount?: number
256
+ }
257
+
258
+ export interface QueryConferenceInfoResponse {
259
+ confInfo?: {
260
+ activeNum?: number
261
+ attendNum?: number
262
+ confDuration?: number
263
+ conferenceId?: string
264
+ creatorId?: string
265
+ creatorNick?: string
266
+ externalLinkUrl?: string
267
+ invitedNum?: number
268
+ startTime?: number
269
+ status?: number
270
+ title?: string
271
+ roomCode?: string
272
+ endTime?: number
273
+ }
274
+ }
275
+
276
+ export interface CancelScheduleConferenceParams {
277
+ /** 预约会议id: */
278
+ scheduleConferenceId: string
279
+ /** 预约会议创建者unionId。 */
280
+ creatorUnionId: string
281
+ }
282
+
283
+ export interface CancelScheduleConferenceResponse {
284
+ success?: unknown
285
+ }
286
+
287
+ export interface QueryScheduleConferenceQuery {
288
+ /** 请求者unionId。 */
289
+ requestUnionId: string
290
+ }
291
+
292
+ export interface QueryScheduleConferenceResponse {
293
+ requestId?: string
294
+ scheduleConferenceId?: string
295
+ title?: string
296
+ startTime?: number
297
+ endTime?: number
298
+ roomCode?: string
299
+ url?: string
300
+ phones?: string[]
301
+ }
302
+
303
+ export interface UpdateScheduleConferenceParams {
304
+ /** 预约会议创建者unionId。 */
305
+ creatorUnionId: string
306
+ /** 预约会议id: */
307
+ scheduleConferenceId: string
308
+ /** 预约会议标题。 */
309
+ title: string
310
+ /** 预约会议开始时间,毫秒级UTC时间戳。 */
311
+ startTime: number
312
+ /** 预约会议结束时间,毫秒级UTC时间戳。 */
313
+ endTime: number
314
+ }
315
+
316
+ export interface UpdateScheduleConferenceResponse {
317
+ success?: unknown
318
+ }
319
+
320
+ export interface CreateScheduleConferenceParams {
321
+ /** 创建者unionId。 */
322
+ creatorUnionId: string
323
+ /** 预约会议标题。 */
324
+ title: string
325
+ /** 预约会议开始时间,毫秒级UTC时间戳。 */
326
+ startTime: number
327
+ /** 预约会议结束时间,毫秒级UTC时间戳。 */
328
+ endTime: number
329
+ }
330
+
331
+ export interface CreateScheduleConferenceResponse {
332
+ requestId?: string
333
+ scheduleConferenceId?: string
334
+ roomCode?: string
335
+ url?: string
336
+ phones?: string[]
337
+ }
338
+
339
+ // funcName: isOldApi
340
+ Internal.define({
341
+ '/conference/videoConferences/{conferenceId}/users/invite': {
342
+ POST: { inviteUsers: false },
343
+ },
344
+ '/conference/videoConferences/{conferenceId}/focus': {
345
+ POST: { focus: false },
346
+ },
347
+ '/conference/videoConferences/{conferenceId}/coHosts/set': {
348
+ POST: { cohosts: false },
349
+ },
350
+ '/conference/videoConferences/{conferenceId}/members/mute': {
351
+ POST: { muteMembers: false },
352
+ },
353
+ '/conference/videoConferences/scheduleConferences/{scheduleConferenceId}': {
354
+ GET: { queryScheduleConferenceInfo: false },
355
+ },
356
+ '/conference/videoConferences/{conferenceId}/cloudRecords/getVideos': {
357
+ GET: { queryCloudRecordVideo: false },
358
+ },
359
+ '/conference/videoConferences/{conferenceId}/cloudRecords/getTexts': {
360
+ GET: { queryCloudRecordText: false },
361
+ },
362
+ '/conference/videoConferences/{conferenceId}/cloudRecords/videos/getPlayInfos':
363
+ { GET: { queryCloudRecordVideoPlayInfo: false } },
364
+ '/conference/videoConferences/{conferenceId}/cloudRecords/stop': {
365
+ POST: { stopCloudRecord: false },
366
+ },
367
+ '/conference/videoConferences/{conferenceId}/streamOuts/stop': {
368
+ POST: { stopStreamOut: false },
369
+ },
370
+ '/conference/videoConferences/{conferenceId}/streamOuts/start': {
371
+ POST: { startStreamOut: false },
372
+ },
373
+ '/conference/videoConferences/{conferenceId}/cloudRecords/start': {
374
+ POST: { startCloudRecord: false },
375
+ },
376
+ '/conference/videoConferences/query': {
377
+ POST: { queryConferenceInfoBatch: false },
378
+ },
379
+ '/conference/videoConferences/{conferenceId}': {
380
+ DELETE: { closeVideoConference: false },
381
+ GET: { queryConferenceInfo: false },
382
+ },
383
+ '/conference/videoConferences': { POST: { createVideoConference: false } },
384
+ '/conference/videoConferences/{conferenceId}/members': {
385
+ GET: { queryConferenceMembers: false },
386
+ },
387
+ '/conference/scheduleConferences/cancel': {
388
+ POST: { cancelScheduleConference: false },
389
+ },
390
+ '/conference/scheduleConferences/{scheduleConferenceId}/infos': {
391
+ GET: { queryScheduleConference: false },
392
+ },
393
+ '/conference/scheduleConferences': {
394
+ PUT: { updateScheduleConference: false },
395
+ POST: { createScheduleConference: false },
396
+ },
397
+ })
398
+
399
+ declare module '../internal' {
400
+ interface Internal {
401
+ /**
402
+ * 邀请其他人员
403
+ * @see https://open.dingtalk.com/document/orgapp/invite-users-to-join
404
+ */
405
+ inviteUsers(
406
+ conferenceId: string,
407
+ params: InviteUsersParams,
408
+ ): Promise<InviteUsersResponse>
409
+ /**
410
+ * 设置全员看他
411
+ * @see https://open.dingtalk.com/document/orgapp/set-the-whole-staff-to-see-him
412
+ */
413
+ focus(conferenceId: string, params: FocusParams): Promise<FocusResponse>
414
+ /**
415
+ * 设置联席主持人
416
+ * @see https://open.dingtalk.com/document/orgapp/set-up-co-hosts
417
+ */
418
+ cohosts(
419
+ conferenceId: string,
420
+ params: CohostsParams,
421
+ ): Promise<CohostsResponse>
422
+ /**
423
+ * 指定人员静音或取消静音
424
+ * @see https://open.dingtalk.com/document/orgapp/specify-person-to-mute-or-unmute
425
+ */
426
+ muteMembers(
427
+ conferenceId: string,
428
+ params: MuteMembersParams,
429
+ ): Promise<MuteMembersResponse>
430
+ /**
431
+ * 分页获取预约会议历史会议信息,当前仅返回最后一次的会议信息
432
+ * @see https://open.dingtalk.com/document/orgapp/query-appointment-meeting-history-meeting-information
433
+ */
434
+ queryScheduleConferenceInfo(
435
+ scheduleConferenceId: string,
436
+ query: QueryScheduleConferenceInfoQuery,
437
+ ): Promise<QueryScheduleConferenceInfoResponse>
438
+ /**
439
+ * 查询会议录制的详情信息
440
+ * @see https://open.dingtalk.com/document/isvapp/query-recording-information
441
+ */
442
+ queryCloudRecordVideo(
443
+ conferenceId: string,
444
+ query: QueryCloudRecordVideoQuery,
445
+ ): Promise<QueryCloudRecordVideoResponse>
446
+ /**
447
+ * 查询会议录制中的文本信息
448
+ * @see https://open.dingtalk.com/document/isvapp/queries-the-text-information-about-cloud-recording
449
+ */
450
+ queryCloudRecordText(
451
+ conferenceId: string,
452
+ query: QueryCloudRecordTextQuery,
453
+ ): Promise<QueryCloudRecordTextResponse>
454
+ /**
455
+ * 查询会议录制中的视频信息
456
+ * @see https://open.dingtalk.com/document/isvapp/queries-the-playback-information-about-a-recorded-cloud-video
457
+ */
458
+ queryCloudRecordVideoPlayInfo(
459
+ conferenceId: string,
460
+ query: QueryCloudRecordVideoPlayInfoQuery,
461
+ ): Promise<QueryCloudRecordVideoPlayInfoResponse>
462
+ /**
463
+ * 停止视频会议云录制
464
+ * @see https://open.dingtalk.com/document/isvapp/video-conferencing-stops-cloud-recording
465
+ */
466
+ stopCloudRecord(
467
+ conferenceId: string,
468
+ params: StopCloudRecordParams,
469
+ ): Promise<StopCloudRecordResponse>
470
+ /**
471
+ * 会议停止直播推流
472
+ * @see https://open.dingtalk.com/document/orgapp/videoconferencing-stops-live-stream-ingest
473
+ */
474
+ stopStreamOut(
475
+ conferenceId: string,
476
+ params: StopStreamOutParams,
477
+ ): Promise<StopStreamOutResponse>
478
+ /**
479
+ * 会议开始直播推流
480
+ * @see https://open.dingtalk.com/document/orgapp/video-conference-enables-live-stream-ingest
481
+ */
482
+ startStreamOut(
483
+ conferenceId: string,
484
+ params: StartStreamOutParams,
485
+ ): Promise<StartStreamOutResponse>
486
+ /**
487
+ * 开启视频会议云录制
488
+ * @see https://open.dingtalk.com/document/isvapp/video-conference-open-cloud-recording
489
+ */
490
+ startCloudRecord(
491
+ conferenceId: string,
492
+ params: StartCloudRecordParams,
493
+ ): Promise<StartCloudRecordResponse>
494
+ /**
495
+ * 批量查询视频会议信息
496
+ * @see https://open.dingtalk.com/document/isvapp/batch-query-of-video-conference-information
497
+ */
498
+ queryConferenceInfoBatch(
499
+ params: QueryConferenceInfoBatchParams,
500
+ ): Promise<QueryConferenceInfoBatchResponse>
501
+ /**
502
+ * 关闭视频会议
503
+ * @see https://open.dingtalk.com/document/isvapp/close-audio-video-conferencing
504
+ */
505
+ closeVideoConference(
506
+ conferenceId: string,
507
+ query: CloseVideoConferenceQuery,
508
+ ): Promise<CloseVideoConferenceResponse>
509
+ /**
510
+ * 创建视频会议
511
+ * @see https://open.dingtalk.com/document/isvapp/create-a-video-conference
512
+ */
513
+ createVideoConference(
514
+ params: CreateVideoConferenceParams,
515
+ ): Promise<CreateVideoConferenceResponse>
516
+ /**
517
+ * 查询视频会议成员
518
+ * @see https://open.dingtalk.com/document/app/query-video-meeting-member-information
519
+ */
520
+ queryConferenceMembers(
521
+ conferenceId: string,
522
+ query: QueryConferenceMembersQuery,
523
+ ): Promise<QueryConferenceMembersResponse>
524
+ /**
525
+ * 查询视频会议信息
526
+ * @see https://open.dingtalk.com/document/app/querying-video-conference-information
527
+ */
528
+ queryConferenceInfo(
529
+ conferenceId: string,
530
+ ): Promise<QueryConferenceInfoResponse>
531
+ /**
532
+ * 取消预约会议
533
+ * @see https://open.dingtalk.com/document/app/cancel-appointment-meeting
534
+ */
535
+ cancelScheduleConference(
536
+ params: CancelScheduleConferenceParams,
537
+ ): Promise<CancelScheduleConferenceResponse>
538
+ /**
539
+ * 查询预约会议信息
540
+ * @see https://open.dingtalk.com/document/app/query-meeting-reservation
541
+ */
542
+ queryScheduleConference(
543
+ scheduleConferenceId: string,
544
+ query: QueryScheduleConferenceQuery,
545
+ ): Promise<QueryScheduleConferenceResponse>
546
+ /**
547
+ * 更新预约会议
548
+ * @see https://open.dingtalk.com/document/app/update-appointment-meeting
549
+ */
550
+ updateScheduleConference(
551
+ params: UpdateScheduleConferenceParams,
552
+ ): Promise<UpdateScheduleConferenceResponse>
553
+ /**
554
+ * 创建预约会议
555
+ * @see https://open.dingtalk.com/document/app/create-appointment-meeting
556
+ */
557
+ createScheduleConference(
558
+ params: CreateScheduleConferenceParams,
559
+ ): Promise<CreateScheduleConferenceResponse>
560
+ }
561
+ }
@@ -0,0 +1,97 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface PullDataByPkQuery {
5
+ /** 数据的主键字段值。 */
6
+ primaryKey: string
7
+ /** 同步数据的应用ID,第三方企业应用传应用的appId,企业自建应用传agentId。 */
8
+ appId?: string
9
+ }
10
+
11
+ export interface PullDataByPkResponse {
12
+ dataGmtCreate: number
13
+ dataGmtModified: number
14
+ dataCreateAppType: string
15
+ dataCreateAppId: string
16
+ dataModifiedAppType: string
17
+ dataModifiedAppId: string
18
+ jsonData: string
19
+ }
20
+
21
+ export interface PullDataByPageQuery {
22
+ /** 要拉取的主数据模型id。 */
23
+ dataModelId: string
24
+ /** 用于过滤时间范围的字段,包含数据创建时间(dataGmtCreate)和数据修改时间(dataGmtModified),如不传则不过滤。 */
25
+ datetimeFilterField?: string
26
+ /** 当配置了datetimeFilterField字段后,数据的时间起点,如果不传则将最早一条数据作为起点。 */
27
+ minDatetime?: number
28
+ /** 当配置了datetimeFilterField字段后,数据的时间终点,如果不传则按最新一条数据作为终点。 */
29
+ maxDatetime?: number
30
+ /** 用于翻页的游标,如果为空则从第一条数据开始查询。 */
31
+ nextToken?: string
32
+ /** 单次获取的最大记录条数,最大限制100条。 */
33
+ maxResults?: number
34
+ /** 同步数据的应用ID,第三方企业应用传应用的appId,企业自建应用传agentId。 */
35
+ appId?: string
36
+ }
37
+
38
+ export interface PullDataByPageResponse {
39
+ list: {
40
+ dataGmtCreate: number
41
+ dataGmtModified: number
42
+ dataCreateAppType: string
43
+ dataCreateAppId: string
44
+ dataModifiedAppType: string
45
+ dataModifiedAppId: string
46
+ jsonData: string
47
+ }[]
48
+ nextToken?: string
49
+ maxResults?: number
50
+ }
51
+
52
+ export interface SyncDataParams {
53
+ /** 支持批量同步数据。 */
54
+ triggerDataList: object[]
55
+ /** 同步数据的应用ID: */
56
+ appId?: string
57
+ }
58
+
59
+ export interface SyncDataResponse {
60
+ list: {
61
+ triggerId: string
62
+ bizPrimaryKey: string
63
+ success: number
64
+ subErrCode: string
65
+ subErrMsg: string
66
+ }[]
67
+ }
68
+
69
+ // funcName: isOldApi
70
+ Internal.define({
71
+ '/connector/data/{dataModelId}': { GET: { pullDataByPk: false } },
72
+ '/connector/data': { GET: { pullDataByPage: false } },
73
+ '/connector/triggers/data/sync': { POST: { syncData: false } },
74
+ })
75
+
76
+ declare module '../internal' {
77
+ interface Internal {
78
+ /**
79
+ * 通过业务主键拉取单条连接器主数据
80
+ * @see https://open.dingtalk.com/document/connector/pull-a-single-primary-record-based-on-the-business-primary
81
+ */
82
+ pullDataByPk(
83
+ dataModelId: string,
84
+ query: PullDataByPkQuery,
85
+ ): Promise<PullDataByPkResponse>
86
+ /**
87
+ * 分页拉取连接器主数据
88
+ * @see https://open.dingtalk.com/document/connector/bulk-pull-dingtalk-connector-master-data
89
+ */
90
+ pullDataByPage(query: PullDataByPageQuery): Promise<PullDataByPageResponse>
91
+ /**
92
+ * 同步连接器数据
93
+ * @see https://open.dingtalk.com/document/connector/dingtalk-connector-data-synchronization-interface
94
+ */
95
+ syncData(params: SyncDataParams): Promise<SyncDataResponse>
96
+ }
97
+ }
@@ -0,0 +1,56 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface GetOrgAuthInfoQuery {
5
+ /** 需要获取的企业认证信息的企业corpId。详情参见[基础概念-CorpId](https://open.dingtalk.com/document/org/basic-concepts)。 */
6
+ targetCorpId?: string
7
+ }
8
+
9
+ export interface GetOrgAuthInfoResponse {
10
+ orgName: string
11
+ licenseOrgName: string
12
+ registrationNum?: string
13
+ unifiedSocialCredit?: string
14
+ organizationCode?: string
15
+ legalPerson?: string
16
+ licenseUrl?: string
17
+ authLevel: number
18
+ }
19
+
20
+ export interface BatchApproveUnionApplyParams {
21
+ /** 申请的合作伙伴组织 CorpId,参考[基础概念-CorpId](https://open.dingtalk.com/document/org/basic-concepts)。 */
22
+ branchCorpId?: string
23
+ /** 合作伙伴组织在上下游组织内的名称。 */
24
+ unionRootName?: string
25
+ /** 合作伙伴组织在上下游组织内的位置。 */
26
+ linkDeptId?: number
27
+ }
28
+
29
+ export interface BatchApproveUnionApplyResponse {
30
+ result?: unknown
31
+ }
32
+
33
+ // funcName: isOldApi
34
+ Internal.define({
35
+ '/contact/organizations/authInfos': { GET: { getOrgAuthInfo: false } },
36
+ '/contact/cooperateCorps/unionApplications/approve': {
37
+ POST: { batchApproveUnionApply: false },
38
+ },
39
+ })
40
+
41
+ declare module '../internal' {
42
+ interface Internal {
43
+ /**
44
+ * 查询企业认证信息
45
+ * @see https://open.dingtalk.com/document/isvapp/obtain-enterprise-authentication-information
46
+ */
47
+ getOrgAuthInfo(query: GetOrgAuthInfoQuery): Promise<GetOrgAuthInfoResponse>
48
+ /**
49
+ * 批量通过分支组织的关联申请
50
+ * @see https://open.dingtalk.com/document/isvapp/apply-for-association-with-multiple-branches-in-batch-batch-through-the-application-of-partner-organizations-to-join-contact
51
+ */
52
+ batchApproveUnionApply(
53
+ params: BatchApproveUnionApplyParams,
54
+ ): Promise<BatchApproveUnionApplyResponse>
55
+ }
56
+ }