@rongcloud/imlib-next 5.4.0 → 5.4.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 +164 -52
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import * as _rongcloud_engine from '@rongcloud/engine';
|
|
2
1
|
import { LogLevel, MessageDirection, ReceivedStatus, IReadReceiptInfo, IPushConfig, IPluginGenerator, IAsyncRes, ConnectionStatus, IEventListener, NotificationStatus, NotificationLevel, IUserProfile, IConversationOption, ConversationType, ErrorCode, IBaseConversationInfo, IConversationState, IReceivedConversation, IUltraGroupOption, IChatroomInfo, IChatRoomEntry, IChatroomEntries, IRemoveChatRoomEntry, IRemoveChatRoomEntries, IRTCRoomBindOption, MentionedType, IMessageReaderResponse, IReceivedMessage, ITagParam, ITagInfo, IConversationTag, IReceivedConversationByTag, FileType, IUploadAuth, UploadMethod } from '@rongcloud/engine';
|
|
3
|
-
export { ConnectionStatus, ConversationType, ErrorCode, IBlockedMessageInfo, IChatRoomEntries, IChatRoomEntry, IChatroomListenerData, IConversationOption, IConversationState, IDeletedExpansion, IExpansionListenerData, IPluginGenerator, IRTCRoomBindOption, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IUpdatedExpansion, LogLevel, MentionedType, MessageBlockType, MessageDirection, NotificationLevel, NotificationStatus, ReceivedStatus, UploadMethod, logger } from '@rongcloud/engine';
|
|
4
|
-
import * as _rongcloud_engine_enums_ReceivedStatus from '@rongcloud/engine/enums/ReceivedStatus';
|
|
5
|
-
import * as _rongcloud_engine_enums_ConversationType from '@rongcloud/engine/enums/ConversationType';
|
|
2
|
+
export { ChatroomEntryType, ChatroomUserChangeType, ConnectionStatus, ConversationType, ErrorCode, FileType, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomListenerData, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IConversationOption, IConversationState, IConversationTag, IDeletedExpansion, IEventListener, IExpansionListenerData, IGooglePushConfig, ILogExtensions, ILogInfo, ILogInit, IMessageReader, IMessageReaderResponse, IPluginGenerator, IPushConfig, IRTCRoomBindOption, IReadReceiptInfo, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, ITagInfo, ITagParam, IUltraGroupOption, IUpdatedExpansion, IUploadAuth, IUserProfile, IiOSPushConfig, LogLevel, LogSource, LogTagId, MentionedType, MessageBlockType, MessageDirection, NotificationLevel, NotificationStatus, ReceivedStatus, UploadMethod, logger } from '@rongcloud/engine';
|
|
6
3
|
|
|
7
4
|
declare enum Events {
|
|
8
5
|
CONNECTING = "CONNECTING",
|
|
@@ -597,7 +594,7 @@ interface ISearchMessageInTimeRangeOption {
|
|
|
597
594
|
* 获取会话列表
|
|
598
595
|
* @param options
|
|
599
596
|
*/
|
|
600
|
-
declare function getConversationList(options?: {
|
|
597
|
+
declare function getConversationList$1(options?: {
|
|
601
598
|
/**
|
|
602
599
|
* 会话数量
|
|
603
600
|
*/
|
|
@@ -945,7 +942,7 @@ interface IImageMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
|
|
|
945
942
|
*/
|
|
946
943
|
imageUri: string;
|
|
947
944
|
}
|
|
948
|
-
declare const _default$
|
|
945
|
+
declare const _default$a: MessageConstructor<IImageMessageBody>;
|
|
949
946
|
|
|
950
947
|
interface IHQVoiceMessageBody extends IUserInfo, IExtraData, IMentionedInfo {
|
|
951
948
|
/**
|
|
@@ -961,7 +958,7 @@ interface IHQVoiceMessageBody extends IUserInfo, IExtraData, IMentionedInfo {
|
|
|
961
958
|
*/
|
|
962
959
|
duration: number;
|
|
963
960
|
}
|
|
964
|
-
declare const _default$
|
|
961
|
+
declare const _default$9: MessageConstructor<IHQVoiceMessageBody>;
|
|
965
962
|
|
|
966
963
|
interface ISightMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
|
|
967
964
|
/**
|
|
@@ -986,7 +983,7 @@ interface ISightMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
|
|
|
986
983
|
*/
|
|
987
984
|
name: string;
|
|
988
985
|
}
|
|
989
|
-
declare const _default$
|
|
986
|
+
declare const _default$8: MessageConstructor<ISightMessageBody>;
|
|
990
987
|
|
|
991
988
|
/**
|
|
992
989
|
* 文本消息
|
|
@@ -997,7 +994,7 @@ interface ITextMessageBody extends IUserInfo, IExtraData, IMentionedInfo {
|
|
|
997
994
|
*/
|
|
998
995
|
content: string;
|
|
999
996
|
}
|
|
1000
|
-
declare const _default$
|
|
997
|
+
declare const _default$7: MessageConstructor<ITextMessageBody>;
|
|
1001
998
|
|
|
1002
999
|
interface ICombineMessageBody extends IExtraData, IUserInfo {
|
|
1003
1000
|
/**
|
|
@@ -1017,7 +1014,7 @@ interface ICombineMessageBody extends IExtraData, IUserInfo {
|
|
|
1017
1014
|
*/
|
|
1018
1015
|
conversationType: ConversationType;
|
|
1019
1016
|
}
|
|
1020
|
-
declare const _default$
|
|
1017
|
+
declare const _default$6: MessageConstructor<ICombineMessageBody>;
|
|
1021
1018
|
|
|
1022
1019
|
interface IFileMessageBody extends IExtraData, IUserInfo {
|
|
1023
1020
|
/**
|
|
@@ -1037,7 +1034,7 @@ interface IFileMessageBody extends IExtraData, IUserInfo {
|
|
|
1037
1034
|
*/
|
|
1038
1035
|
fileUrl: string;
|
|
1039
1036
|
}
|
|
1040
|
-
declare const _default$
|
|
1037
|
+
declare const _default$5: MessageConstructor<IFileMessageBody>;
|
|
1041
1038
|
|
|
1042
1039
|
interface IGIFMessageBody extends IExtraData, IUserInfo {
|
|
1043
1040
|
/**
|
|
@@ -1057,14 +1054,14 @@ interface IGIFMessageBody extends IExtraData, IUserInfo {
|
|
|
1057
1054
|
*/
|
|
1058
1055
|
height: number;
|
|
1059
1056
|
}
|
|
1060
|
-
declare const _default$
|
|
1057
|
+
declare const _default$4: MessageConstructor<IGIFMessageBody>;
|
|
1061
1058
|
|
|
1062
1059
|
interface IVoiceMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
|
|
1063
1060
|
content: string;
|
|
1064
1061
|
duration: number;
|
|
1065
1062
|
extra: string;
|
|
1066
1063
|
}
|
|
1067
|
-
declare const _default$
|
|
1064
|
+
declare const _default$3: MessageConstructor<IVoiceMessageBody>;
|
|
1068
1065
|
|
|
1069
1066
|
interface ILocationMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
|
|
1070
1067
|
/**
|
|
@@ -1084,7 +1081,7 @@ interface ILocationMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
|
|
|
1084
1081
|
*/
|
|
1085
1082
|
content: string;
|
|
1086
1083
|
}
|
|
1087
|
-
declare const _default$
|
|
1084
|
+
declare const _default$2: MessageConstructor<ILocationMessageBody>;
|
|
1088
1085
|
|
|
1089
1086
|
interface IReferenceMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
|
|
1090
1087
|
/**
|
|
@@ -1104,7 +1101,7 @@ interface IReferenceMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
|
|
|
1104
1101
|
*/
|
|
1105
1102
|
objName: string;
|
|
1106
1103
|
}
|
|
1107
|
-
declare const _default$
|
|
1104
|
+
declare const _default$1: MessageConstructor<IReferenceMessageBody>;
|
|
1108
1105
|
|
|
1109
1106
|
interface IArticle {
|
|
1110
1107
|
title: string;
|
|
@@ -1114,7 +1111,7 @@ interface IArticle {
|
|
|
1114
1111
|
}
|
|
1115
1112
|
interface IRichContentMessageBody extends IArticle, IExtraData, IMentionedInfo, IUserInfo {
|
|
1116
1113
|
}
|
|
1117
|
-
declare const _default
|
|
1114
|
+
declare const _default: MessageConstructor<IRichContentMessageBody>;
|
|
1118
1115
|
|
|
1119
1116
|
/**
|
|
1120
1117
|
* 发送消息
|
|
@@ -1188,7 +1185,7 @@ declare function sendSyncReadStatusMessage(conversation: IConversationOption, la
|
|
|
1188
1185
|
code: ErrorCode.SUCCESS;
|
|
1189
1186
|
msg?: undefined;
|
|
1190
1187
|
} | {
|
|
1191
|
-
code: ErrorCode.TIMEOUT | ErrorCode.UNKNOWN | ErrorCode.PARAMETER_ERROR | ErrorCode.EXTRA_METHOD_UNDEFINED | ErrorCode.MAIN_PROCESS_ERROR | ErrorCode.PARAMETER_CHANGED | ErrorCode.
|
|
1188
|
+
code: ErrorCode.TIMEOUT | ErrorCode.UNKNOWN | ErrorCode.PARAMETER_ERROR | ErrorCode.EXTRA_METHOD_UNDEFINED | ErrorCode.MAIN_PROCESS_ERROR | ErrorCode.PARAMETER_CHANGED | ErrorCode.RC_DISCUSSION_GROUP_ID_INVALID | ErrorCode.SEND_FREQUENCY_TOO_FAST | ErrorCode.NOT_IN_DISCUSSION | ErrorCode.FORBIDDEN_IN_GROUP | ErrorCode.RECALL_MESSAGE | ErrorCode.NOT_IN_GROUP | ErrorCode.NOT_IN_CHATROOM | ErrorCode.FORBIDDEN_IN_CHATROOM | ErrorCode.RC_CHATROOM_USER_KICKED | ErrorCode.RC_CHATROOM_NOT_EXIST | ErrorCode.RC_CHATROOM_IS_FULL | ErrorCode.RC_CHATROOM_PATAMETER_INVALID | ErrorCode.CHATROOM_GET_HISTORYMSG_ERROR | ErrorCode.CHATROOM_NOT_OPEN_HISTORYMSG_STORE | ErrorCode.CHATROOM_KV_EXCEED | ErrorCode.CHATROOM_KV_OVERWRITE_INVALID | ErrorCode.CHATROOM_KV_STORE_NOT_OPEN | ErrorCode.CHATROOM_KEY_NOT_EXIST | ErrorCode.CHATROOM_KV_SET_ERROR | ErrorCode.SENSITIVE_SHIELD | ErrorCode.SENSITIVE_REPLACE | ErrorCode.JOIN_IN_DISCUSSION | ErrorCode.CREATE_DISCUSSION | ErrorCode.INVITE_DICUSSION | ErrorCode.GET_USERINFO_ERROR | ErrorCode.REJECTED_BY_BLACKLIST | ErrorCode.RC_NET_CHANNEL_INVALID | ErrorCode.RC_NET_UNAVAILABLE | ErrorCode.RC_MSG_RESP_TIMEOUT | ErrorCode.RC_HTTP_SEND_FAIL | ErrorCode.RC_HTTP_REQ_TIMEOUT | ErrorCode.RC_HTTP_RECV_FAIL | ErrorCode.RC_NAVI_RESOURCE_ERROR | ErrorCode.RC_NODE_NOT_FOUND | ErrorCode.RC_DOMAIN_NOT_RESOLVE | ErrorCode.RC_SOCKET_NOT_CREATED | ErrorCode.RC_SOCKET_DISCONNECTED | ErrorCode.RC_PING_SEND_FAIL | ErrorCode.RC_PONG_RECV_FAIL | ErrorCode.RC_MSG_SEND_FAIL | ErrorCode.RC_MSG_CONTENT_EXCEED_LIMIT | ErrorCode.RC_CONN_ACK_TIMEOUT | ErrorCode.RC_CONN_PROTO_VERSION_ERROR | ErrorCode.RC_CONN_ID_REJECT | ErrorCode.RC_CONN_SERVER_UNAVAILABLE | ErrorCode.RC_CONN_USER_OR_PASSWD_ERROR | ErrorCode.RC_CONN_NOT_AUTHRORIZED | ErrorCode.RC_CONN_REDIRECTED | ErrorCode.RC_CONN_PACKAGE_NAME_INVALID | ErrorCode.RC_CONN_APP_BLOCKED_OR_DELETED | ErrorCode.RC_CONN_USER_BLOCKED | ErrorCode.RC_DISCONN_KICK | ErrorCode.RC_DISCONN_EXCEPTION | ErrorCode.RC_DISCONN_SAME_CLIENT_ON_LINE | ErrorCode.RC_APP_AUTH_NOT_PASS | ErrorCode.RC_OTP_USED | ErrorCode.RC_PLATFORM_ERROR | ErrorCode.RC_QUERY_ACK_NO_DATA | ErrorCode.RC_MSG_DATA_INCOMPLETE | ErrorCode.BIZ_ERROR_CLIENT_NOT_INIT | ErrorCode.BIZ_ERROR_DATABASE_ERROR | ErrorCode.BIZ_ERROR_INVALID_PARAMETER | ErrorCode.BIZ_ERROR_NO_CHANNEL | ErrorCode.BIZ_ERROR_RECONNECT_SUCCESS | ErrorCode.BIZ_ERROR_CONNECTING | ErrorCode.MSG_ROAMING_SERVICE_UNAVAILABLE | ErrorCode.MSG_INSERT_ERROR | ErrorCode.MSG_DEL_ERROR | ErrorCode.TAG_EXISTS | ErrorCode.TAG_NOT_EXIST | ErrorCode.NO_TAG_IN_CONVER | ErrorCode.CONVER_REMOVE_ERROR | ErrorCode.CONVER_GETLIST_ERROR | ErrorCode.CONVER_SETOP_ERROR | ErrorCode.CONVER_TOTAL_UNREAD_ERROR | ErrorCode.CONVER_TYPE_UNREAD_ERROR | ErrorCode.CONVER_ID_TYPE_UNREAD_ERROR | ErrorCode.EXPANSION_LIMIT_EXCEET | ErrorCode.MESSAGE_KV_NOT_SUPPORT | ErrorCode.CONVER_OUT_LIMIT_ERROR | ErrorCode.CONVER_GET_ERROR | ErrorCode.GROUP_SYNC_ERROR | ErrorCode.GROUP_MATCH_ERROR | ErrorCode.READ_RECEIPT_ERROR | ErrorCode.PACKAGE_ENVIRONMENT_ERROR | ErrorCode.CAN_NOT_RECONNECT | ErrorCode.SERVER_UNAVAILABLE | ErrorCode.HOSTNAME_ERROR | ErrorCode.HAS_OHTER_SAME_CLIENT_ON_LINE | ErrorCode.METHOD_NOT_AVAILABLE | ErrorCode.METHOD_NOT_SUPPORT | ErrorCode.MSG_LIMIT_ERROR | ErrorCode.METHOD_ONLY_SUPPORT_ULTRA_GROUP | ErrorCode.UPLOAD_FILE_FAILED | ErrorCode.CHATROOM_ID_ISNULL | ErrorCode.CHARTOOM_JOIN_ERROR | ErrorCode.CHATROOM_HISMESSAGE_ERROR | ErrorCode.CHATROOM_KV_NOT_FOUND | ErrorCode.BLACK_ADD_ERROR | ErrorCode.BLACK_GETSTATUS_ERROR | ErrorCode.BLACK_REMOVE_ERROR | ErrorCode.DRAF_GET_ERROR | ErrorCode.DRAF_SAVE_ERROR | ErrorCode.DRAF_REMOVE_ERROR | ErrorCode.SUBSCRIBE_ERROR | ErrorCode.NOT_SUPPORT | ErrorCode.QNTKN_FILETYPE_ERROR | ErrorCode.QNTKN_GET_ERROR | ErrorCode.COOKIE_ENABLE | ErrorCode.HAVNODEVICEID | ErrorCode.DEVICEIDISHAVE | ErrorCode.FEILD | ErrorCode.VOIPISNULL | ErrorCode.NOENGINETYPE | ErrorCode.NULLCHANNELNAME | ErrorCode.VOIPDYANMICERROR | ErrorCode.NOVOIP | ErrorCode.INTERNALERRROR | ErrorCode.VOIPCLOSE | ErrorCode.CANCEL | ErrorCode.REJECT | ErrorCode.HANGUP | ErrorCode.BUSYLINE | ErrorCode.NO_RESPONSE | ErrorCode.ENGINE_UN_SUPPORTED | ErrorCode.NETWORK_ERROR | ErrorCode.REMOTE_CANCEL | ErrorCode.REMOTE_REJECT | ErrorCode.REMOTE_HANGUP | ErrorCode.REMOTE_BUSYLINE | ErrorCode.REMOTE_NO_RESPONSE | ErrorCode.REMOTE_ENGINE_UN_SUPPORTED | ErrorCode.REMOTE_NETWORK_ERROR | ErrorCode.VOIP_NOT_AVALIABLE | ErrorCode.CHATROOM_KV_STORE_NOT_ALL_SUCCESS | ErrorCode.CHATROOM_KV_STORE_OUT_LIMIT;
|
|
1192
1189
|
msg: string | undefined;
|
|
1193
1190
|
}>;
|
|
1194
1191
|
/**
|
|
@@ -1199,7 +1196,7 @@ declare function recallMessage(conversation: IConversationOption, options: IReca
|
|
|
1199
1196
|
/**
|
|
1200
1197
|
* 按消息 UId 删除消息
|
|
1201
1198
|
*/
|
|
1202
|
-
declare function deleteMessages(conversation: IConversationOption, messages: {
|
|
1199
|
+
declare function deleteMessages$1(conversation: IConversationOption, messages: {
|
|
1203
1200
|
/**
|
|
1204
1201
|
* 消息 id
|
|
1205
1202
|
*/
|
|
@@ -1268,7 +1265,7 @@ declare function getFirstUnreadMessage(conversation: IConversationOption): Promi
|
|
|
1268
1265
|
* @param callback
|
|
1269
1266
|
* @deprecated
|
|
1270
1267
|
*/
|
|
1271
|
-
declare function insertMessage(conversation: IConversationOption, content: IReceivedMessage, options?: IInsertOptions): Promise<IAsyncRes<IAReceivedMessage>>;
|
|
1268
|
+
declare function insertMessage$1(conversation: IConversationOption, content: IReceivedMessage, options?: IInsertOptions): Promise<IAsyncRes<IAReceivedMessage>>;
|
|
1272
1269
|
/**
|
|
1273
1270
|
* 获取消息
|
|
1274
1271
|
* @param messageId 本地消息 ID 或 messageUId
|
|
@@ -1289,7 +1286,7 @@ declare function getUnreadMentionedMessages(conversation: IConversationOption):
|
|
|
1289
1286
|
* @param count 获取的数量
|
|
1290
1287
|
* @deprecated
|
|
1291
1288
|
*/
|
|
1292
|
-
declare function searchMessages(conversation: IConversationOption, keyword: string, timestamp: number, count: number): Promise<IAsyncRes<{
|
|
1289
|
+
declare function searchMessages$1(conversation: IConversationOption, keyword: string, timestamp: number, count: number): Promise<IAsyncRes<{
|
|
1293
1290
|
messages: IAReceivedMessage[];
|
|
1294
1291
|
count: number | undefined;
|
|
1295
1292
|
}>>;
|
|
@@ -1307,14 +1304,14 @@ declare function deleteLocalMessagesByTimestamp(conversation: IConversationOptio
|
|
|
1307
1304
|
* @param conversation 会话
|
|
1308
1305
|
* @deprecated
|
|
1309
1306
|
*/
|
|
1310
|
-
declare function clearMessages(conversation: IConversationOption): Promise<IAsyncRes<void>>;
|
|
1307
|
+
declare function clearMessages$1(conversation: IConversationOption): Promise<IAsyncRes<void>>;
|
|
1311
1308
|
/**
|
|
1312
1309
|
* 按内容搜索会话
|
|
1313
1310
|
* @param keyword 关键字
|
|
1314
1311
|
* @param conversationTypes 会话类型数组
|
|
1315
1312
|
* @deprecated
|
|
1316
1313
|
*/
|
|
1317
|
-
declare function searchConversationByContent(keyword: string, conversationTypes?: ConversationType[], customMessageType?: string[], channelId?: string): Promise<IAsyncRes<IReceivedConversation[] | undefined>>;
|
|
1314
|
+
declare function searchConversationByContent$1(keyword: string, conversationTypes?: ConversationType[], customMessageType?: string[], channelId?: string): Promise<IAsyncRes<IReceivedConversation[] | undefined>>;
|
|
1318
1315
|
/**
|
|
1319
1316
|
* 清除时间戳前的未读数
|
|
1320
1317
|
* @param conversationType 会话类型
|
|
@@ -1327,7 +1324,7 @@ declare function clearUnreadCountByTimestamp(conversation: IConversationOption,
|
|
|
1327
1324
|
* 设置消息接收状态
|
|
1328
1325
|
* @deprecated
|
|
1329
1326
|
*/
|
|
1330
|
-
declare function setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<IAsyncRes<void>>;
|
|
1327
|
+
declare function setMessageReceivedStatus$1(messageId: number, receivedStatus: number): Promise<IAsyncRes<void>>;
|
|
1331
1328
|
|
|
1332
1329
|
/**
|
|
1333
1330
|
* 创建标签
|
|
@@ -1455,33 +1452,148 @@ declare const MessageType: {
|
|
|
1455
1452
|
RECALL_MESSAGE_TYPE: string;
|
|
1456
1453
|
};
|
|
1457
1454
|
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1455
|
+
/**
|
|
1456
|
+
* 获取全部会话列表
|
|
1457
|
+
* @param channelId 频道 ID,不传则获取全部频道 ID 类型
|
|
1458
|
+
*/
|
|
1459
|
+
declare function getAllConversationList(channelId?: string): Promise<IAsyncRes<IAReceivedConversation[]>>;
|
|
1460
|
+
/**
|
|
1461
|
+
* 获取会话列表
|
|
1462
|
+
* @param startTime 起始时间
|
|
1463
|
+
* @param count 数量
|
|
1464
|
+
* @param channelId 频道 ID,不传则获取全部频道 ID 类型
|
|
1465
|
+
*/
|
|
1466
|
+
declare function getConversationList(startTime: number, count: number, channelId?: string): Promise<IAsyncRes<IAReceivedConversation[]>>;
|
|
1467
|
+
/**
|
|
1468
|
+
* 根据消息内容搜索会话列表
|
|
1469
|
+
* @param keyword 搜索关键字
|
|
1470
|
+
* @param messageTypes 消息类型
|
|
1471
|
+
* @param channelId 频道 ID,不传则获取全部频道 ID 类型
|
|
1472
|
+
*/
|
|
1473
|
+
declare function searchConversationByContent(keyword: string, messageTypes: string[], channelId?: string): Promise<IAsyncRes<IAReceivedConversation[]>>;
|
|
1474
|
+
|
|
1475
|
+
/**
|
|
1476
|
+
* 搜索消息
|
|
1477
|
+
* 如果不传 channelId,则在所有 channelId 中搜索消息
|
|
1478
|
+
* @param conversation 会话
|
|
1479
|
+
* @param keyword 搜索关键字
|
|
1480
|
+
* @param startTime 搜索起始时间
|
|
1481
|
+
* @param count 数量
|
|
1482
|
+
*/
|
|
1483
|
+
declare function searchMessages(conversation: IConversationOption, keyword: string, startTime: number, count: number): Promise<IAsyncRes<{
|
|
1484
|
+
messages: IAReceivedMessage[];
|
|
1485
|
+
count: number | undefined;
|
|
1486
|
+
}>>;
|
|
1487
|
+
/**
|
|
1488
|
+
* 在时间范围内搜索消息
|
|
1489
|
+
* @param conversation 会话
|
|
1490
|
+
* @param option 配置
|
|
1491
|
+
*/
|
|
1492
|
+
declare function searchMessageInTimeRange(conversation: {
|
|
1493
|
+
conversationType: ConversationType;
|
|
1494
|
+
targetId: string;
|
|
1495
|
+
}, option: ISearchMessageInTimeRangeOption): Promise<IAsyncRes<{
|
|
1496
|
+
messages: IAReceivedMessage[];
|
|
1497
|
+
}>>;
|
|
1498
|
+
/**
|
|
1499
|
+
* 获取指定消息类型的历史消息
|
|
1500
|
+
* @param conversation 会话
|
|
1501
|
+
* @param option 配置参数
|
|
1502
|
+
*/
|
|
1503
|
+
declare function getHistoryMessagesByMessageTypes(conversation: IConversationOption, option: IGetHistoryMessagesByTypesOption): Promise<IAsyncRes<{
|
|
1504
|
+
messages: IAReceivedMessage[];
|
|
1505
|
+
hasMore: boolean;
|
|
1506
|
+
}>>;
|
|
1507
|
+
/**
|
|
1508
|
+
* 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
|
|
1509
|
+
* @param conversation 会话
|
|
1510
|
+
* @param timestamp 时间戳
|
|
1511
|
+
*/
|
|
1512
|
+
declare function setMessageStatusToRead(conversation: IConversationOption, timestamp: number): Promise<IAsyncRes<boolean>>;
|
|
1513
|
+
/**
|
|
1514
|
+
* 设置对方发送的消息 自己的接受状态
|
|
1515
|
+
* @param messageId 消息 ID
|
|
1516
|
+
* @param receivedStatus 接受状态
|
|
1517
|
+
*/
|
|
1518
|
+
declare function setMessageReceivedStatus(messageId: number, receivedStatus: ReceivedStatus): Promise<IAsyncRes>;
|
|
1519
|
+
/**
|
|
1520
|
+
* 设置自己发送的消息的发送状态
|
|
1521
|
+
* @param messageId 消息ID
|
|
1522
|
+
* @param sentStatus 发送状态
|
|
1523
|
+
*/
|
|
1524
|
+
declare function setMessageSentStatus(messageId: number, sentStatus: SentStatus): Promise<IAsyncRes>;
|
|
1525
|
+
/**
|
|
1526
|
+
* 修改消息内容
|
|
1527
|
+
* @param messageId 消息 ID
|
|
1528
|
+
* @param content 消息 content
|
|
1529
|
+
* @param messageType 消息类型,如果设置了消息类型,会使该消息无法被搜索
|
|
1530
|
+
*/
|
|
1531
|
+
declare function setMessageContent(messageId: number, content: Object, messageType?: string): Promise<IAsyncRes>;
|
|
1532
|
+
/**
|
|
1533
|
+
* 删除消息
|
|
1534
|
+
* @param messageIds 消息 ID 列表, 需是同一会话的消息
|
|
1535
|
+
*/
|
|
1536
|
+
declare function deleteMessages(messageIds: number[]): Promise<IAsyncRes>;
|
|
1537
|
+
/**
|
|
1538
|
+
* 清空会话下历史消息
|
|
1539
|
+
* @param conversation 会话
|
|
1540
|
+
*/
|
|
1541
|
+
declare function clearMessages(conversation: IConversationOption): Promise<IAsyncRes<void>>;
|
|
1542
|
+
/**
|
|
1543
|
+
* 从本地消息数据库中删除某一会话指定时间之前的消息数据
|
|
1544
|
+
* @param conversation 会话
|
|
1545
|
+
* @param timestamp 指定删除该时间戳之前的消息
|
|
1546
|
+
* @param cleanSpace 指定删除该时间戳之前的消息。是否清理数据条目所使用的磁盘空间。清理磁盘空间会阻塞进程且耗时较长,不推荐使用。
|
|
1547
|
+
* 数据在被抹除的情况下,未清理的磁盘空间会在后续存储操作中复用,且对数据查询无影响
|
|
1548
|
+
*/
|
|
1549
|
+
declare function deleteMessagesByTimestamp(conversation: IConversationOption, timestamp: number, cleanSpace: boolean): Promise<IAsyncRes<void>>;
|
|
1550
|
+
/**
|
|
1551
|
+
* 向本地插入一条消息,不发送到服务器
|
|
1552
|
+
* @param conversationType 会话类型
|
|
1553
|
+
* @param targetId 目标 ID
|
|
1554
|
+
* @param message 消息体
|
|
1555
|
+
* @param callback
|
|
1556
|
+
*/
|
|
1557
|
+
declare function insertMessage(conversation: IConversationOption, message: IAReceivedMessage, options?: IInsertOptions): Promise<IAsyncRes<IAReceivedMessage>>;
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* 清除本地数据, 包括消息列表、会话列表、拉取消息的时间戳
|
|
1561
|
+
*/
|
|
1562
|
+
declare function clearLocalData(): Promise<IAsyncRes<boolean>>;
|
|
1563
|
+
|
|
1564
|
+
declare const index_getAllConversationList: typeof getAllConversationList;
|
|
1565
|
+
declare const index_getConversationList: typeof getConversationList;
|
|
1566
|
+
declare const index_searchConversationByContent: typeof searchConversationByContent;
|
|
1567
|
+
declare const index_searchMessages: typeof searchMessages;
|
|
1568
|
+
declare const index_searchMessageInTimeRange: typeof searchMessageInTimeRange;
|
|
1569
|
+
declare const index_getHistoryMessagesByMessageTypes: typeof getHistoryMessagesByMessageTypes;
|
|
1570
|
+
declare const index_setMessageStatusToRead: typeof setMessageStatusToRead;
|
|
1571
|
+
declare const index_setMessageReceivedStatus: typeof setMessageReceivedStatus;
|
|
1572
|
+
declare const index_setMessageSentStatus: typeof setMessageSentStatus;
|
|
1573
|
+
declare const index_setMessageContent: typeof setMessageContent;
|
|
1574
|
+
declare const index_deleteMessages: typeof deleteMessages;
|
|
1575
|
+
declare const index_clearMessages: typeof clearMessages;
|
|
1576
|
+
declare const index_deleteMessagesByTimestamp: typeof deleteMessagesByTimestamp;
|
|
1577
|
+
declare const index_insertMessage: typeof insertMessage;
|
|
1578
|
+
declare const index_clearLocalData: typeof clearLocalData;
|
|
1579
|
+
declare namespace index {
|
|
1580
|
+
export {
|
|
1581
|
+
index_getAllConversationList as getAllConversationList,
|
|
1582
|
+
index_getConversationList as getConversationList,
|
|
1583
|
+
index_searchConversationByContent as searchConversationByContent,
|
|
1584
|
+
index_searchMessages as searchMessages,
|
|
1585
|
+
index_searchMessageInTimeRange as searchMessageInTimeRange,
|
|
1586
|
+
index_getHistoryMessagesByMessageTypes as getHistoryMessagesByMessageTypes,
|
|
1587
|
+
index_setMessageStatusToRead as setMessageStatusToRead,
|
|
1588
|
+
index_setMessageReceivedStatus as setMessageReceivedStatus,
|
|
1589
|
+
index_setMessageSentStatus as setMessageSentStatus,
|
|
1590
|
+
index_setMessageContent as setMessageContent,
|
|
1591
|
+
index_deleteMessages as deleteMessages,
|
|
1592
|
+
index_clearMessages as clearMessages,
|
|
1593
|
+
index_deleteMessagesByTimestamp as deleteMessagesByTimestamp,
|
|
1594
|
+
index_insertMessage as insertMessage,
|
|
1595
|
+
index_clearLocalData as clearLocalData,
|
|
1596
|
+
};
|
|
1597
|
+
}
|
|
1486
1598
|
|
|
1487
|
-
export { BaseMessage, _default$
|
|
1599
|
+
export { BaseMessage, _default$6 as CombineMessage, ConnectType, Events, _default$5 as FileMessage, _default$4 as GIFMessage, GetHistoryMessageOption, GetHistoryMessageResult, _default$9 as HQVoiceMessage, IAReceivedConversation, IAReceivedMessage, ICombineMessageBody, IConversationUpdateItem, IExtraData, IFileMessageBody, IGIFMessageBody, IGetHistoryMessagesByTypesOption, IHQVoiceMessageBody, IImageMessageBody, IImageMessageOption, IInitOption, IInsertOptions, ILocationMessageBody, IMessageDesc, IRecallMessageOptions, IReceivedUpdateConversation, IReferenceMessageBody, IRichContentMessageBody, ISearchMessageInTimeRangeOption, ISendBody, ISendFileMessageOptions, ISendImageMessageOptions, ISendMessageOptions, ISendSightMessageOptions, ISightMessageBody, ITextMessageBody, IThumbnailConfig, 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, SentStatus, _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, 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, getRemoteHistoryMessages, getServerTime, getTags, getTagsFromConversation, getTextMessageDraft, getTopConversationList, getTotalUnreadCount, getUltraGroupDefaultNotificationLevel, getUltraGroupList, getUltraGroupMessageListByMessageUId, getUltraGroupUnreadCountByTargetId, getUltraGroupUnreadMentionedCountByTargetId, 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, setUltraGroupDefaultNotificationLevel, updateExpansionForUltraGroupMessage, updateMessageExpansion, updateTag };
|