@rongcloud/engine 5.2.5-alpha.1 → 5.3.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/{dist/index.d.ts → index.d.ts} +334 -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,37 @@ interface IRecallMsgOptions {
|
|
|
821
816
|
* 移动端推送配置
|
|
822
817
|
*/
|
|
823
818
|
pushConfig?: IPushConfig;
|
|
819
|
+
/**
|
|
820
|
+
* 其他拓展信息
|
|
821
|
+
*/
|
|
822
|
+
extra?: string;
|
|
823
|
+
/**
|
|
824
|
+
* 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
|
|
825
|
+
*/
|
|
826
|
+
isDelete?: boolean;
|
|
827
|
+
}
|
|
828
|
+
interface IRecallMsgContent {
|
|
829
|
+
conversationType: number;
|
|
830
|
+
targetId: string;
|
|
831
|
+
sentTime: number;
|
|
832
|
+
messageUId: string;
|
|
833
|
+
/**
|
|
834
|
+
* 会话组织机构标识
|
|
835
|
+
* 默认值未 空字符串
|
|
836
|
+
*/
|
|
837
|
+
channelId: string;
|
|
838
|
+
/**
|
|
839
|
+
* 其他拓展信息
|
|
840
|
+
*/
|
|
841
|
+
extra?: string;
|
|
842
|
+
/**
|
|
843
|
+
* 发送消息携带的用户信息
|
|
844
|
+
*/
|
|
845
|
+
user?: IUserProfile;
|
|
846
|
+
/**
|
|
847
|
+
* 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
|
|
848
|
+
*/
|
|
849
|
+
isDelete?: boolean;
|
|
824
850
|
}
|
|
825
851
|
/**
|
|
826
852
|
* 发送消息时的可选项信息
|
|
@@ -1602,6 +1628,39 @@ declare enum ErrorCode {
|
|
|
1602
1628
|
CHATROOM_KV_STORE_OUT_LIMIT = 23429
|
|
1603
1629
|
}
|
|
1604
1630
|
|
|
1631
|
+
/**
|
|
1632
|
+
* @desc 原: NotificationStatus 已废弃
|
|
1633
|
+
*/
|
|
1634
|
+
declare enum NotificationLevel {
|
|
1635
|
+
/**
|
|
1636
|
+
* 全部消息通知(接收全部消息通知 -- 显示指定关闭免打扰功能)
|
|
1637
|
+
*/
|
|
1638
|
+
ALL_MESSAGE = -1,
|
|
1639
|
+
/**
|
|
1640
|
+
* 未设置(向上查询群或者APP级别设置)// 存量数据中 0 表示未设置
|
|
1641
|
+
*/
|
|
1642
|
+
NOT_SET = 0,
|
|
1643
|
+
/**
|
|
1644
|
+
* 群聊超级群仅 @ 消息通知(现在通知)单聊代表全部消息通知
|
|
1645
|
+
*/
|
|
1646
|
+
AT_MESSAGE_NOTIFICATION = 1,
|
|
1647
|
+
/**
|
|
1648
|
+
* @ 指定用户通知
|
|
1649
|
+
*/
|
|
1650
|
+
AT_USER_NOTIFICATION = 2,
|
|
1651
|
+
/**
|
|
1652
|
+
* @ 群用户组通知,通知用户组暂未实现,暂不暴露出去
|
|
1653
|
+
*/
|
|
1654
|
+
/**
|
|
1655
|
+
* @ 群全员通知
|
|
1656
|
+
*/
|
|
1657
|
+
AT_GROUP_ALL_USER_NOTIFICATION = 4,
|
|
1658
|
+
/**
|
|
1659
|
+
* 消息通知被屏蔽,即不接收消息通知
|
|
1660
|
+
*/
|
|
1661
|
+
NOT_MESSAGE_NOTIFICATION = 5
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1605
1664
|
/**
|
|
1606
1665
|
* 音视频模式
|
|
1607
1666
|
*/
|
|
@@ -1676,6 +1735,9 @@ declare enum RTCJoinType {
|
|
|
1676
1735
|
COEXIST = 2
|
|
1677
1736
|
}
|
|
1678
1737
|
|
|
1738
|
+
/**
|
|
1739
|
+
* @deprecated 已废弃,请使用 NotificationLevel
|
|
1740
|
+
*/
|
|
1679
1741
|
declare enum NotificationStatus {
|
|
1680
1742
|
/**
|
|
1681
1743
|
* 免打扰已开启
|
|
@@ -1738,6 +1800,7 @@ interface IReceivedConversation {
|
|
|
1738
1800
|
* 2. 未开启免打扰
|
|
1739
1801
|
*/
|
|
1740
1802
|
notificationStatus: NotificationStatus;
|
|
1803
|
+
notificationLevel?: NotificationLevel;
|
|
1741
1804
|
/**
|
|
1742
1805
|
* 会话是否已置顶
|
|
1743
1806
|
*/
|
|
@@ -1767,6 +1830,7 @@ interface ISetConversationStatusOptions {
|
|
|
1767
1830
|
targetId: string;
|
|
1768
1831
|
isTop?: boolean;
|
|
1769
1832
|
notificationStatus?: number;
|
|
1833
|
+
notificationLevel?: number;
|
|
1770
1834
|
channelId?: string;
|
|
1771
1835
|
}
|
|
1772
1836
|
interface IUpdatedConversation {
|
|
@@ -1793,6 +1857,7 @@ interface IUpdatedConversation {
|
|
|
1793
1857
|
};
|
|
1794
1858
|
lastUnreadTime?: number;
|
|
1795
1859
|
notificationStatus?: number;
|
|
1860
|
+
notificationLevel?: number;
|
|
1796
1861
|
isTop?: boolean;
|
|
1797
1862
|
/**
|
|
1798
1863
|
* 会话标识
|
|
@@ -1814,6 +1879,11 @@ interface IConversationState extends IBaseConversationInfo {
|
|
|
1814
1879
|
unreadCount: number;
|
|
1815
1880
|
unreadMentionedCount: number;
|
|
1816
1881
|
}
|
|
1882
|
+
/** 指定超级群会话传参 */
|
|
1883
|
+
interface IUltraGroupOption {
|
|
1884
|
+
targetId: string;
|
|
1885
|
+
channelId?: string;
|
|
1886
|
+
}
|
|
1817
1887
|
|
|
1818
1888
|
/**
|
|
1819
1889
|
* 导航信息数据就结构
|
|
@@ -2405,6 +2475,18 @@ interface IResponse {
|
|
|
2405
2475
|
status: number;
|
|
2406
2476
|
data?: string;
|
|
2407
2477
|
}
|
|
2478
|
+
/**
|
|
2479
|
+
* 网络状态枚举
|
|
2480
|
+
*/
|
|
2481
|
+
declare enum NetworkType {
|
|
2482
|
+
WIFI = "wifi",
|
|
2483
|
+
FOUR_G = "4g",
|
|
2484
|
+
THREE_G = "3g",
|
|
2485
|
+
TWO_G = "2g",
|
|
2486
|
+
FIVE_G = "2g",
|
|
2487
|
+
THREE_GENT = "3gnet",
|
|
2488
|
+
UNKONWN = "unknown"
|
|
2489
|
+
}
|
|
2408
2490
|
interface IWebSocket {
|
|
2409
2491
|
/**
|
|
2410
2492
|
* 监听连接建立事件,此时 WebSocket 实例已准备好收发数据
|
|
@@ -2483,6 +2565,11 @@ interface IRuntime {
|
|
|
2483
2565
|
* 在某些非浏览器平台,其等同于 localStorage
|
|
2484
2566
|
*/
|
|
2485
2567
|
sessionStorage: IStorage;
|
|
2568
|
+
/**
|
|
2569
|
+
* 获取网络状态
|
|
2570
|
+
* 2g 3g 4g wifi unkown
|
|
2571
|
+
*/
|
|
2572
|
+
getNetworkType(): Promise<NetworkType>;
|
|
2486
2573
|
}
|
|
2487
2574
|
|
|
2488
2575
|
/**
|
|
@@ -2868,6 +2955,10 @@ declare enum LogLevel {
|
|
|
2868
2955
|
* 4
|
|
2869
2956
|
*/
|
|
2870
2957
|
FATAL = 4,
|
|
2958
|
+
/**
|
|
2959
|
+
* 统计日志类型
|
|
2960
|
+
*/
|
|
2961
|
+
STATISTICS = 6,
|
|
2871
2962
|
/**
|
|
2872
2963
|
* 不展示任何日志
|
|
2873
2964
|
*/
|
|
@@ -3574,6 +3665,14 @@ interface IExpansionListenerData {
|
|
|
3574
3665
|
updatedExpansion?: IUpdatedExpansion;
|
|
3575
3666
|
deletedExpansion?: IDeletedExpansion;
|
|
3576
3667
|
}
|
|
3668
|
+
/**
|
|
3669
|
+
* 扩展信息校验返回
|
|
3670
|
+
*/
|
|
3671
|
+
interface IIsValidExpansion {
|
|
3672
|
+
isExceedLimit: boolean;
|
|
3673
|
+
isIllgalEx: boolean;
|
|
3674
|
+
isExKeyOrValLengthExceedLimit: boolean;
|
|
3675
|
+
}
|
|
3577
3676
|
|
|
3578
3677
|
/**
|
|
3579
3678
|
* typing相关接口
|
|
@@ -3690,7 +3789,7 @@ declare class DataCodec {
|
|
|
3690
3789
|
*/
|
|
3691
3790
|
private _formatUserSetting;
|
|
3692
3791
|
/**
|
|
3693
|
-
* 格式化 会话状态
|
|
3792
|
+
* 格式化 会话状态 置顶、免打扰
|
|
3694
3793
|
*/
|
|
3695
3794
|
private _formatConversationStatus;
|
|
3696
3795
|
/**
|
|
@@ -3823,6 +3922,18 @@ declare class DataCodec {
|
|
|
3823
3922
|
* @param order 排序方式
|
|
3824
3923
|
*/
|
|
3825
3924
|
encodeGetChatRoomInfo(count: number, order: number): any[];
|
|
3925
|
+
/**
|
|
3926
|
+
* 设置指定超级群默认通知配置
|
|
3927
|
+
* @param notificationLevel
|
|
3928
|
+
* * NotificationLevel
|
|
3929
|
+
* @param channelId 超级群频道 Id
|
|
3930
|
+
*/
|
|
3931
|
+
encodeSetUltraGroupDefaultNotificationLevel(notificationLevel: NotificationLevel, channelId: string): any;
|
|
3932
|
+
/**
|
|
3933
|
+
* 查询指定超级群默认通知配置
|
|
3934
|
+
* @param channelId 频道 ID
|
|
3935
|
+
*/
|
|
3936
|
+
encodeGetUltraGroupDefaultNotificationLevel(channelId: string): any;
|
|
3826
3937
|
/**
|
|
3827
3938
|
* 上传文件认证信息获取
|
|
3828
3939
|
*/
|
|
@@ -4206,6 +4317,10 @@ interface IAPIContextOption {
|
|
|
4206
4317
|
* IMLib 版本号
|
|
4207
4318
|
*/
|
|
4208
4319
|
apiVersion: string;
|
|
4320
|
+
/**
|
|
4321
|
+
* IMLib 包名
|
|
4322
|
+
*/
|
|
4323
|
+
apiPKGName?: string;
|
|
4209
4324
|
/**
|
|
4210
4325
|
* 自定义导航地址:
|
|
4211
4326
|
* 1. 私有云环境下该值为必填项
|
|
@@ -4278,6 +4393,7 @@ declare class APIContext {
|
|
|
4278
4393
|
readonly coreVersion: string;
|
|
4279
4394
|
readonly appkey: string;
|
|
4280
4395
|
readonly apiVersion: string;
|
|
4396
|
+
readonly apiPKGName: string;
|
|
4281
4397
|
private readonly _options;
|
|
4282
4398
|
private _versionInfo;
|
|
4283
4399
|
private _typingInfo;
|
|
@@ -4501,6 +4617,20 @@ declare class APIContext {
|
|
|
4501
4617
|
* 获取第一个未读消息
|
|
4502
4618
|
*/
|
|
4503
4619
|
getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<IReceivedMessage | null>>;
|
|
4620
|
+
/**
|
|
4621
|
+
* 设置会话免打扰
|
|
4622
|
+
* 原: setConversationStatus 已废弃
|
|
4623
|
+
* 是否免打扰
|
|
4624
|
+
* * -1: 全部消息通知(接收全部消息通知 -- 显示指定关闭免打扰功能)
|
|
4625
|
+
* * 0: 未设置(向上查询群或者APP级别设置)//存量数据中0表示未设置
|
|
4626
|
+
* * 1: 群聊超级群仅@消息通知(现在通知)单聊代表全部消息通知
|
|
4627
|
+
* * 2: @ 指定用户通知
|
|
4628
|
+
* * 3: @ 群用户组通知,通知用户组暂未实现,暂不暴露出去
|
|
4629
|
+
* * 4: @ 群全员通知
|
|
4630
|
+
* * 5: 消息通知被屏蔽,即不接收消息通知
|
|
4631
|
+
* @desc 注意单聊的 level 只有 -1、0、1
|
|
4632
|
+
*/
|
|
4633
|
+
setConversationNotificationLevel(conversationType: ConversationType, targetId: string, notificationLevel?: NotificationLevel, channelId?: string): Promise<ErrorCode>;
|
|
4504
4634
|
setConversationStatus(conversationType: ConversationType, targetId: string, isTop?: boolean, notificationStatus?: 1 | 2, channelId?: string): Promise<ErrorCode>;
|
|
4505
4635
|
saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string, channelId?: string): Promise<ErrorCode>;
|
|
4506
4636
|
getConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<string>>;
|
|
@@ -4756,6 +4886,18 @@ declare class APIContext {
|
|
|
4756
4886
|
* @param targetId
|
|
4757
4887
|
*/
|
|
4758
4888
|
getUltraGroupUnreadMentionedCountByTargetId(targetId: string): Promise<IAsyncRes<number>>;
|
|
4889
|
+
/**
|
|
4890
|
+
* 获取指定超级群所有频道未读数
|
|
4891
|
+
* @param targetId 超级群 Id
|
|
4892
|
+
* @returns 未读数
|
|
4893
|
+
*/
|
|
4894
|
+
getUltraGroupUnreadCountByTargetId(targetId: string): Promise<IAsyncRes<number>>;
|
|
4895
|
+
/**
|
|
4896
|
+
* 超级群类型未读数
|
|
4897
|
+
* @param isMentioned 是否是 @ 消息,默认为 false
|
|
4898
|
+
* @returns 未读数
|
|
4899
|
+
*/
|
|
4900
|
+
getAllUltraGroupUnreadCount(isMentioned?: boolean): Promise<IAsyncRes<number>>;
|
|
4759
4901
|
getAllConversationState(): Promise<IAsyncRes<IConversationState[]>>;
|
|
4760
4902
|
/**
|
|
4761
4903
|
* 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
|
|
@@ -4847,6 +4989,22 @@ declare class APIContext {
|
|
|
4847
4989
|
}>>;
|
|
4848
4990
|
getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId?: string): IReceivedMessage[];
|
|
4849
4991
|
clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<ErrorCode>;
|
|
4992
|
+
/**
|
|
4993
|
+
* 查询指定超级群默认通知配置
|
|
4994
|
+
*/
|
|
4995
|
+
getUltraGroupDefaultNotificationLevel(targetId: string, channelId?: string): Promise<IAsyncRes<NotificationLevel>>;
|
|
4996
|
+
/**
|
|
4997
|
+
* 设置指定超级群默认通知配置
|
|
4998
|
+
* @param targetId 指定超级群 Id
|
|
4999
|
+
* @param notificationLevel 超级群通知级别
|
|
5000
|
+
* * NotificationLevel
|
|
5001
|
+
* @param channelId 指定超级群指定频道 Id
|
|
5002
|
+
*/
|
|
5003
|
+
setUltraGroupDefaultNotificationLevel(targetId: string, notificationLevel: NotificationLevel, channelId?: string): Promise<IAsyncRes<void>>;
|
|
5004
|
+
/**
|
|
5005
|
+
* 获取会话免打扰状态
|
|
5006
|
+
*/
|
|
5007
|
+
getConversationNotificationLevel(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<NotificationLevel>>;
|
|
4850
5008
|
/**
|
|
4851
5009
|
* 获取会话免打扰状态
|
|
4852
5010
|
*/
|
|
@@ -5590,6 +5748,18 @@ declare abstract class AEngine implements IEngine {
|
|
|
5590
5748
|
* @param targetId
|
|
5591
5749
|
*/
|
|
5592
5750
|
abstract getUltraGroupUnreadMentionedCountByTargetId(targetId: string): Promise<IAsyncRes<number>>;
|
|
5751
|
+
/**
|
|
5752
|
+
* 获取指定超级群所有子频道未读数
|
|
5753
|
+
* @param targetId 超级群 Id
|
|
5754
|
+
* @returns 未读数
|
|
5755
|
+
*/
|
|
5756
|
+
abstract getUltraGroupUnreadCountByTargetId(targetId: string): IPromiseResult<number>;
|
|
5757
|
+
/**
|
|
5758
|
+
* 超级群类型未读数
|
|
5759
|
+
* @param isMentioned 是否是 @ 消息
|
|
5760
|
+
* @returns 未读数
|
|
5761
|
+
*/
|
|
5762
|
+
abstract getAllUltraGroupUnreadCount(isMentioned?: boolean): Promise<IAsyncRes<number>>;
|
|
5593
5763
|
/**
|
|
5594
5764
|
* 超级群消息发送
|
|
5595
5765
|
* @param targetId
|
|
@@ -5720,9 +5890,27 @@ declare abstract class AEngine implements IEngine {
|
|
|
5720
5890
|
*/
|
|
5721
5891
|
abstract clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
|
|
5722
5892
|
/**
|
|
5723
|
-
*
|
|
5893
|
+
* 设置指定超级群默认通知配置
|
|
5894
|
+
* @param targetId 指定超级群 Id
|
|
5895
|
+
* @param notificationLevel 超级群通知级别
|
|
5896
|
+
* * NotificationLevel
|
|
5897
|
+
* @param channelId 指定超级群指定频道 Id
|
|
5898
|
+
*/
|
|
5899
|
+
abstract setUltraGroupDefaultNotificationLevel(targetId: string, notificationLevel: NotificationLevel, channelId: string): IPromiseResult<void>;
|
|
5900
|
+
/**
|
|
5901
|
+
* 查询指定超级群默认通知配置
|
|
5902
|
+
*/
|
|
5903
|
+
abstract getUltraGroupDefaultNotificationLevel(targetId: string, channelId: string): IPromiseResult<NotificationLevel>;
|
|
5904
|
+
/**
|
|
5905
|
+
* 获取会话免打扰状态
|
|
5906
|
+
* @deprecated 已废弃,请使用 getConversationNotificationLevel
|
|
5724
5907
|
*/
|
|
5725
5908
|
abstract getConversationNotificationStatus(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<NotificationStatus>;
|
|
5909
|
+
/**
|
|
5910
|
+
* 获取会话免打扰状态
|
|
5911
|
+
* 旧:getConversationNotificationStatus
|
|
5912
|
+
*/
|
|
5913
|
+
abstract getConversationNotificationLevel(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<NotificationLevel>;
|
|
5726
5914
|
/**
|
|
5727
5915
|
* 协议栈获取远端历史消息
|
|
5728
5916
|
*/
|
|
@@ -5839,6 +6027,98 @@ interface IRealTimeLog {
|
|
|
5839
6027
|
content: string;
|
|
5840
6028
|
}
|
|
5841
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
|
+
|
|
5842
6122
|
declare class Logger {
|
|
5843
6123
|
readonly tag: string;
|
|
5844
6124
|
readonly type?: LogType | undefined;
|
|
@@ -5922,6 +6202,40 @@ declare class Logger {
|
|
|
5922
6202
|
*/
|
|
5923
6203
|
setStdout(stdout?: (level: LogLevel, msgTag: string, ...args: any[]) => void): void;
|
|
5924
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;
|
|
5925
6239
|
}
|
|
5926
6240
|
|
|
5927
6241
|
declare type IEventListener = (...args: any[]) => void;
|
|
@@ -6044,8 +6358,12 @@ declare const isValidConversationType: (conversation: number) => boolean;
|
|
|
6044
6358
|
declare const isValidFileType: (fileType: number) => boolean;
|
|
6045
6359
|
/**
|
|
6046
6360
|
* 判断是否是一个合法的消息扩展
|
|
6361
|
+
* @param expansion {[key: string]: string}
|
|
6362
|
+
* @returns IIsValidExpansion
|
|
6047
6363
|
*/
|
|
6048
|
-
declare const isValidExpansion: (expansion:
|
|
6364
|
+
declare const isValidExpansion: (expansion: {
|
|
6365
|
+
[key: string]: string;
|
|
6366
|
+
} | undefined) => IIsValidExpansion;
|
|
6049
6367
|
|
|
6050
6368
|
/**
|
|
6051
6369
|
* 预定义的验证规则,只包含`值类型`数据验证
|
|
@@ -6231,6 +6549,10 @@ declare const MAX_MESSAGE_CONTENT_BYTES: number;
|
|
|
6231
6549
|
* IM Comet 发送 pullmsg(嗅探 + 等待信令) 超时时间 45s
|
|
6232
6550
|
*/
|
|
6233
6551
|
declare const IM_COMET_PULLMSG_TIMEOUT = 45000;
|
|
6552
|
+
/**
|
|
6553
|
+
* IM 加入聊天室后定时拉取消息和 KV 时间间隔
|
|
6554
|
+
*/
|
|
6555
|
+
declare const IM_CHATROOM_PULL_INTERVAL_TIME: number;
|
|
6234
6556
|
/**
|
|
6235
6557
|
* storage key 使用的前缀
|
|
6236
6558
|
*/
|
|
@@ -6240,8 +6562,8 @@ declare const STORAGE_ROOT_KEY = "RCV4-";
|
|
|
6240
6562
|
*/
|
|
6241
6563
|
declare const MAX_MESSAGE_EXPANSION_KEY_LENGTH = 32;
|
|
6242
6564
|
/**
|
|
6243
|
-
|
|
6244
|
-
|
|
6565
|
+
* 消息扩展字段 value 长度限制
|
|
6566
|
+
*/
|
|
6245
6567
|
declare const MAX_MESSAGE_EXPANSION_VAL_LENGTH: number;
|
|
6246
6568
|
declare const SEND_MESSAGE_TYPE_OPTION: {
|
|
6247
6569
|
[key: string]: {
|
|
@@ -6276,4 +6598,4 @@ declare enum CONNECTION_TYPE {
|
|
|
6276
6598
|
*/
|
|
6277
6599
|
declare const version: string;
|
|
6278
6600
|
|
|
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 };
|
|
6601
|
+
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_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, 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 };
|