@rongcloud/engine 5.9.5 → 5.9.6

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 CHANGED
@@ -1208,7 +1208,7 @@ declare enum ErrorCode {
1208
1208
  */
1209
1209
  RC_CONN_APP_BLOCKED_OR_DELETED = 31008,
1210
1210
  /**
1211
- * 用户被封禁
1211
+ * 连接失败,用户被封禁(客户端主动连接失败返回)
1212
1212
  * @since 5.2.0
1213
1213
  */
1214
1214
  RC_CONN_USER_BLOCKED = 31009,
@@ -1218,7 +1218,7 @@ declare enum ErrorCode {
1218
1218
  */
1219
1219
  RC_DISCONN_KICK = 31010,
1220
1220
  /**
1221
- * 与服务器的连接已断开,用户被封禁
1221
+ * 用户被封禁,导致 IM 连接被动断开
1222
1222
  * @since 5.2.0
1223
1223
  */
1224
1224
  RC_DISCONN_EXCEPTION = 31011,
@@ -1483,6 +1483,31 @@ declare enum ErrorCode {
1483
1483
  * @hidden
1484
1484
  */
1485
1485
  READ_RECEIPT_V4_UPDATE_NOT_SUPPORT = 34293,
1486
+ /**
1487
+ * 数据库未初始化
1488
+ * @since 5.9.6
1489
+ */
1490
+ RC_DB_NOT_INIT = 34301,
1491
+ /**
1492
+ * 数据库错误
1493
+ * @since 5.9.6
1494
+ */
1495
+ RC_DB_CORRUPT = 34302,
1496
+ /**
1497
+ * 数据库 SQL 执行异常
1498
+ * @since 5.9.6
1499
+ */
1500
+ RC_DB_SQL_ERROR = 34303,
1501
+ /**
1502
+ * 查询数据不存在
1503
+ * @since 5.9.6
1504
+ */
1505
+ RC_DB_DATA_NOT_FOUND = 34304,
1506
+ /**
1507
+ * 网络数据解析失败
1508
+ * @since 5.9.6
1509
+ */
1510
+ RC_NET_DATA_ERROR = 34305,
1486
1511
  /**
1487
1512
  * 方法未支持
1488
1513
  */
@@ -2206,6 +2231,8 @@ declare enum LogTagId {
2206
2231
  L_INSTALL_PLUGIN_R = "L-INSTALL_PLUGIN-R",
2207
2232
  /** navi 配置错误 */
2208
2233
  L_NAVI_CONF_E = "L-NAVI_CONF_ERROR-E",
2234
+ /** CMP 地址 */
2235
+ L_NAVI_CMP_R = "L-NAVI_CPM-R",
2209
2236
  A_SEND_MSG_T = "A-send_msg-T",
2210
2237
  A_SEND_MSG_R = "A-send_msg-R",
2211
2238
  L_SEND_MSG_T = "L-send_msg-T",
@@ -3064,6 +3091,10 @@ interface IReceivedMessage {
3064
3091
  * 是否断档
3065
3092
  */
3066
3093
  hasMore?: boolean;
3094
+ /**
3095
+ * 定向用户列表(仅支持群聊, 超级群)
3096
+ */
3097
+ directedUserIds?: string[];
3067
3098
  }
3068
3099
  /**
3069
3100
  * 第一条未读消息信息
@@ -3307,6 +3338,7 @@ interface IInsertMsgOptions {
3307
3338
  canIncludeExpansion?: boolean;
3308
3339
  expansionMsg?: string;
3309
3340
  channelId: string;
3341
+ directedUserIds?: string[];
3310
3342
  }
3311
3343
  interface IInsertMessage {
3312
3344
  conversationType: number;
@@ -3326,6 +3358,7 @@ interface IInsertMessage {
3326
3358
  } | null;
3327
3359
  receivedStatus?: number;
3328
3360
  receivedStatusInfo?: IReceivedStatusInfo;
3361
+ directedUserIds?: string[];
3329
3362
  /**
3330
3363
  * 插入消息是否计入未读数: true 计数 false 不计数, 默认不计数
3331
3364
  */
@@ -4950,7 +4983,7 @@ declare class WebSocketNavi extends BasicNavi {
4950
4983
  private runtime;
4951
4984
  constructor(appkey: string, logger: BasicLogger, statisticLog: BasicStatistic, runtime: IRuntime, staticConfigManager: WebsocketStaticConfigManager);
4952
4985
  protected httpRequest(uri: string, appkey: string, token: string, traceId: string, finished: boolean): IPromiseResult<INaviInfo>;
4953
- protected httpRequestV2(uri: string, appkey: string, token: string, traceId: string): IPromiseResult<INaviInfo>;
4986
+ protected httpRequestV2(uri: string, appkey: string, token: string, traceId: string, finished: boolean): IPromiseResult<INaviInfo>;
4954
4987
  protected getNaviCache(formatedToken: string): INaviCache | null;
4955
4988
  protected setNaviCache(formatedToken: string, naviInfo: INaviInfo): void;
4956
4989
  }
@@ -5252,6 +5285,7 @@ declare abstract class AConnectionMgr {
5252
5285
  * 清理重连计时器
5253
5286
  */
5254
5287
  private stopReconnectTimer;
5288
+ private _getProtocol;
5255
5289
  /**
5256
5290
  * 获取 CMP 列表
5257
5291
  */
@@ -7020,6 +7054,21 @@ declare class APIContext {
7020
7054
  list: IReceivedMessage[];
7021
7055
  hasMore: boolean;
7022
7056
  }>>;
7057
+ /**
7058
+ * 获取本地与远端历史消息(断档补齐动作由协议栈底层完成)
7059
+ * @param conversationType
7060
+ * @param targetId
7061
+ * @param timestamp
7062
+ * @param count
7063
+ * @param order
7064
+ * @param channelId
7065
+ * @returns
7066
+ */
7067
+ getContinuousMessages(conversationType: ConversationType, targetId: string, timestamp?: number, count?: number, order?: 0 | 1, channelId?: string): Promise<IAsyncRes<{
7068
+ list: IReceivedMessage[];
7069
+ timestamp: number;
7070
+ hasMore: boolean;
7071
+ }>>;
7023
7072
  getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, timestamp: number, count: number, messageTypes: string[], order: number, channelId: string): Promise<IAsyncRes<{
7024
7073
  list: IReceivedMessage[];
7025
7074
  hasMore: boolean;
@@ -8064,6 +8113,11 @@ declare abstract class AEngine {
8064
8113
  list: IReceivedMessage[];
8065
8114
  hasMore: boolean;
8066
8115
  }>;
8116
+ abstract getContinuousMessages(conversationType: ConversationType, targetId: string, timestamp: number, count: number, order: 0 | 1, channelId: string): IPromiseResult<{
8117
+ list: IReceivedMessage[];
8118
+ timestamp: number;
8119
+ hasMore: boolean;
8120
+ }>;
8067
8121
  /**
8068
8122
  * 获取指定消息类型的历史消息
8069
8123
  */
@@ -9156,7 +9210,7 @@ declare function fixUrlProtocol(url: string, protocol?: EConnectProtocol): strin
9156
9210
  * 根据消息id计算出哈希值,用作与云控返回的采样率做模运算(取余运算)
9157
9211
  * @param messageUId
9158
9212
  */
9159
- declare function getMessageUIdHash(messageUId: string): number;
9213
+ declare function getMessageUIdHash(messageUId?: string): number;
9160
9214
 
9161
9215
  declare function httpRequest(options: IRequest): SuspendablePromise<IResponse>;
9162
9216
 
@@ -9541,4 +9595,4 @@ declare type AbsCodec<T> = Codec<T>;
9541
9595
  */
9542
9596
  declare const version: string;
9543
9597
 
9544
- export { AConnectionMgr, AEngine, APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, BaseCloudController, BasicLogger, BasicNavi, BasicReporter, BasicStaticConfigManager, BasicStatistic, BasicStatisticReporter, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectReason, ConnectType, ConnectionStatus, Content, ConversationType, DB_LOG_FLUSH_FREQUENCY, DB_LOG_MAX_SIZE, DelayTimer, EConnectProtocol, EnableLogL, EnterpriseType, ErrorCode, EventEmitter, FORMATED_VERSION, FileType, HTTP_TIMEOUT, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBaseStatisticsData, IBlockedMessageInfo, ICancelRoomPKOptions, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IClearMessageOption, ICloudController, ICombineV2MessageContent, ICombinedMessage, IConnectResult, IConnectionListener, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IFirstUnreadMessageInfo, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupReadReceiptData, IInsertMessage, IInsertMsgOptions, IIsValidExpansion, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, ILogDB, ILogData, ILogger, IMRTRConfig, IM_CHATROOM_PULL_INTERVAL_TIME, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, IMetionedData, INaviCache, INaviContextInfo, INaviInfo, INetwork, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCRoomInfo, IRTCUserData, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallMsgContent, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IReqRoomPKOptions, IRequest, IResRoomPKOptions, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStaticConfig, IStatistic, IStatisticDB, IStatisticData, IStatisticsCMPData, IStatisticsCSData, IStatisticsDurData, IStatisticsNaviData, IStatisticsNetworkData, IStatisticsRMTPData, IStatisticsWebsocketData, IStorage, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadConversation, IUltraUnreadMsg, IUpdateItem, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUploadTask, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IWatcher, IWebSocket, IiOSPushConfig, IndexDBLogger, IndexDBReporter, IndexDBStatistic, IndexDBStatisticReporter, RTCKeyMaps as InnerRTCKeyMaps, InterruptionLevel, InvokerType, ItypingStateListener, KVString, LOCAL_STORAGE_KEYS, LiveRole, LiveType, LogContent, LogL, LogLevel, LogSource, LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MAX_UPLOAD_FILE_SIZE, MentionedInfoBody, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NaviCacheType, NetworkType, NotificationLevel, NotificationStatus, ONE_LOG_SIZE_MAX, OperateStatus, PluginContext, ProtocalType, PushImportanceHonor, RCAssertError, RCConnectionStatus, RC_DEFAULT_USER, READ_RECEIPT_CATCH_TIME, REAT_TIME_LOG_SIZE, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATIC_CONFIG_CACHE_TIME, STATIC_CONFIG_IV, STATIC_CONFIG_KEY, STATUS_MESSAGE, SentStatus, StatisticL, StatisticsTag, StatisticsVersion, StoreKeys, SuspendablePromise, TagChangeType, Type, UPLOAD_FILE_CHUNK_SIZE, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMentionedType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, UserGroupChangeType, VERSION, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketNavi, appendUrl, assert, clone, cloneByJSON, deInitLogDB, decryptCBC, fixUrlProtocol, forEach, getBrowser, getClientMessageId, getDeviceId, getMessageUIdHash, getMimeKey, getUUID, getUUID22, getUploadFileName, getbundleId, httpRequest, indexOf, initLogDB, initStatisticDB, isArray, isArrayBuffer, isBoolean, isConnnectAckCode as isConnnectAck, isDisconnectCode as isDisconnectedByServer, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isStartCloudController, isString, isTypeInConversationList, isUndefined, isValidChannelId, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, isValidNotificationLevel, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, statisticTranscsv, todo, transcsv, transformReceivedStatusFlag, transformReceivedStatusInfo, unInitStatisticDB, urlCenter, usingCppEngine, validate, version };
9598
+ export { AConnectionMgr, AEngine, APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, BaseCloudController, BasicLogger, BasicNavi, BasicReporter, BasicStaticConfigManager, BasicStatistic, BasicStatisticReporter, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectReason, ConnectType, ConnectionStatus, Content, ConversationType, DB_LOG_FLUSH_FREQUENCY, DB_LOG_MAX_SIZE, DelayTimer, EConnectProtocol, EnableLogL, EnterpriseType, ErrorCode, EventEmitter, FORMATED_VERSION, FileType, HTTP_TIMEOUT, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBaseStatisticsData, IBlockedMessageInfo, ICancelRoomPKOptions, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IClearMessageOption, ICloudController, ICombineV2MessageContent, ICombinedMessage, IConnectResult, IConnectionListener, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IFirstUnreadMessageInfo, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupReadReceiptData, IInsertMessage, IInsertMsgOptions, IIsValidExpansion, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, ILogDB, ILogData, ILogger, IMRTRConfig, IM_CHATROOM_PULL_INTERVAL_TIME, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, IMetionedData, INaviCache, INaviContextInfo, INaviInfo, INetwork, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCRoomInfo, IRTCUserData, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallMsgContent, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IReqRoomPKOptions, IRequest, IResRoomPKOptions, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerAddressData, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStaticConfig, IStatistic, IStatisticDB, IStatisticData, IStatisticsCMPData, IStatisticsCSData, IStatisticsDurData, IStatisticsNaviData, IStatisticsNetworkData, IStatisticsRMTPData, IStatisticsWebsocketData, IStorage, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadConversation, IUltraUnreadMsg, IUpdateItem, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUploadTask, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IWatcher, IWebSocket, IiOSPushConfig, IndexDBLogger, IndexDBReporter, IndexDBStatistic, IndexDBStatisticReporter, RTCKeyMaps as InnerRTCKeyMaps, InterruptionLevel, InvokerType, ItypingStateListener, KVString, LOCAL_STORAGE_KEYS, LiveRole, LiveType, LogContent, LogL, LogLevel, LogSource, LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MAX_UPLOAD_FILE_SIZE, MentionedInfoBody, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NaviCacheType, NetworkType, NotificationLevel, NotificationStatus, ONE_LOG_SIZE_MAX, OperateStatus, PluginContext, ProtocalType, PushImportanceHonor, RCAssertError, RCConnectionStatus, RC_DEFAULT_USER, READ_RECEIPT_CATCH_TIME, REAT_TIME_LOG_SIZE, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATIC_CONFIG_CACHE_TIME, STATIC_CONFIG_IV, STATIC_CONFIG_KEY, STATUS_MESSAGE, SentStatus, StatisticL, StatisticsTag, StatisticsVersion, StoreKeys, SuspendablePromise, TagChangeType, Type, UPLOAD_FILE_CHUNK_SIZE, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMentionedType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, UserGroupChangeType, VERSION, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketNavi, appendUrl, assert, clone, cloneByJSON, deInitLogDB, decryptCBC, fixUrlProtocol, forEach, getBrowser, getClientMessageId, getDeviceId, getMessageUIdHash, getMimeKey, getUUID, getUUID22, getUploadFileName, getbundleId, httpRequest, indexOf, initLogDB, initStatisticDB, isArray, isArrayBuffer, isBoolean, isConnnectAckCode as isConnnectAck, isDisconnectCode as isDisconnectedByServer, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isStartCloudController, isString, isTypeInConversationList, isUndefined, isValidChannelId, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, isValidNotificationLevel, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, statisticTranscsv, todo, transcsv, transformReceivedStatusFlag, transformReceivedStatusInfo, unInitStatisticDB, urlCenter, usingCppEngine, validate, version };