@rongcloud/engine 5.2.5-alpha.1 → 5.3.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/{dist/index.d.ts → index.d.ts} +322 -12
- package/index.esm.js +18 -0
- package/index.js +18 -0
- package/package.json +15 -26
- package/dist/index.esm.js +0 -18
- package/dist/index.js +0 -18
- package/dist/index.umd.js +0 -1
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* RCEngine - v5.2.5-alpha.1
|
|
3
|
-
* CommitId - ad1880737e9cafc9108824f145582ade925e0d78
|
|
4
|
-
* Sat Apr 23 2022 15:21:57 GMT+0800 (China Standard Time)
|
|
5
|
-
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
|
-
*/
|
|
7
1
|
/**
|
|
8
2
|
* 会话类型
|
|
9
3
|
*/
|
|
@@ -416,6 +410,7 @@ interface IServerConversationStatus {
|
|
|
416
410
|
targetId: string;
|
|
417
411
|
updatedTime?: number;
|
|
418
412
|
notificationStatus?: number;
|
|
413
|
+
notificationLevel?: number;
|
|
419
414
|
isTop?: boolean;
|
|
420
415
|
type?: number;
|
|
421
416
|
tags?: IConversationTag[];
|
|
@@ -821,6 +816,29 @@ interface IRecallMsgOptions {
|
|
|
821
816
|
* 移动端推送配置
|
|
822
817
|
*/
|
|
823
818
|
pushConfig?: IPushConfig;
|
|
819
|
+
/**
|
|
820
|
+
* 其他拓展信息
|
|
821
|
+
*/
|
|
822
|
+
extra?: string;
|
|
823
|
+
}
|
|
824
|
+
interface IRecallMsgContent {
|
|
825
|
+
conversationType: number;
|
|
826
|
+
targetId: string;
|
|
827
|
+
sentTime: number;
|
|
828
|
+
messageUId: string;
|
|
829
|
+
/**
|
|
830
|
+
* 会话组织机构标识
|
|
831
|
+
* 默认值未 空字符串
|
|
832
|
+
*/
|
|
833
|
+
channelId: string;
|
|
834
|
+
/**
|
|
835
|
+
* 其他拓展信息
|
|
836
|
+
*/
|
|
837
|
+
extra?: string;
|
|
838
|
+
/**
|
|
839
|
+
* 发送消息携带的用户信息
|
|
840
|
+
*/
|
|
841
|
+
user?: IUserProfile;
|
|
824
842
|
}
|
|
825
843
|
/**
|
|
826
844
|
* 发送消息时的可选项信息
|
|
@@ -1602,6 +1620,39 @@ declare enum ErrorCode {
|
|
|
1602
1620
|
CHATROOM_KV_STORE_OUT_LIMIT = 23429
|
|
1603
1621
|
}
|
|
1604
1622
|
|
|
1623
|
+
/**
|
|
1624
|
+
* @desc 原: NotificationStatus 已废弃
|
|
1625
|
+
*/
|
|
1626
|
+
declare enum NotificationLevel {
|
|
1627
|
+
/**
|
|
1628
|
+
* 全部消息通知(接收全部消息通知 -- 显示指定关闭免打扰功能)
|
|
1629
|
+
*/
|
|
1630
|
+
ALL_MESSAGE = -1,
|
|
1631
|
+
/**
|
|
1632
|
+
* 未设置(向上查询群或者APP级别设置)// 存量数据中 0 表示未设置
|
|
1633
|
+
*/
|
|
1634
|
+
NOT_SET = 0,
|
|
1635
|
+
/**
|
|
1636
|
+
* 群聊超级群仅 @ 消息通知(现在通知)单聊代表全部消息通知
|
|
1637
|
+
*/
|
|
1638
|
+
AT_MESSAGE_NOTIFICATION = 1,
|
|
1639
|
+
/**
|
|
1640
|
+
* @ 指定用户通知
|
|
1641
|
+
*/
|
|
1642
|
+
AT_USER_NOTIFICATION = 2,
|
|
1643
|
+
/**
|
|
1644
|
+
* @ 群用户组通知,通知用户组暂未实现,暂不暴露出去
|
|
1645
|
+
*/
|
|
1646
|
+
/**
|
|
1647
|
+
* @ 群全员通知
|
|
1648
|
+
*/
|
|
1649
|
+
AT_GROUP_ALL_USER_NOFICATION = 4,
|
|
1650
|
+
/**
|
|
1651
|
+
* 消息通知被屏蔽,即不接收消息通知
|
|
1652
|
+
*/
|
|
1653
|
+
NOT_MESSAGE_NOTIFICATION = 5
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1605
1656
|
/**
|
|
1606
1657
|
* 音视频模式
|
|
1607
1658
|
*/
|
|
@@ -1676,6 +1727,9 @@ declare enum RTCJoinType {
|
|
|
1676
1727
|
COEXIST = 2
|
|
1677
1728
|
}
|
|
1678
1729
|
|
|
1730
|
+
/**
|
|
1731
|
+
* @deprecated 已废弃,请使用 NotificationLevel
|
|
1732
|
+
*/
|
|
1679
1733
|
declare enum NotificationStatus {
|
|
1680
1734
|
/**
|
|
1681
1735
|
* 免打扰已开启
|
|
@@ -1738,6 +1792,7 @@ interface IReceivedConversation {
|
|
|
1738
1792
|
* 2. 未开启免打扰
|
|
1739
1793
|
*/
|
|
1740
1794
|
notificationStatus: NotificationStatus;
|
|
1795
|
+
notificationLevel?: NotificationLevel;
|
|
1741
1796
|
/**
|
|
1742
1797
|
* 会话是否已置顶
|
|
1743
1798
|
*/
|
|
@@ -1767,6 +1822,7 @@ interface ISetConversationStatusOptions {
|
|
|
1767
1822
|
targetId: string;
|
|
1768
1823
|
isTop?: boolean;
|
|
1769
1824
|
notificationStatus?: number;
|
|
1825
|
+
notificationLevel?: number;
|
|
1770
1826
|
channelId?: string;
|
|
1771
1827
|
}
|
|
1772
1828
|
interface IUpdatedConversation {
|
|
@@ -1793,6 +1849,7 @@ interface IUpdatedConversation {
|
|
|
1793
1849
|
};
|
|
1794
1850
|
lastUnreadTime?: number;
|
|
1795
1851
|
notificationStatus?: number;
|
|
1852
|
+
notificationLevel?: number;
|
|
1796
1853
|
isTop?: boolean;
|
|
1797
1854
|
/**
|
|
1798
1855
|
* 会话标识
|
|
@@ -1814,6 +1871,11 @@ interface IConversationState extends IBaseConversationInfo {
|
|
|
1814
1871
|
unreadCount: number;
|
|
1815
1872
|
unreadMentionedCount: number;
|
|
1816
1873
|
}
|
|
1874
|
+
/** 指定超级群会话传参 */
|
|
1875
|
+
interface IUltraGroupOption {
|
|
1876
|
+
targetId: string;
|
|
1877
|
+
channelId?: string;
|
|
1878
|
+
}
|
|
1817
1879
|
|
|
1818
1880
|
/**
|
|
1819
1881
|
* 导航信息数据就结构
|
|
@@ -2405,6 +2467,18 @@ interface IResponse {
|
|
|
2405
2467
|
status: number;
|
|
2406
2468
|
data?: string;
|
|
2407
2469
|
}
|
|
2470
|
+
/**
|
|
2471
|
+
* 网络状态枚举
|
|
2472
|
+
*/
|
|
2473
|
+
declare enum NetworkType {
|
|
2474
|
+
WIFI = "wifi",
|
|
2475
|
+
FOUR_G = "4g",
|
|
2476
|
+
THREE_G = "3g",
|
|
2477
|
+
TWO_G = "2g",
|
|
2478
|
+
FIVE_G = "2g",
|
|
2479
|
+
THREE_GENT = "3gnet",
|
|
2480
|
+
UNKONWN = "unknown"
|
|
2481
|
+
}
|
|
2408
2482
|
interface IWebSocket {
|
|
2409
2483
|
/**
|
|
2410
2484
|
* 监听连接建立事件,此时 WebSocket 实例已准备好收发数据
|
|
@@ -2483,6 +2557,11 @@ interface IRuntime {
|
|
|
2483
2557
|
* 在某些非浏览器平台,其等同于 localStorage
|
|
2484
2558
|
*/
|
|
2485
2559
|
sessionStorage: IStorage;
|
|
2560
|
+
/**
|
|
2561
|
+
* 获取网络状态
|
|
2562
|
+
* 2g 3g 4g wifi unkown
|
|
2563
|
+
*/
|
|
2564
|
+
getNetworkType(): Promise<NetworkType>;
|
|
2486
2565
|
}
|
|
2487
2566
|
|
|
2488
2567
|
/**
|
|
@@ -2868,6 +2947,10 @@ declare enum LogLevel {
|
|
|
2868
2947
|
* 4
|
|
2869
2948
|
*/
|
|
2870
2949
|
FATAL = 4,
|
|
2950
|
+
/**
|
|
2951
|
+
* 统计日志类型
|
|
2952
|
+
*/
|
|
2953
|
+
STATISTICS = 6,
|
|
2871
2954
|
/**
|
|
2872
2955
|
* 不展示任何日志
|
|
2873
2956
|
*/
|
|
@@ -3574,6 +3657,14 @@ interface IExpansionListenerData {
|
|
|
3574
3657
|
updatedExpansion?: IUpdatedExpansion;
|
|
3575
3658
|
deletedExpansion?: IDeletedExpansion;
|
|
3576
3659
|
}
|
|
3660
|
+
/**
|
|
3661
|
+
* 扩展信息校验返回
|
|
3662
|
+
*/
|
|
3663
|
+
interface IIsValidExpansion {
|
|
3664
|
+
isExceedLimit: boolean;
|
|
3665
|
+
isIllgalEx: boolean;
|
|
3666
|
+
isExKeyOrValLengthExceedLimit: boolean;
|
|
3667
|
+
}
|
|
3577
3668
|
|
|
3578
3669
|
/**
|
|
3579
3670
|
* typing相关接口
|
|
@@ -3690,7 +3781,7 @@ declare class DataCodec {
|
|
|
3690
3781
|
*/
|
|
3691
3782
|
private _formatUserSetting;
|
|
3692
3783
|
/**
|
|
3693
|
-
* 格式化 会话状态
|
|
3784
|
+
* 格式化 会话状态 置顶、免打扰
|
|
3694
3785
|
*/
|
|
3695
3786
|
private _formatConversationStatus;
|
|
3696
3787
|
/**
|
|
@@ -3823,6 +3914,18 @@ declare class DataCodec {
|
|
|
3823
3914
|
* @param order 排序方式
|
|
3824
3915
|
*/
|
|
3825
3916
|
encodeGetChatRoomInfo(count: number, order: number): any[];
|
|
3917
|
+
/**
|
|
3918
|
+
* 设置指定超级群默认通知配置
|
|
3919
|
+
* @param notificationLevel
|
|
3920
|
+
* * NotificationLevel
|
|
3921
|
+
* @param channelId 超级群频道 Id
|
|
3922
|
+
*/
|
|
3923
|
+
encodeSetUltraGroupDefaultNotificationLevel(notificationLevel: NotificationLevel, channelId: string): any;
|
|
3924
|
+
/**
|
|
3925
|
+
* 查询指定超级群默认通知配置
|
|
3926
|
+
* @param channelId 频道 ID
|
|
3927
|
+
*/
|
|
3928
|
+
encodeGetUltraGroupDefaultNotificationLevel(channelId: string): any;
|
|
3826
3929
|
/**
|
|
3827
3930
|
* 上传文件认证信息获取
|
|
3828
3931
|
*/
|
|
@@ -4206,6 +4309,10 @@ interface IAPIContextOption {
|
|
|
4206
4309
|
* IMLib 版本号
|
|
4207
4310
|
*/
|
|
4208
4311
|
apiVersion: string;
|
|
4312
|
+
/**
|
|
4313
|
+
* IMLib 包名
|
|
4314
|
+
*/
|
|
4315
|
+
apiPKGName?: string;
|
|
4209
4316
|
/**
|
|
4210
4317
|
* 自定义导航地址:
|
|
4211
4318
|
* 1. 私有云环境下该值为必填项
|
|
@@ -4278,6 +4385,7 @@ declare class APIContext {
|
|
|
4278
4385
|
readonly coreVersion: string;
|
|
4279
4386
|
readonly appkey: string;
|
|
4280
4387
|
readonly apiVersion: string;
|
|
4388
|
+
readonly apiPKGName: string;
|
|
4281
4389
|
private readonly _options;
|
|
4282
4390
|
private _versionInfo;
|
|
4283
4391
|
private _typingInfo;
|
|
@@ -4501,6 +4609,20 @@ declare class APIContext {
|
|
|
4501
4609
|
* 获取第一个未读消息
|
|
4502
4610
|
*/
|
|
4503
4611
|
getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<IReceivedMessage | null>>;
|
|
4612
|
+
/**
|
|
4613
|
+
* 设置会话免打扰
|
|
4614
|
+
* 原: setConversationStatus 已废弃
|
|
4615
|
+
* 是否免打扰
|
|
4616
|
+
* * -1: 全部消息通知(接收全部消息通知 -- 显示指定关闭免打扰功能)
|
|
4617
|
+
* * 0: 未设置(向上查询群或者APP级别设置)//存量数据中0表示未设置
|
|
4618
|
+
* * 1: 群聊超级群仅@消息通知(现在通知)单聊代表全部消息通知
|
|
4619
|
+
* * 2: @ 指定用户通知
|
|
4620
|
+
* * 3: @ 群用户组通知,通知用户组暂未实现,暂不暴露出去
|
|
4621
|
+
* * 4: @ 群全员通知
|
|
4622
|
+
* * 5: 消息通知被屏蔽,即不接收消息通知
|
|
4623
|
+
* @desc 注意单聊的 level 只有 -1、0、1
|
|
4624
|
+
*/
|
|
4625
|
+
setConversationNotificationLevel(conversationType: ConversationType, targetId: string, notificationLevel?: NotificationLevel, channelId?: string): Promise<ErrorCode>;
|
|
4504
4626
|
setConversationStatus(conversationType: ConversationType, targetId: string, isTop?: boolean, notificationStatus?: 1 | 2, channelId?: string): Promise<ErrorCode>;
|
|
4505
4627
|
saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string, channelId?: string): Promise<ErrorCode>;
|
|
4506
4628
|
getConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<string>>;
|
|
@@ -4756,6 +4878,18 @@ declare class APIContext {
|
|
|
4756
4878
|
* @param targetId
|
|
4757
4879
|
*/
|
|
4758
4880
|
getUltraGroupUnreadMentionedCountByTargetId(targetId: string): Promise<IAsyncRes<number>>;
|
|
4881
|
+
/**
|
|
4882
|
+
* 获取指定超级群所有频道未读数
|
|
4883
|
+
* @param targetId 超级群 Id
|
|
4884
|
+
* @returns 未读数
|
|
4885
|
+
*/
|
|
4886
|
+
getUltraGroupUnreadCountByTargetId(targetId: string): Promise<IAsyncRes<number>>;
|
|
4887
|
+
/**
|
|
4888
|
+
* 超级群类型未读数
|
|
4889
|
+
* @param isMentioned 是否是 @ 消息,默认为 false
|
|
4890
|
+
* @returns 未读数
|
|
4891
|
+
*/
|
|
4892
|
+
getAllUltraGroupUnreadCount(isMentioned?: boolean): Promise<IAsyncRes<number>>;
|
|
4759
4893
|
getAllConversationState(): Promise<IAsyncRes<IConversationState[]>>;
|
|
4760
4894
|
/**
|
|
4761
4895
|
* 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
|
|
@@ -4847,6 +4981,22 @@ declare class APIContext {
|
|
|
4847
4981
|
}>>;
|
|
4848
4982
|
getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId?: string): IReceivedMessage[];
|
|
4849
4983
|
clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<ErrorCode>;
|
|
4984
|
+
/**
|
|
4985
|
+
* 查询指定超级群默认通知配置
|
|
4986
|
+
*/
|
|
4987
|
+
getUltraGroupDefaultNotificationLevel(targetId: string, channelId?: string): Promise<IAsyncRes<NotificationLevel>>;
|
|
4988
|
+
/**
|
|
4989
|
+
* 设置指定超级群默认通知配置
|
|
4990
|
+
* @param targetId 指定超级群 Id
|
|
4991
|
+
* @param notificationLevel 超级群通知级别
|
|
4992
|
+
* * NotificationLevel
|
|
4993
|
+
* @param channelId 指定超级群指定频道 Id
|
|
4994
|
+
*/
|
|
4995
|
+
setUltraGroupDefaultNotificationLevel(targetId: string, notificationLevel: NotificationLevel, channelId?: string): Promise<IAsyncRes<void>>;
|
|
4996
|
+
/**
|
|
4997
|
+
* 获取会话免打扰状态
|
|
4998
|
+
*/
|
|
4999
|
+
getConversationNotificationLevel(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<NotificationLevel>>;
|
|
4850
5000
|
/**
|
|
4851
5001
|
* 获取会话免打扰状态
|
|
4852
5002
|
*/
|
|
@@ -5590,6 +5740,18 @@ declare abstract class AEngine implements IEngine {
|
|
|
5590
5740
|
* @param targetId
|
|
5591
5741
|
*/
|
|
5592
5742
|
abstract getUltraGroupUnreadMentionedCountByTargetId(targetId: string): Promise<IAsyncRes<number>>;
|
|
5743
|
+
/**
|
|
5744
|
+
* 获取指定超级群所有子频道未读数
|
|
5745
|
+
* @param targetId 超级群 Id
|
|
5746
|
+
* @returns 未读数
|
|
5747
|
+
*/
|
|
5748
|
+
abstract getUltraGroupUnreadCountByTargetId(targetId: string): IPromiseResult<number>;
|
|
5749
|
+
/**
|
|
5750
|
+
* 超级群类型未读数
|
|
5751
|
+
* @param isMentioned 是否是 @ 消息
|
|
5752
|
+
* @returns 未读数
|
|
5753
|
+
*/
|
|
5754
|
+
abstract getAllUltraGroupUnreadCount(isMentioned?: boolean): Promise<IAsyncRes<number>>;
|
|
5593
5755
|
/**
|
|
5594
5756
|
* 超级群消息发送
|
|
5595
5757
|
* @param targetId
|
|
@@ -5720,9 +5882,27 @@ declare abstract class AEngine implements IEngine {
|
|
|
5720
5882
|
*/
|
|
5721
5883
|
abstract clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
|
|
5722
5884
|
/**
|
|
5723
|
-
*
|
|
5885
|
+
* 设置指定超级群默认通知配置
|
|
5886
|
+
* @param targetId 指定超级群 Id
|
|
5887
|
+
* @param notificationLevel 超级群通知级别
|
|
5888
|
+
* * NotificationLevel
|
|
5889
|
+
* @param channelId 指定超级群指定频道 Id
|
|
5890
|
+
*/
|
|
5891
|
+
abstract setUltraGroupDefaultNotificationLevel(targetId: string, notificationLevel: NotificationLevel, channelId: string): IPromiseResult<void>;
|
|
5892
|
+
/**
|
|
5893
|
+
* 查询指定超级群默认通知配置
|
|
5894
|
+
*/
|
|
5895
|
+
abstract getUltraGroupDefaultNotificationLevel(targetId: string, channelId: string): IPromiseResult<NotificationLevel>;
|
|
5896
|
+
/**
|
|
5897
|
+
* 获取会话免打扰状态
|
|
5898
|
+
* @deprecated 已废弃,请使用 getConversationNotificationLevel
|
|
5724
5899
|
*/
|
|
5725
5900
|
abstract getConversationNotificationStatus(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<NotificationStatus>;
|
|
5901
|
+
/**
|
|
5902
|
+
* 获取会话免打扰状态
|
|
5903
|
+
* 旧:getConversationNotificationStatus
|
|
5904
|
+
*/
|
|
5905
|
+
abstract getConversationNotificationLevel(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<NotificationLevel>;
|
|
5726
5906
|
/**
|
|
5727
5907
|
* 协议栈获取远端历史消息
|
|
5728
5908
|
*/
|
|
@@ -5839,6 +6019,98 @@ interface IRealTimeLog {
|
|
|
5839
6019
|
content: string;
|
|
5840
6020
|
}
|
|
5841
6021
|
|
|
6022
|
+
interface ILogPolicy {
|
|
6023
|
+
url: string;
|
|
6024
|
+
level: number;
|
|
6025
|
+
itv: number;
|
|
6026
|
+
times: number;
|
|
6027
|
+
}
|
|
6028
|
+
interface IReportLogInitInfo {
|
|
6029
|
+
runtime: IRuntime;
|
|
6030
|
+
logSwitch: number;
|
|
6031
|
+
logPolicy: ILogPolicy;
|
|
6032
|
+
appkey: string;
|
|
6033
|
+
version: string;
|
|
6034
|
+
userId?: string;
|
|
6035
|
+
sessionId?: string;
|
|
6036
|
+
}
|
|
6037
|
+
/**
|
|
6038
|
+
* 更新上传日志属性
|
|
6039
|
+
*/
|
|
6040
|
+
interface IReportLogUpdateInfo {
|
|
6041
|
+
runtime?: IRuntime;
|
|
6042
|
+
logSwitch?: number;
|
|
6043
|
+
logPolicy?: ILogPolicy;
|
|
6044
|
+
appkey?: string;
|
|
6045
|
+
version?: string;
|
|
6046
|
+
userId?: string;
|
|
6047
|
+
sessionId?: string;
|
|
6048
|
+
}
|
|
6049
|
+
/**
|
|
6050
|
+
* 初始化上传日志属性
|
|
6051
|
+
*/
|
|
6052
|
+
interface IFullLogParams {
|
|
6053
|
+
startTime: number;
|
|
6054
|
+
endTime: number;
|
|
6055
|
+
platform: string;
|
|
6056
|
+
logId: string;
|
|
6057
|
+
uri: string;
|
|
6058
|
+
packageName?: string;
|
|
6059
|
+
}
|
|
6060
|
+
/**
|
|
6061
|
+
* 日志上报类
|
|
6062
|
+
*/
|
|
6063
|
+
declare class UploadLog {
|
|
6064
|
+
private info;
|
|
6065
|
+
private logUrl;
|
|
6066
|
+
level: number;
|
|
6067
|
+
itv: number;
|
|
6068
|
+
times: number;
|
|
6069
|
+
private deviceId;
|
|
6070
|
+
private deviceInfo;
|
|
6071
|
+
logSwitch: number;
|
|
6072
|
+
static currentRTTimes: number;
|
|
6073
|
+
static reportSwitch: boolean;
|
|
6074
|
+
private static _instance;
|
|
6075
|
+
constructor(info: IReportLogInitInfo);
|
|
6076
|
+
/**
|
|
6077
|
+
* 重新设置类属性
|
|
6078
|
+
*/
|
|
6079
|
+
updateUploadLogAttr(info: IReportLogUpdateInfo): void;
|
|
6080
|
+
static init(info: IReportLogInitInfo): UploadLog;
|
|
6081
|
+
static getInstance(): UploadLog | null;
|
|
6082
|
+
/**
|
|
6083
|
+
* 上报实时日志
|
|
6084
|
+
*/
|
|
6085
|
+
reportRealtimeLog(list: IRealTimeLog[]): Promise<void>;
|
|
6086
|
+
/**
|
|
6087
|
+
* 上报全量日志
|
|
6088
|
+
*/
|
|
6089
|
+
reportFullLog(params: IFullLogParams): Promise<void>;
|
|
6090
|
+
distroy(): void;
|
|
6091
|
+
}
|
|
6092
|
+
|
|
6093
|
+
/** 统计数据标签 **/
|
|
6094
|
+
declare enum StatisticsTag {
|
|
6095
|
+
'IM_NAVI' = "IM-stats_navi-S",
|
|
6096
|
+
'IM_WEBSOCKET' = "IM-stats_websocket-S",
|
|
6097
|
+
'IM_COMET' = "IM-stats_comet-S",
|
|
6098
|
+
'IM_CONNECTION_DURATION' = "IM-stats_con_dur-S"
|
|
6099
|
+
}
|
|
6100
|
+
|
|
6101
|
+
/** 统计日志公共数据参数 */
|
|
6102
|
+
interface IUpdateBaseStatisticsDataOption {
|
|
6103
|
+
sdkPrivate?: number;
|
|
6104
|
+
serverPrivate?: number;
|
|
6105
|
+
bundleId?: string;
|
|
6106
|
+
}
|
|
6107
|
+
/** 统计日志公共数据 */
|
|
6108
|
+
interface IBaseStatisticsData {
|
|
6109
|
+
sdkPrivate: number;
|
|
6110
|
+
serverPrivate: number;
|
|
6111
|
+
bundleId: string;
|
|
6112
|
+
}
|
|
6113
|
+
|
|
5842
6114
|
declare class Logger {
|
|
5843
6115
|
readonly tag: string;
|
|
5844
6116
|
readonly type?: LogType | undefined;
|
|
@@ -5922,6 +6194,40 @@ declare class Logger {
|
|
|
5922
6194
|
*/
|
|
5923
6195
|
setStdout(stdout?: (level: LogLevel, msgTag: string, ...args: any[]) => void): void;
|
|
5924
6196
|
__clearRealTimeLog(): void;
|
|
6197
|
+
/** 日志上传实例 */
|
|
6198
|
+
static _reportLog: UploadLog;
|
|
6199
|
+
/** 初始化日志上传 */
|
|
6200
|
+
initReportLog(info: IReportLogInitInfo): void;
|
|
6201
|
+
/**
|
|
6202
|
+
* 设置日志上传实例属性
|
|
6203
|
+
*/
|
|
6204
|
+
updateUploadLogAttr(info: IReportLogUpdateInfo): void;
|
|
6205
|
+
/**
|
|
6206
|
+
* 开始上报实时日志(定时上传)
|
|
6207
|
+
* @returns void
|
|
6208
|
+
*/
|
|
6209
|
+
startReport(): void;
|
|
6210
|
+
/**
|
|
6211
|
+
* 上报统计日志
|
|
6212
|
+
* @param tag 统计日志类型
|
|
6213
|
+
* @param content 日志内容
|
|
6214
|
+
*/
|
|
6215
|
+
reportStatisticsLog(tag: StatisticsTag | string, content: any): Promise<void>;
|
|
6216
|
+
/** 统计日志缓存数据 */
|
|
6217
|
+
private statisticsCaches;
|
|
6218
|
+
private baseStatisData;
|
|
6219
|
+
/**
|
|
6220
|
+
* 更新统计日志共用数据 updateStatisticsBaseData
|
|
6221
|
+
*/
|
|
6222
|
+
updateStatisticsBaseData(options: IUpdateBaseStatisticsDataOption): void;
|
|
6223
|
+
/** 获取统计日志共用数据 getStatisticsBaseData */
|
|
6224
|
+
getStatisticsBaseData(): IBaseStatisticsData;
|
|
6225
|
+
/** 设置统计日志数据 setStatisticsData */
|
|
6226
|
+
setStatisticsData<T>(tag: StatisticsTag | string, options?: T | {
|
|
6227
|
+
[key: string]: any;
|
|
6228
|
+
}, isReset?: boolean): void;
|
|
6229
|
+
/** 获取数据 getStatisticsData */
|
|
6230
|
+
getStatisticsData<T>(tag: StatisticsTag | string): T | any;
|
|
5925
6231
|
}
|
|
5926
6232
|
|
|
5927
6233
|
declare type IEventListener = (...args: any[]) => void;
|
|
@@ -6044,8 +6350,12 @@ declare const isValidConversationType: (conversation: number) => boolean;
|
|
|
6044
6350
|
declare const isValidFileType: (fileType: number) => boolean;
|
|
6045
6351
|
/**
|
|
6046
6352
|
* 判断是否是一个合法的消息扩展
|
|
6353
|
+
* @param expansion {[key: string]: string}
|
|
6354
|
+
* @returns IIsValidExpansion
|
|
6047
6355
|
*/
|
|
6048
|
-
declare const isValidExpansion: (expansion:
|
|
6356
|
+
declare const isValidExpansion: (expansion: {
|
|
6357
|
+
[key: string]: string;
|
|
6358
|
+
} | undefined) => IIsValidExpansion;
|
|
6049
6359
|
|
|
6050
6360
|
/**
|
|
6051
6361
|
* 预定义的验证规则,只包含`值类型`数据验证
|
|
@@ -6240,8 +6550,8 @@ declare const STORAGE_ROOT_KEY = "RCV4-";
|
|
|
6240
6550
|
*/
|
|
6241
6551
|
declare const MAX_MESSAGE_EXPANSION_KEY_LENGTH = 32;
|
|
6242
6552
|
/**
|
|
6243
|
-
|
|
6244
|
-
|
|
6553
|
+
* 消息扩展字段 value 长度限制
|
|
6554
|
+
*/
|
|
6245
6555
|
declare const MAX_MESSAGE_EXPANSION_VAL_LENGTH: number;
|
|
6246
6556
|
declare const SEND_MESSAGE_TYPE_OPTION: {
|
|
6247
6557
|
[key: string]: {
|
|
@@ -6276,4 +6586,4 @@ declare enum CONNECTION_TYPE {
|
|
|
6276
6586
|
*/
|
|
6277
6587
|
declare const version: string;
|
|
6278
6588
|
|
|
6279
|
-
export { AEngine, ANavi, APIContext, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType as ChatroomMemberChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, 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, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, 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, 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, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, ItypingStateListener, KVString, LiveRole, LiveType, LogLevel, LogType, 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, NotificationStatus, OperateStatus, PING_REQ_TIMEOUT, PUBLIC_CLOUD_NAVI_URIS, PluginContext, RCAssertError, 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, forEach, formatConnectResponseCode, getBrowser, getMimeKey, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, todo, usingCppEngine, validate, version };
|
|
6589
|
+
export { AEngine, ANavi, APIContext, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType as ChatroomMemberChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, 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, 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, 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, LogType, 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, OperateStatus, PING_REQ_TIMEOUT, PUBLIC_CLOUD_NAVI_URIS, PluginContext, RCAssertError, 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, forEach, formatConnectResponseCode, getBrowser, getMimeKey, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, todo, usingCppEngine, validate, version };
|