@rongcloud/engine 5.8.4-alpha.9 → 5.8.5-alpha.1
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 +330 -15
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1432,6 +1432,16 @@ declare enum ErrorCode {
|
|
|
1432
1432
|
* 设置的代理地址不可用
|
|
1433
1433
|
*/
|
|
1434
1434
|
RC_CONN_PROXY_UNAVAILABLE = 34245,
|
|
1435
|
+
/**
|
|
1436
|
+
* 不支持V4已读回执功能
|
|
1437
|
+
* @since todo
|
|
1438
|
+
*/
|
|
1439
|
+
READ_RECEIPT_V4_NOT_SUPPORT = 34292,
|
|
1440
|
+
/**
|
|
1441
|
+
* 不支持更新v4已读回执信息
|
|
1442
|
+
* @since todo
|
|
1443
|
+
*/
|
|
1444
|
+
READ_RECEIPT_V4_UPDATE_NOT_SUPPORT = 34293,
|
|
1435
1445
|
/**
|
|
1436
1446
|
* 方法未支持
|
|
1437
1447
|
*/
|
|
@@ -1468,6 +1478,10 @@ declare enum ErrorCode {
|
|
|
1468
1478
|
* 搜索字段对应消息错误
|
|
1469
1479
|
*/
|
|
1470
1480
|
SEARCH_PROPS_LIMIT_ERROR = 35022,
|
|
1481
|
+
/**
|
|
1482
|
+
* 无效的数据中心请求, appkey 不是该数据中心的,需要重定向到正确的数据中心
|
|
1483
|
+
*/
|
|
1484
|
+
CLOUD_DATA_CENTER_INVALID = 20512,
|
|
1471
1485
|
/** ============================= 错误码 -- 废弃部分 ============================= */
|
|
1472
1486
|
/**
|
|
1473
1487
|
* 未知原因失败。
|
|
@@ -1939,9 +1953,13 @@ declare enum MessageType {
|
|
|
1939
1953
|
*/
|
|
1940
1954
|
SYNC_READ_STATUS = "RC:SRSMsg",
|
|
1941
1955
|
/**
|
|
1942
|
-
* 接受群已读回执更新消息(导航开关grpRRVer
|
|
1956
|
+
* 接受群已读回执更新消息(导航开关grpRRVer = 1时使用)
|
|
1943
1957
|
*/
|
|
1944
1958
|
GROUP_READ_RECEIPT_REQUEST = "RC:RRMsg",
|
|
1959
|
+
/**
|
|
1960
|
+
* 已读回执消息(V4)(导航开关grpRRVer = 3 时使用),支持单群聊
|
|
1961
|
+
*/
|
|
1962
|
+
READ_STATE = "RC:RSMsg",
|
|
1945
1963
|
/**
|
|
1946
1964
|
* 消息送达报告,仅单聊
|
|
1947
1965
|
*/
|
|
@@ -1981,7 +1999,11 @@ declare enum MessageType {
|
|
|
1981
1999
|
/**
|
|
1982
2000
|
* 拦截消息,(当发送的消息的敏感词时,服务会下发一个拦截消息,内容包含被拦截消息信息)
|
|
1983
2001
|
*/
|
|
1984
|
-
INTERCEPT = "RC:InterceptMsg"
|
|
2002
|
+
INTERCEPT = "RC:InterceptMsg",
|
|
2003
|
+
/**
|
|
2004
|
+
* 云控消息
|
|
2005
|
+
*/
|
|
2006
|
+
CLOUD_CONTROL = "RC:CCConfigChangeRequestMsg"
|
|
1985
2007
|
}
|
|
1986
2008
|
|
|
1987
2009
|
/**
|
|
@@ -2205,6 +2227,12 @@ declare enum LogTagId {
|
|
|
2205
2227
|
A_CALLBACK_O = "A-callback-O",
|
|
2206
2228
|
A_CALLBACK_E = "A-callback-E",
|
|
2207
2229
|
L_CALLBACK_E = "L-callback-E",
|
|
2230
|
+
A_SEND_MESSAGE_READ_RECEIPT_T = "A-send_message_read_receipt-T",
|
|
2231
|
+
A_SEND_MESSAGE_READ_RECEIPT_R = "A-send_message_read_receipt-R",
|
|
2232
|
+
A_GET_MESSAGE_READ_RECEIPT_T = "A-get_message_read_receipt-T",
|
|
2233
|
+
A_GET_MESSAGE_READ_RECEIPT_R = "A-get_message_read_receipt-R",
|
|
2234
|
+
A_SYNC_READ_STATUS_T = "A-sync_read_status-T",
|
|
2235
|
+
A_SYNC_READ_STATUS_R = "A-sync_read_status-R",
|
|
2208
2236
|
A_GET_TOP_CONVERSATION_LIST_E = "A-get_top_conversation_list-E",
|
|
2209
2237
|
/**
|
|
2210
2238
|
* PB 数据编码错误
|
|
@@ -2251,7 +2279,18 @@ declare enum LogTagId {
|
|
|
2251
2279
|
/** 获取静态配置 */
|
|
2252
2280
|
L_GET_STATIC_CONF_T = "L-get_static_conf-T",
|
|
2253
2281
|
L_GET_STATIC_CONF_R = "L-get_static_conf-R",
|
|
2254
|
-
L_GET_STATIC_CONF_E = "L-get_static_conf-E"
|
|
2282
|
+
L_GET_STATIC_CONF_E = "L-get_static_conf-E",
|
|
2283
|
+
/** 云控日志 */
|
|
2284
|
+
L_CLOUD_DISABLED = "L-cloud_disabled",
|
|
2285
|
+
L_CLOUD_EXPIRE = "L-cloud_expire",
|
|
2286
|
+
L_CLOUD_OVERCLOCK = "L-cloud_overclock",
|
|
2287
|
+
L_CLOUD_APPKEY_REGION_E = "L-cloud_appkey_region_error",
|
|
2288
|
+
L_CLOUD_CONFIG_DATA_E = "L-cloud_config_data_error",
|
|
2289
|
+
L_CLOUD_SET_CACHE_O = "L-cloud_set_cache-O",
|
|
2290
|
+
L_CLOUD_GET_CACHE_O = "L-cloud_get_cache-O",
|
|
2291
|
+
L_CLOUD_MSG_NTF_O = "L-cloud_msg_ntf-O",
|
|
2292
|
+
L_PARSE_JSON_MSGS_E = "L-parse_json_messsages-E",
|
|
2293
|
+
L_PARSE_JSON_E = "L-parse_json-E"
|
|
2255
2294
|
}
|
|
2256
2295
|
|
|
2257
2296
|
/** 统计数据标签 */
|
|
@@ -2262,7 +2301,10 @@ declare enum StatisticsTag {
|
|
|
2262
2301
|
IM_CMP = "IM-stats_cmp-S",
|
|
2263
2302
|
IM_CMP_RMTP = "IM-stats_cmp_rmtp-S",
|
|
2264
2303
|
IM_STATS_CS = "IM-stats_cs-S",
|
|
2265
|
-
IM_NETWORK_CHANGE = "IM-stats_network_change-S"
|
|
2304
|
+
IM_NETWORK_CHANGE = "IM-stats_network_change-S",
|
|
2305
|
+
/** 云控配置埋点 */
|
|
2306
|
+
L_CLOUD_INFO_FETCH_T = "L-cloud_info_fetch-T",
|
|
2307
|
+
L_CLOUD_INFO_FETCH_R = "L-cloud_info_fetch-R"
|
|
2266
2308
|
}
|
|
2267
2309
|
|
|
2268
2310
|
/**
|
|
@@ -2663,7 +2705,15 @@ interface IMessageReaderResponse {
|
|
|
2663
2705
|
list: IMessageReader[];
|
|
2664
2706
|
}
|
|
2665
2707
|
interface ILocalReadReceiptInfo {
|
|
2708
|
+
/**
|
|
2709
|
+
* 仅已读 V2 支持
|
|
2710
|
+
* @hidden
|
|
2711
|
+
*/
|
|
2666
2712
|
hasRespond?: boolean;
|
|
2713
|
+
/**
|
|
2714
|
+
* 仅已读 V2 支持
|
|
2715
|
+
* @hidden
|
|
2716
|
+
*/
|
|
2667
2717
|
readerInfo?: {
|
|
2668
2718
|
[userId: string]: number;
|
|
2669
2719
|
};
|
|
@@ -2675,22 +2725,62 @@ interface ILocalReadReceiptInfo {
|
|
|
2675
2725
|
*/
|
|
2676
2726
|
interface IReadReceiptInfo {
|
|
2677
2727
|
/**
|
|
2678
|
-
*
|
|
2728
|
+
* 是否已经发送已读回执, 仅 V2 支持
|
|
2679
2729
|
*/
|
|
2680
2730
|
hasRespond?: boolean;
|
|
2681
2731
|
/**
|
|
2682
|
-
*
|
|
2732
|
+
* 已阅读用户列表(不准确), 仅 V2 支持
|
|
2683
2733
|
*/
|
|
2684
2734
|
readerList?: IMessageReader[];
|
|
2685
2735
|
/**
|
|
2686
|
-
*
|
|
2736
|
+
* 阅读人数
|
|
2687
2737
|
*/
|
|
2688
2738
|
readCount?: number;
|
|
2689
2739
|
/**
|
|
2690
|
-
*
|
|
2740
|
+
* 群组总人数
|
|
2691
2741
|
*/
|
|
2692
2742
|
totalCount?: number;
|
|
2693
2743
|
}
|
|
2744
|
+
/**
|
|
2745
|
+
* 已读回执事件通知数据
|
|
2746
|
+
* @category Interface
|
|
2747
|
+
* @since todo
|
|
2748
|
+
*/
|
|
2749
|
+
interface IReadReceiptData {
|
|
2750
|
+
privateReadReceipt?: IPrivateReadReceiptData;
|
|
2751
|
+
groupReadReceipt?: IGroupReadReceiptData;
|
|
2752
|
+
}
|
|
2753
|
+
interface IPrivateReadReceiptData extends IConversationOption {
|
|
2754
|
+
/**
|
|
2755
|
+
* 最后已读消息时间 (单聊)
|
|
2756
|
+
*/
|
|
2757
|
+
endMsgTime?: number;
|
|
2758
|
+
}
|
|
2759
|
+
interface IGroupReadReceiptData extends IConversationOption {
|
|
2760
|
+
/**
|
|
2761
|
+
* 已读人数 (群聊)
|
|
2762
|
+
*/
|
|
2763
|
+
readCount?: number;
|
|
2764
|
+
/**
|
|
2765
|
+
* 消息发送时群总人数 (群聊)
|
|
2766
|
+
*/
|
|
2767
|
+
totalCount?: number;
|
|
2768
|
+
/**
|
|
2769
|
+
* 消息 UID(群聊)
|
|
2770
|
+
*/
|
|
2771
|
+
messageUId?: string;
|
|
2772
|
+
}
|
|
2773
|
+
/**
|
|
2774
|
+
* 多端同步会话已读状态事件数据
|
|
2775
|
+
* @category Interface
|
|
2776
|
+
* @since todo
|
|
2777
|
+
*/
|
|
2778
|
+
interface ISyncReadStatusData extends IConversationOption {
|
|
2779
|
+
/**
|
|
2780
|
+
* 已读消息时间
|
|
2781
|
+
*/
|
|
2782
|
+
timestamp: number;
|
|
2783
|
+
}
|
|
2694
2784
|
/**
|
|
2695
2785
|
* 从服务端接收到的消息数据
|
|
2696
2786
|
* @category Interface
|
|
@@ -4171,9 +4261,19 @@ interface INaviInfo {
|
|
|
4171
4261
|
*/
|
|
4172
4262
|
crypto?: string;
|
|
4173
4263
|
/**
|
|
4174
|
-
* 群组回执开关,
|
|
4264
|
+
* 群组回执开关,
|
|
4265
|
+
* 0(或者没有): 关闭 v1 版本
|
|
4266
|
+
* 1: 打开, v2 版本
|
|
4267
|
+
* 2: 废弃
|
|
4268
|
+
* 3: V4 版本,单群聊已读回执
|
|
4175
4269
|
*/
|
|
4176
4270
|
grpRRVer?: number;
|
|
4271
|
+
/**
|
|
4272
|
+
* 会话驱动类型
|
|
4273
|
+
* 0: 默认,客户端离线消息驱动计算未读数(客户端通过pullMsg结果计算)
|
|
4274
|
+
* 1: 服务端会话驱动计算未读数(调用pullSes进行初始化),暂只影响更新会话已读时间接口
|
|
4275
|
+
*/
|
|
4276
|
+
sesDriven?: number;
|
|
4177
4277
|
/**
|
|
4178
4278
|
* 防黑产开关, 1: 打开,0:关闭
|
|
4179
4279
|
*/
|
|
@@ -4497,7 +4597,8 @@ declare class IndexDBStatisticReporter extends BasicStatisticReporter {
|
|
|
4497
4597
|
declare enum AreaCode {
|
|
4498
4598
|
BJ = 1,
|
|
4499
4599
|
SG = 2,
|
|
4500
|
-
NA = 3
|
|
4600
|
+
NA = 3,
|
|
4601
|
+
SG_AWS = 4
|
|
4501
4602
|
}
|
|
4502
4603
|
|
|
4503
4604
|
interface IStaticConfigData {
|
|
@@ -4648,7 +4749,8 @@ declare class WebsocketStaticConfigManager extends BasicStaticConfigManager {
|
|
|
4648
4749
|
*/
|
|
4649
4750
|
declare class WebSocketNavi extends BasicNavi {
|
|
4650
4751
|
private runtime;
|
|
4651
|
-
|
|
4752
|
+
private environment;
|
|
4753
|
+
constructor(appkey: string, logger: BasicLogger, statisticLog: BasicStatistic, runtime: IRuntime, staticConfigManager: WebsocketStaticConfigManager, environment?: string);
|
|
4652
4754
|
protected httpRequest(uri: string, appkey: string, token: string, traceId: string, finished: boolean): IPromiseResult<INaviInfo>;
|
|
4653
4755
|
protected httpRequestV2(uri: string, appkey: string, token: string, traceId: string): IPromiseResult<INaviInfo>;
|
|
4654
4756
|
protected getNaviCache(formatedToken: string): INaviCache | null;
|
|
@@ -5336,13 +5438,25 @@ interface IEngine {
|
|
|
5336
5438
|
getTagsForConversation(conversation: IConversationOption): IPromiseResult<IConversationTag[]>;
|
|
5337
5439
|
/**
|
|
5338
5440
|
* 发送群组消息已读回执
|
|
5339
|
-
* 导航下发已读回执开关为
|
|
5441
|
+
* 导航下发已读回执开关为 1 时调用
|
|
5340
5442
|
*/
|
|
5341
5443
|
sendReadReceiptMessage(targetId: string, messageUIds: string[], channelId?: string): Promise<IAsyncRes>;
|
|
5342
5444
|
/**
|
|
5343
5445
|
* 获取群组消息已读列表
|
|
5344
5446
|
*/
|
|
5345
5447
|
getMessageReader(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
|
|
5448
|
+
/**
|
|
5449
|
+
* 发送已读回执(V4)
|
|
5450
|
+
*/
|
|
5451
|
+
sendReadReceiptMessageV4(conversation: IConversationOption, startMsgUid: string, endMsgUid: string): Promise<IAsyncRes>;
|
|
5452
|
+
/**
|
|
5453
|
+
* 获取消息已读回执列表, 暂仅支持群聊(V4)
|
|
5454
|
+
*/
|
|
5455
|
+
getMessageReadReceiptV4(conversation: IConversationOption, messageUid: string): IPromiseResult<IMessageReader[]>;
|
|
5456
|
+
/**
|
|
5457
|
+
* 多端同步会话的已读时间(V4)
|
|
5458
|
+
*/
|
|
5459
|
+
updateConversationReadTime(conversation: IConversationOption, timestamp: number): Promise<IAsyncRes>;
|
|
5346
5460
|
/**
|
|
5347
5461
|
* 获取服务器时间
|
|
5348
5462
|
*/
|
|
@@ -5997,7 +6111,7 @@ declare abstract class BasicReporter {
|
|
|
5997
6111
|
* @param logId 拉取事务 Id,用于上传日志时的 Http 请求
|
|
5998
6112
|
* @param messageUId 消息 messageUId
|
|
5999
6113
|
*/
|
|
6000
|
-
report(startTime: number, endTime: number, platform: string, uri: string, logId: string, messageUId: string): Promise<void>;
|
|
6114
|
+
report(startTime: number, endTime: number, platform: string, uri: string, logId: string, messageUId: string, isCloudControl?: boolean): Promise<void>;
|
|
6001
6115
|
/**
|
|
6002
6116
|
* 以 `POST` 方法向服务发送日志数据
|
|
6003
6117
|
* @param url
|
|
@@ -6044,7 +6158,7 @@ declare class IndexDBReporter extends BasicReporter {
|
|
|
6044
6158
|
* @param logId
|
|
6045
6159
|
* @param messageUId
|
|
6046
6160
|
*/
|
|
6047
|
-
report(startTime: number, endTime: number, platform: string, uri: string, logId: string, messageUId: string): Promise<void>;
|
|
6161
|
+
report(startTime: number, endTime: number, platform: string, uri: string, logId: string, messageUId: string, isCloudControl?: boolean): Promise<void>;
|
|
6048
6162
|
protected realtimeReport(url: string, level: LogL, itv: number): Promise<void>;
|
|
6049
6163
|
}
|
|
6050
6164
|
|
|
@@ -6237,6 +6351,14 @@ interface IWatcher {
|
|
|
6237
6351
|
ultraGroupChannelUserKicked?: (list: IUltraChannelUserKickedInfo[]) => void;
|
|
6238
6352
|
ultraGroupChannelDelete?: (list: IUltraChannelDeleteInfo[]) => void;
|
|
6239
6353
|
userGroupStatus?: (data: IUserGroupStatusInfo) => void;
|
|
6354
|
+
/**
|
|
6355
|
+
* 已读回执 V4
|
|
6356
|
+
*/
|
|
6357
|
+
messageReadReceipt?: (data: IReadReceiptData) => void;
|
|
6358
|
+
/**
|
|
6359
|
+
* 同步已读状态 V4
|
|
6360
|
+
*/
|
|
6361
|
+
syncReadStatus?: (data: ISyncReadStatusData) => void;
|
|
6240
6362
|
}
|
|
6241
6363
|
interface IAPIContextOption {
|
|
6242
6364
|
/**
|
|
@@ -6295,6 +6417,10 @@ interface IAPIContextOption {
|
|
|
6295
6417
|
* 日志服务地址
|
|
6296
6418
|
*/
|
|
6297
6419
|
logServerUrl?: string;
|
|
6420
|
+
/**
|
|
6421
|
+
* 私有云环境配置
|
|
6422
|
+
*/
|
|
6423
|
+
environment?: string;
|
|
6298
6424
|
}
|
|
6299
6425
|
|
|
6300
6426
|
interface IPluginGenerator<API, InitOption> {
|
|
@@ -6531,6 +6657,8 @@ declare class APIContext {
|
|
|
6531
6657
|
private _ultraGroupChannelUserKickedListener;
|
|
6532
6658
|
private _ultraGroupChannelDeleteListener;
|
|
6533
6659
|
private _userGroupStatusListener;
|
|
6660
|
+
private _messageReadReceipt;
|
|
6661
|
+
private _syncReadStatus;
|
|
6534
6662
|
/**
|
|
6535
6663
|
* rtc 数据变更通知 pluginContext
|
|
6536
6664
|
*/
|
|
@@ -6636,6 +6764,18 @@ declare class APIContext {
|
|
|
6636
6764
|
* @param messageUIds
|
|
6637
6765
|
*/
|
|
6638
6766
|
getMessageReader(targetId: string, messageUId: string, channelId?: string): Promise<IAsyncRes<IMessageReaderResponse>>;
|
|
6767
|
+
/**
|
|
6768
|
+
* 发送已读回执(V4)
|
|
6769
|
+
*/
|
|
6770
|
+
sendReadReceiptMessageV4(conversation: IConversationOption, startMsgUid: string, endMsgUid: string): Promise<IAsyncRes>;
|
|
6771
|
+
/**
|
|
6772
|
+
* 获取消息已读回执列表, 暂仅支持群聊(V4)
|
|
6773
|
+
*/
|
|
6774
|
+
getMessageReadReceiptV4(conversation: IConversationOption, messageUid: string): IPromiseResult<IMessageReader[]>;
|
|
6775
|
+
/**
|
|
6776
|
+
* 多端同步会话的已读时间(V4)
|
|
6777
|
+
*/
|
|
6778
|
+
updateConversationReadTime(conversation: IConversationOption, timestamp: number): Promise<IAsyncRes>;
|
|
6639
6779
|
/**
|
|
6640
6780
|
* 反初始化,清空所有监听及计时器
|
|
6641
6781
|
*/
|
|
@@ -7557,6 +7697,14 @@ interface IEngineWatcher extends IConnectionListener {
|
|
|
7557
7697
|
callInfo: (data: string) => void;
|
|
7558
7698
|
onNaviDataChange: (naviInfo: INaviInfo) => void;
|
|
7559
7699
|
userGroupStatus: (info: IUserGroupStatusInfo) => void;
|
|
7700
|
+
/**
|
|
7701
|
+
* 已读回执 V4
|
|
7702
|
+
*/
|
|
7703
|
+
messageReadReceipt: (data: IReadReceiptData) => void;
|
|
7704
|
+
/**
|
|
7705
|
+
* 同步已读状态 V4
|
|
7706
|
+
*/
|
|
7707
|
+
syncReadStatus: (data: ISyncReadStatusData) => void;
|
|
7560
7708
|
}
|
|
7561
7709
|
/**
|
|
7562
7710
|
* 引擎定义
|
|
@@ -7828,6 +7976,18 @@ declare abstract class AEngine {
|
|
|
7828
7976
|
* @param messageUIds
|
|
7829
7977
|
*/
|
|
7830
7978
|
abstract getMessageReader(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
|
|
7979
|
+
/**
|
|
7980
|
+
* 发送已读回执(V4)
|
|
7981
|
+
*/
|
|
7982
|
+
abstract sendReadReceiptMessageV4(conversation: IConversationOption, startMsgUid: string, endMsgUid: string): Promise<IAsyncRes>;
|
|
7983
|
+
/**
|
|
7984
|
+
* 获取消息已读回执列表, 暂仅支持群聊(V4)
|
|
7985
|
+
*/
|
|
7986
|
+
abstract getMessageReadReceiptV4(conversation: IConversationOption, messageUid: string): IPromiseResult<IMessageReader[]>;
|
|
7987
|
+
/**
|
|
7988
|
+
* 多端同步会话的已读时间(V4)
|
|
7989
|
+
*/
|
|
7990
|
+
abstract updateConversationReadTime(conversation: IConversationOption, timestamp: number): Promise<IAsyncRes>;
|
|
7831
7991
|
/**
|
|
7832
7992
|
* 断开连接
|
|
7833
7993
|
* @param closeDB 是否关闭数据库,默认为 true,仅 Electron 平台有效
|
|
@@ -8385,6 +8545,10 @@ declare class UrlCenter {
|
|
|
8385
8545
|
* 获取静态配置地址
|
|
8386
8546
|
*/
|
|
8387
8547
|
getStaticConfigUrl(): string[];
|
|
8548
|
+
/**
|
|
8549
|
+
* @returns 获取云控地址
|
|
8550
|
+
*/
|
|
8551
|
+
getCloudControllerUrl(areaCode?: number): string[];
|
|
8388
8552
|
}
|
|
8389
8553
|
declare const urlCenter: UrlCenter;
|
|
8390
8554
|
|
|
@@ -8460,6 +8624,10 @@ declare class VersionManage {
|
|
|
8460
8624
|
};
|
|
8461
8625
|
}
|
|
8462
8626
|
|
|
8627
|
+
declare function isStartCloudController(): boolean;
|
|
8628
|
+
|
|
8629
|
+
declare const getDeviceId: (runtime: IRuntime) => string;
|
|
8630
|
+
|
|
8463
8631
|
/**
|
|
8464
8632
|
* 检查参数是否为字符串
|
|
8465
8633
|
* 只做类型检查,不做长度检查,故当字符串长度为 0,结果依然为 true
|
|
@@ -8721,6 +8889,7 @@ declare const getbundleId: () => string;
|
|
|
8721
8889
|
*/
|
|
8722
8890
|
declare const decryptCBC: (data: string, key: string, iv: string) => Promise<string>;
|
|
8723
8891
|
declare function fixUrlProtocol(url: string, protocol?: EConnectProtocol): string;
|
|
8892
|
+
declare const getMinionURL: (naviInfo: INaviInfo, logger: BasicLogger) => string;
|
|
8724
8893
|
|
|
8725
8894
|
declare function httpRequest(options: IRequest): SuspendablePromise<IResponse>;
|
|
8726
8895
|
|
|
@@ -8842,6 +9011,7 @@ declare const FORMATED_VERSION: string;
|
|
|
8842
9011
|
declare const MAX_UPLOAD_FILE_SIZE: number;
|
|
8843
9012
|
declare const UPLOAD_FILE_CHUNK_SIZE: number;
|
|
8844
9013
|
declare const STATIC_CONFIG_CACHE_TIME: number;
|
|
9014
|
+
declare const RC_DEFAULT_USER = "rongcloudsystem";
|
|
8845
9015
|
/**
|
|
8846
9016
|
* localStorage 中的 key 值
|
|
8847
9017
|
*/
|
|
@@ -8894,8 +9064,153 @@ declare const LOCAL_STORAGE_KEYS: {
|
|
|
8894
9064
|
* staticConfig 静态配置
|
|
8895
9065
|
*/
|
|
8896
9066
|
STATIC_CONFIG_KEY: (appKey: string) => string;
|
|
9067
|
+
/**
|
|
9068
|
+
* 云控配置存储
|
|
9069
|
+
*/
|
|
9070
|
+
CLOUD_CONTROL_KEY: (appKey: string) => string;
|
|
8897
9071
|
};
|
|
8898
9072
|
|
|
9073
|
+
interface ICloudConfig {
|
|
9074
|
+
temporary: boolean;
|
|
9075
|
+
enable: boolean;
|
|
9076
|
+
expire: number;
|
|
9077
|
+
interval: number;
|
|
9078
|
+
}
|
|
9079
|
+
interface IUploadLogConfig {
|
|
9080
|
+
temporary: boolean;
|
|
9081
|
+
tasks: IUploadTask[];
|
|
9082
|
+
}
|
|
9083
|
+
interface IUploadTask {
|
|
9084
|
+
/**
|
|
9085
|
+
* 消息类型
|
|
9086
|
+
*/
|
|
9087
|
+
objectName: string;
|
|
9088
|
+
/**
|
|
9089
|
+
* 上报地址
|
|
9090
|
+
*/
|
|
9091
|
+
uri: string;
|
|
9092
|
+
/**
|
|
9093
|
+
* 日志 id
|
|
9094
|
+
*/
|
|
9095
|
+
logId: string;
|
|
9096
|
+
/**
|
|
9097
|
+
* 开始时间
|
|
9098
|
+
*/
|
|
9099
|
+
startTime?: number;
|
|
9100
|
+
/**
|
|
9101
|
+
* 结束时间
|
|
9102
|
+
*/
|
|
9103
|
+
endTime?: number;
|
|
9104
|
+
/**
|
|
9105
|
+
* 平台标识
|
|
9106
|
+
*/
|
|
9107
|
+
platform?: string;
|
|
9108
|
+
/**
|
|
9109
|
+
* 移动端包名,web 暂未使用
|
|
9110
|
+
*/
|
|
9111
|
+
packageName?: string;
|
|
9112
|
+
/**
|
|
9113
|
+
* 会话类型
|
|
9114
|
+
*/
|
|
9115
|
+
conversationType?: number;
|
|
9116
|
+
/**
|
|
9117
|
+
* 目标 id
|
|
9118
|
+
*/
|
|
9119
|
+
targetId?: string;
|
|
9120
|
+
/**
|
|
9121
|
+
* 频道 id
|
|
9122
|
+
*/
|
|
9123
|
+
channelId?: string;
|
|
9124
|
+
/**
|
|
9125
|
+
* 消息 id list
|
|
9126
|
+
* 移动端拉取消息列表使用,web 暂未使用
|
|
9127
|
+
*/
|
|
9128
|
+
msgUids?: string;
|
|
9129
|
+
/**
|
|
9130
|
+
* 用户 id
|
|
9131
|
+
*/
|
|
9132
|
+
userId?: string;
|
|
9133
|
+
}
|
|
9134
|
+
interface ICloudController {
|
|
9135
|
+
/**
|
|
9136
|
+
* 云控配置
|
|
9137
|
+
*/
|
|
9138
|
+
cc: ICloudConfig;
|
|
9139
|
+
/**
|
|
9140
|
+
* 云控配置版本
|
|
9141
|
+
*/
|
|
9142
|
+
uploadLog: IUploadLogConfig;
|
|
9143
|
+
/**
|
|
9144
|
+
* 时间戳
|
|
9145
|
+
*/
|
|
9146
|
+
timestamp: number;
|
|
9147
|
+
/**
|
|
9148
|
+
* 最后一次请求时间
|
|
9149
|
+
*/
|
|
9150
|
+
lastRequestTime: number;
|
|
9151
|
+
/**
|
|
9152
|
+
* 区域码
|
|
9153
|
+
*/
|
|
9154
|
+
targetRegion?: number;
|
|
9155
|
+
}
|
|
9156
|
+
declare enum InvokerType {
|
|
9157
|
+
init = 1,
|
|
9158
|
+
newWorkChange = 2,
|
|
9159
|
+
other = 3
|
|
9160
|
+
}
|
|
9161
|
+
|
|
9162
|
+
declare class UploadTaskManage {
|
|
9163
|
+
private readonly reporter;
|
|
9164
|
+
private logId;
|
|
9165
|
+
private uploadTask;
|
|
9166
|
+
private taskLock;
|
|
9167
|
+
constructor(reporter: BasicReporter);
|
|
9168
|
+
uploadLogCmdTask(data: IUploadTask): void;
|
|
9169
|
+
private reportLogCmdTask;
|
|
9170
|
+
private enqueueTask;
|
|
9171
|
+
}
|
|
9172
|
+
|
|
9173
|
+
declare abstract class BaseCloudController {
|
|
9174
|
+
protected logger: BasicLogger;
|
|
9175
|
+
protected appkey: string;
|
|
9176
|
+
protected reporter: BasicReporter;
|
|
9177
|
+
protected statisticLog: BasicStatistic;
|
|
9178
|
+
/**
|
|
9179
|
+
* 是否启用云控
|
|
9180
|
+
*/
|
|
9181
|
+
private isEable;
|
|
9182
|
+
/**
|
|
9183
|
+
* 配置有效期, 单位为毫秒
|
|
9184
|
+
*/
|
|
9185
|
+
protected expire: number;
|
|
9186
|
+
/**
|
|
9187
|
+
* 配置刷新间隔, 单位为毫秒
|
|
9188
|
+
*/
|
|
9189
|
+
protected interval: number;
|
|
9190
|
+
/**
|
|
9191
|
+
* 配置更新时间
|
|
9192
|
+
*/
|
|
9193
|
+
protected timestamp: number;
|
|
9194
|
+
/**
|
|
9195
|
+
* 最近一次发起请求时间
|
|
9196
|
+
*/
|
|
9197
|
+
protected lastRequestTime: number;
|
|
9198
|
+
protected uploadTaskManage: UploadTaskManage;
|
|
9199
|
+
protected _cache: ICloudController | null;
|
|
9200
|
+
constructor(logger: BasicLogger, appkey: string, reporter: BasicReporter, statisticLog: BasicStatistic);
|
|
9201
|
+
protected init(): void;
|
|
9202
|
+
protected abstract httpRequest(url: string, method: HttpMethod, headers: {
|
|
9203
|
+
[key: string]: string;
|
|
9204
|
+
}, body: any): IPromiseResult<ICloudController>;
|
|
9205
|
+
protected abstract setCloudControllerCache(data: ICloudController): void;
|
|
9206
|
+
protected abstract getLocalCloudControllerCache(): string | null;
|
|
9207
|
+
private isExire;
|
|
9208
|
+
private isOverclock;
|
|
9209
|
+
private logCmdMsgTasks;
|
|
9210
|
+
protected dataHandle(data: ICloudController): void;
|
|
9211
|
+
request(uri: string, invoker: InvokerType, token?: string): Promise<number>;
|
|
9212
|
+
}
|
|
9213
|
+
|
|
8899
9214
|
/**
|
|
8900
9215
|
* 请使用 `Codec` 替代 `AbsCodec`
|
|
8901
9216
|
* @deprecated
|
|
@@ -8908,4 +9223,4 @@ declare type AbsCodec<T> = Codec<T>;
|
|
|
8908
9223
|
*/
|
|
8909
9224
|
declare const version: string;
|
|
8910
9225
|
|
|
8911
|
-
export { AConnectionMgr, AEngine, APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, 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, ICombineV2MessageContent, ICombinedMessage, 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, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IWatcher, IWebSocket, IiOSPushConfig, IndexDBLogger, IndexDBReporter, IndexDBStatistic, IndexDBStatisticReporter, RTCKeyMaps as InnerRTCKeyMaps, 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, RCAssertError, RCConnectionStatus, 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, 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, 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 };
|
|
9226
|
+
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, ICombineV2MessageContent, ICombinedMessage, 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, 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, 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, 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, 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, getMinionURL, 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 };
|