vanshi-sdk 1.0.7 → 1.2.26

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/dist/index.d.ts CHANGED
@@ -1,188 +1,67 @@
1
- /**
2
- * 接口 [查询群消息已读成员列表。↗](https://yapi.whatimcloud.com/project/123/interface/api/9403) 的 **返回类型**
3
- *
4
- * @分类 [会话消息↗](https://yapi.whatimcloud.com/project/123/interface/api/cat_766)
5
- * @请求头 `POST /sdk/queryGroupMessageReceiptReadMemberList`
6
- * @更新时间 `2026-04-27 17:08:54`
7
- */
8
- interface YapiPostSdkQueryGroupMessageReceiptReadMemberListApiResponse {
9
- code: string;
10
- message: string;
11
- data: YapiPostSdkQueryGroupMessageReceiptReadMemberData;
12
- }
13
- interface YapiPostSdkQueryGroupMessageReceiptReadMemberData {
14
- nextFlag: string;
15
- userList: YapiPostSdkQueryGroupMessageReceiptReadMemberListUserListData[];
16
- groupID: string;
17
- }
18
- interface YapiPostSdkQueryGroupMessageReceiptReadMemberListUserListData {
19
- /**
20
- * 群组成员昵称。
21
- */
22
- memberNickname: string;
23
- /**
24
- * 群角色,1:群主,2:管理员,3:群成员。
25
- */
26
- memberRole: string;
27
- /**
28
- * 群成员头像 URL。
29
- */
30
- memberAvatarUrl: string;
31
- userID: string;
32
- userName: string;
33
- /**
34
- * 用户头像
35
- */
36
- userAvatarUrl: string;
37
- /**
38
- * 群成员禁言过期时间。为 0 时即不禁言,为 -1 时即永久禁言。
39
- */
40
- muteExpiredTime: string;
41
- }
42
-
43
- /**
44
- * 接口 [查询群消息未读成员列表。↗](https://yapi.whatimcloud.com/project/123/interface/api/9396) 的 **返回类型**
45
- *
46
- * @分类 [会话消息↗](https://yapi.whatimcloud.com/project/123/interface/api/cat_766)
47
- * @请求头 `POST /sdk/queryGroupMessageReceiptUnreadMemberList`
48
- * @更新时间 `2026-04-29 15:01:12`
49
- */
50
- interface YapiPostSdkQueryGroupMessageReceiptUnreadMemberListApiResponse {
51
- code: string;
52
- message: string;
53
- data: YapiPostSdkQueryGroupMessageReceiptUnreadMemberData;
54
- }
55
- interface YapiPostSdkQueryGroupMessageReceiptUnreadMemberData {
56
- nextFlag: string;
57
- userList: YapiPostSdkQueryGroupMessageReceiptUnreadMemberListUserListData[];
58
- groupID: string;
59
- }
60
- interface YapiPostSdkQueryGroupMessageReceiptUnreadMemberListUserListData {
61
- /**
62
- * 群组成员昵称。
63
- */
64
- memberNickname: string;
65
- /**
66
- * 群角色,1:群主,2:管理员,3:群成员。
67
- */
68
- memberRole: string;
69
- /**
70
- * 群成员头像 URL。
71
- */
72
- memberAvatarUrl: string;
73
- userID: string;
74
- userName: string;
75
- /**
76
- * 用户头像
77
- */
78
- userAvatarUrl: string;
79
- /**
80
- * 群成员禁言过期时间。为 0 时即不禁言,为 -1 时即永久禁言。
81
- */
82
- muteExpiredTime: string;
83
- }
84
-
85
- /**
86
- * 接口 [查询一批消息的回执信息↗](https://yapi.whatimcloud.com/project/123/interface/api/9389) 的 **返回类型**
87
- *
88
- * @分类 [会话消息↗](https://yapi.whatimcloud.com/project/123/interface/api/cat_766)
89
- * @请求头 `POST /sdk/queryMessageReceiptsInfo`
90
- * @更新时间 `2026-04-27 16:39:08`
91
- */
92
- interface YapiPostSdkQueryMessageReceiptsInfoApiResponse {
93
- code: string;
94
- message: string;
95
- data: YapiPostSdkQueryMessageReceiptsInfoListData[];
96
- }
97
- interface YapiPostSdkQueryMessageReceiptsInfoListData {
98
- /**
99
- * 回执的状态。
100
- */
101
- status: string;
102
- /**
103
- * 消息 ID。
104
- */
105
- messageID: string;
106
- /**
107
- * 会话 ID。
108
- */
109
- conversationID: string;
110
- /**
111
- * 会话类型。
112
- */
113
- conversationType: string;
114
- /**
115
- * 表示该回执的已读人数。
116
- */
117
- readMemberCount: string;
118
- /**
119
- * 表示该回执的未读人数
120
- */
121
- unreadMemberCount: string;
122
- /**
123
- * 消息回执已读时的服务端时间戳。
124
- */
125
- readTime: string;
126
- }
127
-
128
- /**
129
- * 接口 [设置一批消息的回执变成已读↗](https://yapi.whatimcloud.com/project/123/interface/api/9382) 的 **返回类型**
130
- *
131
- * @分类 [会话消息↗](https://yapi.whatimcloud.com/project/123/interface/api/cat_766)
132
- * @请求头 `POST /sdk/sendMessageReceiptsRead`
133
- * @更新时间 `2026-04-27 14:10:58`
134
- */
135
- interface YapiPostSdkSendMessageReceiptsReadApiResponse {
136
- code: string;
137
- message: string;
138
- data: string;
139
- }
140
-
141
- interface IYapiPostSdkClearConversationTotalUnreadMessageCountApiResponse {
142
- code: string
143
- message: string
144
- data: string
145
- }
146
-
147
- interface IYapiPostSdkClearConversationUnreadMessageCountApiResponse {
148
- code: string
149
- message: string
150
- data: IYapiPostSdkClearConversationUnreadMessageCountData
151
- }
152
- interface IYapiPostSdkClearConversationUnreadMessageCountData {
153
- conversationID: string
154
- conversationType: string
155
- }
1
+ import * as livekit_client from 'livekit-client';
2
+ import { Room, LocalTrack, RemoteTrack, RemoteTrackPublication, TrackPublication, RoomConnectOptions } from 'livekit-client';
156
3
 
