@rongcloud/engine 5.3.1 → 5.3.4
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 +318 -331
- package/index.esm.js +6 -6
- package/index.js +6 -6
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1074,6 +1074,7 @@ interface IBlockedMessageInfo {
|
|
|
1074
1074
|
targetId: string;
|
|
1075
1075
|
channelId: string;
|
|
1076
1076
|
blockType: MessageBlockType;
|
|
1077
|
+
extra: any;
|
|
1077
1078
|
}
|
|
1078
1079
|
|
|
1079
1080
|
/**
|
|
@@ -1189,9 +1190,9 @@ declare enum ErrorCode {
|
|
|
1189
1190
|
*/
|
|
1190
1191
|
CHATROOM_KEY_NOT_EXIST = 23427,
|
|
1191
1192
|
/*!
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1193
|
+
聊天室设置 KV 失败,出现在两人或者多端同时操作一个 kv。
|
|
1194
|
+
如果出现该错误,为避免和其他端同时操作,请延时一定时间再试
|
|
1195
|
+
*/
|
|
1195
1196
|
CHATROOM_KV_SET_ERROR = 23431,
|
|
1196
1197
|
/**
|
|
1197
1198
|
* 敏感词屏蔽
|
|
@@ -1326,6 +1327,10 @@ declare enum ErrorCode {
|
|
|
1326
1327
|
* Disconnect,由服务器返回,比如用户互踢。
|
|
1327
1328
|
*/
|
|
1328
1329
|
RC_DISCONN_EXCEPTION = 31011,
|
|
1330
|
+
/**
|
|
1331
|
+
* 开启禁止把已在线客户端踢下线开关后,该错误码标识已有同类型端在线,禁止链接;
|
|
1332
|
+
*/
|
|
1333
|
+
RC_DISCONN_SAME_CLIENT_ON_LINE = 31023,
|
|
1329
1334
|
/**
|
|
1330
1335
|
* app 验证Token 验证不通过。所有内部超时,访问失败,返回给客户端sdk都是验证不通过,由服务端日志去看具体是那种失败。
|
|
1331
1336
|
*/
|
|
@@ -1415,11 +1420,11 @@ declare enum ErrorCode {
|
|
|
1415
1420
|
CONVER_CLEAR_ERROR = 34007,
|
|
1416
1421
|
/**
|
|
1417
1422
|
* 扩展存储 key value 超出限制 (错误码与移动端对齐)
|
|
1418
|
-
|
|
1423
|
+
*/
|
|
1419
1424
|
EXPANSION_LIMIT_EXCEET = 34010,
|
|
1420
1425
|
/**
|
|
1421
1426
|
* 消息不支持扩展,原消息 canIncludeExpansion 值为 false (错误码与移动端对齐)
|
|
1422
|
-
|
|
1427
|
+
*/
|
|
1423
1428
|
MESSAGE_KV_NOT_SUPPORT = 34008,
|
|
1424
1429
|
CLEAR_HIS_TIME_ERROR = 34011,
|
|
1425
1430
|
/**
|
|
@@ -2271,6 +2276,10 @@ interface IChatroomEntries {
|
|
|
2271
2276
|
* 用户退出聊天室时是否清除此属性
|
|
2272
2277
|
*/
|
|
2273
2278
|
isAutoDelete?: boolean;
|
|
2279
|
+
/**
|
|
2280
|
+
* 是否强制覆盖
|
|
2281
|
+
*/
|
|
2282
|
+
isForce?: boolean;
|
|
2274
2283
|
}
|
|
2275
2284
|
|
|
2276
2285
|
interface IUploadAuth {
|
|
@@ -2387,6 +2396,7 @@ interface IJoinRTCRoomData extends IRTCUsers {
|
|
|
2387
2396
|
value: string;
|
|
2388
2397
|
}[];
|
|
2389
2398
|
kvEntries: IServerRTCRoomEntry[];
|
|
2399
|
+
offlineKickTime: number;
|
|
2390
2400
|
}
|
|
2391
2401
|
interface KVString {
|
|
2392
2402
|
[key: string]: string;
|
|
@@ -2677,6 +2687,10 @@ declare enum ConnectionStatus {
|
|
|
2677
2687
|
* appkey 不正确
|
|
2678
2688
|
*/
|
|
2679
2689
|
APPKEY_IS_FAKE = 20,
|
|
2690
|
+
/**
|
|
2691
|
+
* 其他端登录,本端禁止连接和重连
|
|
2692
|
+
*/
|
|
2693
|
+
FORBID_RECONNECT_BY_OTHER_SAME_CLIENT = 31023,
|
|
2680
2694
|
/**
|
|
2681
2695
|
* 互踢次数过多(`count > 5`),此时可能出现:在其它他设备登陆有 reconnect 逻辑
|
|
2682
2696
|
*/
|
|
@@ -2931,44 +2945,83 @@ interface IMetionedData {
|
|
|
2931
2945
|
}
|
|
2932
2946
|
|
|
2933
2947
|
declare enum LogLevel {
|
|
2934
|
-
/**
|
|
2935
|
-
* 等同于 `LogLevel.DEBUG`
|
|
2936
|
-
*/
|
|
2937
2948
|
LOG = 0,
|
|
2938
|
-
/**
|
|
2939
|
-
* 0
|
|
2940
|
-
*/
|
|
2941
2949
|
DEBUG = 0,
|
|
2942
|
-
/**
|
|
2943
|
-
* 1
|
|
2944
|
-
*/
|
|
2945
2950
|
INFO = 1,
|
|
2946
|
-
/**
|
|
2947
|
-
* 2
|
|
2948
|
-
*/
|
|
2949
2951
|
WARN = 2,
|
|
2950
|
-
/**
|
|
2951
|
-
* 3
|
|
2952
|
-
*/
|
|
2953
2952
|
ERROR = 3,
|
|
2954
|
-
/**
|
|
2955
|
-
* 4
|
|
2956
|
-
*/
|
|
2957
2953
|
FATAL = 4,
|
|
2958
|
-
/**
|
|
2959
|
-
* 统计日志类型
|
|
2960
|
-
*/
|
|
2961
2954
|
STATISTICS = 6,
|
|
2962
|
-
/**
|
|
2963
|
-
* 不展示任何日志
|
|
2964
|
-
*/
|
|
2965
2955
|
NONE = 1000
|
|
2966
2956
|
}
|
|
2967
|
-
|
|
2968
|
-
declare enum LogType {
|
|
2957
|
+
declare enum LogSource {
|
|
2969
2958
|
IM = "IM",
|
|
2970
2959
|
RTC = "RTC"
|
|
2971
2960
|
}
|
|
2961
|
+
declare enum LogTagId {
|
|
2962
|
+
L_IMSDK_VER_O = "L-imsdk_ver-O",
|
|
2963
|
+
A_INIT_O = "A-init-O",
|
|
2964
|
+
L_INIT_O = "L-init-O",
|
|
2965
|
+
P_INIT_O = "P-init-O",
|
|
2966
|
+
A_CONNECT_T = "A-connect-T",
|
|
2967
|
+
A_CONNECT_R = "A-connect-R",
|
|
2968
|
+
A_CONNECT_S = "A-connect-S",
|
|
2969
|
+
A_DISCONNECT_O = "A-disconnect-O",
|
|
2970
|
+
A_RECONNECT_T = "A-reconnect-T",
|
|
2971
|
+
A_RECONNECT_R = "A_RECONNECT_R",
|
|
2972
|
+
L_CONNECT_T = "L-connect-T",
|
|
2973
|
+
L_CONNECT_R = "L-connect-R",
|
|
2974
|
+
L_CONNECT_S = "L-connect-S",
|
|
2975
|
+
P_CONNECT_O = "P-connect-O",
|
|
2976
|
+
P_CONNECT_S = "P-connect-S",
|
|
2977
|
+
A_SEND_MSG_T = "A-send_msg-T",
|
|
2978
|
+
A_SEND_MSG_R = "A-send_msg-R",
|
|
2979
|
+
P_SEND_MSG_T = "P-send_msg-T",
|
|
2980
|
+
P_SEND_MSG_R = "P-send_msg-R",
|
|
2981
|
+
L_SEND_MSG_T = "L-send_msg-T",
|
|
2982
|
+
L_SEND_MSG_R = "L-send_msg-R",
|
|
2983
|
+
L_PULL_MSG_T = "L-pull_msg-T",
|
|
2984
|
+
L_PULL_MSG_R = "L-pull_msg-R",
|
|
2985
|
+
L_PULL_ULTRA_MSG_T = "L-pull_ultra_msg-T",
|
|
2986
|
+
L_PULL_ULTRA_MSG_R = "L-pull_ultra_msg-R",
|
|
2987
|
+
L_PULL_CHATROOM_KV_T = "L-pull_chatroom_kv-T",
|
|
2988
|
+
L_PULL_CHATROOM_KV_R = "L-pull_chatroom_kv-R",
|
|
2989
|
+
L_PULL_CHATROOM_MSG_T = "L-pull_chatroom_msg-T",
|
|
2990
|
+
L_PULL_CHATROOM_MSG_R = "L-pull_chatroom_msg-R",
|
|
2991
|
+
A_DELETE_MESSAGES_S = "A-delete_messages-S",
|
|
2992
|
+
P_DELETE_MSG_S = "P-delete_msg-S",
|
|
2993
|
+
L_PULL_CONVERSATION_S = "L-pull_conversation-S",
|
|
2994
|
+
L_RECALL_ULTRA_MSG_S = "L-recall_ultra_msg-S",
|
|
2995
|
+
A_REGTYP_O = "A-regtyp-O",
|
|
2996
|
+
P_REGTYP_O = "P-regtype-O",
|
|
2997
|
+
P_REGTYP_E = "P-regtype-E",
|
|
2998
|
+
L_GET_NAVI_T = "L-get_navi-T",
|
|
2999
|
+
L_GET_NAVI_R = "L-get_navi-R",
|
|
3000
|
+
L_ENV_S = "L-Env-S",
|
|
3001
|
+
L_GET_INDEX_NAVI_S = "L-get_index_navi-S",
|
|
3002
|
+
A_JOIN_CHATROOM_T = "A-join_chatroom-T",
|
|
3003
|
+
A_JOIN_CHATROOM_R = "A-join_chatroom-R",
|
|
3004
|
+
L_JOIN_CHATROOM_T = "L-join_chatroom-T",
|
|
3005
|
+
L_JOIN_CHATROOM_R = "L-join_chatroom-R",
|
|
3006
|
+
A_QUIT_CHATROOM_T = "A-quit_chatroom-T",
|
|
3007
|
+
A_QUIT_CHATROOM_R = "A-quit_chatroom-R",
|
|
3008
|
+
L_REJOIN_CHATROOM_T = "L-rejoin_chatroom-T",
|
|
3009
|
+
L_REJOIN_CHATROOM_R = "L-rejoin_chatroom-R",
|
|
3010
|
+
L_MEDIA_S = "L-media-S",
|
|
3011
|
+
L_MEDIA_UPLOAD_T = "L-media_upload-T",
|
|
3012
|
+
L_MEDIA_UPLOAD_R = "L-media_upload-R",
|
|
3013
|
+
G_UPLOAD_LOG_S = "G-upload_log-S",
|
|
3014
|
+
G_UPLOAD_LOG_E = "G-upload_log-E",
|
|
3015
|
+
G_GET_REAL_TIMELOG_COMMAND_S = "G-get_real_timelog_command-S",
|
|
3016
|
+
L_CHECK_ALIVE_IM_T = "L-check_alive_im-T",
|
|
3017
|
+
L_CHECK_ALIVE_IM_R = "L-check_alive_im-R",
|
|
3018
|
+
A_GET_HISTORY_MSG_T = "A-get_history_msg-T",
|
|
3019
|
+
A_GET_HISTORY_MSG_R = "A-get_history_msg-R",
|
|
3020
|
+
L_GET_HISTORY_MSG_T = "L-get_history_msg-T",
|
|
3021
|
+
L_GET_HISTORY_MSG_R = "L-get_history_msg-R",
|
|
3022
|
+
A_CALLBACK_O = "A-callback-O",
|
|
3023
|
+
A_CALLBACK_E = "A-callback-E"
|
|
3024
|
+
}
|
|
2972
3025
|
|
|
2973
3026
|
/**
|
|
2974
3027
|
* 拓展方法定义,便于 electron-solution 实现时保持接口类型推导可用
|
|
@@ -3109,6 +3162,7 @@ interface IEngine {
|
|
|
3109
3162
|
* @param reconnectKickEnable
|
|
3110
3163
|
*/
|
|
3111
3164
|
connect(token: string, naviInfo: INaviInfo, reconnectKickEnable?: boolean): Promise<ErrorCode>;
|
|
3165
|
+
requestNaviInfo(uris: string[], appkey: string, token: string, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
3112
3166
|
/**
|
|
3113
3167
|
* 上报版本信息
|
|
3114
3168
|
* @param version
|
|
@@ -3702,6 +3756,32 @@ interface ITypingMessage {
|
|
|
3702
3756
|
list: Array<ITypingUser>;
|
|
3703
3757
|
}
|
|
3704
3758
|
|
|
3759
|
+
/**
|
|
3760
|
+
* IndexDB中存储的log数据
|
|
3761
|
+
*/
|
|
3762
|
+
interface ILogInfo {
|
|
3763
|
+
sessionId: string;
|
|
3764
|
+
time: number;
|
|
3765
|
+
level: LogLevel;
|
|
3766
|
+
content: string;
|
|
3767
|
+
userId?: string;
|
|
3768
|
+
logSource?: LogSource;
|
|
3769
|
+
tagId?: LogTagId;
|
|
3770
|
+
}
|
|
3771
|
+
interface IRealTimeLog {
|
|
3772
|
+
level: LogLevel;
|
|
3773
|
+
content: string;
|
|
3774
|
+
}
|
|
3775
|
+
interface ILogExtensions {
|
|
3776
|
+
traceId?: string;
|
|
3777
|
+
logSource?: LogSource;
|
|
3778
|
+
}
|
|
3779
|
+
interface ILogInit {
|
|
3780
|
+
userId?: string;
|
|
3781
|
+
localLogLevel?: LogLevel;
|
|
3782
|
+
customLogPrint?: (logLevel: LogLevel, msg: string) => void;
|
|
3783
|
+
}
|
|
3784
|
+
|
|
3705
3785
|
/**
|
|
3706
3786
|
* 定义已废弃,请使用 `IRemoveChatroomEntries` 替换
|
|
3707
3787
|
* @deprecated
|
|
@@ -3962,7 +4042,7 @@ declare class DataCodec {
|
|
|
3962
4042
|
/**
|
|
3963
4043
|
* 设置会话状态 (置顶、免打扰)
|
|
3964
4044
|
*/
|
|
3965
|
-
encodeSetConversationStatus(statusList: Array<ISetConversationStatusOptions
|
|
4045
|
+
encodeSetConversationStatus(statusList: Array<ISetConversationStatusOptions>, conversationUpdatedTime: number): any;
|
|
3966
4046
|
/**
|
|
3967
4047
|
* 序列化发送群组已读回执
|
|
3968
4048
|
*/
|
|
@@ -4227,32 +4307,6 @@ declare class CometChannel extends ADataChannel {
|
|
|
4227
4307
|
close(): void;
|
|
4228
4308
|
}
|
|
4229
4309
|
|
|
4230
|
-
interface IPluginGenerator<API, InitOption> {
|
|
4231
|
-
/**
|
|
4232
|
-
* 只读插件标识
|
|
4233
|
-
*/
|
|
4234
|
-
readonly tag: string;
|
|
4235
|
-
/**
|
|
4236
|
-
* 版本号
|
|
4237
|
-
*/
|
|
4238
|
-
readonly version?: string;
|
|
4239
|
-
/**
|
|
4240
|
-
* 插件名称
|
|
4241
|
-
*/
|
|
4242
|
-
readonly name?: string;
|
|
4243
|
-
/**
|
|
4244
|
-
* 插件安装前的环境检测,通过返回 boolean 值确认插件是否可运行
|
|
4245
|
-
*/
|
|
4246
|
-
verify(runtime: IRuntime): boolean;
|
|
4247
|
-
/**
|
|
4248
|
-
* 插件初始化
|
|
4249
|
-
* @param context 插件调用上下文,用于实现插件的消息注册、消息首发等
|
|
4250
|
-
* @param runtime 运行时实例,用于标识最终的运行时平台
|
|
4251
|
-
* @param options 初始化参数
|
|
4252
|
-
*/
|
|
4253
|
-
setup(context: PluginContext, runtime: IRuntime, options: InitOption): API;
|
|
4254
|
-
}
|
|
4255
|
-
|
|
4256
4310
|
declare type IMessageListnenr = (message: IReceivedMessage, leftCount?: number, hasMore?: boolean) => void;
|
|
4257
4311
|
declare type IMessagesListnenr = (messages: IReceivedMessage[], leftCount?: number, hasMore?: boolean) => void;
|
|
4258
4312
|
declare type IConnectionStatusListener = (status: ConnectionStatus) => void;
|
|
@@ -4372,6 +4426,32 @@ interface IAPIContextOption {
|
|
|
4372
4426
|
checkCA?: boolean;
|
|
4373
4427
|
}
|
|
4374
4428
|
|
|
4429
|
+
interface IPluginGenerator<API, InitOption> {
|
|
4430
|
+
/**
|
|
4431
|
+
* 只读插件标识
|
|
4432
|
+
*/
|
|
4433
|
+
readonly tag: string;
|
|
4434
|
+
/**
|
|
4435
|
+
* 版本号
|
|
4436
|
+
*/
|
|
4437
|
+
readonly version?: string;
|
|
4438
|
+
/**
|
|
4439
|
+
* 插件名称
|
|
4440
|
+
*/
|
|
4441
|
+
readonly name?: string;
|
|
4442
|
+
/**
|
|
4443
|
+
* 插件安装前的环境检测,通过返回 boolean 值确认插件是否可运行
|
|
4444
|
+
*/
|
|
4445
|
+
verify(runtime: IRuntime): boolean;
|
|
4446
|
+
/**
|
|
4447
|
+
* 插件初始化
|
|
4448
|
+
* @param context 插件调用上下文,用于实现插件的消息注册、消息首发等
|
|
4449
|
+
* @param runtime 运行时实例,用于标识最终的运行时平台
|
|
4450
|
+
* @param options 初始化参数
|
|
4451
|
+
*/
|
|
4452
|
+
setup(context: PluginContext, runtime: IRuntime, options: InitOption): API;
|
|
4453
|
+
}
|
|
4454
|
+
|
|
4375
4455
|
declare class APIContext {
|
|
4376
4456
|
private _runtime;
|
|
4377
4457
|
private static _context?;
|
|
@@ -4498,7 +4578,7 @@ declare class APIContext {
|
|
|
4498
4578
|
这个字段就是为这种情况加的。
|
|
4499
4579
|
设置 reconnectKickEnable 为 true 时,SDK 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。
|
|
4500
4580
|
*/
|
|
4501
|
-
connect(token: string, refreshNavi?: boolean, reconnectKickEnable?: boolean): Promise<IConnectResult>;
|
|
4581
|
+
connect(token: string, refreshNavi?: boolean, reconnectKickEnable?: boolean, traceId?: string): Promise<IConnectResult>;
|
|
4502
4582
|
/**
|
|
4503
4583
|
* 拉取实时配置 web 端需更新 voipCall 字段
|
|
4504
4584
|
*/
|
|
@@ -4528,7 +4608,7 @@ declare class APIContext {
|
|
|
4528
4608
|
* @param content
|
|
4529
4609
|
* @param options
|
|
4530
4610
|
*/
|
|
4531
|
-
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void): Promise<IAsyncRes<IReceivedMessage>>;
|
|
4611
|
+
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void, traceId?: string): Promise<IAsyncRes<IReceivedMessage>>;
|
|
4532
4612
|
/**
|
|
4533
4613
|
* 发送扩展消息
|
|
4534
4614
|
* @param messageUId 消息 Id
|
|
@@ -4562,7 +4642,7 @@ declare class APIContext {
|
|
|
4562
4642
|
* @param channelId
|
|
4563
4643
|
* @param objectName
|
|
4564
4644
|
*/
|
|
4565
|
-
getHistoryMessage(conversationType: ConversationType, targetId: string, timestamp?: number, count?: number, order?: 0 | 1, channelId?: string, objectName?: string): Promise<IAsyncRes<{
|
|
4645
|
+
getHistoryMessage(conversationType: ConversationType, targetId: string, timestamp?: number, count?: number, order?: 0 | 1, channelId?: string, objectName?: string, traceId?: string): Promise<IAsyncRes<{
|
|
4566
4646
|
list: IReceivedMessage[];
|
|
4567
4647
|
hasMore: boolean;
|
|
4568
4648
|
}>>;
|
|
@@ -4659,13 +4739,13 @@ declare class APIContext {
|
|
|
4659
4739
|
* @param roomId 聊天室房间 Id
|
|
4660
4740
|
* @param count 进入聊天室成功后,自动拉取的历史消息数量,默认值为 `10`,最大有效值为 `50`,`-1` 为不拉取
|
|
4661
4741
|
*/
|
|
4662
|
-
joinChatroom(roomId: string, count?: number): Promise<ErrorCode>;
|
|
4742
|
+
joinChatroom(roomId: string, count?: number, traceId?: string): Promise<ErrorCode>;
|
|
4663
4743
|
/**
|
|
4664
4744
|
* 加入聊天室,若聊天室不存在则抛出异常
|
|
4665
4745
|
* @param roomId 聊天室房间 Id
|
|
4666
4746
|
* @param count 进入聊天室成功后,自动拉取的历史消息数量,默认值为 `10`,最大有效值为 `50`,`-1` 为不拉取
|
|
4667
4747
|
*/
|
|
4668
|
-
joinExistChatroom(roomId: string, count?: number): Promise<ErrorCode>;
|
|
4748
|
+
joinExistChatroom(roomId: string, count?: number, traceId?: string): Promise<ErrorCode>;
|
|
4669
4749
|
/**
|
|
4670
4750
|
* 退出聊天室
|
|
4671
4751
|
* @param roomId
|
|
@@ -4771,6 +4851,7 @@ declare class APIContext {
|
|
|
4771
4851
|
getFileToken(fileType: FileType, fileName?: string, httpMethod?: 'POST' | 'PUT', queryString?: string): Promise<IUploadAuth & {
|
|
4772
4852
|
bos: string;
|
|
4773
4853
|
qiniu: string;
|
|
4854
|
+
ossConfig: string;
|
|
4774
4855
|
}>;
|
|
4775
4856
|
/**
|
|
4776
4857
|
* 获取 七牛、百度、阿里云 上传成功可下载的 URL
|
|
@@ -5284,34 +5365,6 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
5284
5365
|
endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
|
|
5285
5366
|
}
|
|
5286
5367
|
|
|
5287
|
-
declare abstract class ANavi {
|
|
5288
|
-
protected readonly _runtime: IRuntime;
|
|
5289
|
-
protected readonly _options: IAPIContextOption;
|
|
5290
|
-
protected readonly _apiVersion: string;
|
|
5291
|
-
protected readonly _appkey: string;
|
|
5292
|
-
protected _naviInfo: INaviInfo | null;
|
|
5293
|
-
constructor(_runtime: IRuntime, _options: IAPIContextOption);
|
|
5294
|
-
/**
|
|
5295
|
-
* @param uris
|
|
5296
|
-
* @param appkey
|
|
5297
|
-
* @param token
|
|
5298
|
-
*/
|
|
5299
|
-
protected abstract _reqNavi(uris: string[], appkey: string, token: string, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
5300
|
-
/**
|
|
5301
|
-
* 获取导航数据
|
|
5302
|
-
* @param token
|
|
5303
|
-
* @param dynamicUris token 携带的动态导航地址
|
|
5304
|
-
* @param force 是否强制重新获取并清空缓存数据
|
|
5305
|
-
*/
|
|
5306
|
-
getInfo(token: string, dynamicUris: string[], force: boolean, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
5307
|
-
protected setNaviInfo2Cache(token: string, naviInfo: INaviInfo): void;
|
|
5308
|
-
getInfoFromCache(token: string): INaviInfo | null;
|
|
5309
|
-
/**
|
|
5310
|
-
* 清空导航数据:内存数据、缓存数据
|
|
5311
|
-
*/
|
|
5312
|
-
private _clear;
|
|
5313
|
-
}
|
|
5314
|
-
|
|
5315
5368
|
interface IEngineWatcher {
|
|
5316
5369
|
/**
|
|
5317
5370
|
* @param message 消息
|
|
@@ -5343,23 +5396,33 @@ declare abstract class AEngine implements IEngine {
|
|
|
5343
5396
|
readonly runtime: IRuntime;
|
|
5344
5397
|
protected readonly _watcher: IEngineWatcher;
|
|
5345
5398
|
protected readonly _options: IAPIContextOption;
|
|
5346
|
-
/**
|
|
5347
|
-
* 当前用户 Id
|
|
5348
|
-
*/
|
|
5349
|
-
currentUserId: string;
|
|
5350
5399
|
/**
|
|
5351
5400
|
* 连接时间
|
|
5352
5401
|
*/
|
|
5353
5402
|
abstract getConnectedTime(): number;
|
|
5354
|
-
readonly navi: ANavi;
|
|
5355
5403
|
protected readonly _appkey: string;
|
|
5356
5404
|
protected readonly _apiVer: string;
|
|
5405
|
+
protected readonly _apiVersion: string;
|
|
5406
|
+
protected _naviInfo: INaviInfo | null;
|
|
5357
5407
|
/**
|
|
5358
5408
|
* 引擎初始化
|
|
5359
5409
|
* @param _appkey
|
|
5360
5410
|
*/
|
|
5361
5411
|
constructor(runtime: IRuntime, _watcher: IEngineWatcher, _options: IAPIContextOption);
|
|
5362
|
-
|
|
5412
|
+
abstract requestNaviInfo(uris: string[], appkey: string, token: string, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
5413
|
+
/**
|
|
5414
|
+
* 获取导航数据
|
|
5415
|
+
* @param token
|
|
5416
|
+
* @param dynamicUris token 携带的动态导航地址
|
|
5417
|
+
* @param force 是否强制重新获取并清空缓存数据
|
|
5418
|
+
*/
|
|
5419
|
+
getNaviInfo(token: string, dynamicUris: string[], force: boolean, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
5420
|
+
protected setNaviInfo2Cache(token: string, naviInfo: INaviInfo): void;
|
|
5421
|
+
getInfoFromCache(token: string): INaviInfo | null;
|
|
5422
|
+
/**
|
|
5423
|
+
* 清空导航数据:内存数据、缓存数据
|
|
5424
|
+
*/
|
|
5425
|
+
private _clear;
|
|
5363
5426
|
/**
|
|
5364
5427
|
* 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
|
|
5365
5428
|
* 对于未实现的方法,接口响应 Unsupport 错误码
|
|
@@ -5373,7 +5436,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
5373
5436
|
* @param naviInfo
|
|
5374
5437
|
* @param reconnectKickEnable
|
|
5375
5438
|
*/
|
|
5376
|
-
abstract connect(token: string, naviInfo: INaviInfo, reconnectKickEnable?: boolean): Promise<ErrorCode>;
|
|
5439
|
+
abstract connect(token: string, naviInfo: INaviInfo, reconnectKickEnable?: boolean, traceId?: string): Promise<ErrorCode>;
|
|
5377
5440
|
/**
|
|
5378
5441
|
* 发送SDK版本
|
|
5379
5442
|
* @param versionInfo
|
|
@@ -5411,7 +5474,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
5411
5474
|
/**
|
|
5412
5475
|
* 消息类型
|
|
5413
5476
|
*/
|
|
5414
|
-
objectName: string): IPromiseResult<{
|
|
5477
|
+
objectName: string, traceId?: string): IPromiseResult<{
|
|
5415
5478
|
list: IReceivedMessage[];
|
|
5416
5479
|
hasMore: boolean;
|
|
5417
5480
|
}>;
|
|
@@ -5527,7 +5590,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
5527
5590
|
/**
|
|
5528
5591
|
* c++ 消息写库后存在自增 Id,必要时需要向业务层暴露,JSEngine 无需实现
|
|
5529
5592
|
*/
|
|
5530
|
-
onBefore?: (messageId: number) => void): IPromiseResult<IReceivedMessage>;
|
|
5593
|
+
onBefore?: (messageId: number) => void, traceId?: string): IPromiseResult<IReceivedMessage>;
|
|
5531
5594
|
/**
|
|
5532
5595
|
* 发送群组消息已读回执
|
|
5533
5596
|
* 导航下发已读回执开关为 true 时调用
|
|
@@ -5565,12 +5628,12 @@ declare abstract class AEngine implements IEngine {
|
|
|
5565
5628
|
* 加入聊天室
|
|
5566
5629
|
* @param count 拉取消息数量
|
|
5567
5630
|
*/
|
|
5568
|
-
abstract joinChatroom(chatroomId: string, count: number): Promise<ErrorCode>;
|
|
5631
|
+
abstract joinChatroom(chatroomId: string, count: number, traceId?: string): Promise<ErrorCode>;
|
|
5569
5632
|
/**
|
|
5570
5633
|
* 加入已存在的聊天室
|
|
5571
5634
|
* @param count 拉取消息数量
|
|
5572
5635
|
*/
|
|
5573
|
-
abstract joinExistChatroom(chatroomId: string, count: number): Promise<ErrorCode>;
|
|
5636
|
+
abstract joinExistChatroom(chatroomId: string, count: number, traceId?: string): Promise<ErrorCode>;
|
|
5574
5637
|
/**
|
|
5575
5638
|
* 退出聊天室
|
|
5576
5639
|
*/
|
|
@@ -5765,7 +5828,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
5765
5828
|
* @param targetId
|
|
5766
5829
|
* @param options
|
|
5767
5830
|
*/
|
|
5768
|
-
abstract sendUltraMessage(targetId: string, options: ISendMsgOptions): Promise<IAsyncRes>;
|
|
5831
|
+
abstract sendUltraMessage(targetId: string, options: ISendMsgOptions, traceId?: string): Promise<IAsyncRes>;
|
|
5769
5832
|
/**
|
|
5770
5833
|
* 超级群消息正在输入中
|
|
5771
5834
|
* @param options
|
|
@@ -5791,7 +5854,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
5791
5854
|
* @param targetId
|
|
5792
5855
|
* @param options
|
|
5793
5856
|
*/
|
|
5794
|
-
abstract getUltraHistoryMsg(targetId: string, options: IGetMsgOption): Promise<IAsyncRes>;
|
|
5857
|
+
abstract getUltraHistoryMsg(targetId: string, options: IGetMsgOption, traceId?: string): Promise<IAsyncRes>;
|
|
5795
5858
|
abstract getConversationListWithAllChannel(): IPromiseResult<IReceivedConversation[]>;
|
|
5796
5859
|
abstract getConversationListWithAllChannelByPage(index: number, limit: number): IPromiseResult<IReceivedConversation[]>;
|
|
5797
5860
|
/**
|
|
@@ -6012,232 +6075,6 @@ declare const appendUrl: (url: string, query?: {
|
|
|
6012
6075
|
[key: string]: string | number | null;
|
|
6013
6076
|
} | undefined) => string;
|
|
6014
6077
|
|
|
6015
|
-
/**
|
|
6016
|
-
* IndexDB中存储的log数据
|
|
6017
|
-
*/
|
|
6018
|
-
interface ILogInfo {
|
|
6019
|
-
sessionId: string;
|
|
6020
|
-
time: number;
|
|
6021
|
-
level: LogLevel;
|
|
6022
|
-
content: string;
|
|
6023
|
-
userId: string;
|
|
6024
|
-
}
|
|
6025
|
-
interface IRealTimeLog {
|
|
6026
|
-
level: LogLevel;
|
|
6027
|
-
content: string;
|
|
6028
|
-
}
|
|
6029
|
-
|
|
6030
|
-
interface ILogPolicy {
|
|
6031
|
-
url: string;
|
|
6032
|
-
level: number;
|
|
6033
|
-
itv: number;
|
|
6034
|
-
times: number;
|
|
6035
|
-
}
|
|
6036
|
-
interface IReportLogInitInfo {
|
|
6037
|
-
runtime: IRuntime;
|
|
6038
|
-
logSwitch: number;
|
|
6039
|
-
logPolicy: ILogPolicy;
|
|
6040
|
-
appkey: string;
|
|
6041
|
-
version: string;
|
|
6042
|
-
userId?: string;
|
|
6043
|
-
sessionId?: string;
|
|
6044
|
-
}
|
|
6045
|
-
/**
|
|
6046
|
-
* 更新上传日志属性
|
|
6047
|
-
*/
|
|
6048
|
-
interface IReportLogUpdateInfo {
|
|
6049
|
-
runtime?: IRuntime;
|
|
6050
|
-
logSwitch?: number;
|
|
6051
|
-
logPolicy?: ILogPolicy;
|
|
6052
|
-
appkey?: string;
|
|
6053
|
-
version?: string;
|
|
6054
|
-
userId?: string;
|
|
6055
|
-
sessionId?: string;
|
|
6056
|
-
}
|
|
6057
|
-
/**
|
|
6058
|
-
* 初始化上传日志属性
|
|
6059
|
-
*/
|
|
6060
|
-
interface IFullLogParams {
|
|
6061
|
-
startTime: number;
|
|
6062
|
-
endTime: number;
|
|
6063
|
-
platform: string;
|
|
6064
|
-
logId: string;
|
|
6065
|
-
uri: string;
|
|
6066
|
-
packageName?: string;
|
|
6067
|
-
}
|
|
6068
|
-
/**
|
|
6069
|
-
* 日志上报类
|
|
6070
|
-
*/
|
|
6071
|
-
declare class UploadLog {
|
|
6072
|
-
private info;
|
|
6073
|
-
private logUrl;
|
|
6074
|
-
level: number;
|
|
6075
|
-
itv: number;
|
|
6076
|
-
times: number;
|
|
6077
|
-
private deviceId;
|
|
6078
|
-
private deviceInfo;
|
|
6079
|
-
logSwitch: number;
|
|
6080
|
-
static currentRTTimes: number;
|
|
6081
|
-
static reportSwitch: boolean;
|
|
6082
|
-
private static _instance;
|
|
6083
|
-
constructor(info: IReportLogInitInfo);
|
|
6084
|
-
/**
|
|
6085
|
-
* 重新设置类属性
|
|
6086
|
-
*/
|
|
6087
|
-
updateUploadLogAttr(info: IReportLogUpdateInfo): void;
|
|
6088
|
-
static init(info: IReportLogInitInfo): UploadLog;
|
|
6089
|
-
static getInstance(): UploadLog | null;
|
|
6090
|
-
/**
|
|
6091
|
-
* 上报实时日志
|
|
6092
|
-
*/
|
|
6093
|
-
reportRealtimeLog(list: IRealTimeLog[]): Promise<void>;
|
|
6094
|
-
/**
|
|
6095
|
-
* 上报全量日志
|
|
6096
|
-
*/
|
|
6097
|
-
reportFullLog(params: IFullLogParams): Promise<void>;
|
|
6098
|
-
distroy(): void;
|
|
6099
|
-
}
|
|
6100
|
-
|
|
6101
|
-
/** 统计数据标签 **/
|
|
6102
|
-
declare enum StatisticsTag {
|
|
6103
|
-
'IM_NAVI' = "IM-stats_navi-S",
|
|
6104
|
-
'IM_WEBSOCKET' = "IM-stats_websocket-S",
|
|
6105
|
-
'IM_COMET' = "IM-stats_comet-S",
|
|
6106
|
-
'IM_CONNECTION_DURATION' = "IM-stats_con_dur-S"
|
|
6107
|
-
}
|
|
6108
|
-
|
|
6109
|
-
/** 统计日志公共数据参数 */
|
|
6110
|
-
interface IUpdateBaseStatisticsDataOption {
|
|
6111
|
-
sdkPrivate?: number;
|
|
6112
|
-
serverPrivate?: number;
|
|
6113
|
-
bundleId?: string;
|
|
6114
|
-
}
|
|
6115
|
-
/** 统计日志公共数据 */
|
|
6116
|
-
interface IBaseStatisticsData {
|
|
6117
|
-
sdkPrivate: number;
|
|
6118
|
-
serverPrivate: number;
|
|
6119
|
-
bundleId: string;
|
|
6120
|
-
}
|
|
6121
|
-
|
|
6122
|
-
declare class Logger {
|
|
6123
|
-
readonly tag: string;
|
|
6124
|
-
readonly type?: LogType | undefined;
|
|
6125
|
-
private readonly initiator?;
|
|
6126
|
-
/**
|
|
6127
|
-
*
|
|
6128
|
-
* @param tag 标签
|
|
6129
|
-
* @param type 类型
|
|
6130
|
-
* @param initiator 发起方(A: APP 层,L: Lib 层)
|
|
6131
|
-
*/
|
|
6132
|
-
constructor(tag: string, type?: LogType | undefined, initiator?: string | undefined);
|
|
6133
|
-
/**
|
|
6134
|
-
* 输出等级
|
|
6135
|
-
*/
|
|
6136
|
-
private _outLevel;
|
|
6137
|
-
/**
|
|
6138
|
-
* 为向前兼容,暂不删除
|
|
6139
|
-
*/
|
|
6140
|
-
private _stdout?;
|
|
6141
|
-
/**
|
|
6142
|
-
* 输出函数
|
|
6143
|
-
*/
|
|
6144
|
-
private _logStdout?;
|
|
6145
|
-
/**
|
|
6146
|
-
* 本地存储日志列表
|
|
6147
|
-
*/
|
|
6148
|
-
static databaseLogList: ILogInfo[];
|
|
6149
|
-
/**
|
|
6150
|
-
* 定时上传日志列表
|
|
6151
|
-
*/
|
|
6152
|
-
static realTimeLogList: IRealTimeLog[];
|
|
6153
|
-
static readonly sessionId: string;
|
|
6154
|
-
static userId: string;
|
|
6155
|
-
static init(userId: string): void;
|
|
6156
|
-
static reset(): void;
|
|
6157
|
-
/**
|
|
6158
|
-
* 默认输出函数
|
|
6159
|
-
* @param level
|
|
6160
|
-
* @param args
|
|
6161
|
-
*/
|
|
6162
|
-
private _defaultStdout;
|
|
6163
|
-
/**
|
|
6164
|
-
* 向 databaseLogList 中 push 日志
|
|
6165
|
-
* @param level 打印等级
|
|
6166
|
-
* @param content 日志内容
|
|
6167
|
-
* @param tag 日志tag
|
|
6168
|
-
*/
|
|
6169
|
-
__pushLocalLog(level: LogLevel, content: string, tag: string): void;
|
|
6170
|
-
/**
|
|
6171
|
-
* 向数据库中插入 log 数据
|
|
6172
|
-
*/
|
|
6173
|
-
__insertLogIntoDatabase(): Promise<boolean>;
|
|
6174
|
-
/**
|
|
6175
|
-
* 修改 log 输出等级
|
|
6176
|
-
* @param logLevel
|
|
6177
|
-
*/
|
|
6178
|
-
setLogLevel(logLevel?: LogLevel): void;
|
|
6179
|
-
setLogStdout(stdout?: (level: LogLevel, content: string) => void): void;
|
|
6180
|
-
log(level: LogLevel, ...args: any[]): void;
|
|
6181
|
-
debug: (...args: any[]) => void;
|
|
6182
|
-
info: (...args: any[]) => void;
|
|
6183
|
-
warn: (...args: any[]) => void;
|
|
6184
|
-
error: (...args: any[]) => void;
|
|
6185
|
-
fatal: (...args: any[]) => void;
|
|
6186
|
-
/**
|
|
6187
|
-
* 日志实时上报
|
|
6188
|
-
* @param level 日志等级
|
|
6189
|
-
* @param tag 日志标签
|
|
6190
|
-
* @param content 日志内容
|
|
6191
|
-
*/
|
|
6192
|
-
reportLog(level: LogLevel, tag: string, content: string): void;
|
|
6193
|
-
/**
|
|
6194
|
-
* @deprecated
|
|
6195
|
-
* 函数已废弃,使用 `setLogLevel` 与 `setStdout` 方法替代
|
|
6196
|
-
*/
|
|
6197
|
-
set(outLevel: LogLevel, stdout?: (level: LogLevel, ...args: any[]) => void): void;
|
|
6198
|
-
/**
|
|
6199
|
-
* 接口已废弃,改用 `setLogStdout`
|
|
6200
|
-
* @param stdout
|
|
6201
|
-
* @deprecated
|
|
6202
|
-
*/
|
|
6203
|
-
setStdout(stdout?: (level: LogLevel, msgTag: string, ...args: any[]) => void): void;
|
|
6204
|
-
__clearRealTimeLog(): void;
|
|
6205
|
-
/** 日志上传实例 */
|
|
6206
|
-
static _reportLog: UploadLog;
|
|
6207
|
-
/** 初始化日志上传 */
|
|
6208
|
-
initReportLog(info: IReportLogInitInfo): void;
|
|
6209
|
-
/**
|
|
6210
|
-
* 设置日志上传实例属性
|
|
6211
|
-
*/
|
|
6212
|
-
updateUploadLogAttr(info: IReportLogUpdateInfo): void;
|
|
6213
|
-
/**
|
|
6214
|
-
* 开始上报实时日志(定时上传)
|
|
6215
|
-
* @returns void
|
|
6216
|
-
*/
|
|
6217
|
-
startReport(): void;
|
|
6218
|
-
/**
|
|
6219
|
-
* 上报统计日志
|
|
6220
|
-
* @param tag 统计日志类型
|
|
6221
|
-
* @param content 日志内容
|
|
6222
|
-
*/
|
|
6223
|
-
reportStatisticsLog(tag: StatisticsTag | string, content: any): Promise<void>;
|
|
6224
|
-
/** 统计日志缓存数据 */
|
|
6225
|
-
private statisticsCaches;
|
|
6226
|
-
private baseStatisData;
|
|
6227
|
-
/**
|
|
6228
|
-
* 更新统计日志共用数据 updateStatisticsBaseData
|
|
6229
|
-
*/
|
|
6230
|
-
updateStatisticsBaseData(options: IUpdateBaseStatisticsDataOption): void;
|
|
6231
|
-
/** 获取统计日志共用数据 getStatisticsBaseData */
|
|
6232
|
-
getStatisticsBaseData(): IBaseStatisticsData;
|
|
6233
|
-
/** 设置统计日志数据 setStatisticsData */
|
|
6234
|
-
setStatisticsData<T>(tag: StatisticsTag | string, options?: T | {
|
|
6235
|
-
[key: string]: any;
|
|
6236
|
-
}, isReset?: boolean): void;
|
|
6237
|
-
/** 获取数据 getStatisticsData */
|
|
6238
|
-
getStatisticsData<T>(tag: StatisticsTag | string): T | any;
|
|
6239
|
-
}
|
|
6240
|
-
|
|
6241
6078
|
declare type IEventListener = (...args: any[]) => void;
|
|
6242
6079
|
declare class EventEmitter {
|
|
6243
6080
|
private readonly _map;
|
|
@@ -6365,6 +6202,148 @@ declare const isValidExpansion: (expansion: {
|
|
|
6365
6202
|
[key: string]: string;
|
|
6366
6203
|
} | undefined) => IIsValidExpansion;
|
|
6367
6204
|
|
|
6205
|
+
/** ******************************************新重构logger,按照Web新日志规范上报 ********************************** **/
|
|
6206
|
+
declare const sessionId: string;
|
|
6207
|
+
/**
|
|
6208
|
+
* logLevelTransformer
|
|
6209
|
+
* @description 数据中心与前端日志规范LogLevel定义不统一
|
|
6210
|
+
* WebLogLevel(前端日志级别) -> ServerLogLevel(服务器日志级别)
|
|
6211
|
+
* @param level { LogLevel }
|
|
6212
|
+
* @returns serverLogLevel
|
|
6213
|
+
*/
|
|
6214
|
+
declare function logLevelTransformer(level: LogLevel): number;
|
|
6215
|
+
/**
|
|
6216
|
+
* 序列化引用型数据为字符串
|
|
6217
|
+
* @value value
|
|
6218
|
+
*/
|
|
6219
|
+
declare const formatLogObj: (value: unknown) => unknown;
|
|
6220
|
+
/**
|
|
6221
|
+
* 缓存日志
|
|
6222
|
+
* @param logLevel 打印等级
|
|
6223
|
+
* @param logObj 日志内容
|
|
6224
|
+
* @param tagId 日志tag
|
|
6225
|
+
*/
|
|
6226
|
+
declare function insertIntoLogCache(logLevel: LogLevel, tagId: string, logObj: any, logSource?: LogSource): ILogInfo;
|
|
6227
|
+
/**
|
|
6228
|
+
* 本地默认输出函数
|
|
6229
|
+
* @param level
|
|
6230
|
+
* @param args
|
|
6231
|
+
*/
|
|
6232
|
+
declare function _defaultStdout(level: LogLevel, msgTag: string, logContent?: any): void;
|
|
6233
|
+
/**
|
|
6234
|
+
* Trace ID 生成器
|
|
6235
|
+
*/
|
|
6236
|
+
declare function ID(): string;
|
|
6237
|
+
declare function init(userLogInfo: ILogInit): void;
|
|
6238
|
+
declare function log(logLevel: LogLevel, tagId: LogTagId | string, logObj?: Object, logExtens?: ILogExtensions): void;
|
|
6239
|
+
declare const debug: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
|
|
6240
|
+
declare const info: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
|
|
6241
|
+
declare const warn: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
|
|
6242
|
+
declare const error: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
|
|
6243
|
+
declare const fatal: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
|
|
6244
|
+
|
|
6245
|
+
declare const base_sessionId: typeof sessionId;
|
|
6246
|
+
declare const base_logLevelTransformer: typeof logLevelTransformer;
|
|
6247
|
+
declare const base_formatLogObj: typeof formatLogObj;
|
|
6248
|
+
declare const base_insertIntoLogCache: typeof insertIntoLogCache;
|
|
6249
|
+
declare const base__defaultStdout: typeof _defaultStdout;
|
|
6250
|
+
declare const base_ID: typeof ID;
|
|
6251
|
+
declare const base_init: typeof init;
|
|
6252
|
+
declare const base_log: typeof log;
|
|
6253
|
+
declare const base_debug: typeof debug;
|
|
6254
|
+
declare const base_info: typeof info;
|
|
6255
|
+
declare const base_warn: typeof warn;
|
|
6256
|
+
declare const base_error: typeof error;
|
|
6257
|
+
declare const base_fatal: typeof fatal;
|
|
6258
|
+
declare namespace base {
|
|
6259
|
+
export {
|
|
6260
|
+
base_sessionId as sessionId,
|
|
6261
|
+
base_logLevelTransformer as logLevelTransformer,
|
|
6262
|
+
base_formatLogObj as formatLogObj,
|
|
6263
|
+
base_insertIntoLogCache as insertIntoLogCache,
|
|
6264
|
+
base__defaultStdout as _defaultStdout,
|
|
6265
|
+
base_ID as ID,
|
|
6266
|
+
base_init as init,
|
|
6267
|
+
base_log as log,
|
|
6268
|
+
base_debug as debug,
|
|
6269
|
+
base_info as info,
|
|
6270
|
+
base_warn as warn,
|
|
6271
|
+
base_error as error,
|
|
6272
|
+
base_fatal as fatal,
|
|
6273
|
+
};
|
|
6274
|
+
}
|
|
6275
|
+
|
|
6276
|
+
/** *********************实时日志上报***************** */
|
|
6277
|
+
|
|
6278
|
+
/**
|
|
6279
|
+
* 缓存日志实时
|
|
6280
|
+
* @param logLevel 日志等级
|
|
6281
|
+
* @param tagId 日志标签
|
|
6282
|
+
* @param content 日志内容
|
|
6283
|
+
*/
|
|
6284
|
+
declare function reportLog(logLevel: LogLevel, tagId: string, content: string, logSource?: LogSource): void;
|
|
6285
|
+
|
|
6286
|
+
/** ******************************************旧Logger类,fix兼容用,逐步废弃 ********************************** **/
|
|
6287
|
+
|
|
6288
|
+
/**
|
|
6289
|
+
* @description 兼容旧版用法,建议用Logger静态方法
|
|
6290
|
+
* 1、不符合新版Web日志规范
|
|
6291
|
+
* 2、不支持自定义TagId
|
|
6292
|
+
* 3、后续可能删除,要逐步迁移新Web规范
|
|
6293
|
+
*/
|
|
6294
|
+
declare class Logger {
|
|
6295
|
+
readonly tagId: string;
|
|
6296
|
+
readonly logSource?: LogSource | undefined;
|
|
6297
|
+
private readonly initiator?;
|
|
6298
|
+
/**
|
|
6299
|
+
*
|
|
6300
|
+
* @param tagId
|
|
6301
|
+
* @param logSource 类型
|
|
6302
|
+
* @param initiator 发起方(A: APP 层,L: Lib 层)
|
|
6303
|
+
*/
|
|
6304
|
+
constructor(tagId: string, logSource?: LogSource | undefined, initiator?: string | undefined);
|
|
6305
|
+
/**
|
|
6306
|
+
* 本地控制台日志输出级别
|
|
6307
|
+
*/
|
|
6308
|
+
private _localLogLevel;
|
|
6309
|
+
/**
|
|
6310
|
+
* 自定义本地日志输出函数
|
|
6311
|
+
*/
|
|
6312
|
+
private _customLogPrint?;
|
|
6313
|
+
/**
|
|
6314
|
+
* 为向前兼容,暂不删除
|
|
6315
|
+
*/
|
|
6316
|
+
private _stdout?;
|
|
6317
|
+
/**
|
|
6318
|
+
* 自定义本地打印日志级别
|
|
6319
|
+
* @param logLevel
|
|
6320
|
+
*/
|
|
6321
|
+
setLogLevel(logLevel?: LogLevel): void;
|
|
6322
|
+
/**
|
|
6323
|
+
* 自定义本地打印函数
|
|
6324
|
+
*/
|
|
6325
|
+
setLogStdout(stdout?: (level: LogLevel, content: string) => void): void;
|
|
6326
|
+
log(logLevel: LogLevel, ...args: any[]): void;
|
|
6327
|
+
debug: (...args: any[]) => void;
|
|
6328
|
+
info: (...args: any[]) => void;
|
|
6329
|
+
warn: (...args: any[]) => void;
|
|
6330
|
+
error: (...args: any[]) => void;
|
|
6331
|
+
fatal: (...args: any[]) => void;
|
|
6332
|
+
/**
|
|
6333
|
+
* @deprecated
|
|
6334
|
+
* 函数已废弃,使用 `setLogLevel` 与 `setStdout` 方法替代
|
|
6335
|
+
*/
|
|
6336
|
+
set(outLevel: LogLevel, stdout?: (level: LogLevel, ...args: any[]) => void): void;
|
|
6337
|
+
/**
|
|
6338
|
+
* 接口已废弃,改用 `setLogStdout`
|
|
6339
|
+
* @param stdout
|
|
6340
|
+
* @deprecated
|
|
6341
|
+
*/
|
|
6342
|
+
setStdout(stdout?: (level: LogLevel, msgTag: string, ...args: any[]) => void): void;
|
|
6343
|
+
reportLog: typeof reportLog;
|
|
6344
|
+
}
|
|
6345
|
+
declare const _default: Logger;
|
|
6346
|
+
|
|
6368
6347
|
/**
|
|
6369
6348
|
* 预定义的验证规则,只包含`值类型`数据验证
|
|
6370
6349
|
* 引用类型数据需使用自定义 validator 校验函数进行校验
|
|
@@ -6549,6 +6528,10 @@ declare const MAX_MESSAGE_CONTENT_BYTES: number;
|
|
|
6549
6528
|
* IM Comet 发送 pullmsg(嗅探 + 等待信令) 超时时间 45s
|
|
6550
6529
|
*/
|
|
6551
6530
|
declare const IM_COMET_PULLMSG_TIMEOUT = 45000;
|
|
6531
|
+
/**
|
|
6532
|
+
* IM 加入聊天室后定时拉取消息和 KV 时间间隔
|
|
6533
|
+
*/
|
|
6534
|
+
declare const IM_CHATROOM_PULL_INTERVAL_TIME: number;
|
|
6552
6535
|
/**
|
|
6553
6536
|
* storage key 使用的前缀
|
|
6554
6537
|
*/
|
|
@@ -6588,10 +6571,14 @@ declare enum CONNECTION_TYPE {
|
|
|
6588
6571
|
WEBSOCKET = "websocket",
|
|
6589
6572
|
COMET = "comet"
|
|
6590
6573
|
}
|
|
6574
|
+
declare const REAT_TIME_LOG_SIZE = 500;
|
|
6575
|
+
declare const DB_LOG_MAX_SIZE = 100000;
|
|
6576
|
+
declare const DB_LOG_FLUSH_FREQUENCY = 3000;
|
|
6577
|
+
declare const ONE_LOG_SIZE_MAX = 1000;
|
|
6591
6578
|
|
|
6592
6579
|
/**
|
|
6593
6580
|
* engine 版本号
|
|
6594
6581
|
*/
|
|
6595
6582
|
declare const version: string;
|
|
6596
6583
|
|
|
6597
|
-
export { AEngine,
|
|
6584
|
+
export { AEngine, APIContext, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType as ChatroomMemberChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, DB_LOG_FLUSH_FREQUENCY, DB_LOG_MAX_SIZE, DelayTimer, ErrorCode, EventEmitter, FileType, HttpMethod, IAPIContextOption, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, ICancelRoomPKOptions, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IGetMsgOption, 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, 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, IUltraExMsgOptions, IUltraGroupOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, 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, 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, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATUS_MESSAGE, STORAGE_ROOT_KEY, TagChangeType, UploadMethod, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketChannel, appendUrl, assert, clone, cloneByJSON, _default as engineLogger, forEach, formatConnectResponseCode, getBrowser, getMimeKey, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, todo, usingCppEngine, validate, version };
|