@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,372 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface QueryUserBehaviorParams {
5
+ /** 用户行为: */
6
+ type: number
7
+ /** 端类型: */
8
+ platform: number
9
+ /** 开始时间,时间戳,单位毫秒。 */
10
+ startTime?: number
11
+ /** 结束时间,时间戳,单位毫秒。 */
12
+ endTime?: number
13
+ /** 分页大小。 */
14
+ pageSize: number
15
+ /** 起始页。 */
16
+ pageNumber: number
17
+ /** 用户userId信息,可调用[获取部门用户userId列表](https://open.dingtalk.com/document/orgapp/query-the-list-of-department-userids)接口获取userId。 */
18
+ userId?: string
19
+ }
20
+
21
+ export interface QueryUserBehaviorResponse {
22
+ data?: {
23
+ userName?: string
24
+ time?: number
25
+ type?: number
26
+ pictureUrl?: string
27
+ platform?: number
28
+ scene?: string
29
+ userId?: string
30
+ }[]
31
+ totalCnt?: number
32
+ dataCnt?: number
33
+ }
34
+
35
+ export interface GetPublicDevicesQuery {
36
+ /** 系统: */
37
+ platform?: string
38
+ /** 注册或申请的开始时间,单位毫秒。 */
39
+ startTime?: number
40
+ /** 注册或申请截止时间,单位毫秒。 */
41
+ endTime?: number
42
+ /** 单页返回的数据条数。 */
43
+ pageSize?: number
44
+ /** 页码。 */
45
+ pageNumber?: number
46
+ /** 设备标题。 */
47
+ title?: string
48
+ /** 设备mac地址。 */
49
+ macAddress?: string
50
+ }
51
+
52
+ export interface GetPublicDevicesResponse {
53
+ totalCnt?: number
54
+ dataCnt?: number
55
+ data?: {
56
+ gmtCreate?: number
57
+ gmtModified?: number
58
+ title?: string
59
+ macAddress?: string
60
+ platform?: string
61
+ deviceScopeType?: number
62
+ deviceStaffs?: number
63
+ deviceDepts?: number
64
+ deviceRoles?: number
65
+ }[]
66
+ }
67
+
68
+ export interface SendPhoneDingParams {
69
+ /** 接收DING消息的用户userId列表,最大值20。 */
70
+ userids: string[]
71
+ /** 消息内容。 */
72
+ content: string
73
+ }
74
+
75
+ export interface SendPhoneDingResponse {
76
+ success?: unknown
77
+ }
78
+
79
+ export interface QueryPartnerInfoResponse {
80
+ partnerDeptList?: {
81
+ title: string
82
+ value: string
83
+ memberCount: number
84
+ partnerNum?: string
85
+ partnerLabelModelLevel1?: number
86
+ }[]
87
+ partnerLabelList?: {
88
+ id?: number
89
+ name?: string
90
+ }[]
91
+ userId?: string
92
+ }
93
+
94
+ export interface GetConfBaseInfoByLogicalIdQuery {
95
+ /** 会议逻辑ID。 */
96
+ logicalConferenceId: string
97
+ }
98
+
99
+ export interface GetConfBaseInfoByLogicalIdResponse {
100
+ conferenceId?: string
101
+ title?: string
102
+ startTime?: number
103
+ logicalConferenceId?: string
104
+ unionId?: string
105
+ nickname?: string
106
+ }
107
+
108
+ export interface CreateTrustedDeviceBatchParams {
109
+ /** 员工userid,为0时表示这个设备为公共设备 */
110
+ userId: string
111
+ /** 操作端。 */
112
+ platform: string
113
+ /** 设备的Mac地址。 */
114
+ macAddressList: string[]
115
+ }
116
+
117
+ export interface CreateTrustedDeviceBatchResponse {
118
+ result?: unknown
119
+ }
120
+
121
+ export interface ListAuditLogQuery {
122
+ /** 操作日志起始时间,UNIX时间戳,单位毫秒。 */
123
+ startDate: number
124
+ /** 操作日志截止时间,UNIX时间戳,单位毫秒。 */
125
+ endDate: number
126
+ /** 每页最大条目数,最大值500。 */
127
+ pageSize: number
128
+ /** 操作记录生成时间,UNIX时间戳,单位毫秒,作为分页偏移量。 */
129
+ nextGmtCreate?: number
130
+ /** 操作记录文件id,作为分页偏移量。 */
131
+ nextBizId?: number
132
+ }
133
+
134
+ export interface ListAuditLogResponse {
135
+ list?: {
136
+ operatorName?: string
137
+ platform?: number
138
+ platformView?: string
139
+ status?: number
140
+ action?: number
141
+ actionView?: string
142
+ resource?: string
143
+ gmtCreate?: number
144
+ userId?: string
145
+ ipAddress?: string
146
+ orgName?: string
147
+ receiverName?: string
148
+ receiverTypeView?: string
149
+ receiverType?: number
150
+ resourceExtension?: string
151
+ resourceSize?: number
152
+ targetSpaceId?: number
153
+ realName?: string
154
+ bizId?: string
155
+ operateModuleView?: string
156
+ operateModule?: number
157
+ gmtModified?: number
158
+ docMemberList?: number
159
+ docReceiverList?: number
160
+ workSpaceName?: string
161
+ workSpacePcUrl?: string
162
+ workSpaceMobileUrl?: string
163
+ docPcUrl?: string
164
+ docMobileUrl?: string
165
+ workSpaceId?: number
166
+ }[]
167
+ }
168
+
169
+ export interface BanOrOpenGroupWordsParams {
170
+ /** 群ID,获取方式如下 */
171
+ openConverationId: string
172
+ /** 操作类型。 */
173
+ banWordsType: number
174
+ }
175
+
176
+ export interface BanOrOpenGroupWordsResponse {
177
+ code?: string
178
+ cause?: string
179
+ }
180
+
181
+ export interface GetSignedDetailByPageQuery {
182
+ /** 页码,首次传1。 */
183
+ pageNumber: number
184
+ /** 签署状态。 */
185
+ signStatus: number
186
+ /** 每页数量,最大值2000。 */
187
+ pageSize: number
188
+ }
189
+
190
+ export interface GetSignedDetailByPageResponse {
191
+ auditSignedDetailDTOList?: {
192
+ name?: string
193
+ staffId?: string
194
+ title?: string
195
+ phone?: string
196
+ email?: string
197
+ deptName?: string
198
+ roles?: string
199
+ }[]
200
+ currentPage?: number
201
+ pageSize?: number
202
+ total?: number
203
+ }
204
+
205
+ export interface PublishFileChangeNoticeParams {
206
+ /** 钉盘文件ID。可以调用[查询文件列表](https://open.dingtalk.com/document/orgapp-server/obtain-the-file-list)接口获取。 */
207
+ fileId: string
208
+ /** 钉盘空间ID,可调用[获取空间列表](https://open.dingtalk.com/document/orgapp-server/queries-a-space-list)接口获取。 */
209
+ spaceId: string
210
+ /** 操作人的unionId,可通过以下两种方式获取: */
211
+ operatorUnionId: string
212
+ /** 操作类型,取值: */
213
+ operateType?: string
214
+ }
215
+
216
+ export interface SendAppDingParams {
217
+ /** 接收DING消息的用户userid列表。 */
218
+ userids: string[]
219
+ /** 消息内容。 */
220
+ content: string
221
+ }
222
+
223
+ export interface GetPartnerTypeByParentIdResponse {
224
+ data: {
225
+ typeId: number
226
+ typeName: string
227
+ labelId: string
228
+ }[]
229
+ }
230
+
231
+ export interface SetDeptPartnerTypeAndNumParams {
232
+ /** 部门ID。 */
233
+ deptId: string
234
+ /** 伙伴编码。 */
235
+ partnerNum?: string
236
+ /** 伙伴类型ID。 */
237
+ labelIds?: string[]
238
+ }
239
+
240
+ export interface GetAllLabelableDeptsResponse {
241
+ data: {
242
+ deptId: string
243
+ superDeptId: string
244
+ deptName: string
245
+ memberCount: number
246
+ partnerNum: string
247
+ partnerLabelVOLevel1: number
248
+ partnerLabelVOLevel2: number
249
+ partnerLabelVOLevel3: number
250
+ partnerLabelVOLevel4: number
251
+ partnerLabelVOLevel5: number
252
+ }[]
253
+ }
254
+
255
+ // funcName: isOldApi
256
+ Internal.define({
257
+ '/exclusive/enterpriseSecurities/userBehaviors/screenshots/query': {
258
+ POST: { queryUserBehavior: false },
259
+ },
260
+ '/exclusive/trusts/publicDevices': { GET: { getPublicDevices: false } },
261
+ '/exclusive/phoneDings/send': { POST: { sendPhoneDing: false } },
262
+ '/exclusive/partners/users/{userId}': { GET: { queryPartnerInfo: false } },
263
+ '/exclusive/data/conferences': { GET: { getConfBaseInfoByLogicalId: false } },
264
+ '/exclusive/trusts/devices': { POST: { createTrustedDeviceBatch: false } },
265
+ '/exclusive/fileAuditLogs': { GET: { listAuditLog: false } },
266
+ '/exclusive/enterpriseSecurities/banOrOpenGroupWords': {
267
+ PUT: { banOrOpenGroupWords: false },
268
+ },
269
+ '/exclusive/audits/users': { GET: { getSignedDetailByPage: false } },
270
+ '/exclusive/comments/send': { POST: { publishFileChangeNotice: false } },
271
+ '/exclusive/appDings/send': { POST: { sendAppDing: false } },
272
+ '/exclusive/partnerLabels/{parentId}': {
273
+ GET: { getPartnerTypeByParentId: false },
274
+ },
275
+ '/exclusive/partnerDepartments': {
276
+ POST: { setDeptPartnerTypeAndNum: false },
277
+ GET: { getAllLabelableDepts: false },
278
+ },
279
+ })
280
+
281
+ declare module '../internal' {
282
+ interface Internal {
283
+ /**
284
+ * 获取用户截屏操作记录
285
+ * @see https://open.dingtalk.com/document/app/obtain-anti-screen-capture-operation-records
286
+ */
287
+ queryUserBehavior(
288
+ params: QueryUserBehaviorParams,
289
+ ): Promise<QueryUserBehaviorResponse>
290
+ /**
291
+ * 获取公共设备列表。
292
+ * @see https://open.dingtalk.com/document/orgapp/query-public-equipment
293
+ */
294
+ getPublicDevices(
295
+ query: GetPublicDevicesQuery,
296
+ ): Promise<GetPublicDevicesResponse>
297
+ /**
298
+ * 通过接口发送电话DING
299
+ * @see https://open.dingtalk.com/document/orgapp/outgoing-phone-ding
300
+ */
301
+ sendPhoneDing(params: SendPhoneDingParams): Promise<SendPhoneDingResponse>
302
+ /**
303
+ * 根据userId查询人员的标签信息
304
+ * @see https://open.dingtalk.com/document/isvapp/you-can-call-this-operation-to-retrieve-the-user-tag
305
+ */
306
+ queryPartnerInfo(userId: string): Promise<QueryPartnerInfoResponse>
307
+ /**
308
+ * 根据会议逻辑ID查询会议基本信息
309
+ * @see https://open.dingtalk.com/document/isvapp/you-can-call-this-operation-to-query-the-basic-information
310
+ */
311
+ getConfBaseInfoByLogicalId(
312
+ query: GetConfBaseInfoByLogicalIdQuery,
313
+ ): Promise<GetConfBaseInfoByLogicalIdResponse>
314
+ /**
315
+ * 批量新增可信设备
316
+ * @see https://open.dingtalk.com/document/isvapp/add-trusted-devices-in-batches
317
+ */
318
+ createTrustedDeviceBatch(
319
+ params: CreateTrustedDeviceBatchParams,
320
+ ): Promise<CreateTrustedDeviceBatchResponse>
321
+ /**
322
+ * 获取企业文件审计日志
323
+ * @see https://open.dingtalk.com/document/app/queries-file-audit-logs
324
+ */
325
+ listAuditLog(query: ListAuditLogQuery): Promise<ListAuditLogResponse>
326
+ /**
327
+ * 群禁言或解禁
328
+ * @see https://open.dingtalk.com/document/isvapp/exclusive-dingtalk-group-ban
329
+ */
330
+ banOrOpenGroupWords(
331
+ params: BanOrOpenGroupWordsParams,
332
+ ): Promise<BanOrOpenGroupWordsResponse>
333
+ /**
334
+ * 获取审计协议签署人员信息
335
+ * @see https://open.dingtalk.com/document/isvapp/obtains-the-information-about-the-persons-who-sign-the-audit
336
+ */
337
+ getSignedDetailByPage(
338
+ query: GetSignedDetailByPageQuery,
339
+ ): Promise<GetSignedDetailByPageResponse>
340
+ /**
341
+ * 发送文件更改的评论
342
+ * @see https://open.dingtalk.com/document/isvapp/send-comments-on-file-changes
343
+ */
344
+ publishFileChangeNotice(
345
+ params: PublishFileChangeNoticeParams,
346
+ ): Promise<void>
347
+ /**
348
+ * 通过接口发送应用内DING
349
+ * @see https://open.dingtalk.com/document/orgapp/send-in-application-ding
350
+ */
351
+ sendAppDing(params: SendAppDingParams): Promise<void>
352
+ /**
353
+ * 伙伴钉根据父标签查询子标签
354
+ * @see https://open.dingtalk.com/document/isvapp/obtain-child-tags-from-a-parent-tag
355
+ */
356
+ getPartnerTypeByParentId(
357
+ parentId: string,
358
+ ): Promise<GetPartnerTypeByParentIdResponse>
359
+ /**
360
+ * 设置部门伙伴类型和伙伴编码
361
+ * @see https://open.dingtalk.com/document/isvapp/set-department-partner-type-and-partner-code
362
+ */
363
+ setDeptPartnerTypeAndNum(
364
+ params: SetDeptPartnerTypeAndNumParams,
365
+ ): Promise<void>
366
+ /**
367
+ * 获取可打标部门列表
368
+ * @see https://open.dingtalk.com/document/isvapp/obtains-a-list-of-departments-that-can-be-marked
369
+ */
370
+ getAllLabelableDepts(): Promise<GetAllLabelableDeptsResponse>
371
+ }
372
+ }