@rongcloud/imlib-next 5.8.6-alpha.1 → 5.9.0-alpha.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 +278 -26
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { LogLevel, EnableLogL, IRuntime, AreaCode, ConversationType, MessageDirection, ReceivedStatus, SentStatus, IReadReceiptInfo, IPushConfig, UltraGroupChannelType, RCConnectionStatus, IPluginGenerator, IAsyncRes, NotificationStatus, NotificationLevel, IUltraUnreadMsg, IUserProfile, IConversationOption, ITypingMessage, IUpdateItem, ErrorCode, IChatroomListenerData, IExpansionListenerData, IBlockedMessageInfo, IOperateStatusNotify, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUserGroupStatusInfo, IMessageDeliver, IGroupMessageDeliverStatus, IBaseConversationInfo, IConversationState as IConversationState$1, IGetUltraGroupListOption, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadMentionedOption, IUltraGroupUnreadInfo, IChatroomJoinResponse, IChatroomInfo, IChatRoomEntry, IChatroomEntries, IRemoveChatRoomEntry, IRemoveChatRoomEntries, IRTCRoomBindOption, MentionedInfoBody, IMessageReaderResponse, IReceivedMessage, IReceivedConversation, ITagParam, ITagInfo, IConversationTag, FileType, IUploadAuth, IDownloadAuth, UploadMethod, IInsertMessage, IGroupMessageDeliverInfo, IProxy, IPromiseResult, IResponse } from '@rongcloud/engine';
|
|
2
|
-
export { AreaCode, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, ConnectionStatus, ConversationType, EnableLogL, ErrorCode, FileType, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListenerData, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IConversationIdentifier, IConversationOption, IConversationTag, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEventListener, IExpansionListenerData, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IInsertMessage, IMessageDeliver, IMessageReader, IMessageReaderResponse, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPromiseResult, IProxy, IPushConfig, IRTCRoomBindOption, IReadReceiptInfo, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IResponse, ITagInfo, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraUnreadMsg, IUpdateItem, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IiOSPushConfig, LogL, LogLevel, MentionedInfoBody, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, NotificationLevel, NotificationStatus, OperateStatus, RCConnectionStatus, ReceivedStatus, SentStatus, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod } from '@rongcloud/engine';
|
|
3
|
-
import { IUploadInfo, IUploadResult } from '@rc-embed/upload/type';
|
|
1
|
+
import { LogLevel, EnableLogL, IRuntime, AreaCode, ConversationType, MessageDirection, ReceivedStatus, SentStatus, IReadReceiptInfo, IPushConfig, UltraGroupChannelType, RCConnectionStatus, IPluginGenerator, IAsyncRes, NotificationStatus, NotificationLevel, IUltraUnreadMsg, IUserProfile, IConversationOption, ITypingMessage, IUpdateItem, ErrorCode, IChatroomListenerData, IExpansionListenerData, IBlockedMessageInfo, IOperateStatusNotify, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUserGroupStatusInfo, IMessageDeliver, IGroupMessageDeliverStatus, IReadReceiptData, ISyncReadStatusData, IBaseConversationInfo, IConversationState as IConversationState$1, IGetUltraGroupListOption, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadMentionedOption, IUltraGroupUnreadInfo, IChatroomJoinResponse, IChatroomInfo, IChatRoomEntry, IChatroomEntries, IRemoveChatRoomEntry, IRemoveChatRoomEntries, IRTCRoomBindOption, MentionedInfoBody, ICombineV2MessageContent, IMessageReadReceiptV4Response, IGroupReadReceiptData, IClearMessageOption, IMessageReaderResponse, IFirstUnreadMessageInfo, IReceivedMessage, IReceivedConversation, ITagParam, ITagInfo, IConversationTag, FileType, IUploadAuth, IDownloadAuth, UploadMethod, IInsertMessage, IGroupMessageDeliverInfo, IProxy, IPromiseResult, IResponse } from '@rongcloud/engine';
|
|
2
|
+
export { AreaCode, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, ConnectionStatus, ConversationType, EnableLogL, ErrorCode, FileType, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListenerData, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IClearMessageOption, ICombinedMessage, IConversationIdentifier, IConversationOption, IConversationTag, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEventListener, IExpansionListenerData, IFirstUnreadMessageInfo, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupReadReceiptData, IInsertMessage, IMessageDeliver, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPrivateReadReceiptData, IPromiseResult, IProxy, IPushConfig, IRTCRoomBindOption, IReadReceiptData, IReadReceiptInfo, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IResponse, ISyncReadStatusData, ITagInfo, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraUnreadMsg, IUpdateItem, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IiOSPushConfig, LogL, LogLevel, MentionedInfoBody, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, NotificationLevel, NotificationStatus, OperateStatus, PushImportanceHonor, RCConnectionStatus, ReceivedStatus, SentStatus, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod } from '@rongcloud/engine';
|
|
4
3
|
export { IUploadInfo, IUploadResult } from '@rc-embed/upload/type';
|
|
4
|
+
import { IUploadInfo, UploadTask, IUploadResult } from '@rc-embed/upload';
|
|
5
|
+
export { UploadTask } from '@rc-embed/upload';
|
|
5
6
|
|
|
6
7
|
declare type IInitOption = {
|
|
7
8
|
/**
|
|
@@ -84,10 +85,6 @@ declare type IInitOption = {
|
|
|
84
85
|
* @since 5.7.7
|
|
85
86
|
*/
|
|
86
87
|
logServerUrl?: string;
|
|
87
|
-
/**
|
|
88
|
-
* 私有云环境配置
|
|
89
|
-
*/
|
|
90
|
-
environment?: string;
|
|
91
88
|
};
|
|
92
89
|
/**
|
|
93
90
|
* 用户收到的消息结构
|
|
@@ -337,6 +334,16 @@ declare enum Events {
|
|
|
337
334
|
* 收到已读回执响应(群聊)
|
|
338
335
|
*/
|
|
339
336
|
MESSAGE_RECEIPT_RESPONSE = "MESSAGE_RECEIPT_RESPONSE",
|
|
337
|
+
/**
|
|
338
|
+
* 收到已读回执(V4 版本)
|
|
339
|
+
* @since 5.9.0
|
|
340
|
+
*/
|
|
341
|
+
MESSAGE_READ_RECEIPT_V4 = "MESSAGE_READ_RECEIPT_V4",
|
|
342
|
+
/**
|
|
343
|
+
* 收到会话已读时间同步(需开通服务 sesDriven),收到此通知时 SDK 内会处理清除会话未读数
|
|
344
|
+
* @since 5.9.0
|
|
345
|
+
*/
|
|
346
|
+
SYNC_READ_STATUS = "SYNC_READ_STATUS",
|
|
340
347
|
/**
|
|
341
348
|
* 收到会话变更通知
|
|
342
349
|
*/
|
|
@@ -553,6 +560,10 @@ interface IAReceivedConversation {
|
|
|
553
560
|
* @since 5.8.4
|
|
554
561
|
*/
|
|
555
562
|
operationTime?: number;
|
|
563
|
+
/**
|
|
564
|
+
* 会话草稿
|
|
565
|
+
*/
|
|
566
|
+
draft?: string;
|
|
556
567
|
}
|
|
557
568
|
/**
|
|
558
569
|
* @category Interface
|
|
@@ -901,6 +912,11 @@ declare type EventListeners = {
|
|
|
901
912
|
* @hidden
|
|
902
913
|
*/
|
|
903
914
|
[Events.GROUP_MESSAGE_DELIVERED]: (list: IGroupMessageDeliverStatus[]) => void;
|
|
915
|
+
[Events.MESSAGE_READ_RECEIPT_V4]: (data: IReadReceiptData) => void;
|
|
916
|
+
/**
|
|
917
|
+
* @hidden
|
|
918
|
+
*/
|
|
919
|
+
[Events.SYNC_READ_STATUS]: (list: ISyncReadStatusData) => void;
|
|
904
920
|
};
|
|
905
921
|
|
|
906
922
|
/**
|
|
@@ -968,6 +984,32 @@ declare function getConversation(options: IConversationOption): Promise<IAsyncRe
|
|
|
968
984
|
* @category 会话
|
|
969
985
|
*/
|
|
970
986
|
declare function removeConversation(options: IConversationOption): Promise<IAsyncRes<void>>;
|
|
987
|
+
/**
|
|
988
|
+
* 批量删除会话
|
|
989
|
+
* @param conversations 会话列表,最大数量为 20
|
|
990
|
+
* @category 会话
|
|
991
|
+
* @since 5.9.0
|
|
992
|
+
* @description 此方法不删除会话内的消息。如果此会话中有新的消息,该会话将重新在会话列表中显示,并显示最近的历史消息。
|
|
993
|
+
*
|
|
994
|
+
* 支持的会话类型:单聊, 群聊, 系统消息
|
|
995
|
+
* @example
|
|
996
|
+
* ```js
|
|
997
|
+
* batchRemoveConversation([
|
|
998
|
+
* {
|
|
999
|
+
* conversationType: ConversationType.PRIVATE,
|
|
1000
|
+
* targetId: 'targetId',
|
|
1001
|
+
* channelId: 'channelId',
|
|
1002
|
+
* }],
|
|
1003
|
+
* ).then(res => {
|
|
1004
|
+
* if (res.code === ErrorCode.SUCCESS) {
|
|
1005
|
+
* console.log('删除成功')
|
|
1006
|
+
* } else {
|
|
1007
|
+
* console.log('删除失败', res.code)
|
|
1008
|
+
* }
|
|
1009
|
+
* })
|
|
1010
|
+
* ```
|
|
1011
|
+
*/
|
|
1012
|
+
declare function batchRemoveConversation(conversations: IConversationOption[]): Promise<IAsyncRes<void>>;
|
|
971
1013
|
/**
|
|
972
1014
|
* 获取会话文本草稿
|
|
973
1015
|
* @category 草稿
|
|
@@ -1048,6 +1090,32 @@ declare function clearAllMessagesUnreadStatus(): Promise<IAsyncRes<ErrorCode>>;
|
|
|
1048
1090
|
* @category 会话
|
|
1049
1091
|
*/
|
|
1050
1092
|
declare function setConversationNotificationLevel(options: IConversationOption, notificationLevel: NotificationLevel): Promise<IAsyncRes<void>>;
|
|
1093
|
+
/**
|
|
1094
|
+
* 批量设置会话免打扰级别
|
|
1095
|
+
* @param conversations 会话列表, 最大数量为 20
|
|
1096
|
+
* @param notificationLevel 免打扰级别
|
|
1097
|
+
* @category 会话
|
|
1098
|
+
* @since 5.9.0
|
|
1099
|
+
* @description 支持 单聊、群聊、系统会话
|
|
1100
|
+
* @example
|
|
1101
|
+
* ```js
|
|
1102
|
+
* batchSetConversationNotificationLevel([
|
|
1103
|
+
* {
|
|
1104
|
+
* conversationType: ConversationType.PRIVATE,
|
|
1105
|
+
* targetId: 'targetId',
|
|
1106
|
+
* channelId: 'channelId',
|
|
1107
|
+
* }],
|
|
1108
|
+
* 2
|
|
1109
|
+
* ).then(res => {
|
|
1110
|
+
* if (res.code === ErrorCode.SUCCESS) {
|
|
1111
|
+
* console.log('设置成功')
|
|
1112
|
+
* } else {
|
|
1113
|
+
* console.log('设置失败', res.code)
|
|
1114
|
+
* }
|
|
1115
|
+
* })
|
|
1116
|
+
* ```
|
|
1117
|
+
*/
|
|
1118
|
+
declare function batchSetConversationNotificationLevel(conversations: IConversationOption[], notificationLevel: NotificationLevel): Promise<IAsyncRes<void>>;
|
|
1051
1119
|
/**
|
|
1052
1120
|
* 设置会话免打扰
|
|
1053
1121
|
* @deprecated 已废弃,请使用 setConversationNotificationLevel
|
|
@@ -1082,6 +1150,34 @@ declare function getBlockedConversationList(): Promise<IAsyncRes<IBaseConversati
|
|
|
1082
1150
|
* @category 会话
|
|
1083
1151
|
*/
|
|
1084
1152
|
declare function setConversationToTop(options: IConversationOption, isTop?: boolean): Promise<IAsyncRes<void>>;
|
|
1153
|
+
/**
|
|
1154
|
+
* 批量设置会话置顶
|
|
1155
|
+
* @param conversations 会话数组, 最大数量为 20
|
|
1156
|
+
* @param isTop 是否置顶
|
|
1157
|
+
* @param isCreateConversation 是否创建会话,仅 Electron 平台支持
|
|
1158
|
+
* @category 会话
|
|
1159
|
+
* @since 5.9.0
|
|
1160
|
+
* @description 支持 单聊、群聊、系统会话
|
|
1161
|
+
* @example
|
|
1162
|
+
* ```js
|
|
1163
|
+
* batchSetConversationToTop([
|
|
1164
|
+
* {
|
|
1165
|
+
* conversationType: ConversationType.PRIVATE,
|
|
1166
|
+
* targetId: 'targetId',
|
|
1167
|
+
* channelId: 'channelId',
|
|
1168
|
+
* }],
|
|
1169
|
+
* true,
|
|
1170
|
+
* false,
|
|
1171
|
+
* ).then(res => {
|
|
1172
|
+
* if (res.code === ErrorCode.SUCCESS) {
|
|
1173
|
+
* console.log('设置成功')
|
|
1174
|
+
* } else {
|
|
1175
|
+
* console.log('设置失败', res.code)
|
|
1176
|
+
* }
|
|
1177
|
+
* })
|
|
1178
|
+
* ```
|
|
1179
|
+
*/
|
|
1180
|
+
declare function batchSetConversationToTop(conversations: IConversationOption[], isTop: boolean, isCreateConversation?: boolean): Promise<IAsyncRes<void>>;
|
|
1085
1181
|
/**
|
|
1086
1182
|
* 获取置顶会话
|
|
1087
1183
|
* @category 会话
|
|
@@ -1253,7 +1349,7 @@ declare function quitChatRoom(targetId: string): Promise<IAsyncRes<void>>;
|
|
|
1253
1349
|
* @category 聊天室
|
|
1254
1350
|
* @description count 或 order 有一个为0时,只返回成员总数,不返回成员列表信息
|
|
1255
1351
|
*/
|
|
1256
|
-
declare function getChatRoomInfo(targetId: string, options
|
|
1352
|
+
declare function getChatRoomInfo(targetId: string, options?: {
|
|
1257
1353
|
/**
|
|
1258
1354
|
* 获取聊天室的人数,传值范围:0-20,默认为 0
|
|
1259
1355
|
*/
|
|
@@ -1382,7 +1478,7 @@ interface IImageMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
|
|
|
1382
1478
|
*/
|
|
1383
1479
|
imageUri: string;
|
|
1384
1480
|
}
|
|
1385
|
-
declare const _default$
|
|
1481
|
+
declare const _default$e: MessageConstructor<IImageMessageBody>;
|
|
1386
1482
|
|
|
1387
1483
|
/**
|
|
1388
1484
|
* 图片消息
|
|
@@ -1402,7 +1498,7 @@ interface IHQVoiceMessageBody extends IUserInfo, IExtraData, IMentionedInfo {
|
|
|
1402
1498
|
*/
|
|
1403
1499
|
duration: number;
|
|
1404
1500
|
}
|
|
1405
|
-
declare const _default$
|
|
1501
|
+
declare const _default$d: MessageConstructor<IHQVoiceMessageBody>;
|
|
1406
1502
|
|
|
1407
1503
|
/**
|
|
1408
1504
|
* 短视频消息
|
|
@@ -1431,7 +1527,7 @@ interface ISightMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
|
|
|
1431
1527
|
*/
|
|
1432
1528
|
name: string;
|
|
1433
1529
|
}
|
|
1434
|
-
declare const _default$
|
|
1530
|
+
declare const _default$c: MessageConstructor<ISightMessageBody>;
|
|
1435
1531
|
|
|
1436
1532
|
/**
|
|
1437
1533
|
* 文本消息
|
|
@@ -1443,7 +1539,7 @@ interface ITextMessageBody extends IUserInfo, IExtraData, IMentionedInfo {
|
|
|
1443
1539
|
*/
|
|
1444
1540
|
content: string;
|
|
1445
1541
|
}
|
|
1446
|
-
declare const _default$
|
|
1542
|
+
declare const _default$b: MessageConstructor<ITextMessageBody>;
|
|
1447
1543
|
|
|
1448
1544
|
/**
|
|
1449
1545
|
* 富文本消息
|
|
@@ -1467,7 +1563,10 @@ interface ICombineMessageBody extends IExtraData, IUserInfo, IMentionedInfo {
|
|
|
1467
1563
|
*/
|
|
1468
1564
|
conversationType: ConversationType;
|
|
1469
1565
|
}
|
|
1470
|
-
declare const _default$
|
|
1566
|
+
declare const _default$a: MessageConstructor<ICombineMessageBody>;
|
|
1567
|
+
|
|
1568
|
+
declare type CombineV2MessageContent = ICombineV2MessageContent & IExtraData & IUserInfo & IMentionedInfo;
|
|
1569
|
+
declare const _default$9: MessageConstructor<CombineV2MessageContent>;
|
|
1471
1570
|
|
|
1472
1571
|
/**
|
|
1473
1572
|
* 文件消息
|
|
@@ -1730,17 +1829,96 @@ declare function sendReadReceiptResponseV2(targetId: string, messageList: {
|
|
|
1730
1829
|
}, channelId?: string): Promise<IAsyncRes<void>>;
|
|
1731
1830
|
/**
|
|
1732
1831
|
* 多端同步阅读状态
|
|
1733
|
-
* @
|
|
1734
|
-
* @param
|
|
1735
|
-
* @
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1832
|
+
* @param conversation 会话信息
|
|
1833
|
+
* @param timestamp 时间戳
|
|
1834
|
+
* @example
|
|
1835
|
+
* ```js
|
|
1836
|
+
* const con = {
|
|
1837
|
+
* conversationType: ConversationType.Group,
|
|
1838
|
+
* targetId: 'targetId'
|
|
1839
|
+
* }
|
|
1840
|
+
* sendSyncReadStatusMessage(con, Date.now()).then(res => {
|
|
1841
|
+
* if (res.code === ErrorCode.success) {
|
|
1842
|
+
* console.log('send success', res.data)
|
|
1843
|
+
* } else {
|
|
1844
|
+
* console.log('send error', res.msg)
|
|
1845
|
+
* }
|
|
1846
|
+
* })
|
|
1847
|
+
* ```
|
|
1848
|
+
*/
|
|
1849
|
+
declare function sendSyncReadStatusMessage(conversation: IConversationOption, lastMessageSendTime: number): Promise<IAsyncRes<unknown>>;
|
|
1850
|
+
/**
|
|
1851
|
+
* 发送已读回执(V4 版本)
|
|
1852
|
+
*
|
|
1853
|
+
* 调用此接口后,消息的发送者会收到 EVENTS.MESSAGE_READ_RECEIPT_V4 事件通知
|
|
1854
|
+
*
|
|
1855
|
+
* 调用此接口需在开发者后台开通服务
|
|
1856
|
+
* @since 5.9.0
|
|
1857
|
+
* @param conversation 会话信息,支持单聊、群聊
|
|
1858
|
+
* @param endMsgUId 结束消息 UId
|
|
1859
|
+
* @param startMsgUId 开始消息UId, 仅群聊时有效
|
|
1860
|
+
* @example
|
|
1861
|
+
* ```js
|
|
1862
|
+
* const con = {
|
|
1863
|
+
* conversationType: ConversationType.Group,
|
|
1864
|
+
* targetId: 'targetId'
|
|
1865
|
+
* }
|
|
1866
|
+
* sendReadReceiptMessageV4(con, 'endMsgUId', 'startMsgUId').then(res => {
|
|
1867
|
+
* if (res.code === ErrorCode.success) {
|
|
1868
|
+
* console.log('send success')
|
|
1869
|
+
* } else {
|
|
1870
|
+
* console.log('send error', res.msg)
|
|
1871
|
+
* }
|
|
1872
|
+
* })
|
|
1873
|
+
* ```
|
|
1874
|
+
*/
|
|
1875
|
+
declare function sendReadReceiptMessageV4(conversation: IConversationOption, endMsgUId: string, startMsgUId?: string): Promise<IAsyncRes<unknown>>;
|
|
1876
|
+
/**
|
|
1877
|
+
* 获取消息的已读回执列表
|
|
1878
|
+
*
|
|
1879
|
+
* 调用此接口需在开发者后台开通服务
|
|
1880
|
+
* @since 5.9.0
|
|
1881
|
+
* @param conversation 会话信息, 仅支持群聊
|
|
1882
|
+
* @param messageUid 消息 UId
|
|
1883
|
+
* @example
|
|
1884
|
+
* ```js
|
|
1885
|
+
* const con = {
|
|
1886
|
+
* conversationType: ConversationType.Group,
|
|
1887
|
+
* targetId: 'targetId'
|
|
1888
|
+
* }
|
|
1889
|
+
* getMessageReadReceiptV4(con, 'MsgUId').then(res => {
|
|
1890
|
+
* if (res.code === ErrorCode.success) {
|
|
1891
|
+
* console.log('send success', res.data)
|
|
1892
|
+
* } else {
|
|
1893
|
+
* console.log('send error', res.msg)
|
|
1894
|
+
* }
|
|
1895
|
+
* })
|
|
1896
|
+
* ```
|
|
1897
|
+
*/
|
|
1898
|
+
declare function getMessageReadReceiptV4(conversation: IConversationOption, messageUid: string): Promise<IAsyncRes<IMessageReadReceiptV4Response>>;
|
|
1899
|
+
/**
|
|
1900
|
+
* 获取消息的已读回执列表
|
|
1901
|
+
*
|
|
1902
|
+
* 调用此接口需在开发者后台开通服务
|
|
1903
|
+
* @since 5.9.0
|
|
1904
|
+
* @param conversation 会话信息, 仅支持群聊
|
|
1905
|
+
* @param messageUIds 消息 UId 列表
|
|
1906
|
+
* @example
|
|
1907
|
+
* ```js
|
|
1908
|
+
* const con = {
|
|
1909
|
+
* conversationType: ConversationType.Group,
|
|
1910
|
+
* targetId: 'targetId'
|
|
1911
|
+
* }
|
|
1912
|
+
* batchGetMessageReadReceiptInfoV4(con, ['MsgUId']).then(res => {
|
|
1913
|
+
* if (res.code === ErrorCode.success) {
|
|
1914
|
+
* console.log('send success', res.data)
|
|
1915
|
+
* } else {
|
|
1916
|
+
* console.log('send error', res.msg)
|
|
1917
|
+
* }
|
|
1918
|
+
* })
|
|
1919
|
+
* ```
|
|
1920
|
+
*/
|
|
1921
|
+
declare function batchGetMessageReadReceiptInfoV4(conversation: IConversationOption, messageUIds: string[]): Promise<IAsyncRes<IGroupReadReceiptData[]>>;
|
|
1744
1922
|
/**
|
|
1745
1923
|
* 撤回消息
|
|
1746
1924
|
* @category 消息
|
|
@@ -1774,6 +1952,29 @@ declare function deleteMessages$1(conversation: IConversationOption, messages: {
|
|
|
1774
1952
|
* @param timestamp 清除时间点, 该时间之前的消息将被清除
|
|
1775
1953
|
*/
|
|
1776
1954
|
declare function clearHistoryMessages(conversation: IConversationOption, timestamp: number): Promise<IAsyncRes<void>>;
|
|
1955
|
+
/**
|
|
1956
|
+
* 批量删除多个会话的远端消息
|
|
1957
|
+
* @param conversations 会话列表,最大数量为 20
|
|
1958
|
+
* @param isDeleteLocal 是否删除本地消息, 仅 Electron 平台支持,默认为 false
|
|
1959
|
+
* @category 消息
|
|
1960
|
+
* @since 5.9.0
|
|
1961
|
+
* @description 批量删除服务端多个会话早于(含)发送时间的所有远端消息(Electron 平台可以删除对应的本地消息),
|
|
1962
|
+
* 时间戳,传 0 清除所有消息
|
|
1963
|
+
* 支持的会话类型:单聊, 群聊, 聊天室, 系统消息
|
|
1964
|
+
* @example
|
|
1965
|
+
* ```js
|
|
1966
|
+
* batchClearHistoryMessages([
|
|
1967
|
+
* {
|
|
1968
|
+
* conversationType: ConversationType.PRIVATE,
|
|
1969
|
+
* targetId: 'targetId',
|
|
1970
|
+
* timestamp: 0,
|
|
1971
|
+
* channelId: '',
|
|
1972
|
+
* }, true]).then(res => {
|
|
1973
|
+
* console.log(res);
|
|
1974
|
+
* });
|
|
1975
|
+
* ```
|
|
1976
|
+
*/
|
|
1977
|
+
declare function batchClearRemoteHistoryMessages(options: IClearMessageOption[], isDeleteLocal?: boolean): Promise<IAsyncRes<void>>;
|
|
1777
1978
|
/**
|
|
1778
1979
|
* 更新(添加、替换)消息扩展属性
|
|
1779
1980
|
* @category 消息
|
|
@@ -1820,6 +2021,15 @@ declare function registerMessageType<T>(messageType: string, isPersited: boolean
|
|
|
1820
2021
|
* @param conversation
|
|
1821
2022
|
*/
|
|
1822
2023
|
declare function getFirstUnreadMessage(conversation: IConversationOption): Promise<IAsyncRes<IAReceivedMessage | null>>;
|
|
2024
|
+
/**
|
|
2025
|
+
* 获取第一条未读消息信息
|
|
2026
|
+
* @category 消息
|
|
2027
|
+
* @since 5.9.0
|
|
2028
|
+
* @param conversation
|
|
2029
|
+
* 当没有未读消息时,返回的 data 为 null
|
|
2030
|
+
* 当第一条未读消息被撤回时,此信息不会更新
|
|
2031
|
+
*/
|
|
2032
|
+
declare function getFirstUnreadMessageInfo(conversation: IConversationOption): Promise<IAsyncRes<IFirstUnreadMessageInfo | null>>;
|
|
1823
2033
|
/**
|
|
1824
2034
|
* 向本地插入一条消息,不发送到服务器
|
|
1825
2035
|
* @category 消息
|
|
@@ -1979,6 +2189,18 @@ declare function getUnreadCountByTag(tagId: string, containMuted: boolean): Prom
|
|
|
1979
2189
|
*/
|
|
1980
2190
|
declare function setConversationToTopInTag(tagId: string, conversation: IConversationOption, isTop: boolean): Promise<IAsyncRes<void>>;
|
|
1981
2191
|
|
|
2192
|
+
/**
|
|
2193
|
+
* 创建文件上传任务
|
|
2194
|
+
* @param uploadInfo
|
|
2195
|
+
* @returns
|
|
2196
|
+
*/
|
|
2197
|
+
declare function createUploadTask(uploadInfo: IUploadInfo): Promise<IAsyncRes<UploadTask>>;
|
|
2198
|
+
/**
|
|
2199
|
+
* 停止文件上传任务
|
|
2200
|
+
* @param taskId
|
|
2201
|
+
* @returns
|
|
2202
|
+
*/
|
|
2203
|
+
declare function stopUploadTask(taskId: number): Promise<IAsyncRes<boolean>>;
|
|
1982
2204
|
declare function upload(uploadInfo: IUploadInfo): Promise<IAsyncRes<IUploadResult>>;
|
|
1983
2205
|
/**
|
|
1984
2206
|
* 获取文件 token
|
|
@@ -2046,6 +2268,7 @@ declare const MessageType: {
|
|
|
2046
2268
|
FILE: string;
|
|
2047
2269
|
SIGHT: string;
|
|
2048
2270
|
COMBINE: string;
|
|
2271
|
+
COMBINE_V2: string;
|
|
2049
2272
|
CHRM_KV_NOTIFY: string;
|
|
2050
2273
|
LOG_COMMAND: string;
|
|
2051
2274
|
EXPANSION_NOTIFY: string;
|
|
@@ -2158,6 +2381,31 @@ declare function clearMessages(conversation: IConversationOption): Promise<IAsyn
|
|
|
2158
2381
|
* 数据在被抹除的情况下,未清理的磁盘空间会在后续存储操作中复用,且对数据查询无影响
|
|
2159
2382
|
*/
|
|
2160
2383
|
declare function deleteMessagesByTimestamp(conversation: IConversationOption, timestamp: number, cleanSpace: boolean): Promise<IAsyncRes<void>>;
|
|
2384
|
+
/**
|
|
2385
|
+
* 批量清除多个会话的本地消息
|
|
2386
|
+
* @param options 会话列表,最大数量为 20
|
|
2387
|
+
* @since 5.9.0
|
|
2388
|
+
* @description 从本地消息数据库中批量删除多个会话指定时间之前的消息数据,
|
|
2389
|
+
* 时间戳传 0 时,清除所有消息
|
|
2390
|
+
* 支持的会话类型:单聊, 群聊, 聊天室, 系统消息
|
|
2391
|
+
* @example
|
|
2392
|
+
* ```js
|
|
2393
|
+
* const conversations = [{
|
|
2394
|
+
* conversationType: ConversationType.PRIVATE,
|
|
2395
|
+
* targetId: 'targetId',
|
|
2396
|
+
* timestamp: 0,
|
|
2397
|
+
* channelId: '',
|
|
2398
|
+
* }]
|
|
2399
|
+
* RongIMLib.batchClearMessagesByTimestamp(conversations, 0).then(res => {
|
|
2400
|
+
* if (res.code === ErrorCode.SUCCESS) {
|
|
2401
|
+
* console.log('删除成功')
|
|
2402
|
+
* } else {
|
|
2403
|
+
* console.log('删除失败', res.code)
|
|
2404
|
+
* }
|
|
2405
|
+
* })
|
|
2406
|
+
* ```
|
|
2407
|
+
*/
|
|
2408
|
+
declare function batchClearMessagesByTimestamp(options: IClearMessageOption[]): Promise<IAsyncRes<void>>;
|
|
2161
2409
|
/**
|
|
2162
2410
|
* 向本地插入一条消息,不发送到服务器
|
|
2163
2411
|
* @param conversation 会话
|
|
@@ -2172,7 +2420,7 @@ declare function insertMessage(conversation: IConversationOption, message: IARec
|
|
|
2172
2420
|
* @param checkDuplicate 选择是否排重,默认 false
|
|
2173
2421
|
* @returns
|
|
2174
2422
|
*/
|
|
2175
|
-
declare function batchInsertMessage(messages: IInsertMessage[], checkDuplicate: boolean): Promise<IAsyncRes<
|
|
2423
|
+
declare function batchInsertMessage(messages: IInsertMessage[], checkDuplicate: boolean): Promise<IAsyncRes<boolean>>;
|
|
2176
2424
|
/**
|
|
2177
2425
|
* 获取会话所有消息数
|
|
2178
2426
|
* @param conversation
|
|
@@ -2206,12 +2454,14 @@ declare function getGroupMessageDeliverList(targetId: string, messageUId: string
|
|
|
2206
2454
|
*
|
|
2207
2455
|
* @param enableCheck 是否使用融云消息重排机制 true: 开启, false: 关闭
|
|
2208
2456
|
* @description
|
|
2457
|
+
* @returns data => true: 成功,false: 失败
|
|
2209
2458
|
*
|
|
2210
2459
|
*/
|
|
2211
2460
|
declare function setCheckDuplicateMessage(enableCheck: boolean): Promise<IAsyncRes<boolean>>;
|
|
2212
2461
|
|
|
2213
2462
|
/**
|
|
2214
2463
|
* 清除本地数据, 包括消息列表、会话列表、拉取消息的时间戳
|
|
2464
|
+
* @returns data => true: 成功,false: 失败
|
|
2215
2465
|
*/
|
|
2216
2466
|
declare function clearLocalData(): Promise<IAsyncRes<boolean>>;
|
|
2217
2467
|
/**
|
|
@@ -2234,6 +2484,7 @@ declare const index_setMessageContent: typeof setMessageContent;
|
|
|
2234
2484
|
declare const index_deleteMessages: typeof deleteMessages;
|
|
2235
2485
|
declare const index_clearMessages: typeof clearMessages;
|
|
2236
2486
|
declare const index_deleteMessagesByTimestamp: typeof deleteMessagesByTimestamp;
|
|
2487
|
+
declare const index_batchClearMessagesByTimestamp: typeof batchClearMessagesByTimestamp;
|
|
2237
2488
|
declare const index_insertMessage: typeof insertMessage;
|
|
2238
2489
|
declare const index_batchInsertMessage: typeof batchInsertMessage;
|
|
2239
2490
|
declare const index_getMessageCount: typeof getMessageCount;
|
|
@@ -2258,6 +2509,7 @@ declare namespace index {
|
|
|
2258
2509
|
index_deleteMessages as deleteMessages,
|
|
2259
2510
|
index_clearMessages as clearMessages,
|
|
2260
2511
|
index_deleteMessagesByTimestamp as deleteMessagesByTimestamp,
|
|
2512
|
+
index_batchClearMessagesByTimestamp as batchClearMessagesByTimestamp,
|
|
2261
2513
|
index_insertMessage as insertMessage,
|
|
2262
2514
|
index_batchInsertMessage as batchInsertMessage,
|
|
2263
2515
|
index_getMessageCount as getMessageCount,
|
|
@@ -2288,4 +2540,4 @@ declare function getProxy(): IPromiseResult<IProxy>;
|
|
|
2288
2540
|
*/
|
|
2289
2541
|
declare function testProxy(proxy: IProxy, testHost: string): IPromiseResult<IResponse>;
|
|
2290
2542
|
|
|
2291
|
-
export { BaseMessage, _default$
|
|
2543
|
+
export { BaseMessage, _default$a as CombineMessage, _default$9 as CombineV2Message, CombineV2MessageContent, _default$2 as CommandMessage, ConnectType, EventListeners, Events, _default$8 as FileMessage, _default$7 as GIFMessage, GetHistoryMessageOption, GetHistoryMessageResult, _default as GroupNotificationMessage, _default$d as HQVoiceMessage, IAReceivedConversation, IAReceivedConversationByTag, IAReceivedMessage, IAUltraGroupReceivedConversation, ICombineMessageBody, ICommandMessageBody, IConversationEvent, IConversationState, IConversationUpdateItem, IExtraData, IFileMessageBody, IGIFMessageBody, IGetHistoryMessagesByTypesOption, IGroupNotificationMessageBody, IHQVoiceMessageBody, IImageMessageBody, IImageMessageOption, IInformationNotificationMessageBody, 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$e as ImageMessage, _default$1 as InformationNotificationMessage, _default$5 as LocationMessage, MentionedInfo, MessageConstructor, MessageType, _default$4 as ReferenceMessage, _default$3 as RichContentMessage, _default$c as SightMessage, _default$b as TextMessage, _default$6 as VoiceMessage, __addSDKVersion, addConversationsToTag, addEventListener, addTag, addToBlacklist, batchClearRemoteHistoryMessages, batchGetMessageReadReceiptInfoV4, batchRemoveConversation, batchSetConversationNotificationLevel, batchSetConversationToTop, bindRTCRoomForChatroom, clearAllMessagesUnreadStatus, clearEventListeners, clearHistoryMessages, clearMessages$1 as clearMessages, clearMessagesUnreadStatus, clearTextMessageDraft, clearUnreadCountByTimestamp, connect, createUploadTask, 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, getDownloadAuth, getFileToken, getFileUrl, getFirstUnreadMessage, getFirstUnreadMessageInfo, getHistoryMessages, getMessage, getMessageReadReceiptV4, getMessageReader, getProxy, getRemoteHistoryMessages, getServerTime, getTags, getTagsFromConversation, getTextMessageDraft, getTopConversationList, getTotalUnreadCount, getTotalUnreadCountByLevels, getTotalUnreadMentionedCountByLevels, getUltraGroupDefaultNotificationLevel, getUltraGroupFirstUnreadMessageTimestamp, getUltraGroupList, getUltraGroupMessageListByMessageUId, getUltraGroupUnreadCountByTargetId, getUltraGroupUnreadInfoList, 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, sendGIFMessage, sendHQVoiceMessage, sendImageMessage, sendMessage, sendReadReceiptMessage, sendReadReceiptMessageV4, sendReadReceiptRequest, sendReadReceiptResponse, sendReadReceiptResponseV2, sendSightMessage, sendSyncReadStatusMessage, sendTextMessage, sendTypingStatusMessage, sendUltraGroupTypingStatus, setChatRoomEntries, setChatRoomEntry, setConversationNotificationLevel, setConversationNotificationStatus, setConversationToTop, setConversationToTopInTag, setMessageReceivedStatus$1 as setMessageReceivedStatus, setProxy, setUltraGroupDefaultNotificationLevel, stopUploadTask, testProxy, updateExpansionForUltraGroupMessage, updateMessageExpansion, updateTag, upload };
|