@rongcloud/engine 5.20.0 → 5.20.1-enterprise-alpha.2
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.cjs +1 -1
- package/index.cjs.js +1 -1
- package/index.d.ts +39 -57
- package/index.esm.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -251,6 +251,11 @@ declare const LogTagId: {
|
|
|
251
251
|
readonly L_EVENT_LOOP_BLOCKING_S: "L-event_loop_blocking-S";
|
|
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
|
+
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";
|
|
254
259
|
};
|
|
255
260
|
|
|
256
261
|
/**
|
|
@@ -6107,33 +6112,6 @@ interface IGroupMessageDeliverStatus {
|
|
|
6107
6112
|
list: IGroupMessageDeliveredStatusInfo[];
|
|
6108
6113
|
}
|
|
6109
6114
|
|
|
6110
|
-
/**
|
|
6111
|
-
* 异步任务结果结构
|
|
6112
|
-
* @description 该结构即将废弃,请使用 {@link RCResult} 替代
|
|
6113
|
-
* @category Interface
|
|
6114
|
-
*/
|
|
6115
|
-
declare type IAsyncRes<T = void> = Pick<RCResult<T>, 'code' | 'data'> & {
|
|
6116
|
-
msg?: string;
|
|
6117
|
-
};
|
|
6118
|
-
/**
|
|
6119
|
-
* 异步任务结果定义
|
|
6120
|
-
* @description
|
|
6121
|
-
* 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
|
|
6122
|
-
* @category Type
|
|
6123
|
-
*/
|
|
6124
|
-
declare type IPromiseResult<T = void> = Promise<IAsyncRes<T>>;
|
|
6125
|
-
|
|
6126
|
-
/**
|
|
6127
|
-
* 拓展方法定义,便于 electron-solution 实现时保持接口类型推导可用
|
|
6128
|
-
*/
|
|
6129
|
-
interface IExtraMethod {
|
|
6130
|
-
getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, sentTime: number, count: number, objectNames: string[], desc: 0 | 1, tag: string): Promise<IAsyncRes<{
|
|
6131
|
-
list: IReceivedMessage[];
|
|
6132
|
-
hasMore: boolean;
|
|
6133
|
-
}>>;
|
|
6134
|
-
updateMessageReceiptStatus(conersationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<IAsyncRes<boolean>>;
|
|
6135
|
-
}
|
|
6136
|
-
|
|
6137
6115
|
interface IServerAddressData {
|
|
6138
6116
|
addr: string;
|
|
6139
6117
|
protocol: EConnectProtocol;
|
|
@@ -6492,6 +6470,22 @@ interface INaviInfo {
|
|
|
6492
6470
|
};
|
|
6493
6471
|
}
|
|
6494
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
|
+
|
|
6495
6489
|
/**
|
|
6496
6490
|
* 用户信息
|
|
6497
6491
|
* @since 5.10.1
|
|
@@ -7575,13 +7569,6 @@ interface IIPCMethods {
|
|
|
7575
7569
|
* 连接时间
|
|
7576
7570
|
*/
|
|
7577
7571
|
getConnectedTime(): number;
|
|
7578
|
-
/**
|
|
7579
|
-
* 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
|
|
7580
|
-
* 对于未实现的方法,接口响应 Unsupport 错误码
|
|
7581
|
-
* @param method
|
|
7582
|
-
* @param args
|
|
7583
|
-
*/
|
|
7584
|
-
callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
|
|
7585
7572
|
/**
|
|
7586
7573
|
* 获取历史消息
|
|
7587
7574
|
* @param conversationType
|
|
@@ -8018,7 +8005,7 @@ interface IIPCMethods {
|
|
|
8018
8005
|
/**
|
|
8019
8006
|
* 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
|
|
8020
8007
|
*/
|
|
8021
|
-
updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string):
|
|
8008
|
+
updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<RCResult<boolean>>;
|
|
8022
8009
|
/**
|
|
8023
8010
|
* 删除时间戳前的未读数
|
|
8024
8011
|
*/
|
|
@@ -8034,7 +8021,7 @@ interface IIPCMethods {
|
|
|
8034
8021
|
* 获取所有群聊会话 @ 消息未读数
|
|
8035
8022
|
*/
|
|
8036
8023
|
getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
|
|
8037
|
-
|
|
8024
|
+
clearLocalData(): Promise<RCResult<boolean>>;
|
|
8038
8025
|
/**
|
|
8039
8026
|
* 获取运行时的系统信息,仅限 Electron 平台可用
|
|
8040
8027
|
*/
|
|
@@ -8745,13 +8732,13 @@ interface ISSEClientInitOpts extends ISSERequestOpts {
|
|
|
8745
8732
|
}
|
|
8746
8733
|
declare abstract class SSEClient {
|
|
8747
8734
|
#private;
|
|
8748
|
-
/** 平台标识,用于请求时携带 */
|
|
8749
|
-
protected abstract _platform: string;
|
|
8750
8735
|
protected readonly _logger: ILogger;
|
|
8751
8736
|
constructor(
|
|
8752
8737
|
/** 初始化参数 */
|
|
8753
8738
|
initOpts: ISSEClientInitOpts);
|
|
8754
8739
|
/**
|
|
8740
|
+
* 子类实现 SSE 请求:
|
|
8741
|
+
* * 需在因客户端网络问题导致的请求失败时返回 -1,以便于换地址重试
|
|
8755
8742
|
* @param url - 服务地址
|
|
8756
8743
|
* @param opts
|
|
8757
8744
|
*/
|
|
@@ -9533,6 +9520,15 @@ interface IAPIContextOption {
|
|
|
9533
9520
|
* 启动线程阻塞检查
|
|
9534
9521
|
*/
|
|
9535
9522
|
eventLoopBlockingCheck?: boolean;
|
|
9523
|
+
/**
|
|
9524
|
+
* 开启已读回执信息本地存储
|
|
9525
|
+
*/
|
|
9526
|
+
enableReadReceiptStorage: boolean;
|
|
9527
|
+
/**
|
|
9528
|
+
* 启动导航服务 V2,默认关闭,仅私有云有效
|
|
9529
|
+
* @since 5.22.0
|
|
9530
|
+
*/
|
|
9531
|
+
useNaviV2?: boolean;
|
|
9536
9532
|
}
|
|
9537
9533
|
interface IConnectResult {
|
|
9538
9534
|
/**
|
|
@@ -10246,13 +10242,6 @@ declare class APIContext {
|
|
|
10246
10242
|
* 根据超级群的 targetId 数组,获取每个超级群下所有频道会话信息
|
|
10247
10243
|
*/
|
|
10248
10244
|
getUltraGroupUnreadInfoList(targetIds: string[]): Promise<IAsyncRes<IUltraGroupUnreadInfo[]>>;
|
|
10249
|
-
/**
|
|
10250
|
-
* 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
|
|
10251
|
-
* 对于未实现的方法,接口响应 Unsupport 错误码
|
|
10252
|
-
* @param method 方法名
|
|
10253
|
-
* @param args
|
|
10254
|
-
*/
|
|
10255
|
-
callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
|
|
10256
10245
|
/**
|
|
10257
10246
|
* 获取运行时的系统信息,仅限 Electron 平台可用
|
|
10258
10247
|
*/
|
|
@@ -10375,7 +10364,7 @@ declare class APIContext {
|
|
|
10375
10364
|
/**
|
|
10376
10365
|
* 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
|
|
10377
10366
|
*/
|
|
10378
|
-
setMessageStatusToRead(
|
|
10367
|
+
setMessageStatusToRead(conversation: IConversationOption, timestamp: number): Promise<RCResult<boolean>>;
|
|
10379
10368
|
/**
|
|
10380
10369
|
* 设置当前用户在线状态
|
|
10381
10370
|
* @deprecated 老版 V2 中用到
|
|
@@ -10438,7 +10427,7 @@ declare class APIContext {
|
|
|
10438
10427
|
list: IReceivedMessage[];
|
|
10439
10428
|
hasMore: boolean;
|
|
10440
10429
|
}>>;
|
|
10441
|
-
|
|
10430
|
+
clearLocalData(): Promise<RCResult<boolean>>;
|
|
10442
10431
|
createLogger(id: string, type: LogType): BasicLogger;
|
|
10443
10432
|
getConversations(conversationList: IConversationOption[]): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
10444
10433
|
/**
|
|
@@ -10793,13 +10782,6 @@ declare abstract class BasicEngine {
|
|
|
10793
10782
|
* 获取 engine 包内部 logger 工具
|
|
10794
10783
|
*/
|
|
10795
10784
|
getInnerLogger(): BasicLogger;
|
|
10796
|
-
/**
|
|
10797
|
-
* 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
|
|
10798
|
-
* 对于未实现的方法,接口响应 Unsupport 错误码
|
|
10799
|
-
* @param method
|
|
10800
|
-
* @param args
|
|
10801
|
-
*/
|
|
10802
|
-
abstract callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
|
|
10803
10785
|
/**
|
|
10804
10786
|
* 建立连接
|
|
10805
10787
|
* @param token
|
|
@@ -11346,7 +11328,7 @@ declare abstract class BasicEngine {
|
|
|
11346
11328
|
/**
|
|
11347
11329
|
* 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
|
|
11348
11330
|
*/
|
|
11349
|
-
abstract updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string):
|
|
11331
|
+
abstract updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<RCResult<boolean>>;
|
|
11350
11332
|
/**
|
|
11351
11333
|
* 删除时间戳前的未读数
|
|
11352
11334
|
*/
|
|
@@ -11390,7 +11372,7 @@ declare abstract class BasicEngine {
|
|
|
11390
11372
|
* 获取所有群聊会话 @ 消息未读数
|
|
11391
11373
|
*/
|
|
11392
11374
|
abstract getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
|
|
11393
|
-
abstract
|
|
11375
|
+
abstract clearLocalData(): Promise<RCResult<boolean>>;
|
|
11394
11376
|
/**
|
|
11395
11377
|
* 超级群获取指定会话未读 @ 消息列表
|
|
11396
11378
|
*/
|
|
@@ -11913,4 +11895,4 @@ declare class AppStorage {
|
|
|
11913
11895
|
}): void;
|
|
11914
11896
|
}
|
|
11915
11897
|
|
|
11916
|
-
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,
|
|
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 };
|