@rongcloud/engine 5.9.8-enterprise-alpha.3 → 5.9.9-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 CHANGED
@@ -1712,6 +1712,13 @@ declare enum ErrorCode {
1712
1712
  * 开发者接口调用时传入的 MessageExpansion 非法
1713
1713
  */
1714
1714
  INVALID_PARAMETER_MESSAGE_EXPANSION = 34220,
1715
+ /**
1716
+ * 34225
1717
+ * RCConversationIdentifier 参数非法。 可能原因:开发者调用接口传入的 RCConversationIdentifier 参数类型不对或者参数为空
1718
+ * @solution conversation is not valid
1719
+ * @since 5.9.9
1720
+ */
1721
+ INVALID_PARAMETER_CONVERSATION = 34225,
1715
1722
  /**
1716
1723
  * 34228
1717
1724
  * PushNotificationLevel 无效
@@ -1877,6 +1884,13 @@ declare enum ErrorCode {
1877
1884
  * @since 5.9.8
1878
1885
  */
1879
1886
  INVALID_PARAMETER_CONVERSATION_TYPE_LIST = 34284,
1887
+ /**
1888
+ * 34287
1889
+ * 开发者调用接口传入的 ConversationIdentifier 数组参数为空、数组长度为 0或超过限制、包含 null 或非法对象
1890
+ * @solution 传入的 ConversationList 数组参数为空、数组长度为 0或超过限制、包含 null 或非法对象
1891
+ * @since 5.9.9
1892
+ */
1893
+ INVALID_PARAMETER_CONVERSATION_LIST = 34287,
1880
1894
  /**
1881
1895
  * 34288
1882
1896
  * 开发者调用接口传入的 ClearMessageOption 数组参数为空、数组长度为 0或超过限制、包含 null 或非法对象
@@ -8267,10 +8281,15 @@ declare class APIContext {
8267
8281
  clearData(): Promise<IAsyncRes<boolean>>;
8268
8282
  createLogger(id: string, type: LogType): BasicLogger;
8269
8283
  createStatisticLogger(id: string, type: LogType): BasicStatistic;
8284
+ getConversations(conversationList: IConversationOption[]): Promise<IAsyncRes<IReceivedConversation[]>>;
8270
8285
  /**
8271
8286
  * 设置融云消息重排开关
8272
8287
  */
8273
8288
  setCheckDuplicateMessage(enableCheck: boolean): Promise<IAsyncRes<boolean>>;
8289
+ /**
8290
+ * 设置聊天室消息重排开关
8291
+ */
8292
+ setCheckChatRoomDuplicateMessage(enableCheck: boolean): Promise<IAsyncRes<boolean>>;
8274
8293
  rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<{
8275
8294
  code: ErrorCode;
8276
8295
  buffer?: Uint8Array;
@@ -9441,6 +9460,10 @@ declare abstract class AEngine {
9441
9460
  * 设置融云消息重排开关
9442
9461
  */
9443
9462
  abstract setCheckDuplicateMessage(enableCheck: boolean): IPromiseResult<boolean>;
9463
+ /**
9464
+ * 设置聊天室消息重排开关
9465
+ */
9466
+ abstract setCheckChatRoomDuplicateMessage(enableCheck: boolean): IPromiseResult<boolean>;
9444
9467
  /**
9445
9468
  * RTC 通用调用接口
9446
9469
  * 在非 Comet 协议下,入参 sourceData 应为 ArrayBuffer 数据,返回结果为 Uint8Array 数据
@@ -9507,6 +9530,7 @@ declare abstract class AEngine {
9507
9530
  * @param afterCount
9508
9531
  */
9509
9532
  abstract getMessagesByTimestamp(conversation: IConversationOption, timestamp: number, beforeCount: number, afterCount: number): IPromiseResult<IReceivedMessage[]>;
9533
+ abstract getConversations(conversations: IConversationOption[]): Promise<IAsyncRes<IReceivedConversation[]>>;
9510
9534
  }
9511
9535
 
9512
9536
  interface IUrlCenterInitOption {
@@ -9645,6 +9669,8 @@ interface IErrorCodeKey {
9645
9669
  subscribePageSize: number;
9646
9670
  beforeCount: number;
9647
9671
  afterCount: number;
9672
+ conversationList: number;
9673
+ conversationTypeNotSupport: number;
9648
9674
  }
9649
9675
 
9650
9676
  declare const ErrorCodeMap: IErrorCodeKey;
@@ -9750,7 +9776,10 @@ declare class ValidatorManage<T> {
9750
9776
  * @param required 是否必填
9751
9777
  * @param message 自定义错误信息
9752
9778
  */
9753
- validate(key: keyof IErrorCodeKey, value: any, validator: AssertRules | ((value?: any) => boolean), required?: boolean, message?: string): this;
9779
+ validate(key: keyof IErrorCodeKey, value: any, validator: AssertRules | ((value?: any) => {
9780
+ errorKey?: keyof IErrorCodeKey;
9781
+ valid: boolean;
9782
+ }) | ((value?: any) => boolean), required?: boolean, message?: string): this;
9754
9783
  private _getValidationResult;
9755
9784
  /**
9756
9785
  * 内部验证接口是否完成初始化,若未完成初始化,返回状态码 `ErrorCode.BIZ_ERROR_CLIENT_NOT_INIT`
@@ -9895,7 +9924,10 @@ declare const isArray: (arr: unknown) => boolean;
9895
9924
  declare const isLimitedArray: (option: {
9896
9925
  minLength?: number | undefined;
9897
9926
  maxLength?: number | undefined;
9898
- itemValidator?: ((val: unknown) => boolean) | undefined;
9927
+ itemValidator?: ((val: unknown) => boolean) | ((val: unknown) => {
9928
+ errorKey?: keyof IErrorCodeKey;
9929
+ valid: boolean;
9930
+ }) | undefined;
9899
9931
  }) => (arr: any[]) => boolean;
9900
9932
  /**
9901
9933
  * 有限制的字符串
@@ -9970,6 +10002,15 @@ declare const isValidFileType: (fileType: number) => boolean;
9970
10002
  declare const isValidExpansion: (expansion: {
9971
10003
  [key: string]: string;
9972
10004
  } | undefined) => IIsValidExpansion;
10005
+ /**
10006
+ * @param conversation 会话信息
10007
+ * @param conversationTypeList 接口支持的会话类型列表,不传则不校验
10008
+ * @returns
10009
+ */
10010
+ declare const isValidConversation: (conversation: any, conversationTypeList?: ConversationType[] | undefined) => {
10011
+ errorKey?: keyof IErrorCodeKey | undefined;
10012
+ valid: boolean;
10013
+ };
9973
10014
 
9974
10015
  /**
9975
10016
  * @deprecated
@@ -10478,4 +10519,4 @@ declare type AbsCodec<T> = Codec<T>;
10478
10519
  */
10479
10520
  declare const version: string;
10480
10521
 
10481
- 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, ErrorCodeMap, 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, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserStatusInfo, 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, OnlineStatus, OperateStatus, PlatformInfo, 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, SubscribeOperationType, SubscribeType, SuspendablePromise, TagChangeType, Type, UPLOAD_FILE_CHUNK_SIZE, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMentionedType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, UserGroupChangeType, VERSION, ValidatorManage, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketNavi, appendUrl, assert, clone, cloneByJSON, completeSubscriptionPlatformStatus, deInitLogDB, decryptCBC, fixUrlProtocol, forEach, getBrowser, getClientMessageId, getDeviceId, getMessageUIdHash, getMimeKey, getMinionURL, getUUID, getUUID22, getUploadFileName, getbundleId, httpRequest, indexOf, initLogDB, initStatisticDB, isArray, isArrayBuffer, isBoolean, isConnnectAckCode as isConnnectAck, isDisconnectCode as isDisconnectedByServer, isFunction, isHttpUrl, isInObject, isInclude, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isStartCloudController, isString, isTypeInConversationList, isUndefined, isValidChannelId, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, isValidNotificationLevel, isValidTargetId, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, statisticTranscsv, todo, transcsv, transformReceivedStatusFlag, transformReceivedStatusInfo, unInitStatisticDB, urlCenter, usingCppEngine, validate, validators, version };
10522
+ 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, ErrorCodeMap, 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, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserStatusInfo, 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, OnlineStatus, OperateStatus, PlatformInfo, 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, SubscribeOperationType, SubscribeType, SuspendablePromise, TagChangeType, Type, UPLOAD_FILE_CHUNK_SIZE, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMentionedType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, UserGroupChangeType, VERSION, ValidatorManage, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketNavi, appendUrl, assert, clone, cloneByJSON, completeSubscriptionPlatformStatus, deInitLogDB, decryptCBC, fixUrlProtocol, forEach, getBrowser, getClientMessageId, getDeviceId, getMessageUIdHash, getMimeKey, getMinionURL, getUUID, getUUID22, getUploadFileName, getbundleId, httpRequest, indexOf, initLogDB, initStatisticDB, isArray, isArrayBuffer, isBoolean, isConnnectAckCode as isConnnectAck, isDisconnectCode as isDisconnectedByServer, isFunction, isHttpUrl, isInObject, isInclude, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isStartCloudController, isString, isTypeInConversationList, isUndefined, isValidChannelId, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversation, isValidConversationType, isValidExpansion, isValidFileType, isValidNotificationLevel, isValidTargetId, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, statisticTranscsv, todo, transcsv, transformReceivedStatusFlag, transformReceivedStatusInfo, unInitStatisticDB, urlCenter, usingCppEngine, validate, validators, version };