@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.
- package/lib/bot.d.ts +1 -1
- package/lib/http.d.ts +3 -2
- package/lib/index.js +35 -14
- package/lib/index.js.map +2 -3
- package/package.json +8 -4
- package/src/api/.eslintrc.yml +2 -0
- package/src/api/alitrip.ts +467 -0
- package/src/api/attendance.ts +81 -0
- package/src/api/badge.ts +285 -0
- package/src/api/blackboard.ts +28 -0
- package/src/api/calendar.ts +817 -0
- package/src/api/card.ts +215 -0
- package/src/api/conference.ts +561 -0
- package/src/api/connector.ts +97 -0
- package/src/api/contact.ts +56 -0
- package/src/api/convFile.ts +166 -0
- package/src/api/crm.ts +830 -0
- package/src/api/customerService.ts +156 -0
- package/src/api/datacenter.ts +672 -0
- package/src/api/devicemng.ts +202 -0
- package/src/api/diot.ts +19 -0
- package/src/api/doc.ts +232 -0
- package/src/api/drive.ts +109 -0
- package/src/api/edu.ts +30 -0
- package/src/api/esign.ts +44 -0
- package/src/api/exclusive.ts +372 -0
- package/src/api/h3yun.ts +537 -0
- package/src/api/hrm.ts +272 -0
- package/src/api/im.ts +978 -0
- package/src/api/industry.ts +153 -0
- package/src/api/jzcrm.ts +304 -0
- package/src/api/link.ts +94 -0
- package/src/api/live.ts +162 -0
- package/src/api/microApp.ts +309 -0
- package/src/api/oapi.ts +4083 -0
- package/src/api/oauth2.ts +146 -0
- package/src/api/pedia.ts +222 -0
- package/src/api/project.ts +1519 -0
- package/src/api/resident.ts +133 -0
- package/src/api/robot.ts +326 -0
- package/src/api/rooms.ts +334 -0
- package/src/api/serviceGroup.ts +216 -0
- package/src/api/storage.ts +1701 -0
- package/src/api/swform.ts +94 -0
- package/src/api/todo.ts +220 -0
- package/src/api/wiki.ts +231 -0
- package/src/api/workbench.ts +73 -0
- package/src/api/yida.ts +2165 -0
- package/src/bot.ts +129 -0
- package/src/http.ts +44 -0
- package/src/index.ts +9 -0
- package/src/internal.ts +47 -0
- package/src/message.ts +141 -0
- package/src/types/index.ts +140 -0
- package/src/utils.ts +53 -0
- package/src/ws.ts +55 -0
package/src/api/rooms.ts
ADDED
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { Internal } from '../internal'
|
|
2
|
+
// GENERATED CONTENT
|
|
3
|
+
|
|
4
|
+
export interface QueryDevicePropertiesParams {
|
|
5
|
+
/** 设备属性名称列表,最大值10。 */
|
|
6
|
+
propertyNames?: string[]
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface QueryDevicePropertiesQuery {
|
|
10
|
+
/** 操作查询的人员unionId,可调用[查询用户详情](https://open.dingtalk.com/document/orgapp/query-user-details)接口获取。 */
|
|
11
|
+
operatorUnionId: string
|
|
12
|
+
/** 需要查询的设备ID,该参数可从订阅[设备绑定会议室变更](https://open.dingtalk.com/document/orgapp/device-binding-meeting-room-change-event)事件中获取。 */
|
|
13
|
+
deviceId?: string
|
|
14
|
+
/** 需要查询的设备unionId,该参数可从订阅[设备绑定会议室变更](https://open.dingtalk.com/document/orgapp/device-binding-meeting-room-change-event)事件中获取。 */
|
|
15
|
+
deviceUnionId?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface QueryDevicePropertiesResponse {
|
|
19
|
+
result?: {
|
|
20
|
+
propertyName?: string
|
|
21
|
+
propertyValue?: string
|
|
22
|
+
}[]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface QueryMeetingRoomDeviceQuery {
|
|
26
|
+
/** 操作查询的人员unionId,可调用[查询用户详情](https://open.dingtalk.com/document/orgapp/query-user-details)接口获取。 */
|
|
27
|
+
operatorUnionId: string
|
|
28
|
+
/** 需要查询的设备ID,该参数从订阅[设备绑定会议室变更](https://open.dingtalk.com/document/orgapp/device-binding-meeting-room-change-event)事件中获取。 */
|
|
29
|
+
deviceId?: string
|
|
30
|
+
/** 需要查询的设备unionId,该参数从订阅[设备绑定会议室变更](https://open.dingtalk.com/document/orgapp/device-binding-meeting-room-change-event)事件中获取。 */
|
|
31
|
+
deviceUnionId?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface QueryMeetingRoomDeviceResponse {
|
|
35
|
+
result?: {
|
|
36
|
+
deviceId?: string
|
|
37
|
+
deviceUnionId?: string
|
|
38
|
+
openRoomId?: string
|
|
39
|
+
corpId?: string
|
|
40
|
+
deviceName?: string
|
|
41
|
+
shareCode?: string
|
|
42
|
+
deviceSn?: string
|
|
43
|
+
deviceMac?: string
|
|
44
|
+
deviceType?: string
|
|
45
|
+
deviceServiceId?: number
|
|
46
|
+
deviceModel?: string
|
|
47
|
+
deviceStatus?: string
|
|
48
|
+
controllers?: number
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface DeleteMeetingRoomGroupQuery {
|
|
53
|
+
/** 操作人的unionId。 */
|
|
54
|
+
unionId: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface DeleteMeetingRoomGroupResponse {
|
|
58
|
+
result?: unknown
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface UpdateMeetingRoomGroupParams {
|
|
62
|
+
/** 操作人的unionId。 */
|
|
63
|
+
unionId: string
|
|
64
|
+
/** 修改后的分组名称。 */
|
|
65
|
+
groupName?: string
|
|
66
|
+
/** 分组ID。 */
|
|
67
|
+
groupId: number
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface UpdateMeetingRoomGroupResponse {
|
|
71
|
+
result?: unknown
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface QueryMeetingRoomGroupListQuery {
|
|
75
|
+
/** 操作人的unionId。 */
|
|
76
|
+
unionId: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface QueryMeetingRoomGroupListResponse {
|
|
80
|
+
result?: {
|
|
81
|
+
groupId?: number
|
|
82
|
+
groupName?: string
|
|
83
|
+
parentId?: number
|
|
84
|
+
}[]
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface QueryMeetingRoomGroupQuery {
|
|
88
|
+
/** 操作人的unionId。 */
|
|
89
|
+
unionId: string
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface QueryMeetingRoomGroupResponse {
|
|
93
|
+
groupId?: number
|
|
94
|
+
groupName?: string
|
|
95
|
+
parentId?: number
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface CreateMeetingRoomGroupParams {
|
|
99
|
+
/** 操作人的unionId。 */
|
|
100
|
+
unionId: string
|
|
101
|
+
/** 分组名称。 */
|
|
102
|
+
groupName?: string
|
|
103
|
+
/** 父分组ID,传0表示根分组。 */
|
|
104
|
+
parentGroupId: number
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface CreateMeetingRoomGroupResponse {
|
|
108
|
+
result?: number
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface DeleteMeetingRoomQuery {
|
|
112
|
+
/** 操作人的unionId。 */
|
|
113
|
+
unionId: string
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface DeleteMeetingRoomResponse {
|
|
117
|
+
result?: unknown
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface QueryMeetingRoomListQuery {
|
|
121
|
+
/** 分页游标。 */
|
|
122
|
+
nextToken?: number
|
|
123
|
+
/** 请求分页大小,默认值20,目前未限制最大值。 */
|
|
124
|
+
maxResults?: number
|
|
125
|
+
/** 操作人的unionId。 */
|
|
126
|
+
unionId: string
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface QueryMeetingRoomListResponse {
|
|
130
|
+
hasMore?: unknown
|
|
131
|
+
nextToken?: number
|
|
132
|
+
result?: {
|
|
133
|
+
roomId?: string
|
|
134
|
+
roomStaffId?: string
|
|
135
|
+
corpId?: string
|
|
136
|
+
roomName?: string
|
|
137
|
+
roomStatus?: number
|
|
138
|
+
roomLabels?: number
|
|
139
|
+
roomCapacity?: number
|
|
140
|
+
roomLocation?: number
|
|
141
|
+
roomPicture?: string
|
|
142
|
+
isvRoomId?: string
|
|
143
|
+
roomGroup?: number
|
|
144
|
+
}[]
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface UpdateMeetingRoomParams {
|
|
148
|
+
/** 操作人的unionId。 */
|
|
149
|
+
unionId: string
|
|
150
|
+
/** 会议室ID。 */
|
|
151
|
+
roomId: string
|
|
152
|
+
/** 会议室名称。 */
|
|
153
|
+
roomName?: string
|
|
154
|
+
/** 会议室可容纳人数。 */
|
|
155
|
+
roomCapacity?: number
|
|
156
|
+
/** 会议室图片。 */
|
|
157
|
+
roomPicture?: string
|
|
158
|
+
/** 会议室状态。 */
|
|
159
|
+
roomStatus?: number
|
|
160
|
+
/** 会议室位置信息。 */
|
|
161
|
+
roomLocation?: unknown
|
|
162
|
+
/** 标签ID。 */
|
|
163
|
+
roomLabelIds?: number[]
|
|
164
|
+
/** 调用方外部会议室ID,调用方可传入自有系统内的会议室ID。 */
|
|
165
|
+
isvRoomId?: string
|
|
166
|
+
/** 会议室所属分组ID。 */
|
|
167
|
+
groupId?: number
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface UpdateMeetingRoomResponse {
|
|
171
|
+
result?: unknown
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface QueryMeetingRoomQuery {
|
|
175
|
+
/** 操作人的unionId。 */
|
|
176
|
+
unionId: string
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface QueryMeetingRoomResponse {
|
|
180
|
+
result?: {
|
|
181
|
+
roomId?: string
|
|
182
|
+
roomStaffId?: string
|
|
183
|
+
corpId?: string
|
|
184
|
+
roomName?: string
|
|
185
|
+
roomStatus?: number
|
|
186
|
+
roomLabels?: number
|
|
187
|
+
roomCapacity?: number
|
|
188
|
+
roomLocation?: number
|
|
189
|
+
roomPicture?: string
|
|
190
|
+
isvRoomId?: string
|
|
191
|
+
roomGroup?: number
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export interface CreateMeetingRoomParams {
|
|
196
|
+
/** 操作人的unionId。 */
|
|
197
|
+
unionId: string
|
|
198
|
+
/** 会议室名称。 */
|
|
199
|
+
roomName: string
|
|
200
|
+
/** 会议室可容纳人数,目前无最大值限制。 */
|
|
201
|
+
roomCapacity?: number
|
|
202
|
+
/** 会议室图片。 */
|
|
203
|
+
roomPicture?: string
|
|
204
|
+
/** 会议室状态。 */
|
|
205
|
+
roomStatus: number
|
|
206
|
+
/** 会议室位置信息。 */
|
|
207
|
+
roomLocation?: unknown
|
|
208
|
+
/** 标签ID。 */
|
|
209
|
+
roomLabelIds?: number[]
|
|
210
|
+
/** 调用方外部会议室ID,调用方可传入自有系统内的会议室ID。 */
|
|
211
|
+
isvRoomId: string
|
|
212
|
+
/** 分组ID。 */
|
|
213
|
+
groupId?: number
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface CreateMeetingRoomResponse {
|
|
217
|
+
result?: string
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// funcName: isOldApi
|
|
221
|
+
Internal.define({
|
|
222
|
+
'/rooms/devices/properties/query': { POST: { queryDeviceProperties: false } },
|
|
223
|
+
'/rooms/devices': { GET: { queryMeetingRoomDevice: false } },
|
|
224
|
+
'/rooms/groups/{groupId}': {
|
|
225
|
+
DELETE: { deleteMeetingRoomGroup: false },
|
|
226
|
+
GET: { queryMeetingRoomGroup: false },
|
|
227
|
+
},
|
|
228
|
+
'/rooms/groups': {
|
|
229
|
+
PUT: { updateMeetingRoomGroup: false },
|
|
230
|
+
POST: { createMeetingRoomGroup: false },
|
|
231
|
+
},
|
|
232
|
+
'/rooms/groupLists': { GET: { queryMeetingRoomGroupList: false } },
|
|
233
|
+
'/rooms/meetingRooms/{roomId}': {
|
|
234
|
+
DELETE: { deleteMeetingRoom: false },
|
|
235
|
+
GET: { queryMeetingRoom: false },
|
|
236
|
+
},
|
|
237
|
+
'/rooms/meetingRoomLists': { GET: { queryMeetingRoomList: false } },
|
|
238
|
+
'/rooms/meetingRooms': { PUT: { updateMeetingRoom: false } },
|
|
239
|
+
'/rooms/meetingrooms': { POST: { createMeetingRoom: false } },
|
|
240
|
+
})
|
|
241
|
+
|
|
242
|
+
declare module '../internal' {
|
|
243
|
+
interface Internal {
|
|
244
|
+
/**
|
|
245
|
+
* 查询设备属性
|
|
246
|
+
* @see https://open.dingtalk.com/document/app/querying-video-conference-device-attribute-information
|
|
247
|
+
*/
|
|
248
|
+
queryDeviceProperties(
|
|
249
|
+
query: QueryDevicePropertiesQuery,
|
|
250
|
+
params: QueryDevicePropertiesParams,
|
|
251
|
+
): Promise<QueryDevicePropertiesResponse>
|
|
252
|
+
/**
|
|
253
|
+
* 查询设备信息
|
|
254
|
+
* @see https://open.dingtalk.com/document/app/querying-video-conference-device-information
|
|
255
|
+
*/
|
|
256
|
+
queryMeetingRoomDevice(
|
|
257
|
+
query: QueryMeetingRoomDeviceQuery,
|
|
258
|
+
): Promise<QueryMeetingRoomDeviceResponse>
|
|
259
|
+
/**
|
|
260
|
+
* 删除会议室分组
|
|
261
|
+
* @see https://open.dingtalk.com/document/isvapp/delete-a-conference-room-group
|
|
262
|
+
*/
|
|
263
|
+
deleteMeetingRoomGroup(
|
|
264
|
+
groupId: number,
|
|
265
|
+
query: DeleteMeetingRoomGroupQuery,
|
|
266
|
+
): Promise<DeleteMeetingRoomGroupResponse>
|
|
267
|
+
/**
|
|
268
|
+
* 更新会议室分组信息
|
|
269
|
+
* @see https://open.dingtalk.com/document/isvapp/update-meeting-room-group-information
|
|
270
|
+
*/
|
|
271
|
+
updateMeetingRoomGroup(
|
|
272
|
+
params: UpdateMeetingRoomGroupParams,
|
|
273
|
+
): Promise<UpdateMeetingRoomGroupResponse>
|
|
274
|
+
/**
|
|
275
|
+
* 查询会议室分组列表
|
|
276
|
+
* @see https://open.dingtalk.com/document/isvapp/query-meeting-room-groups
|
|
277
|
+
*/
|
|
278
|
+
queryMeetingRoomGroupList(
|
|
279
|
+
query: QueryMeetingRoomGroupListQuery,
|
|
280
|
+
): Promise<QueryMeetingRoomGroupListResponse>
|
|
281
|
+
/**
|
|
282
|
+
* 查询会议室分组信息
|
|
283
|
+
* @see https://open.dingtalk.com/document/isvapp/query-meeting-room-group-information
|
|
284
|
+
*/
|
|
285
|
+
queryMeetingRoomGroup(
|
|
286
|
+
groupId: number,
|
|
287
|
+
query: QueryMeetingRoomGroupQuery,
|
|
288
|
+
): Promise<QueryMeetingRoomGroupResponse>
|
|
289
|
+
/**
|
|
290
|
+
* 创建会议室分组
|
|
291
|
+
* @see https://open.dingtalk.com/document/isvapp/create-a-meeting-room-group
|
|
292
|
+
*/
|
|
293
|
+
createMeetingRoomGroup(
|
|
294
|
+
params: CreateMeetingRoomGroupParams,
|
|
295
|
+
): Promise<CreateMeetingRoomGroupResponse>
|
|
296
|
+
/**
|
|
297
|
+
* 删除会议室
|
|
298
|
+
* @see https://open.dingtalk.com/document/isvapp/delete-a-meeting-room
|
|
299
|
+
*/
|
|
300
|
+
deleteMeetingRoom(
|
|
301
|
+
roomId: string,
|
|
302
|
+
query: DeleteMeetingRoomQuery,
|
|
303
|
+
): Promise<DeleteMeetingRoomResponse>
|
|
304
|
+
/**
|
|
305
|
+
* 查询会议室列表
|
|
306
|
+
* @see https://open.dingtalk.com/document/isvapp/check-the-meeting-room-list
|
|
307
|
+
*/
|
|
308
|
+
queryMeetingRoomList(
|
|
309
|
+
query: QueryMeetingRoomListQuery,
|
|
310
|
+
): Promise<QueryMeetingRoomListResponse>
|
|
311
|
+
/**
|
|
312
|
+
* 更新会议室信息
|
|
313
|
+
* @see https://open.dingtalk.com/document/isvapp/update-meeting-room-information
|
|
314
|
+
*/
|
|
315
|
+
updateMeetingRoom(
|
|
316
|
+
params: UpdateMeetingRoomParams,
|
|
317
|
+
): Promise<UpdateMeetingRoomResponse>
|
|
318
|
+
/**
|
|
319
|
+
* 查询会议室详情
|
|
320
|
+
* @see https://open.dingtalk.com/document/isvapp/check-meeting-room-details
|
|
321
|
+
*/
|
|
322
|
+
queryMeetingRoom(
|
|
323
|
+
roomId: string,
|
|
324
|
+
query: QueryMeetingRoomQuery,
|
|
325
|
+
): Promise<QueryMeetingRoomResponse>
|
|
326
|
+
/**
|
|
327
|
+
* 创建智能会议室
|
|
328
|
+
* @see https://open.dingtalk.com/document/isvapp/create-a-meeting-room
|
|
329
|
+
*/
|
|
330
|
+
createMeetingRoom(
|
|
331
|
+
params: CreateMeetingRoomParams,
|
|
332
|
+
): Promise<CreateMeetingRoomResponse>
|
|
333
|
+
}
|
|
334
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { Internal } from '../internal'
|
|
2
|
+
// GENERATED CONTENT
|
|
3
|
+
|
|
4
|
+
export interface AddMemberToServiceGroupParams {
|
|
5
|
+
/** 开放团队ID。如下图所示,查看**ID信息**内的**团队ID**值。 */
|
|
6
|
+
openTeamId: string
|
|
7
|
+
/** 服务群openConversionId,调用[创建场景服务群](https://open.dingtalk.com/document/orgapp-server/create-a-scenario-service-group)接口获取openConversationId参数值。 */
|
|
8
|
+
openConversationId: string
|
|
9
|
+
/** 待添加员工在钉钉组织内的的userId列表,最大值100。 */
|
|
10
|
+
userIds: string[]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface AddMemberToServiceGroupResponse {
|
|
14
|
+
success?: unknown
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface SendMsgByTaskParams {
|
|
18
|
+
/** 团队ID。 */
|
|
19
|
+
openTeamId: string
|
|
20
|
+
/** 群发任务名称。 */
|
|
21
|
+
taskName: string
|
|
22
|
+
/** 群发内容。 */
|
|
23
|
+
messageContent: unknown
|
|
24
|
+
/** 查询条件。 */
|
|
25
|
+
queryGroup: unknown
|
|
26
|
+
/** 发送配置。 */
|
|
27
|
+
sendConfig: unknown
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface SendMsgByTaskResponse {
|
|
31
|
+
openBatchTaskId?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface UpgradeNormalGroupParams {
|
|
35
|
+
/** 升级的目标群组ID。 */
|
|
36
|
+
openGroupSetId?: string
|
|
37
|
+
/** 升级的目标群模板ID。 */
|
|
38
|
+
templateId?: string
|
|
39
|
+
/** 群ID。 */
|
|
40
|
+
openConversationId: string
|
|
41
|
+
/** 升级的目标团队ID。 */
|
|
42
|
+
openTeamId?: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface UpgradeCloudGroupParams {
|
|
46
|
+
/** 群ID。 */
|
|
47
|
+
openConversationId: string
|
|
48
|
+
/** 升级的目标群模板ID。 */
|
|
49
|
+
templateId?: string
|
|
50
|
+
/** 升级的目标群组ID。 */
|
|
51
|
+
openGroupSetId?: string
|
|
52
|
+
/** 智能云客服租户ID。 */
|
|
53
|
+
ccsInstanceId: string
|
|
54
|
+
/** 升级的目标团队ID。 */
|
|
55
|
+
openTeamId?: string
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface QueryActiveUsersQuery {
|
|
59
|
+
/** 开放团队ID。 */
|
|
60
|
+
openTeamId?: string
|
|
61
|
+
/** 群ID。 */
|
|
62
|
+
openConversationId: string
|
|
63
|
+
/** 活跃度排名topN,如top5,最多支持top100 */
|
|
64
|
+
topN?: number
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface QueryActiveUsersResponse {
|
|
68
|
+
activeUserInfos: {
|
|
69
|
+
unionId: string
|
|
70
|
+
nickName: string
|
|
71
|
+
actionIndexL7d: number
|
|
72
|
+
actionIndexL14d: number
|
|
73
|
+
actionIndexL30d: number
|
|
74
|
+
activeScore: number
|
|
75
|
+
ranking: number
|
|
76
|
+
}[]
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface SendServiceGroupMessageParams {
|
|
80
|
+
/** 开放群ID。 */
|
|
81
|
+
targetOpenConversationId: string
|
|
82
|
+
/** 标题。 */
|
|
83
|
+
title: string
|
|
84
|
+
/** 消息内容。 */
|
|
85
|
+
content: string
|
|
86
|
+
/** 是否 at所有人 */
|
|
87
|
+
isAtAll?: unknown
|
|
88
|
+
/** 被@人的手机号列表。 */
|
|
89
|
+
atMobiles?: string[]
|
|
90
|
+
/** 被@人的dingtalkId列表。 */
|
|
91
|
+
atDingtalkIds?: string[]
|
|
92
|
+
/** 被@人的unionId列表。 */
|
|
93
|
+
atUnionIds?: string[]
|
|
94
|
+
/** 手机号接收者列表。 */
|
|
95
|
+
receiverMobiles?: string[]
|
|
96
|
+
/** dingtalkId接收者列表。 */
|
|
97
|
+
receiverDingtalkIds?: string[]
|
|
98
|
+
/** unionId接收者列表。 */
|
|
99
|
+
receiverUnionIds?: string[]
|
|
100
|
+
/** 消息类型,取值。 */
|
|
101
|
+
messageType: string
|
|
102
|
+
/** 排列方式。 */
|
|
103
|
+
btnOrientation?: string
|
|
104
|
+
/** actionCard按钮。 */
|
|
105
|
+
btns?: object[]
|
|
106
|
+
/** 消息内容是否含有链接。 */
|
|
107
|
+
hasContentLinks?: unknown
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface SendServiceGroupMessageResponse {
|
|
111
|
+
openMsgTaskId: string
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface ServiceGroupCreateGroupParams {
|
|
115
|
+
/** 业务关联ID,自定义参数值。 */
|
|
116
|
+
groupBizId?: string
|
|
117
|
+
/** 开放团队ID。 */
|
|
118
|
+
openTeamId: string
|
|
119
|
+
/** 开放群组ID。 */
|
|
120
|
+
openGroupSetId: string
|
|
121
|
+
/** 群名称。 */
|
|
122
|
+
groupName: string
|
|
123
|
+
/** 群主员工userid。 */
|
|
124
|
+
ownerStaffId: string
|
|
125
|
+
/** 群成员员工ID列表,最大值20。 */
|
|
126
|
+
memberStaffIds?: string[]
|
|
127
|
+
/** 群标签。 */
|
|
128
|
+
groupTagNames?: string[]
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface ServiceGroupCreateGroupResponse {
|
|
132
|
+
openConversationId: string
|
|
133
|
+
groupUrl: string
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface ServiceGroupUpdateGroupSetParams {
|
|
137
|
+
/** 开放团队ID。 */
|
|
138
|
+
openTeamId?: string
|
|
139
|
+
/** 开放群ID,可调用[创建服务群](https://open.dingtalk.com/document/orgapp-server/create-a-scenario-service-group)接口获取openConversationId参数值。 */
|
|
140
|
+
openConversationId?: string
|
|
141
|
+
/** 开放群组ID。 */
|
|
142
|
+
openGroupSetId?: string
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface ServiceGroupUpdateGroupSetResponse {
|
|
146
|
+
success?: unknown
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// funcName: isOldApi
|
|
150
|
+
Internal.define({
|
|
151
|
+
'/serviceGroup/groups/members': { POST: { addMemberToServiceGroup: false } },
|
|
152
|
+
'/serviceGroup/messages/tasks/send': { POST: { sendMsgByTask: false } },
|
|
153
|
+
'/serviceGroup/normalGroups/upgrade': { POST: { upgradeNormalGroup: false } },
|
|
154
|
+
'/serviceGroup/cloudGroups/upgrade': { POST: { upgradeCloudGroup: false } },
|
|
155
|
+
'/serviceGroup/groups/queryActiveUsers': { GET: { queryActiveUsers: false } },
|
|
156
|
+
'/serviceGroup/messages/send': { POST: { sendServiceGroupMessage: false } },
|
|
157
|
+
'/serviceGroup/groups': { POST: { serviceGroupCreateGroup: false } },
|
|
158
|
+
'/serviceGroup/groups/configurations': {
|
|
159
|
+
PUT: { serviceGroupUpdateGroupSet: false },
|
|
160
|
+
},
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
declare module '../internal' {
|
|
164
|
+
interface Internal {
|
|
165
|
+
/**
|
|
166
|
+
* 添加服务群成员
|
|
167
|
+
* @see https://open.dingtalk.com/document/orgapp/add-service-group-members
|
|
168
|
+
*/
|
|
169
|
+
addMemberToServiceGroup(
|
|
170
|
+
params: AddMemberToServiceGroupParams,
|
|
171
|
+
): Promise<AddMemberToServiceGroupResponse>
|
|
172
|
+
/**
|
|
173
|
+
* 服务群发任务
|
|
174
|
+
* @see https://open.dingtalk.com/document/orgapp/service-group-sending-task-interface
|
|
175
|
+
*/
|
|
176
|
+
sendMsgByTask(params: SendMsgByTaskParams): Promise<SendMsgByTaskResponse>
|
|
177
|
+
/**
|
|
178
|
+
* 升级普通群为服务群
|
|
179
|
+
* @see https://open.dingtalk.com/document/orgapp/a-dingtalk-group-is-upgraded-to-one-of-the-intelligent
|
|
180
|
+
*/
|
|
181
|
+
upgradeNormalGroup(params: UpgradeNormalGroupParams): Promise<void>
|
|
182
|
+
/**
|
|
183
|
+
* 升级云客服服务群为钉钉智能服务群
|
|
184
|
+
* @see https://open.dingtalk.com/document/orgapp/upgraded-the-cloud-customer-service-group-to-the-dingtalk-intelligent
|
|
185
|
+
*/
|
|
186
|
+
upgradeCloudGroup(params: UpgradeCloudGroupParams): Promise<void>
|
|
187
|
+
/**
|
|
188
|
+
* 查询服务群活跃成员
|
|
189
|
+
* @see https://open.dingtalk.com/document/orgapp/queries-active-service-users
|
|
190
|
+
*/
|
|
191
|
+
queryActiveUsers(
|
|
192
|
+
query: QueryActiveUsersQuery,
|
|
193
|
+
): Promise<QueryActiveUsersResponse>
|
|
194
|
+
/**
|
|
195
|
+
* 服务群发消息
|
|
196
|
+
* @see https://open.dingtalk.com/document/orgapp/service-group-message-sending-interface
|
|
197
|
+
*/
|
|
198
|
+
sendServiceGroupMessage(
|
|
199
|
+
params: SendServiceGroupMessageParams,
|
|
200
|
+
): Promise<SendServiceGroupMessageResponse>
|
|
201
|
+
/**
|
|
202
|
+
* 创建服务群
|
|
203
|
+
* @see https://open.dingtalk.com/document/orgapp/create-a-scenario-service-group
|
|
204
|
+
*/
|
|
205
|
+
serviceGroupCreateGroup(
|
|
206
|
+
params: ServiceGroupCreateGroupParams,
|
|
207
|
+
): Promise<ServiceGroupCreateGroupResponse>
|
|
208
|
+
/**
|
|
209
|
+
* 更换服务群所在的群分组
|
|
210
|
+
* @see https://open.dingtalk.com/document/isvapp/modify-a-service-group
|
|
211
|
+
*/
|
|
212
|
+
serviceGroupUpdateGroupSet(
|
|
213
|
+
params: ServiceGroupUpdateGroupSetParams,
|
|
214
|
+
): Promise<ServiceGroupUpdateGroupSetResponse>
|
|
215
|
+
}
|
|
216
|
+
}
|