@rongcloud/engine 5.34.0-alpha.1 → 5.34.0
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 +94 -89
- package/index.esm.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -12180,6 +12180,94 @@ interface IExpansionMsgContent {
|
|
|
12180
12180
|
clear?: number;
|
|
12181
12181
|
}
|
|
12182
12182
|
|
|
12183
|
+
/** [EN]
|
|
12184
|
+
* Log level definitions
|
|
12185
|
+
* @category Enum
|
|
12186
|
+
*/
|
|
12187
|
+
/**
|
|
12188
|
+
* 日志打印等级定义
|
|
12189
|
+
* @category Enum
|
|
12190
|
+
*/
|
|
12191
|
+
declare enum LogL {
|
|
12192
|
+
/**
|
|
12193
|
+
* IM 质量数据日志,控制台不打印
|
|
12194
|
+
*/
|
|
12195
|
+
STATISTICS = -2,
|
|
12196
|
+
/**
|
|
12197
|
+
* 未明确使用场景,暂未使用,控制台不打印
|
|
12198
|
+
*/
|
|
12199
|
+
RECORD = -1,
|
|
12200
|
+
/**
|
|
12201
|
+
* 未明确使用场景,暂未使用,控制台不打印
|
|
12202
|
+
*/
|
|
12203
|
+
FATAL = 0,
|
|
12204
|
+
/**
|
|
12205
|
+
* ERROR 级
|
|
12206
|
+
*/
|
|
12207
|
+
ERROR = 1,
|
|
12208
|
+
/**
|
|
12209
|
+
* WARN 级
|
|
12210
|
+
*/
|
|
12211
|
+
WARN = 2,
|
|
12212
|
+
/**
|
|
12213
|
+
* INFO 级
|
|
12214
|
+
*/
|
|
12215
|
+
INFO = 3,
|
|
12216
|
+
/**
|
|
12217
|
+
* DEBUG 级
|
|
12218
|
+
*/
|
|
12219
|
+
DEBUG = 4
|
|
12220
|
+
}
|
|
12221
|
+
|
|
12222
|
+
/**
|
|
12223
|
+
* 有效的日志等级声明
|
|
12224
|
+
* @category Type
|
|
12225
|
+
*/
|
|
12226
|
+
declare type EnableLogL = LogL.DEBUG | LogL.INFO | LogL.WARN | LogL.ERROR;
|
|
12227
|
+
declare type LogContent = string | number | boolean | null;
|
|
12228
|
+
declare type LogType = 'IM' | 'RTC';
|
|
12229
|
+
/**
|
|
12230
|
+
* @hidden
|
|
12231
|
+
* 日志数据结构
|
|
12232
|
+
*/
|
|
12233
|
+
interface ILogData {
|
|
12234
|
+
/**
|
|
12235
|
+
* 日志原始内容
|
|
12236
|
+
*/
|
|
12237
|
+
content?: LogContent;
|
|
12238
|
+
/**
|
|
12239
|
+
* 日志标签,如 `L-INIT-O`
|
|
12240
|
+
*/
|
|
12241
|
+
tag: string;
|
|
12242
|
+
/**
|
|
12243
|
+
* 日志生成时间
|
|
12244
|
+
*/
|
|
12245
|
+
time: number;
|
|
12246
|
+
/**
|
|
12247
|
+
* 应用的声明周期 sessionId
|
|
12248
|
+
* @description
|
|
12249
|
+
* Electron 环境下,以主进程 sessionId 入库,渲染进程 sessionId 存储于 content 内。
|
|
12250
|
+
* 日志上报时,通过 `${mainSessionId}:${renderSessionId}` 形式作为 sessionId 上报
|
|
12251
|
+
*/
|
|
12252
|
+
sessionId: string;
|
|
12253
|
+
/**
|
|
12254
|
+
* 日志类型,仅用于大数据后台查阅统计
|
|
12255
|
+
*/
|
|
12256
|
+
type: LogType;
|
|
12257
|
+
/**
|
|
12258
|
+
* 日志等级,该等级与服务器统计等级保持一致,为入库等级
|
|
12259
|
+
*/
|
|
12260
|
+
level: LogL;
|
|
12261
|
+
/**
|
|
12262
|
+
* 事务跟踪 ID
|
|
12263
|
+
*/
|
|
12264
|
+
traceId?: string;
|
|
12265
|
+
/**
|
|
12266
|
+
* logger 实例 Id,用于确定日志由谁埋点,如 `RCEngien` 为 engine 包埋点日志
|
|
12267
|
+
*/
|
|
12268
|
+
loggerId?: string;
|
|
12269
|
+
}
|
|
12270
|
+
|
|
12183
12271
|
/**
|
|
12184
12272
|
* 进程内缓存数据
|
|
12185
12273
|
*/
|
|
@@ -12223,6 +12311,11 @@ interface IIPCMethodsWithoutResult {
|
|
|
12223
12311
|
reportSDKInfo(version: {
|
|
12224
12312
|
[name: string]: string;
|
|
12225
12313
|
}): void;
|
|
12314
|
+
/**
|
|
12315
|
+
* 接收渲染进程日志
|
|
12316
|
+
* @param log 日志数据
|
|
12317
|
+
*/
|
|
12318
|
+
onReceiveRendererLog(log: ILogData): void;
|
|
12226
12319
|
}
|
|
12227
12320
|
/**
|
|
12228
12321
|
* 约束跨平台、跨进程通信方法定义,以便于代码检查
|
|
@@ -13531,94 +13624,6 @@ declare const trans2IReceivedStatusInfo: (status: ReceivedStatus) => IReceivedSt
|
|
|
13531
13624
|
*/
|
|
13532
13625
|
declare const transformReceivedStatusFlag: (receivedStatusInfo: IReceivedStatusInfo) => number;
|
|
13533
13626
|
|
|
13534
|
-
/** [EN]
|
|
13535
|
-
* Log level definitions
|
|
13536
|
-
* @category Enum
|
|
13537
|
-
*/
|
|
13538
|
-
/**
|
|
13539
|
-
* 日志打印等级定义
|
|
13540
|
-
* @category Enum
|
|
13541
|
-
*/
|
|
13542
|
-
declare enum LogL {
|
|
13543
|
-
/**
|
|
13544
|
-
* IM 质量数据日志,控制台不打印
|
|
13545
|
-
*/
|
|
13546
|
-
STATISTICS = -2,
|
|
13547
|
-
/**
|
|
13548
|
-
* 未明确使用场景,暂未使用,控制台不打印
|
|
13549
|
-
*/
|
|
13550
|
-
RECORD = -1,
|
|
13551
|
-
/**
|
|
13552
|
-
* 未明确使用场景,暂未使用,控制台不打印
|
|
13553
|
-
*/
|
|
13554
|
-
FATAL = 0,
|
|
13555
|
-
/**
|
|
13556
|
-
* ERROR 级
|
|
13557
|
-
*/
|
|
13558
|
-
ERROR = 1,
|
|
13559
|
-
/**
|
|
13560
|
-
* WARN 级
|
|
13561
|
-
*/
|
|
13562
|
-
WARN = 2,
|
|
13563
|
-
/**
|
|
13564
|
-
* INFO 级
|
|
13565
|
-
*/
|
|
13566
|
-
INFO = 3,
|
|
13567
|
-
/**
|
|
13568
|
-
* DEBUG 级
|
|
13569
|
-
*/
|
|
13570
|
-
DEBUG = 4
|
|
13571
|
-
}
|
|
13572
|
-
|
|
13573
|
-
/**
|
|
13574
|
-
* 有效的日志等级声明
|
|
13575
|
-
* @category Type
|
|
13576
|
-
*/
|
|
13577
|
-
declare type EnableLogL = LogL.DEBUG | LogL.INFO | LogL.WARN | LogL.ERROR;
|
|
13578
|
-
declare type LogContent = string | number | boolean | null;
|
|
13579
|
-
declare type LogType = 'IM' | 'RTC';
|
|
13580
|
-
/**
|
|
13581
|
-
* @hidden
|
|
13582
|
-
* 日志数据结构
|
|
13583
|
-
*/
|
|
13584
|
-
interface ILogData {
|
|
13585
|
-
/**
|
|
13586
|
-
* 日志原始内容
|
|
13587
|
-
*/
|
|
13588
|
-
content?: LogContent;
|
|
13589
|
-
/**
|
|
13590
|
-
* 日志标签,如 `L-INIT-O`
|
|
13591
|
-
*/
|
|
13592
|
-
tag: string;
|
|
13593
|
-
/**
|
|
13594
|
-
* 日志生成时间
|
|
13595
|
-
*/
|
|
13596
|
-
time: number;
|
|
13597
|
-
/**
|
|
13598
|
-
* 应用的声明周期 sessionId
|
|
13599
|
-
* @description
|
|
13600
|
-
* Electron 环境下,以主进程 sessionId 入库,渲染进程 sessionId 存储于 content 内。
|
|
13601
|
-
* 日志上报时,通过 `${mainSessionId}:${renderSessionId}` 形式作为 sessionId 上报
|
|
13602
|
-
*/
|
|
13603
|
-
sessionId: string;
|
|
13604
|
-
/**
|
|
13605
|
-
* 日志类型,仅用于大数据后台查阅统计
|
|
13606
|
-
*/
|
|
13607
|
-
type: LogType;
|
|
13608
|
-
/**
|
|
13609
|
-
* 日志等级,该等级与服务器统计等级保持一致,为入库等级
|
|
13610
|
-
*/
|
|
13611
|
-
level: LogL;
|
|
13612
|
-
/**
|
|
13613
|
-
* 事务跟踪 ID
|
|
13614
|
-
*/
|
|
13615
|
-
traceId?: string;
|
|
13616
|
-
/**
|
|
13617
|
-
* logger 实例 Id,用于确定日志由谁埋点,如 `RCEngien` 为 engine 包埋点日志
|
|
13618
|
-
*/
|
|
13619
|
-
loggerId?: string;
|
|
13620
|
-
}
|
|
13621
|
-
|
|
13622
13627
|
declare type LogReader = (startTime: number, endTime: number, level: LogL, realtimeReport: boolean, tableName?: string) => Promise<{
|
|
13623
13628
|
logs: ILogData[];
|
|
13624
13629
|
}>;
|
|
@@ -16007,7 +16012,7 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
16007
16012
|
declare type IUserSettingsModule = Pick<IIPCMethods, 'setTranslationLanguage' | 'getTranslationLanguage' | 'setAutoTranslateEnabled' | 'getAutoTranslateEnabled'>;
|
|
16008
16013
|
|
|
16009
16014
|
declare type IIPCMethodsInEngine = Pick<IIPCMethods, 'searchMessagesWithParams' | 'createTag' | 'removeTag' | 'updateTag' | 'getTagList' | 'translateWithParams' | 'getFileUrl' | 'saveTextMessageDraft' | 'getTextMessageDraft' | 'clearTextMessageDraft' | 'getHistoryMessage' | 'clearLocalMessages' | 'deleteLocalMessages' | 'deleteLocalMessagesByTimestamp' | 'batchClearLocalMessagesByTimestamp' | 'insertMessage' | 'batchInsertMessage' | 'setMessageContent' | 'getLocalMessageCount' | 'recallMsg' | 'getSubscribeUsersOnlineStatus' | 'getSubscribeUserStatus' | 'subscribeUser' | 'unSubscribeUser' | 'getSubscribeUserList' | 'getUserProfiles' | 'getMyUserProfile' | 'updateMyUserProfile' | 'sendMessage' | 'refetchNaviInfo' | 'connect' | 'disconnect' | 'addToBlacklist' | 'removeFromBlacklist' | 'getBlacklist' | 'getBlacklistStatus' | 'setMessageReceivedStatus' | 'setMessageSentStatus' | 'setCheckDuplicateMessage' | 'setProxy' | 'getProxy' | 'testProxy' | 'getFileToken' | 'rtcSignaling' | 'rtcPing' | 'setCallInfo' | 'getUserStatus' | 'searchConversationByContentWithAllChannel' | 'getAllRobots' | 'getOSInfo' | 'getMainProcessInfo'>;
|
|
16010
|
-
declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContext, IIPCMethodsWithoutResult {
|
|
16015
|
+
declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContext, Omit<IIPCMethodsWithoutResult, 'onReceiveRendererLog'> {
|
|
16011
16016
|
protected readonly _watcher: IEngineWatcher;
|
|
16012
16017
|
protected readonly _options: IAPIContextOption;
|
|
16013
16018
|
/**
|