@rongcloud/engine 5.20.0-enterprise-alpha.2 → 5.20.1-enterprise-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
@@ -252,6 +252,10 @@ declare const LogTagId: {
252
252
  readonly A_E_SEARCH_CONVERSATION_BY_CONTENT_T: "A-e_search_conversation_by_content-T";
253
253
  readonly A_E_SEARCH_CONVERSATION_BY_CONTENT_R: "A-e_search_conversation_by_content-R";
254
254
  readonly P_GET_SYS_VERSION_E: "P-get_sys_version-E";
255
+ /** 清除本地缓存 */
256
+ readonly A_CLEAR_LOCAL_CACHE_O: "A-clear_local_cache-O";
257
+ readonly A_E_SET_MESSAGE_STATUS_TO_READ_T: "A-e_set_message_status_to_read-T";
258
+ readonly A_E_SET_MESSAGE_STATUS_TO_READ_R: "A-e_set_message_status_to_read-R";
255
259
  };
256
260
 
257
261
  /**
@@ -6108,33 +6112,6 @@ interface IGroupMessageDeliverStatus {
6108
6112
  list: IGroupMessageDeliveredStatusInfo[];
6109
6113
  }
6110
6114
 
6111
- /**
6112
- * 异步任务结果结构
6113
- * @description 该结构即将废弃,请使用 {@link RCResult} 替代
6114
- * @category Interface
6115
- */
6116
- declare type IAsyncRes<T = void> = Pick<RCResult<T>, 'code' | 'data'> & {
6117
- msg?: string;
6118
- };
6119
- /**
6120
- * 异步任务结果定义
6121
- * @description
6122
- * 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
6123
- * @category Type
6124
- */
6125
- declare type IPromiseResult<T = void> = Promise<IAsyncRes<T>>;
6126
-
6127
- /**
6128
- * 拓展方法定义,便于 electron-solution 实现时保持接口类型推导可用
6129
- */
6130
- interface IExtraMethod {
6131
- getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, sentTime: number, count: number, objectNames: string[], desc: 0 | 1, tag: string): Promise<IAsyncRes<{
6132
- list: IReceivedMessage[];
6133
- hasMore: boolean;
6134
- }>>;
6135
- updateMessageReceiptStatus(conersationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<IAsyncRes<boolean>>;
6136
- }
6137
-
6138
6115
  interface IServerAddressData {
6139
6116
  addr: string;
6140
6117
  protocol: EConnectProtocol;
@@ -6493,6 +6470,22 @@ interface INaviInfo {
6493
6470
  };
6494
6471
  }
6495
6472
 
6473
+ /**
6474
+ * 异步任务结果结构
6475
+ * @description 该结构即将废弃,请使用 {@link RCResult} 替代
6476
+ * @category Interface
6477
+ */
6478
+ declare type IAsyncRes<T = void> = Pick<RCResult<T>, 'code' | 'data'> & {
6479
+ msg?: string;
6480
+ };
6481
+ /**
6482
+ * 异步任务结果定义
6483
+ * @description
6484
+ * 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
6485
+ * @category Type
6486
+ */
6487
+ declare type IPromiseResult<T = void> = Promise<IAsyncRes<T>>;
6488
+
6496
6489
  /**
6497
6490
  * 用户信息
6498
6491
  * @since 5.10.1
@@ -7576,13 +7569,6 @@ interface IIPCMethods {
7576
7569
  * 连接时间
7577
7570
  */
7578
7571
  getConnectedTime(): number;
7579
- /**
7580
- * 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
7581
- * 对于未实现的方法,接口响应 Unsupport 错误码
7582
- * @param method
7583
- * @param args
7584
- */
7585
- callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
7586
7572
  /**
7587
7573
  * 获取历史消息
7588
7574
  * @param conversationType
@@ -8019,7 +8005,7 @@ interface IIPCMethods {
8019
8005
  /**
8020
8006
  * 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
8021
8007
  */
8022
- updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): IPromiseResult<boolean>;
8008
+ updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<RCResult<boolean>>;
8023
8009
  /**
8024
8010
  * 删除时间戳前的未读数
8025
8011
  */
