@rongcloud/engine 5.5.2 → 5.5.3

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
@@ -992,7 +992,7 @@ declare enum ConnectionStatus {
992
992
  */
993
993
  APPKEY_IS_FAKE = 20,
994
994
  /**
995
- * 其他端登录,本端禁止连接和重连
995
+ * Electron 中,其他端登录,本端禁止连接和重连
996
996
  */
997
997
  FORBID_RECONNECT_BY_OTHER_SAME_CLIENT = 31023,
998
998
  /**
@@ -1356,6 +1356,8 @@ declare enum LogTagId {
1356
1356
  L_CONNECT_S = "L-connect-S",
1357
1357
  P_CONNECT_O = "P-connect-O",
1358
1358
  P_CONNECT_S = "P-connect-S",
1359
+ L_NOTIFY_ULTRA_ONLINE_S = "L-notify-ultra-online-S",
1360
+ L_ULTRA_SYNC_DONE_S = "L-ultra-sync-done-S",
1359
1361
  A_SEND_MSG_T = "A-send_msg-T",
1360
1362
  A_SEND_MSG_R = "A-send_msg-R",
1361
1363
  P_SEND_MSG_T = "P-send_msg-T",
@@ -1413,7 +1415,10 @@ declare enum LogTagId {
1413
1415
  */
1414
1416
  L_PB_ENCODE_E = "L-pb-encode-E",
1415
1417
  L_PB_DECODE_E = "L-pb-decode-E",
1416
- L_NOTIFY_NAVI_CHANGE_E = "L-notify_navi_change-E"
1418
+ L_NOTIFY_NAVI_CHANGE_E = "L-notify_navi_change-E",
1419
+ L_REPORT_FULL_LOG_O = "L-report_full_log-O",
1420
+ L_REPORT_FULL_LOG_T = "L-report_full_log-T",
1421
+ L_REPORT_FULL_LOG_R = "L-report_full_log-R"
1417
1422
  }
1418
1423
 
1419
1424
  /**
@@ -3188,6 +3193,96 @@ interface IExtraMethod {
3188
3193
  updateMessageReceiptStatus(conersationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<IAsyncRes<boolean>>;
3189
3194
  }
3190
3195
 
3196
+ /**
3197
+ * 当前运行时设备信息
3198
+ */
3199
+ interface IOSInfo {
3200
+ /** 软件运行时的 CPU 架构信息 */
3201
+ arch: string;
3202
+ /** 平台标识 */
3203
+ platform: string;
3204
+ /** 操作系统名称 */
3205
+ type: string;
3206
+ /** 操作系统 release 标识 */
3207
+ release: string;
3208
+ /** 操作系统版本信息 */
3209
+ version: string;
3210
+ /** 内存余量 */
3211
+ freemem: number;
3212
+ /** 系统内存总量 */
3213
+ totalmem: number;
3214
+ /** 本次操作系统运行时长 */
3215
+ uptime: number;
3216
+ cpus: {
3217
+ /** CPU 型号标识 */
3218
+ model: string;
3219
+ /** 主频 MHz */
3220
+ speed: number;
3221
+ times: {
3222
+ user: number;
3223
+ nice: number;
3224
+ sys: number;
3225
+ idle: number;
3226
+ irq: number;
3227
+ };
3228
+ }[];
3229
+ networkInterfaces: {
3230
+ /** 网卡接口标识 */
3231
+ [link: string]: {
3232
+ /** IP */
3233
+ address: string;
3234
+ /** 子网掩码 */
3235
+ netmask: string;
3236
+ /** IP 协议版本 */
3237
+ family: string;
3238
+ /** Mac Address */
3239
+ mac: string;
3240
+ /** 是否回环地址 */
3241
+ internal: boolean;
3242
+ /** CIDR */
3243
+ cidr: string | null;
3244
+ }[] | undefined;
3245
+ };
3246
+ }
3247
+
3248
+ interface IProcessInfo {
3249
+ title: string;
3250
+ platform: string;
3251
+ arch: string;
3252
+ pid: number;
3253
+ ppid: number;
3254
+ uptime: number;
3255
+ cpuUsage: {
3256
+ user: number;
3257
+ system: number;
3258
+ };
3259
+ memoryUsage: {
3260
+ rss: number;
3261
+ heapTotal: number;
3262
+ heapUsed: number;
3263
+ external: number;
3264
+ arrayBuffers: number;
3265
+ };
3266
+ resourceUsage: {
3267
+ userCPUTime: number;
3268
+ systemCPUTime: number;
3269
+ maxRSS: number;
3270
+ sharedMemorySize: number;
3271
+ unsharedDataSize: number;
3272
+ unsharedStackSize: number;
3273
+ minorPageFault: number;
3274
+ majorPageFault: number;
3275
+ swappedOut: number;
3276
+ fsRead: number;
3277
+ fsWrite: number;
3278
+ ipcSent: number;
3279
+ ipcReceived: number;
3280
+ signalsCount: number;
3281
+ voluntaryContextSwitches: number;
3282
+ involuntaryContextSwitches: number;
3283
+ };
3284
+ }
3285
+
3191
3286
  /**
3192
3287
  * engine 基本接口定义,用于约束 Electron 下主进程、渲染进程、JSEngine 的编码一致性
3193
3288
  */
