@rongcloud/engine 5.8.6-alpha.2 → 5.9.0-alpha.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/index.d.ts +379 -34
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -263,10 +263,20 @@ interface IChatroomRejoinedSuccessed extends IChatroomJoinResponse {
|
|
|
263
263
|
* @category Interface
|
|
264
264
|
*/
|
|
265
265
|
interface IChatroomUserChangeInfo {
|
|
266
|
+
/**
|
|
267
|
+
* 加入、退出的成员列表
|
|
268
|
+
*/
|
|
266
269
|
users: {
|
|
267
270
|
[userId: string]: ChatroomUserChangeType;
|
|
268
271
|
};
|
|
272
|
+
/**
|
|
273
|
+
* 聊天室 ID
|
|
274
|
+
*/
|
|
269
275
|
chatroomId: string;
|
|
276
|
+
/**
|
|
277
|
+
* 聊天室成员人数
|
|
278
|
+
*/
|
|
279
|
+
memberCount: number;
|
|
270
280
|
}
|
|
271
281
|
/**
|
|
272
282
|
* @category Interface
|
|
@@ -824,6 +834,30 @@ declare enum ErrorCode {
|
|
|
824
834
|
* @since 5.8.2
|
|
825
835
|
*/
|
|
826
836
|
SYS_CONVERSATION_NOT_SUPPORT_MESSAGE = 20109,
|
|
837
|
+
/**
|
|
838
|
+
* 服务端未知错误
|
|
839
|
+
*/
|
|
840
|
+
RC_SERVER_UNKOWN_ERROR = 25104,
|
|
841
|
+
/**
|
|
842
|
+
* 未开通已读 V4
|
|
843
|
+
*/
|
|
844
|
+
RC_READ_RECEIPT_V4_INVALID = 26005,
|
|
845
|
+
/**
|
|
846
|
+
* 未开通会话驱动
|
|
847
|
+
*/
|
|
848
|
+
RC_SERVER_DRIVE_UNREAD_COUNT_INVALID = 26006,
|
|
849
|
+
/**
|
|
850
|
+
* 消息 UID 传反
|
|
851
|
+
*/
|
|
852
|
+
RC_SERVER_PARAMETER_MESSAGEUIDS_CONFUSED = 26007,
|
|
853
|
+
/**
|
|
854
|
+
* 会话 UID 不合法
|
|
855
|
+
*/
|
|
856
|
+
RC_SERVER_PARAMETER_MESSAGEUID_INVALID = 26009,
|
|
857
|
+
/**
|
|
858
|
+
* 参数错误
|
|
859
|
+
*/
|
|
860
|
+
RC_SERVER_PARAMETER_INVALID = 26010,
|
|
827
861
|
/**
|
|
828
862
|
* 发送消息频率过高,1 秒钟最多只允许发送 5 条消息
|
|
829
863
|
*/
|
|
@@ -1432,6 +1466,16 @@ declare enum ErrorCode {
|
|
|
1432
1466
|
* 设置的代理地址不可用
|
|
1433
1467
|
*/
|
|
1434
1468
|
RC_CONN_PROXY_UNAVAILABLE = 34245,
|
|
1469
|
+
/**
|
|
1470
|
+
* 不支持V4已读回执功能
|
|
1471
|
+
* @since 5.9.0
|
|
1472
|
+
*/
|
|
1473
|
+
READ_RECEIPT_V4_NOT_SUPPORT = 34292,
|
|
1474
|
+
/**
|
|
1475
|
+
* 不支持更新v4已读回执信息
|
|
1476
|
+
* @since 5.9.0
|
|
1477
|
+
*/
|
|
1478
|
+
READ_RECEIPT_V4_UPDATE_NOT_SUPPORT = 34293,
|
|
1435
1479
|
/**
|
|
1436
1480
|
* 方法未支持
|
|
1437
1481
|
*/
|
|
@@ -1725,7 +1769,15 @@ declare enum ErrorCode {
|
|
|
1725
1769
|
* cookie被禁用
|
|
1726
1770
|
* @deprecated
|
|
1727
1771
|
*/
|
|
1728
|
-
COOKIE_ENABLE = 51001
|
|
1772
|
+
COOKIE_ENABLE = 51001,
|
|
1773
|
+
/**
|
|
1774
|
+
* 子进程意外终止,如果是已连接状态,SDK 会自动重连
|
|
1775
|
+
*/
|
|
1776
|
+
SUB_PROCESS_EXIT = 34289,
|
|
1777
|
+
/**
|
|
1778
|
+
* addon 模块不存在
|
|
1779
|
+
*/
|
|
1780
|
+
ADDON_NOT_EXIST = 34290
|
|
1729
1781
|
}
|
|
1730
1782
|
|
|
1731
1783
|
/**
|
|
@@ -1894,6 +1946,10 @@ declare enum MessageType {
|
|
|
1894
1946
|
* 合并转发消息
|
|
1895
1947
|
*/
|
|
1896
1948
|
COMBINE = "RC:CombineMsg",
|
|
1949
|
+
/**
|
|
1950
|
+
* 合并转发消息 v2 版本
|
|
1951
|
+
*/
|
|
1952
|
+
COMBINE_V2 = "RC:CombineV2Msg",
|
|
1897
1953
|
/**
|
|
1898
1954
|
* 聊天室 KV 通知消息
|
|
1899
1955
|
*/
|
|
@@ -1939,9 +1995,13 @@ declare enum MessageType {
|
|
|
1939
1995
|
*/
|
|
1940
1996
|
SYNC_READ_STATUS = "RC:SRSMsg",
|
|
1941
1997
|
/**
|
|
1942
|
-
* 接受群已读回执更新消息(导航开关grpRRVer
|
|
1998
|
+
* 接受群已读回执更新消息(导航开关grpRRVer = 1时使用)
|
|
1943
1999
|
*/
|
|
1944
2000
|
GROUP_READ_RECEIPT_REQUEST = "RC:RRMsg",
|
|
2001
|
+
/**
|
|
2002
|
+
* 已读回执消息(V4)(导航开关grpRRVer = 3 时使用),支持单群聊
|
|
2003
|
+
*/
|
|
2004
|
+
READ_STATE = "RC:RSMsg",
|
|
1945
2005
|
/**
|
|
1946
2006
|
* 消息送达报告,仅单聊
|
|
1947
2007
|
*/
|
|
@@ -1950,14 +2010,6 @@ declare enum MessageType {
|
|
|
1950
2010
|
* 消息送达状态报告,仅群聊
|
|
1951
2011
|
*/
|
|
1952
2012
|
DELIVERED_MSG = "RC:DRMsg",
|
|
1953
|
-
/**
|
|
1954
|
-
* 用户加入聊天室
|
|
1955
|
-
*/
|
|
1956
|
-
CHATROOM_JOIN = "RC:ChrmJoinNtf",
|
|
1957
|
-
/**
|
|
1958
|
-
* 用户退出聊天室
|
|
1959
|
-
*/
|
|
1960
|
-
CHATROOM_LEFT = "RC:ChrmQuitNtf",
|
|
1961
2013
|
/**
|
|
1962
2014
|
* 用户加入退出聊天室的集合
|
|
1963
2015
|
*/
|
|
@@ -2209,6 +2261,14 @@ declare enum LogTagId {
|
|
|
2209
2261
|
A_CALLBACK_O = "A-callback-O",
|
|
2210
2262
|
A_CALLBACK_E = "A-callback-E",
|
|
2211
2263
|
L_CALLBACK_E = "L-callback-E",
|
|
2264
|
+
A_SEND_MESSAGE_READ_RECEIPT_V4_T = "A-send_message_read_receipt_V4-T",
|
|
2265
|
+
A_SEND_MESSAGE_READ_RECEIPT_V4_R = "A-send_message_read_receipt_V4-R",
|
|
2266
|
+
A_GET_MESSAGE_READ_RECEIPT_V4_T = "A-get_message_read_receipt_V4-T",
|
|
2267
|
+
A_GET_MESSAGE_READ_RECEIPT_V4_R = "A-get_message_read_receipt_V4-R",
|
|
2268
|
+
A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T = "A-batch_get_message_read_receipt_info_V4-T",
|
|
2269
|
+
A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R = "A-batch_get_message_read_receipt_info_V4-R",
|
|
2270
|
+
A_SYNC_READ_STATUS_T = "A-sync_read_status-T",
|
|
2271
|
+
A_SYNC_READ_STATUS_R = "A-sync_read_status-R",
|
|
2212
2272
|
A_GET_TOP_CONVERSATION_LIST_E = "A-get_top_conversation_list-E",
|
|
2213
2273
|
/**
|
|
2214
2274
|
* PB 数据编码错误
|
|
@@ -2264,9 +2324,7 @@ declare enum LogTagId {
|
|
|
2264
2324
|
L_CLOUD_CONFIG_DATA_E = "L-cloud_config_data_error",
|
|
2265
2325
|
L_CLOUD_SET_CACHE_O = "L-cloud_set_cache-O",
|
|
2266
2326
|
L_CLOUD_GET_CACHE_O = "L-cloud_get_cache-O",
|
|
2267
|
-
L_CLOUD_MSG_NTF_O = "L-cloud_msg_ntf-O"
|
|
2268
|
-
L_PARSE_JSON_MSGS_E = "L-parse_json_messsages-E",
|
|
2269
|
-
L_PARSE_JSON_E = "L-parse_json-E"
|
|
2327
|
+
L_CLOUD_MSG_NTF_O = "L-cloud_msg_ntf-O"
|
|
2270
2328
|
}
|
|
2271
2329
|
|
|
2272
2330
|
/** 统计数据标签 */
|
|
@@ -2330,6 +2388,13 @@ declare enum EConnectProtocol {
|
|
|
2330
2388
|
HTTPS = 12
|
|
2331
2389
|
}
|
|
2332
2390
|
|
|
2391
|
+
declare enum InterruptionLevel {
|
|
2392
|
+
PASSIVE = "passive",
|
|
2393
|
+
ACTIVE = "active",
|
|
2394
|
+
TIME_SENSITIVE = "time-sensitive",
|
|
2395
|
+
CRITICAL = "critical"
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2333
2398
|
/**
|
|
2334
2399
|
* 荣耀推送级别
|
|
2335
2400
|
* LOW:资讯营销类消息
|
|
@@ -2566,6 +2631,11 @@ interface IiOSPushConfig {
|
|
|
2566
2631
|
* 和 category 对应
|
|
2567
2632
|
*/
|
|
2568
2633
|
richMediaUri?: string;
|
|
2634
|
+
/**
|
|
2635
|
+
* iOS 时效性通知:需要人们立刻注意的通知,类似账户安全问题或快递动态
|
|
2636
|
+
* @since 5.9.0 版本开始支持
|
|
2637
|
+
*/
|
|
2638
|
+
interruptionLevel?: InterruptionLevel;
|
|
2569
2639
|
}
|
|
2570
2640
|
/**
|
|
2571
2641
|
* @category Interface
|
|
@@ -2695,6 +2765,11 @@ interface IMessageReader {
|
|
|
2695
2765
|
readTime: number;
|
|
2696
2766
|
userId: string;
|
|
2697
2767
|
}
|
|
2768
|
+
interface IMessageReadReceiptV4Response {
|
|
2769
|
+
list: IMessageReader[];
|
|
2770
|
+
readCount: number;
|
|
2771
|
+
totalCount: number;
|
|
2772
|
+
}
|
|
2698
2773
|
/**
|
|
2699
2774
|
* @category Interface
|
|
2700
2775
|
*/
|
|
@@ -2703,10 +2778,22 @@ interface IMessageReaderResponse {
|
|
|
2703
2778
|
list: IMessageReader[];
|
|
2704
2779
|
}
|
|
2705
2780
|
interface ILocalReadReceiptInfo {
|
|
2781
|
+
/**
|
|
2782
|
+
* 仅已读 V2 支持
|
|
2783
|
+
* @hidden
|
|
2784
|
+
*/
|
|
2706
2785
|
hasRespond?: boolean;
|
|
2786
|
+
/**
|
|
2787
|
+
* 仅已读 V2 支持
|
|
2788
|
+
* @hidden
|
|
2789
|
+
*/
|
|
2707
2790
|
readerInfo?: {
|
|
2708
2791
|
[userId: string]: number;
|
|
2709
2792
|
};
|
|
2793
|
+
/**
|
|
2794
|
+
* 仅已读 V4 支持
|
|
2795
|
+
*/
|
|
2796
|
+
readerList?: IMessageReader[];
|
|
2710
2797
|
readCount?: number;
|
|
2711
2798
|
totalCount?: number;
|
|
2712
2799
|
}
|
|
@@ -2715,22 +2802,74 @@ interface ILocalReadReceiptInfo {
|
|
|
2715
2802
|
*/
|
|
2716
2803
|
interface IReadReceiptInfo {
|
|
2717
2804
|
/**
|
|
2718
|
-
*
|
|
2805
|
+
* 是否已经发送已读回执, 仅 V2 支持
|
|
2806
|
+
* @hidden
|
|
2807
|
+
* @deprecated
|
|
2719
2808
|
*/
|
|
2720
2809
|
hasRespond?: boolean;
|
|
2721
2810
|
/**
|
|
2722
|
-
*
|
|
2811
|
+
* 已阅读用户列表(不准确), 仅 V2 支持
|
|
2723
2812
|
*/
|
|
2724
2813
|
readerList?: IMessageReader[];
|
|
2725
2814
|
/**
|
|
2726
|
-
*
|
|
2815
|
+
* 阅读人数
|
|
2727
2816
|
*/
|
|
2728
2817
|
readCount?: number;
|
|
2729
2818
|
/**
|
|
2730
|
-
*
|
|
2819
|
+
* 群组总人数
|
|
2731
2820
|
*/
|
|
2732
2821
|
totalCount?: number;
|
|
2733
2822
|
}
|
|
2823
|
+
/**
|
|
2824
|
+
* 已读回执事件通知数据
|
|
2825
|
+
* @category Interface
|
|
2826
|
+
* @since 5.9.0
|
|
2827
|
+
*/
|
|
2828
|
+
interface IReadReceiptData {
|
|
2829
|
+
privateReadReceipt?: IPrivateReadReceiptData;
|
|
2830
|
+
groupReadReceipt?: IGroupReadReceiptData;
|
|
2831
|
+
}
|
|
2832
|
+
/**
|
|
2833
|
+
* 单聊已读回执事件通知数据
|
|
2834
|
+
* @category Interface
|
|
2835
|
+
* @since 5.9.0
|
|
2836
|
+
*/
|
|
2837
|
+
interface IPrivateReadReceiptData extends IConversationOption {
|
|
2838
|
+
/**
|
|
2839
|
+
* 最后已读消息时间 (单聊)
|
|
2840
|
+
*/
|
|
2841
|
+
endMsgTime?: number;
|
|
2842
|
+
}
|
|
2843
|
+
/**
|
|
2844
|
+
* 群聊已读回执事件通知数据
|
|
2845
|
+
* @category Interface
|
|
2846
|
+
* @since 5.9.0
|
|
2847
|
+
*/
|
|
2848
|
+
interface IGroupReadReceiptData extends IConversationOption {
|
|
2849
|
+
/**
|
|
2850
|
+
* 已读人数 (群聊)
|
|
2851
|
+
*/
|
|
2852
|
+
readedCount?: number;
|
|
2853
|
+
/**
|
|
2854
|
+
* 消息发送时群总人数 (群聊)
|
|
2855
|
+
*/
|
|
2856
|
+
totalCount?: number;
|
|
2857
|
+
/**
|
|
2858
|
+
* 消息 UID(群聊)
|
|
2859
|
+
*/
|
|
2860
|
+
messageUId?: string;
|
|
2861
|
+
}
|
|
2862
|
+
/**
|
|
2863
|
+
* 多端同步会话已读状态事件数据
|
|
2864
|
+
* @category Interface
|
|
2865
|
+
* @since 5.9.0
|
|
2866
|
+
*/
|
|
2867
|
+
interface ISyncReadStatusData extends IConversationOption {
|
|
2868
|
+
/**
|
|
2869
|
+
* 已读消息时间
|
|
2870
|
+
*/
|
|
2871
|
+
timestamp: number;
|
|
2872
|
+
}
|
|
2734
2873
|
/**
|
|
2735
2874
|
* 从服务端接收到的消息数据
|
|
2736
2875
|
* @category Interface
|
|
@@ -2860,6 +2999,14 @@ interface IReceivedMessage {
|
|
|
2860
2999
|
*/
|
|
2861
3000
|
hasMore?: boolean;
|
|
2862
3001
|
}
|
|
3002
|
+
/**
|
|
3003
|
+
* 第一条未读消息信息
|
|
3004
|
+
* @category Interface
|
|
3005
|
+
*/
|
|
3006
|
+
interface IFirstUnreadMessageInfo {
|
|
3007
|
+
messageUId: string;
|
|
3008
|
+
sentTime: number;
|
|
3009
|
+
}
|
|
2863
3010
|
/**
|
|
2864
3011
|
* @category Interface
|
|
2865
3012
|
*/
|
|
@@ -3281,6 +3428,73 @@ interface MentionedInfoBody {
|
|
|
3281
3428
|
userIdList?: string[];
|
|
3282
3429
|
mentionedContent?: string;
|
|
3283
3430
|
}
|
|
3431
|
+
/**
|
|
3432
|
+
* 被合并的消息数据结构
|
|
3433
|
+
*/
|
|
3434
|
+
interface ICombinedMessage {
|
|
3435
|
+
/**
|
|
3436
|
+
* 消息发送者的用户 Id
|
|
3437
|
+
*/
|
|
3438
|
+
fromUserId: string;
|
|
3439
|
+
/**
|
|
3440
|
+
* 消息所属会话 Id
|
|
3441
|
+
*/
|
|
3442
|
+
targetId: string;
|
|
3443
|
+
/**
|
|
3444
|
+
* 消息发送时间
|
|
3445
|
+
*/
|
|
3446
|
+
timestamp: number;
|
|
3447
|
+
/**
|
|
3448
|
+
* 消息类型
|
|
3449
|
+
*/
|
|
3450
|
+
objectName: string;
|
|
3451
|
+
/**
|
|
3452
|
+
* 消息内容
|
|
3453
|
+
*/
|
|
3454
|
+
content: any;
|
|
3455
|
+
}
|
|
3456
|
+
/**
|
|
3457
|
+
* v2 版本合并转发消息 content 结构
|
|
3458
|
+
*/
|
|
3459
|
+
interface ICombineV2MessageContent {
|
|
3460
|
+
/**
|
|
3461
|
+
* 被合并消息的来源会话类型
|
|
3462
|
+
*/
|
|
3463
|
+
conversationType: ConversationType;
|
|
3464
|
+
/**
|
|
3465
|
+
* 合并信息摘要,建议取被合并消息中的前三条消息的内容
|
|
3466
|
+
*/
|
|
3467
|
+
summaryList: string[];
|
|
3468
|
+
/**
|
|
3469
|
+
* 名称列表,单聊时为双方的名称,群聊时为群组名称
|
|
3470
|
+
*/
|
|
3471
|
+
nameList: string[];
|
|
3472
|
+
/**
|
|
3473
|
+
* 被合并消息的条目数量
|
|
3474
|
+
*/
|
|
3475
|
+
msgNum: number;
|
|
3476
|
+
/**
|
|
3477
|
+
* 被合并消息的消息内容,仅当内容 JSON 序列化后长度小于 120K 时有值;当长度大于 120K 时,内容将被以文件的形式远端存储。
|
|
3478
|
+
*/
|
|
3479
|
+
msgList?: Array<ICombinedMessage>;
|
|
3480
|
+
/**
|
|
3481
|
+
* 被合并消息的内容 JSON 序列化后长度大于 120K 时的文件名,暂时无作用,移动端依据此字段判断是否有文件需要下载,而非 remoteUrl 字段
|
|
3482
|
+
*/
|
|
3483
|
+
jsonMsgKey?: string;
|
|
3484
|
+
/**
|
|
3485
|
+
* 远端存储文件的 URL,仅 jsonMsgKey 有值时存在
|
|
3486
|
+
*/
|
|
3487
|
+
remoteUrl?: string;
|
|
3488
|
+
}
|
|
3489
|
+
/**
|
|
3490
|
+
* @category Interface
|
|
3491
|
+
*/
|
|
3492
|
+
interface IClearMessageOption {
|
|
3493
|
+
targetId: string;
|
|
3494
|
+
conversationType: ConversationType;
|
|
3495
|
+
channelId?: string;
|
|
3496
|
+
timestamp?: number;
|
|
3497
|
+
}
|
|
3284
3498
|
|
|
3285
3499
|
interface IUpdateItem {
|
|
3286
3500
|
isTop?: {
|
|
@@ -3386,6 +3600,10 @@ interface IReceivedConversation {
|
|
|
3386
3600
|
* 会话操作时间,暂仅 Electron 平台支持
|
|
3387
3601
|
*/
|
|
3388
3602
|
operationTime?: number;
|
|
3603
|
+
/**
|
|
3604
|
+
* 会话草稿
|
|
3605
|
+
*/
|
|
3606
|
+
draft?: string;
|
|
3389
3607
|
}
|
|
3390
3608
|
/**
|
|
3391
3609
|
* @category Interface
|
|
@@ -4149,9 +4367,19 @@ interface INaviInfo {
|
|
|
4149
4367
|
*/
|
|
4150
4368
|
crypto?: string;
|
|
4151
4369
|
/**
|
|
4152
|
-
* 群组回执开关,
|
|
4370
|
+
* 群组回执开关,
|
|
4371
|
+
* 0(或者没有): 关闭 v1 版本
|
|
4372
|
+
* 1: 打开, v2 版本
|
|
4373
|
+
* 2: 废弃
|
|
4374
|
+
* 3: V4 版本,单群聊已读回执
|
|
4153
4375
|
*/
|
|
4154
4376
|
grpRRVer?: number;
|
|
4377
|
+
/**
|
|
4378
|
+
* 会话驱动类型
|
|
4379
|
+
* 0: 默认,客户端离线消息驱动计算未读数(客户端通过pullMsg结果计算)
|
|
4380
|
+
* 1: 服务端会话驱动计算未读数(调用pullSes进行初始化),暂只影响更新会话已读时间接口
|
|
4381
|
+
*/
|
|
4382
|
+
sesDriven?: number;
|
|
4155
4383
|
/**
|
|
4156
4384
|
* 防黑产开关, 1: 打开,0:关闭
|
|
4157
4385
|
*/
|
|
@@ -4488,7 +4716,11 @@ declare enum AreaCode {
|
|
|
4488
4716
|
/**
|
|
4489
4717
|
* 新增新加坡数据中心
|
|
4490
4718
|
*/
|
|
4491
|
-
SG_A = 4
|
|
4719
|
+
SG_A = 4,
|
|
4720
|
+
/**
|
|
4721
|
+
* 沙特数据中心
|
|
4722
|
+
*/
|
|
4723
|
+
SA = 5
|
|
4492
4724
|
}
|
|
4493
4725
|
|
|
4494
4726
|
interface IStaticConfigData {
|
|
@@ -4640,8 +4872,7 @@ declare class WebsocketStaticConfigManager extends BasicStaticConfigManager {
|
|
|
4640
4872
|
*/
|
|
4641
4873
|
declare class WebSocketNavi extends BasicNavi {
|
|
4642
4874
|
private runtime;
|
|
4643
|
-
|
|
4644
|
-
constructor(appkey: string, logger: BasicLogger, statisticLog: BasicStatistic, runtime: IRuntime, staticConfigManager: WebsocketStaticConfigManager, environment?: string);
|
|
4875
|
+
constructor(appkey: string, logger: BasicLogger, statisticLog: BasicStatistic, runtime: IRuntime, staticConfigManager: WebsocketStaticConfigManager);
|
|
4645
4876
|
protected httpRequest(uri: string, appkey: string, token: string, traceId: string, finished: boolean): IPromiseResult<INaviInfo>;
|
|
4646
4877
|
protected httpRequestV2(uri: string, appkey: string, token: string, traceId: string): IPromiseResult<INaviInfo>;
|
|
4647
4878
|
protected getNaviCache(formatedToken: string): INaviCache | null;
|
|
@@ -4978,6 +5209,7 @@ interface IProcessCache {
|
|
|
4978
5209
|
naviInfo: INaviInfo | null;
|
|
4979
5210
|
connectionStatus: RCConnectionStatus;
|
|
4980
5211
|
deviceId: string;
|
|
5212
|
+
deltaTime: number;
|
|
4981
5213
|
}
|
|
4982
5214
|
/**
|
|
4983
5215
|
* 约束主进程 CppEngine 与 CppService 间的方法定义,以便于代码检查
|
|
@@ -4986,7 +5218,7 @@ interface IEngine {
|
|
|
4986
5218
|
/**
|
|
4987
5219
|
* 注册本渲染进程至主进程,以接收主进程的消息通知,同时同步主进程的当前缓存数据
|
|
4988
5220
|
*/
|
|
4989
|
-
getMainProcessCache(): IProcessCache
|
|
5221
|
+
getMainProcessCache(): Promise<IProcessCache>;
|
|
4990
5222
|
/**
|
|
4991
5223
|
* 建立连接
|
|
4992
5224
|
* @param token
|
|
@@ -5125,6 +5357,7 @@ interface IEngine {
|
|
|
5125
5357
|
* @param targetId
|
|
5126
5358
|
*/
|
|
5127
5359
|
removeConversation(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
5360
|
+
batchRemoveConversation(conversations: IConversationOption[]): Promise<ErrorCode>;
|
|
5128
5361
|
/**
|
|
5129
5362
|
* 获取所有会话未读数
|
|
5130
5363
|
* @param channelId 多组织 Id
|
|
@@ -5144,6 +5377,7 @@ interface IEngine {
|
|
|
5144
5377
|
* 获取第一个未读消息
|
|
5145
5378
|
*/
|
|
5146
5379
|
getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedMessage | null>;
|
|
5380
|
+
getFirstUnreadMessageInfo(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IFirstUnreadMessageInfo | null>;
|
|
5147
5381
|
/**
|
|
5148
5382
|
* 设置/保存指定会话消息草稿
|
|
5149
5383
|
* @draft 草稿内容
|
|
@@ -5165,7 +5399,9 @@ interface IEngine {
|
|
|
5165
5399
|
* 批量设置会话 置顶、免打扰
|
|
5166
5400
|
*/
|
|
5167
5401
|
batchSetConversationStatus(statusList: ISetConversationStatusOptions[]): Promise<ErrorCode>;
|
|
5402
|
+
batchSetConversationToTop(conversations: IConversationOption[], isTop: boolean, isCreateConversation?: boolean): Promise<ErrorCode>;
|
|
5168
5403
|
setConversationNotificationLevel(conversationType: ConversationType, targetId: string, notificationLevel: NotificationLevel, channelId?: string): Promise<number>;
|
|
5404
|
+
batchSetConversationNotificationLevel(conversations: IConversationOption[], notificationLevel: NotificationLevel): Promise<ErrorCode>;
|
|
5169
5405
|
getConversationNotificationLevel(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<NotificationLevel>;
|
|
5170
5406
|
getTotalUnreadCountByLevels(conversationTypes: ConversationType[], levels: NotificationLevel[], isMentioned?: boolean): Promise<IAsyncRes<number>>;
|
|
5171
5407
|
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void, traceId?: string): IPromiseResult<IReceivedMessage>;
|
|
@@ -5329,13 +5565,25 @@ interface IEngine {
|
|
|
5329
5565
|
getTagsForConversation(conversation: IConversationOption): IPromiseResult<IConversationTag[]>;
|
|
5330
5566
|
/**
|
|
5331
5567
|
* 发送群组消息已读回执
|
|
5332
|
-
* 导航下发已读回执开关为
|
|
5568
|
+
* 导航下发已读回执开关为 1 时调用
|
|
5333
5569
|
*/
|
|
5334
5570
|
sendReadReceiptMessage(targetId: string, messageUIds: string[], channelId?: string): Promise<IAsyncRes>;
|
|
5335
5571
|
/**
|
|
5336
5572
|
* 获取群组消息已读列表
|
|
5337
5573
|
*/
|
|
5338
5574
|
getMessageReader(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
|
|
5575
|
+
/**
|
|
5576
|
+
* 发送已读回执(V4)
|
|
5577
|
+
*/
|
|
5578
|
+
sendReadReceiptMessageV4(conversation: IConversationOption, startMsgUid: string, endMsgUid: string): Promise<IAsyncRes>;
|
|
5579
|
+
/**
|
|
5580
|
+
* 获取消息已读回执列表, 暂仅支持群聊(V4)
|
|
5581
|
+
*/
|
|
5582
|
+
getMessageReadReceiptV4(conversation: IConversationOption, messageUid: string): IPromiseResult<IMessageReadReceiptV4Response>;
|
|
5583
|
+
/**
|
|
5584
|
+
* 多端同步会话的已读时间(V4)
|
|
5585
|
+
*/
|
|
5586
|
+
updateConversationReadTime(conversation: IConversationOption, timestamp: number): Promise<IAsyncRes>;
|
|
5339
5587
|
/**
|
|
5340
5588
|
* 获取服务器时间
|
|
5341
5589
|
*/
|
|
@@ -5402,6 +5650,9 @@ interface IEngine {
|
|
|
5402
5650
|
* 通过时间戳删除本地消息
|
|
5403
5651
|
*/
|
|
5404
5652
|
deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId: string): Promise<ErrorCode>;
|
|
5653
|
+
batchClearMessagesByTimestamp(options: IClearMessageOption[]): Promise<ErrorCode>;
|
|
5654
|
+
batchClearMessagesByTimestamp(options: IClearMessageOption[]): Promise<ErrorCode>;
|
|
5655
|
+
batchClearRemoteHistoryMessages(options: IClearMessageOption[], isDeleteLocal?: boolean): Promise<ErrorCode>;
|
|
5405
5656
|
/**
|
|
5406
5657
|
* 清空会话下历史消息
|
|
5407
5658
|
*/
|
|
@@ -5580,7 +5831,9 @@ interface IUpdatedExpansion {
|
|
|
5580
5831
|
[key: string]: any;
|
|
5581
5832
|
};
|
|
5582
5833
|
messageUId: string;
|
|
5583
|
-
|
|
5834
|
+
conversationType: ConversationType;
|
|
5835
|
+
targetId: string;
|
|
5836
|
+
channelId: string;
|
|
5584
5837
|
}
|
|
5585
5838
|
/**
|
|
5586
5839
|
* 扩展删除
|
|
@@ -5589,7 +5842,9 @@ interface IUpdatedExpansion {
|
|
|
5589
5842
|
interface IDeletedExpansion {
|
|
5590
5843
|
deletedKeys: string[];
|
|
5591
5844
|
messageUId: string;
|
|
5592
|
-
|
|
5845
|
+
conversationType: ConversationType;
|
|
5846
|
+
targetId: string;
|
|
5847
|
+
channelId: string;
|
|
5593
5848
|
}
|
|
5594
5849
|
/**
|
|
5595
5850
|
* 扩展变更监听
|
|
@@ -6230,6 +6485,14 @@ interface IWatcher {
|
|
|
6230
6485
|
ultraGroupChannelUserKicked?: (list: IUltraChannelUserKickedInfo[]) => void;
|
|
6231
6486
|
ultraGroupChannelDelete?: (list: IUltraChannelDeleteInfo[]) => void;
|
|
6232
6487
|
userGroupStatus?: (data: IUserGroupStatusInfo) => void;
|
|
6488
|
+
/**
|
|
6489
|
+
* 已读回执 V4
|
|
6490
|
+
*/
|
|
6491
|
+
messageReadReceipt?: (data: IReadReceiptData) => void;
|
|
6492
|
+
/**
|
|
6493
|
+
* 同步已读状态 V4
|
|
6494
|
+
*/
|
|
6495
|
+
syncReadStatus?: (data: ISyncReadStatusData) => void;
|
|
6233
6496
|
}
|
|
6234
6497
|
interface IAPIContextOption {
|
|
6235
6498
|
/**
|
|
@@ -6288,10 +6551,6 @@ interface IAPIContextOption {
|
|
|
6288
6551
|
* 日志服务地址
|
|
6289
6552
|
*/
|
|
6290
6553
|
logServerUrl?: string;
|
|
6291
|
-
/**
|
|
6292
|
-
* 私有云环境配置
|
|
6293
|
-
*/
|
|
6294
|
-
environment?: string;
|
|
6295
6554
|
}
|
|
6296
6555
|
|
|
6297
6556
|
interface IPluginGenerator<API, InitOption> {
|
|
@@ -6429,7 +6688,6 @@ declare class APIContext {
|
|
|
6429
6688
|
*/
|
|
6430
6689
|
install<T, O>(plugin: IPluginGenerator<T, O>, options: O): T | null;
|
|
6431
6690
|
private _onConnectionStatusChange;
|
|
6432
|
-
private _processChatrormMessage;
|
|
6433
6691
|
private _processChrmMemChangeMessage;
|
|
6434
6692
|
private _processTypingStatusMessage;
|
|
6435
6693
|
private _processInterceptMessage;
|
|
@@ -6528,6 +6786,8 @@ declare class APIContext {
|
|
|
6528
6786
|
private _ultraGroupChannelUserKickedListener;
|
|
6529
6787
|
private _ultraGroupChannelDeleteListener;
|
|
6530
6788
|
private _userGroupStatusListener;
|
|
6789
|
+
private _messageReadReceipt;
|
|
6790
|
+
private _syncReadStatus;
|
|
6531
6791
|
/**
|
|
6532
6792
|
* rtc 数据变更通知 pluginContext
|
|
6533
6793
|
*/
|
|
@@ -6633,6 +6893,19 @@ declare class APIContext {
|
|
|
6633
6893
|
* @param messageUIds
|
|
6634
6894
|
*/
|
|
6635
6895
|
getMessageReader(targetId: string, messageUId: string, channelId?: string): Promise<IAsyncRes<IMessageReaderResponse>>;
|
|
6896
|
+
/**
|
|
6897
|
+
* 发送已读回执(V4)
|
|
6898
|
+
*/
|
|
6899
|
+
sendReadReceiptMessageV4(conversation: IConversationOption, startMsgUid: string, endMsgUid: string): Promise<IAsyncRes>;
|
|
6900
|
+
/**
|
|
6901
|
+
* 获取消息已读回执列表, 暂仅支持群聊(V4)
|
|
6902
|
+
*/
|
|
6903
|
+
getMessageReadReceiptV4(conversation: IConversationOption, messageUid: string): IPromiseResult<IMessageReadReceiptV4Response>;
|
|
6904
|
+
batchGetMessageReadReceiptInfoV4(conversation: IConversationOption, messageUIds: string[]): IPromiseResult<IGroupReadReceiptData[]>;
|
|
6905
|
+
/**
|
|
6906
|
+
* 多端同步会话的已读时间(V4)
|
|
6907
|
+
*/
|
|
6908
|
+
updateConversationReadTime(conversation: IConversationOption, timestamp: number): Promise<IAsyncRes>;
|
|
6636
6909
|
/**
|
|
6637
6910
|
* 反初始化,清空所有监听及计时器
|
|
6638
6911
|
*/
|
|
@@ -6686,6 +6959,7 @@ declare class APIContext {
|
|
|
6686
6959
|
* 删除会话
|
|
6687
6960
|
*/
|
|
6688
6961
|
removeConversation(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
|
|
6962
|
+
batchRemoveConversation(conversations: IConversationOption[]): Promise<ErrorCode>;
|
|
6689
6963
|
/**
|
|
6690
6964
|
* 获取超级群会话列表
|
|
6691
6965
|
*/
|
|
@@ -6728,6 +7002,7 @@ declare class APIContext {
|
|
|
6728
7002
|
* 获取第一个未读消息
|
|
6729
7003
|
*/
|
|
6730
7004
|
getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<IReceivedMessage | null>>;
|
|
7005
|
+
getFirstUnreadMessageInfo(conversationType: ConversationType, targetId: string, channelId: string): Promise<IAsyncRes<IFirstUnreadMessageInfo | null>>;
|
|
6731
7006
|
/**
|
|
6732
7007
|
* 设置会话免打扰
|
|
6733
7008
|
* 原: setConversationStatus 已废弃
|
|
@@ -6740,7 +7015,9 @@ declare class APIContext {
|
|
|
6740
7015
|
* * 5: 消息通知被屏蔽,即不接收消息通知
|
|
6741
7016
|
*/
|
|
6742
7017
|
setConversationNotificationLevel(conversationType: ConversationType, targetId: string, notificationLevel?: NotificationLevel, channelId?: string): Promise<ErrorCode>;
|
|
7018
|
+
batchSetConversationNotificationLevel(conversations: IConversationOption[], notificationLevel: NotificationLevel): Promise<ErrorCode>;
|
|
6743
7019
|
setConversationStatus(conversationType: ConversationType, targetId: string, isTop?: boolean, notificationStatus?: 1 | 2, channelId?: string): Promise<ErrorCode>;
|
|
7020
|
+
batchSetConversationToTop(conversations: IConversationOption[], isTop: boolean, isCreateConversation?: boolean): Promise<ErrorCode>;
|
|
6744
7021
|
saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string, channelId?: string): Promise<ErrorCode>;
|
|
6745
7022
|
getConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<string>>;
|
|
6746
7023
|
clearConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
|
|
@@ -7105,6 +7382,11 @@ declare class APIContext {
|
|
|
7105
7382
|
* 从本地消息数据库中删除某一会话指定时间之前的消息数据
|
|
7106
7383
|
*/
|
|
7107
7384
|
deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId?: string): Promise<ErrorCode>;
|
|
7385
|
+
/**
|
|
7386
|
+
* 通过时间戳批量清除本地消息
|
|
7387
|
+
*/
|
|
7388
|
+
batchClearMessagesByTimestamp(options: IClearMessageOption[]): Promise<ErrorCode>;
|
|
7389
|
+
batchClearRemoteHistoryMessages(options: IClearMessageOption[], isDeleteLocal?: boolean): Promise<ErrorCode>;
|
|
7108
7390
|
/**
|
|
7109
7391
|
* 清空会话下历史消息
|
|
7110
7392
|
*/
|
|
@@ -7193,6 +7475,7 @@ declare class APIContext {
|
|
|
7193
7475
|
getConversationListWithAllChannelByPage(index: number, limit: number): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
7194
7476
|
clearData(): Promise<IAsyncRes<boolean>>;
|
|
7195
7477
|
createLogger(id: string, type: LogType): BasicLogger;
|
|
7478
|
+
createStatisticLogger(id: string, type: LogType): BasicStatistic;
|
|
7196
7479
|
/**
|
|
7197
7480
|
* 设置融云消息重排开关
|
|
7198
7481
|
*/
|
|
@@ -7259,7 +7542,7 @@ declare class PluginContext {
|
|
|
7259
7542
|
*/
|
|
7260
7543
|
ondestroy?(): void;
|
|
7261
7544
|
/**
|
|
7262
|
-
*
|
|
7545
|
+
* groupCall 用到
|
|
7263
7546
|
*/
|
|
7264
7547
|
onCallInfo?(data: string): void;
|
|
7265
7548
|
/**
|
|
@@ -7323,6 +7606,13 @@ declare class PluginContext {
|
|
|
7323
7606
|
* @param type 目前仅支持 `IM` 与 `RTC` 两个值
|
|
7324
7607
|
*/
|
|
7325
7608
|
createLogger(id: string, type: LogType): BasicLogger;
|
|
7609
|
+
/**
|
|
7610
|
+
* 创建埋点工具实例
|
|
7611
|
+
* @param id 埋点工具 ID,用于区分埋点实例,以确定埋点调用者身份
|
|
7612
|
+
* @param type 目前仅支持 `IM` 与 `RTC` 两个值
|
|
7613
|
+
* @description 埋点工具实例与日志工具实例的区别在于,埋点工具仅用于处理等级为 -2 的埋点数据,不会输出到控制台
|
|
7614
|
+
*/
|
|
7615
|
+
createStatisticLogger(id: string, type: LogType): BasicStatistic;
|
|
7326
7616
|
}
|
|
7327
7617
|
|
|
7328
7618
|
declare class RTCPluginContext extends PluginContext {
|
|
@@ -7554,6 +7844,14 @@ interface IEngineWatcher extends IConnectionListener {
|
|
|
7554
7844
|
callInfo: (data: string) => void;
|
|
7555
7845
|
onNaviDataChange: (naviInfo: INaviInfo) => void;
|
|
7556
7846
|
userGroupStatus: (info: IUserGroupStatusInfo) => void;
|
|
7847
|
+
/**
|
|
7848
|
+
* 已读回执 V4
|
|
7849
|
+
*/
|
|
7850
|
+
messageReadReceipt: (data: IReadReceiptData) => void;
|
|
7851
|
+
/**
|
|
7852
|
+
* 同步已读状态 V4
|
|
7853
|
+
*/
|
|
7854
|
+
syncReadStatus: (data: ISyncReadStatusData) => void;
|
|
7557
7855
|
}
|
|
7558
7856
|
/**
|
|
7559
7857
|
* 引擎定义
|
|
@@ -7594,6 +7892,7 @@ declare abstract class AEngine {
|
|
|
7594
7892
|
* 为非 engine 包创建 logger 工具实例
|
|
7595
7893
|
*/
|
|
7596
7894
|
abstract createLogger(id: string, type: LogType): BasicLogger;
|
|
7895
|
+
abstract createStatisticLogger(id: string, type: LogType): BasicStatistic;
|
|
7597
7896
|
/**
|
|
7598
7897
|
* 获取 engine 包内部 logger 工具
|
|
7599
7898
|
*/
|
|
@@ -7759,6 +8058,7 @@ declare abstract class AEngine {
|
|
|
7759
8058
|
* @param targetId
|
|
7760
8059
|
*/
|
|
7761
8060
|
abstract removeConversation(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
8061
|
+
abstract batchRemoveConversation(conversations: IConversationOption[]): Promise<ErrorCode>;
|
|
7762
8062
|
/**
|
|
7763
8063
|
* 获取所有会话未读数
|
|
7764
8064
|
* @param channelId 多组织 Id
|
|
@@ -7786,6 +8086,7 @@ declare abstract class AEngine {
|
|
|
7786
8086
|
* 获取第一个未读消息
|
|
7787
8087
|
*/
|
|
7788
8088
|
abstract getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedMessage | null>;
|
|
8089
|
+
abstract getFirstUnreadMessageInfo(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IFirstUnreadMessageInfo | null>;
|
|
7789
8090
|
/**
|
|
7790
8091
|
* 设置/保存指定会话消息草稿
|
|
7791
8092
|
* @draft 草稿内容
|
|
@@ -7807,6 +8108,7 @@ declare abstract class AEngine {
|
|
|
7807
8108
|
* 批量设置会话 置顶、免打扰
|
|
7808
8109
|
*/
|
|
7809
8110
|
abstract batchSetConversationStatus(statusList: ISetConversationStatusOptions[]): Promise<ErrorCode>;
|
|
8111
|
+
abstract batchSetConversationToTop(conversations: IConversationOption[], isTop: boolean, isCreateConversation?: boolean): Promise<ErrorCode>;
|
|
7810
8112
|
abstract sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions,
|
|
7811
8113
|
/**
|
|
7812
8114
|
* c++ 消息写库后存在自增 Id,必要时需要向业务层暴露,JSEngine 无需实现
|
|
@@ -7825,6 +8127,22 @@ declare abstract class AEngine {
|
|
|
7825
8127
|
* @param messageUIds
|
|
7826
8128
|
*/
|
|
7827
8129
|
abstract getMessageReader(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
|
|
8130
|
+
/**
|
|
8131
|
+
* 发送已读回执(V4)
|
|
8132
|
+
*/
|
|
8133
|
+
abstract sendReadReceiptMessageV4(conversation: IConversationOption, startMsgUid: string, endMsgUid: string): Promise<IAsyncRes>;
|
|
8134
|
+
/**
|
|
8135
|
+
* 获取消息已读回执列表, 暂仅支持群聊(V4)
|
|
8136
|
+
*/
|
|
8137
|
+
abstract getMessageReadReceiptV4(conversation: IConversationOption, messageUid: string): IPromiseResult<IMessageReadReceiptV4Response>;
|
|
8138
|
+
/**
|
|
8139
|
+
* 批量获取消息已读回执信息, 暂仅支持群聊(V4)
|
|
8140
|
+
*/
|
|
8141
|
+
abstract batchGetMessageReadReceiptInfoV4(conversation: IConversationOption, messageUIds: string[]): IPromiseResult<IGroupReadReceiptData[]>;
|
|
8142
|
+
/**
|
|
8143
|
+
* 多端同步会话的已读时间(V4)
|
|
8144
|
+
*/
|
|
8145
|
+
abstract updateConversationReadTime(conversation: IConversationOption, timestamp: number): Promise<IAsyncRes>;
|
|
7828
8146
|
/**
|
|
7829
8147
|
* 断开连接
|
|
7830
8148
|
* @param closeDB 是否关闭数据库,默认为 true,仅 Electron 平台有效
|
|
@@ -8156,6 +8474,11 @@ declare abstract class AEngine {
|
|
|
8156
8474
|
* 通过时间戳删除本地消息
|
|
8157
8475
|
*/
|
|
8158
8476
|
abstract deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId: string): Promise<ErrorCode>;
|
|
8477
|
+
/**
|
|
8478
|
+
* 通过时间戳批量清除本地消息
|
|
8479
|
+
*/
|
|
8480
|
+
abstract batchClearMessagesByTimestamp(options: IClearMessageOption[]): Promise<ErrorCode>;
|
|
8481
|
+
abstract batchClearRemoteHistoryMessages(options: IClearMessageOption[], isDeleteLocal?: boolean): Promise<ErrorCode>;
|
|
8159
8482
|
/**
|
|
8160
8483
|
* 清空会话下历史消息
|
|
8161
8484
|
*/
|
|
@@ -8244,6 +8567,7 @@ declare abstract class AEngine {
|
|
|
8244
8567
|
*/
|
|
8245
8568
|
abstract getConversationNotificationStatus(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<NotificationStatus>;
|
|
8246
8569
|
abstract setConversationNotificationLevel(conversationType: ConversationType, targetId: string, notificationLevel?: NotificationLevel, channelId?: string): Promise<ErrorCode>;
|
|
8570
|
+
abstract batchSetConversationNotificationLevel(conversations: IConversationOption[], notificationLevel: NotificationLevel): Promise<ErrorCode>;
|
|
8247
8571
|
/**
|
|
8248
8572
|
* 获取会话免打扰状态
|
|
8249
8573
|
* 旧:getConversationNotificationStatus
|
|
@@ -8404,6 +8728,12 @@ declare class AppStorage {
|
|
|
8404
8728
|
get(key: string): any;
|
|
8405
8729
|
getKeys(): string[];
|
|
8406
8730
|
getValues(): any;
|
|
8731
|
+
/**
|
|
8732
|
+
* 全量更新
|
|
8733
|
+
*/
|
|
8734
|
+
update(value?: {
|
|
8735
|
+
[key: string]: any;
|
|
8736
|
+
}): void;
|
|
8407
8737
|
}
|
|
8408
8738
|
|
|
8409
8739
|
declare class Todo extends Error {
|
|
@@ -8600,6 +8930,16 @@ declare namespace base {
|
|
|
8600
8930
|
declare const getUUID: () => string;
|
|
8601
8931
|
declare const getUUID22: () => string;
|
|
8602
8932
|
|
|
8933
|
+
declare class SuspendablePromise<T> {
|
|
8934
|
+
private readonly _promise;
|
|
8935
|
+
private _resolve;
|
|
8936
|
+
private _onCancel;
|
|
8937
|
+
constructor(handle: (resolve: (val: T) => void) => void, onCancel: (resolve: (val: T) => void) => void);
|
|
8938
|
+
private _onResolve;
|
|
8939
|
+
result(): Promise<T>;
|
|
8940
|
+
abort(): void;
|
|
8941
|
+
}
|
|
8942
|
+
|
|
8603
8943
|
/**
|
|
8604
8944
|
* 预定义的验证规则,只包含`值类型`数据验证
|
|
8605
8945
|
* 引用类型数据需使用自定义 validator 校验函数进行校验
|
|
@@ -8716,9 +9056,8 @@ declare const getbundleId: () => string;
|
|
|
8716
9056
|
*/
|
|
8717
9057
|
declare const decryptCBC: (data: string, key: string, iv: string) => Promise<string>;
|
|
8718
9058
|
declare function fixUrlProtocol(url: string, protocol?: EConnectProtocol): string;
|
|
8719
|
-
declare const getMinionURL: (naviInfo: INaviInfo, logger: BasicLogger) => string;
|
|
8720
9059
|
|
|
8721
|
-
declare function httpRequest(options: IRequest):
|
|
9060
|
+
declare function httpRequest(options: IRequest): SuspendablePromise<IResponse>;
|
|
8722
9061
|
|
|
8723
9062
|
/**
|
|
8724
9063
|
* @todo 后期禁用此方法,容易滥用,且会丢失上下文的数据类型跟踪
|
|
@@ -8881,12 +9220,18 @@ declare const LOCAL_STORAGE_KEYS: {
|
|
|
8881
9220
|
SEND_MSG_KEY: (appKey: string, curUserId: string) => string;
|
|
8882
9221
|
/**
|
|
8883
9222
|
* tag 信息拉取时间戳
|
|
9223
|
+
* @deprecated 由 USER_SETTING_KEY 代替
|
|
8884
9224
|
*/
|
|
8885
9225
|
USER_SETTING_TIME_KEY: (appKey: string, curUserId: string) => string;
|
|
8886
9226
|
/**
|
|
8887
9227
|
* tag 状态
|
|
9228
|
+
* @deprecated 由 USER_SETTING_KEY 代替
|
|
8888
9229
|
*/
|
|
8889
9230
|
TAG_STATE_KEY: (appKey: string, curUserId: string) => string;
|
|
9231
|
+
/**
|
|
9232
|
+
* 用户配置信息(当前仅存了 tag 信息和 version)
|
|
9233
|
+
*/
|
|
9234
|
+
USER_SETTING_KEY: (appKey: string, curUserId: string) => string;
|
|
8890
9235
|
/**
|
|
8891
9236
|
* staticConfig 静态配置
|
|
8892
9237
|
*/
|
|
@@ -9054,4 +9399,4 @@ declare type AbsCodec<T> = Codec<T>;
|
|
|
9054
9399
|
*/
|
|
9055
9400
|
declare const version: string;
|
|
9056
9401
|
|
|
9057
|
-
export { AConnectionMgr, AEngine, APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, BaseCloudController, BasicLogger, BasicNavi, BasicReporter, BasicStaticConfigManager, BasicStatistic, BasicStatisticReporter, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectReason, ConnectType, ConnectionStatus, Content, ConversationType, DB_LOG_FLUSH_FREQUENCY, DB_LOG_MAX_SIZE, DelayTimer, EConnectProtocol, EnableLogL, EnterpriseType, ErrorCode, EventEmitter, FORMATED_VERSION, FileType, HTTP_TIMEOUT, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBaseStatisticsData, IBlockedMessageInfo, ICancelRoomPKOptions, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, ICloudController, IConnectResult, IConnectionListener, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IInsertMessage, IInsertMsgOptions, IIsValidExpansion, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, ILogDB, ILogData, ILogger, IM_CHATROOM_PULL_INTERVAL_TIME, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReader, IMessageReaderResponse, IMetionedData, INaviCache, INaviContextInfo, INaviInfo, INetwork, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPluginGenerator, IProcessCache, IProcessInfo, IPromiseResult, IProxy, 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, IStaticConfig, IStatistic, IStatisticDB, IStatisticData, IStatisticsCMPData, IStatisticsCSData, IStatisticsDurData, IStatisticsNaviData, IStatisticsNetworkData, IStatisticsRMTPData, IStatisticsWebsocketData, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadConversation, IUltraUnreadMsg, IUpdateItem, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUploadTask, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IWatcher, IWebSocket, IiOSPushConfig, IndexDBLogger, IndexDBReporter, IndexDBStatistic, IndexDBStatisticReporter, RTCKeyMaps as InnerRTCKeyMaps, InvokerType, ItypingStateListener, KVString, LOCAL_STORAGE_KEYS, LiveRole, LiveType, LogContent, LogL, LogLevel, LogSource, LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MAX_UPLOAD_FILE_SIZE, MentionedInfoBody, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NaviCacheType, NetworkType, NotificationLevel, NotificationStatus, ONE_LOG_SIZE_MAX, OperateStatus, PluginContext, ProtocalType, PushImportanceHonor, RCAssertError, RCConnectionStatus, RC_DEFAULT_USER, REAT_TIME_LOG_SIZE, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATIC_CONFIG_CACHE_TIME, STATIC_CONFIG_IV, STATIC_CONFIG_KEY, STATUS_MESSAGE, SentStatus, StatisticL, StatisticsTag, StatisticsVersion, StoreKeys, TagChangeType, Type, UPLOAD_FILE_CHUNK_SIZE, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMentionedType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, UserGroupChangeType, VERSION, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketNavi, appendUrl, assert, clone, cloneByJSON, deInitLogDB, decryptCBC, fixUrlProtocol, forEach, getBrowser, getClientMessageId, getDeviceId, getMimeKey,
|
|
9402
|
+
export { AConnectionMgr, AEngine, APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, BaseCloudController, BasicLogger, BasicNavi, BasicReporter, BasicStaticConfigManager, BasicStatistic, BasicStatisticReporter, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectReason, ConnectType, ConnectionStatus, Content, ConversationType, DB_LOG_FLUSH_FREQUENCY, DB_LOG_MAX_SIZE, DelayTimer, EConnectProtocol, EnableLogL, EnterpriseType, ErrorCode, EventEmitter, FORMATED_VERSION, FileType, HTTP_TIMEOUT, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBaseStatisticsData, IBlockedMessageInfo, ICancelRoomPKOptions, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IClearMessageOption, ICloudController, ICombineV2MessageContent, ICombinedMessage, IConnectResult, IConnectionListener, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IFirstUnreadMessageInfo, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupReadReceiptData, IInsertMessage, IInsertMsgOptions, IIsValidExpansion, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, ILogDB, ILogData, ILogger, IM_CHATROOM_PULL_INTERVAL_TIME, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, IMetionedData, INaviCache, INaviContextInfo, INaviInfo, INetwork, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCRoomInfo, IRTCUserData, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IRecallMsgContent, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IReqRoomPKOptions, IRequest, IResRoomPKOptions, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStaticConfig, IStatistic, IStatisticDB, IStatisticData, IStatisticsCMPData, IStatisticsCSData, IStatisticsDurData, IStatisticsNaviData, IStatisticsNetworkData, IStatisticsRMTPData, IStatisticsWebsocketData, IStorage, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadConversation, IUltraUnreadMsg, IUpdateItem, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUploadTask, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IWatcher, IWebSocket, IiOSPushConfig, IndexDBLogger, IndexDBReporter, IndexDBStatistic, IndexDBStatisticReporter, RTCKeyMaps as InnerRTCKeyMaps, InterruptionLevel, InvokerType, ItypingStateListener, KVString, LOCAL_STORAGE_KEYS, LiveRole, LiveType, LogContent, LogL, LogLevel, LogSource, LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MAX_UPLOAD_FILE_SIZE, MentionedInfoBody, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NaviCacheType, NetworkType, NotificationLevel, NotificationStatus, ONE_LOG_SIZE_MAX, OperateStatus, PluginContext, ProtocalType, PushImportanceHonor, RCAssertError, RCConnectionStatus, RC_DEFAULT_USER, REAT_TIME_LOG_SIZE, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATIC_CONFIG_CACHE_TIME, STATIC_CONFIG_IV, STATIC_CONFIG_KEY, STATUS_MESSAGE, SentStatus, StatisticL, StatisticsTag, StatisticsVersion, StoreKeys, SuspendablePromise, TagChangeType, Type, UPLOAD_FILE_CHUNK_SIZE, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMentionedType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, UserGroupChangeType, VERSION, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketNavi, appendUrl, assert, clone, cloneByJSON, deInitLogDB, decryptCBC, fixUrlProtocol, forEach, getBrowser, getClientMessageId, getDeviceId, getMimeKey, getUUID, getUUID22, getUploadFileName, getbundleId, httpRequest, indexOf, initLogDB, initStatisticDB, isArray, isArrayBuffer, isBoolean, isConnnectAckCode as isConnnectAck, isDisconnectCode as isDisconnectedByServer, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isStartCloudController, isString, isTypeInConversationList, isUndefined, isValidChannelId, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, isValidNotificationLevel, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, statisticTranscsv, todo, transcsv, unInitStatisticDB, urlCenter, usingCppEngine, validate, version };
|