@rongcloud/engine 5.32.0 → 5.34.0-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.cjs +1 -1
- package/index.cjs.js +1 -1
- package/index.d.ts +181 -186
- package/index.esm.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -189,8 +189,6 @@ declare const Log: {
|
|
|
189
189
|
readonly L_VER_REPORT_T: "L-VER_REPORT-T";
|
|
190
190
|
/** 版本号上报结果 */
|
|
191
191
|
readonly L_VER_REPORT_R: "L-VER_REPORT-R";
|
|
192
|
-
/** 跨进程阻塞调用 */
|
|
193
|
-
readonly L_CALL_MAIN_SYNC_O: "L_CALL_MAIN_SYNC_O";
|
|
194
192
|
/** 未知的通知 */
|
|
195
193
|
readonly L_UNSUPPORT_NTF_FROM_MAIN_E: "L_UNSUPPORT_NTF_FROM_MAIN_E";
|
|
196
194
|
readonly A_REMOVE_PROXY_O: "A-remove_proxy-O";
|
|
@@ -208,8 +206,6 @@ declare const Log: {
|
|
|
208
206
|
readonly L_CLOUD_OVERCLOCK: "L-cloud_overclock";
|
|
209
207
|
readonly L_CLOUD_APPKEY_REGION_E: "L-cloud_appkey_region_error";
|
|
210
208
|
readonly L_CLOUD_CONFIG_DATA_E: "L-cloud_config_data_error";
|
|
211
|
-
readonly L_CLOUD_SET_CACHE_O: "L-cloud_set_cache-O";
|
|
212
|
-
readonly L_CLOUD_GET_CACHE_O: "L-cloud_get_cache-O";
|
|
213
209
|
readonly L_CLOUD_SET_AREA_CODE_O: "L-cloud_set_area_code-O";
|
|
214
210
|
readonly L_CLOUD_SET_MRTR_O: "L-cloud_set_mrtr-O";
|
|
215
211
|
/** 用户状态订阅 */
|
|
@@ -557,6 +553,10 @@ declare const Log: {
|
|
|
557
553
|
readonly A_UPDATE_MY_USER_PROFILE_R: "A-update_my_user_profile-R";
|
|
558
554
|
readonly A_GET_CONVERSATIONS_INCLUDING_ROBOTS_T: "A-get_conversations_including_robots-T";
|
|
559
555
|
readonly A_GET_CONVERSATIONS_INCLUDING_ROBOTS_R: "A-get_conversations_including_robots-R";
|
|
556
|
+
readonly L_PULL_SG_UNREAD_COUNT_T: "L-pull_sg_unread_count-T";
|
|
557
|
+
readonly L_PULL_SG_UNREAD_COUNT_R: "L-pull_sg_unread_count-R";
|
|
558
|
+
readonly A_MARK_REMOTE_CONVERSATION_AS_READ_T: "A-mark_remote_conversation_as_read-T";
|
|
559
|
+
readonly A_MARK_REMOTE_CONVERSATION_AS_READ_R: "A-mark_remote_conversation_as_read-R";
|
|
560
560
|
};
|
|
561
561
|
|
|
562
562
|
/** [EN]
|
|
@@ -3116,6 +3116,18 @@ declare enum ErrorCode {
|
|
|
3116
3116
|
* @since 5.26.0
|
|
3117
3117
|
*/
|
|
3118
3118
|
INVALID_PARAMETER_MESSAGE_INFO_MAP = 34345,
|
|
3119
|
+
/**
|
|
3120
|
+
* 34435
|
|
3121
|
+
* 服务端记录会话未读数功能开启时禁止调用此方法
|
|
3122
|
+
* @since 5.32.0
|
|
3123
|
+
*/
|
|
3124
|
+
SERVER_RECORD_UNREAD_COUNT_ENABLED_FORBIDDEN = 34435,
|
|
3125
|
+
/**
|
|
3126
|
+
* 34436
|
|
3127
|
+
* 服务端记录会话未读数功能未开启
|
|
3128
|
+
* @since 5.32.0
|
|
3129
|
+
*/
|
|
3130
|
+
SERVER_RECORD_UNREAD_COUNT_DISABLED = 34436,
|
|
3119
3131
|
/**
|
|
3120
3132
|
* 35001
|
|
3121
3133
|
* 【已废弃】群组信息异常
|
|
@@ -4541,6 +4553,10 @@ declare const FilterRobotType: {
|
|
|
4541
4553
|
};
|
|
4542
4554
|
declare type FilterRobotType = (typeof FilterRobotType)[keyof typeof FilterRobotType];
|
|
4543
4555
|
|
|
4556
|
+
/** [EN]
|
|
4557
|
+
* Message moderation status
|
|
4558
|
+
* @category Enum
|
|
4559
|
+
*/
|
|
4544
4560
|
/**
|
|
4545
4561
|
* 消息审核类型
|
|
4546
4562
|
* @category Enum
|
|
@@ -6325,7 +6341,7 @@ interface IReadReceiptData {
|
|
|
6325
6341
|
* @since 5.9.0
|
|
6326
6342
|
* @hidden
|
|
6327
6343
|
*/
|
|
6328
|
-
interface IPrivateReadReceiptData extends
|
|
6344
|
+
interface IPrivateReadReceiptData extends IConversationIdentifier {
|
|
6329
6345
|
/**
|
|
6330
6346
|
* 最后已读消息时间 (单聊)
|
|
6331
6347
|
*/
|
|
@@ -6337,7 +6353,7 @@ interface IPrivateReadReceiptData extends IConversationOption {
|
|
|
6337
6353
|
* @since 5.9.0
|
|
6338
6354
|
* @hidden
|
|
6339
6355
|
*/
|
|
6340
|
-
interface IGroupReadReceiptData extends
|
|
6356
|
+
interface IGroupReadReceiptData extends IConversationIdentifier {
|
|
6341
6357
|
/**
|
|
6342
6358
|
* 已读人数 (群聊)
|
|
6343
6359
|
*/
|
|
@@ -6357,7 +6373,7 @@ interface IGroupReadReceiptData extends IConversationOption {
|
|
|
6357
6373
|
* @since 5.9.0
|
|
6358
6374
|
* @hidden
|
|
6359
6375
|
*/
|
|
6360
|
-
interface ISyncReadStatusData extends
|
|
6376
|
+
interface ISyncReadStatusData extends IConversationIdentifier {
|
|
6361
6377
|
/**
|
|
6362
6378
|
* 已读消息时间
|
|
6363
6379
|
*/
|
|
@@ -6415,15 +6431,23 @@ interface IMessageExtraData {
|
|
|
6415
6431
|
*/
|
|
6416
6432
|
sentTime?: number;
|
|
6417
6433
|
}
|
|
6418
|
-
/** [EN]
|
|
6419
|
-
* Message data received from the server
|
|
6420
|
-
* @category Interface
|
|
6421
|
-
*/
|
|
6422
6434
|
/**
|
|
6423
|
-
*
|
|
6424
|
-
* @
|
|
6435
|
+
* 内部消息结构定义,上面会携带一些不适合透漏给业务层的字段定义,用于内部业务处理。
|
|
6436
|
+
* @hidden
|
|
6425
6437
|
*/
|
|
6426
|
-
interface
|
|
6438
|
+
interface IInnerMessage<T = any> {
|
|
6439
|
+
/**
|
|
6440
|
+
* 内部数据,用于内部业务处理
|
|
6441
|
+
* @hidden
|
|
6442
|
+
*/
|
|
6443
|
+
__innerData__?: {
|
|
6444
|
+
/**
|
|
6445
|
+
* 接收到的该条撤回消息,是否保持本地未读数不变,仅当消息为 RC:RcCmd 撤回消息时有效
|
|
6446
|
+
* * 开启服务器记录会话未读数功能时,从服务器解析获取。
|
|
6447
|
+
* * 未开启服务器记录会话未读数功能时,该值默认赋值为 false,表示需要本地未读数 -1,保持原有逻辑不变
|
|
6448
|
+
*/
|
|
6449
|
+
keepUnreadCount?: boolean;
|
|
6450
|
+
};
|
|
6427
6451
|
/** [EN]
|
|
6428
6452
|
* The business identifier of the conversation
|
|
6429
6453
|
*/
|
|
@@ -6682,11 +6706,22 @@ interface IReceivedMessage<T = any> {
|
|
|
6682
6706
|
*/
|
|
6683
6707
|
modifyInfo?: MessageModifyInfo;
|
|
6684
6708
|
/**
|
|
6685
|
-
* 业务层发送消息时的透传数据,仅允许通过 serverApi 进行发送,SDK
|
|
6709
|
+
* 业务层发送消息时的透传数据,仅允许通过 serverApi 进行发送,SDK 不支持发送该字段
|
|
6686
6710
|
* @hidden 暂为和讯网定制化需求
|
|
6711
|
+
* @since 5.30.1
|
|
6687
6712
|
*/
|
|
6688
6713
|
extraData?: IMessageExtraData;
|
|
6689
6714
|
}
|
|
6715
|
+
/** [EN]
|
|
6716
|
+
* Message data received from the server
|
|
6717
|
+
* @category Interface
|
|
6718
|
+
*/
|
|
6719
|
+
/**
|
|
6720
|
+
* 从服务端接收到的消息数据
|
|
6721
|
+
* @category Interface
|
|
6722
|
+
*/
|
|
6723
|
+
interface IReceivedMessage<T = any> extends Omit<IInnerMessage<T>, '__innerData__'> {
|
|
6724
|
+
}
|
|
6690
6725
|
/** [EN]
|
|
6691
6726
|
* First unread message information
|
|
6692
6727
|
* @category Interface
|
|
@@ -7358,7 +7393,7 @@ interface MentionedInfo {
|
|
|
7358
7393
|
/**
|
|
7359
7394
|
* @category Interface
|
|
7360
7395
|
*/
|
|
7361
|
-
interface IClearMessageOption extends
|
|
7396
|
+
interface IClearMessageOption extends IConversationIdentifier {
|
|
7362
7397
|
/** [EN]
|
|
7363
7398
|
* Timestamp
|
|
7364
7399
|
*/
|
|
@@ -7426,7 +7461,7 @@ interface IModifyMessageParams {
|
|
|
7426
7461
|
/**
|
|
7427
7462
|
* 会话信息
|
|
7428
7463
|
*/
|
|
7429
|
-
conversation:
|
|
7464
|
+
conversation: IConversationIdentifier;
|
|
7430
7465
|
}
|
|
7431
7466
|
/**
|
|
7432
7467
|
* 刷新引用消息参数
|
|
@@ -7440,7 +7475,7 @@ interface IRefreshReferenceMessageParams {
|
|
|
7440
7475
|
/**
|
|
7441
7476
|
* 会话信息
|
|
7442
7477
|
*/
|
|
7443
|
-
conversationIdentifier:
|
|
7478
|
+
conversationIdentifier: IConversationIdentifier;
|
|
7444
7479
|
/**
|
|
7445
7480
|
* 本地消息回调
|
|
7446
7481
|
*/
|
|
@@ -9843,9 +9878,10 @@ declare class EventDispatcher<T> {
|
|
|
9843
9878
|
* 连接目标事件监听器,本实例派发的事件会被传递给入参事件监听器
|
|
9844
9879
|
* 举例:a.pipe(b) 后,当 a.emit 后,b 的所有监听器也会触发,但会晚于所有 a 的监听器;
|
|
9845
9880
|
* @param emitter
|
|
9881
|
+
* @param types 指定事件类型列表,如果指定,则只有指定类型的事件会被传递给入参事件监听器
|
|
9846
9882
|
* @hidden
|
|
9847
9883
|
*/
|
|
9848
|
-
pipe
|
|
9884
|
+
pipe(emitter: EventDispatcher<T>, types?: Array<keyof T>): void;
|
|
9849
9885
|
}
|
|
9850
9886
|
|
|
9851
9887
|
declare class RCResult<T = void> {
|
|
@@ -10298,8 +10334,8 @@ interface INaviInfo {
|
|
|
10298
10334
|
grpRRVer?: number;
|
|
10299
10335
|
/**
|
|
10300
10336
|
* 会话驱动类型
|
|
10301
|
-
* 0: 默认,客户端离线消息驱动计算未读数 (客户端通过 pullMsg 结果计算)
|
|
10302
|
-
* 1: 服务端会话驱动计算未读数 (调用 pullSes 进行初始化),暂只影响更新会话已读时间接口
|
|
10337
|
+
* * 0: 默认,客户端离线消息驱动计算未读数 (客户端通过 pullMsg 结果计算)
|
|
10338
|
+
* * 1: 服务端会话驱动计算未读数 (调用 pullSes 进行初始化),暂只影响更新会话已读时间接口
|
|
10303
10339
|
*/
|
|
10304
10340
|
sesDriven?: number;
|
|
10305
10341
|
/**
|
|
@@ -10417,35 +10453,15 @@ interface INaviInfo {
|
|
|
10417
10453
|
* 2. 拉取历史消息时,不再返回 RC:RcCmd 消息。
|
|
10418
10454
|
*/
|
|
10419
10455
|
supportRecallRefactor?: 0 | 1;
|
|
10456
|
+
/**
|
|
10457
|
+
* 是否开启服务器记录单群聊会话未读数;
|
|
10458
|
+
* 0: 关闭,未读数由客户端计算,保持原有逻辑不变;
|
|
10459
|
+
* 1: 开启,未读数由服务器保存,SDK 连接后先同步服务器未读数信息,再拉离线消息。
|
|
10460
|
+
* @since 5.34.0
|
|
10461
|
+
*/
|
|
10462
|
+
serverSaveUnread?: 0 | 1;
|
|
10420
10463
|
}
|
|
10421
10464
|
|
|
10422
|
-
/** [EN]
|
|
10423
|
-
* Asynchronous task result
|
|
10424
|
-
* @category Interface
|
|
10425
|
-
*/
|
|
10426
|
-
/**
|
|
10427
|
-
* 异步任务结果
|
|
10428
|
-
* @description 该结构即将废弃,请使用 {@link RCResult} 替代
|
|
10429
|
-
* @category Interface
|
|
10430
|
-
* @deprecated 请使用 {@link RCResult} 替代
|
|
10431
|
-
*/
|
|
10432
|
-
interface IAsyncRes<T = void> extends Pick<RCResult<T>, 'code' | 'data'> {
|
|
10433
|
-
msg?: string;
|
|
10434
|
-
}
|
|
10435
|
-
/** [EN]
|
|
10436
|
-
* Asynchronous task result
|
|
10437
|
-
* @description
|
|
10438
|
-
* Handles expected exceptions through `Promise.resolve`, thereby exposing unexpected exceptions through Uncatch Promise Error
|
|
10439
|
-
* @category Type
|
|
10440
|
-
*/
|
|
10441
|
-
/**
|
|
10442
|
-
* 异步任务结果
|
|
10443
|
-
* @description
|
|
10444
|
-
* 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
|
|
10445
|
-
* @category Type
|
|
10446
|
-
*/
|
|
10447
|
-
declare type IPromiseResult<T = void> = Promise<IAsyncRes<T>>;
|
|
10448
|
-
|
|
10449
10465
|
/** [EN]
|
|
10450
10466
|
* User information
|
|
10451
10467
|
* @since 5.10.1
|
|
@@ -12036,7 +12052,7 @@ declare type ReadReceiptUsersResult = {
|
|
|
12036
12052
|
/** 消息已读回执信息 */
|
|
12037
12053
|
interface ReadReceiptInfoV5 {
|
|
12038
12054
|
/** 会话信息 */
|
|
12039
|
-
identifier:
|
|
12055
|
+
identifier: IConversationIdentifier;
|
|
12040
12056
|
/** 消息唯一 ID */
|
|
12041
12057
|
messageUId: string;
|
|
12042
12058
|
/** 未读人数 */
|
|
@@ -12053,7 +12069,7 @@ interface ReadReceiptResponseV5 extends ReadReceiptInfoV5 {
|
|
|
12053
12069
|
}
|
|
12054
12070
|
interface IMessageIdentifier {
|
|
12055
12071
|
/** 会话信息 */
|
|
12056
|
-
identifier:
|
|
12072
|
+
identifier: IConversationIdentifier;
|
|
12057
12073
|
/** 消息唯一 ID */
|
|
12058
12074
|
messageUId: string;
|
|
12059
12075
|
}
|
|
@@ -12176,20 +12192,30 @@ interface IProcessCache {
|
|
|
12176
12192
|
deltaTime: number;
|
|
12177
12193
|
}
|
|
12178
12194
|
/**
|
|
12179
|
-
*
|
|
12195
|
+
* 同步跨进程方法定义
|
|
12180
12196
|
*/
|
|
12181
|
-
interface
|
|
12197
|
+
interface IIPCMethodsSync {
|
|
12198
|
+
/**
|
|
12199
|
+
* 获取主进程缓存数据
|
|
12200
|
+
*/
|
|
12201
|
+
getMainProcessCache(): IProcessCache;
|
|
12202
|
+
}
|
|
12203
|
+
/**
|
|
12204
|
+
* 无返回值的跨进程方法异步调用定义
|
|
12205
|
+
*/
|
|
12206
|
+
interface IIPCMethodsWithoutResult {
|
|
12182
12207
|
/**
|
|
12183
|
-
*
|
|
12208
|
+
* 消息注册
|
|
12209
|
+
* @description
|
|
12210
|
+
* 消息注册需在应用初始化完成前进行,否则在搭配 C++ 协议栈使用时,本端发出的消息将不默认作为未知消息处理,不存储、不计数
|
|
12184
12211
|
*/
|
|
12185
|
-
|
|
12212
|
+
registerMessageType(objectName: string, params: MessageTypeDescription): void;
|
|
12186
12213
|
/**
|
|
12187
|
-
*
|
|
12188
|
-
* @param
|
|
12189
|
-
* @param
|
|
12214
|
+
* 设置网络状态
|
|
12215
|
+
* @param data 网络状态
|
|
12216
|
+
* @param isUnPrintLog 是否打印日志
|
|
12190
12217
|
*/
|
|
12191
|
-
|
|
12192
|
-
getNaviInfoFromCache(): INaviInfo | null;
|
|
12218
|
+
setNetwork(data: INetwork, isUnPrintLog?: boolean): void;
|
|
12193
12219
|
/**
|
|
12194
12220
|
* 上报版本信息
|
|
12195
12221
|
* @param version
|
|
@@ -12197,10 +12223,21 @@ interface IIPCMethods {
|
|
|
12197
12223
|
reportSDKInfo(version: {
|
|
12198
12224
|
[name: string]: string;
|
|
12199
12225
|
}): void;
|
|
12226
|
+
}
|
|
12227
|
+
/**
|
|
12228
|
+
* 约束跨平台、跨进程通信方法定义,以便于代码检查
|
|
12229
|
+
*/
|
|
12230
|
+
interface IIPCMethods {
|
|
12200
12231
|
/**
|
|
12201
|
-
*
|
|
12232
|
+
* 建立连接
|
|
12233
|
+
* @param token
|
|
12234
|
+
* @param reconnectKickEnable
|
|
12202
12235
|
*/
|
|
12203
|
-
|
|
12236
|
+
connect(token: string, reconnectKickEnable: boolean, openCallPlus: boolean, traceId: string): Promise<RCResult<string>>;
|
|
12237
|
+
/**
|
|
12238
|
+
* 忽视缓存,重新请求导航数据
|
|
12239
|
+
*/
|
|
12240
|
+
refetchNaviInfo(): Promise<RCResult<INaviInfo | null>>;
|
|
12204
12241
|
/**
|
|
12205
12242
|
* 获取历史消息
|
|
12206
12243
|
*/
|
|
@@ -12336,12 +12373,6 @@ interface IIPCMethods {
|
|
|
12336
12373
|
* 断开连接
|
|
12337
12374
|
*/
|
|
12338
12375
|
disconnect(closeDB?: boolean, disablePush?: boolean): Promise<RCResult>;
|
|
12339
|
-
/**
|
|
12340
|
-
* 消息注册
|
|
12341
|
-
* @description
|
|
12342
|
-
* 消息注册需在应用初始化完成前进行,否则在搭配 C++ 协议栈使用时,本端发出的消息将不默认作为未知消息处理,不存储、不计数
|
|
12343
|
-
*/
|
|
12344
|
-
registerMessageType(objectName: string, params: MessageTypeDescription): void;
|
|
12345
12376
|
/**
|
|
12346
12377
|
* 加入聊天室
|
|
12347
12378
|
* @param chatroomId 聊天室 id
|
|
@@ -12498,24 +12529,6 @@ interface IIPCMethods {
|
|
|
12498
12529
|
* 多端同步会话的已读时间 (V4)
|
|
12499
12530
|
*/
|
|
12500
12531
|
updateConversationReadTime(conversation: IConversationIdentifier, timestamp: number): Promise<RCResult>;
|
|
12501
|
-
/**
|
|
12502
|
-
* 获取服务器时间
|
|
12503
|
-
*/
|
|
12504
|
-
getServerTime(): number;
|
|
12505
|
-
/**
|
|
12506
|
-
* 获取设备 ID
|
|
12507
|
-
*/
|
|
12508
|
-
getDeviceId(): string;
|
|
12509
|
-
/**
|
|
12510
|
-
* 获取当前 userId
|
|
12511
|
-
*/
|
|
12512
|
-
getCurrentUserId(): string;
|
|
12513
|
-
/**
|
|
12514
|
-
* 设置用户在线状态监听器
|
|
12515
|
-
*/
|
|
12516
|
-
setUserStatusListener(config: {
|
|
12517
|
-
userIds: string[];
|
|
12518
|
-
}, listener: Function): void;
|
|
12519
12532
|
/**
|
|
12520
12533
|
* 设置当前用户在线状态
|
|
12521
12534
|
*/
|
|
@@ -12624,6 +12637,10 @@ interface IIPCMethods {
|
|
|
12624
12637
|
* 删除时间戳前的未读数
|
|
12625
12638
|
*/
|
|
12626
12639
|
clearUnreadCountByTimestamp(conversation: IConversationIdentifier, timestamp: number): Promise<RCResult>;
|
|
12640
|
+
/**
|
|
12641
|
+
* 标记远程会话为已读,发送 SRSMsg 消息到服务器,并在发送成功后清理本地未读数信息
|
|
12642
|
+
*/
|
|
12643
|
+
markRemoteConversationAsRead(identifier: IConversationIdentifier, sendOpts: IMessageSendOptions, traceId: string): Promise<RCResult>;
|
|
12627
12644
|
/**
|
|
12628
12645
|
* 获取所有群聊会话 @ 消息未读数,不包含超级群会话
|
|
12629
12646
|
*/
|
|
@@ -12632,11 +12649,11 @@ interface IIPCMethods {
|
|
|
12632
12649
|
/**
|
|
12633
12650
|
* 获取运行时的系统信息,仅限 Electron 平台可用
|
|
12634
12651
|
*/
|
|
12635
|
-
getOSInfo():
|
|
12652
|
+
getOSInfo(): Promise<RCResult<IOSInfo>>;
|
|
12636
12653
|
/**
|
|
12637
12654
|
* 获取应用主进程信息,仅限 Electron 平台可用
|
|
12638
12655
|
*/
|
|
12639
|
-
getMainProcessInfo():
|
|
12656
|
+
getMainProcessInfo(): Promise<RCResult<IProcessInfo>>;
|
|
12640
12657
|
/**
|
|
12641
12658
|
* 设置代理
|
|
12642
12659
|
*/
|
|
@@ -12957,14 +12974,15 @@ interface IIPCMethods {
|
|
|
12957
12974
|
|
|
12958
12975
|
/**
|
|
12959
12976
|
* 连接事件监听器
|
|
12960
|
-
* @typeParam T - onConnected 是否包含 fromSuspend 参数
|
|
12961
12977
|
*/
|
|
12962
|
-
declare type IConnectionListener
|
|
12978
|
+
declare type IConnectionListener = {
|
|
12963
12979
|
/**
|
|
12964
12980
|
* 连接成功
|
|
12965
12981
|
* @description 仅 Electron 平台会返回 processCache 参数,用于同步主进程缓存数据
|
|
12982
|
+
* @param fromSuspend 是否从暂停状态连接
|
|
12983
|
+
* @param processCache 主进程缓存数据,仅 Electron 平台有效
|
|
12966
12984
|
*/
|
|
12967
|
-
onConnected
|
|
12985
|
+
onConnected(fromSuspend: boolean, processCache?: IProcessCache): void;
|
|
12968
12986
|
/**
|
|
12969
12987
|
* 连接中止,SDK 内部会进行重连
|
|
12970
12988
|
* @param code 中止原因
|
|
@@ -13237,7 +13255,34 @@ interface IUserGroupStatusInfo {
|
|
|
13237
13255
|
userGroupUnBindChannel?: IChannelAndUserGroupChangeData[];
|
|
13238
13256
|
}
|
|
13239
13257
|
|
|
13240
|
-
|
|
13258
|
+
/** [EN]
|
|
13259
|
+
* Asynchronous task result
|
|
13260
|
+
* @category Interface
|
|
13261
|
+
*/
|
|
13262
|
+
/**
|
|
13263
|
+
* 异步任务结果
|
|
13264
|
+
* @description 该结构即将废弃,请使用 {@link RCResult} 替代
|
|
13265
|
+
* @category Interface
|
|
13266
|
+
* @deprecated 请使用 {@link RCResult} 替代
|
|
13267
|
+
*/
|
|
13268
|
+
interface IAsyncRes<T = void> extends Pick<RCResult<T>, 'code' | 'data'> {
|
|
13269
|
+
msg?: string;
|
|
13270
|
+
}
|
|
13271
|
+
/** [EN]
|
|
13272
|
+
* Asynchronous task result
|
|
13273
|
+
* @description
|
|
13274
|
+
* Handles expected exceptions through `Promise.resolve`, thereby exposing unexpected exceptions through Uncatch Promise Error
|
|
13275
|
+
* @category Type
|
|
13276
|
+
*/
|
|
13277
|
+
/**
|
|
13278
|
+
* 异步任务结果
|
|
13279
|
+
* @description
|
|
13280
|
+
* 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
|
|
13281
|
+
* @category Type
|
|
13282
|
+
*/
|
|
13283
|
+
declare type IPromiseResult<T = void> = Promise<IAsyncRes<T>>;
|
|
13284
|
+
|
|
13285
|
+
interface IEngineWatcher extends IConnectionListener {
|
|
13241
13286
|
/**
|
|
13242
13287
|
* @param message 消息
|
|
13243
13288
|
* @param leftCount 参数废弃,值始终为 undefined
|
|
@@ -13623,21 +13668,18 @@ declare abstract class BasicLogger {
|
|
|
13623
13668
|
protected readonly _appkey: string;
|
|
13624
13669
|
protected readonly _id: string;
|
|
13625
13670
|
protected readonly _type: LogType;
|
|
13626
|
-
|
|
13671
|
+
readonly proxy: LogDBProxy;
|
|
13627
13672
|
/**
|
|
13628
13673
|
* traceId 计数
|
|
13629
13674
|
*/
|
|
13630
13675
|
private static _traceIdCount;
|
|
13631
|
-
constructor(_appkey: string, _id: string, _type: LogType,
|
|
13676
|
+
constructor(_appkey: string, _id: string, _type: LogType, proxy: LogDBProxy);
|
|
13632
13677
|
protected _write(logData: ILogData): void;
|
|
13633
13678
|
/**
|
|
13634
13679
|
* 生成事务追踪 ID,全局唯一,便于跨进程、异步事务追踪,需要考虑多进程
|
|
13635
13680
|
* @returns
|
|
13636
13681
|
*/
|
|
13637
13682
|
createTraceId(): string;
|
|
13638
|
-
/**
|
|
13639
|
-
* @deprecated 请使用 genTId 替代
|
|
13640
|
-
*/
|
|
13641
13683
|
/**
|
|
13642
13684
|
* 获取当前进程的 sessionId,全局唯一
|
|
13643
13685
|
* @returns
|
|
@@ -13792,9 +13834,12 @@ declare abstract class SSEClient {
|
|
|
13792
13834
|
|
|
13793
13835
|
interface IStorage {
|
|
13794
13836
|
setItem(key: string, value: string): void;
|
|
13837
|
+
/**
|
|
13838
|
+
* 因 SDK 设计需要,读取时需使用同步方法,SDK 只在必要时会从缓存中读取,不会频繁调用,大部分时间读取内存数据。
|
|
13839
|
+
* @param key
|
|
13840
|
+
*/
|
|
13795
13841
|
getItem(key: string): string | null;
|
|
13796
13842
|
removeItem(key: string): void;
|
|
13797
|
-
clear(): void;
|
|
13798
13843
|
}
|
|
13799
13844
|
interface IWebSocket {
|
|
13800
13845
|
id: number;
|
|
@@ -14085,20 +14130,6 @@ declare enum RTCJoinType {
|
|
|
14085
14130
|
COEXIST = 2
|
|
14086
14131
|
}
|
|
14087
14132
|
|
|
14088
|
-
/**
|
|
14089
|
-
* @deprecated
|
|
14090
|
-
*/
|
|
14091
|
-
declare function init(logger: ILogger): void;
|
|
14092
|
-
/** @deprecated */
|
|
14093
|
-
declare const logger: {
|
|
14094
|
-
init: typeof init;
|
|
14095
|
-
info: (tagId: string, logObj?: Object | undefined, logExtens?: any) => void;
|
|
14096
|
-
debug: (tagId: string, logObj?: Object | undefined, logExtens?: any) => void;
|
|
14097
|
-
warn: (tagId: string, logObj?: Object | undefined, logExtens?: any) => void;
|
|
14098
|
-
error: (tagId: string, logObj?: Object | undefined, logExtens?: any) => void;
|
|
14099
|
-
fatal: (tagId: string, logObj?: Object | undefined, logExtens?: any) => void;
|
|
14100
|
-
};
|
|
14101
|
-
|
|
14102
14133
|
/**
|
|
14103
14134
|
* 事件监听器
|
|
14104
14135
|
* @category Type
|
|
@@ -14220,6 +14251,14 @@ declare const map: (source: any[], event: Function) => any[];
|
|
|
14220
14251
|
* @deprecated
|
|
14221
14252
|
*/
|
|
14222
14253
|
declare const isNull: (val: any) => boolean;
|
|
14254
|
+
/**
|
|
14255
|
+
* @deprecated 使用 UUId.gen() 替代
|
|
14256
|
+
*/
|
|
14257
|
+
declare const getUUID: () => string;
|
|
14258
|
+
/**
|
|
14259
|
+
* @deprecated 使用 UUId.genWithLen(22) 替代
|
|
14260
|
+
*/
|
|
14261
|
+
declare const getUUID22: () => string;
|
|
14223
14262
|
|
|
14224
14263
|
/** @deprecated */
|
|
14225
14264
|
declare type CodecPBMaps = {
|
|
@@ -14349,6 +14388,12 @@ declare class PluginContext {
|
|
|
14349
14388
|
* @deprecated
|
|
14350
14389
|
*/
|
|
14351
14390
|
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions): Promise<RCResult<IReceivedMessage>>;
|
|
14391
|
+
/**
|
|
14392
|
+
* 发送消息
|
|
14393
|
+
* @param identifier 会话标识
|
|
14394
|
+
* @param options 消息发送配置
|
|
14395
|
+
* @returns 发送结果
|
|
14396
|
+
*/
|
|
14352
14397
|
sendMessageTo(identifier: IConversationIdentifier, options: IMessageSendOptions): Promise<RCResult<IReceivedMessage>>;
|
|
14353
14398
|
/**
|
|
14354
14399
|
* 消息注册
|
|
@@ -14693,6 +14738,7 @@ declare class BaseModule {
|
|
|
14693
14738
|
*/
|
|
14694
14739
|
protected readonly logger: BasicLogger;
|
|
14695
14740
|
/**
|
|
14741
|
+
* 目前为 engine 实例
|
|
14696
14742
|
* @hidden
|
|
14697
14743
|
*/
|
|
14698
14744
|
protected readonly ctx: IModuleContext;
|
|
@@ -14872,7 +14918,9 @@ declare class DataHosting extends BaseModule {
|
|
|
14872
14918
|
/**
|
|
14873
14919
|
* 会话聊天模块
|
|
14874
14920
|
*/
|
|
14875
|
-
interface IChatService extends Pick<IIPCMethods, 'getTotalUnreadCount' | 'getConversation' | 'batchSetConversationToTop' | 'batchSetConversationNotificationLevel' | 'getConversationNotificationLevel' | 'setConversationTypeNotificationLevel' | 'getConversationTypeNotificationLevel' | 'clearAllSGUnreadCount' | 'deleteRemoteMessage' | 'deleteRemoteMessageByTimestamp' | 'batchClearRemoteHistoryMessages' | 'sendReadReceiptResponseV5' | 'getMessageReadReceiptInfoV5ByIdentifiers' | 'getMessagesReadReceiptUsersByPageV5' | 'getMessagesReadReceiptByUsersV5' | 'searchConversationByContent' | 'requestSpeechToTextForMessage' | 'setMessageSpeechToTextVisible' | 'addTagForConversations' | 'getTagsForConversation' | 'setConversationStatusInTag' | 'removeTagForConversations' | 'removeTagsForConversation' | 'getConversationListByTag' | 'getUnreadCountByTag' | 'getUntaggedConversationListByPage' | 'batchSetConversationTranslateStrategy' | 'modifyMessageWithParams' | 'refreshReferenceMessageWithParams' | 'batchDeleteConversations' | 'sendReadReceiptV2' | 'syncRemoteConversations' | 'sendUltraGroupTypingStatus' | 'getUltraGroupList' | 'getRemoteMessagesByUIds' | 'getUGUnreadMentionedDigest' | 'getHistoryMessagesByObjectNames' | 'getContinuousMessages' | 'getMessagesAroundTimestamp' | 'deleteLocalUGMessagesForAllChannel' | 'updateUGMessageExpansion' | 'setUGDefaultNotificationLevel' | 'getUGDefaultNotificationLevel' | 'getUnreadMentionedMessages' | 'getUnreadMentionedCount' | 'getAllUnreadMentionedCount' | 'getTotalUnreadCountByLevels' | 'getConversationUnreadCount' | 'getFirstUnreadMessage' | 'getFirstUnreadMessageDigest' | 'getUGUnreadCountForAllChannels' | 'getUGUnreadInfoList' | 'getUGFirstUnreadMessageDigest' | 'getConversations' | 'clearConversationUnreadCount' | 'getTopConversationList' | 'getUnreadConversationList' | 'getConversationListByPageIndex' | 'getAllConversationList' | 'getConversationListByTimestamp' | 'clearConversations' | 'getBlockedConversationList' | 'getBlockedUGList' | 'saveEditedMessageDraft' | 'getEditedMessageDraft' | 'clearEditedMessageDraft' | 'getUnreadMentionMeConversationList' | 'sendUltraGroupTypingStatus' | 'updateConversationReadTime' | 'clearUnreadCountByTimestamp' | 'getMessageReader' | 'getMessageReadReceiptV4' | 'sendReadReceiptMessageV4' | 'getConversationsIncludingRobots'> {
|
|
14921
|
+
interface IChatService extends Pick<IIPCMethods, 'getTotalUnreadCount' | 'getConversation' | 'batchSetConversationToTop' | 'batchSetConversationNotificationLevel' | 'getConversationNotificationLevel' | 'setConversationTypeNotificationLevel' | 'getConversationTypeNotificationLevel' | 'clearAllSGUnreadCount' | 'deleteRemoteMessage' | 'deleteRemoteMessageByTimestamp' | 'batchClearRemoteHistoryMessages' | 'sendReadReceiptResponseV5' | 'getMessageReadReceiptInfoV5ByIdentifiers' | 'getMessagesReadReceiptUsersByPageV5' | 'getMessagesReadReceiptByUsersV5' | 'searchConversationByContent' | 'requestSpeechToTextForMessage' | 'setMessageSpeechToTextVisible' | 'addTagForConversations' | 'getTagsForConversation' | 'setConversationStatusInTag' | 'removeTagForConversations' | 'removeTagsForConversation' | 'getConversationListByTag' | 'getUnreadCountByTag' | 'getUntaggedConversationListByPage' | 'batchSetConversationTranslateStrategy' | 'modifyMessageWithParams' | 'refreshReferenceMessageWithParams' | 'batchDeleteConversations' | 'sendReadReceiptV2' | 'syncRemoteConversations' | 'sendUltraGroupTypingStatus' | 'getUltraGroupList' | 'getRemoteMessagesByUIds' | 'getUGUnreadMentionedDigest' | 'getHistoryMessagesByObjectNames' | 'getContinuousMessages' | 'getMessagesAroundTimestamp' | 'deleteLocalUGMessagesForAllChannel' | 'updateUGMessageExpansion' | 'setUGDefaultNotificationLevel' | 'getUGDefaultNotificationLevel' | 'getUnreadMentionedMessages' | 'getUnreadMentionedCount' | 'getAllUnreadMentionedCount' | 'getTotalUnreadCountByLevels' | 'getConversationUnreadCount' | 'getFirstUnreadMessage' | 'getFirstUnreadMessageDigest' | 'getUGUnreadCountForAllChannels' | 'getUGUnreadInfoList' | 'getUGFirstUnreadMessageDigest' | 'getConversations' | 'clearConversationUnreadCount' | 'markRemoteConversationAsRead' | 'getTopConversationList' | 'getUnreadConversationList' | 'getConversationListByPageIndex' | 'getAllConversationList' | 'getConversationListByTimestamp' | 'clearConversations' | 'getBlockedConversationList' | 'getBlockedUGList' | 'saveEditedMessageDraft' | 'getEditedMessageDraft' | 'clearEditedMessageDraft' | 'getUnreadMentionMeConversationList' | 'sendUltraGroupTypingStatus' | 'updateConversationReadTime' | 'clearUnreadCountByTimestamp' | 'getMessageReader' | 'getMessageReadReceiptV4' | 'sendReadReceiptMessageV4' | 'getConversationsIncludingRobots'> {
|
|
14922
|
+
/** 超级群是否已同步完成 */
|
|
14923
|
+
get ugSynced(): boolean;
|
|
14876
14924
|
getRealtimeConversations(count: number, startTime: number, order: 0 | 1): Promise<RCResult<IReceivedConversation[]>>;
|
|
14877
14925
|
getRealtimeConTotalUnreadCount(): Promise<RCResult<number>>;
|
|
14878
14926
|
clearRealtimeConUnreadCount(identifier: IConversationIdentifier): Promise<RCResult>;
|
|
@@ -14927,7 +14975,7 @@ declare class ConversationListLoader extends BaseModule {
|
|
|
14927
14975
|
get isLoading(): boolean;
|
|
14928
14976
|
/**
|
|
14929
14977
|
* 加载会话列表
|
|
14930
|
-
* @param count
|
|
14978
|
+
* @param count 获取数量,有效值 [1, 100]
|
|
14931
14979
|
*/
|
|
14932
14980
|
load(count: number): Promise<RCResult<IReceivedConversation[]>>;
|
|
14933
14981
|
}
|
|
@@ -14957,6 +15005,14 @@ declare class ChatModule extends BaseModule {
|
|
|
14957
15005
|
* @param timestamp 同步时间戳
|
|
14958
15006
|
*/
|
|
14959
15007
|
sendSyncReadStatusMessage(identifier: IConversationIdentifier, timestamp: number): Promise<RCResult>;
|
|
15008
|
+
/**
|
|
15009
|
+
* 清除会话消息未读数
|
|
15010
|
+
*/
|
|
15011
|
+
clearUnreadCount(identifier: IConversationIdentifier): Promise<RCResult>;
|
|
15012
|
+
/**
|
|
15013
|
+
* 清除全部会话消息未读数,不包含超级群会话
|
|
15014
|
+
*/
|
|
15015
|
+
clearAllUnreadCount(): Promise<RCResult>;
|
|
14960
15016
|
clearUnreadCountByTimestamp(identifier: IConversationIdentifier, timestamp: number): Promise<RCResult>;
|
|
14961
15017
|
/**
|
|
14962
15018
|
* 发送群已读回执请求(v1 版本)
|
|
@@ -14995,6 +15051,7 @@ declare class ChatModule extends BaseModule {
|
|
|
14995
15051
|
getMessageReadReceiptV4(conversation: IConversationIdentifier, messageUId: string): Promise<RCResult<IMessageReadReceiptV4Response>>;
|
|
14996
15052
|
batchGetMessageReadReceiptInfoV4(conversation: IConversationIdentifier, messageUIds: string[]): Promise<RCResult<IGroupReadReceiptData[]>>;
|
|
14997
15053
|
getConversationsIncludingRobots(options: IGetConversationsIncludingRobotsOption): Promise<RCResult<IReceivedConversation[]>>;
|
|
15054
|
+
markRemoteConversationAsRead(identifier: IConversationIdentifier): Promise<RCResult>;
|
|
14998
15055
|
}
|
|
14999
15056
|
|
|
15000
15057
|
declare class APIContext {
|
|
@@ -15033,10 +15090,6 @@ declare class APIContext {
|
|
|
15033
15090
|
* engine 内部日志工具
|
|
15034
15091
|
*/
|
|
15035
15092
|
readonly logger: BasicLogger;
|
|
15036
|
-
/**
|
|
15037
|
-
* 超级群同步完成记录
|
|
15038
|
-
*/
|
|
15039
|
-
private _ugSynced;
|
|
15040
15093
|
constructor(options: IAPIContextOption);
|
|
15041
15094
|
/**
|
|
15042
15095
|
* 安装使用插件,并初始化插件实例
|
|
@@ -15230,7 +15283,7 @@ declare class APIContext {
|
|
|
15230
15283
|
* @param traceId 追踪 ID
|
|
15231
15284
|
* @param onBefore 消息发送之前的回调,用于返回消息的 messageId
|
|
15232
15285
|
*/
|
|
15233
|
-
|
|
15286
|
+
sendMessageByPlugin(identifier: IConversationIdentifier, options: IMessageSendOptions, onBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
|
|
15234
15287
|
/**
|
|
15235
15288
|
* 发送消息
|
|
15236
15289
|
* @param identifier 会话标识
|
|
@@ -15340,14 +15393,6 @@ declare class APIContext {
|
|
|
15340
15393
|
* 获取超级群免打扰列表
|
|
15341
15394
|
*/
|
|
15342
15395
|
getBlockedUGList(): Promise<RCResult<IReceivedConversation[]>>;
|
|
15343
|
-
/**
|
|
15344
|
-
* 清除会话消息未读数
|
|
15345
|
-
*/
|
|
15346
|
-
clearUnreadCount(conversation: IConversationOption): Promise<RCResult>;
|
|
15347
|
-
/**
|
|
15348
|
-
* 清除全部会话消息未读数,不包含超级群会话
|
|
15349
|
-
*/
|
|
15350
|
-
clearAllUnreadCount(): Promise<RCResult>;
|
|
15351
15396
|
/**
|
|
15352
15397
|
* 获取指定会话消息未读数
|
|
15353
15398
|
*/
|
|
@@ -15563,12 +15608,6 @@ declare class APIContext {
|
|
|
15563
15608
|
* 删除所有会话,目前仅 v2 提供
|
|
15564
15609
|
*/
|
|
15565
15610
|
clearConversations(conversationTypes?: ConversationType[], tag?: string): Promise<RCResult>;
|
|
15566
|
-
/**
|
|
15567
|
-
* 设置用户连接状态监听器
|
|
15568
|
-
*/
|
|
15569
|
-
setUserStatusListener(config: {
|
|
15570
|
-
userIds: string[];
|
|
15571
|
-
}, listener: Function): void;
|
|
15572
15611
|
/**
|
|
15573
15612
|
* 添加用户黑名单
|
|
15574
15613
|
*/
|
|
@@ -15967,11 +16006,10 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
15967
16006
|
*/
|
|
15968
16007
|
declare type IUserSettingsModule = Pick<IIPCMethods, 'setTranslationLanguage' | 'getTranslationLanguage' | 'setAutoTranslateEnabled' | 'getAutoTranslateEnabled'>;
|
|
15969
16008
|
|
|
15970
|
-
declare type IIPCMethodsInEngine = Pick<IIPCMethods, 'searchMessagesWithParams' | 'createTag' | 'removeTag' | 'updateTag' | 'getTagList' | 'translateWithParams' | 'getFileUrl' | 'saveTextMessageDraft' | 'getTextMessageDraft' | 'clearTextMessageDraft' | 'getHistoryMessage' | 'clearLocalMessages' | 'deleteLocalMessages' | 'deleteLocalMessagesByTimestamp' | 'batchClearLocalMessagesByTimestamp' | 'insertMessage' | 'batchInsertMessage' | 'setMessageContent' | 'getLocalMessageCount' | 'recallMsg' | 'getSubscribeUsersOnlineStatus' | 'getSubscribeUserStatus' | 'subscribeUser' | 'unSubscribeUser' | 'getSubscribeUserList' | 'getUserProfiles' | 'getMyUserProfile' | 'updateMyUserProfile' | 'sendMessage' | 'connect' | 'disconnect' | 'addToBlacklist' | 'removeFromBlacklist' | 'getBlacklist' | 'getBlacklistStatus' | 'setMessageReceivedStatus' | 'setMessageSentStatus' | 'setCheckDuplicateMessage' | 'setProxy' | 'getProxy' | 'testProxy' | '
|
|
15971
|
-
declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContext {
|
|
16009
|
+
declare type IIPCMethodsInEngine = Pick<IIPCMethods, 'searchMessagesWithParams' | 'createTag' | 'removeTag' | 'updateTag' | 'getTagList' | 'translateWithParams' | 'getFileUrl' | 'saveTextMessageDraft' | 'getTextMessageDraft' | 'clearTextMessageDraft' | 'getHistoryMessage' | 'clearLocalMessages' | 'deleteLocalMessages' | 'deleteLocalMessagesByTimestamp' | 'batchClearLocalMessagesByTimestamp' | 'insertMessage' | 'batchInsertMessage' | 'setMessageContent' | 'getLocalMessageCount' | 'recallMsg' | 'getSubscribeUsersOnlineStatus' | 'getSubscribeUserStatus' | 'subscribeUser' | 'unSubscribeUser' | 'getSubscribeUserList' | 'getUserProfiles' | 'getMyUserProfile' | 'updateMyUserProfile' | 'sendMessage' | 'refetchNaviInfo' | 'connect' | 'disconnect' | 'addToBlacklist' | 'removeFromBlacklist' | 'getBlacklist' | 'getBlacklistStatus' | 'setMessageReceivedStatus' | 'setMessageSentStatus' | 'setCheckDuplicateMessage' | 'setProxy' | 'getProxy' | 'testProxy' | 'getFileToken' | 'rtcSignaling' | 'rtcPing' | 'setCallInfo' | 'getUserStatus' | 'searchConversationByContentWithAllChannel' | 'getAllRobots' | 'getOSInfo' | 'getMainProcessInfo'>;
|
|
16010
|
+
declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContext, IIPCMethodsWithoutResult {
|
|
15972
16011
|
protected readonly _watcher: IEngineWatcher;
|
|
15973
16012
|
protected readonly _options: IAPIContextOption;
|
|
15974
|
-
private readonly _logger;
|
|
15975
16013
|
/**
|
|
15976
16014
|
* 连接时间
|
|
15977
16015
|
*/
|
|
@@ -15992,7 +16030,7 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
15992
16030
|
get initOption(): IAPIContextOption;
|
|
15993
16031
|
abstract get connectionStatus(): RCConnectionStatus;
|
|
15994
16032
|
abstract get userId(): string;
|
|
15995
|
-
get logger(): BasicLogger;
|
|
16033
|
+
abstract get logger(): BasicLogger;
|
|
15996
16034
|
abstract get usingCppEngine(): boolean;
|
|
15997
16035
|
/**
|
|
15998
16036
|
* 用户信息托管模块
|
|
@@ -16002,17 +16040,14 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
16002
16040
|
* 引擎初始化
|
|
16003
16041
|
* @param _appkey
|
|
16004
16042
|
*/
|
|
16005
|
-
constructor(_watcher: IEngineWatcher, _options: IAPIContextOption
|
|
16043
|
+
constructor(_watcher: IEngineWatcher, _options: IAPIContextOption);
|
|
16006
16044
|
protected _rtcSignalingListener?: (buffer: Uint8Array) => void;
|
|
16007
16045
|
/**
|
|
16008
16046
|
* 注册 RTC KV 变更监听器
|
|
16009
16047
|
* @param listener
|
|
16010
16048
|
*/
|
|
16011
16049
|
registerRTCSignalingListener(listener: ((buffer: Uint8Array) => void) | undefined): void;
|
|
16012
|
-
|
|
16013
|
-
* 忽视缓存,重新请求导航数据
|
|
16014
|
-
*/
|
|
16015
|
-
abstract refetchNaviInfo(): IPromiseResult<INaviInfo | null>;
|
|
16050
|
+
abstract refetchNaviInfo(): Promise<RCResult<INaviInfo | null>>;
|
|
16016
16051
|
/**
|
|
16017
16052
|
* 为非 engine 包创建 logger 工具实例
|
|
16018
16053
|
*/
|
|
@@ -16029,9 +16064,7 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
16029
16064
|
* 发送 SDK 版本
|
|
16030
16065
|
* @param versionInfo
|
|
16031
16066
|
*/
|
|
16032
|
-
abstract reportSDKInfo(versionInfo:
|
|
16033
|
-
[name: string]: string;
|
|
16034
|
-
}): void;
|
|
16067
|
+
abstract reportSDKInfo(versionInfo: Record<string, string>): void;
|
|
16035
16068
|
abstract getHistoryMessage(conversation: IConversationOption, options: Required<IGetHistoryMessageOption>, fromLocal: boolean): Promise<RCResult<{
|
|
16036
16069
|
list: IReceivedMessage[];
|
|
16037
16070
|
hasMore: boolean;
|
|
@@ -16116,12 +16149,6 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
16116
16149
|
* @param options
|
|
16117
16150
|
*/
|
|
16118
16151
|
abstract sendUltraMessage(identifier: IConversationIdentifier, options: IMessageSendOptions, traceId: string, onSendBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
|
|
16119
|
-
/**
|
|
16120
|
-
* 设置用户在线状态监听器
|
|
16121
|
-
*/
|
|
16122
|
-
abstract setUserStatusListener(config: {
|
|
16123
|
-
userIds: string[];
|
|
16124
|
-
}, listener: Function): void;
|
|
16125
16152
|
/**
|
|
16126
16153
|
* 设置当前用户在线状态
|
|
16127
16154
|
*/
|
|
@@ -16215,15 +16242,15 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
16215
16242
|
/**
|
|
16216
16243
|
* 获取运行时的系统信息,仅限 Electron 平台可用
|
|
16217
16244
|
*/
|
|
16218
|
-
abstract getOSInfo():
|
|
16245
|
+
abstract getOSInfo(): Promise<RCResult<IOSInfo>>;
|
|
16219
16246
|
/**
|
|
16220
16247
|
* 获取当前渲染进程信息,仅限 Electron 平台可用
|
|
16221
16248
|
*/
|
|
16222
|
-
abstract getProcessInfo():
|
|
16249
|
+
abstract getProcessInfo(): Promise<RCResult<IProcessInfo>>;
|
|
16223
16250
|
/**
|
|
16224
16251
|
* 获取应用主进程信息,仅限 Electron 平台可用
|
|
16225
16252
|
*/
|
|
16226
|
-
abstract getMainProcessInfo():
|
|
16253
|
+
abstract getMainProcessInfo(): Promise<RCResult<IProcessInfo>>;
|
|
16227
16254
|
/**
|
|
16228
16255
|
* 设置融云消息重排开关
|
|
16229
16256
|
*/
|
|
@@ -16417,36 +16444,4 @@ declare const assert: (key: string, value: any, validator: AssertRules | ((value
|
|
|
16417
16444
|
*/
|
|
16418
16445
|
declare const validate: (key: string, value: any, validator: AssertRules | ((value?: any) => boolean), required?: boolean) => boolean;
|
|
16419
16446
|
|
|
16420
|
-
|
|
16421
|
-
* @deprecated 使用 UUId.gen() 替代
|
|
16422
|
-
*/
|
|
16423
|
-
declare const getUUID: () => string;
|
|
16424
|
-
/**
|
|
16425
|
-
* @deprecated 使用 UUId.genWithLen(22) 替代
|
|
16426
|
-
*/
|
|
16427
|
-
declare const getUUID22: () => string;
|
|
16428
|
-
|
|
16429
|
-
declare class AppStorage {
|
|
16430
|
-
private _cache;
|
|
16431
|
-
private _storageKey;
|
|
16432
|
-
private _rootStorage;
|
|
16433
|
-
constructor(key: string);
|
|
16434
|
-
_get(): any;
|
|
16435
|
-
_set(cache: {
|
|
16436
|
-
[id: string]: any;
|
|
16437
|
-
}): void;
|
|
16438
|
-
set(key: string, value: any): void;
|
|
16439
|
-
remove(key: string): void;
|
|
16440
|
-
clear(): void;
|
|
16441
|
-
get(key: string): any;
|
|
16442
|
-
getKeys(): string[];
|
|
16443
|
-
getValues(): any;
|
|
16444
|
-
/**
|
|
16445
|
-
* 全量更新
|
|
16446
|
-
*/
|
|
16447
|
-
update(value?: {
|
|
16448
|
-
[key: string]: any;
|
|
16449
|
-
}): void;
|
|
16450
|
-
}
|
|
16451
|
-
|
|
16452
|
-
export { APIContext, AbsCodec, AppSettings, AppStorage, AreaCode, AssertRules, BasicEngine, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationBatchDeletionParams, ConversationListLoader, ConversationType, DataHosting, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FilterRobotType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, GroupReadReceiptVersion, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAppPushConfig, IAsyncRes, IAuditInfoKeyInMessage, IAuditInfoValueInMessage, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatService, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomErrorKeys, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomService, IChatroomUser, IChatroomUserChangeInfo, IClearMessageOption, ICombineMessageContent, ICombineV2MessageContent, ICombinedMessage, ICommandMessageContent, IConnectionStatusListener, IConversationFilter, IConversationIdentifier, IConversationListLoaderOptions, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagFilter, IConversationTagListener, IConversationUnreadCount, IConvertHQVoiceMessageToTextOption, IConvertSpeechToTextOption, IConvertVoiceMessageToTextOption, ICreateGroupFail, IDataHostingService, IDeletedExpansion, IDownloadAuth, IEditedMessageDraft, IEnginRefreshReferenceMessageResult, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraDataKeyInMessage, IFileMessageContent, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGIFMessageContent, IGetConversationListByTimestampParams, IGetConversationsIncludingRobotsOption, IGetGroupMembersOption, IGetHistoryMessageOption, IGetHistoryMessageResult, IGetHistoryMessagesByTypesOption, IGetUltraGroupListOption, IGetUnreadMentionMeConversationListParams, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupNotificationMessageContent, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHQVoiceMessageContent, IHarmonyOSPushConfig, IIPCMethods, IImageMessageContent, IInformationNotificationMessageContent, IInsertMessage, ILocalTagStatus, ILocationMessageContent, ILogData, ILogger, IMemberInviteResponse, IMentionedInfoKeyInMessage, IMessageAttrsForUpdateExpansion, IMessageDesc, IMessageExtraData, IMessageFilter, IMessageIdentifier, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, IMessageSendOptions, IModifyMessageParams, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPlatformOnlineStatus, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallCommandMessageContent, IRecallMsgOptions, IRecallNotificationMessageContent, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IReferContentInMessage, IReferContentKeyInMessage, IReferenceMessageContent, IRefreshReferenceMessageParams, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRichContentMessageContent, IRobotInfo, IRuntime, ISearchMessageParams, ISearchMessagesResult, ISendMsgOptions, IServerGroupBaseInfo, ISightMessageContent, ISpeechToTextInfo, ISpeechToTextResponse, IStorage, IStreamMessageContent, IStreamMessageResponseChunkData, IStreamMessageResponseEventData, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserOnlineStatus, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITextMessageContent, ITimeRange, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraUnreadMsg, IUpdateItem, IUpdateMyProfileFail, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserExtraKeyInMessage, IUserExtraValueInMessage, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IUserSettingsChangedEvent, IUserSettingsModule, IVoiceMessageContent, IWatcher, IiOSPushConfig, InnerInsertMessageParams, InnerTransParam, InterruptionLevel, ItypingStateListener, KVString, LogDBProxy, LogL, LogLevel, LogSource, Log as LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_U32_INTEGER, MAX_UPLOAD_FILE_SIZE, MentionedInfo, MentionedType, MessageAuditType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageRegisterParams, MessageType, MessageTypeDescription, NotificationLevel, NotificationStatus, OnlineStatus, OperateStatus, Codec$1 as PBCodec, Platform, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReadReceiptInfoV5, ReadReceiptResponseV5, ReadReceiptUser, ReadReceiptUsersOption, ReadReceiptUsersResult, ReceivedStatus, ReferenceMessageStatus, SSEModule, SentStatus, SpeechToTextStatus, StreamMessageResponseEventType, SubscribeOperationType, SubscribeType, SuspendablePromise, TranslateInfo, TranslateItem, TranslateMessageParam, TranslateMessagesParams, TranslateMode, TranslateStatus, TranslateStrategy, TranslateTextParam, TranslateTextsParams, UPLOAD_FILE_CHUNK_SIZE, UUId, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod, UserProfileVisibility, UserSettingsChangedKey, UserType, Validator, VersionManage, assert, createLogDBProxy, fail, fixUrlProtocol, forEach, getMessageTypeDescription, getUUID, getUUID22, hasMessageTypeDescription, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, promiseWithResolvers, runtime, trans2IReceivedStatusInfo, trans2NotificationLevel, trans2NotificationStatus, transformReceivedStatusFlag, usingCppEngine, validate };
|
|
16447
|
+
export { APIContext, AbsCodec, AppSettings, AreaCode, AssertRules, BasicEngine, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationBatchDeletionParams, ConversationListLoader, ConversationType, DataHosting, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FilterRobotType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, GroupReadReceiptVersion, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAppPushConfig, IAsyncRes, IAuditInfoKeyInMessage, IAuditInfoValueInMessage, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatService, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomErrorKeys, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomService, IChatroomUser, IChatroomUserChangeInfo, IClearMessageOption, ICombineMessageContent, ICombineV2MessageContent, ICombinedMessage, ICommandMessageContent, IConnectionStatusListener, IConversationFilter, IConversationIdentifier, IConversationListLoaderOptions, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagFilter, IConversationTagListener, IConversationUnreadCount, IConvertHQVoiceMessageToTextOption, IConvertSpeechToTextOption, IConvertVoiceMessageToTextOption, ICreateGroupFail, IDataHostingService, IDeletedExpansion, IDownloadAuth, IEditedMessageDraft, IEnginRefreshReferenceMessageResult, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraDataKeyInMessage, IFileMessageContent, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGIFMessageContent, IGetConversationListByTimestampParams, IGetConversationsIncludingRobotsOption, IGetGroupMembersOption, IGetHistoryMessageOption, IGetHistoryMessageResult, IGetHistoryMessagesByTypesOption, IGetUltraGroupListOption, IGetUnreadMentionMeConversationListParams, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupNotificationMessageContent, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHQVoiceMessageContent, IHarmonyOSPushConfig, IIPCMethods, IIPCMethodsSync, IIPCMethodsWithoutResult, IImageMessageContent, IInformationNotificationMessageContent, IInsertMessage, ILocalTagStatus, ILocationMessageContent, ILogData, ILogger, IMemberInviteResponse, IMentionedInfoKeyInMessage, IMessageAttrsForUpdateExpansion, IMessageDesc, IMessageExtraData, IMessageFilter, IMessageIdentifier, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, IMessageSendOptions, IModifyMessageParams, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPlatformOnlineStatus, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallCommandMessageContent, IRecallMsgOptions, IRecallNotificationMessageContent, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IReferContentInMessage, IReferContentKeyInMessage, IReferenceMessageContent, IRefreshReferenceMessageParams, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRichContentMessageContent, IRobotInfo, IRuntime, ISearchMessageParams, ISearchMessagesResult, ISendMsgOptions, IServerGroupBaseInfo, ISightMessageContent, ISpeechToTextInfo, ISpeechToTextResponse, IStorage, IStreamMessageContent, IStreamMessageResponseChunkData, IStreamMessageResponseEventData, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserOnlineStatus, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITextMessageContent, ITimeRange, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraUnreadMsg, IUpdateItem, IUpdateMyProfileFail, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserExtraKeyInMessage, IUserExtraValueInMessage, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IUserSettingsChangedEvent, IUserSettingsModule, IVoiceMessageContent, IWatcher, IiOSPushConfig, InnerInsertMessageParams, InnerTransParam, InterruptionLevel, ItypingStateListener, KVString, LogDBProxy, LogL, LogLevel, LogSource, Log as LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_U32_INTEGER, MAX_UPLOAD_FILE_SIZE, MentionedInfo, MentionedType, MessageAuditType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageRegisterParams, MessageType, MessageTypeDescription, NotificationLevel, NotificationStatus, OnlineStatus, OperateStatus, Codec$1 as PBCodec, Platform, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReadReceiptInfoV5, ReadReceiptResponseV5, ReadReceiptUser, ReadReceiptUsersOption, ReadReceiptUsersResult, ReceivedStatus, ReferenceMessageStatus, SSEModule, SentStatus, SpeechToTextStatus, StreamMessageResponseEventType, SubscribeOperationType, SubscribeType, SuspendablePromise, TranslateInfo, TranslateItem, TranslateMessageParam, TranslateMessagesParams, TranslateMode, TranslateStatus, TranslateStrategy, TranslateTextParam, TranslateTextsParams, UPLOAD_FILE_CHUNK_SIZE, UUId, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod, UserProfileVisibility, UserSettingsChangedKey, UserType, Validator, VersionManage, assert, createLogDBProxy, fail, fixUrlProtocol, forEach, getMessageTypeDescription, getUUID, getUUID22, hasMessageTypeDescription, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidTargetId, map, notEmptyArray, notEmptyObject, notEmptyString, ok, promiseWithResolvers, runtime, trans2IReceivedStatusInfo, trans2NotificationLevel, trans2NotificationStatus, transformReceivedStatusFlag, usingCppEngine, validate };
|