@@ -8035,7 +8021,7 @@ interface IIPCMethods {
8035
8021
  * 获取所有群聊会话 @ 消息未读数
8036
8022
  */
8037
8023
  getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
8038
- clearData(): Promise<IAsyncRes<boolean>>;
8024
+ clearLocalData(): Promise<RCResult<boolean>>;
8039
8025
  /**
8040
8026
  * 获取运行时的系统信息,仅限 Electron 平台可用
8041
8027
  */
@@ -8746,13 +8732,13 @@ interface ISSEClientInitOpts extends ISSERequestOpts {
8746
8732
  }
8747
8733
  declare abstract class SSEClient {
8748
8734
  #private;
8749
- /** 平台标识,用于请求时携带 */
8750
- protected abstract _platform: string;
8751
8735
  protected readonly _logger: ILogger;
8752
8736
  constructor(
8753
8737
  /** 初始化参数 */
8754
8738
  initOpts: ISSEClientInitOpts);
8755
8739
  /**
8740
+ * 子类实现 SSE 请求:
8741
+ * * 需在因客户端网络问题导致的请求失败时返回 -1,以便于换地址重试
8756
8742
  * @param url - 服务地址
8757
8743
  * @param opts
8758
8744
  */
@@ -10256,13 +10242,6 @@ declare class APIContext {
10256
10242
  * 根据超级群的 targetId 数组,获取每个超级群下所有频道会话信息
10257
10243
  */
10258
10244
  getUltraGroupUnreadInfoList(targetIds: string[]): Promise<IAsyncRes<IUltraGroupUnreadInfo[]>>;
10259
- /**
10260
- * 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
10261
- * 对于未实现的方法,接口响应 Unsupport 错误码
10262
- * @param method 方法名
10263
- * @param args
10264
- */
10265
- callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
10266
10245
  /**
10267
10246
  * 获取运行时的系统信息,仅限 Electron 平台可用
10268
10247
  */
@@ -10385,7 +10364,7 @@ declare class APIContext {
10385
10364
  /**
10386
10365
  * 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
10387
10366
  */
10388
- setMessageStatusToRead(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<IAsyncRes<boolean>>;
10367
+ setMessageStatusToRead(conversation: IConversationOption, timestamp: number): Promise<RCResult<boolean>>;
10389
10368
  /**
10390
10369
  * 设置当前用户在线状态
10391
10370
  * @deprecated 老版 V2 中用到
@@ -10448,7 +10427,7 @@ declare class APIContext {
10448
10427
  list: IReceivedMessage[];
10449
10428
  hasMore: boolean;
10450
10429
  }>>;
10451
- clearData(): Promise<IAsyncRes<boolean>>;
10430
+ clearLocalData(): Promise<RCResult<boolean>>;
10452
10431
  createLogger(id: string, type: LogType): BasicLogger;
10453
10432
  getConversations(conversationList: IConversationOption[]): Promise<IAsyncRes<IReceivedConversation[]>>;
10454
10433
  /**
@@ -10803,13 +10782,6 @@ declare abstract class BasicEngine {
10803
10782
  * 获取 engine 包内部 logger 工具
10804
10783
  */
10805
10784
  getInnerLogger(): BasicLogger;
10806
- /**
10807
- * 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
10808
- * 对于未实现的方法,接口响应 Unsupport 错误码
10809
- * @param method
10810
- * @param args
10811
- */
10812
- abstract callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
10813
10785
  /**
10814
10786
  * 建立连接
10815
10787
  * @param token
@@ -11356,7 +11328,7 @@ declare abstract class BasicEngine {
11356
11328
  /**
11357
11329
  * 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
11358
11330
  */
11359
- abstract updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): IPromiseResult<boolean>;
11331
+ abstract updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<RCResult<boolean>>;
11360
11332
  /**
11361
11333
  * 删除时间戳前的未读数
11362
11334
  */
@@ -11400,7 +11372,7 @@ declare abstract class BasicEngine {
11400
11372
  * 获取所有群聊会话 @ 消息未读数
11401
11373
  */
11402
11374
  abstract getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
11403
- abstract clearData(): Promise<IAsyncRes<boolean>>;
11375
+ abstract clearLocalData(): Promise<RCResult<boolean>>;
11404
11376
  /**
11405
11377
  * 超级群获取指定会话未读 @ 消息列表
11406
11378
  */
@@ -11923,4 +11895,4 @@ declare class AppStorage {
11923
11895
  }): void;
11924
11896
  }
11925
11897
 
11926
- export { APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, BasicEngine, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationListFilter, ConversationListFilterType, ConversationType, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GetAllConversationListFilterParams, GetConversationListByPageIndexParams, GetConversationListByTimestampParams, GetConversationListResponse, GetTopConversationListParams, GetUnreadConversationListParams, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAppPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatModule, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomModule, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IClearMessageOption, ICombineV2MessageContent, ICombinedMessage, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IConversationUnreadCount, ICreateGroupFail, IDataHostingModule, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IExtraMethod, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHarmonyOSPushConfig, IIPCMethods, IInsertMessage, IInsertMsgOptions, ILocalTagStatus, ILogData, ILogger, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRuntime, ISendMsgOptions, IServerGroupBaseInfo, IStorage, IStreamMessageResponseChunkData, IStreamMessageResponseEventData, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadMsg, IUpdateItem, IUpdateMyProfileFail, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IWatcher, IiOSPushConfig, InnerRTCKeyMaps, InterruptionLevel, ItypingStateListener, KVString, LogL, LogLevel, LogSource, LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_UPLOAD_FILE_SIZE, MentionedInfo, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageRegisterParams, MessageType, MessageTypeDescription, NotificationLevel, NotificationStatus, OnlineStatus, OperateStatus, Codec$1 as PBCodec, PlatformInfo, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReadReceiptInfoV5, ReadReceiptResponseV5, ReadReceiptUser, ReadReceiptUsersOption, ReadReceiptUsersResult, ReceivedStatus, SSEModule, SentStatus, StreamMessageResponseEventType, SubscribeOperationType, SubscribeType, SuspendablePromise, UPLOAD_FILE_CHUNK_SIZE, UUId, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod, UserProfileVisibility, Validator, ValidatorManage, VersionManage, assert, fail, fixUrlProtocol, forEach, getMessageTypeDescription, getUUID, getUUID22, hasMessageTypeDescription, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversation, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidNotificationLevel, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, runtime, trans2IReceivedStatusInfo, trans2NotificationLevel, trans2NotificationStatus, transformReceivedStatusFlag, usingCppEngine, validate };
11898
+ export { APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, BasicEngine, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationListFilter, ConversationListFilterType, ConversationType, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GetAllConversationListFilterParams, GetConversationListByPageIndexParams, GetConversationListByTimestampParams, GetConversationListResponse, GetTopConversationListParams, GetUnreadConversationListParams, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAppPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatModule, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomModule, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IClearMessageOption, ICombineV2MessageContent, ICombinedMessage, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IConversationUnreadCount, ICreateGroupFail, IDataHostingModule, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHarmonyOSPushConfig, IIPCMethods, IInsertMessage, IInsertMsgOptions, ILocalTagStatus, ILogData, ILogger, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRuntime, ISendMsgOptions, IServerGroupBaseInfo, IStorage, IStreamMessageResponseChunkData, IStreamMessageResponseEventData, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadMsg, IUpdateItem, IUpdateMyProfileFail, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IWatcher, IiOSPushConfig, InnerRTCKeyMaps, InterruptionLevel, ItypingStateListener, KVString, LogL, LogLevel, LogSource, LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_UPLOAD_FILE_SIZE, MentionedInfo, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageRegisterParams, MessageType, MessageTypeDescription, NotificationLevel, NotificationStatus, OnlineStatus, OperateStatus, Codec$1 as PBCodec, PlatformInfo, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReadReceiptInfoV5, ReadReceiptResponseV5, ReadReceiptUser, ReadReceiptUsersOption, ReadReceiptUsersResult, ReceivedStatus, SSEModule, SentStatus, StreamMessageResponseEventType, SubscribeOperationType, SubscribeType, SuspendablePromise, UPLOAD_FILE_CHUNK_SIZE, UUId, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod, UserProfileVisibility, Validator, ValidatorManage, VersionManage, assert, fail, fixUrlProtocol, forEach, getMessageTypeDescription, getUUID, getUUID22, hasMessageTypeDescription, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversation, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidNotificationLevel, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, runtime, trans2IReceivedStatusInfo, trans2NotificationLevel, trans2NotificationStatus, transformReceivedStatusFlag, usingCppEngine, validate };