@rongcloud/imlib-next 5.7.0 → 5.7.1
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/index.d.ts +155 -155
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,155 +1,5 @@
|
|
|
1
|
-
import { LogLevel, EnableLogL, ConversationType, MessageDirection, ReceivedStatus, IReadReceiptInfo, IPushConfig, UltraGroupChannelType, ConnectionStatus, IPluginGenerator, IAsyncRes, NotificationStatus, NotificationLevel, IUserProfile, IConversationOption, ITypingMessage, ErrorCode, IChatroomListenerData, IExpansionListenerData, IBlockedMessageInfo, IOperateStatusNotify, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IMessageDeliver, IGroupMessageDeliverStatus, IBaseConversationInfo, IConversationState as IConversationState$1, IGetUltraGroupListOption, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadMentionedOption, IUltraUnreadMsg, IChatroomInfo, IChatRoomEntry, IChatroomEntries, IRemoveChatRoomEntry, IRemoveChatRoomEntries, IRTCRoomBindOption, MentionedType, IMessageReaderResponse, IReceivedMessage, IReceivedConversation, ITagParam, ITagInfo, IConversationTag, FileType, IUploadAuth, UploadMethod, IGroupMessageDeliverInfo, IProxy, IPromiseResult, IResponse } from '@rongcloud/engine';
|
|
2
|
-
export { ChatroomEntryType, ChatroomUserChangeType, ConnectionStatus, ConversationType, EnableLogL, ErrorCode, FileType, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomListenerData, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IConversationOption, IConversationTag, IDeletedExpansion, IDeliveredUser, IEventListener, IExpansionListenerData, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IMessageDeliver, IMessageReader, IMessageReaderResponse, IOperateInfo, IOperateStatusNotify, IOperateSummary, IProxy, IPushConfig, IRTCRoomBindOption, IReadReceiptInfo, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, ITagInfo, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadMentionedOption, IUltraUnreadMsg, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IiOSPushConfig, LogL, LogLevel, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, NotificationLevel, NotificationStatus, ReceivedStatus, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod } from '@rongcloud/engine';
|
|
3
|
-
|
|
4
|
-
declare enum Events {
|
|
5
|
-
/**
|
|
6
|
-
* 连接中
|
|
7
|
-
*/
|
|
8
|
-
CONNECTING = "CONNECTING",
|
|
9
|
-
/**
|
|
10
|
-
* 已连接
|
|
11
|
-
*/
|
|
12
|
-
CONNECTED = "CONNECTED",
|
|
13
|
-
/**
|
|
14
|
-
* 断开连接
|
|
15
|
-
*/
|
|
16
|
-
DISCONNECT = "DISCONNECT",
|
|
17
|
-
/**
|
|
18
|
-
* 链接异常断开(自动重连)
|
|
19
|
-
*/
|
|
20
|
-
SUSPEND = "SUSPEND",
|
|
21
|
-
/**
|
|
22
|
-
* 收到消息
|
|
23
|
-
*/
|
|
24
|
-
MESSAGES = "MESSAGES",
|
|
25
|
-
/**
|
|
26
|
-
* 收到已读回执(单聊)
|
|
27
|
-
*/
|
|
28
|
-
READ_RECEIPT_RECEIVED = "READ_RECEIPT_RECEIVED",
|
|
29
|
-
/**
|
|
30
|
-
* 收到已读回执请求(群聊)
|
|
31
|
-
*/
|
|
32
|
-
MESSAGE_RECEIPT_REQUEST = "MESSAGE_RECEIPT_REQUEST",
|
|
33
|
-
/**
|
|
34
|
-
* 收到已读回执响应(群聊)
|
|
35
|
-
*/
|
|
36
|
-
MESSAGE_RECEIPT_RESPONSE = "MESSAGE_RECEIPT_RESPONSE",
|
|
37
|
-
/**
|
|
38
|
-
* 收到会话变更通知
|
|
39
|
-
*/
|
|
40
|
-
CONVERSATION = "CONVERSATION",
|
|
41
|
-
/**
|
|
42
|
-
* 收到聊天室变更通知。注意:如需监听聊天室成员变化,请提交工单申请开通服务。
|
|
43
|
-
*/
|
|
44
|
-
CHATROOM = "CHATROOM",
|
|
45
|
-
/**
|
|
46
|
-
* 收到扩展变更通知
|
|
47
|
-
*/
|
|
48
|
-
EXPANSION = "EXPANSION",
|
|
49
|
-
/**
|
|
50
|
-
* 离线消息拉取完成
|
|
51
|
-
*/
|
|
52
|
-
PULL_OFFLINE_MESSAGE_FINISHED = "PULL_OFFLINE_MESSAGE_FINISHED",
|
|
53
|
-
/**
|
|
54
|
-
* Tag 变更通知,适用于多端场景,收到此通知时需重新获取 Tag 列表以更新 UI 渲染。
|
|
55
|
-
*/
|
|
56
|
-
TAG = "TAG",
|
|
57
|
-
/**
|
|
58
|
-
* 会话上的 Tag 变更通知,适用于多端场景,收到此通知时需根据本地已渲染的会话列表,逐个获取会话的所有标签,以更新 UI 渲染
|
|
59
|
-
*/
|
|
60
|
-
CONVERSATION_TAG = "CONVERSATION_TAG",
|
|
61
|
-
/**
|
|
62
|
-
* 收到正在输入状态通知
|
|
63
|
-
*/
|
|
64
|
-
TYPING_STATUS = "TYPING_STATUS",
|
|
65
|
-
/**
|
|
66
|
-
* 敏感词回调通知。需要提交工单开启服务后才能使用。默认关闭状态。
|
|
67
|
-
* @since 5.2.0
|
|
68
|
-
*/
|
|
69
|
-
MESSAGE_BLOCKED = "MESSAGE_BLOCKED",
|
|
70
|
-
/**
|
|
71
|
-
* 超级群会话列表同步完成,此时可以调用超级群相关接口。
|
|
72
|
-
* @since 5.2.0
|
|
73
|
-
*/
|
|
74
|
-
ULTRA_GROUP_ENABLE = "ULTRA_GROUP_ENABLE",
|
|
75
|
-
/**
|
|
76
|
-
* 超级群输入状态通知
|
|
77
|
-
* @since 5.2.0
|
|
78
|
-
*/
|
|
79
|
-
OPERATE_STATUS = "OPERATE_STATUS",
|
|
80
|
-
/**
|
|
81
|
-
* 超级群消息扩展更新通知
|
|
82
|
-
* @since 5.2.0
|
|
83
|
-
*/
|
|
84
|
-
ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED = "ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED",
|
|
85
|
-
/**
|
|
86
|
-
* 超级群消息被修改通知
|
|
87
|
-
* @since 5.2.0
|
|
88
|
-
*/
|
|
89
|
-
ULTRA_GROUP_MESSAGE_MODIFIED = "ULTRA_GROUP_MESSAGE_MODIFIED",
|
|
90
|
-
/**
|
|
91
|
-
* 超级群消息被撤回通知
|
|
92
|
-
* @since 5.2.0
|
|
93
|
-
*/
|
|
94
|
-
ULTRA_GROUP_MESSAGE_RECALLED = "ULTRA_GROUP_MESSAGE_RECALLED",
|
|
95
|
-
/**
|
|
96
|
-
* 超级群频道类型变更
|
|
97
|
-
* @since 5.4.2
|
|
98
|
-
*/
|
|
99
|
-
ULTRA_GROUP_CHANNEL_TYPE_CHANGE = "ULTRA_GROUP_CHANNEL_TYPE_CHANGE",
|
|
100
|
-
/**
|
|
101
|
-
* 超级群频道被删除
|
|
102
|
-
* @since 5.4.2
|
|
103
|
-
*/
|
|
104
|
-
ULTRA_GROUP_CHANNEL_DELETE = "ULTRA_GROUP_CHANNEL_DELETE",
|
|
105
|
-
/**
|
|
106
|
-
* 超级群私有频道成员变更-退出
|
|
107
|
-
* @since 5.4.2
|
|
108
|
-
*/
|
|
109
|
-
ULTRA_GROUP_CHANNEL_USER_KICKED = "ULTRA_GROUP_CHANNEL_USER_KICKED",
|
|
110
|
-
/**
|
|
111
|
-
* 单聊消息送达通知
|
|
112
|
-
* @hidden 暂仅 Beem 使用,无需公开
|
|
113
|
-
* @since 5.6.0
|
|
114
|
-
*/
|
|
115
|
-
PRIVATE_MESSAGE_DELIVERED = "PRIVATE_MESSAGE_DELIVERED",
|
|
116
|
-
/**
|
|
117
|
-
* 群组消息送达状态通知
|
|
118
|
-
* @hidden 暂仅 Beem 使用,无需公开
|
|
119
|
-
* @since 5.6.0
|
|
120
|
-
*/
|
|
121
|
-
GROUP_MESSAGE_DELIVERED = "GROUP_MESSAGE_DELIVERED"
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* 发送状态
|
|
125
|
-
* @category Enum
|
|
126
|
-
*/
|
|
127
|
-
declare enum SentStatus {
|
|
128
|
-
/**
|
|
129
|
-
* 发送中。
|
|
130
|
-
*/
|
|
131
|
-
SENDING = 10,
|
|
132
|
-
/**
|
|
133
|
-
* 发送失败。
|
|
134
|
-
*/
|
|
135
|
-
FAILED = 20,
|
|
136
|
-
/**
|
|
137
|
-
* 已发送。
|
|
138
|
-
*/
|
|
139
|
-
SENT = 30,
|
|
140
|
-
/**
|
|
141
|
-
* 对方已接收。
|
|
142
|
-
*/
|
|
143
|
-
RECEIVED = 40,
|
|
144
|
-
/**
|
|
145
|
-
* 对方已读。
|
|
146
|
-
*/
|
|
147
|
-
READ = 50,
|
|
148
|
-
/**
|
|
149
|
-
* 对方已销毁。
|
|
150
|
-
*/
|
|
151
|
-
DESTROYED = 60
|
|
152
|
-
}
|
|
1
|
+
import { LogLevel, EnableLogL, IRuntime, ConversationType, MessageDirection, ReceivedStatus, SentStatus, IReadReceiptInfo, IPushConfig, UltraGroupChannelType, ConnectionStatus, IPluginGenerator, IAsyncRes, NotificationStatus, NotificationLevel, IUserProfile, IConversationOption, ITypingMessage, ErrorCode, IChatroomListenerData, IExpansionListenerData, IBlockedMessageInfo, IOperateStatusNotify, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IMessageDeliver, IGroupMessageDeliverStatus, IBaseConversationInfo, IConversationState as IConversationState$1, IGetUltraGroupListOption, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadMentionedOption, IUltraUnreadMsg, IChatroomInfo, IChatRoomEntry, IChatroomEntries, IRemoveChatRoomEntry, IRemoveChatRoomEntries, IRTCRoomBindOption, MentionedType, IMessageReaderResponse, IReceivedMessage, IReceivedConversation, ITagParam, ITagInfo, IConversationTag, FileType, IUploadAuth, UploadMethod, IGroupMessageDeliverInfo, IProxy, IPromiseResult, IResponse } from '@rongcloud/engine';
|
|
2
|
+
export { ChatroomEntryType, ChatroomUserChangeType, ConnectionStatus, ConversationType, EnableLogL, ErrorCode, FileType, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomListenerData, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IConversationOption, IConversationTag, IDeletedExpansion, IDeliveredUser, IEventListener, IExpansionListenerData, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IMessageDeliver, IMessageReader, IMessageReaderResponse, IOperateInfo, IOperateStatusNotify, IOperateSummary, IProxy, IPushConfig, IRTCRoomBindOption, IReadReceiptInfo, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, ITagInfo, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadMentionedOption, IUltraUnreadMsg, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IiOSPushConfig, LogL, LogLevel, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, NotificationLevel, NotificationStatus, RCConnectionStatus, ReceivedStatus, SentStatus, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod } from '@rongcloud/engine';
|
|
153
3
|
|
|
154
4
|
declare type IInitOption = {
|
|
155
5
|
/**
|
|
@@ -217,6 +67,11 @@ declare type IInitOption = {
|
|
|
217
67
|
* IndexDB 数据库内的日志有效期,单位为小时,有效值为 `24` - `168`,默认 IndexDB 内日志数据有效期 168 小时
|
|
218
68
|
*/
|
|
219
69
|
logExpireTime?: number;
|
|
70
|
+
/**
|
|
71
|
+
* @hidden
|
|
72
|
+
* 创建自定义的 Runtime 运行时,以便于业务层自行适配不同的运行时环境
|
|
73
|
+
*/
|
|
74
|
+
__runtimeCreator__?: () => IRuntime;
|
|
220
75
|
};
|
|
221
76
|
/**
|
|
222
77
|
* 用户收到的消息结构
|
|
@@ -317,7 +172,8 @@ interface IAReceivedMessage {
|
|
|
317
172
|
*/
|
|
318
173
|
receivedStatus: ReceivedStatus;
|
|
319
174
|
/**
|
|
320
|
-
* 消息的发送状态,Electron
|
|
175
|
+
* 消息的发送状态,Electron 平台可由 SDK 内自动更新和用户设置,
|
|
176
|
+
* web 端仅支持 SDK 内更新为 发送中、已发送和发送失败
|
|
321
177
|
*/
|
|
322
178
|
sentStatus?: SentStatus;
|
|
323
179
|
/**
|
|
@@ -426,10 +282,131 @@ declare function connect(token: string, reconnectKickEnable?: boolean): Promise<
|
|
|
426
282
|
}>>;
|
|
427
283
|
/**
|
|
428
284
|
* 断开当前用户的连接
|
|
285
|
+
* @param closeDB 是否关闭数据库,默认为 true,仅 Electron 平台有效
|
|
429
286
|
* @category 基础
|
|
430
287
|
* @description 调用后将不再接收消息,不可发送消息,不可获取历史消息,不可获取会话列表
|
|
431
288
|
*/
|
|
432
|
-
declare function disconnect(): Promise<void>;
|
|
289
|
+
declare function disconnect(closeDB?: boolean): Promise<void>;
|
|
290
|
+
|
|
291
|
+
declare enum Events {
|
|
292
|
+
/**
|
|
293
|
+
* 连接中
|
|
294
|
+
*/
|
|
295
|
+
CONNECTING = "CONNECTING",
|
|
296
|
+
/**
|
|
297
|
+
* 已连接
|
|
298
|
+
*/
|
|
299
|
+
CONNECTED = "CONNECTED",
|
|
300
|
+
/**
|
|
301
|
+
* 断开连接
|
|
302
|
+
*/
|
|
303
|
+
DISCONNECT = "DISCONNECT",
|
|
304
|
+
/**
|
|
305
|
+
* 链接异常断开(自动重连)
|
|
306
|
+
*/
|
|
307
|
+
SUSPEND = "SUSPEND",
|
|
308
|
+
/**
|
|
309
|
+
* 收到消息
|
|
310
|
+
*/
|
|
311
|
+
MESSAGES = "MESSAGES",
|
|
312
|
+
/**
|
|
313
|
+
* 收到已读回执(单聊)
|
|
314
|
+
*/
|
|
315
|
+
READ_RECEIPT_RECEIVED = "READ_RECEIPT_RECEIVED",
|
|
316
|
+
/**
|
|
317
|
+
* 收到已读回执请求(群聊)
|
|
318
|
+
*/
|
|
319
|
+
MESSAGE_RECEIPT_REQUEST = "MESSAGE_RECEIPT_REQUEST",
|
|
320
|
+
/**
|
|
321
|
+
* 收到已读回执响应(群聊)
|
|
322
|
+
*/
|
|
323
|
+
MESSAGE_RECEIPT_RESPONSE = "MESSAGE_RECEIPT_RESPONSE",
|
|
324
|
+
/**
|
|
325
|
+
* 收到会话变更通知
|
|
326
|
+
*/
|
|
327
|
+
CONVERSATION = "CONVERSATION",
|
|
328
|
+
/**
|
|
329
|
+
* 收到聊天室变更通知。注意:如需监听聊天室成员变化,请提交工单申请开通服务。
|
|
330
|
+
*/
|
|
331
|
+
CHATROOM = "CHATROOM",
|
|
332
|
+
/**
|
|
333
|
+
* 收到扩展变更通知
|
|
334
|
+
*/
|
|
335
|
+
EXPANSION = "EXPANSION",
|
|
336
|
+
/**
|
|
337
|
+
* 离线消息拉取完成
|
|
338
|
+
*/
|
|
339
|
+
PULL_OFFLINE_MESSAGE_FINISHED = "PULL_OFFLINE_MESSAGE_FINISHED",
|
|
340
|
+
/**
|
|
341
|
+
* Tag 变更通知,适用于多端场景,收到此通知时需重新获取 Tag 列表以更新 UI 渲染。
|
|
342
|
+
*/
|
|
343
|
+
TAG = "TAG",
|
|
344
|
+
/**
|
|
345
|
+
* 会话上的 Tag 变更通知,适用于多端场景,收到此通知时需根据本地已渲染的会话列表,逐个获取会话的所有标签,以更新 UI 渲染
|
|
346
|
+
*/
|
|
347
|
+
CONVERSATION_TAG = "CONVERSATION_TAG",
|
|
348
|
+
/**
|
|
349
|
+
* 收到正在输入状态通知
|
|
350
|
+
*/
|
|
351
|
+
TYPING_STATUS = "TYPING_STATUS",
|
|
352
|
+
/**
|
|
353
|
+
* 敏感词回调通知。需要提交工单开启服务后才能使用。默认关闭状态。
|
|
354
|
+
* @since 5.2.0
|
|
355
|
+
*/
|
|
356
|
+
MESSAGE_BLOCKED = "MESSAGE_BLOCKED",
|
|
357
|
+
/**
|
|
358
|
+
* 超级群会话列表同步完成,此时可以调用超级群相关接口。
|
|
359
|
+
* @since 5.2.0
|
|
360
|
+
*/
|
|
361
|
+
ULTRA_GROUP_ENABLE = "ULTRA_GROUP_ENABLE",
|
|
362
|
+
/**
|
|
363
|
+
* 超级群输入状态通知
|
|
364
|
+
* @since 5.2.0
|
|
365
|
+
*/
|
|
366
|
+
OPERATE_STATUS = "OPERATE_STATUS",
|
|
367
|
+
/**
|
|
368
|
+
* 超级群消息扩展更新通知
|
|
369
|
+
* @since 5.2.0
|
|
370
|
+
*/
|
|
371
|
+
ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED = "ULTRA_GROUP_MESSAGE_EXPANSION_UPDATED",
|
|
372
|
+
/**
|
|
373
|
+
* 超级群消息被修改通知
|
|
374
|
+
* @since 5.2.0
|
|
375
|
+
*/
|
|
376
|
+
ULTRA_GROUP_MESSAGE_MODIFIED = "ULTRA_GROUP_MESSAGE_MODIFIED",
|
|
377
|
+
/**
|
|
378
|
+
* 超级群消息被撤回通知
|
|
379
|
+
* @since 5.2.0
|
|
380
|
+
*/
|
|
381
|
+
ULTRA_GROUP_MESSAGE_RECALLED = "ULTRA_GROUP_MESSAGE_RECALLED",
|
|
382
|
+
/**
|
|
383
|
+
* 超级群频道类型变更
|
|
384
|
+
* @since 5.4.2
|
|
385
|
+
*/
|
|
386
|
+
ULTRA_GROUP_CHANNEL_TYPE_CHANGE = "ULTRA_GROUP_CHANNEL_TYPE_CHANGE",
|
|
387
|
+
/**
|
|
388
|
+
* 超级群频道被删除
|
|
389
|
+
* @since 5.4.2
|
|
390
|
+
*/
|
|
391
|
+
ULTRA_GROUP_CHANNEL_DELETE = "ULTRA_GROUP_CHANNEL_DELETE",
|
|
392
|
+
/**
|
|
393
|
+
* 超级群私有频道成员变更-退出
|
|
394
|
+
* @since 5.4.2
|
|
395
|
+
*/
|
|
396
|
+
ULTRA_GROUP_CHANNEL_USER_KICKED = "ULTRA_GROUP_CHANNEL_USER_KICKED",
|
|
397
|
+
/**
|
|
398
|
+
* 单聊消息送达通知
|
|
399
|
+
* @hidden 暂仅 Beem 使用,无需公开
|
|
400
|
+
* @since 5.6.0
|
|
401
|
+
*/
|
|
402
|
+
PRIVATE_MESSAGE_DELIVERED = "PRIVATE_MESSAGE_DELIVERED",
|
|
403
|
+
/**
|
|
404
|
+
* 群组消息送达状态通知
|
|
405
|
+
* @hidden 暂仅 Beem 使用,无需公开
|
|
406
|
+
* @since 5.6.0
|
|
407
|
+
*/
|
|
408
|
+
GROUP_MESSAGE_DELIVERED = "GROUP_MESSAGE_DELIVERED"
|
|
409
|
+
}
|
|
433
410
|
|
|
434
411
|
declare class BaseMessage<T = any> {
|
|
435
412
|
readonly messageType: string;
|
|
@@ -698,6 +675,10 @@ interface IUserInfo {
|
|
|
698
675
|
* 用户头像地址
|
|
699
676
|
*/
|
|
700
677
|
portrait?: string;
|
|
678
|
+
/**
|
|
679
|
+
* 备注
|
|
680
|
+
*/
|
|
681
|
+
alias?: string;
|
|
701
682
|
};
|
|
702
683
|
}
|
|
703
684
|
/**
|
|
@@ -2076,6 +2057,23 @@ declare function getPrivateMessageDeliverTime(messageUId: string): Promise<IAsyn
|
|
|
2076
2057
|
* @description 暂仅支持 Electron 平台
|
|
2077
2058
|
*/
|
|
2078
2059
|
declare function getGroupMessageDeliverList(targetId: string, messageUId: string): Promise<IAsyncRes<IGroupMessageDeliverInfo>>;
|
|
2060
|
+
/**
|
|
2061
|
+
* 设置融云消息重排开关
|
|
2062
|
+
*
|
|
2063
|
+
* 发送方弱网情况下发送消息,消息到达服务但发送方没有收到服务 ack,导致发送方认为消息发送失败
|
|
2064
|
+
* 此种情况下,服务端和接收方都会收到第一条消息
|
|
2065
|
+
* 此时发送方重发该消息,再次达到服务,那么此时服务端会有两条消息(消息内容相同,messageUid 不同
|
|
2066
|
+
* 接收方会收到两条内容相同 messageUid 不同的消息,SDK 此时会把第二条相同内容消息排重掉
|
|
2067
|
+
* 以此来保证重发的相同内容消息,发送方只有一条消息,接收方也只有一条消息
|
|
2068
|
+
*
|
|
2069
|
+
* 当消息量少时,消息排重影响不大;但是本地存在大量消息时,排重会出现性能问题
|
|
2070
|
+
* 当本地存在大量消息,且发生收消息卡顿时,建议将排重关闭
|
|
2071
|
+
*
|
|
2072
|
+
* @param enableCheck 是否使用融云消息重排机制 true: 开启, false: 关闭
|
|
2073
|
+
* @description
|
|
2074
|
+
*
|
|
2075
|
+
*/
|
|
2076
|
+
declare function setCheckDuplicateMessage(enableCheck: boolean): Promise<IAsyncRes<boolean>>;
|
|
2079
2077
|
|
|
2080
2078
|
/**
|
|
2081
2079
|
* 清除本地数据, 包括消息列表、会话列表、拉取消息的时间戳
|
|
@@ -2098,6 +2096,7 @@ declare const index_deleteMessagesByTimestamp: typeof deleteMessagesByTimestamp;
|
|
|
2098
2096
|
declare const index_insertMessage: typeof insertMessage;
|
|
2099
2097
|
declare const index_getPrivateMessageDeliverTime: typeof getPrivateMessageDeliverTime;
|
|
2100
2098
|
declare const index_getGroupMessageDeliverList: typeof getGroupMessageDeliverList;
|
|
2099
|
+
declare const index_setCheckDuplicateMessage: typeof setCheckDuplicateMessage;
|
|
2101
2100
|
declare const index_clearLocalData: typeof clearLocalData;
|
|
2102
2101
|
declare namespace index {
|
|
2103
2102
|
export {
|
|
@@ -2117,6 +2116,7 @@ declare namespace index {
|
|
|
2117
2116
|
index_insertMessage as insertMessage,
|
|
2118
2117
|
index_getPrivateMessageDeliverTime as getPrivateMessageDeliverTime,
|
|
2119
2118
|
index_getGroupMessageDeliverList as getGroupMessageDeliverList,
|
|
2119
|
+
index_setCheckDuplicateMessage as setCheckDuplicateMessage,
|
|
2120
2120
|
index_clearLocalData as clearLocalData,
|
|
2121
2121
|
};
|
|
2122
2122
|
}
|
|
@@ -2140,4 +2140,4 @@ declare function getProxy(): IPromiseResult<IProxy>;
|
|
|
2140
2140
|
*/
|
|
2141
2141
|
declare function testProxy(proxy: IProxy, testHost: string): IPromiseResult<IResponse>;
|
|
2142
2142
|
|
|
2143
|
-
export { BaseMessage, _default$6 as CombineMessage, ConnectType, EventListeners, Events, _default$5 as FileMessage, _default$4 as GIFMessage, GetHistoryMessageOption, GetHistoryMessageResult, _default$9 as HQVoiceMessage, IAReceivedConversation, IAReceivedConversationByTag, IAReceivedMessage, ICombineMessageBody, IConversationEvent, IConversationState, IConversationUpdateItem, IExtraData, IFileMessageBody, IGIFMessageBody, IGetHistoryMessagesByTypesOption, IHQVoiceMessageBody, IImageMessageBody, IImageMessageOption, IInitOption, IInsertOptions, ILocationMessageBody, IMessageDesc, IMessageReceiptRequestEvent, IMessageReceiptResponseEvent, IMessagesEvent, IReadReceiptReceivedEvent, IRecallMessageOptions, IReceivedUpdateConversation, IReferenceMessageBody, IRichContentMessageBody, ISearchMessageInTimeRangeOption, ISendBody, ISendFileMessageOptions, ISendImageMessageOptions, ISendMessageOptions, ISendSightMessageOptions, ISightMessageBody, ITextMessageBody, IThumbnailConfig, ITypingStatusEvent, IUploadHooks, IUploadMessageOption, IUserInfo, IVoiceMessageBody, _default$a as ImageMessage, _default$2 as LocationMessage, MentionedInfo$1 as MentionedInfo, MentionedInfo as MentionedInfoBody, MessageConstructor, MessageType, _default$1 as ReferenceMessage, _default as RichContentMessage,
|
|
2143
|
+
export { BaseMessage, _default$6 as CombineMessage, ConnectType, EventListeners, Events, _default$5 as FileMessage, _default$4 as GIFMessage, GetHistoryMessageOption, GetHistoryMessageResult, _default$9 as HQVoiceMessage, IAReceivedConversation, IAReceivedConversationByTag, IAReceivedMessage, ICombineMessageBody, IConversationEvent, IConversationState, IConversationUpdateItem, IExtraData, IFileMessageBody, IGIFMessageBody, IGetHistoryMessagesByTypesOption, IHQVoiceMessageBody, IImageMessageBody, IImageMessageOption, IInitOption, IInsertOptions, ILocationMessageBody, IMessageDesc, IMessageReceiptRequestEvent, IMessageReceiptResponseEvent, IMessagesEvent, IReadReceiptReceivedEvent, IRecallMessageOptions, IReceivedUpdateConversation, IReferenceMessageBody, IRichContentMessageBody, ISearchMessageInTimeRangeOption, ISendBody, ISendFileMessageOptions, ISendImageMessageOptions, ISendMessageOptions, ISendSightMessageOptions, ISightMessageBody, ITextMessageBody, IThumbnailConfig, ITypingStatusEvent, IUploadHooks, IUploadMessageOption, IUserInfo, IVoiceMessageBody, _default$a as ImageMessage, _default$2 as LocationMessage, MentionedInfo$1 as MentionedInfo, MentionedInfo as MentionedInfoBody, MessageConstructor, MessageType, _default$1 as ReferenceMessage, _default as RichContentMessage, _default$8 as SightMessage, _default$7 as TextMessage, _default$3 as VoiceMessage, __addSDKVersion, addConversationsToTag, addEventListener, addTag, addToBlacklist, bindRTCRoomForChatroom, clearAllMessagesUnreadStatus, clearEventListeners, clearHistoryMessages, clearMessages$1 as clearMessages, clearMessagesUnreadStatus, clearTextMessageDraft, clearUnreadCountByTimestamp, connect, deleteLocalMessagesByTimestamp, deleteMessages$1 as deleteMessages, destroy, disconnect, index as electronExtension, forceRemoveChatRoomEntry, forceSetChatRoomEntry, getAllChatRoomEntries, getAllConversationState, getAllUltraGroupUnreadCount, getAllUltraGroupUnreadMentionedCount, getAllUnreadMentionedCount, getBlacklist, getBlacklistStatus, getBlockUltraGroupList, getBlockedConversationList, getChatRoomEntry, getChatRoomInfo, getChatroomHistoryMessages, getConnectionStatus, getConversation, getConversationList$1 as getConversationList, getConversationNotificationLevel, getConversationNotificationStatus, getConversationsFromTagByPage, getCurrentUserId, getDeviceId, getFileToken, getFileUrl, getFirstUnreadMessage, getHistoryMessages, getMessage, getMessageReader, getProxy, getRemoteHistoryMessages, getServerTime, getTags, getTagsFromConversation, getTextMessageDraft, getTopConversationList, getTotalUnreadCount, getTotalUnreadCountByLevels, getTotalUnreadMentionedCountByLevels, getUltraGroupDefaultNotificationLevel, getUltraGroupFirstUnreadMessageTimestamp, getUltraGroupList, getUltraGroupMessageListByMessageUId, getUltraGroupUnreadCountByTargetId, getUltraGroupUnreadMentionedCountByTargetId, getUltraGroupUnreadMentionedMessages, getUnreadConversationList, getUnreadCount, getUnreadCountByTag, getUnreadMentionedCount, getUnreadMentionedMessages, init, insertMessage$1 as insertMessage, installPlugin, joinChatRoom, joinExistChatRoom, modifyMessage, onceEventListener, quitChatRoom, recallMessage, registerMessageType, removeAllExpansionForUltraGroupMessage, removeChatRoomEntries, removeChatRoomEntry, removeConversation, removeConversationsFromTag, removeEventListener, removeEventListeners, removeExpansionForUltraGroupMessage, removeFromBlacklist, removeMessageExpansionForKey, removeTag, removeTagFromConversations, removeTagsFromConversation, saveTextMessageDraft, searchConversationByContent$1 as searchConversationByContent, searchMessages$1 as searchMessages, sendFileMessage, sendHQVoiceMessage, sendImageMessage, sendMessage, sendReadReceiptMessage, sendReadReceiptRequest, sendReadReceiptResponse, sendReadReceiptResponseV2, sendSightMessage, sendSyncReadStatusMessage, sendTextMessage, sendTypingStatusMessage, sendUltraGroupTypingStatus, setChatRoomEntries, setChatRoomEntry, setConversationNotificationLevel, setConversationNotificationStatus, setConversationToTop, setConversationToTopInTag, setMessageReceivedStatus$1 as setMessageReceivedStatus, setProxy, setUltraGroupDefaultNotificationLevel, testProxy, updateExpansionForUltraGroupMessage, updateMessageExpansion, updateTag };
|