157
- interface IYapiPostSdkDeleteConversationApiRequest {
158
-
159
- conversationID: string
160
-
4
+ interface IYapiPostSdkSendMessageApiRequest {
5
+ message: IYapiPostSdkSendMessageApiRequestMessage
6
+ /**
7
+ * 消息需要发送的会话 ID。
8
+ */
9
+ toConversationID: string
10
+ /**
11
+ * 类型。Peer=(0) 单聊会话。Room=(1) 房间会话。Group=(2) 群聊会话。Unknown=(3) 未知。
12
+ */
161
13
  conversationType: number
162
-
163
- config: boolean
164
14
  }
165
15
 
166
-
167
- interface IYapiPostSdkDeleteConversationApiResponse {
168
- code: string
169
- message: string
170
- data: IYapiPostSdkDeleteConversationListData[]
16
+ interface IYapiPostSdkSendMessageApiRequestMessage {
17
+ /**
18
+ * 消息内容
19
+ */
20
+ message: string
21
+ /**
22
+ * 消息类型:
23
+ * 1:普通文本消息
24
+ * 2:自定义二进制消息,可用于传递自定义的二进制消息。该消息类型不支持离线消息和本地存储。
25
+ * 0:未知类型
26
+ * 20:弹幕消息,可用于直播间发送的弹幕
27
+ * 11:图片消息,可用于发送图片消息,仅支持 .jpg, .jpeg, .png, .bmp, .gif, .tiff 图片类型
28
+ * 12:文件消息
29
+ * 13:音频消息
30
+ * 14:视频消息
31
+ * 30:系统消息
32
+ * 31:系统消息
33
+ * 100:合并消息
34
+ * 200:自定义消息
35
+ * 32:Tips 消息
36
+ * 10:组合消息,可用于发送文本、富媒体文件、自定义消息的组合消息。
37
+ *
38
+ */
39
+ type: string
40
+ /**
41
+ * 自定义的拓展字段
42
+ */
43
+ extendedData: string
44
+ /**
45
+ * 客户端业务预发 ID。未传时 SDK 会自动生成。
46
+ */
47
+ clientBizId?: string
171
48
  }
172
- interface IYapiPostSdkDeleteConversationListData {
173
-
174
- conversationID: string
175
-
176
- conversationType: string
177
- }
178
-
179
- interface IYapiPostSdkSendMediaMessageApiResponse {
180
- code: string
181
- message: string
182
- data: YapiPostSdkSendMediaMessageData
49
+ declare enum SEDMessageType$1 {
50
+ Unknown = '0',
51
+ Command = '2',
52
+ Barrage = '20',
53
+ Text = '1',
54
+ Image = '11',
55
+ File = '12',
56
+ Audio = '13',
57
+ Video = '14',
58
+ System = '30',
59
+ Revoke = '31',
60
+ Tips = '32',
61
+ Combine = '100',
62
+ Custom = '200'
183
63
  }
184
-
185
- interface YapiPostSdkSendMediaMessageData {
64
+ interface YapiPostSdkSendMessageMessage {
186
65
  /**
187
66
  * 消息
188
67
  */
@@ -205,7 +84,7 @@ interface YapiPostSdkSendMediaMessageData {
205
84
  * 10:组合消息,可用于发送文本、富媒体文件、自定义消息的组合消息。
206
85
  *
207
86
  */
208
- type: string
87
+ type: SEDMessageType$1
209
88
  /**
210
89
  * 消息拓展
211
90
  */
@@ -270,13 +149,115 @@ interface YapiPostSdkSendMediaMessageData {
270
149
  * id
271
150
  */
272
151
  id: string
152
+ }
153
+
154
+ interface IYapiPostSdkSendMessageApiResponse {
155
+ code: string
156
+ message: string
157
+ data: YapiPostSdkSendMessageMessage
158
+ }
159
+
160
+ interface IYapiPostSdkSendMediaMessageApiResponse {
161
+ code: string
162
+ message: string
163
+ data: YapiPostSdkSendMediaMessageData
164
+ }
165
+
166
+ interface YapiPostSdkSendMediaMessageData {
273
167
  /**
274
- * 文件下载地址
168
+ * 消息
275
169
  */
276
- fileDownloadUrl: string
170
+ massage: string
277
171
  /**
278
- * 如果是视频/语音,时长
279
- */
172
+ * 消息类型:
173
+ * 1:普通文本消息
174
+ * 2:自定义二进制消息,可用于传递自定义的二进制消息。该消息类型不支持离线消息和本地存储。
175
+ * 0:未知类型
176
+ * 20:弹幕消息,可用于直播间发送的弹幕
177
+ * 11:图片消息,可用于发送图片消息,仅支持 .jpg, .jpeg, .png, .bmp, .gif, .tiff 图片类型
178
+ * 12:文件消息
179
+ * 13:音频消息
180
+ * 14:视频消息
181
+ * 30:系统消息
182
+ * 31:系统消息
183
+ * 100:合并消息
184
+ * 200:自定义消息
185
+ * 32:Tips 消息
186
+ * 10:组合消息,可用于发送文本、富媒体文件、自定义消息的组合消息。
187
+ *
188
+ */
189
+ type: string
190
+ /**
191
+ * 消息拓展
192
+ */
193
+ extendedData: string
194
+ /**
195
+ * 消息 id
196
+ */
197
+ messageID: string
198
+ /**
199
+ * 排序 key
200
+ */
201
+ orderKey: string
202
+ /**
203
+ * 客户端 id
204
+ */
205
+ clientSid: string
206
+ /**
207
+ * 消息表 id
208
+ */
209
+ localMessageID: string
210
+ /**
211
+ * 预发 id
212
+ */
213
+ clientBizId: string
214
+ /**
215
+ * 会话 id
216
+ */
217
+ conversationID: string
218
+ /**
219
+ * 会话类型
220
+ */
221
+ conversationType: number
222
+ /**
223
+ * 发送者 id
224
+ */
225
+ senderUserID: string
226
+ /**
227
+ * 0 发送 1 接收
228
+ */
229
+ direction: number
230
+ /**
231
+ * 消息发送时间戳
232
+ */
233
+ timestamp: string
234
+ /**
235
+ * 0 不是回执。1 回执进行中。2 回执已完成。3 回执已过期。4 回执已失败。
236
+ */
237
+ receiptStatus: number
238
+ /**
239
+ * 是否服务端发送消息
240
+ */
241
+ isServerMessage: boolean
242
+ /**
243
+ * 是否是全员推送消息
244
+ */
245
+ isBroadcastMessage: boolean
246
+ /**
247
+ * 标识该消息是否为群定向消息
248
+ */
249
+ isGroupTargetedMessage: string
250
+ /**
251
+ * id
252
+ */
253
+ id: string
254
+ /**
255
+ * 文件下载地址
256
+ */
257
+ fileDownloadUrl: string
258
+ /**
259
+ * 如果是视频/语音,时长
260
+ */
280
261
  duration: string
281
262
  /**
282
263
  * 文件名字
@@ -296,138 +277,179 @@ interface YapiPostSdkSendMediaMessageData {
296
277
  thumbnailHeight: string
297
278
  }
298
279
 
299
- interface IConversation {
300
- conversationID?: string;
301
- conversationName?: string;
302
- type?: number;
303
- unreadMessageCount?: number;
304
- notificationStatus?: number;
305
- isPinned?: boolean;
280
+ interface IYapiPostSdkQueryHistoryMessageApiRequest {
281
+
282
+ conversationID: string
283
+
284
+ conversationType: string
285
+ config: IYapiPostSdkQueryHistoryMessageApiRequestConfig
286
+ }
287
+ interface IYapiPostSdkQueryHistoryMessageApiRequestConfig {
288
+ nextMessage?: IYapiPostSdkQueryHistoryMessageApiRequestNextMessageConfig
289
+
290
+ count: string
291
+
292
+ reverse?: boolean
293
+ }
294
+
295
+ interface IYapiPostSdkQueryHistoryMessageApiRequestNextMessageConfig {
296
+
297
+ type: string
298
+
299
+ messageID: string
300
+ id: string
301
+ }
302
+
303
+
304
+ interface IYapiPostSdkQueryHistoryMessageApiResponse {
305
+ code: string
306
+ message: string
307
+ data: IYapiPostSdkQueryHistoryMessageData
308
+ }
309
+ interface IYapiPostSdkQueryHistoryMessageData {
310
+ messageList: YapiPostSdkQueryHistoryMessageListMessageListData[]
311
+
312
+ conversationID: string
313
+
314
+ conversationType: string
315
+ }
316
+ interface YapiPostSdkQueryHistoryMessageListMessageListData {
317
+ /**
318
+ * 消息类型。
319
+ */
320
+ type: string
321
+ /**
322
+ * 消息的唯一 ID
323
+ */
324
+ messageID: string
325
+ /**
326
+ * 消息的发送时间。
327
+ */
328
+ timestamp: number
329
+ /**
330
+ * 消息发送者的 userID。
331
+ */
332
+ senderUserID: string
333
+ /**
334
+ * 会话的 ID,相同会话类型下的 ID 是唯一的。
335
+ */
336
+ conversationID: string
337
+ /**
338
+ * 用于描述消息的方向是发送还是接收。0 消息已发送。1 消息已接受。
339
+ */
340
+ direction: number
341
+ /**
342
+ * 描述消息的发送状态。消息发送中。1 消息发送成功。2 消息发送失败。
343
+ */
344
+ sentStatus: number
345
+ /**
346
+ * 该消息所属会话的类型。
347
+ */
348
+ conversationType: number
349
+ /**
350
+ * 表示该消息在会话中的序号。
351
+ */
352
+ conversationSeq: string
353
+ /**
354
+ * orderKey 越大消息越新,可用于消息排序。
355
+ */
356
+ orderKey: string
357
+ /**
358
+ * 描述该消息的回执状态。0 不是回执。1 回执进行中。2 回执已完成。3 回执已过期。4 回执已失败。
359
+ */
360
+ receiptStatus: number
361
+ /**
362
+ * 该消息是否是全员推送消息。
363
+ */
364
+ isBroadcastMessage: string
365
+ /**
366
+ * 是否需要提醒所有人。业务表现可为“@所有人”。
367
+ */
368
+ isMentionAll: boolean
369
+ /**
370
+ * 提醒一批相关的用户。业务表现可为“@某用户”。
371
+ */
372
+ mentionedUserIDs: string[]
373
+ /**
374
+ * 本条消息最新的编辑者的 userID。
375
+ */
376
+ editorUserID: string
377
+ /**
378
+ * 本条消息最新的编辑时间戳。
379
+ */
380
+ editedTime: string
381
+ /**
382
+ * 该消息最后一次置顶的置顶时间。
383
+ */
384
+ pinnedTime: string
385
+ /**
386
+ * 该消息的最后一次置顶的置顶者。
387
+ */
388
+ pinnedUserID: string
389
+ /**
390
+ * 消息记录
391
+ */
392
+ message: string
393
+ /**
394
+ * 文件下载地址 (多媒体消息会有记录)
395
+ */
396
+ fileDownloadUrl: string
397
+ /**
398
+ * 如果是视频/语音,时长(多媒体消息会有记录)
399
+ */
400
+ duration: string
401
+ /**
402
+ * 文件名字 (多媒体消息会有记录)
403
+ */
404
+ fileName: string
405
+ /**
406
+ * 缩略图 (多媒体消息会有记录)
407
+ */
408
+ thumbnailDownloadUrl: string
409
+ /**
410
+ * 缩略图宽度 (多媒体消息会有记录)
411
+ */
412
+ thumbnailWidth: string
413
+ /**
414
+ * 缩略图高度 (多媒体消息会有记录)
415
+ */
416
+ thumbnailHeight: string
306
417
  }
307
- interface ApiResponse {
308
- code: string;
309
- message: string;
310
- data: string;
418
+
419
+ interface IYapiPostSdkDeleteAllConversationMessagesApiResponse {
420
+ code: string
421
+ message: string
422
+ data: string
311
423
  }
312
- interface MentionedInfoList {
313
- messageID: string;
314
- fromUserID: string;
315
- type: string;
316
- messageSeq: number;
424
+
425
+ interface IYapiPostSdkDeleteMessagesApiResponse {
426
+ code: string
427
+ message: string
428
+ data: string
317
429
  }
318
- interface LastMessageData {
319
- /**
320
- * 标识这条消息的唯一 ID。
321
- */
322
- msgId: string;
323
- /**
324
- * 1:普通文本消息
325
- * 2:自定义二进制消息,可用于传递自定义的二进制消息。该消息类型不支持离线消息和本地存储。
326
- * 0:未知类型
327
- * 20:弹幕消息,可用于直播间发送的弹幕
328
- * 11:图片消息,可用于发送图片消息,仅支持 .jpg, .jpeg, .png, .bmp, .gif, .tiff 图片类型
329
- * 12:文件消息
330
- * 13:音频消息
331
- * 14:视频消息
332
- * 30:系统消息
333
- * 31:系统消息
334
- * 100:合并消息
335
- * 200:自定义消息
336
- * 32:Tips 消息
337
- * 10:组合消息,可用于发送文本、富媒体文件、自定义消息的组合消息。
338
- *
339
- */
340
- type: string;
341
- /**
342
- * * 详情描述:标识一条消息的发送时间。
343
- */
344
- timestamp: number;
345
- /**
346
- * 展示本条消息发送者的 userID
347
- */
348
- fromUserId: string;
349
- /**
350
- * 会话 id
351
- */
352
- conversationID: string;
353
- /**
354
- * 0-发送,1-接收
355
- */
356
- direction: number;
357
- /**
358
- * 0-发送中,1-发送成功,2-发送失败
359
- */
360
- sentStatus: number;
361
- /**
362
- * 0 单聊会话 1 房间会话 2 群聊会话 3 未知
363
- */
364
- conversationType: number;
365
- /**
366
- * orderKey 越大消息越新,可用于消息排序。
367
- */
368
- orderKey: number;
369
- /**
370
- * SDK 本地生成的 MessageID,开发者无需关注。
371
- */
372
- localMessageID: string;
373
- /**
374
- * 预发 id
375
- */
376
- clientBizId: string;
377
- /**
378
- * 0-不是回执。,1-回执进行中。2-回执已完成。3-回执已过期。3-回执已失败。
379
- */
380
- receiptStatus: number;
381
- /**
382
- * 消息拓展字段。
383
- */
384
- extendedData: string;
385
- /**
386
- * 该消息是否是全员推送消息。
387
- */
388
- isBroadcastMessage: boolean;
389
- /**
390
- * 是否需要提醒所有人。业务表现可为“@所有人”。
391
- */
392
- isMentionAll: boolean;
393
- /**
394
- * 提醒一批相关的用户。业务表现可为“@某用户” 。
395
- */
396
- mentionedUserIDs: string[];
397
- /**
398
- * 回复消息树对应的根消息的回复消息数量。
399
- */
400
- rootRepliedCount: number;
401
- /**
402
- * 回复消息引用的源消息的信息。
403
- */
404
- repliedInfo: string;
405
- /**
406
- * 该消息的最后一次置顶的置顶者。
407
- */
408
- pinnedUserID: string;
409
- /**
410
- * 该消息最后一次置顶的置顶时间。
411
- */
412
- pinnedTime: number;
413
- /**
414
- * 消息内容
415
- */
416
- message: string;
417
- }
418
- interface ConversationItem {
419
- conversationID: string;
420
- conversationName: string;
421
- type: number;
422
- unreadMessageCount: number;
423
- lastMessage: LastMessageData;
424
- orderKey: number;
425
- notificationStatus: string;
426
- conversationAvatarUrl: string;
427
- isPinned: boolean;
428
- mentionedInfoList: MentionedInfoList[];
429
- conversationAlias: string;
430
- draft: string;
430
+
431
+ interface IYapiPostSdkRevokeMessageApiRequest {
432
+ message: IYapiPostSdkRevokeMessageApiRequestMessage
433
+
434
+ config?: YapiPostSdkRevokeMessageApiRequestConfig
435
+ }
436
+
437
+ interface YapiPostSdkRevokeMessageApiRequestConfig {
438
+ revokeExtendedData: string
439
+ }
440
+
441
+ interface IYapiPostSdkRevokeMessageApiRequestMessage {
442
+
443
+ type?: number
444
+
445
+ messageID?: string
446
+ }
447
+
448
+
449
+ interface IYapiPostSdkRevokeMessageApiResponse {
450
+ code: string
451
+ message: string
452
+ data: string
431
453
  }
432
454
 
433
455
  interface queryHistoryMessageParams {
@@ -437,6 +459,7 @@ interface queryHistoryMessageParams {
437
459
  nextMessage?: {
438
460
  type: string;
439
461
  messageID: string;
462
+ id: string;
440
463
  };
441
464
  count: number | string;
442
465
  reverse?: boolean;
@@ -544,18 +567,127 @@ interface ZIMMessageItem {
544
567
  */
545
568
  thumbnailHeight: string;
546
569
  }
547
- interface ZIMMessageQueriedResult {
548
- messageList: ZIMMessageItem[];
570
+ interface ZIMMessageQueriedResult<TMessage = ZIMMessageItem, TConversationType = string> {
571
+ messageList: TMessage[];
549
572
  conversationID: string;
550
- conversationType: string;
573
+ conversationType: TConversationType;
551
574
  }
552
- declare enum ZIMConversationType {
575
+ declare enum ZIMMessageType$1 {
576
+ Unknown = 0,
577
+ Text = 1,
578
+ Command = 2,
579
+ Link = 3,
580
+ Image = 11,
581
+ File = 12,
582
+ Audio = 13,
583
+ Video = 14,
584
+ Barrage = 20,
585
+ System = 30,
586
+ Revoke = 31,
587
+ Combine = 100,
588
+ Custom = 200
589
+ }
590
+ interface ZIMMessageBase$1 {
591
+ type: ZIMMessageType$1;
592
+ message: string | Uint8Array;
593
+ extendedData?: string;
594
+ revokeExtendedData?: string;
595
+ localExtendedData?: string;
596
+ mentionedUserIDs?: string[];
597
+ isMentionAll?: boolean;
598
+ }
599
+ declare enum ZIMConversationType$1 {
553
600
  Unknown = -1,
554
601
  Peer = 0,
555
602
  Room = 1,
556
603
  Group = 2
557
604
  }
558
- declare enum SEDMessageType$1 {
605
+ declare enum ZIMMessageDirection$1 {
606
+ Send = 0,
607
+ Receive = 1
608
+ }
609
+ declare enum ZIMMessageSentStatus$1 {
610
+ Sending = 0,
611
+ Success = 1,
612
+ Failed = 2
613
+ }
614
+ declare enum ZIMMessageReceiptStatus$1 {
615
+ None = 0,
616
+ Processing = 1,
617
+ Done = 2,
618
+ Expired = 3,
619
+ Failed = 4
620
+ }
621
+ interface ZIMMessageReaction$1 {
622
+ conversationID: string;
623
+ conversationType: ZIMConversationType$1;
624
+ messageID: string;
625
+ reactionType: string;
626
+ isSelfIncluded: boolean;
627
+ totalCount: number;
628
+ userList: ZIMMessageReactionUserInfo$1[];
629
+ }
630
+ interface ZIMMessageReactionUserInfo$1 {
631
+ userID: string;
632
+ }
633
+ declare enum MessageRepliedInfoState$1 {
634
+ Normal = 0,
635
+ Deleted = 1,
636
+ NotFound = 2
637
+ }
638
+ interface ZIMMessageRepliedInfo$1 {
639
+ state: MessageRepliedInfoState$1;
640
+ messageSeq: number;
641
+ messageID: string;
642
+ senderUserID: string;
643
+ sentTime: number;
644
+ messageInfo: ZIMMessageLiteInfo$1;
645
+ rootMessageSeq: number;
646
+ rootMessageID: string;
647
+ }
648
+ declare enum MessageType$1 {
649
+ Unknown = 0,
650
+ Command = 2,
651
+ Barrage = 20,
652
+ Text = 1,
653
+ Image = 11,
654
+ File = 12,
655
+ Audio = 13,
656
+ Video = 14,
657
+ System = 30,
658
+ Revoke = 31,
659
+ Tips = 32,
660
+ Combine = 100,
661
+ Custom = 200
662
+ }
663
+ interface ZIMMessageLiteInfo$1 {
664
+ type: MessageType$1;
665
+ message?: string;
666
+ fileName?: string;
667
+ subType?: number;
668
+ }
669
+ interface ZIMMessage$1 extends ZIMMessageBase$1 {
670
+ fileLocalPath: File;
671
+ localMessageID: string;
672
+ clientBizId: string;
673
+ messageID: string;
674
+ senderUserID: string;
675
+ timestamp: number;
676
+ conversationID: string;
677
+ conversationType: ZIMConversationType$1;
678
+ direction: ZIMMessageDirection$1;
679
+ sentStatus: ZIMMessageSentStatus$1;
680
+ orderKey: number;
681
+ subType: number;
682
+ conversationSeq: number;
683
+ isUserInserted: boolean;
684
+ isBroadcastMessage: boolean;
685
+ isServerMessage: boolean;
686
+ receiptStatus: ZIMMessageReceiptStatus$1;
687
+ reactions: ZIMMessageReaction$1[];
688
+ repliedInfo?: ZIMMessageRepliedInfo$1;
689
+ }
690
+ declare enum SEDMessageType {
559
691
  Unknown = "0",
560
692
  Command = "2",
561
693
  Barrage = "20",
@@ -572,7 +704,7 @@ declare enum SEDMessageType$1 {
572
704
  }
573
705
  interface ZIMSEDMessage {
574
706
  message: string;
575
- type: SEDMessageType$1;
707
+ type: SEDMessageType;
576
708
  /**
577
709
  * 自定义的拓展字段
578
710
  */
@@ -584,7 +716,7 @@ interface ZIMSEDMessage {
584
716
  }
585
717
  interface ZIMSEDMediaMessage {
586
718
  message: string;
587
- type: SEDMessageType$1;
719
+ type: SEDMessageType;
588
720
  /**
589
721
  * 自定义的拓展字段
590
722
  */
@@ -611,7 +743,7 @@ interface ZIMLocalMediaMessage {
611
743
  * 消息内容。
612
744
  */
613
745
  message: string;
614
- type: SEDMessageType$1;
746
+ type: SEDMessageType;
615
747
  extendedData: string;
616
748
  messageID: string;
617
749
  orderKey: string;
@@ -619,10 +751,11 @@ interface ZIMLocalMediaMessage {
619
751
  localMessageID: string;
620
752
  clientBizId: string;
621
753
  conversationID: string;
622
- conversationType: ZIMConversationType;
754
+ conversationType: ZIMConversationType$1;
623
755
  senderUserID: string;
624
756
  direction: number;
625
757
  sentStatus: number;
758
+ sendState: 0;
626
759
  timestamp: number;
627
760
  receiptStatus: number;
628
761
  isServerMessage: boolean;
@@ -641,15 +774,61 @@ interface ZIMLocalMediaMessage {
641
774
  * 浏览器本地预览 URL。客户端使用完后可自行 URL.revokeObjectURL。
642
775
  */
643
776
  localPreviewUrl?: string;
777
+ /** 本地视频首帧;上传失败时仍可用于预览。 */
778
+ thumbnailFile?: Blob;
644
779
  }
645
780
  interface ZIMMediaMessageSendOptions {
781
+ /** 预发时触发;视频首帧生成后会以相同 clientBizId 再次触发,更新同一条消息。 */
646
782
  onMessageAttached?: (message: ZIMLocalMediaMessage) => void;
647
783
  }
784
+ interface ZIMMessageSendOptions {
785
+ onMessageAttached?: (message: ZIMMessageSeDResult) => void;
786
+ }
787
+ declare enum ZIMMessagePriority {
788
+ Low = 1,
789
+ Medium = 2,
790
+ High = 3
791
+ }
792
+ interface ZIMMessageSendConfig {
793
+ priority: ZIMMessagePriority;
794
+ hasReceipt?: boolean;
795
+ isNotifyMentionedUsers?: boolean;
796
+ pushConfig?: ZIMPushConfig;
797
+ }
798
+ declare enum ZIMCXHandleType {
799
+ Generic = 1,
800
+ PhoneNumber = 2,
801
+ EmailAddress = 3
802
+ }
803
+ interface ZIMVoIPConfig {
804
+ iOSVoIPHandleType: ZIMCXHandleType;
805
+ iOSVoIPHandleValue: string;
806
+ iOSVoIPHasVideo: boolean;
807
+ }
808
+ interface ZIMPushConfig {
809
+ title: string;
810
+ content: string;
811
+ payload?: string;
812
+ resourcesID?: string;
813
+ badgeIncrement?: number;
814
+ enableBadge?: boolean;
815
+ voIPConfig?: ZIMVoIPConfig;
816
+ }
817
+ interface ZIMMessageSendNotification {
818
+ onMessageAttached: (message: ZIMMessage$1) => void;
819
+ }
820
+ interface ZIMMessageSentResult {
821
+ message: ZIMMessage$1;
822
+ }
648
823
  interface ZIMMessageSeDResult {
649
824
  /**
650
825
  * 消息
651
826
  */
652
827
  massage: string;
828
+ /**
829
+ * 消息内容。
830
+ */
831
+ message: string;
653
832
  /**
654
833
  * 消息类型:
655
834
  * 1:普通文本消息
@@ -668,7 +847,7 @@ interface ZIMMessageSeDResult {
668
847
  * 10:组合消息,可用于发送文本、富媒体文件、自定义消息的组合消息。
669
848
  *
670
849
  */
671
- type: SEDMessageType$1;
850
+ type: SEDMessageType;
672
851
  /**
673
852
  * 消息拓展
674
853
  */
@@ -700,7 +879,7 @@ interface ZIMMessageSeDResult {
700
879
  /**
701
880
  * 会话类型
702
881
  */
703
- conversationType: ZIMConversationType;
882
+ conversationType: ZIMConversationType$1;
704
883
  /**
705
884
  * 发送者 id
706
885
  */
@@ -709,6 +888,12 @@ interface ZIMMessageSeDResult {
709
888
  * 0 发送 1 接收
710
889
  */
711
890
  direction: number;
891
+ /**
892
+ * 0 发送中,1 发送成功,2 发送失败。
893
+ */
894
+ sentStatus?: number;
895
+ /** 0 发送中,1 发送成功,2 发送失败。 */
896
+ sendState?: 0 | 1 | 2;
712
897
  /**
713
898
  * 消息发送时间戳
714
899
  */
@@ -737,537 +922,2587 @@ interface ZIMMessageSeDResult {
737
922
  interface ZIMMessageRevokeConfig {
738
923
  revokeExtendedData?: string;
739
924
  }
740
-
741
- interface ZIM {
742
- create(): Promise<void>;
743
- logout(): Promise<boolean>;
744
- isConnected(): boolean;
745
- on(event: string, handler: (...args: any[]) => void): void;
746
- off(event: string, handler?: (...args: any[]) => void): void;
747
- login(values: {
748
- token: string;
749
- }): Promise<boolean>;
750
- queryConversation(params: {
751
- count: number;
752
- nextConversation: IConversation | undefined;
753
- conversationName?: string;
754
- }): Promise<ConversationItem[]>;
755
- deleteAllConversations(): Promise<ApiResponse>;
756
- deleteConversation(params: {
757
- conversationID: string;
758
- conversationType: ZIMConversationType;
759
- config?: boolean;
760
- }): Promise<IYapiPostSdkDeleteConversationApiResponse>;
761
- clearConversationTotalUnreadMessageCount(): Promise<IYapiPostSdkClearConversationTotalUnreadMessageCountApiResponse>;
762
- clearConversationUnreadMessageCount(conversationID: string, conversationType: ZIMConversationType): Promise<IYapiPostSdkClearConversationUnreadMessageCountApiResponse>;
763
- queryHistoryMessage(params: queryHistoryMessageParams): Promise<ZIMMessageQueriedResult>;
764
- sendMessage(params: {
765
- message: ZIMSEDMessage;
766
- toConversationID: string;
767
- conversationType: ZIMConversationType;
768
- }): Promise<ZIMMessageSeDResult>;
769
- sendMediaMessage(params: {
770
- message: ZIMSEDMediaMessage;
771
- toConversationID: string;
772
- conversationType: ZIMConversationType;
773
- }, options?: ZIMMediaMessageSendOptions): Promise<IYapiPostSdkSendMediaMessageApiResponse['data']>;
774
- deleteAllConversationMessages(): Promise<{
775
- code: string;
776
- message: string;
777
- data: string;
778
- }>;
779
- deleteAllMessage(conversationID: string, conversationType: ZIMConversationType): Promise<{
780
- code: string;
781
- message: string;
782
- data: string;
783
- }>;
784
- deleteMessages(conversationID: string, conversationType: ZIMConversationType, messageList: {
785
- messageID: string;
786
- type: string;
787
- }[]): Promise<{
788
- code: string;
789
- message: string;
790
- data: string;
791
- }>;
792
- revokeMessage(message: {
793
- messageID: string;
794
- type: number;
795
- }, config?: ZIMMessageRevokeConfig): Promise<{
796
- code: string;
797
- message: string;
798
- data: string;
799
- }>;
800
- sendMessageReceiptsRead(conversationID: string, conversationType: ZIMConversationType, messageList: string[]): Promise<YapiPostSdkSendMessageReceiptsReadApiResponse>;
801
- queryMessageReceiptsInfo(conversationID: string, conversationType: ZIMConversationType, messageList: string[]): Promise<YapiPostSdkQueryMessageReceiptsInfoApiResponse>;
802
- queryGroupMessageReceiptUnreadMemberList(groupID: string, config: {
803
- count: string;
804
- nextFlag: string;
805
- }, message: {
806
- messageID: string;
807
- }): Promise<YapiPostSdkQueryGroupMessageReceiptUnreadMemberListApiResponse>;
808
- queryGroupMessageReceiptReadMemberList(groupID: string, config: {
809
- count: string;
810
- nextFlag: string;
811
- }, message: {
812
- messageID: string;
813
- }): Promise<YapiPostSdkQueryGroupMessageReceiptReadMemberListApiResponse>;
925
+ type IIMMessage = ZIMMessage$1 & {
926
+ /** 已读人数 */
927
+ readMemberCount?: number;
928
+ /** 未读人数 */
929
+ unreadMemberCount?: number;
930
+ /** 信息类型 */
931
+ subType?: number;
932
+ /** 文件名字 */
933
+ fileName?: string;
934
+ };
935
+ type IAppendExtraDataParams = {
936
+ /** 默认不用传,只有群聊消息时需要传入 */
937
+ fromNickname?: string;
938
+ /** 撤回人昵称 */
939
+ operatorName?: string;
940
+ /** 头像,不传 */
941
+ avatarUrl?: string;
942
+ /** 子类型 */
943
+ secondType?: string;
944
+ /** 预览图 */
945
+ previewUrl?: string;
946
+ /** 艾特信息 */
947
+ atMsgMap?: string;
948
+ /** 销毁时间 */
949
+ destroyTime?: string;
950
+ /** 自定义表情 */
951
+ emoji?: string;
952
+ /** 自定义表情 URl */
953
+ emojiUrl?: string;
954
+ };
955
+ declare enum ZIMRevokeType {
956
+ TwoWay = 0,
957
+ OneWay = 1
814
958
  }
815
-
816
- interface IYapiPostSdkQueryConversationApiRequest {
817
- nextConversation?: IYapiPostSdkQueryConversationApiRequestNextConversation
818
-
819
- count: number
820
- conversationName?: string
821
- }
822
-
823
- interface IYapiPostSdkQueryConversationApiRequestNextConversation {
824
-
825
- conversationID?: string
959
+ declare enum ZIMMessageRevokeStatus {
960
+ Unknown = -1,
961
+ SelfRevoke = 0,
962
+ SystemRevoke = 1,
963
+ ServiceAPIRevoke = 2,
964
+ GroupAdminRevoke = 3,
965
+ GroupOwnerRevoke = 4
826
966
  }
827
-
828
- interface IYapiPostSdkDeleteAllConversationsApiResponse {
829
- code: string
830
- message: string
831
- data: string
967
+ interface ZIMRevokeMessage extends ZIMMessage$1 {
968
+ type: ZIMMessageType$1.Revoke;
969
+ message: string;
970
+ revokeType: ZIMRevokeType;
971
+ revokeStatus: ZIMMessageRevokeStatus;
972
+ revokeTimestamp: number;
973
+ operatedUserID: string;
974
+ revokeExtendedData: string;
975
+ originalMessageType: ZIMMessageType$1;
976
+ originalTextMessageContent: string;
832
977
  }
978
+ type IIMRevokeMessage = ZIMRevokeMessage;
833
979
 
980
+ type SendMessageData = IYapiPostSdkSendMessageApiResponse["data"] & {
981
+ message: string;
982
+ clientBizId: string;
983
+ sendState: 0 | 1 | 2;
984
+ };
985
+ type SdkHistoryMessage = IYapiPostSdkQueryHistoryMessageApiResponse['data']['messageList'][number] & {
986
+ sendState?: 0 | 1 | 2;
987
+ localID?: string;
988
+ };
989
+ type SdkHistoryResult = Omit<IYapiPostSdkQueryHistoryMessageApiResponse['data'], 'messageList'> & {
990
+ messageList: SdkHistoryMessage[];
991
+ };
992
+ type SdkMediaSendResult = IYapiPostSdkSendMediaMessageApiResponse['data'] & {
993
+ clientBizId: string;
994
+ sendState: 0 | 1 | 2;
995
+ };
834
996
  /**
835
- * 查询会话列表
836
- * @param payload 查询参数
837
- * @returns 会话列表数据
997
+ * 发送消息
998
+ * @param payload 发送消息参数
999
+ * @returns 发送结果
838
1000
  */
839
- declare function queryConversation(payload: IYapiPostSdkQueryConversationApiRequest): Promise<ConversationItem[]>;
1001
+ declare function sendMessage(payload: IYapiPostSdkSendMessageApiRequest, options?: ZIMMessageSendOptions): Promise<SendMessageData>;
840
1002
  /**
841
- * 删除全部会话
842
- * @param payload 删除参数
1003
+ * 发送媒体消息
1004
+ * @param payload 发送媒体消息参数
1005
+ * @returns 发送结果
1006
+ */
1007
+ declare function sendMediaMessage(payload: {
1008
+ message: ZIMSEDMediaMessage;
1009
+ toConversationID: string;
1010
+ conversationType: ZIMConversationType$1;
1011
+ }, options?: ZIMMediaMessageSendOptions): Promise<SdkMediaSendResult>;
1012
+ /**
1013
+ * 查询历史消息
1014
+ * @param payload 查询参数
1015
+ * @returns 历史消息列表
1016
+ */
1017
+ declare function queryHistoryMessage(payload: IYapiPostSdkQueryHistoryMessageApiRequest): Promise<SdkHistoryResult>;
1018
+ /**
1019
+ * 删除所有会话的所有消息
1020
+ * @param payload 删除参数
843
1021
  * @returns 删除结果
844
1022
  */
845
- declare function deleteAllConversations(): Promise<IYapiPostSdkDeleteAllConversationsApiResponse>;
1023
+ declare function deleteAllConversationMessages(): Promise<IYapiPostSdkDeleteAllConversationMessagesApiResponse>;
846
1024
  /**
847
- * 删除单个会话
848
- * @param payload 删除参数 (需要 conversationID, conversationType, config)
1025
+ * 删除消息
1026
+ * @param payload 删除消息参数
849
1027
  * @returns 删除结果
850
1028
  */
851
- declare function deleteConversation(payload: IYapiPostSdkDeleteConversationApiRequest): Promise<IYapiPostSdkDeleteConversationApiResponse>;
1029
+ declare function deleteMessages(conversationID: string, conversationType: ZIMConversationType$1, messageList: {
1030
+ messageID: string;
1031
+ type: string;
1032
+ }[]): Promise<IYapiPostSdkDeleteMessagesApiResponse>;
852
1033
  /**
853
- * 清除全部会话未读数
854
- * @param payload 清除参数(无需要参数)
855
- * @returns 清除结果
1034
+ * 撤回消息
1035
+ * @param payload 撤回消息参数
1036
+ * @returns 撤回结果
856
1037
  */
857
- declare function clearConversationTotalUnreadMessageCount(): Promise<IYapiPostSdkClearConversationTotalUnreadMessageCountApiResponse>;
1038
+ declare function revokeMessage(message: IYapiPostSdkRevokeMessageApiRequest['message'], config?: IYapiPostSdkRevokeMessageApiRequest['config']): Promise<IYapiPostSdkRevokeMessageApiResponse>;
1039
+ declare function deleteAllMessage(conversationID: string, conversationType: ZIMConversationType$1): Promise<{
1040
+ code: string;
1041
+ message: string;
1042
+ data: string;
1043
+ }>;
1044
+
858
1045
  /**
859
- * 清除单个会话未读数
860
- * @param payload 清除参数 (需要 conversationID, conversationType)
861
- * @returns 清除结果
1046
+ * 接口 [查询群消息已读成员列表。↗](https://yapi.whatimcloud.com/project/123/interface/api/9403) 的 **返回类型**
1047
+ *
1048
+ * @分类 [会话消息↗](https://yapi.whatimcloud.com/project/123/interface/api/cat_766)
1049
+ * @请求头 `POST /sdk/queryGroupMessageReceiptReadMemberList`
1050
+ * @更新时间 `2026-04-27 17:08:54`
862
1051
  */
863
- declare function clearConversationUnreadMessageCount(conversationID: string, conversationType: string | number): Promise<IYapiPostSdkClearConversationUnreadMessageCountApiResponse>;
1052
+ interface YapiPostSdkQueryGroupMessageReceiptReadMemberListApiResponse {
1053
+ code: string;
1054
+ message: string;
1055
+ data: YapiPostSdkQueryGroupMessageReceiptReadMemberData;
1056
+ }
1057
+ interface YapiPostSdkQueryGroupMessageReceiptReadMemberData {
1058
+ nextFlag: string;
1059
+ userList: YapiPostSdkQueryGroupMessageReceiptReadMemberListUserListData[];
1060
+ groupID: string;
1061
+ }
1062
+ interface YapiPostSdkQueryGroupMessageReceiptReadMemberListUserListData {
1063
+ /**
1064
+ * 群组成员昵称。
1065
+ */
1066
+ memberNickname: string;
1067
+ /**
1068
+ * 群角色,1:群主,2:管理员,3:群成员。
1069
+ */
1070
+ memberRole: string;
1071
+ /**
1072
+ * 群成员头像 URL。
1073
+ */
1074
+ memberAvatarUrl: string;
1075
+ userID: string;
1076
+ userName: string;
1077
+ /**
1078
+ * 用户头像
1079
+ */
1080
+ userAvatarUrl: string;
1081
+ /**
1082
+ * 群成员禁言过期时间。为 0 时即不禁言,为 -1 时即永久禁言。
1083
+ */
1084
+ muteExpiredTime: string;
1085
+ }
864
1086
 
865
- declare function initSocket(): Promise<void>;
866
- declare function isSocketConnected(): boolean;
867
- declare function on(event: string, handler: (...args: any[]) => void): void;
868
- declare function off(event: string, handler?: (...args: any[]) => void): void;
1087
+ /**
1088
+ * 接口 [查询群消息未读成员列表。↗](https://yapi.whatimcloud.com/project/123/interface/api/9396) 的 **返回类型**
1089
+ *
1090
+ * @分类 [会话消息↗](https://yapi.whatimcloud.com/project/123/interface/api/cat_766)
1091
+ * @请求头 `POST /sdk/queryGroupMessageReceiptUnreadMemberList`
1092
+ * @更新时间 `2026-04-29 15:01:12`
1093
+ */
1094
+ interface YapiPostSdkQueryGroupMessageReceiptUnreadMemberListApiResponse {
1095
+ code: string;
1096
+ message: string;
1097
+ data: YapiPostSdkQueryGroupMessageReceiptUnreadMemberData;
1098
+ }
1099
+ interface YapiPostSdkQueryGroupMessageReceiptUnreadMemberData {
1100
+ nextFlag: string;
1101
+ userList: YapiPostSdkQueryGroupMessageReceiptUnreadMemberListUserListData[];
1102
+ groupID: string;
1103
+ }
1104
+ interface YapiPostSdkQueryGroupMessageReceiptUnreadMemberListUserListData {
1105
+ /**
1106
+ * 群组成员昵称。
1107
+ */
1108
+ memberNickname: string;
1109
+ /**
1110
+ * 群角色,1:群主,2:管理员,3:群成员。
1111
+ */
1112
+ memberRole: string;
1113
+ /**
1114
+ * 群成员头像 URL。
1115
+ */
1116
+ memberAvatarUrl: string;
1117
+ userID: string;
1118
+ userName: string;
1119
+ /**
1120
+ * 用户头像
1121
+ */
1122
+ userAvatarUrl: string;
1123
+ /**
1124
+ * 群成员禁言过期时间。为 0 时即不禁言,为 -1 时即永久禁言。
1125
+ */
1126
+ muteExpiredTime: string;
1127
+ }
1128
+
1129
+ /**
1130
+ * 接口 [查询一批消息的回执信息↗](https://yapi.whatimcloud.com/project/123/interface/api/9389) 的 **返回类型**
1131
+ *
1132
+ * @分类 [会话消息↗](https://yapi.whatimcloud.com/project/123/interface/api/cat_766)
1133
+ * @请求头 `POST /sdk/queryMessageReceiptsInfo`
1134
+ * @更新时间 `2026-04-27 16:39:08`
1135
+ */
1136
+ interface YapiPostSdkQueryMessageReceiptsInfoApiResponse {
1137
+ code: string;
1138
+ message: string;
1139
+ data: YapiPostSdkQueryMessageReceiptsInfoListData[];
1140
+ }
1141
+ interface YapiPostSdkQueryMessageReceiptsInfoListData {
1142
+ /**
1143
+ * 回执的状态。
1144
+ */
1145
+ status: string;
1146
+ /**
1147
+ * 消息 ID。
1148
+ */
1149
+ messageID: string;
1150
+ /**
1151
+ * 会话 ID。
1152
+ */
1153
+ conversationID: string;
1154
+ /**
1155
+ * 会话类型。
1156
+ */
1157
+ conversationType: string;
1158
+ /**
1159
+ * 表示该回执的已读人数。
1160
+ */
1161
+ readMemberCount: string;
1162
+ /**
1163
+ * 表示该回执的未读人数
1164
+ */
1165
+ unreadMemberCount: string;
1166
+ /**
1167
+ * 消息回执已读时的服务端时间戳。
1168
+ */
1169
+ readTime: string;
1170
+ }
1171
+
1172
+ /**
1173
+ * 接口 [设置一批消息的回执变成已读↗](https://yapi.whatimcloud.com/project/123/interface/api/9382) 的 **返回类型**
1174
+ *
1175
+ * @分类 [会话消息↗](https://yapi.whatimcloud.com/project/123/interface/api/cat_766)
1176
+ * @请求头 `POST /sdk/sendMessageReceiptsRead`
1177
+ * @更新时间 `2026-04-27 14:10:58`
1178
+ */
1179
+ interface YapiPostSdkSendMessageReceiptsReadApiResponse {
1180
+ code: string;
1181
+ message: string;
1182
+ data: string;
1183
+ }
1184
+
1185
+ declare function sendMessageReceiptsRead(conversationID: string, conversationType: ZIMConversationType$1, messageList: string[]): Promise<YapiPostSdkSendMessageReceiptsReadApiResponse>;
1186
+ declare function queryMessageReceiptsInfo(conversationID: string, conversationType: ZIMConversationType$1, messageList: string[]): Promise<YapiPostSdkQueryMessageReceiptsInfoApiResponse>;
1187
+ declare function queryGroupMessageReceiptUnreadMemberList(groupID: string, config: {
1188
+ count: string;
1189
+ nextFlag: string;
1190
+ }, message: {
1191
+ messageID: string;
1192
+ }): Promise<YapiPostSdkQueryGroupMessageReceiptUnreadMemberListApiResponse>;
1193
+ declare function queryGroupMessageReceiptReadMemberList(groupID: string, config: {
1194
+ count: string;
1195
+ nextFlag: string;
1196
+ }, message: {
1197
+ messageID: string;
1198
+ }): Promise<YapiPostSdkQueryGroupMessageReceiptReadMemberListApiResponse>;
1199
+
1200
+ /** 0: sending, 1: sent, 2: failed. Matches server sentStatus. */
1201
+ type LocalSendState = 0 | 1 | 2;
1202
+ interface LocalMessage extends Record<string, any> {
1203
+ type: number | string;
1204
+ localID: string;
1205
+ conversationID: string;
1206
+ conversationType: string;
1207
+ conversationKey: string;
1208
+ messageID?: string;
1209
+ clientBizId?: string;
1210
+ timestamp: number;
1211
+ sendState: LocalSendState;
1212
+ updatedAt: number;
1213
+ deleted?: boolean;
1214
+ revoked?: boolean;
1215
+ errorCode?: string | number;
1216
+ errorMessage?: string;
1217
+ }
1218
+ interface LocalMessageQuery {
1219
+ conversationID?: string;
1220
+ conversationType?: string | number;
1221
+ count?: number;
1222
+ /** Descending pagination: pass nextCursor from the previous result. */
1223
+ before?: {
1224
+ timestamp: number;
1225
+ localID: string;
1226
+ };
1227
+ sendStates?: LocalSendState[];
1228
+ keywords?: string[];
1229
+ messageTypes?: (string | number)[];
1230
+ senderUserIDs?: string[];
1231
+ startTime?: number;
1232
+ endTime?: number;
1233
+ order?: 'asc' | 'desc';
1234
+ }
1235
+ interface LocalMessageQueryResult {
1236
+ messageList: LocalMessage[];
1237
+ hasMore: boolean;
1238
+ nextCursor?: {
1239
+ timestamp: number;
1240
+ localID: string;
1241
+ };
1242
+ }
1243
+ interface LocalStorageStatus {
1244
+ enabled: boolean;
1245
+ userId?: string;
1246
+ databaseName?: string;
1247
+ error?: string;
1248
+ }
1249
+ interface LocalSyncResult {
1250
+ conversationID: string;
1251
+ conversationType: string;
1252
+ syncedAt: number;
1253
+ /** Existing server APIs cannot certify offline edits/deletions as fully reconciled. */
1254
+ fullyReconciled: false;
1255
+ }
1256
+ interface LocalSyncFailure {
1257
+ conversationID: string;
1258
+ conversationType: string;
1259
+ message: string;
1260
+ }
1261
+ /** Failed synchronization keeps successful conversations available for selective retries. */
1262
+ declare class LocalSyncError extends Error {
1263
+ readonly results: LocalSyncResult[];
1264
+ readonly failures: LocalSyncFailure[];
1265
+ readonly name = "LocalSyncError";
1266
+ readonly fullyReconciled = false;
1267
+ constructor(results: LocalSyncResult[], failures: LocalSyncFailure[]);
1268
+ toJSON(): {
1269
+ name: string;
1270
+ message: string;
1271
+ results: LocalSyncResult[];
1272
+ failures: LocalSyncFailure[];
1273
+ fullyReconciled: boolean;
1274
+ };
1275
+ }
1276
+
1277
+ declare function getLocalStorageStatus(): LocalStorageStatus;
1278
+ declare function queryLocalMessages(query?: LocalMessageQuery): Promise<LocalMessageQueryResult>;
1279
+ declare function queryFailedMessages(query?: LocalMessageQuery): Promise<LocalMessageQueryResult>;
1280
+ declare function clearLocalMessages(query?: Pick<LocalMessageQuery, 'conversationID' | 'conversationType'>): Promise<void>;
1281
+
1282
+ declare function syncConversationMessages(options: {
1283
+ conversationID: string;
1284
+ conversationType: string | number;
1285
+ }): Promise<LocalSyncResult>;
1286
+ declare function syncLocalMessages(): Promise<LocalSyncResult[]>;
1287
+
1288
+ declare const LocalStorageApis: {
1289
+ queryLocalMessages: typeof queryLocalMessages;
1290
+ queryFailedMessages: typeof queryFailedMessages;
1291
+ clearLocalMessages: typeof clearLocalMessages;
1292
+ getLocalStorageStatus: typeof getLocalStorageStatus;
1293
+ syncConversationMessages: typeof syncConversationMessages;
1294
+ syncLocalMessages: typeof syncLocalMessages;
1295
+ };
1296
+ type LocalStorageApi = typeof LocalStorageApis;
869
1297
 
870
1298
  interface IYapiPostSdkLoginApiRequest {
871
1299
  token: string;
872
1300
  }
873
1301
 
874
- declare function login(payload: IYapiPostSdkLoginApiRequest): Promise<boolean>;
1302
+ interface SdkLoginOptions extends IYapiPostSdkLoginApiRequest {
1303
+ /** Current user identity for push ACKs. Does not enable local storage or go to the login endpoint. */
1304
+ userID?: string;
1305
+ /** Enables account-isolated IndexedDB persistence without fetching history. Must match the token's user. */
1306
+ userId?: string;
1307
+ }
1308
+ declare function login(payload: SdkLoginOptions): Promise<boolean>;
875
1309
  declare function logout(disconnect?: boolean): Promise<boolean>;
876
1310
 
877
- interface IYapiPostSdkSendMessageApiRequest {
878
- message: IYapiPostSdkSendMessageApiRequestMessage
879
- /**
880
- * 消息需要发送的会话 ID。
881
- */
882
- toConversationID: string
883
- /**
884
- * 类型。Peer=(0) 单聊会话。Room=(1) 房间会话。Group=(2) 群聊会话。Unknown=(3) 未知。
885
- */
1311
+ interface IYapiPostSdkClearConversationTotalUnreadMessageCountApiResponse {
1312
+ code: string
1313
+ message: string
1314
+ data: string
1315
+ }
1316
+
1317
+ interface IYapiPostSdkClearConversationUnreadMessageCountApiResponse {
1318
+ code: string
1319
+ message: string
1320
+ data: IYapiPostSdkClearConversationUnreadMessageCountData
1321
+ }
1322
+ interface IYapiPostSdkClearConversationUnreadMessageCountData {
1323
+ conversationID: string
1324
+ conversationType: string
1325
+ }
1326
+
1327
+ interface IYapiPostSdkDeleteConversationApiRequest {
1328
+
1329
+ conversationID: string
1330
+
886
1331
  conversationType: number
1332
+
1333
+ config: boolean
887
1334
  }
888
1335
 
889
- interface IYapiPostSdkSendMessageApiRequestMessage {
890
- /**
891
- * 消息内容
892
- */
893
- message: string
894
- /**
895
- * 消息类型:
896
- * 1:普通文本消息
897
- * 2:自定义二进制消息,可用于传递自定义的二进制消息。该消息类型不支持离线消息和本地存储。
898
- * 0:未知类型
899
- * 20:弹幕消息,可用于直播间发送的弹幕
900
- * 11:图片消息,可用于发送图片消息,仅支持 .jpg, .jpeg, .png, .bmp, .gif, .tiff 图片类型
901
- * 12:文件消息
902
- * 13:音频消息
903
- * 14:视频消息
904
- * 30:系统消息
905
- * 31:系统消息
906
- * 100:合并消息
907
- * 200:自定义消息
908
- * 32:Tips 消息
909
- * 10:组合消息,可用于发送文本、富媒体文件、自定义消息的组合消息。
910
- *
911
- */
912
- type: string
913
- /**
914
- * 自定义的拓展字段
915
- */
916
- extendedData: string
917
- /**
918
- * 客户端业务预发 ID。未传时 SDK 会自动生成。
919
- */
920
- clientBizId?: string
921
- }
922
- declare enum SEDMessageType {
923
- Unknown = '0',
924
- Command = '2',
925
- Barrage = '20',
926
- Text = '1',
927
- Image = '11',
928
- File = '12',
929
- Audio = '13',
930
- Video = '14',
931
- System = '30',
932
- Revoke = '31',
933
- Tips = '32',
934
- Combine = '100',
935
- Custom = '200'
936
- }
937
- interface YapiPostSdkSendMessageMessage {
938
- /**
939
- * 消息
940
- */
941
- massage: string
942
- /**
943
- * 消息类型:
944
- * 1:普通文本消息
945
- * 2:自定义二进制消息,可用于传递自定义的二进制消息。该消息类型不支持离线消息和本地存储。
946
- * 0:未知类型
947
- * 20:弹幕消息,可用于直播间发送的弹幕
948
- * 11:图片消息,可用于发送图片消息,仅支持 .jpg, .jpeg, .png, .bmp, .gif, .tiff 图片类型
949
- * 12:文件消息
950
- * 13:音频消息
951
- * 14:视频消息
952
- * 30:系统消息
953
- * 31:系统消息
954
- * 100:合并消息
955
- * 200:自定义消息
956
- * 32:Tips 消息
957
- * 10:组合消息,可用于发送文本、富媒体文件、自定义消息的组合消息。
958
- *
959
- */
960
- type: SEDMessageType
961
- /**
962
- * 消息拓展
963
- */
964
- extendedData: string
965
- /**
966
- * 消息 id
967
- */
968
- messageID: string
969
- /**
970
- * 排序 key
971
- */
972
- orderKey: string
973
- /**
974
- * 客户端 id
975
- */
976
- clientSid: string
977
- /**
978
- * 消息表 id
979
- */
980
- localMessageID: string
981
- /**
982
- * 预发 id
983
- */
984
- clientBizId: string
985
- /**
986
- * 会话 id
987
- */
988
- conversationID: string
989
- /**
990
- * 会话类型
991
- */
992
- conversationType: number
993
- /**
994
- * 发送者 id
995
- */
996
- senderUserID: string
997
- /**
998
- * 0 发送 1 接收
999
- */
1000
- direction: number
1001
- /**
1002
- * 消息发送时间戳
1003
- */
1004
- timestamp: string
1005
- /**
1006
- * 0 不是回执。1 回执进行中。2 回执已完成。3 回执已过期。4 回执已失败。
1007
- */
1008
- receiptStatus: number
1009
- /**
1010
- * 是否服务端发送消息
1011
- */
1012
- isServerMessage: boolean
1013
- /**
1014
- * 是否是全员推送消息
1015
- */
1016
- isBroadcastMessage: boolean
1017
- /**
1018
- * 标识该消息是否为群定向消息
1019
- */
1020
- isGroupTargetedMessage: string
1021
- /**
1022
- * id
1023
- */
1024
- id: string
1025
- }
1026
-
1027
- interface IYapiPostSdkSendMessageApiResponse {
1028
- code: string
1029
- message: string
1030
- data: YapiPostSdkSendMessageMessage
1031
- }
1032
-
1033
- interface IYapiPostSdkQueryHistoryMessageApiRequest {
1034
-
1035
- conversationID: string
1036
-
1037
- conversationType: string
1038
- config: IYapiPostSdkQueryHistoryMessageApiRequestConfig
1039
- }
1040
- interface IYapiPostSdkQueryHistoryMessageApiRequestConfig {
1041
- nextMessage?: IYapiPostSdkQueryHistoryMessageApiRequestNextMessageConfig
1042
-
1043
- count: string
1044
-
1045
- reverse?: boolean
1046
- }
1047
-
1048
- interface IYapiPostSdkQueryHistoryMessageApiRequestNextMessageConfig {
1049
-
1050
- type: string
1051
-
1052
- messageID: string
1053
- }
1054
1336
 
1055
-
1056
- interface IYapiPostSdkQueryHistoryMessageApiResponse {
1337
+ interface IYapiPostSdkDeleteConversationApiResponse {
1057
1338
  code: string
1058
1339
  message: string
1059
- data: IYapiPostSdkQueryHistoryMessageData
1340
+ data: IYapiPostSdkDeleteConversationListData[]
1060
1341
  }
1061
- interface IYapiPostSdkQueryHistoryMessageData {
1062
- messageList: YapiPostSdkQueryHistoryMessageListMessageListData[]
1342
+ interface IYapiPostSdkDeleteConversationListData {
1063
1343
 
1064
1344
  conversationID: string
1065
1345
 
1066
1346
  conversationType: string
1067
- }
1068
- interface YapiPostSdkQueryHistoryMessageListMessageListData {
1069
- /**
1070
- * 消息类型。
1071
- */
1072
- type: string
1073
- /**
1074
- * 消息的唯一 ID
1075
- */
1076
- messageID: string
1077
- /**
1078
- * 消息的发送时间。
1079
- */
1080
- timestamp: number
1081
- /**
1082
- * 消息发送者的 userID。
1083
- */
1084
- senderUserID: string
1085
- /**
1086
- * 会话的 ID,相同会话类型下的 ID 是唯一的。
1087
- */
1088
- conversationID: string
1089
- /**
1090
- * 用于描述消息的方向是发送还是接收。0 消息已发送。1 消息已接受。
1091
- */
1092
- direction: number
1093
- /**
1094
- * 描述消息的发送状态。消息发送中。1 消息发送成功。2 消息发送失败。
1095
- */
1096
- sentStatus: number
1097
- /**
1098
- * 该消息所属会话的类型。
1099
- */
1100
- conversationType: number
1101
- /**
1102
- * 表示该消息在会话中的序号。
1103
- */
1104
- conversationSeq: string
1105
- /**
1106
- * orderKey 越大消息越新,可用于消息排序。
1107
- */
1108
- orderKey: string
1109
- /**
1110
- * 描述该消息的回执状态。0 不是回执。1 回执进行中。2 回执已完成。3 回执已过期。4 回执已失败。
1111
- */
1112
- receiptStatus: number
1113
- /**
1114
- * 该消息是否是全员推送消息。
1115
- */
1116
- isBroadcastMessage: string
1117
- /**
1118
- * 是否需要提醒所有人。业务表现可为“@所有人”。
1119
- */
1120
- isMentionAll: boolean
1121
- /**
1122
- * 提醒一批相关的用户。业务表现可为“@某用户”。
1123
- */
1124
- mentionedUserIDs: string[]
1125
- /**
1126
- * 本条消息最新的编辑者的 userID。
1127
- */
1128
- editorUserID: string
1129
- /**
1130
- * 本条消息最新的编辑时间戳。
1131
- */
1132
- editedTime: string
1133
- /**
1134
- * 该消息最后一次置顶的置顶时间。
1135
- */
1136
- pinnedTime: string
1137
- /**
1138
- * 该消息的最后一次置顶的置顶者。
1139
- */
1140
- pinnedUserID: string
1141
- /**
1142
- * 消息记录
1143
- */
1144
- message: string
1145
- /**
1146
- * 文件下载地址 (多媒体消息会有记录)
1147
- */
1148
- fileDownloadUrl: string
1149
- /**
1150
- * 如果是视频/语音,时长(多媒体消息会有记录)
1151
- */
1152
- duration: string
1153
- /**
1154
- * 文件名字 (多媒体消息会有记录)
1155
- */
1156
- fileName: string
1157
- /**
1158
- * 缩略图 (多媒体消息会有记录)
1159
- */
1160
- thumbnailDownloadUrl: string
1161
- /**
1162
- * 缩略图宽度 (多媒体消息会有记录)
1163
- */
1164
- thumbnailWidth: string
1165
- /**
1166
- * 缩略图高度 (多媒体消息会有记录)
1167
- */
1168
- thumbnailHeight: string
1169
1347
  }
1170
1348
 
1171
- interface IYapiPostSdkDeleteAllConversationMessagesApiResponse {
1349
+ interface IConversation {
1350
+ conversationID?: string;
1351
+ conversationName?: string;
1352
+ type?: number;
1353
+ unreadMessageCount?: number;
1354
+ notificationStatus?: number;
1355
+ isPinned?: boolean;
1356
+ }
1357
+ interface ApiResponse {
1358
+ code: string;
1359
+ message: string;
1360
+ data: string;
1361
+ }
1362
+ interface ConversationQueryParams {
1363
+ count: number;
1364
+ nextConversation?: IConversation | null;
1365
+ conversationName?: string;
1366
+ }
1367
+ interface MentionedInfoList {
1368
+ messageID: string;
1369
+ fromUserID: string;
1370
+ type: string;
1371
+ messageSeq: number;
1372
+ }
1373
+ interface LastMessageData {
1374
+ /**
1375
+ * 标识这条消息的唯一 ID。
1376
+ */
1377
+ msgId: string;
1378
+ /**
1379
+ * 1:普通文本消息
1380
+ * 2:自定义二进制消息,可用于传递自定义的二进制消息。该消息类型不支持离线消息和本地存储。
1381
+ * 0:未知类型
1382
+ * 20:弹幕消息,可用于直播间发送的弹幕
1383
+ * 11:图片消息,可用于发送图片消息,仅支持 .jpg, .jpeg, .png, .bmp, .gif, .tiff 图片类型
1384
+ * 12:文件消息
1385
+ * 13:音频消息
1386
+ * 14:视频消息
1387
+ * 30:系统消息
1388
+ * 31:系统消息
1389
+ * 100:合并消息
1390
+ * 200:自定义消息
1391
+ * 32:Tips 消息
1392
+ * 10:组合消息,可用于发送文本、富媒体文件、自定义消息的组合消息。
1393
+ *
1394
+ */
1395
+ type: string;
1396
+ /**
1397
+ * * 详情描述:标识一条消息的发送时间。
1398
+ */
1399
+ timestamp: number;
1400
+ /**
1401
+ * 展示本条消息发送者的 userID
1402
+ */
1403
+ fromUserId: string;
1404
+ /**
1405
+ * 会话 id
1406
+ */
1407
+ conversationID: string;
1408
+ /**
1409
+ * 0-发送,1-接收
1410
+ */
1411
+ direction: number;
1412
+ /**
1413
+ * 0-发送中,1-发送成功,2-发送失败
1414
+ */
1415
+ sentStatus: number;
1416
+ /**
1417
+ * 0 单聊会话 1 房间会话 2 群聊会话 3 未知
1418
+ */
1419
+ conversationType: number;
1420
+ /**
1421
+ * orderKey 越大消息越新,可用于消息排序。
1422
+ */
1423
+ orderKey: number;
1424
+ /**
1425
+ * SDK 本地生成的 MessageID,开发者无需关注。
1426
+ */
1427
+ localMessageID: string;
1428
+ /**
1429
+ * 预发 id
1430
+ */
1431
+ clientBizId: string;
1432
+ /**
1433
+ * 0-不是回执。,1-回执进行中。2-回执已完成。3-回执已过期。3-回执已失败。
1434
+ */
1435
+ receiptStatus: number;
1436
+ /**
1437
+ * 消息拓展字段。
1438
+ */
1439
+ extendedData: string;
1440
+ /**
1441
+ * 该消息是否是全员推送消息。
1442
+ */
1443
+ isBroadcastMessage: boolean;
1444
+ /**
1445
+ * 是否需要提醒所有人。业务表现可为“@所有人”。
1446
+ */
1447
+ isMentionAll: boolean;
1448
+ /**
1449
+ * 提醒一批相关的用户。业务表现可为“@某用户” 。
1450
+ */
1451
+ mentionedUserIDs: string[];
1452
+ /**
1453
+ * 回复消息树对应的根消息的回复消息数量。
1454
+ */
1455
+ rootRepliedCount: number;
1456
+ /**
1457
+ * 回复消息引用的源消息的信息。
1458
+ */
1459
+ repliedInfo: string;
1460
+ /**
1461
+ * 该消息的最后一次置顶的置顶者。
1462
+ */
1463
+ pinnedUserID: string;
1464
+ /**
1465
+ * 该消息最后一次置顶的置顶时间。
1466
+ */
1467
+ pinnedTime: number;
1468
+ /**
1469
+ * 消息内容
1470
+ */
1471
+ message: string;
1472
+ }
1473
+ interface ConversationItem {
1474
+ conversationID: string;
1475
+ conversationName: string;
1476
+ type: number;
1477
+ unreadMessageCount: number;
1478
+ lastMessage: LastMessageData;
1479
+ orderKey: number;
1480
+ notificationStatus: string;
1481
+ conversationAvatarUrl: string;
1482
+ isPinned: boolean;
1483
+ mentionedInfoList: MentionedInfoList[];
1484
+ conversationAlias: string;
1485
+ draft: string;
1486
+ }
1487
+
1488
+ type ZIMSdkRecord<T = unknown> = Record<string, T>;
1489
+ interface ZIMSdkExtendable {
1490
+ [key: string]: unknown;
1491
+ }
1492
+ interface ZIMErrorUserInfo extends ZIMSdkExtendable {
1493
+ userID: string;
1494
+ reason: number;
1495
+ }
1496
+
1497
+ /**
1498
+ * 消息查询结果排序方式。
1499
+ */
1500
+ declare enum ZIMMessageOrder {
1501
+ Descending = 0,
1502
+ Ascending = 1
1503
+ }
1504
+ interface ZIMSdkMessage extends ZIMSdkExtendable {
1505
+ type: ZIMMessageType$1 | number | string;
1506
+ message?: string | Uint8Array;
1507
+ messageID?: string;
1508
+ localMessageID?: string;
1509
+ /** Pre-send identifier shared by the attachment callback, request and send result. */
1510
+ clientBizId?: string;
1511
+ messageSeq?: number | string;
1512
+ senderUserID?: string;
1513
+ conversationID?: string;
1514
+ conversationType?: ZIMConversationType$1;
1515
+ timestamp?: number;
1516
+ orderKey?: number | string;
1517
+ /** 0 发送中,1 发送成功,2 发送失败。 */
1518
+ sendState?: 0 | 1 | 2;
1519
+ sentStatus?: number | string;
1520
+ extendedData?: string;
1521
+ localExtendedData?: string;
1522
+ mentionedUserIDs?: string[];
1523
+ isMentionAll?: boolean;
1524
+ repliedInfo?: ZIMSdkRecord;
1525
+ rootRepliedCount?: number;
1526
+ }
1527
+ /**
1528
+ * 本地消息搜索配置。
1529
+ */
1530
+ interface ZIMMessageSearchConfig extends ZIMSdkExtendable {
1531
+ /**
1532
+ * 分页锚点。首次搜索不传,后续传入上一次结果的最后一条消息。
1533
+ */
1534
+ nextMessage?: ZIMSdkMessage | null;
1535
+ /**
1536
+ * 每页消息数量,ZEGO 建议小于 20。
1537
+ */
1538
+ count: number;
1539
+ /**
1540
+ * 消息排序方式,默认 Descending。
1541
+ */
1542
+ order?: ZIMMessageOrder;
1543
+ /**
1544
+ * 搜索关键字,最多 5 个,多个关键字需要同时匹配。
1545
+ */
1546
+ keywords?: string[];
1547
+ /**
1548
+ * 消息类型筛选。
1549
+ */
1550
+ messageTypes?: ZIMMessageType$1[];
1551
+ /**
1552
+ * 自定义消息子类型,取值范围 0-200。
1553
+ */
1554
+ subMessageTypes?: number[];
1555
+ /**
1556
+ * 消息发送者筛选,最多 5 个用户 ID。
1557
+ */
1558
+ senderUserIDs?: string[];
1559
+ /**
1560
+ * 搜索起始时间,UTC 毫秒时间戳。
1561
+ */
1562
+ startTime?: number;
1563
+ /**
1564
+ * 搜索结束时间,UTC 毫秒时间戳,必须大于 startTime。
1565
+ */
1566
+ endTime?: number;
1567
+ }
1568
+ /**
1569
+ * 本地消息搜索结果。
1570
+ */
1571
+ interface ZIMMessagesSearchedResult extends ZIMSdkExtendable {
1572
+ messageList: ZIMSdkMessage[];
1573
+ conversationID: string;
1574
+ conversationType: ZIMConversationType$1;
1575
+ nextMessage?: ZIMSdkMessage;
1576
+ }
1577
+ interface ZIMCombineMessage extends ZIMSdkMessage {
1578
+ title: string;
1579
+ summary: string;
1580
+ combineID?: string;
1581
+ messageList: ZIMSdkMessage[];
1582
+ }
1583
+ /**
1584
+ * 合并消息详情查询参数。
1585
+ */
1586
+ interface ZIMCombineMessageDetailQueryConfig extends ZIMSdkExtendable {
1587
+ combineID: string;
1588
+ }
1589
+ interface ZIMMessageEditConfig extends ZIMSdkExtendable {
1590
+ }
1591
+ interface ZIMMessageRepliedListQueryConfig extends ZIMSdkExtendable {
1592
+ nextFlag: number;
1593
+ count: number;
1594
+ }
1595
+ interface ZIMMessageRootRepliedInfo extends ZIMSdkExtendable {
1596
+ state: number;
1597
+ message?: ZIMSdkMessage;
1598
+ senderUserID: string;
1599
+ sentTime: number;
1600
+ repliedCount: number;
1601
+ }
1602
+ interface ZIMMessageEditedResult extends ZIMSdkExtendable {
1603
+ message: ZIMSdkMessage;
1604
+ }
1605
+ interface ZIMMessageRepliedListQueriedResult extends ZIMSdkExtendable {
1606
+ messageList: ZIMSdkMessage[];
1607
+ nextFlag: number;
1608
+ rootRepliedInfo: ZIMMessageRootRepliedInfo;
1609
+ }
1610
+ interface ZIMCombineMessageDetailQueriedResult extends ZIMSdkExtendable {
1611
+ message: ZIMCombineMessage;
1612
+ }
1613
+ interface ZIMReplyMessageSentResult extends ZIMSdkExtendable {
1614
+ message: ZIMSdkMessage;
1615
+ }
1616
+
1617
+ declare enum ZIMConversationNotificationStatus$1 {
1618
+ Notify = 1,
1619
+ DoNotDisturb = 2
1620
+ }
1621
+ declare enum ZIMConversationPinnedFilter {
1622
+ All = 0,
1623
+ OnlyPinned = 1,
1624
+ OnlyUnpinned = 2
1625
+ }
1626
+ interface ZIMConversation$1 extends ZIMSdkExtendable {
1627
+ conversationID: string;
1628
+ type: ZIMConversationType$1;
1629
+ conversationName: string;
1630
+ conversationAvatarUrl: string;
1631
+ conversationAlias: string;
1632
+ notificationStatus: ZIMConversationNotificationStatus$1;
1633
+ unreadMessageCount: number;
1634
+ lastMessage?: ZIMSdkMessage;
1635
+ orderKey: number;
1636
+ isPinned: boolean;
1637
+ pinnedTime: number;
1638
+ mentionedInfoList: ZIMSdkRecord[];
1639
+ draft: string;
1640
+ marks: number[];
1641
+ readMessageSeq: number;
1642
+ isConversationDisabled: boolean;
1643
+ selfMutedExpiredTime: number;
1644
+ messageDestructDuration: number;
1645
+ }
1646
+ interface ZIMConversationQueryConfig extends ZIMSdkExtendable {
1647
+ nextConversation?: ZIMConversation$1;
1648
+ count: number;
1649
+ }
1650
+ /**
1651
+ * 查询单个会话结果。
1652
+ */
1653
+ interface ZIMConversationQueriedResult extends ZIMSdkExtendable {
1654
+ conversation: ZIMConversation$1;
1655
+ }
1656
+ interface ZIMConversationTotalUnreadMessageCountQueryConfig extends ZIMSdkExtendable {
1657
+ conversationTypes?: ZIMConversationType$1[];
1658
+ marks?: number[];
1659
+ }
1660
+ interface ZIMConversationPinnedListQueriedResult extends ZIMSdkExtendable {
1661
+ conversationList: ZIMConversation$1[];
1662
+ }
1663
+ interface ZIMConversationTotalUnreadMessageCountQueriedResult extends ZIMSdkExtendable {
1664
+ unreadMessageCount: number;
1665
+ }
1666
+ interface ZIMConversationPinnedStateUpdatedResult extends ZIMSdkExtendable {
1667
+ conversationID: string;
1668
+ conversationType: ZIMConversationType$1;
1669
+ }
1670
+ interface ZIMConversationNotificationStatusSetResult extends ZIMSdkExtendable {
1671
+ conversationID: string;
1672
+ conversationType: ZIMConversationType$1;
1673
+ }
1674
+
1675
+ /** 请求接口房间流类型 */
1676
+ declare enum RoomFlowType {
1677
+ /** 音频 */
1678
+ Audio = 1,
1679
+ /** 视频 */
1680
+ Video = 2
1681
+ }
1682
+ declare enum MessageRepliedInfoState {
1683
+ Normal = 0,
1684
+ Deleted = 1,
1685
+ NotFound = 2
1686
+ }
1687
+ declare enum ZIMConversationEvent {
1688
+ Added = 0,
1689
+ Updated = 1,
1690
+ Disabled = 2,
1691
+ Deleted = 3
1692
+ }
1693
+ declare enum ZIMConversationType {
1694
+ Unknown = -1,
1695
+ Peer = 0,
1696
+ Room = 1,
1697
+ Group = 2
1698
+ }
1699
+ declare enum ZIMMessageDirection {
1700
+ Send = 0,
1701
+ Receive = 1
1702
+ }
1703
+ declare enum ZIMMessageMentionedType {
1704
+ MentionMe = 1,
1705
+ MentionAll = 2,
1706
+ MentionAllAndMe = 3
1707
+ }
1708
+ interface ZIMConversationChangeInfo {
1709
+ event: ZIMConversationEvent;
1710
+ conversation: ZIMConversation;
1711
+ }
1712
+ declare enum ZIMMessageType {
1713
+ Unknown = 0,
1714
+ Text = 1,
1715
+ Command = 2,
1716
+ Link = 3,
1717
+ Image = 11,
1718
+ File = 12,
1719
+ Audio = 13,
1720
+ Video = 14,
1721
+ Barrage = 20,
1722
+ System = 30,
1723
+ Revoke = 31,
1724
+ Combine = 100,
1725
+ Custom = 200
1726
+ }
1727
+ declare enum MessageType {
1728
+ Unknown = 0,
1729
+ Command = 2,
1730
+ Barrage = 20,
1731
+ Text = 1,
1732
+ Image = 11,
1733
+ File = 12,
1734
+ Audio = 13,
1735
+ Video = 14,
1736
+ System = 30,
1737
+ Revoke = 31,
1738
+ Tips = 32,
1739
+ Combine = 100,
1740
+ Custom = 200
1741
+ }
1742
+ interface ZIMMessageBase {
1743
+ type: ZIMMessageType;
1744
+ message: string | Uint8Array;
1745
+ extendedData?: string;
1746
+ revokeExtendedData?: string;
1747
+ localExtendedData?: string;
1748
+ mentionedUserIDs?: string[];
1749
+ isMentionAll?: boolean;
1750
+ }
1751
+ declare enum ZIMConversationNotificationStatus {
1752
+ Notify = 1,
1753
+ DoNotDisturb = 2
1754
+ }
1755
+ interface ZIMConversation {
1756
+ conversationID: string;
1757
+ conversationName: string;
1758
+ conversationAlias: string;
1759
+ conversationAvatarUrl: string;
1760
+ type: ZIMConversationType;
1761
+ unreadMessageCount: number;
1762
+ orderKey: number;
1763
+ notificationStatus: ZIMConversationNotificationStatus;
1764
+ isPinned: boolean;
1765
+ draft: string;
1766
+ lastMessage?: ZIMMessage;
1767
+ mentionedInfoList?: ZIMMessageMentionedInfo[];
1768
+ callType?: RoomFlowType;
1769
+ groupType?: ZIMConversationType;
1770
+ friendRemark?: string;
1771
+ }
1772
+ interface ZIMMessageMentionedInfo {
1773
+ type: ZIMMessageMentionedType;
1774
+ fromUserID: string;
1775
+ messageID: string;
1776
+ }
1777
+ declare enum ZIMMessageSentStatus {
1778
+ Sending = 0,
1779
+ Success = 1,
1780
+ Failed = 2
1781
+ }
1782
+ declare enum ZIMMessageReceiptStatus {
1783
+ None = 0,
1784
+ Processing = 1,
1785
+ Done = 2,
1786
+ Expired = 3,
1787
+ Failed = 4
1788
+ }
1789
+ interface ZIMMessageReactionUserInfo {
1790
+ userID: string;
1791
+ }
1792
+ interface ZIMMessageReaction {
1793
+ conversationID: string;
1794
+ conversationType: ZIMConversationType;
1795
+ messageID: string;
1796
+ reactionType: string;
1797
+ isSelfIncluded: boolean;
1798
+ totalCount: number;
1799
+ userList: ZIMMessageReactionUserInfo[];
1800
+ }
1801
+ interface ZIMMessageLiteInfo {
1802
+ type: MessageType;
1803
+ message?: string;
1804
+ fileName?: string;
1805
+ subType?: number;
1806
+ }
1807
+ interface ZIMMessageRepliedInfo {
1808
+ state: MessageRepliedInfoState;
1809
+ messageSeq: number;
1810
+ messageID: string;
1811
+ senderUserID: string;
1812
+ sentTime: number;
1813
+ messageInfo: ZIMMessageLiteInfo;
1814
+ rootMessageSeq: number;
1815
+ rootMessageID: string;
1816
+ }
1817
+ interface ZIMMessage extends ZIMMessageBase {
1818
+ fileLocalPath: File;
1819
+ localMessageID: string;
1820
+ clientBizId: string;
1821
+ messageID: string;
1822
+ senderUserID: string;
1823
+ timestamp: number;
1824
+ conversationID: string;
1825
+ conversationType: ZIMConversationType;
1826
+ direction: ZIMMessageDirection;
1827
+ sentStatus: ZIMMessageSentStatus;
1828
+ orderKey: number;
1829
+ subType: number;
1830
+ conversationSeq: number;
1831
+ isUserInserted: boolean;
1832
+ isBroadcastMessage: boolean;
1833
+ isServerMessage: boolean;
1834
+ receiptStatus: ZIMMessageReceiptStatus;
1835
+ reactions: ZIMMessageReaction[];
1836
+ repliedInfo?: ZIMMessageRepliedInfo;
1837
+ }
1838
+
1839
+ declare enum ZIMCallType {
1840
+ Audio = "audio",
1841
+ Video = "video"
1842
+ }
1843
+ declare enum ZIMCallMode {
1844
+ OneOnOne = "one_on_one",
1845
+ Group = "group"
1846
+ }
1847
+ /** Socket.IO 通话协议使用的会话类型:0=单聊,1=群聊。 */
1848
+ declare enum ZIMCallConversationType {
1849
+ Peer = 0,
1850
+ Group = 1
1851
+ }
1852
+ declare enum ZIMCallAction {
1853
+ Invite = "invite",
1854
+ Accept = "accept",
1855
+ Reject = "reject",
1856
+ Cancel = "cancel",
1857
+ Hangup = "hangup",
1858
+ Timeout = "timeout",
1859
+ MemberJoined = "member_joined",
1860
+ MemberLeft = "member_left",
1861
+ MediaStateChanged = "media_state_changed"
1862
+ }
1863
+ declare enum ZIMCallEventEnum {
1864
+ CallInvitationReceived = "callInvitationReceived",
1865
+ CallAccepted = "callAccepted",
1866
+ CallRejected = "callRejected",
1867
+ CallCanceled = "callCanceled",
1868
+ CallEnded = "callEnded",
1869
+ CallTimeout = "callTimeout",
1870
+ CallParticipantJoined = "callParticipantJoined",
1871
+ CallParticipantLeft = "callParticipantLeft",
1872
+ CallMediaStateChanged = "callMediaStateChanged",
1873
+ CallConnectionStateChanged = "callConnectionStateChanged",
1874
+ CallMediaTrackSubscribed = "callMediaTrackSubscribed",
1875
+ CallMediaTrackUnsubscribed = "callMediaTrackUnsubscribed"
1876
+ }
1877
+ declare const ZIM_LOCAL_CALL_EVENTS: Set<string>;
1878
+ interface ZIMCallUserInfo {
1879
+ userID: string;
1880
+ userName?: string;
1881
+ userAvatarUrl?: string;
1882
+ status?: string;
1883
+ role?: string;
1884
+ joinTime?: number;
1885
+ }
1886
+ interface ZIMCallInviteConfig {
1887
+ conversationID: string;
1888
+ /** 推荐使用 ZIMCallConversationType;ZIMConversationType.Group=2 会兼容转换为 1。 */
1889
+ conversationType: ZIMCallConversationType | ZIMConversationType$1;
1890
+ invitees: string[];
1891
+ callType: ZIMCallType | `${ZIMCallType}`;
1892
+ mode?: ZIMCallMode | `${ZIMCallMode}`;
1893
+ timeout?: number;
1894
+ extendedData?: string;
1895
+ }
1896
+ interface ZIMCallBaseParams {
1897
+ callID: string;
1898
+ extendedData?: string;
1899
+ }
1900
+ interface ZIMCallInviteMembersParams extends ZIMCallBaseParams {
1901
+ invitees: string[];
1902
+ }
1903
+ interface ZIMCallTokenParams extends ZIMCallBaseParams {
1904
+ roomName?: string;
1905
+ }
1906
+ interface ZIMCallLiveKitTokenInfo {
1907
+ token: string;
1908
+ livekitUrl?: string;
1909
+ liveKitUrl?: string;
1910
+ roomName?: string;
1911
+ participantName?: string;
1912
+ participantID?: string;
1913
+ }
1914
+ interface ZIMCallInviteResult {
1915
+ callID: string;
1916
+ roomName?: string;
1917
+ conversationID: string;
1918
+ conversationType: ZIMCallConversationType;
1919
+ callType: ZIMCallType | `${ZIMCallType}`;
1920
+ mode: ZIMCallMode | `${ZIMCallMode}`;
1921
+ invitees: string[];
1922
+ liveKit?: ZIMCallLiveKitTokenInfo;
1923
+ }
1924
+ interface ZIMCallActionResult {
1925
+ callID: string;
1926
+ roomName?: string;
1927
+ liveKit?: ZIMCallLiveKitTokenInfo;
1928
+ }
1929
+ interface ZIMCallMemberListResult {
1930
+ callID: string;
1931
+ members: ZIMCallUserInfo[];
1932
+ }
1933
+ interface ZIMCallHasOngoingCallParams {
1934
+ /** 群组ID */
1935
+ groupId: string;
1936
+ }
1937
+ interface ZIMCallHasOngoingCallResult {
1938
+ /** true,有,false,没有 */
1939
+ hasOngoingCall: boolean;
1940
+ /** 当 hasOngoingCall=true 时有值 */
1941
+ roomId: string;
1942
+ /** 通话人数 */
1943
+ roomNumber: number;
1944
+ /** 房间流类型,1,音频,2,视频 */
1945
+ roomFlowType: number;
1946
+ }
1947
+ interface ZIMCallJoinMediaConfig extends ZIMCallTokenParams {
1948
+ liveKit?: ZIMCallLiveKitTokenInfo;
1949
+ livekitUrl?: string;
1950
+ liveKitUrl?: string;
1951
+ token?: string;
1952
+ audio?: boolean;
1953
+ video?: boolean;
1954
+ }
1955
+ interface ZIMCallJoinedResult {
1956
+ callID: string;
1957
+ room: Room;
1958
+ localTracks: LocalTrack[];
1959
+ }
1960
+ interface ZIMCallRemoteTrackInfo {
1961
+ track: RemoteTrack;
1962
+ publication: RemoteTrackPublication;
1963
+ participantID: string;
1964
+ participantName?: string;
1965
+ }
1966
+ interface ZIMCallLocalTrackInfo {
1967
+ track: LocalTrack;
1968
+ publication?: TrackPublication;
1969
+ }
1970
+ interface ZIMCallScreenShareResult {
1971
+ tracks: LocalTrack[];
1972
+ }
1973
+ interface ZIMCallMediaState {
1974
+ microphoneEnabled: boolean;
1975
+ cameraEnabled: boolean;
1976
+ screenShareEnabled: boolean;
1977
+ }
1978
+ type ZIMCallEventPayload = ZIMCallActionResult | ZIMCallRemoteTrackInfo | ZIMCallMediaState | {
1979
+ state: string;
1980
+ };
1981
+
1982
+ declare enum ZIMUserRelationType {
1983
+ Unknown = -1,
1984
+ None = 0,
1985
+ Friend = 1
1986
+ }
1987
+ /**
1988
+ * 用户在线状态。
1989
+ */
1990
+ declare enum ZIMUserOnlineStatus {
1991
+ Online = 0,
1992
+ Offline = 1,
1993
+ Logout = 2,
1994
+ Unknown = 99
1995
+ }
1996
+ interface ZIMUserInfo extends ZIMSdkExtendable {
1997
+ userID: string;
1998
+ userName: string;
1999
+ userAvatarUrl: string;
2000
+ userExtendedData?: string;
2001
+ type?: number;
2002
+ }
2003
+ interface ZIMUserFullInfo extends ZIMSdkExtendable {
2004
+ baseInfo: ZIMUserInfo;
2005
+ }
2006
+ interface ZIMUserOfflinePushRule extends ZIMSdkExtendable {
2007
+ onlinePlatforms: number[];
2008
+ notToReceiveOfflinePushPlatforms: number[];
2009
+ }
2010
+ interface ZIMUserRule extends ZIMSdkExtendable {
2011
+ offlinePushRule: ZIMUserOfflinePushRule;
2012
+ }
2013
+ interface ZIMUserStatus extends ZIMSdkExtendable {
2014
+ userID: string;
2015
+ onlineStatus: number;
2016
+ onlinePlatforms: number[];
2017
+ customStatus: string;
2018
+ customStatusExpiredTime: number;
2019
+ lastUpdateTime: number;
2020
+ lastOnlineStatusUpdateTime: number;
2021
+ lastCustomStatusUpdateTime: number;
2022
+ }
2023
+ interface ZIMSelfUserInfo extends ZIMSdkExtendable {
2024
+ userFullInfo: ZIMUserFullInfo;
2025
+ userRule: ZIMUserRule;
2026
+ userStatus: ZIMUserStatus;
2027
+ }
2028
+ interface ZIMUsersInfoQueryConfig extends ZIMSdkExtendable {
2029
+ isQueryFromServer?: boolean;
2030
+ }
2031
+ interface ZIMUserNameUpdatedResult extends ZIMSdkExtendable {
2032
+ userName: string;
2033
+ }
2034
+ interface ZIMUserAvatarUrlUpdatedResult extends ZIMSdkExtendable {
2035
+ userAvatarUrl: string;
2036
+ }
2037
+ interface ZIMUsersInfoQueriedResult extends ZIMSdkExtendable {
2038
+ userList: ZIMUserFullInfo[];
2039
+ errorUserList: ZIMErrorUserInfo[];
2040
+ }
2041
+ /**
2042
+ * 批量查询用户在线状态结果。
2043
+ */
2044
+ interface ZIMUsersStatusQueriedResult extends ZIMSdkExtendable {
2045
+ userStatusList: ZIMUserStatus[];
2046
+ errorUserList: ZIMErrorUserInfo[];
2047
+ }
2048
+ /**
2049
+ * 用户状态订阅配置。
2050
+ */
2051
+ interface ZIMUserStatusSubscribeConfig extends ZIMSdkExtendable {
2052
+ /** 订阅有效时长,单位为秒。 */
2053
+ subscriptionDuration: number;
2054
+ }
2055
+ /**
2056
+ * 批量订阅用户状态结果。
2057
+ */
2058
+ interface ZIMUsersStatusSubscribedResult extends ZIMSdkExtendable {
2059
+ /** 订阅失败的用户及失败原因;空数组表示全部订阅成功。 */
2060
+ errorUserList: ZIMErrorUserInfo[];
2061
+ }
2062
+ /**
2063
+ * 批量解除用户状态订阅结果。
2064
+ */
2065
+ interface ZIMUsersStatusUnsubscribedResult extends ZIMSdkExtendable {
2066
+ /** 解除订阅失败的用户及失败原因;空数组表示全部解除成功。 */
2067
+ errorUserList: ZIMErrorUserInfo[];
2068
+ }
2069
+ interface ZIMSelfUserInfoQueriedResult extends ZIMSdkExtendable {
2070
+ selfUserInfo: ZIMSelfUserInfo;
2071
+ }
2072
+ interface ZIMTokenRenewedResult extends ZIMSdkExtendable {
2073
+ token: string;
2074
+ }
2075
+
2076
+ interface ZIMBlacklistQueryConfig extends ZIMSdkExtendable {
2077
+ nextFlag?: number;
2078
+ count: number;
2079
+ }
2080
+ interface ZIMBlacklistUsersAddedResult extends ZIMSdkExtendable {
2081
+ errorUserList: ZIMErrorUserInfo[];
2082
+ }
2083
+ interface ZIMBlacklistUsersRemovedResult extends ZIMSdkExtendable {
2084
+ errorUserList: ZIMErrorUserInfo[];
2085
+ }
2086
+ interface ZIMBlacklistQueriedResult extends ZIMSdkExtendable {
2087
+ blacklist: ZIMUserInfo[];
2088
+ nextFlag: number;
2089
+ }
2090
+ interface ZIMBlacklistCheckedResult extends ZIMSdkExtendable {
2091
+ isUserInBlacklist: boolean;
2092
+ }
2093
+
2094
+ declare enum ZIMFriendApplicationType {
2095
+ Unknown = -1,
2096
+ None = 0,
2097
+ Received = 1,
2098
+ Sent = 2,
2099
+ Both = 3
2100
+ }
2101
+ declare enum ZIMFriendApplicationState {
2102
+ Unknown = -1,
2103
+ Waiting = 1,
2104
+ Accepted = 2,
2105
+ Rejected = 3,
2106
+ Expired = 4,
2107
+ Disabled = 5
2108
+ }
2109
+ declare enum ZIMFriendDeleteType {
2110
+ Both = 0,
2111
+ Single = 1
2112
+ }
2113
+ interface ZIMFriendAttributeMap extends Map<string, string> {
2114
+ }
2115
+ type ZIMFriendAttributes = ZIMSdkRecord<string> | ZIMFriendAttributeMap;
2116
+ interface ZIMFriendDeleteConfig extends ZIMSdkExtendable {
2117
+ type: ZIMFriendDeleteType;
2118
+ }
2119
+ interface ZIMFriendListQueryConfig extends ZIMSdkExtendable {
2120
+ nextFlag?: number;
2121
+ count: number;
2122
+ }
2123
+ interface ZIMFriendInfo extends ZIMUserInfo {
2124
+ friendAlias: string;
2125
+ friendAttributes: ZIMSdkRecord<string>;
2126
+ createTime: number;
2127
+ wording: string;
2128
+ }
2129
+ interface ZIMFriendApplicationSendConfig extends ZIMSdkExtendable {
2130
+ wording: string;
2131
+ friendAlias?: string;
2132
+ friendAttributes?: ZIMFriendAttributes;
2133
+ pushConfig?: ZIMSdkRecord;
2134
+ }
2135
+ interface ZIMFriendApplicationAcceptConfig extends ZIMSdkExtendable {
2136
+ friendAlias?: string;
2137
+ friendAttributes?: ZIMFriendAttributes;
2138
+ pushConfig?: ZIMSdkRecord;
2139
+ }
2140
+ interface ZIMFriendApplicationRejectConfig extends ZIMSdkExtendable {
2141
+ pushConfig?: ZIMSdkRecord;
2142
+ }
2143
+ interface ZIMFriendApplicationListQueryConfig extends ZIMSdkExtendable {
2144
+ nextFlag?: number;
2145
+ count: number;
2146
+ }
2147
+ interface ZIMFriendApplicationInfo extends ZIMSdkExtendable {
2148
+ type: ZIMFriendApplicationType;
2149
+ state: ZIMFriendApplicationState;
2150
+ applyUser: ZIMUserInfo;
2151
+ wording: string;
2152
+ createTime: number;
2153
+ updateTime: number;
2154
+ }
2155
+ interface ZIMFriendRelationInfo extends ZIMSdkExtendable {
2156
+ type: ZIMUserRelationType | number;
2157
+ userID: string;
2158
+ }
2159
+ interface ZIMFriendApplicationSentResult extends ZIMSdkExtendable {
2160
+ applicationInfo: ZIMFriendApplicationInfo;
2161
+ }
2162
+ interface ZIMFriendsDeletedResult extends ZIMSdkExtendable {
2163
+ errorUserList: ZIMErrorUserInfo[];
2164
+ }
2165
+ interface ZIMFriendAliasUpdatedResult extends ZIMSdkExtendable {
2166
+ friendInfo: ZIMFriendInfo;
2167
+ }
2168
+ interface ZIMFriendApplicationListQueriedResult extends ZIMSdkExtendable {
2169
+ applicationList: ZIMFriendApplicationInfo[];
2170
+ nextFlag: number;
2171
+ }
2172
+ interface ZIMFriendApplicationAcceptedResult extends ZIMSdkExtendable {
2173
+ friendInfo: ZIMFriendInfo;
2174
+ }
2175
+ interface ZIMFriendApplicationRejectedResult extends ZIMSdkExtendable {
2176
+ userInfo: ZIMUserInfo;
2177
+ }
2178
+ interface ZIMFriendListQueriedResult extends ZIMSdkExtendable {
2179
+ friendList: ZIMFriendInfo[];
2180
+ nextFlag: number;
2181
+ }
2182
+ interface ZIMFriendsInfoQueriedResult extends ZIMSdkExtendable {
2183
+ friendInfos: ZIMFriendInfo[];
2184
+ errorUserList: ZIMErrorUserInfo[];
2185
+ }
2186
+
2187
+ declare enum ZIMGroupMessageNotificationStatus {
2188
+ Notify = 1,
2189
+ DoNotDisturb = 2
2190
+ }
2191
+ declare enum ZIMGroupMuteMode {
2192
+ None = 0,
2193
+ Normal = 1,
2194
+ All = 2,
2195
+ Custom = 3
2196
+ }
2197
+ declare enum ZIMGroupJoinMode {
2198
+ Any = 0,
2199
+ Auth = 1,
2200
+ Forbid = 2
2201
+ }
2202
+ declare enum ZIMGroupInviteMode {
2203
+ Any = 0,
2204
+ Admin = 1
2205
+ }
2206
+ declare enum ZIMGroupBeInviteMode {
2207
+ None = 0,
2208
+ Auth = 1
2209
+ }
2210
+ declare enum ZIMGroupEnterType {
2211
+ Unknown = 0,
2212
+ Created = 1,
2213
+ JoinApply = 2,
2214
+ Joined = 3,
2215
+ Invited = 4,
2216
+ InviteApply = 5
2217
+ }
2218
+ declare enum ZIMGroupApplicationType {
2219
+ Unknown = -1,
2220
+ None = 0,
2221
+ Join = 1,
2222
+ Invite = 2,
2223
+ BeInvite = 3
2224
+ }
2225
+ declare enum ZIMGroupApplicationState {
2226
+ Unknown = -1,
2227
+ Waiting = 1,
2228
+ Accepted = 2,
2229
+ Rejected = 3,
2230
+ Expired = 4,
2231
+ Disabled = 5
2232
+ }
2233
+ interface ZIMGroupInfo extends ZIMSdkExtendable {
2234
+ groupID: string;
2235
+ groupName: string;
2236
+ groupAvatarUrl: string;
2237
+ }
2238
+ interface ZIMGroupMuteInfo extends ZIMSdkExtendable {
2239
+ mode: ZIMGroupMuteMode;
2240
+ expiredTime: number;
2241
+ roles: number[];
2242
+ }
2243
+ interface ZIMGroupVerifyInfo extends ZIMSdkExtendable {
2244
+ joinMode: ZIMGroupJoinMode;
2245
+ inviteMode: ZIMGroupInviteMode;
2246
+ beInviteMode: ZIMGroupBeInviteMode;
2247
+ }
2248
+ interface ZIMGroupFullInfo extends ZIMSdkExtendable {
2249
+ baseInfo: ZIMGroupInfo;
2250
+ groupNotice: string;
2251
+ groupAttributes: ZIMSdkRecord<string>;
2252
+ groupAlias: string;
2253
+ notificationStatus: ZIMGroupMessageNotificationStatus;
2254
+ mutedInfo: ZIMGroupMuteInfo;
2255
+ createTime: number;
2256
+ maxMemberCount: number;
2257
+ verifyInfo: ZIMGroupVerifyInfo;
2258
+ }
2259
+ interface ZIMGroup extends ZIMSdkExtendable {
2260
+ baseInfo: ZIMGroupInfo;
2261
+ groupAlias: string;
2262
+ notificationStatus: ZIMGroupMessageNotificationStatus;
2263
+ }
2264
+ interface ZIMGroupMemberSimpleInfo extends ZIMUserInfo {
2265
+ memberNickname: string;
2266
+ memberRole: number;
2267
+ }
2268
+ interface ZIMGroupEnterInfo extends ZIMSdkExtendable {
2269
+ enterTime: number;
2270
+ enterType: ZIMGroupEnterType;
2271
+ operatedUser?: ZIMGroupMemberSimpleInfo;
2272
+ }
2273
+ interface ZIMGroupMemberInfo extends ZIMUserInfo {
2274
+ memberNickname: string;
2275
+ memberRole: number;
2276
+ muteExpiredTime: number;
2277
+ groupEnterInfo: ZIMGroupEnterInfo;
2278
+ }
2279
+ interface ZIMGroupMemberQueryConfig extends ZIMSdkExtendable {
2280
+ nextFlag: number;
2281
+ count: number;
2282
+ }
2283
+ interface ZIMGroupAdvancedConfig extends ZIMSdkExtendable {
2284
+ groupNotice?: string;
2285
+ groupAttributes?: ZIMSdkRecord<string>;
2286
+ maxMemberCount?: number;
2287
+ joinMode?: ZIMGroupJoinMode;
2288
+ inviteMode?: ZIMGroupInviteMode;
2289
+ beInviteMode?: ZIMGroupBeInviteMode;
2290
+ }
2291
+ interface ZIMGroupMuteConfig extends ZIMSdkExtendable {
2292
+ mode: ZIMGroupMuteMode;
2293
+ duration: number;
2294
+ roles?: number[];
2295
+ }
2296
+ interface ZIMGroupMemberMuteConfig extends ZIMSdkExtendable {
2297
+ duration: number;
2298
+ }
2299
+ interface ZIMGroupJoinApplicationSendConfig extends ZIMSdkExtendable {
2300
+ wording: string;
2301
+ pushConfig?: ZIMSdkRecord;
2302
+ }
2303
+ interface ZIMGroupJoinApplicationAcceptConfig extends ZIMSdkExtendable {
2304
+ pushConfig?: ZIMSdkRecord;
2305
+ }
2306
+ interface ZIMGroupJoinApplicationRejectConfig extends ZIMSdkExtendable {
2307
+ pushConfig?: ZIMSdkRecord;
2308
+ }
2309
+ interface ZIMGroupInviteApplicationSendConfig extends ZIMSdkExtendable {
2310
+ wording: string;
2311
+ pushConfig?: ZIMSdkRecord;
2312
+ }
2313
+ interface ZIMGroupInviteApplicationAcceptConfig extends ZIMSdkExtendable {
2314
+ pushConfig?: ZIMSdkRecord;
2315
+ }
2316
+ interface ZIMGroupInviteApplicationRejectConfig extends ZIMSdkExtendable {
2317
+ pushConfig?: ZIMSdkRecord;
2318
+ }
2319
+ interface ZIMGroupApplicationListQueryConfig extends ZIMSdkExtendable {
2320
+ nextFlag?: number;
2321
+ count: number;
2322
+ }
2323
+ interface ZIMGroupListQueryConfig extends ZIMSdkExtendable {
2324
+ nextFlag: number;
2325
+ userIDs?: string[];
2326
+ }
2327
+ interface ZIMGroupApplicationInfo extends ZIMSdkExtendable {
2328
+ type: ZIMGroupApplicationType;
2329
+ state: ZIMGroupApplicationState;
2330
+ groupInfo: ZIMGroupInfo;
2331
+ applyUser: ZIMUserInfo;
2332
+ createTime: number;
2333
+ updateTime: number;
2334
+ wording: string;
2335
+ operatedUser?: ZIMGroupMemberSimpleInfo;
2336
+ }
2337
+ interface ZIMGroupCreatedResult extends ZIMSdkExtendable {
2338
+ groupInfo: ZIMGroupFullInfo;
2339
+ userList: ZIMGroupMemberInfo[];
2340
+ errorUserList: ZIMErrorUserInfo[];
2341
+ }
2342
+ interface ZIMGroupDismissedResult extends ZIMSdkExtendable {
2343
+ groupID: string;
2344
+ }
2345
+ interface ZIMGroupJoinedResult extends ZIMSdkExtendable {
2346
+ groupInfo: ZIMGroupFullInfo;
2347
+ }
2348
+ interface ZIMGroupLeftResult extends ZIMSdkExtendable {
2349
+ groupID: string;
2350
+ }
2351
+ interface ZIMGroupUsersInvitedResult extends ZIMSdkExtendable {
2352
+ groupID: string;
2353
+ userList: ZIMGroupMemberInfo[];
2354
+ errorUserList: ZIMErrorUserInfo[];
2355
+ }
2356
+ interface ZIMGroupMemberKickedResult extends ZIMSdkExtendable {
2357
+ groupID: string;
2358
+ kickedUserIDs: string[];
2359
+ errorUserList: ZIMErrorUserInfo[];
2360
+ }
2361
+ interface ZIMGroupOwnerTransferredResult extends ZIMSdkExtendable {
2362
+ groupID: string;
2363
+ toUserID: string;
2364
+ }
2365
+ interface ZIMGroupNameUpdatedResult extends ZIMSdkExtendable {
2366
+ groupID: string;
2367
+ groupName: string;
2368
+ }
2369
+ interface ZIMGroupAvatarUrlUpdatedResult extends ZIMSdkExtendable {
2370
+ groupID: string;
2371
+ groupAvatarUrl: string;
2372
+ }
2373
+ interface ZIMGroupNoticeUpdatedResult extends ZIMSdkExtendable {
2374
+ groupID: string;
2375
+ groupNotice: string;
2376
+ }
2377
+ interface ZIMGroupAliasUpdatedResult extends ZIMSdkExtendable {
2378
+ groupID: string;
2379
+ groupAlias: string;
2380
+ }
2381
+ interface ZIMGroupInfoQueriedResult extends ZIMSdkExtendable {
2382
+ groupInfo: ZIMGroupFullInfo;
2383
+ }
2384
+ interface ZIMGroupMemberRoleUpdatedResult extends ZIMSdkExtendable {
2385
+ groupID: string;
2386
+ forUserID: string;
2387
+ role: number;
2388
+ }
2389
+ interface ZIMGroupMemberNicknameUpdatedResult extends ZIMSdkExtendable {
2390
+ groupID: string;
2391
+ forUserID: string;
2392
+ nickname: string;
2393
+ }
2394
+ interface ZIMGroupMemberInfoQueriedResult extends ZIMSdkExtendable {
2395
+ groupID: string;
2396
+ userInfo: ZIMGroupMemberInfo;
2397
+ }
2398
+ interface ZIMGroupListQueriedResult extends ZIMSdkExtendable {
2399
+ groupList: ZIMGroup[];
2400
+ nextFlag: number;
2401
+ }
2402
+ interface ZIMGroupMemberListQueriedResult extends ZIMSdkExtendable {
2403
+ groupID: string;
2404
+ userList: ZIMGroupMemberInfo[];
2405
+ nextFlag: number;
2406
+ }
2407
+ interface ZIMGroupMemberCountQueriedResult extends ZIMSdkExtendable {
2408
+ groupID: string;
2409
+ count: number;
2410
+ }
2411
+ interface ZIMGroupMutedResult extends ZIMSdkExtendable {
2412
+ groupID: string;
2413
+ isMute: boolean;
2414
+ mutedInfo: ZIMGroupMuteInfo;
2415
+ }
2416
+ interface ZIMGroupMembersMutedResult extends ZIMSdkExtendable {
2417
+ groupID: string;
2418
+ isMute: boolean;
2419
+ duration: number;
2420
+ mutedUserIDs: string[];
2421
+ errorUserList: ZIMErrorUserInfo[];
2422
+ }
2423
+ interface ZIMGroupMemberMutedListQueriedResult extends ZIMSdkExtendable {
2424
+ groupID: string;
2425
+ nextFlag: number;
2426
+ userList: ZIMGroupMemberInfo[];
2427
+ }
2428
+ interface ZIMGroupJoinModeUpdatedResult extends ZIMSdkExtendable {
2429
+ groupID: string;
2430
+ mode: ZIMGroupJoinMode;
2431
+ }
2432
+ interface ZIMGroupInviteModeUpdatedResult extends ZIMSdkExtendable {
2433
+ groupID: string;
2434
+ mode: ZIMGroupInviteMode;
2435
+ }
2436
+ interface ZIMGroupBeInviteModeUpdatedResult extends ZIMSdkExtendable {
2437
+ groupID: string;
2438
+ mode: ZIMGroupBeInviteMode;
2439
+ }
2440
+ interface ZIMGroupJoinApplicationSentResult extends ZIMSdkExtendable {
2441
+ groupID: string;
2442
+ }
2443
+ interface ZIMGroupJoinApplicationAcceptedResult extends ZIMSdkExtendable {
2444
+ groupID: string;
2445
+ userID: string;
2446
+ }
2447
+ interface ZIMGroupJoinApplicationRejectedResult extends ZIMSdkExtendable {
2448
+ groupID: string;
2449
+ userID: string;
2450
+ }
2451
+ interface ZIMGroupInviteApplicationsSentResult extends ZIMSdkExtendable {
2452
+ groupID: string;
2453
+ errorUserList: ZIMErrorUserInfo[];
2454
+ }
2455
+ interface ZIMGroupInviteApplicationAcceptedResult extends ZIMSdkExtendable {
2456
+ groupInfo: ZIMGroupFullInfo;
2457
+ inviterUserID: string;
2458
+ }
2459
+ interface ZIMGroupInviteApplicationRejectedResult extends ZIMSdkExtendable {
2460
+ groupID: string;
2461
+ inviterUserID: string;
2462
+ }
2463
+ interface ZIMGroupApplicationListQueriedResult extends ZIMSdkExtendable {
2464
+ applicationList: ZIMGroupApplicationInfo[];
2465
+ nextFlag: number;
2466
+ }
2467
+
2468
+ interface ZIMExtendedApi {
2469
+ /**
2470
+ * API: sendFriendApplication
2471
+ * 用途:发送好友申请。
2472
+ */
2473
+ sendFriendApplication(userID: string, config: ZIMFriendApplicationSendConfig): Promise<ZIMFriendApplicationSentResult>;
2474
+ /**
2475
+ * API: deleteFriends
2476
+ * 用途:批量删除好友。
2477
+ */
2478
+ deleteFriends(userIDs: string[], config: ZIMFriendDeleteConfig): Promise<ZIMFriendsDeletedResult>;
2479
+ /**
2480
+ * API: updateFriendAlias
2481
+ * 用途:更新好友备注。
2482
+ */
2483
+ updateFriendAlias(friendAlias: string, userID: string): Promise<ZIMFriendAliasUpdatedResult>;
2484
+ /**
2485
+ * API: queryFriendApplicationList
2486
+ * 用途:查询好友申请列表。
2487
+ */
2488
+ queryFriendApplicationList(config: ZIMFriendApplicationListQueryConfig): Promise<ZIMFriendApplicationListQueriedResult>;
2489
+ /**
2490
+ * API: acceptFriendApplication
2491
+ * 用途:接受好友申请。
2492
+ */
2493
+ acceptFriendApplication(userID: string, config: ZIMFriendApplicationAcceptConfig): Promise<ZIMFriendApplicationAcceptedResult>;
2494
+ /**
2495
+ * API: rejectFriendApplication
2496
+ * 用途:拒绝好友申请。
2497
+ */
2498
+ rejectFriendApplication(userID: string, config: ZIMFriendApplicationRejectConfig): Promise<ZIMFriendApplicationRejectedResult>;
2499
+ /**
2500
+ * API: queryFriendList
2501
+ * 用途:查询好友列表。
2502
+ */
2503
+ queryFriendList(config: ZIMFriendListQueryConfig): Promise<ZIMFriendListQueriedResult>;
2504
+ /**
2505
+ * API: queryFriendsInfo
2506
+ * 用途:批量查询好友信息。
2507
+ */
2508
+ queryFriendsInfo(userIDs: string[]): Promise<ZIMFriendsInfoQueriedResult>;
2509
+ /**
2510
+ * API: addUsersToBlacklist
2511
+ * 用途:添加用户到黑名单。
2512
+ */
2513
+ addUsersToBlacklist(userIDs: string[]): Promise<ZIMBlacklistUsersAddedResult>;
2514
+ /**
2515
+ * API: removeUsersFromBlacklist
2516
+ * 用途:将用户移出黑名单。
2517
+ */
2518
+ removeUsersFromBlacklist(userIDs: string[]): Promise<ZIMBlacklistUsersRemovedResult>;
2519
+ /**
2520
+ * API: queryBlacklist
2521
+ * 用途:查询黑名单列表。
2522
+ */
2523
+ queryBlacklist(config: ZIMBlacklistQueryConfig): Promise<ZIMBlacklistQueriedResult>;
2524
+ /**
2525
+ * API: checkUserIsInBlacklist
2526
+ * 用途:检查指定用户是否在黑名单中。
2527
+ */
2528
+ checkUserIsInBlacklist(userID: string): Promise<ZIMBlacklistCheckedResult>;
2529
+ /**
2530
+ * API: querySelfUserInfo
2531
+ * 用途:查询当前登录用户自身信息。
2532
+ */
2533
+ querySelfUserInfo(): Promise<ZIMSelfUserInfoQueriedResult>;
2534
+ /**
2535
+ * API: renewToken
2536
+ * 用途:更新 SDK 鉴权 Token,并刷新本地会话 Token。
2537
+ */
2538
+ renewToken(token: string): Promise<ZIMTokenRenewedResult>;
2539
+ /**
2540
+ * API: queryUsersInfo
2541
+ * 用途:批量查询用户信息。
2542
+ */
2543
+ queryUsersInfo(userIDs: string[], config: ZIMUsersInfoQueryConfig): Promise<ZIMUsersInfoQueriedResult>;
2544
+ /**
2545
+ * API: queryUsersStatus
2546
+ * 用途:批量查询其他用户的在线状态。
2547
+ */
2548
+ queryUsersStatus(userIDs: string[]): Promise<ZIMUsersStatusQueriedResult>;
2549
+ /**
2550
+ * API: subscribeUsersStatus
2551
+ * 用途:批量订阅其他用户的在线状态变化。
2552
+ */
2553
+ subscribeUsersStatus(userIDs: string[], config: ZIMUserStatusSubscribeConfig): Promise<ZIMUsersStatusSubscribedResult>;
2554
+ /**
2555
+ * API: unsubscribeUsersStatus
2556
+ * 用途:批量解除其他用户的在线状态订阅。
2557
+ */
2558
+ unsubscribeUsersStatus(userIDs: string[]): Promise<ZIMUsersStatusUnsubscribedResult>;
2559
+ /**
2560
+ * API: updateUserName
2561
+ * 用途:更新当前登录用户的用户名。
2562
+ */
2563
+ updateUserName(userName: string): Promise<ZIMUserNameUpdatedResult>;
2564
+ /**
2565
+ * API: updateUserAvatarUrl
2566
+ * 用途:更新当前登录用户的头像 URL。
2567
+ */
2568
+ updateUserAvatarUrl(userAvatarUrl: string): Promise<ZIMUserAvatarUrlUpdatedResult>;
2569
+ /**
2570
+ * API: createGroup
2571
+ * 用途:创建群组,并将指定用户加入群组。
2572
+ */
2573
+ createGroup(groupInfo: ZIMGroupInfo, userIDs: string[], config?: ZIMGroupAdvancedConfig): Promise<ZIMGroupCreatedResult>;
2574
+ /**
2575
+ * API: joinGroup
2576
+ * 用途:加入指定群组。
2577
+ */
2578
+ joinGroup(groupID: string): Promise<ZIMGroupJoinedResult>;
2579
+ /**
2580
+ * API: leaveGroup
2581
+ * 用途:离开指定群组。
2582
+ */
2583
+ leaveGroup(groupID: string): Promise<ZIMGroupLeftResult>;
2584
+ /**
2585
+ * API: dismissGroup
2586
+ * 用途:解散指定群组。
2587
+ */
2588
+ dismissGroup(groupID: string): Promise<ZIMGroupDismissedResult>;
2589
+ /**
2590
+ * API: kickGroupMembers
2591
+ * 用途:将指定成员踢出群组。
2592
+ */
2593
+ kickGroupMembers(userIDs: string[], groupID: string): Promise<ZIMGroupMemberKickedResult>;
2594
+ /**
2595
+ * API: inviteUsersIntoGroup
2596
+ * 用途:邀请用户加入群组。
2597
+ */
2598
+ inviteUsersIntoGroup(userIDs: string[], groupID: string): Promise<ZIMGroupUsersInvitedResult>;
2599
+ /**
2600
+ * API: transferGroupOwner
2601
+ * 用途:转让群主。
2602
+ */
2603
+ transferGroupOwner(toUserID: string, groupID: string): Promise<ZIMGroupOwnerTransferredResult>;
2604
+ /**
2605
+ * API: updateGroupAlias
2606
+ * 用途:更新当前用户对指定群组的群备注。
2607
+ */
2608
+ updateGroupAlias(groupAlias: string, groupID: string): Promise<ZIMGroupAliasUpdatedResult>;
2609
+ /**
2610
+ * API: updateGroupName
2611
+ * 用途:更新群名称。
2612
+ */
2613
+ updateGroupName(groupName: string, groupID: string): Promise<ZIMGroupNameUpdatedResult>;
2614
+ /**
2615
+ * API: muteGroup
2616
+ * 用途:禁言或解除禁言群组。
2617
+ */
2618
+ muteGroup(isMute: boolean, groupID: string, config: ZIMGroupMuteConfig): Promise<ZIMGroupMutedResult>;
2619
+ /**
2620
+ * API: muteGroupMembers
2621
+ * 用途:禁言或解除禁言指定群成员。
2622
+ */
2623
+ muteGroupMembers(isMute: boolean, userIDs: string[], groupID: string, config: ZIMGroupMemberMuteConfig): Promise<ZIMGroupMembersMutedResult>;
2624
+ /**
2625
+ * API: updateGroupAvatarUrl
2626
+ * 用途:更新群头像 URL。
2627
+ */
2628
+ updateGroupAvatarUrl(groupAvatarUrl: string, groupID: string): Promise<ZIMGroupAvatarUrlUpdatedResult>;
2629
+ /**
2630
+ * API: updateGroupNotice
2631
+ * 用途:更新群公告。
2632
+ */
2633
+ updateGroupNotice(groupNotice: string, groupID: string): Promise<ZIMGroupNoticeUpdatedResult>;
2634
+ /**
2635
+ * API: updateGroupJoinMode
2636
+ * 用途:更新入群验证模式。
2637
+ */
2638
+ updateGroupJoinMode(mode: ZIMGroupJoinMode, groupID: string): Promise<ZIMGroupJoinModeUpdatedResult>;
2639
+ /**
2640
+ * API: updateGroupInviteMode
2641
+ * 用途:更新群邀请模式。
2642
+ */
2643
+ updateGroupInviteMode(mode: ZIMGroupInviteMode, groupID: string): Promise<ZIMGroupInviteModeUpdatedResult>;
2644
+ /**
2645
+ * API: acceptGroupInviteApplication
2646
+ * 用途:同意邀请入群申请。
2647
+ */
2648
+ acceptGroupInviteApplication(inviterUserID: string, groupID: string, config: ZIMGroupInviteApplicationAcceptConfig): Promise<ZIMGroupInviteApplicationAcceptedResult>;
2649
+ /**
2650
+ * API: acceptGroupJoinApplication
2651
+ * 用途:同意用户加群申请。
2652
+ */
2653
+ acceptGroupJoinApplication(userID: string, groupID: string, config: ZIMGroupJoinApplicationAcceptConfig): Promise<ZIMGroupJoinApplicationAcceptedResult>;
2654
+ /**
2655
+ * API: queryGroupApplicationList
2656
+ * 用途:查询入群相关申请列表。
2657
+ */
2658
+ queryGroupApplicationList(config: ZIMGroupApplicationListQueryConfig): Promise<ZIMGroupApplicationListQueriedResult>;
2659
+ /**
2660
+ * API: rejectGroupInviteApplication
2661
+ * 用途:拒绝邀请入群申请。
2662
+ */
2663
+ rejectGroupInviteApplication(inviterUserID: string, groupID: string, config: ZIMGroupInviteApplicationRejectConfig): Promise<ZIMGroupInviteApplicationRejectedResult>;
2664
+ /**
2665
+ * API: rejectGroupJoinApplication
2666
+ * 用途:拒绝用户加群申请。
2667
+ */
2668
+ rejectGroupJoinApplication(userID: string, groupID: string, config: ZIMGroupJoinApplicationRejectConfig): Promise<ZIMGroupJoinApplicationRejectedResult>;
2669
+ /**
2670
+ * API: sendGroupInviteApplications
2671
+ * 用途:发送邀请入群申请。
2672
+ */
2673
+ sendGroupInviteApplications(userIDs: string[], groupID: string, config: ZIMGroupInviteApplicationSendConfig): Promise<ZIMGroupInviteApplicationsSentResult>;
2674
+ /**
2675
+ * API: sendGroupJoinApplication
2676
+ * 用途:发送加群申请。
2677
+ */
2678
+ sendGroupJoinApplication(groupID: string, config: ZIMGroupJoinApplicationSendConfig): Promise<ZIMGroupJoinApplicationSentResult>;
2679
+ /**
2680
+ * API: updateGroupBeInviteMode
2681
+ * 用途:更新被邀请入群的验证模式。
2682
+ */
2683
+ updateGroupBeInviteMode(mode: ZIMGroupBeInviteMode, groupID: string): Promise<ZIMGroupBeInviteModeUpdatedResult>;
2684
+ /**
2685
+ * API: queryGroupInfo
2686
+ * 用途:查询指定群组信息。
2687
+ */
2688
+ queryGroupInfo(groupID: string): Promise<ZIMGroupInfoQueriedResult>;
2689
+ /**
2690
+ * API: queryGroupList
2691
+ * 用途:查询当前用户已加入的群组列表。
2692
+ */
2693
+ queryGroupList(count: number, config: ZIMGroupListQueryConfig): Promise<ZIMGroupListQueriedResult>;
2694
+ /**
2695
+ * API: setGroupMemberRole
2696
+ * 用途:设置指定群成员角色。
2697
+ */
2698
+ setGroupMemberRole(role: number, forUserID: string, groupID: string): Promise<ZIMGroupMemberRoleUpdatedResult>;
2699
+ /**
2700
+ * API: setGroupMemberNickname
2701
+ * 用途:设置指定群成员昵称。
2702
+ */
2703
+ setGroupMemberNickname(nickname: string, forUserID: string, groupID: string): Promise<ZIMGroupMemberNicknameUpdatedResult>;
2704
+ /**
2705
+ * API: queryGroupMemberInfo
2706
+ * 用途:查询指定群成员信息。
2707
+ */
2708
+ queryGroupMemberInfo(userID: string, groupID: string): Promise<ZIMGroupMemberInfoQueriedResult>;
2709
+ /**
2710
+ * API: queryGroupMemberList
2711
+ * 用途:查询群成员列表。
2712
+ */
2713
+ queryGroupMemberList(groupID: string, config: ZIMGroupMemberQueryConfig): Promise<ZIMGroupMemberListQueriedResult>;
2714
+ /**
2715
+ * API: queryGroupMemberMutedList
2716
+ * 用途:查询群禁言成员列表。
2717
+ */
2718
+ queryGroupMemberMutedList(groupID: string, config: ZIMGroupMemberQueryConfig): Promise<ZIMGroupMemberMutedListQueriedResult>;
2719
+ /**
2720
+ * API: queryGroupMemberCount
2721
+ * 用途:查询指定群组的成员数量。
2722
+ */
2723
+ queryGroupMemberCount(groupID: string): Promise<ZIMGroupMemberCountQueriedResult>;
2724
+ /**
2725
+ * API: queryConversationPinnedList
2726
+ * 用途:查询置顶会话列表。
2727
+ */
2728
+ queryConversationPinnedList(config: ZIMConversationQueryConfig): Promise<ZIMConversationPinnedListQueriedResult>;
2729
+ /**
2730
+ * API: queryConversationTotalUnreadMessageCount
2731
+ * 用途:按配置查询会话未读消息总数。
2732
+ */
2733
+ queryConversationTotalUnreadMessageCount(config: ZIMConversationTotalUnreadMessageCountQueryConfig): Promise<ZIMConversationTotalUnreadMessageCountQueriedResult>;
2734
+ /**
2735
+ * API: updateConversationPinnedState
2736
+ * 用途:更新指定会话的置顶状态。
2737
+ */
2738
+ updateConversationPinnedState(isPinned: boolean, conversationID: string, conversationType: ZIMConversationType$1): Promise<ZIMConversationPinnedStateUpdatedResult>;
2739
+ /**
2740
+ * API: setConversationNotificationStatus
2741
+ * 用途:设置指定会话的通知状态。
2742
+ */
2743
+ setConversationNotificationStatus(status: ZIMConversationNotificationStatus$1, conversationID: string, conversationType: ZIMConversationType$1): Promise<ZIMConversationNotificationStatusSetResult>;
2744
+ /**
2745
+ * API: editMessage
2746
+ * 用途:编辑已发送消息内容。
2747
+ */
2748
+ editMessage(message: ZIMSdkMessage, config: ZIMMessageEditConfig, notification?: ZIMMessageSendNotification): Promise<ZIMMessageEditedResult>;
2749
+ /**
2750
+ * API: replyMessage
2751
+ * 用途:发送一条回复指定原消息的新消息。
2752
+ */
2753
+ replyMessage(message: ZIMSdkMessage, toOriginalMessage: ZIMSdkMessage, config: ZIMMessageSendConfig, notification?: ZIMMessageSendNotification): Promise<ZIMReplyMessageSentResult>;
2754
+ /**
2755
+ * API: queryMessageRepliedList
2756
+ * 用途:查询指定消息的回复列表。
2757
+ */
2758
+ queryMessageRepliedList(message: ZIMSdkMessage, config: ZIMMessageRepliedListQueryConfig): Promise<ZIMMessageRepliedListQueriedResult>;
2759
+ /**
2760
+ * API: queryCombineMessageDetail
2761
+ * 用途:拉取合并消息详情。
2762
+ */
2763
+ queryCombineMessageDetail(config: ZIMCombineMessageDetailQueryConfig): Promise<ZIMCombineMessageDetailQueriedResult>;
2764
+ /**
2765
+ * API: searchLocalMessages
2766
+ * 用途:在指定会话的本地消息库中按条件搜索消息。
2767
+ */
2768
+ searchLocalMessages(conversationID: string, conversationType: ZIMConversationType$1, config: ZIMMessageSearchConfig): Promise<ZIMMessagesSearchedResult>;
2769
+ /**
2770
+ * API: queryMessages
2771
+ * 用途:根据消息 ID 批量查询指定会话中的消息。
2772
+ */
2773
+ queryMessages(messageIds: string[], conversationID: string, conversationType: ZIMConversationType$1): Promise<ZIMMessageQueriedResult<ZIMSdkMessage, ZIMConversationType$1>>;
2774
+ }
2775
+
2776
+ declare enum ZIMConnectionState {
2777
+ Disconnected = 0,
2778
+ Connecting = 1,
2779
+ Connected = 2,
2780
+ Reconnecting = 3
2781
+ }
2782
+ declare enum ZIMConnectionEvent {
2783
+ Success = 0,
2784
+ ActiveLogin = 1,
2785
+ LoginTimeout = 2,
2786
+ LoginInterrupted = 3,
2787
+ KickedOut = 4,
2788
+ TokenExpired = 5
2789
+ }
2790
+ type ZIMConnectionStateChangedPayload = {
2791
+ state: ZIMConnectionState;
2792
+ event: ZIMConnectionEvent;
2793
+ extendedData: string;
2794
+ };
2795
+ declare enum ZIMEventEnum {
2796
+ connect = "connect",
2797
+ disconnect = "disconnect",
2798
+ connectError = "connect_error",
2799
+ connectionStateChanged = "connectionStateChanged",
2800
+ reconnect = "reconnect",
2801
+ reconnectAttempt = "reconnect_attempt",
2802
+ reconnectError = "reconnect_error",
2803
+ reconnectFailed = "reconnect_failed",
2804
+ reconnectLoginSuccess = "reconnectLoginSuccess",
2805
+ reconnectLoginFailed = "reconnectLoginFailed",
2806
+ receiveGroupMessage = "receiveGroupMessage",
2807
+ receivePeerMessage = "receivePeerMessage",
2808
+ sendSingLing = "sendSingLing",
2809
+ conversationChanged = "conversationChanged",
2810
+ messageSentStatusChanged = "messageSentStatusChanged",
2811
+ messageDeleted = "messageDeleted",
2812
+ messageRevokeReceived = "messageRevokeReceived",
2813
+ messageEdited = "messageEdited",
2814
+ messageReceiptChanged = "messageReceiptChanged",
2815
+ tokenWillExpire = "tokenWillExpire",
2816
+ error = "error",
2817
+ userInfoUpdated = "userInfoUpdated",
2818
+ userStatusUpdated = "userStatusUpdated",
2819
+ groupStateChanged = "groupStateChanged",
2820
+ friendListChanged = "friendListChanged",
2821
+ blacklistChanged = "blacklistChanged",
2822
+ callInvitationReceived = "callInvitationReceived",
2823
+ callAccepted = "callAccepted",
2824
+ callRejected = "callRejected",
2825
+ callCanceled = "callCanceled",
2826
+ callEnded = "callEnded",
2827
+ callTimeout = "callTimeout",
2828
+ callParticipantJoined = "callParticipantJoined",
2829
+ callParticipantLeft = "callParticipantLeft",
2830
+ callMediaStateChanged = "callMediaStateChanged",
2831
+ callConnectionStateChanged = "callConnectionStateChanged",
2832
+ callMediaTrackSubscribed = "callMediaTrackSubscribed",
2833
+ callMediaTrackUnsubscribed = "callMediaTrackUnsubscribed"
2834
+ }
2835
+
2836
+ /** Socket.IO 推送事件中可用于服务端确认的回调。 */
2837
+ type VanshiEventAck = (payload?: unknown) => void;
2838
+ /** 事件回调的附加上下文。 */
2839
+ interface VanshiEventContext {
2840
+ /** 当前 Socket.IO 连接 ID。 */
2841
+ socketId?: string;
2842
+ /** 原始推送数据。 */
2843
+ raw?: unknown;
2844
+ }
2845
+ interface VanshiReceiveGroupMessageEvent {
2846
+ messageList: ZIMSdkMessage[];
2847
+ fromConversationID: string;
2848
+ }
2849
+ /** 单聊消息推送数据。 */
2850
+ interface VanshiReceivePeerMessageEvent {
2851
+ messageList: ZIMSdkMessage[];
2852
+ fromConversationID: string;
2853
+ }
2854
+ interface VanshiMessageSentStatusChangedEvent {
2855
+ infos?: Array<{
2856
+ message: ZIMSdkMessage;
2857
+ status?: number;
2858
+ }>;
2859
+ }
2860
+ interface VanshiMessageDeletedEvent {
2861
+ conversationID: string;
2862
+ conversationType?: number;
2863
+ isDeleteConversationAllMessage?: boolean;
2864
+ messageList?: ZIMSdkMessage[];
2865
+ messageDeleteType?: number;
2866
+ }
2867
+ interface VanshiMessageRevokeReceivedEvent {
2868
+ messageList: ZIMSdkMessage[];
2869
+ fromConversationID?: string;
2870
+ }
2871
+ interface VanshiMessageEditedEvent {
2872
+ message?: ZIMSdkMessage;
2873
+ messageList?: ZIMSdkMessage[];
2874
+ }
2875
+ interface VanshiMessageReceiptChangedEvent {
2876
+ messageList?: ZIMSdkMessage[];
2877
+ infos?: Array<{
2878
+ messageID?: string;
2879
+ conversationID?: string;
2880
+ receiptStatus?: number;
2881
+ [key: string]: unknown;
2882
+ }>;
2883
+ }
2884
+ interface VanshiTokenWillExpireEvent {
2885
+ /** Token 距离过期的剩余秒数。 */
2886
+ second?: number;
2887
+ }
2888
+ interface VanshiErrorEvent {
2889
+ code?: string | number;
2890
+ message?: string;
2891
+ data?: unknown;
2892
+ raw?: unknown;
2893
+ [key: string]: unknown;
2894
+ }
2895
+ interface VanshiUserInfoUpdatedEvent {
2896
+ info?: ZIMUserInfo;
2897
+ userInfo?: ZIMUserInfo;
2898
+ }
2899
+ /** 订阅用户的在线状态发生变化。 */
2900
+ interface VanshiUserStatusUpdatedEvent {
2901
+ userStatusList: ZIMUserStatus[];
2902
+ }
2903
+ interface VanshiConversationChangedEvent {
2904
+ conversation?: ZIMConversationChangeInfo["conversation"];
2905
+ event?: number;
2906
+ [key: string]: unknown;
2907
+ }
2908
+ interface VanshiGroupStateChangedEvent {
2909
+ state?: number;
2910
+ event?: number;
2911
+ groupInfo?: ZIMGroupFullInfo;
2912
+ operatedInfo?: Record<string, unknown>;
2913
+ }
2914
+ interface VanshiFriendListChangedEvent {
2915
+ action?: number;
2916
+ friendList?: ZIMFriendInfo[];
2917
+ applicationList?: ZIMFriendApplicationInfo[];
2918
+ }
2919
+ interface VanshiBlacklistChangedEvent {
2920
+ action?: number;
2921
+ userList?: ZIMUserInfo[];
2922
+ }
2923
+ interface VanshiConnectionStateChangedEvent extends ZIMConnectionStateChangedPayload {
2924
+ state: ZIMConnectionState;
2925
+ event: ZIMConnectionEvent;
2926
+ }
2927
+ interface VanshiSocketConnectError extends Error {
2928
+ code?: string | number;
2929
+ data?: unknown;
2930
+ requestId?: string;
2931
+ raw?: unknown;
2932
+ details?: {
2933
+ message: string;
2934
+ type?: string;
2935
+ description?: unknown;
2936
+ transport?: string;
2937
+ url?: string;
2938
+ };
2939
+ }
2940
+ /**
2941
+ * Vanshi SDK 事件参数映射。
2942
+ *
2943
+ * 事件名称和参数顺序与当前 SDK 保持一致。部分服务端推送会携带原始
2944
+ * 参数,因此对应事件使用参数元组描述,而不是统一成单一对象。推送 ACK 由 SDK 自动处理。
2945
+ */
2946
+ interface VanshiEventMap {
2947
+ localMessagesChanged: [data: {
2948
+ userId: string;
2949
+ conversationKey?: string;
2950
+ }];
2951
+ localStorageError: [data: {
2952
+ userId?: string;
2953
+ message: string;
2954
+ }];
2955
+ localSyncStateChanged: [data: {
2956
+ state: 'syncing' | 'synced' | 'failed';
2957
+ conversationID: string;
2958
+ conversationType: string;
2959
+ syncedAt?: number;
2960
+ fullyReconciled?: false;
2961
+ message?: string;
2962
+ }];
2963
+ connect: [];
2964
+ disconnect: [reason?: string];
2965
+ connect_error: [error: VanshiSocketConnectError];
2966
+ connectionStateChanged: [data: VanshiConnectionStateChangedEvent];
2967
+ reconnect: [attempt?: number];
2968
+ reconnect_attempt: [attempt?: number];
2969
+ reconnect_error: [error: unknown];
2970
+ reconnect_failed: [];
2971
+ reconnectLoginSuccess: [];
2972
+ reconnectLoginFailed: [error: unknown];
2973
+ /** SDK acknowledges receipt before dispatch; business handlers receive data only. */
2974
+ receiveGroupMessage: [data: VanshiReceiveGroupMessageEvent];
2975
+ /** SDK acknowledges receipt before dispatch; business handlers receive data only. */
2976
+ receivePeerMessage: [data: VanshiReceivePeerMessageEvent];
2977
+ sendSingLing: [payload: unknown];
2978
+ /** SDK acknowledges receipt before dispatch; business handlers receive data only. */
2979
+ conversationChanged: [infoList: VanshiConversationChangedEvent[] | unknown];
2980
+ messageSentStatusChanged: [source: unknown, data: VanshiMessageSentStatusChangedEvent];
2981
+ messageDeleted: [source: unknown, data: VanshiMessageDeletedEvent];
2982
+ messageRevokeReceived: [source: unknown, data: VanshiMessageRevokeReceivedEvent];
2983
+ messageEdited: [source: unknown, data: VanshiMessageEditedEvent];
2984
+ messageReceiptChanged: [data: VanshiMessageReceiptChangedEvent];
2985
+ tokenWillExpire: [data: VanshiTokenWillExpireEvent];
2986
+ error: [error: VanshiErrorEvent];
2987
+ userInfoUpdated: [data: VanshiUserInfoUpdatedEvent];
2988
+ userStatusUpdated: [data: VanshiUserStatusUpdatedEvent];
2989
+ groupStateChanged: [data: VanshiGroupStateChangedEvent];
2990
+ friendListChanged: [data: VanshiFriendListChangedEvent];
2991
+ blacklistChanged: [data: VanshiBlacklistChangedEvent];
2992
+ callInvitationReceived: [payload: unknown];
2993
+ callAccepted: [payload: unknown];
2994
+ callRejected: [payload: unknown];
2995
+ callCanceled: [payload: unknown];
2996
+ callEnded: [payload: unknown];
2997
+ callTimeout: [payload: unknown];
2998
+ callParticipantJoined: [payload: unknown];
2999
+ callParticipantLeft: [payload: unknown];
3000
+ callMediaStateChanged: [payload: unknown];
3001
+ callConnectionStateChanged: [payload: unknown];
3002
+ callMediaTrackSubscribed: [payload: unknown];
3003
+ callMediaTrackUnsubscribed: [payload: unknown];
3004
+ }
3005
+ type VanshiEventName = keyof VanshiEventMap;
3006
+ type VanshiEventListener<K extends VanshiEventName> = (...args: VanshiEventMap[K]) => void;
3007
+
3008
+ interface ZIM extends ZIMExtendedApi, LocalStorageApi {
3009
+ create(): Promise<void>;
3010
+ logout(disconnect?: boolean): Promise<boolean>;
3011
+ isConnected(): boolean;
3012
+ on<K extends keyof VanshiEventMap>(event: K, handler: VanshiEventListener<K>): void;
3013
+ on(event: string, handler: (...args: any[]) => void): void;
3014
+ off<K extends keyof VanshiEventMap>(event: K, handler?: VanshiEventListener<K>): void;
3015
+ off(event: string, handler?: (...args: any[]) => void): void;
3016
+ login(values: SdkLoginOptions): Promise<boolean>;
3017
+ callInvite(config: ZIMCallInviteConfig): Promise<ZIMCallInviteResult>;
3018
+ callInviteMembers(params: ZIMCallInviteMembersParams): Promise<ZIMCallActionResult>;
3019
+ callAccept(params: ZIMCallBaseParams): Promise<ZIMCallActionResult>;
3020
+ callReject(params: ZIMCallBaseParams): Promise<ZIMCallActionResult>;
3021
+ callCancel(params: ZIMCallBaseParams): Promise<ZIMCallActionResult>;
3022
+ callHangup(params: ZIMCallBaseParams): Promise<ZIMCallActionResult>;
3023
+ callQueryMembers(params: ZIMCallBaseParams): Promise<ZIMCallMemberListResult>;
3024
+ /** 获取当前会话是否存在通话 */
3025
+ callHasOngoingCall(params: ZIMCallHasOngoingCallParams): Promise<ZIMCallHasOngoingCallResult>;
3026
+ callGetLiveKitToken(params: ZIMCallTokenParams): Promise<ZIMCallLiveKitTokenInfo>;
3027
+ callJoinMedia(config: ZIMCallJoinMediaConfig, connectOptions?: RoomConnectOptions): Promise<ZIMCallJoinedResult>;
3028
+ callLeaveMedia(): Promise<void>;
3029
+ callSetMicrophoneEnabled(enabled: boolean): Promise<ZIMCallMediaState>;
3030
+ callSetCameraEnabled(enabled: boolean): Promise<ZIMCallMediaState>;
3031
+ callStartScreenShare(): Promise<ZIMCallScreenShareResult>;
3032
+ callStopScreenShare(): Promise<ZIMCallMediaState>;
3033
+ callGetMediaState(): ZIMCallMediaState;
3034
+ callGetRoom(): Room | undefined;
3035
+ queryConversation(conversationID: string, conversationType: ZIMConversationType$1): Promise<ZIMConversationQueriedResult>;
3036
+ queryConversationList(params: ConversationQueryParams): Promise<ConversationItem[]>;
3037
+ deleteAllConversations(): Promise<ApiResponse>;
3038
+ deleteConversation(params: {
3039
+ conversationID: string;
3040
+ conversationType: ZIMConversationType$1;
3041
+ config?: boolean;
3042
+ }): Promise<IYapiPostSdkDeleteConversationApiResponse>;
3043
+ clearConversationTotalUnreadMessageCount(): Promise<IYapiPostSdkClearConversationTotalUnreadMessageCountApiResponse>;
3044
+ clearConversationUnreadMessageCount(conversationID: string, conversationType: ZIMConversationType$1): Promise<IYapiPostSdkClearConversationUnreadMessageCountApiResponse>;
3045
+ queryHistoryMessage(params: queryHistoryMessageParams): Promise<SdkHistoryResult>;
3046
+ sendMessage(params: {
3047
+ message: ZIMSEDMessage;
3048
+ toConversationID: string;
3049
+ conversationType: ZIMConversationType$1;
3050
+ }, options?: ZIMMessageSendOptions): Promise<SendMessageData>;
3051
+ sendMediaMessage(params: {
3052
+ message: ZIMSEDMediaMessage;
3053
+ toConversationID: string;
3054
+ conversationType: ZIMConversationType$1;
3055
+ }, options?: ZIMMediaMessageSendOptions): Promise<SdkMediaSendResult>;
3056
+ deleteAllConversationMessages(): Promise<{
3057
+ code: string;
3058
+ message: string;
3059
+ data: string;
3060
+ }>;
3061
+ deleteAllMessage(conversationID: string, conversationType: ZIMConversationType$1): Promise<{
3062
+ code: string;
3063
+ message: string;
3064
+ data: string;
3065
+ }>;
3066
+ deleteMessages(conversationID: string, conversationType: ZIMConversationType$1, messageList: {
3067
+ messageID: string;
3068
+ type: string;
3069
+ }[]): Promise<{
3070
+ code: string;
3071
+ message: string;
3072
+ data: string;
3073
+ }>;
3074
+ revokeMessage(message: {
3075
+ messageID: string;
3076
+ type: number;
3077
+ }, config?: ZIMMessageRevokeConfig): Promise<{
3078
+ code: string;
3079
+ message: string;
3080
+ data: string;
3081
+ }>;
3082
+ sendMessageReceiptsRead(conversationID: string, conversationType: ZIMConversationType$1, messageList: string[]): Promise<YapiPostSdkSendMessageReceiptsReadApiResponse>;
3083
+ queryMessageReceiptsInfo(conversationID: string, conversationType: ZIMConversationType$1, messageList: string[]): Promise<YapiPostSdkQueryMessageReceiptsInfoApiResponse>;
3084
+ queryGroupMessageReceiptUnreadMemberList(groupID: string, config: {
3085
+ count: string;
3086
+ nextFlag: string;
3087
+ }, message: {
3088
+ messageID: string;
3089
+ }): Promise<YapiPostSdkQueryGroupMessageReceiptUnreadMemberListApiResponse>;
3090
+ queryGroupMessageReceiptReadMemberList(groupID: string, config: {
3091
+ count: string;
3092
+ nextFlag: string;
3093
+ }, message: {
3094
+ messageID: string;
3095
+ }): Promise<YapiPostSdkQueryGroupMessageReceiptReadMemberListApiResponse>;
3096
+ }
3097
+
3098
+ interface IYapiPostSdkDeleteAllConversationsApiResponse {
1172
3099
  code: string
1173
3100
  message: string
1174
3101
  data: string
1175
3102
  }
1176
3103
 
1177
- interface IYapiPostSdkDeleteMessagesApiResponse {
1178
- code: string
1179
- message: string
1180
- data: string
1181
- }
3104
+ /**
3105
+ * 查询会话列表
3106
+ * @param payload 查询参数
3107
+ * @returns 会话列表数据
3108
+ */
3109
+ declare function queryConversationList(payload: ConversationQueryParams): Promise<ConversationItem[]>;
3110
+ /**
3111
+ * 按会话 ID 和会话类型查询单个会话。
3112
+ *
3113
+ * @param conversationID 会话 ID。
3114
+ * @param conversationType 会话类型。
3115
+ * @returns 查询结果,包含会话信息。
3116
+ */
3117
+ declare function queryConversation(conversationID: string, conversationType: ZIMConversationType$1): Promise<ZIMConversationQueriedResult>;
3118
+ /**
3119
+ * 删除全部会话
3120
+ * @param payload 删除参数
3121
+ * @returns 删除结果
3122
+ */
3123
+ declare function deleteAllConversations(): Promise<IYapiPostSdkDeleteAllConversationsApiResponse>;
3124
+ /**
3125
+ * 删除单个会话
3126
+ * @param payload 删除参数 (需要 conversationID, conversationType, config)
3127
+ * @returns 删除结果
3128
+ */
3129
+ declare function deleteConversation(payload: IYapiPostSdkDeleteConversationApiRequest): Promise<IYapiPostSdkDeleteConversationApiResponse>;
3130
+ /**
3131
+ * 清除全部会话未读数
3132
+ * @param payload 清除参数(无需要参数)
3133
+ * @returns 清除结果
3134
+ */
3135
+ declare function clearConversationTotalUnreadMessageCount(): Promise<IYapiPostSdkClearConversationTotalUnreadMessageCountApiResponse>;
3136
+ /**
3137
+ * 清除单个会话未读数
3138
+ * @param payload 清除参数 (需要 conversationID, conversationType)
3139
+ * @returns 清除结果
3140
+ */
3141
+ declare function clearConversationUnreadMessageCount(conversationID: string, conversationType: string | number): Promise<IYapiPostSdkClearConversationUnreadMessageCountApiResponse>;
1182
3142
 
1183
- interface IYapiPostSdkRevokeMessageApiRequest {
1184
- message: IYapiPostSdkRevokeMessageApiRequestMessage
1185
-
1186
- config?: YapiPostSdkRevokeMessageApiRequestConfig
1187
- }
1188
-
1189
- interface YapiPostSdkRevokeMessageApiRequestConfig {
1190
- revokeExtendedData: string
1191
- }
1192
-
1193
- interface IYapiPostSdkRevokeMessageApiRequestMessage {
1194
-
1195
- type?: number
1196
-
1197
- messageID?: string
1198
- }
1199
-
1200
-
1201
- interface IYapiPostSdkRevokeMessageApiResponse {
1202
- code: string
1203
- message: string
1204
- data: string
1205
- }
3143
+ declare function initSocket(): Promise<void>;
3144
+ declare function isSocketConnected(): boolean;
3145
+ declare function on<K extends keyof VanshiEventMap>(event: K, handler: VanshiEventListener<K>): void;
3146
+ declare function on(event: string, handler: (...args: any[]) => void): void;
3147
+ declare function off<K extends keyof VanshiEventMap>(event: K, handler?: VanshiEventListener<K>): void;
3148
+ declare function off(event: string, handler?: (...args: any[]) => void): void;
3149
+
3150
+ declare function callInvite(config: ZIMCallInviteConfig): Promise<ZIMCallInviteResult>;
3151
+ declare function callInviteMembers(params: ZIMCallInviteMembersParams): Promise<ZIMCallActionResult>;
3152
+ declare function callAccept(params: ZIMCallBaseParams): Promise<ZIMCallActionResult>;
3153
+ declare function callReject(params: ZIMCallBaseParams): Promise<ZIMCallActionResult>;
3154
+ declare function callCancel(params: ZIMCallBaseParams): Promise<ZIMCallActionResult>;
3155
+ declare function callHangup(params: ZIMCallBaseParams): Promise<ZIMCallActionResult>;
3156
+ declare function callQueryMembers(params: ZIMCallBaseParams): Promise<ZIMCallMemberListResult>;
3157
+ /** 获取当前会话是否存在通话 */
3158
+ declare function callHasOngoingCall(params: ZIMCallHasOngoingCallParams): Promise<ZIMCallHasOngoingCallResult>;
3159
+ declare function callGetLiveKitToken(params: ZIMCallTokenParams): Promise<ZIMCallLiveKitTokenInfo>;
3160
+ declare function callJoinMedia(config: ZIMCallJoinMediaConfig, connectOptions?: RoomConnectOptions): Promise<ZIMCallJoinedResult>;
3161
+ declare function callLeaveMedia(): Promise<void>;
3162
+ declare function callSetMicrophoneEnabled(enabled: boolean): Promise<ZIMCallMediaState>;
3163
+ declare function callSetCameraEnabled(enabled: boolean): Promise<ZIMCallMediaState>;
3164
+ declare function callStartScreenShare(): Promise<ZIMCallScreenShareResult>;
3165
+ declare function callStopScreenShare(): Promise<ZIMCallMediaState>;
3166
+ declare function callGetMediaState(): ZIMCallMediaState;
3167
+ declare function callGetRoom(): livekit_client.Room;
1206
3168
 
1207
3169
  /**
1208
- * 发送消息
1209
- * @param payload 发送消息参数
1210
- * @returns 发送结果
3170
+ * API: sendFriendApplication
3171
+ * 用途:发送好友申请。
1211
3172
  */
1212
- declare function sendMessage(payload: IYapiPostSdkSendMessageApiRequest): Promise<IYapiPostSdkSendMessageApiResponse['data']>;
3173
+ declare function sendFriendApplication(userID: string, config: ZIMFriendApplicationSendConfig): Promise<ZIMFriendApplicationSentResult>;
1213
3174
  /**
1214
- * 发送媒体消息
1215
- * @param payload 发送媒体消息参数
1216
- * @returns 发送结果
3175
+ * API: deleteFriends
3176
+ * 用途:批量删除好友。
1217
3177
  */
1218
- declare function sendMediaMessage(payload: {
1219
- message: ZIMSEDMediaMessage;
1220
- toConversationID: string;
1221
- conversationType: ZIMConversationType;
1222
- }, options?: ZIMMediaMessageSendOptions): Promise<IYapiPostSdkSendMediaMessageApiResponse['data']>;
3178
+ declare function deleteFriends(userIDs: string[], config: ZIMFriendDeleteConfig): Promise<ZIMFriendsDeletedResult>;
1223
3179
  /**
1224
- * 查询历史消息
1225
- * @param payload 查询参数
1226
- * @returns 历史消息列表
3180
+ * API: updateFriendAlias
3181
+ * 用途:更新好友备注。
1227
3182
  */
1228
- declare function queryHistoryMessage(payload: IYapiPostSdkQueryHistoryMessageApiRequest): Promise<IYapiPostSdkQueryHistoryMessageApiResponse['data']>;
3183
+ declare function updateFriendAlias(friendAlias: string, userID: string): Promise<ZIMFriendAliasUpdatedResult>;
1229
3184
  /**
1230
- * 删除所有会话的所有消息
1231
- * @param payload 删除参数
1232
- * @returns 删除结果
3185
+ * API: queryFriendApplicationList
3186
+ * 用途:查询好友申请列表。
1233
3187
  */
1234
- declare function deleteAllConversationMessages(): Promise<IYapiPostSdkDeleteAllConversationMessagesApiResponse>;
3188
+ declare function queryFriendApplicationList(config: ZIMFriendApplicationListQueryConfig): Promise<ZIMFriendApplicationListQueriedResult>;
1235
3189
  /**
1236
- * 删除消息
1237
- * @param payload 删除消息参数
1238
- * @returns 删除结果
3190
+ * API: acceptFriendApplication
3191
+ * 用途:接受好友申请。
1239
3192
  */
1240
- declare function deleteMessages(conversationID: string, conversationType: ZIMConversationType, messageList: {
1241
- messageID: string;
1242
- type: string;
1243
- }[]): Promise<IYapiPostSdkDeleteMessagesApiResponse>;
3193
+ declare function acceptFriendApplication(userID: string, config: ZIMFriendApplicationAcceptConfig): Promise<ZIMFriendApplicationAcceptedResult>;
1244
3194
  /**
1245
- * 撤回消息
1246
- * @param payload 撤回消息参数
1247
- * @returns 撤回结果
3195
+ * API: rejectFriendApplication
3196
+ * 用途:拒绝好友申请。
1248
3197
  */
1249
- declare function revokeMessage(message: IYapiPostSdkRevokeMessageApiRequest['message'], config?: IYapiPostSdkRevokeMessageApiRequest['config']): Promise<IYapiPostSdkRevokeMessageApiResponse>;
1250
- declare function deleteAllMessage(conversationID: string, conversationType: ZIMConversationType): Promise<{
1251
- code: string;
1252
- message: string;
1253
- data: string;
1254
- }>;
3198
+ declare function rejectFriendApplication(userID: string, config: ZIMFriendApplicationRejectConfig): Promise<ZIMFriendApplicationRejectedResult>;
3199
+ /**
3200
+ * API: queryFriendList
3201
+ * 用途:查询好友列表。
3202
+ */
3203
+ declare function queryFriendList(config: ZIMFriendListQueryConfig): Promise<ZIMFriendListQueriedResult>;
3204
+ /**
3205
+ * API: queryFriendsInfo
3206
+ * 用途:批量查询好友信息。
3207
+ */
3208
+ declare function queryFriendsInfo(userIDs: string[]): Promise<ZIMFriendsInfoQueriedResult>;
1255
3209
 
1256
- declare function sendMessageReceiptsRead(conversationID: string, conversationType: ZIMConversationType, messageList: string[]): Promise<YapiPostSdkSendMessageReceiptsReadApiResponse>;
1257
- declare function queryMessageReceiptsInfo(conversationID: string, conversationType: ZIMConversationType, messageList: string[]): Promise<YapiPostSdkQueryMessageReceiptsInfoApiResponse>;
1258
- declare function queryGroupMessageReceiptUnreadMemberList(groupID: string, config: {
1259
- count: string;
1260
- nextFlag: string;
1261
- }, message: {
1262
- messageID: string;
1263
- }): Promise<YapiPostSdkQueryGroupMessageReceiptUnreadMemberListApiResponse>;
1264
- declare function queryGroupMessageReceiptReadMemberList(groupID: string, config: {
1265
- count: string;
1266
- nextFlag: string;
1267
- }, message: {
1268
- messageID: string;
1269
- }): Promise<YapiPostSdkQueryGroupMessageReceiptReadMemberListApiResponse>;
3210
+ /**
3211
+ * API: addUsersToBlacklist
3212
+ * 用途:添加用户到黑名单。
3213
+ */
3214
+ declare function addUsersToBlacklist(userIDs: string[]): Promise<ZIMBlacklistUsersAddedResult>;
3215
+ /**
3216
+ * API: removeUsersFromBlacklist
3217
+ * 用途:将用户移出黑名单。
3218
+ */
3219
+ declare function removeUsersFromBlacklist(userIDs: string[]): Promise<ZIMBlacklistUsersRemovedResult>;
3220
+ /**
3221
+ * API: queryBlacklist
3222
+ * 用途:查询黑名单列表。
3223
+ */
3224
+ declare function queryBlacklist(config: ZIMBlacklistQueryConfig): Promise<ZIMBlacklistQueriedResult>;
3225
+ /**
3226
+ * API: checkUserIsInBlacklist
3227
+ * 用途:检查指定用户是否在黑名单中。
3228
+ */
3229
+ declare function checkUserIsInBlacklist(userID: string): Promise<ZIMBlacklistCheckedResult>;
3230
+
3231
+ /**
3232
+ * API: querySelfUserInfo
3233
+ * 用途:查询当前登录用户自身信息。
3234
+ */
3235
+ declare function querySelfUserInfo(): Promise<ZIMSelfUserInfoQueriedResult>;
3236
+ /**
3237
+ * API: renewToken
3238
+ * 用途:更新 SDK 鉴权 Token,并刷新本地会话 Token。
3239
+ */
3240
+ declare function renewToken(token: string): Promise<ZIMTokenRenewedResult>;
3241
+ /**
3242
+ * API: queryUsersInfo
3243
+ * 用途:批量查询用户信息。
3244
+ */
3245
+ declare function queryUsersInfo(userIDs: string[], config: ZIMUsersInfoQueryConfig): Promise<ZIMUsersInfoQueriedResult>;
3246
+ /**
3247
+ * API: queryUsersStatus
3248
+ * 用途:批量查询其他用户的在线状态。
3249
+ */
3250
+ declare function queryUsersStatus(userIDs: string[]): Promise<ZIMUsersStatusQueriedResult>;
3251
+ /**
3252
+ * API: subscribeUsersStatus
3253
+ * 用途:批量订阅其他用户的在线状态变化。
3254
+ */
3255
+ declare function subscribeUsersStatus(userIDs: string[], config: ZIMUserStatusSubscribeConfig): Promise<ZIMUsersStatusSubscribedResult>;
3256
+ /**
3257
+ * API: unsubscribeUsersStatus
3258
+ * 用途:批量解除其他用户的在线状态订阅。
3259
+ */
3260
+ declare function unsubscribeUsersStatus(userIDs: string[]): Promise<ZIMUsersStatusUnsubscribedResult>;
3261
+ /**
3262
+ * API: updateUserName
3263
+ * 用途:更新当前登录用户的用户名。
3264
+ */
3265
+ declare function updateUserName(userName: string): Promise<ZIMUserNameUpdatedResult>;
3266
+ /**
3267
+ * API: updateUserAvatarUrl
3268
+ * 用途:更新当前登录用户的头像 URL。
3269
+ */
3270
+ declare function updateUserAvatarUrl(userAvatarUrl: string): Promise<ZIMUserAvatarUrlUpdatedResult>;
3271
+
3272
+ /**
3273
+ * API: createGroup
3274
+ * 用途:创建群组,并将指定用户加入群组。
3275
+ */
3276
+ declare function createGroup(groupInfo: ZIMGroupInfo, userIDs: string[], config?: ZIMGroupAdvancedConfig): Promise<ZIMGroupCreatedResult>;
3277
+ /**
3278
+ * API: joinGroup
3279
+ * 用途:加入指定群组。
3280
+ */
3281
+ declare function joinGroup(groupID: string): Promise<ZIMGroupJoinedResult>;
3282
+ /**
3283
+ * API: leaveGroup
3284
+ * 用途:离开指定群组。
3285
+ */
3286
+ declare function leaveGroup(groupID: string): Promise<ZIMGroupLeftResult>;
3287
+ /**
3288
+ * API: dismissGroup
3289
+ * 用途:解散指定群组。
3290
+ */
3291
+ declare function dismissGroup(groupID: string): Promise<ZIMGroupDismissedResult>;
3292
+ /**
3293
+ * API: kickGroupMembers
3294
+ * 用途:将指定成员踢出群组。
3295
+ */
3296
+ declare function kickGroupMembers(userIDs: string[], groupID: string): Promise<ZIMGroupMemberKickedResult>;
3297
+ /**
3298
+ * API: inviteUsersIntoGroup
3299
+ * 用途:邀请用户加入群组。
3300
+ */
3301
+ declare function inviteUsersIntoGroup(userIDs: string[], groupID: string): Promise<ZIMGroupUsersInvitedResult>;
3302
+ /**
3303
+ * API: transferGroupOwner
3304
+ * 用途:转让群主。
3305
+ */
3306
+ declare function transferGroupOwner(toUserID: string, groupID: string): Promise<ZIMGroupOwnerTransferredResult>;
3307
+ /**
3308
+ * API: updateGroupAlias
3309
+ * 用途:更新当前用户对指定群组的群备注。
3310
+ */
3311
+ declare function updateGroupAlias(groupAlias: string, groupID: string): Promise<ZIMGroupAliasUpdatedResult>;
3312
+ /**
3313
+ * API: updateGroupName
3314
+ * 用途:更新群名称。
3315
+ */
3316
+ declare function updateGroupName(groupName: string, groupID: string): Promise<ZIMGroupNameUpdatedResult>;
3317
+ /**
3318
+ * API: muteGroup
3319
+ * 用途:禁言或解除禁言群组。
3320
+ */
3321
+ declare function muteGroup(isMute: boolean, groupID: string, config: ZIMGroupMuteConfig): Promise<ZIMGroupMutedResult>;
3322
+ /**
3323
+ * API: muteGroupMembers
3324
+ * 用途:禁言或解除禁言指定群成员。
3325
+ */
3326
+ declare function muteGroupMembers(isMute: boolean, userIDs: string[], groupID: string, config: ZIMGroupMemberMuteConfig): Promise<ZIMGroupMembersMutedResult>;
3327
+ /**
3328
+ * API: updateGroupAvatarUrl
3329
+ * 用途:更新群头像 URL。
3330
+ */
3331
+ declare function updateGroupAvatarUrl(groupAvatarUrl: string, groupID: string): Promise<ZIMGroupAvatarUrlUpdatedResult>;
3332
+ /**
3333
+ * API: updateGroupNotice
3334
+ * 用途:更新群公告。
3335
+ */
3336
+ declare function updateGroupNotice(groupNotice: string, groupID: string): Promise<ZIMGroupNoticeUpdatedResult>;
3337
+ /**
3338
+ * API: updateGroupJoinMode
3339
+ * 用途:更新入群验证模式。
3340
+ */
3341
+ declare function updateGroupJoinMode(mode: ZIMGroupJoinMode, groupID: string): Promise<ZIMGroupJoinModeUpdatedResult>;
3342
+ /**
3343
+ * API: updateGroupInviteMode
3344
+ * 用途:更新群邀请模式。
3345
+ */
3346
+ declare function updateGroupInviteMode(mode: ZIMGroupInviteMode, groupID: string): Promise<ZIMGroupInviteModeUpdatedResult>;
3347
+ /**
3348
+ * API: acceptGroupInviteApplication
3349
+ * 用途:同意邀请入群申请。
3350
+ */
3351
+ declare function acceptGroupInviteApplication(inviterUserID: string, groupID: string, config: ZIMGroupInviteApplicationAcceptConfig): Promise<ZIMGroupInviteApplicationAcceptedResult>;
3352
+ /**
3353
+ * API: acceptGroupJoinApplication
3354
+ * 用途:同意用户加群申请。
3355
+ */
3356
+ declare function acceptGroupJoinApplication(userID: string, groupID: string, config: ZIMGroupJoinApplicationAcceptConfig): Promise<ZIMGroupJoinApplicationAcceptedResult>;
3357
+ /**
3358
+ * API: queryGroupApplicationList
3359
+ * 用途:查询入群相关申请列表。
3360
+ */
3361
+ declare function queryGroupApplicationList(config: ZIMGroupApplicationListQueryConfig): Promise<ZIMGroupApplicationListQueriedResult>;
3362
+ /**
3363
+ * API: rejectGroupInviteApplication
3364
+ * 用途:拒绝邀请入群申请。
3365
+ */
3366
+ declare function rejectGroupInviteApplication(inviterUserID: string, groupID: string, config: ZIMGroupInviteApplicationRejectConfig): Promise<ZIMGroupInviteApplicationRejectedResult>;
3367
+ /**
3368
+ * API: rejectGroupJoinApplication
3369
+ * 用途:拒绝用户加群申请。
3370
+ */
3371
+ declare function rejectGroupJoinApplication(userID: string, groupID: string, config: ZIMGroupJoinApplicationRejectConfig): Promise<ZIMGroupJoinApplicationRejectedResult>;
3372
+ /**
3373
+ * API: sendGroupInviteApplications
3374
+ * 用途:发送邀请入群申请。
3375
+ */
3376
+ declare function sendGroupInviteApplications(userIDs: string[], groupID: string, config: ZIMGroupInviteApplicationSendConfig): Promise<ZIMGroupInviteApplicationsSentResult>;
3377
+ /**
3378
+ * API: sendGroupJoinApplication
3379
+ * 用途:发送加群申请。
3380
+ */
3381
+ declare function sendGroupJoinApplication(groupID: string, config: ZIMGroupJoinApplicationSendConfig): Promise<ZIMGroupJoinApplicationSentResult>;
3382
+ /**
3383
+ * API: updateGroupBeInviteMode
3384
+ * 用途:更新被邀请入群的验证模式。
3385
+ */
3386
+ declare function updateGroupBeInviteMode(mode: ZIMGroupBeInviteMode, groupID: string): Promise<ZIMGroupBeInviteModeUpdatedResult>;
3387
+ /**
3388
+ * API: queryGroupInfo
3389
+ * 用途:查询指定群组信息。
3390
+ */
3391
+ declare function queryGroupInfo(groupID: string): Promise<ZIMGroupInfoQueriedResult>;
3392
+ /**
3393
+ * API: queryGroupList
3394
+ * 用途:查询当前用户已加入的群组列表。
3395
+ */
3396
+ declare function queryGroupList(count: number, config: ZIMGroupListQueryConfig): Promise<ZIMGroupListQueriedResult>;
3397
+ /**
3398
+ * API: setGroupMemberRole
3399
+ * 用途:设置指定群成员角色。
3400
+ */
3401
+ declare function setGroupMemberRole(role: number, forUserID: string, groupID: string): Promise<ZIMGroupMemberRoleUpdatedResult>;
3402
+ /**
3403
+ * API: setGroupMemberNickname
3404
+ * 用途:设置指定群成员昵称。
3405
+ */
3406
+ declare function setGroupMemberNickname(nickname: string, forUserID: string, groupID: string): Promise<ZIMGroupMemberNicknameUpdatedResult>;
3407
+ /**
3408
+ * API: queryGroupMemberInfo
3409
+ * 用途:查询指定群成员信息。
3410
+ */
3411
+ declare function queryGroupMemberInfo(userID: string, groupID: string): Promise<ZIMGroupMemberInfoQueriedResult>;
3412
+ /**
3413
+ * API: queryGroupMemberList
3414
+ * 用途:查询群成员列表。
3415
+ */
3416
+ declare function queryGroupMemberList(groupID: string, config: ZIMGroupMemberQueryConfig): Promise<ZIMGroupMemberListQueriedResult>;
3417
+ /**
3418
+ * API: queryGroupMemberMutedList
3419
+ * 用途:查询群禁言成员列表。
3420
+ */
3421
+ declare function queryGroupMemberMutedList(groupID: string, config: ZIMGroupMemberQueryConfig): Promise<ZIMGroupMemberMutedListQueriedResult>;
3422
+ /**
3423
+ * API: queryGroupMemberCount
3424
+ * 用途:查询指定群组的成员数量。
3425
+ */
3426
+ declare function queryGroupMemberCount(groupID: string): Promise<ZIMGroupMemberCountQueriedResult>;
3427
+
3428
+ /**
3429
+ * API: queryConversationPinnedList
3430
+ * 用途:查询置顶会话列表。
3431
+ */
3432
+ declare function queryConversationPinnedList(config: ZIMConversationQueryConfig): Promise<ZIMConversationPinnedListQueriedResult>;
3433
+ /**
3434
+ * API: queryConversationTotalUnreadMessageCount
3435
+ * 用途:按配置查询会话未读消息总数。
3436
+ */
3437
+ declare function queryConversationTotalUnreadMessageCount(config: ZIMConversationTotalUnreadMessageCountQueryConfig): Promise<ZIMConversationTotalUnreadMessageCountQueriedResult>;
3438
+ /**
3439
+ * API: updateConversationPinnedState
3440
+ * 用途:更新指定会话的置顶状态。
3441
+ */
3442
+ declare function updateConversationPinnedState(isPinned: boolean, conversationID: string, conversationType: ZIMConversationType$1): Promise<ZIMConversationPinnedStateUpdatedResult>;
3443
+ /**
3444
+ * API: setConversationNotificationStatus
3445
+ * 用途:设置指定会话的通知状态。
3446
+ */
3447
+ declare function setConversationNotificationStatus(status: ZIMConversationNotificationStatus$1, conversationID: string, conversationType: ZIMConversationType$1): Promise<ZIMConversationNotificationStatusSetResult>;
3448
+
3449
+ /**
3450
+ * API: editMessage
3451
+ * 用途:编辑已发送消息内容。
3452
+ */
3453
+ declare function editMessage(message: ZIMSdkMessage, config: ZIMMessageEditConfig, notification?: ZIMMessageSendNotification): Promise<ZIMMessageEditedResult>;
3454
+ /**
3455
+ * API: replyMessage
3456
+ * 用途:发送一条回复指定原消息的新消息。
3457
+ */
3458
+ declare function replyMessage(message: ZIMSdkMessage, toOriginalMessage: ZIMSdkMessage, config: ZIMMessageSendConfig, notification?: ZIMMessageSendNotification): Promise<ZIMReplyMessageSentResult>;
3459
+ /**
3460
+ * API: queryMessageRepliedList
3461
+ * 用途:查询指定消息的回复列表。
3462
+ */
3463
+ declare function queryMessageRepliedList(message: ZIMSdkMessage, config: ZIMMessageRepliedListQueryConfig): Promise<ZIMMessageRepliedListQueriedResult>;
3464
+ /**
3465
+ * API: queryCombineMessageDetail
3466
+ * 用途:拉取合并消息详情。
3467
+ */
3468
+ declare function queryCombineMessageDetail(config: ZIMCombineMessageDetailQueryConfig): Promise<ZIMCombineMessageDetailQueriedResult>;
3469
+ /**
3470
+ * API: searchLocalMessages
3471
+ * 用途:在指定会话的本地消息库中按条件搜索消息。
3472
+ */
3473
+ declare function searchLocalMessages(conversationID: string, conversationType: ZIMConversationType$1, config: ZIMMessageSearchConfig): Promise<ZIMMessagesSearchedResult>;
3474
+ /**
3475
+ * API: queryMessages
3476
+ * 用途:根据消息 ID 批量查询指定会话中的消息。
3477
+ */
3478
+ declare function queryMessages(messageIds: string[], conversationID: string, conversationType: ZIMConversationType$1): Promise<ZIMMessageQueriedResult<ZIMSdkMessage, ZIMConversationType$1>>;
3479
+
3480
+ type SdkDetailedResult<T = unknown> = {
3481
+ success: boolean;
3482
+ code?: string | number;
3483
+ message?: string;
3484
+ data?: T;
3485
+ raw: unknown;
3486
+ };
3487
+ type SdkRuntimeErrorObject<T = unknown> = {
3488
+ name: "SdkRuntimeError";
3489
+ success: false;
3490
+ code?: string | number;
3491
+ message: string;
3492
+ data?: T;
3493
+ raw: unknown;
3494
+ };
3495
+ declare class SdkRuntimeError<T = unknown> extends Error {
3496
+ success: false;
3497
+ code?: string | number;
3498
+ data?: T;
3499
+ raw: unknown;
3500
+ constructor(result: SdkDetailedResult<T>);
3501
+ toObject(): SdkRuntimeErrorObject<T>;
3502
+ toJSON(): SdkRuntimeErrorObject<T>;
3503
+ }
3504
+ declare function isSdkRuntimeErrorObject(value: unknown): value is SdkRuntimeErrorObject;
1270
3505
 
1271
3506
  declare const VanshiSdk: ZIM;
1272
3507
 
1273
- export { clearConversationTotalUnreadMessageCount, clearConversationUnreadMessageCount, initSocket as create, VanshiSdk as default, deleteAllConversationMessages, deleteAllConversations, deleteAllMessage, deleteConversation, deleteMessages, isSocketConnected as isConnected, login, logout, off, on, queryConversation, queryGroupMessageReceiptReadMemberList, queryGroupMessageReceiptUnreadMemberList, queryHistoryMessage, queryMessageReceiptsInfo, revokeMessage, sendMediaMessage, sendMessage, sendMessageReceiptsRead };
3508
+ export { ApiResponse, ConversationItem, ConversationQueryParams, IAppendExtraDataParams, IConversation, IIMMessage, IIMRevokeMessage, LastMessageData, LocalMessage, LocalMessageQuery, LocalMessageQueryResult, LocalSendState, LocalStorageApi, LocalStorageStatus, LocalSyncError, LocalSyncFailure, LocalSyncResult, MentionedInfoList, MessageRepliedInfoState$1 as MessageRepliedInfoState, SEDMessageType, SdkHistoryMessage, SdkHistoryResult, SdkLoginOptions, SdkMediaSendResult, SdkRuntimeError, SdkRuntimeErrorObject, SendMessageData, VanshiBlacklistChangedEvent, VanshiConnectionStateChangedEvent, VanshiConversationChangedEvent, VanshiErrorEvent, VanshiEventAck, VanshiEventContext, VanshiEventListener, VanshiEventMap, VanshiEventName, VanshiFriendListChangedEvent, VanshiGroupStateChangedEvent, VanshiMessageDeletedEvent, VanshiMessageEditedEvent, VanshiMessageReceiptChangedEvent, VanshiMessageRevokeReceivedEvent, VanshiMessageSentStatusChangedEvent, VanshiReceiveGroupMessageEvent, VanshiReceivePeerMessageEvent, VanshiSocketConnectError, VanshiTokenWillExpireEvent, VanshiUserInfoUpdatedEvent, VanshiUserStatusUpdatedEvent, ZIMBlacklistCheckedResult, ZIMBlacklistQueriedResult, ZIMBlacklistQueryConfig, ZIMBlacklistUsersAddedResult, ZIMBlacklistUsersRemovedResult, ZIMCXHandleType, ZIMCallAction, ZIMCallActionResult, ZIMCallBaseParams, ZIMCallConversationType, ZIMCallEventEnum, ZIMCallEventPayload, ZIMCallHasOngoingCallParams, ZIMCallHasOngoingCallResult, ZIMCallInviteConfig, ZIMCallInviteMembersParams, ZIMCallInviteResult, ZIMCallJoinMediaConfig, ZIMCallJoinedResult, ZIMCallLiveKitTokenInfo, ZIMCallLocalTrackInfo, ZIMCallMediaState, ZIMCallMemberListResult, ZIMCallMode, ZIMCallRemoteTrackInfo, ZIMCallScreenShareResult, ZIMCallTokenParams, ZIMCallType, ZIMCallUserInfo, ZIMCombineMessage, ZIMCombineMessageDetailQueriedResult, ZIMCombineMessageDetailQueryConfig, ZIMConnectionEvent, ZIMConnectionState, ZIMConnectionStateChangedPayload, ZIMConversation$1 as ZIMConversation, ZIMConversationChangeInfo, ZIMConversationEvent, ZIMConversationNotificationStatus$1 as ZIMConversationNotificationStatus, ZIMConversationNotificationStatusSetResult, ZIMConversationPinnedFilter, ZIMConversationPinnedListQueriedResult, ZIMConversationPinnedStateUpdatedResult, ZIMConversationQueriedResult, ZIMConversationQueryConfig, ZIMConversationTotalUnreadMessageCountQueriedResult, ZIMConversationTotalUnreadMessageCountQueryConfig, ZIMConversationType$1 as ZIMConversationType, ZIMErrorUserInfo, ZIMEventEnum, ZIMExtendedApi, ZIMFriendAliasUpdatedResult, ZIMFriendApplicationAcceptConfig, ZIMFriendApplicationAcceptedResult, ZIMFriendApplicationInfo, ZIMFriendApplicationListQueriedResult, ZIMFriendApplicationListQueryConfig, ZIMFriendApplicationRejectConfig, ZIMFriendApplicationRejectedResult, ZIMFriendApplicationSendConfig, ZIMFriendApplicationSentResult, ZIMFriendApplicationState, ZIMFriendApplicationType, ZIMFriendAttributeMap, ZIMFriendAttributes, ZIMFriendDeleteConfig, ZIMFriendDeleteType, ZIMFriendInfo, ZIMFriendListQueriedResult, ZIMFriendListQueryConfig, ZIMFriendRelationInfo, ZIMFriendsDeletedResult, ZIMFriendsInfoQueriedResult, ZIMGroup, ZIMGroupAdvancedConfig, ZIMGroupAliasUpdatedResult, ZIMGroupApplicationInfo, ZIMGroupApplicationListQueriedResult, ZIMGroupApplicationListQueryConfig, ZIMGroupApplicationState, ZIMGroupApplicationType, ZIMGroupAvatarUrlUpdatedResult, ZIMGroupBeInviteMode, ZIMGroupBeInviteModeUpdatedResult, ZIMGroupCreatedResult, ZIMGroupDismissedResult, ZIMGroupEnterInfo, ZIMGroupEnterType, ZIMGroupFullInfo, ZIMGroupInfo, ZIMGroupInfoQueriedResult, ZIMGroupInviteApplicationAcceptConfig, ZIMGroupInviteApplicationAcceptedResult, ZIMGroupInviteApplicationRejectConfig, ZIMGroupInviteApplicationRejectedResult, ZIMGroupInviteApplicationSendConfig, ZIMGroupInviteApplicationsSentResult, ZIMGroupInviteMode, ZIMGroupInviteModeUpdatedResult, ZIMGroupJoinApplicationAcceptConfig, ZIMGroupJoinApplicationAcceptedResult, ZIMGroupJoinApplicationRejectConfig, ZIMGroupJoinApplicationRejectedResult, ZIMGroupJoinApplicationSendConfig, ZIMGroupJoinApplicationSentResult, ZIMGroupJoinMode, ZIMGroupJoinModeUpdatedResult, ZIMGroupJoinedResult, ZIMGroupLeftResult, ZIMGroupListQueriedResult, ZIMGroupListQueryConfig, ZIMGroupMemberCountQueriedResult, ZIMGroupMemberInfo, ZIMGroupMemberInfoQueriedResult, ZIMGroupMemberKickedResult, ZIMGroupMemberListQueriedResult, ZIMGroupMemberMuteConfig, ZIMGroupMemberMutedListQueriedResult, ZIMGroupMemberNicknameUpdatedResult, ZIMGroupMemberQueryConfig, ZIMGroupMemberRoleUpdatedResult, ZIMGroupMemberSimpleInfo, ZIMGroupMembersMutedResult, ZIMGroupMessageNotificationStatus, ZIMGroupMuteConfig, ZIMGroupMuteInfo, ZIMGroupMuteMode, ZIMGroupMutedResult, ZIMGroupNameUpdatedResult, ZIMGroupNoticeUpdatedResult, ZIMGroupOwnerTransferredResult, ZIMGroupUsersInvitedResult, ZIMGroupVerifyInfo, ZIMLocalMediaMessage, ZIMMediaMessageSendOptions, ZIMMessage$1 as ZIMMessage, ZIMMessageBase$1 as ZIMMessageBase, ZIMMessageDirection$1 as ZIMMessageDirection, ZIMMessageEditConfig, ZIMMessageEditedResult, ZIMMessageItem, ZIMMessageLiteInfo$1 as ZIMMessageLiteInfo, ZIMMessageMentionedInfo, ZIMMessageMentionedType, ZIMMessageOrder, ZIMMessagePriority, ZIMMessageQueriedResult, ZIMMessageReaction$1 as ZIMMessageReaction, ZIMMessageReactionUserInfo$1 as ZIMMessageReactionUserInfo, ZIMMessageReceiptStatus$1 as ZIMMessageReceiptStatus, ZIMMessageRepliedInfo$1 as ZIMMessageRepliedInfo, ZIMMessageRepliedListQueriedResult, ZIMMessageRepliedListQueryConfig, ZIMMessageRevokeConfig, ZIMMessageRevokeStatus, ZIMMessageRootRepliedInfo, ZIMMessageSeDResult, ZIMMessageSearchConfig, ZIMMessageSendConfig, ZIMMessageSendNotification, ZIMMessageSendOptions, ZIMMessageSentResult, ZIMMessageSentStatus$1 as ZIMMessageSentStatus, ZIMMessageType$1 as ZIMMessageType, ZIMMessagesSearchedResult, ZIMPushConfig, ZIMReplyMessageSentResult, ZIMRevokeMessage, ZIMRevokeType, ZIMSEDMediaMessage, ZIMSEDMessage, ZIMSdkExtendable, ZIMSdkMessage, ZIMSdkRecord, ZIMSelfUserInfo, ZIMSelfUserInfoQueriedResult, ZIMTokenRenewedResult, ZIMUserAvatarUrlUpdatedResult, ZIMUserFullInfo, ZIMUserInfo, ZIMUserNameUpdatedResult, ZIMUserOfflinePushRule, ZIMUserOnlineStatus, ZIMUserRelationType, ZIMUserRule, ZIMUserStatus, ZIMUserStatusSubscribeConfig, ZIMUsersInfoQueriedResult, ZIMUsersInfoQueryConfig, ZIMUsersStatusQueriedResult, ZIMUsersStatusSubscribedResult, ZIMUsersStatusUnsubscribedResult, ZIMVoIPConfig, ZIM_LOCAL_CALL_EVENTS, acceptFriendApplication, acceptGroupInviteApplication, acceptGroupJoinApplication, addUsersToBlacklist, callAccept, callCancel, callGetLiveKitToken, callGetMediaState, callGetRoom, callHangup, callHasOngoingCall, callInvite, callInviteMembers, callJoinMedia, callLeaveMedia, callQueryMembers, callReject, callSetCameraEnabled, callSetMicrophoneEnabled, callStartScreenShare, callStopScreenShare, checkUserIsInBlacklist, clearConversationTotalUnreadMessageCount, clearConversationUnreadMessageCount, clearLocalMessages, initSocket as create, createGroup, VanshiSdk as default, deleteAllConversationMessages, deleteAllConversations, deleteAllMessage, deleteConversation, deleteFriends, deleteMessages, dismissGroup, editMessage, getLocalStorageStatus, inviteUsersIntoGroup, isSocketConnected as isConnected, isSdkRuntimeErrorObject, joinGroup, kickGroupMembers, leaveGroup, login, logout, muteGroup, muteGroupMembers, off, on, queryBlacklist, queryCombineMessageDetail, queryConversation, queryConversationList, queryConversationPinnedList, queryConversationTotalUnreadMessageCount, queryFailedMessages, queryFriendApplicationList, queryFriendList, queryFriendsInfo, queryGroupApplicationList, queryGroupInfo, queryGroupList, queryGroupMemberCount, queryGroupMemberInfo, queryGroupMemberList, queryGroupMemberMutedList, queryGroupMessageReceiptReadMemberList, queryGroupMessageReceiptUnreadMemberList, queryHistoryMessage, queryHistoryMessageParams, queryLocalMessages, queryMessageReceiptsInfo, queryMessageRepliedList, queryMessages, querySelfUserInfo, queryUsersInfo, queryUsersStatus, rejectFriendApplication, rejectGroupInviteApplication, rejectGroupJoinApplication, removeUsersFromBlacklist, renewToken, replyMessage, revokeMessage, searchLocalMessages, sendFriendApplication, sendGroupInviteApplications, sendGroupJoinApplication, sendMediaMessage, sendMessage, sendMessageReceiptsRead, setConversationNotificationStatus, setGroupMemberNickname, setGroupMemberRole, subscribeUsersStatus, syncConversationMessages, syncLocalMessages, transferGroupOwner, unsubscribeUsersStatus, updateConversationPinnedState, updateFriendAlias, updateGroupAlias, updateGroupAvatarUrl, updateGroupBeInviteMode, updateGroupInviteMode, updateGroupJoinMode, updateGroupName, updateGroupNotice, updateUserAvatarUrl, updateUserName };