@rongcloud/engine 5.32.1-c-test-alpha.1 → 5.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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 IConversationOption {
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 IConversationOption {
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 IConversationOption {
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
- * @category Interface
6435
+ * 内部消息结构定义,上面会携带一些不适合透漏给业务层的字段定义,用于内部业务处理。
6436
+ * @hidden
6425
6437
  */
6426
- interface IReceivedMessage<T = any> {
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 IConversationOption {
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: IConversationOption;
7464
+ conversation: IConversationIdentifier;
7430
7465
  }
7431
7466
  /**
7432
7467
  * 刷新引用消息参数
@@ -7440,7 +7475,7 @@ interface IRefreshReferenceMessageParams {
7440
7475
  /**
7441
7476
  * 会话信息
7442
7477
  */
7443
- conversationIdentifier: IConversationOption;
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<K extends T>(emitter: EventDispatcher<K>): void;
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: IConversationOption;
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: IConversationOption;
12072
+ identifier: IConversationIdentifier;
12057
12073
  /** 消息唯一 ID */
12058
12074
  messageUId: string;
12059
12075
  }
@@ -12164,6 +12180,94 @@ interface IExpansionMsgContent {
12164
12180
  clear?: number;
12165
12181
  }
12166
12182
 
12183
+ /** [EN]
12184
+ * Log level definitions
12185
+ * @category Enum
12186
+ */
12187
+ /**
12188
+ * 日志打印等级定义
12189
+ * @category Enum
12190
+ */
12191
+ declare enum LogL {
12192
+ /**
12193
+ * IM 质量数据日志,控制台不打印
12194
+ */
12195
+ STATISTICS = -2,
12196
+ /**
12197
+ * 未明确使用场景,暂未使用,控制台不打印
12198
+ */
12199
+ RECORD = -1,
12200
+ /**
12201
+ * 未明确使用场景,暂未使用,控制台不打印
12202
+ */
12203
+ FATAL = 0,
12204
+ /**
12205
+ * ERROR 级
12206
+ */
12207
+ ERROR = 1,
12208
+ /**
12209
+ * WARN 级
12210
+ */
12211
+ WARN = 2,
12212
+ /**
12213
+ * INFO 级
12214
+ */
12215
+ INFO = 3,
12216
+ /**
12217
+ * DEBUG 级
12218
+ */
12219
+ DEBUG = 4
12220
+ }
12221
+
12222
+ /**
12223
+ * 有效的日志等级声明
12224
+ * @category Type
12225
+ */
12226
+ declare type EnableLogL = LogL.DEBUG | LogL.INFO | LogL.WARN | LogL.ERROR;
12227
+ declare type LogContent = string | number | boolean | null;
12228
+ declare type LogType = 'IM' | 'RTC';
12229
+ /**
12230
+ * @hidden
12231
+ * 日志数据结构
12232
+ */
12233
+ interface ILogData {
12234
+ /**
12235
+ * 日志原始内容
12236
+ */
12237
+ content?: LogContent;
12238
+ /**
12239
+ * 日志标签,如 `L-INIT-O`
12240
+ */
12241
+ tag: string;
12242
+ /**
12243
+ * 日志生成时间
12244
+ */
12245
+ time: number;
12246
+ /**
12247
+ * 应用的声明周期 sessionId
12248
+ * @description
12249
+ * Electron 环境下,以主进程 sessionId 入库,渲染进程 sessionId 存储于 content 内。
12250
+ * 日志上报时,通过 `${mainSessionId}:${renderSessionId}` 形式作为 sessionId 上报
12251
+ */
12252
+ sessionId: string;
12253
+ /**
12254
+ * 日志类型,仅用于大数据后台查阅统计
12255
+ */
12256
+ type: LogType;
12257
+ /**
12258
+ * 日志等级,该等级与服务器统计等级保持一致,为入库等级
12259
+ */
12260
+ level: LogL;
12261
+ /**
12262
+ * 事务跟踪 ID
12263
+ */
12264
+ traceId?: string;
12265
+ /**
12266
+ * logger 实例 Id,用于确定日志由谁埋点,如 `RCEngien` 为 engine 包埋点日志
12267
+ */
12268
+ loggerId?: string;
12269
+ }
12270
+
12167
12271
  /**
12168
12272
  * 进程内缓存数据
12169
12273
  */
@@ -12176,20 +12280,30 @@ interface IProcessCache {
12176
12280
  deltaTime: number;
12177
12281
  }
12178
12282
  /**
12179
- * 约束跨平台、跨进程通信方法定义,以便于代码检查
12283
+ * 同步跨进程方法定义
12180
12284
  */
12181
- interface IIPCMethods {
12285
+ interface IIPCMethodsSync {
12182
12286
  /**
12183
- * 注册本渲染进程至主进程,以接收主进程的消息通知,同时同步主进程的当前缓存数据
12287
+ * 获取主进程缓存数据
12184
12288
  */
12185
- getMainProcessCache(): Promise<IProcessCache>;
12289
+ getMainProcessCache(): IProcessCache;
12290
+ }
12291
+ /**
12292
+ * 无返回值的跨进程方法异步调用定义
12293
+ */
12294
+ interface IIPCMethodsWithoutResult {
12186
12295
  /**
12187
- * 建立连接
12188
- * @param token
12189
- * @param reconnectKickEnable
12296
+ * 消息注册
12297
+ * @description
12298
+ * 消息注册需在应用初始化完成前进行,否则在搭配 C++ 协议栈使用时,本端发出的消息将不默认作为未知消息处理,不存储、不计数
12190
12299
  */
12191
- connect(token: string, reconnectKickEnable: boolean, openCallPlus: boolean, traceId: string): Promise<RCResult<string>>;
12192
- getNaviInfoFromCache(): INaviInfo | null;
12300
+ registerMessageType(objectName: string, params: MessageTypeDescription): void;
12301
+ /**
12302
+ * 设置网络状态
12303
+ * @param data 网络状态
12304
+ * @param isUnPrintLog 是否打印日志
12305
+ */
12306
+ setNetwork(data: INetwork, isUnPrintLog?: boolean): void;
12193
12307
  /**
12194
12308
  * 上报版本信息
12195
12309
  * @param version
@@ -12198,9 +12312,25 @@ interface IIPCMethods {
12198
12312
  [name: string]: string;
12199
12313
  }): void;
12200
12314
  /**
12201
- * 连接时间
12315
+ * 接收渲染进程日志
12316
+ * @param log 日志数据
12202
12317
  */
12203
- getConnectedTime(): number;
12318
+ onReceiveRendererLog(log: ILogData): void;
12319
+ }
12320
+ /**
12321
+ * 约束跨平台、跨进程通信方法定义,以便于代码检查
12322
+ */
12323
+ interface IIPCMethods {
12324
+ /**
12325
+ * 建立连接
12326
+ * @param token
12327
+ * @param reconnectKickEnable
12328
+ */
12329
+ connect(token: string, reconnectKickEnable: boolean, openCallPlus: boolean, traceId: string): Promise<RCResult<string>>;
12330
+ /**
12331
+ * 忽视缓存,重新请求导航数据
12332
+ */
12333
+ refetchNaviInfo(): Promise<RCResult<INaviInfo | null>>;
12204
12334
  /**
12205
12335
  * 获取历史消息
12206
12336
  */
@@ -12336,12 +12466,6 @@ interface IIPCMethods {
12336
12466
  * 断开连接
12337
12467
  */
12338
12468
  disconnect(closeDB?: boolean, disablePush?: boolean): Promise<RCResult>;
12339
- /**
12340
- * 消息注册
12341
- * @description
12342
- * 消息注册需在应用初始化完成前进行,否则在搭配 C++ 协议栈使用时,本端发出的消息将不默认作为未知消息处理,不存储、不计数
12343
- */
12344
- registerMessageType(objectName: string, params: MessageTypeDescription): void;
12345
12469
  /**
12346
12470
  * 加入聊天室
12347
12471
  * @param chatroomId 聊天室 id
@@ -12498,24 +12622,6 @@ interface IIPCMethods {
12498
12622
  * 多端同步会话的已读时间 (V4)
12499
12623
  */
12500
12624
  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
12625
  /**
12520
12626
  * 设置当前用户在线状态
12521
12627
  */
@@ -12624,6 +12730,10 @@ interface IIPCMethods {
12624
12730
  * 删除时间戳前的未读数
12625
12731
  */
12626
12732
  clearUnreadCountByTimestamp(conversation: IConversationIdentifier, timestamp: number): Promise<RCResult>;
12733
+ /**
12734
+ * 标记远程会话为已读,发送 SRSMsg 消息到服务器,并在发送成功后清理本地未读数信息
12735
+ */
12736
+ markRemoteConversationAsRead(identifier: IConversationIdentifier, sendOpts: IMessageSendOptions, traceId: string): Promise<RCResult>;
12627
12737
  /**
12628
12738
  * 获取所有群聊会话 @ 消息未读数,不包含超级群会话
12629
12739
  */
@@ -12632,11 +12742,11 @@ interface IIPCMethods {
12632
12742
  /**
12633
12743
  * 获取运行时的系统信息,仅限 Electron 平台可用
12634
12744
  */
12635
- getOSInfo(): IPromiseResult<IOSInfo>;
12745
+ getOSInfo(): Promise<RCResult<IOSInfo>>;
12636
12746
  /**
12637
12747
  * 获取应用主进程信息,仅限 Electron 平台可用
12638
12748
  */
12639
- getMainProcessInfo(): IPromiseResult<IProcessInfo>;
12749
+ getMainProcessInfo(): Promise<RCResult<IProcessInfo>>;
12640
12750
  /**
12641
12751
  * 设置代理
12642
12752
  */
@@ -12957,14 +13067,15 @@ interface IIPCMethods {
12957
13067
 
12958
13068
  /**
12959
13069
  * 连接事件监听器
12960
- * @typeParam T - onConnected 是否包含 fromSuspend 参数
12961
13070
  */
12962
- declare type IConnectionListener<T extends boolean = false> = {
13071
+ declare type IConnectionListener = {
12963
13072
  /**
12964
13073
  * 连接成功
12965
13074
  * @description 仅 Electron 平台会返回 processCache 参数,用于同步主进程缓存数据
13075
+ * @param fromSuspend 是否从暂停状态连接
13076
+ * @param processCache 主进程缓存数据,仅 Electron 平台有效
12966
13077
  */
12967
- onConnected: T extends true ? (fromSuspend: boolean) => void : (processCache?: IProcessCache) => void;
13078
+ onConnected(fromSuspend: boolean, processCache?: IProcessCache): void;
12968
13079
  /**
12969
13080
  * 连接中止,SDK 内部会进行重连
12970
13081
  * @param code 中止原因
@@ -13237,7 +13348,34 @@ interface IUserGroupStatusInfo {
13237
13348
  userGroupUnBindChannel?: IChannelAndUserGroupChangeData[];
13238
13349
  }
13239
13350
 
13240
- interface IEngineWatcher extends IConnectionListener<false> {
13351
+ /** [EN]
13352
+ * Asynchronous task result
13353
+ * @category Interface
13354
+ */
13355
+ /**
13356
+ * 异步任务结果
13357
+ * @description 该结构即将废弃,请使用 {@link RCResult} 替代
13358
+ * @category Interface
13359
+ * @deprecated 请使用 {@link RCResult} 替代
13360
+ */
13361
+ interface IAsyncRes<T = void> extends Pick<RCResult<T>, 'code' | 'data'> {
13362
+ msg?: string;
13363
+ }
13364
+ /** [EN]
13365
+ * Asynchronous task result
13366
+ * @description
13367
+ * Handles expected exceptions through `Promise.resolve`, thereby exposing unexpected exceptions through Uncatch Promise Error
13368
+ * @category Type
13369
+ */
13370
+ /**
13371
+ * 异步任务结果
13372
+ * @description
13373
+ * 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
13374
+ * @category Type
13375
+ */
13376
+ declare type IPromiseResult<T = void> = Promise<IAsyncRes<T>>;
13377
+
13378
+ interface IEngineWatcher extends IConnectionListener {
13241
13379
  /**
13242
13380
  * @param message 消息
13243
13381
  * @param leftCount 参数废弃,值始终为 undefined
@@ -13486,94 +13624,6 @@ declare const trans2IReceivedStatusInfo: (status: ReceivedStatus) => IReceivedSt
13486
13624
  */
13487
13625
  declare const transformReceivedStatusFlag: (receivedStatusInfo: IReceivedStatusInfo) => number;
13488
13626
 
13489
- /** [EN]
13490
- * Log level definitions
13491
- * @category Enum
13492
- */
13493
- /**
13494
- * 日志打印等级定义
13495
- * @category Enum
13496
- */
13497
- declare enum LogL {
13498
- /**
13499
- * IM 质量数据日志,控制台不打印
13500
- */
13501
- STATISTICS = -2,
13502
- /**
13503
- * 未明确使用场景,暂未使用,控制台不打印
13504
- */
13505
- RECORD = -1,
13506
- /**
13507
- * 未明确使用场景,暂未使用,控制台不打印
13508
- */
13509
- FATAL = 0,
13510
- /**
13511
- * ERROR 级
13512
- */
13513
- ERROR = 1,
13514
- /**
13515
- * WARN 级
13516
- */
13517
- WARN = 2,
13518
- /**
13519
- * INFO 级
13520
- */
13521
- INFO = 3,
13522
- /**
13523
- * DEBUG 级
13524
- */
13525
- DEBUG = 4
13526
- }
13527
-
13528
- /**
13529
- * 有效的日志等级声明
13530
- * @category Type
13531
- */
13532
- declare type EnableLogL = LogL.DEBUG | LogL.INFO | LogL.WARN | LogL.ERROR;
13533
- declare type LogContent = string | number | boolean | null;
13534
- declare type LogType = 'IM' | 'RTC';
13535
- /**
13536
- * @hidden
13537
- * 日志数据结构
13538
- */
13539
- interface ILogData {
13540
- /**
13541
- * 日志原始内容
13542
- */
13543
- content?: LogContent;
13544
- /**
13545
- * 日志标签,如 `L-INIT-O`
13546
- */
13547
- tag: string;
13548
- /**
13549
- * 日志生成时间
13550
- */
13551
- time: number;
13552
- /**
13553
- * 应用的声明周期 sessionId
13554
- * @description
13555
- * Electron 环境下,以主进程 sessionId 入库,渲染进程 sessionId 存储于 content 内。
13556
- * 日志上报时,通过 `${mainSessionId}:${renderSessionId}` 形式作为 sessionId 上报
13557
- */
13558
- sessionId: string;
13559
- /**
13560
- * 日志类型,仅用于大数据后台查阅统计
13561
- */
13562
- type: LogType;
13563
- /**
13564
- * 日志等级,该等级与服务器统计等级保持一致,为入库等级
13565
- */
13566
- level: LogL;
13567
- /**
13568
- * 事务跟踪 ID
13569
- */
13570
- traceId?: string;
13571
- /**
13572
- * logger 实例 Id,用于确定日志由谁埋点,如 `RCEngien` 为 engine 包埋点日志
13573
- */
13574
- loggerId?: string;
13575
- }
13576
-
13577
13627
  declare type LogReader = (startTime: number, endTime: number, level: LogL, realtimeReport: boolean, tableName?: string) => Promise<{
13578
13628
  logs: ILogData[];
13579
13629
  }>;
@@ -13623,21 +13673,18 @@ declare abstract class BasicLogger {
13623
13673
  protected readonly _appkey: string;
13624
13674
  protected readonly _id: string;
13625
13675
  protected readonly _type: LogType;
13626
- protected readonly logDB: LogDBProxy;
13676
+ readonly proxy: LogDBProxy;
13627
13677
  /**
13628
13678
  * traceId 计数
13629
13679
  */
13630
13680
  private static _traceIdCount;
13631
- constructor(_appkey: string, _id: string, _type: LogType, logDB: LogDBProxy);
13681
+ constructor(_appkey: string, _id: string, _type: LogType, proxy: LogDBProxy);
13632
13682
  protected _write(logData: ILogData): void;
13633
13683
  /**
13634
13684
  * 生成事务追踪 ID,全局唯一,便于跨进程、异步事务追踪,需要考虑多进程
13635
13685
  * @returns
13636
13686
  */
13637
13687
  createTraceId(): string;
13638
- /**
13639
- * @deprecated 请使用 genTId 替代
13640
- */
13641
13688
  /**
13642
13689
  * 获取当前进程的 sessionId,全局唯一
13643
13690
  * @returns
@@ -13792,9 +13839,12 @@ declare abstract class SSEClient {
13792
13839
 
13793
13840
  interface IStorage {
13794
13841
  setItem(key: string, value: string): void;
13842
+ /**
13843
+ * 因 SDK 设计需要,读取时需使用同步方法,SDK 只在必要时会从缓存中读取,不会频繁调用,大部分时间读取内存数据。
13844
+ * @param key
13845
+ */
13795
13846
  getItem(key: string): string | null;
13796
13847
  removeItem(key: string): void;
13797
- clear(): void;
13798
13848
  }
13799
13849
  interface IWebSocket {
13800
13850
  id: number;
@@ -14085,20 +14135,6 @@ declare enum RTCJoinType {
14085
14135
  COEXIST = 2
14086
14136
  }
14087
14137
 
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
14138
  /**
14103
14139
  * 事件监听器
14104
14140
  * @category Type
@@ -14220,6 +14256,14 @@ declare const map: (source: any[], event: Function) => any[];
14220
14256
  * @deprecated
14221
14257
  */
14222
14258
  declare const isNull: (val: any) => boolean;
14259
+ /**
14260
+ * @deprecated 使用 UUId.gen() 替代
14261
+ */
14262
+ declare const getUUID: () => string;
14263
+ /**
14264
+ * @deprecated 使用 UUId.genWithLen(22) 替代
14265
+ */
14266
+ declare const getUUID22: () => string;
14223
14267
 
14224
14268
  /** @deprecated */
14225
14269
  declare type CodecPBMaps = {
@@ -14879,7 +14923,9 @@ declare class DataHosting extends BaseModule {
14879
14923
  /**
14880
14924
  * 会话聊天模块
14881
14925
  */
14882
- 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'> {
14926
+ 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'> {
14927
+ /** 超级群是否已同步完成 */
14928
+ get ugSynced(): boolean;
14883
14929
  getRealtimeConversations(count: number, startTime: number, order: 0 | 1): Promise<RCResult<IReceivedConversation[]>>;
14884
14930
  getRealtimeConTotalUnreadCount(): Promise<RCResult<number>>;
14885
14931
  clearRealtimeConUnreadCount(identifier: IConversationIdentifier): Promise<RCResult>;
@@ -14934,7 +14980,7 @@ declare class ConversationListLoader extends BaseModule {
14934
14980
  get isLoading(): boolean;
14935
14981
  /**
14936
14982
  * 加载会话列表
14937
- * @param count 获取数量
14983
+ * @param count 获取数量,有效值 [1, 100]
14938
14984
  */
14939
14985
  load(count: number): Promise<RCResult<IReceivedConversation[]>>;
14940
14986
  }
@@ -14964,6 +15010,14 @@ declare class ChatModule extends BaseModule {
14964
15010
  * @param timestamp 同步时间戳
14965
15011
  */
14966
15012
  sendSyncReadStatusMessage(identifier: IConversationIdentifier, timestamp: number): Promise<RCResult>;
15013
+ /**
15014
+ * 清除会话消息未读数
15015
+ */
15016
+ clearUnreadCount(identifier: IConversationIdentifier): Promise<RCResult>;
15017
+ /**
15018
+ * 清除全部会话消息未读数,不包含超级群会话
15019
+ */
15020
+ clearAllUnreadCount(): Promise<RCResult>;
14967
15021
  clearUnreadCountByTimestamp(identifier: IConversationIdentifier, timestamp: number): Promise<RCResult>;
14968
15022
  /**
14969
15023
  * 发送群已读回执请求(v1 版本)
@@ -15002,6 +15056,7 @@ declare class ChatModule extends BaseModule {
15002
15056
  getMessageReadReceiptV4(conversation: IConversationIdentifier, messageUId: string): Promise<RCResult<IMessageReadReceiptV4Response>>;
15003
15057
  batchGetMessageReadReceiptInfoV4(conversation: IConversationIdentifier, messageUIds: string[]): Promise<RCResult<IGroupReadReceiptData[]>>;
15004
15058
  getConversationsIncludingRobots(options: IGetConversationsIncludingRobotsOption): Promise<RCResult<IReceivedConversation[]>>;
15059
+ markRemoteConversationAsRead(identifier: IConversationIdentifier): Promise<RCResult>;
15005
15060
  }
15006
15061
 
15007
15062
  declare class APIContext {
@@ -15040,10 +15095,6 @@ declare class APIContext {
15040
15095
  * engine 内部日志工具
15041
15096
  */
15042
15097
  readonly logger: BasicLogger;
15043
- /**
15044
- * 超级群同步完成记录
15045
- */
15046
- private _ugSynced;
15047
15098
  constructor(options: IAPIContextOption);
15048
15099
  /**
15049
15100
  * 安装使用插件,并初始化插件实例
@@ -15347,14 +15398,6 @@ declare class APIContext {
15347
15398
  * 获取超级群免打扰列表
15348
15399
  */
15349
15400
  getBlockedUGList(): Promise<RCResult<IReceivedConversation[]>>;
15350
- /**
15351
- * 清除会话消息未读数
15352
- */
15353
- clearUnreadCount(conversation: IConversationOption): Promise<RCResult>;
15354
- /**
15355
- * 清除全部会话消息未读数,不包含超级群会话
15356
- */
15357
- clearAllUnreadCount(): Promise<RCResult>;
15358
15401
  /**
15359
15402
  * 获取指定会话消息未读数
15360
15403
  */
@@ -15570,12 +15613,6 @@ declare class APIContext {
15570
15613
  * 删除所有会话,目前仅 v2 提供
15571
15614
  */
15572
15615
  clearConversations(conversationTypes?: ConversationType[], tag?: string): Promise<RCResult>;
15573
- /**
15574
- * 设置用户连接状态监听器
15575
- */
15576
- setUserStatusListener(config: {
15577
- userIds: string[];
15578
- }, listener: Function): void;
15579
15616
  /**
15580
15617
  * 添加用户黑名单
15581
15618
  */
@@ -15974,11 +16011,10 @@ declare class RTCPluginContext extends PluginContext {
15974
16011
  */
15975
16012
  declare type IUserSettingsModule = Pick<IIPCMethods, 'setTranslationLanguage' | 'getTranslationLanguage' | 'setAutoTranslateEnabled' | 'getAutoTranslateEnabled'>;
15976
16013
 
15977
- 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' | 'setUserStatusListener' | 'getFileToken' | 'rtcSignaling' | 'rtcPing' | 'setCallInfo' | 'getUserStatus' | 'searchConversationByContentWithAllChannel' | 'getAllRobots'>;
15978
- declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContext {
16014
+ 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'>;
16015
+ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContext, Omit<IIPCMethodsWithoutResult, 'onReceiveRendererLog'> {
15979
16016
  protected readonly _watcher: IEngineWatcher;
15980
16017
  protected readonly _options: IAPIContextOption;
15981
- private readonly _logger;
15982
16018
  /**
15983
16019
  * 连接时间
15984
16020
  */
@@ -15999,7 +16035,7 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15999
16035
  get initOption(): IAPIContextOption;
16000
16036
  abstract get connectionStatus(): RCConnectionStatus;
16001
16037
  abstract get userId(): string;
16002
- get logger(): BasicLogger;
16038
+ abstract get logger(): BasicLogger;
16003
16039
  abstract get usingCppEngine(): boolean;
16004
16040
  /**
16005
16041
  * 用户信息托管模块
@@ -16009,17 +16045,14 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
16009
16045
  * 引擎初始化
16010
16046
  * @param _appkey
16011
16047
  */
16012
- constructor(_watcher: IEngineWatcher, _options: IAPIContextOption, _logger: BasicLogger);
16048
+ constructor(_watcher: IEngineWatcher, _options: IAPIContextOption);
16013
16049
  protected _rtcSignalingListener?: (buffer: Uint8Array) => void;
16014
16050
  /**
16015
16051
  * 注册 RTC KV 变更监听器
16016
16052
  * @param listener
16017
16053
  */
16018
16054
  registerRTCSignalingListener(listener: ((buffer: Uint8Array) => void) | undefined): void;
16019
- /**
16020
- * 忽视缓存,重新请求导航数据
16021
- */
16022
- abstract refetchNaviInfo(): IPromiseResult<INaviInfo | null>;
16055
+ abstract refetchNaviInfo(): Promise<RCResult<INaviInfo | null>>;
16023
16056
  /**
16024
16057
  * 为非 engine 包创建 logger 工具实例
16025
16058
  */
@@ -16036,9 +16069,7 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
16036
16069
  * 发送 SDK 版本
16037
16070
  * @param versionInfo
16038
16071
  */
16039
- abstract reportSDKInfo(versionInfo: {
16040
- [name: string]: string;
16041
- }): void;
16072
+ abstract reportSDKInfo(versionInfo: Record<string, string>): void;
16042
16073
  abstract getHistoryMessage(conversation: IConversationOption, options: Required<IGetHistoryMessageOption>, fromLocal: boolean): Promise<RCResult<{
16043
16074
  list: IReceivedMessage[];
16044
16075
  hasMore: boolean;
@@ -16123,12 +16154,6 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
16123
16154
  * @param options
16124
16155
  */
16125
16156
  abstract sendUltraMessage(identifier: IConversationIdentifier, options: IMessageSendOptions, traceId: string, onSendBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
16126
- /**
16127
- * 设置用户在线状态监听器
16128
- */
16129
- abstract setUserStatusListener(config: {
16130
- userIds: string[];
16131
- }, listener: Function): void;
16132
16157
  /**
16133
16158
  * 设置当前用户在线状态
16134
16159
  */
@@ -16222,15 +16247,15 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
16222
16247
  /**
16223
16248
  * 获取运行时的系统信息,仅限 Electron 平台可用
16224
16249
  */
16225
- abstract getOSInfo(): IPromiseResult<IOSInfo>;
16250
+ abstract getOSInfo(): Promise<RCResult<IOSInfo>>;
16226
16251
  /**
16227
16252
  * 获取当前渲染进程信息,仅限 Electron 平台可用
16228
16253
  */
16229
- abstract getProcessInfo(): IPromiseResult<IProcessInfo>;
16254
+ abstract getProcessInfo(): Promise<RCResult<IProcessInfo>>;
16230
16255
  /**
16231
16256
  * 获取应用主进程信息,仅限 Electron 平台可用
16232
16257
  */
16233
- abstract getMainProcessInfo(): IPromiseResult<IProcessInfo>;
16258
+ abstract getMainProcessInfo(): Promise<RCResult<IProcessInfo>>;
16234
16259
  /**
16235
16260
  * 设置融云消息重排开关
16236
16261
  */
@@ -16424,36 +16449,4 @@ declare const assert: (key: string, value: any, validator: AssertRules | ((value
16424
16449
  */
16425
16450
  declare const validate: (key: string, value: any, validator: AssertRules | ((value?: any) => boolean), required?: boolean) => boolean;
16426
16451
 
16427
- /**
16428
- * @deprecated 使用 UUId.gen() 替代
16429
- */
16430
- declare const getUUID: () => string;
16431
- /**
16432
- * @deprecated 使用 UUId.genWithLen(22) 替代
16433
- */
16434
- declare const getUUID22: () => string;
16435
-
16436
- declare class AppStorage {
16437
- private _cache;
16438
- private _storageKey;
16439
- private _rootStorage;
16440
- constructor(key: string);
16441
- _get(): any;
16442
- _set(cache: {
16443
- [id: string]: any;
16444
- }): void;
16445
- set(key: string, value: any): void;
16446
- remove(key: string): void;
16447
- clear(): void;
16448
- get(key: string): any;
16449
- getKeys(): string[];
16450
- getValues(): any;
16451
- /**
16452
- * 全量更新
16453
- */
16454
- update(value?: {
16455
- [key: string]: any;
16456
- }): void;
16457
- }
16458
-
16459
- 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 };
16452
+ 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 };