@@ -3691,6 +3786,14 @@ interface IEngine {
3691
3786
  */
3692
3787
  getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
3693
3788
  clearData(): Promise<IAsyncRes<boolean>>;
3789
+ /**
3790
+ * 获取运行时的系统信息,仅限 Electron 平台可用
3791
+ */
3792
+ getOSInfo(): IPromiseResult<IOSInfo>;
3793
+ /**
3794
+ * 获取应用主进程信息,仅限 Electron 平台可用
3795
+ */
3796
+ getMainProcessInfo(): IPromiseResult<IProcessInfo>;
3694
3797
  rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<ErrorCode>;
3695
3798
  rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<{
3696
3799
  code: ErrorCode;
@@ -5131,6 +5234,18 @@ declare class APIContext {
5131
5234
  * @param args
5132
5235
  */
5133
5236
  callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
5237
+ /**
5238
+ * 获取运行时的系统信息,仅限 Electron 平台可用
5239
+ */
5240
+ getOSInfo(): IPromiseResult<IOSInfo>;
5241
+ /**
5242
+ * 获取当前渲染进程信息,仅限 Electron 平台可用
5243
+ */
5244
+ getProcessInfo(): IPromiseResult<IProcessInfo>;
5245
+ /**
5246
+ * 获取应用主进程信息,仅限 Electron 平台可用
5247
+ */
5248
+ getMainProcessInfo(): IPromiseResult<IProcessInfo>;
5134
5249
  /**
5135
5250
  * 删除所有会话
5136
5251
  */
@@ -5407,13 +5522,21 @@ declare class PluginContext {
5407
5522
  * 获取服务时间
5408
5523
  */
5409
5524
  getServerTime(): number;
5525
+ /**
5526
+ * 获取运行时的系统信息,仅限 Electron 平台可用
5527
+ */
5528
+ getOSInfo(): IPromiseResult<IOSInfo>;
5529
+ /**
5530
+ * 获取当前渲染进程信息,仅限 Electron 平台可用
5531
+ */
5532
+ getProcessInfo(): IPromiseResult<IProcessInfo>;
5533
+ /**
5534
+ * 获取应用主进程信息,仅限 Electron 平台可用
5535
+ */
5536
+ getMainProcessInfo(): IPromiseResult<IProcessInfo>;
5410
5537
  }
5411
5538
 
5412
5539
  declare class RTCPluginContext extends PluginContext {
5413
- /**
5414
- * 获取当前的导航数据
5415
- */
5416
- getNaviInfo(): INaviInfo | null;
5417
5540
  /**
5418
5541
  * 加入 RTC 房间
5419
5542
  * @deprecated
@@ -6329,6 +6452,18 @@ declare abstract class AEngine implements IEngine {
6329
6452
  * 超级群获取指定会话第一条未读消息时间戳
6330
6453
  */
6331
6454
  abstract getUltraGroupFirstUnreadMessageTimestamp(options: IUltraGroupOption): Promise<IAsyncRes<IUltraUnreadMsg>>;
6455
+ /**
6456
+ * 获取运行时的系统信息,仅限 Electron 平台可用
6457
+ */
6458
+ abstract getOSInfo(): IPromiseResult<IOSInfo>;
6459
+ /**
6460
+ * 获取当前渲染进程信息,仅限 Electron 平台可用
6461
+ */
6462
+ abstract getProcessInfo(): IPromiseResult<IProcessInfo>;
6463
+ /**
6464
+ * 获取应用主进程信息,仅限 Electron 平台可用
6465
+ */
6466
+ abstract getMainProcessInfo(): IPromiseResult<IProcessInfo>;
6332
6467
  /**
6333
6468
  * RTC 通用调用接口
6334
6469
  * 在非 Comet 协议下,入参 sourceData 应为 ArrayBuffer 数据,返回结果为 Uint8Array 数据
@@ -6949,4 +7084,4 @@ declare const ONE_LOG_SIZE_MAX = 1000;
6949
7084
  */
6950
7085
  declare const version: string;
6951
7086
 
6952
- export { AEngine, APIContext, AbsCodec, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, DB_LOG_FLUSH_FREQUENCY, DB_LOG_MAX_SIZE, DelayTimer, ErrorCode, EventEmitter, FileType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, ICancelRoomPKOptions, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IInsertMsgOptions, IIsValidExpansion, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, ILogExtensions, ILogInfo, ILogInit, IM_CHATROOM_PULL_INTERVAL_TIME, IM_COMET_PULLMSG_TIMEOUT, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageListnenr, IMessageReader, IMessageReaderResponse, IMetionedData, INaviInfo, IOperateStatusNotify, IPluginGenerator, IPromiseResult, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCRoomInfo, IRTCUserData, IRTCUsers, IReadReceiptInfo, IRealTimeLog, IRecallMsgContent, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IReqRoomPKOptions, IRequest, IResRoomPKOptions, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadConversation, IUltraUnreadMsg, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, IiOSPushConfig, ItypingStateListener, KVString, LiveRole, LiveType, LogLevel, LogSource, LogTagId, Logger, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MINI_COMET_CONNECT_URIS, MINI_SOCKET_CONNECT_URIS, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NetworkType, NotificationLevel, NotificationStatus, ONE_LOG_SIZE_MAX, OperateStatus, PING_REQ_TIMEOUT, PUBLIC_CLOUD_NAVI_URIS, PluginContext, RCAssertError, REAT_TIME_LOG_SIZE, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCKeyMaps, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATUS_MESSAGE, STORAGE_ROOT_KEY, TagChangeType, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketChannel, appendUrl, assert, clone, cloneByJSON, _default as engineLogger, forEach, formatConnectResponseCode, getBrowser, getClientMessageId, getMimeKey, getUUID, getUUID22, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChannelId, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, isValidNotificationLevel, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, randomNum, todo, usingCppEngine, validate, version };
7087
+ export { AEngine, APIContext, AbsCodec, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, DB_LOG_FLUSH_FREQUENCY, DB_LOG_MAX_SIZE, DelayTimer, ErrorCode, EventEmitter, FileType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, ICancelRoomPKOptions, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IInsertMsgOptions, IIsValidExpansion, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, ILogExtensions, ILogInfo, ILogInit, IM_CHATROOM_PULL_INTERVAL_TIME, IM_COMET_PULLMSG_TIMEOUT, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageListnenr, IMessageReader, IMessageReaderResponse, IMetionedData, INaviInfo, IOSInfo, IOperateStatusNotify, IPluginGenerator, IProcessInfo, IPromiseResult, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCRoomInfo, IRTCUserData, IRTCUsers, IReadReceiptInfo, IRealTimeLog, IRecallMsgContent, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IReqRoomPKOptions, IRequest, IResRoomPKOptions, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadConversation, IUltraUnreadMsg, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, IiOSPushConfig, ItypingStateListener, KVString, LiveRole, LiveType, LogLevel, LogSource, LogTagId, Logger, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MINI_COMET_CONNECT_URIS, MINI_SOCKET_CONNECT_URIS, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NetworkType, NotificationLevel, NotificationStatus, ONE_LOG_SIZE_MAX, OperateStatus, PING_REQ_TIMEOUT, PUBLIC_CLOUD_NAVI_URIS, PluginContext, RCAssertError, REAT_TIME_LOG_SIZE, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCKeyMaps, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATUS_MESSAGE, STORAGE_ROOT_KEY, TagChangeType, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketChannel, appendUrl, assert, clone, cloneByJSON, _default as engineLogger, forEach, formatConnectResponseCode, getBrowser, getClientMessageId, getMimeKey, getUUID, getUUID22, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChannelId, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, isValidNotificationLevel, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, randomNum, todo, usingCppEngine, validate, version };