@rongcloud/engine 5.28.0-c-tmp.1 → 5.28.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
@@ -29,7 +29,7 @@ declare enum UploadMethod {
29
29
  /**
30
30
  * IMLib 埋点日志 Id 枚举
31
31
  */
32
- declare const LogTagId: {
32
+ declare const Log: {
33
33
  readonly L_IMSDK_VER_O: "L-imsdk_ver-O";
34
34
  readonly A_INIT_REPEAT_O: "A_INIT_REPEAT_O";
35
35
  readonly L_INIT_O: "L-init-O";
@@ -95,8 +95,8 @@ declare const LogTagId: {
95
95
  * 接收到直发消息
96
96
  */
97
97
  readonly L_RECV_S_MSG_O: "L-recv_s_msg-O";
98
- readonly A_DELETE_MESSAGES_S: "A-delete_messages-S";
99
- readonly P_DELETE_MSG_S: "P-delete_msg-S";
98
+ readonly A_DELETE_LOCAL_MSGS_T: "A-delete_local_msgs-T";
99
+ readonly A_DELETE_LOCAL_MSGS_R: "A-delete_local_msgs-R";
100
100
  readonly A_RECALL_MESSAGE_T: "A-recall_msg-T";
101
101
  readonly A_RECALL_MESSAGE_R: "A-recall_msg-R";
102
102
  readonly A_RECALL_MESSAGE_E: "A-recall_msg-E";
@@ -111,13 +111,26 @@ declare const LogTagId: {
111
111
  readonly L_GET_INDEX_NAVI_S: "L-get_index_navi-S";
112
112
  readonly A_JOIN_CHATROOM_T: "A-join_chatroom-T";
113
113
  readonly A_JOIN_CHATROOM_R: "A-join_chatroom-R";
114
- readonly L_JOIN_CHATROOM_T: "L-join_chatroom-T";
115
- readonly L_JOIN_CHATROOM_R: "L-join_chatroom-R";
116
- readonly A_QUIT_CHATROOM_T: "A-quit_chatroom-T";
117
- readonly A_QUIT_CHATROOM_R: "A-quit_chatroom-R";
118
114
  readonly L_REJOIN_CHATROOM_T: "L-rejoin_chatroom-T";
119
115
  readonly L_REJOIN_CHATROOM_R: "L-rejoin_chatroom-R";
120
- readonly L_REJOIN_CHATROOM_S: "L-rejoin_chatroom-S";
116
+ readonly A_QUIT_CHATROOM_T: "A-quit_chatroom-T";
117
+ readonly A_QUIT_CHATROOM_R: "A-quit_chatroom-R";
118
+ readonly A_GET_CHATROOM_INFO_T: "A-get_chatroom_info-T";
119
+ readonly A_GET_CHATROOM_INFO_R: "A-get_chatroom_info-R";
120
+ readonly A_SET_CHATROOM_ENTRY_T: "A-set_chatroom_entry-T";
121
+ readonly A_SET_CHATROOM_ENTRY_R: "A-set_chatroom_entry-R";
122
+ readonly A_SET_CHATROOM_ENTRIES_T: "A-set_chatroom_entries-T";
123
+ readonly A_SET_CHATROOM_ENTRIES_R: "A-set_chatroom_entries-R";
124
+ readonly A_REMOVE_CHATROOM_ENTRY_T: "A-remove_chatroom_entry-T";
125
+ readonly A_REMOVE_CHATROOM_ENTRY_R: "A-remove_chatroom_entry-R";
126
+ readonly A_REMOVE_CHATROOM_ENTRIES_T: "A-remove_chatroom_entries-T";
127
+ readonly A_REMOVE_CHATROOM_ENTRIES_R: "A-remove_chatroom_entries-R";
128
+ readonly A_GET_CHATROOM_ENTRY_T: "A-get_chatroom_entry-T";
129
+ readonly A_GET_CHATROOM_ENTRY_R: "A-get_chatroom_entry-R";
130
+ readonly A_GET_CHATROOM_ENTRIES_T: "A-get_chatroom_entries-T";
131
+ readonly A_GET_CHATROOM_ENTRIES_R: "A-get_chatroom_entries-R";
132
+ readonly A_BIND_RTC_FOR_CHATROOM_T: "A-bind_rtc_for_chatroom-T";
133
+ readonly A_BIND_RTC_FOR_CHATROOM_R: "A-bind_rtc_for_chatroom-R";
121
134
  readonly L_MEDIA_S: "L-media-S";
122
135
  readonly L_MEDIA_UPLOAD_T: "L-media_upload-T";
123
136
  readonly L_MEDIA_UPLOAD_R: "L-media_upload-R";
@@ -132,8 +145,8 @@ declare const LogTagId: {
132
145
  readonly A_GET_LOCAL_MESSAGE_R: "A-get_local_message-R";
133
146
  readonly A_GET_HISTORY_MSG_T: "A-get_history_msg-T";
134
147
  readonly A_GET_HISTORY_MSG_R: "A-get_history_msg-R";
135
- readonly L_GET_HISTORY_MSG_T: "L-get_history_msg-T";
136
- readonly L_GET_HISTORY_MSG_R: "L-get_history_msg-R";
148
+ readonly A_GET_REMOTE_HISTORY_MSG_T: "A-get_remote_history_msg-T";
149
+ readonly A_GET_REMOTE_HISTORY_MSG_R: "A-get_remote_history_msg-R";
137
150
  readonly L_CALLBACK_E: "L-callback-E";
138
151
  readonly A_SEND_READ_RECEIPT_T: "A-send_read_receipt-T";
139
152
  readonly A_SEND_READ_RECEIPT_R: "A-send_read_receipt-R";
@@ -182,7 +195,6 @@ declare const LogTagId: {
182
195
  readonly L_CALL_MAIN_SYNC_O: "L_CALL_MAIN_SYNC_O";
183
196
  /** 未知的通知 */
184
197
  readonly L_UNSUPPORT_NTF_FROM_MAIN_E: "L_UNSUPPORT_NTF_FROM_MAIN_E";
185
- readonly A_SET_MSG_CONTENT_O: "A_SET_MSG_CONTENT_O";
186
198
  readonly A_REMOVE_PROXY_O: "A-remove_proxy-O";
187
199
  readonly A_SET_PROXY_O: "A-set_proxy-O";
188
200
  readonly A_TEST_PROXY_O: "A-test_proxy-O";
@@ -235,8 +247,6 @@ declare const LogTagId: {
235
247
  readonly L_PULL_SG_RELATIONS_R: "L-pull_sg_relations-R";
236
248
  readonly A_REMOVE_CONVERSATION_T: "A-remove_conversation-T";
237
249
  readonly A_REMOVE_CONVERSATION_R: "A-remove_conversation-R";
238
- readonly A_GET_CONVERSATION_LIST_BY_FILTER_T: "A-get_conversation_list_by_filter-T";
239
- readonly A_GET_CONVERSATION_LIST_BY_FILTER_R: "A-get_conversation_list_by_filter-R";
240
250
  readonly A_GET_CONVERSATION_T: "A-get_conversation-T";
241
251
  readonly A_GET_CONVERSATION_R: "A-get_conversation-R";
242
252
  readonly A_BATCH_SET_CONVERSATION_TO_TOP_T: "A-batch_set_conversation_to_top-T";
@@ -245,11 +255,10 @@ declare const LogTagId: {
245
255
  readonly A_BATCH_SET_CONVERSATION_NOTIFICATION_LEVEL_R: "A-batch_set_convers_notification_level-R";
246
256
  readonly A_BATCH_SET_CONVERSATION_TRANSLATE_STRATEGY_T: "A-batch_set_convers_translate_strategy-T";
247
257
  readonly A_BATCH_SET_CONVERSATION_TRANSLATE_STRATEGY_R: "A-batch_set_convers_translate_strategy-R";
248
- readonly A_CLEAR_ALL_UNREAD_COUNT_O: "A-clear_all_unread_count-O";
249
258
  readonly A_DELETE_REMOTE_MESSAGE_BY_TIMESTAMP_T: "A-delete_remote_message_by_timestamp-T";
250
259
  readonly A_DELETE_REMOTE_MESSAGE_BY_TIMESTAMP_R: "A-delete_remote_message_by_timestamp-R";
251
- readonly A_DELETE_REMOTE_MESSAGE_T: "A-delete_remote_message-T";
252
- readonly A_DELETE_REMOTE_MESSAGE_R: "A-delete_remote_message-R";
260
+ readonly A_DEL_REMOTE_MSGS_T: "A-del_remote_msgs-T";
261
+ readonly A_DEL_REMOTE_MSGS_R: "A-del_remote_msgs-R";
253
262
  readonly A_BATCH_CLEAR_REMOTE_MSG_T: "A-batch_clear_remote_msg-T";
254
263
  readonly A_BATCH_CLEAR_REMOTE_MSG_R: "A-batch_clear_remote_msg-R";
255
264
  /** 事件循环阻塞告警 */
@@ -289,6 +298,8 @@ declare const LogTagId: {
289
298
  readonly A_REMOVE_TAGS_FOR_CONVER_R: "A-remove_tags_for_conversation-R";
290
299
  readonly A_GET_UNREAD_COUNT_BY_TAG_T: "A-get_unread_count_by_tag-T";
291
300
  readonly A_GET_UNREAD_COUNT_BY_TAG_R: "A-get_unread_count_by_tag-R";
301
+ readonly A_GET_UNREAD_COUNT_T: "A-get_unread_count-T";
302
+ readonly A_GET_UNREAD_COUNT_R: "A-get_unread_count-R";
292
303
  readonly A_GET_UNTAGGED_CONVERSATION_LIST_BY_PAGE_T: "A-get_untagged_conversation_list_by_page-T";
293
304
  readonly A_GET_UNTAGGED_CONVERSATION_LIST_BY_PAGE_R: "A-get_untagged_conversation_list_by_page-R";
294
305
  readonly A_SET_TRANSLATION_LANGUAGE_T: "A-set_translation_language-T";
@@ -310,6 +321,109 @@ declare const LogTagId: {
310
321
  readonly A_BATCH_DEL_CONVERS_R: "A-batch_del_conversation-R";
311
322
  readonly A_SYNC_REMOTE_CONVERSATIONS_T: "A-e_sync_remote_conversations-T";
312
323
  readonly A_SYNC_REMOTE_CONVERSATIONS_R: "A-e_sync_remote_conversations-R";
324
+ readonly L_UPDATE_MSG_BOX_TIME_O: "L-update_msg_box_time-O";
325
+ readonly A_SEND_UG_TYPING_T: "A-send_ug_typing-T";
326
+ readonly A_SEND_UG_TYPING_R: "A-send_ug_typing-R";
327
+ readonly A_GET_UG_LIST_T: "A-get_ug_list-T";
328
+ readonly A_GET_UG_LIST_R: "A-get_ug_list-R";
329
+ readonly A_GET_UG_MSGS_BY_UID_T: "A-get_ug_msgs_by_uid-T";
330
+ readonly A_GET_UG_MSGS_BY_UID_R: "A-get_ug_msgs_by_uid-R";
331
+ readonly A_GET_UG_UNREAD_MENTIONED_DIGEST_T: "A-get_ug_unread_mentioned_digest-T";
332
+ readonly A_GET_UG_UNREAD_MENTIONED_DIGEST_R: "A-get_ug_unread_mentioned_digest-R";
333
+ readonly A_GET_HIS_MSGS_BY_OBJ_NAMES_T: "A-get_his_msgs_by_obj_names-T";
334
+ readonly A_GET_HIS_MSGS_BY_OBJ_NAMES_R: "A-get_his_msgs_by_obj_names-R";
335
+ readonly A_GET_CONTINUOUS_MSGS_T: "A-get_continuous_msgs-T";
336
+ readonly A_GET_CONTINUOUS_MSGS_R: "A-get_continuous_msgs-R";
337
+ readonly A_GET_MSGS_AROUND_TIMESTAMP_T: "A-get_msgs_around_timestamp-T";
338
+ readonly A_GET_MSGS_AROUND_TIMESTAMP_R: "A-get_msgs_around_timestamp-R";
339
+ readonly A_CLEAR_LOCAL_MSG_T: "A-clear_local_msg-T";
340
+ readonly A_CLEAR_LOCAL_MSG_R: "A-clear_local_msg-R";
341
+ readonly A_DEL_LOCAL_MSGS_BY_TIME_T: "A-del_local_msgs_by_time-T";
342
+ readonly A_DEL_LOCAL_MSGS_BY_TIME_R: "A-del_local_msgs_by_time-R";
343
+ readonly A_BATCH_CLEAR_LOCAL_MSGS_BY_TIME_T: "A-batch_clear_local_msgs_by_time-T";
344
+ readonly A_BATCH_CLEAR_LOCAL_MSGS_BY_TIME_R: "A-batch_clear_local_msgs_by_time-R";
345
+ readonly A_DEL_LOCAL_UG_MSGS_FOR_ALL_CHANNEL_T: "A-del_local_ug_msgs_for_all_channel-T";
346
+ readonly A_DEL_LOCAL_UG_MSGS_FOR_ALL_CHANNEL_R: "A-del_local_ug_msgs_for_all_channel-R";
347
+ readonly A_UPDATE_MSG_EXPANSION_T: "A-update_msg_expansion-T";
348
+ readonly A_UPDATE_MSG_EXPANSION_R: "A-update_msg_expansion-R";
349
+ readonly A_REMOVE_MSG_EXPANSION_T: "A-remove_msg_expansion-T";
350
+ readonly A_REMOVE_MSG_EXPANSION_R: "A-remove_msg_expansion-R";
351
+ readonly A_REMOVE_ALL_MSG_EXPANSION_T: "A-remove_all_msg_expansion-T";
352
+ readonly A_REMOVE_ALL_MSG_EXPANSION_R: "A-remove_all_msg_expansion-R";
353
+ readonly A_INSERT_MSG_T: "A-insert_msg-T";
354
+ readonly A_INSERT_MSG_R: "A-insert_msg-R";
355
+ readonly A_BATCH_INSERT_MSGS_T: "A-batch_insert_msgs-T";
356
+ readonly A_BATCH_INSERT_MSGS_R: "A-batch_insert_msgs-R";
357
+ readonly A_SET_MSG_CONTENT_T: "A-set_msg_content-T";
358
+ readonly A_SET_MSG_CONTENT_R: "A-set_msg_content-R";
359
+ readonly A_SET_UG_DEFAULT_NTF_LEVEL_T: "A-set_ug_default_ntf_level-T";
360
+ readonly A_SET_UG_DEFAULT_NTF_LEVEL_R: "A-set_ug_default_ntf_level-R";
361
+ readonly A_GET_UG_DEFAULT_NTF_LEVEL_T: "A-get_ug_default_ntf_level-T";
362
+ readonly A_GET_UG_DEFAULT_NTF_LEVEL_R: "A-get_ug_default_ntf_level-R";
363
+ readonly A_GET_UG_UNREAD_COUNT_FOR_ALL_CHANNELS_T: "A-get_ug_unread_count_for_all_channels-T";
364
+ readonly A_GET_UG_UNREAD_COUNT_FOR_ALL_CHANNELS_R: "A-get_ug_unread_count_for_all_channels-R";
365
+ readonly A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_T: "A-get_total_unread_count_by_levels-T";
366
+ readonly A_GET_TOTAL_UNREAD_COUNT_BY_LEVELS_R: "A-get_total_unread_count_by_levels-R";
367
+ readonly A_GET_TOTAL_UNREAD_COUNT_T: "A-get_total_unread_count-T";
368
+ readonly A_GET_TOTAL_UNREAD_COUNT_R: "A-get_total_unread_count-R";
369
+ readonly A_GET_FIRST_UNREAD_MEG_T: "A-get_first_unread_msg-T";
370
+ readonly A_GET_FIRST_UNREAD_MSG_R: "A-get_first_unread_msg-R";
371
+ readonly A_GET_FIRST_UNREAD_MSG_DIGEST_T: "A-get_first_unread_msg_digest-T";
372
+ readonly A_GET_FIRST_UNREAD_MSG_DIGEST_R: "A-get_first_unread_msg_digest-R";
373
+ readonly A_GET_UNREAD_MENTIONED_MSGS_T: "A-get_unread_mentioned_msgs-T";
374
+ readonly A_GET_UNREAD_MENTIONED_MSGS_R: "A-get_unread_mentioned_msgs-R";
375
+ readonly A_GET_UG_UNREAD_INFO_LIST_T: "A-get_ug_unread_info_list-T";
376
+ readonly A_GET_UG_UNREAD_INFO_LIST_R: "A-get_ug_unread_info_list-R";
377
+ readonly A_GET_UG_FIRST_UNREAD_MSG_DIGEST_T: "A-get_ug_first_unread_msg_digest-T";
378
+ readonly A_GET_UG_FIRST_UNREAD_MSG_DIGEST_R: "A-get_ug_first_unread_msg_digest-R";
379
+ readonly A_GET_LOCAL_MSG_COUNT_T: "A-get_local_msg_count-T";
380
+ readonly A_GET_LOCAL_MSG_COUNT_R: "A-get_local_msg_count-R";
381
+ readonly A_GET_CONVERSATIONS_T: "A-get_conversations-T";
382
+ readonly A_GET_CONVERSATIONS_R: "A-get_conversations-R";
383
+ readonly A_GET_BLOCKED_UG_LIST_T: "A-get_blocked_ug_list-T";
384
+ readonly A_GET_BLOCKED_UG_LIST_R: "A-get_blocked_ug_list-R";
385
+ readonly A_CLEAR_UNREAD_COUNT_T: "A-clear_unread_count-T";
386
+ readonly A_CLEAR_UNREAD_COUNT_R: "A-clear_unread_count-R";
387
+ readonly A_CLEAR_ALL_UNREAD_COUNT_T: "A-clear_all_unread_count-T";
388
+ readonly A_CLEAR_ALL_UNREAD_COUNT_R: "A-clear_all_unread_count-R";
389
+ readonly A_GET_TOP_CONVERSATION_LIST_T: "A-get_top_conversation_list-T";
390
+ readonly A_GET_TOP_CONVERSATION_LIST_R: "A-get_top_conversation_list-R";
391
+ readonly A_GET_UNREAD_CONVERSATION_LIST_T: "A-get_unread_conversation_list-T";
392
+ readonly A_GET_UNREAD_CONVERSATION_LIST_R: "A-get_unread_conversation_list-R";
393
+ readonly A_GET_BLOCKED_CONVERSATION_LIST_T: "A-get_blocked_conversation_list-T";
394
+ readonly A_GET_BLOCKED_CONVERSATION_LIST_R: "A-get_blocked_conversation_list-R";
395
+ readonly A_GET_ALL_CONVERSATION_LIST_T: "A-get_all_conversation_list-T";
396
+ readonly A_GET_ALL_CONVERSATION_LIST_R: "A-get_all_conversation_list-R";
397
+ readonly A_GET_CONVERSATION_LIST_BY_TIME_T: "A-get_conversation_list_by_time-T";
398
+ readonly A_GET_CONVERSATION_LIST_BY_TIME_R: "A-get_conversation_list_by_time-R";
399
+ readonly A_GET_CONVERSATION_LIST_OLD_T: "A-get_conversation_list_old-T";
400
+ readonly A_GET_CONVERSATION_LIST_OLD_R: "A-get_conversation_list_old-R";
401
+ readonly A_GET_UNREAD_MENTIONED_COUNT_T: "A-get_unread_mentioned_count-T";
402
+ readonly A_GET_UNREAD_MENTIONED_COUNT_R: "A-get_unread_mentioned_count-R";
403
+ readonly A_GET_ALL_UNREAD_MENTIONED_COUNT_T: "A-get_all_unread_mentioned_count-T";
404
+ readonly A_GET_ALL_UNREAD_MENTIONED_COUNT_R: "A-get_all_unread_mentioned_count-R";
405
+ readonly A_GET_REALTIME_CONVERSATIONS_T: "A-get_realtime_conversations-T";
406
+ readonly A_GET_REALTIME_CONVERSATIONS_R: "A-get_realtime_conversations-R";
407
+ readonly A_GET_REALTIM_CON_TOTAL_UNREAD_COUNT_T: "A-get_realtime_con_total_unread_count-T";
408
+ readonly A_GET_REALTIM_CON_TOTAL_UNREAD_COUNT_R: "A-get_realtime_con_total_unread_count-R";
409
+ readonly A_CLEAR_REALTIME_CON_UNREAD_COUNT_T: "A-clear_realtime_con_unread_count-T";
410
+ readonly A_CLEAR_REALTIME_CON_UNREAD_COUNT_R: "A-clear_realtime_con_unread_count-R";
411
+ readonly A_REMOVE_REALTIME_CONVERSATIONS_T: "A-remove_realtime_conversations-T";
412
+ readonly A_REMOVE_REALTIME_CONVERSATIONS_R: "A-remove_realtime_conversations-R";
413
+ readonly A_BATCH_GET_REALTIME_CON_UNREAD_COUNT_T: "A-batch_get_realtime_con_unread_count-T";
414
+ readonly A_BATCH_GET_REALTIME_CON_UNREAD_COUNT_R: "A-batch_get_realtime_con_unread_count-R";
415
+ readonly A_GET_SUB_USERS_STATUS_T: "A-get_sub_users_status-T";
416
+ readonly A_GET_SUB_USERS_STATUS_R: "A-get_sub_users_status-R";
417
+ readonly A_GET_SUB_USERS_ONLINE_STATUS_T: "A-get_sub_users_online_status-T";
418
+ readonly A_GET_SUB_USERS_ONLINE_STATUS_R: "A-get_sub_users_online_status-R";
419
+ readonly A_SAVE_EDITED_MSG_DRAFT_T: "A-save_edited_msg_draft-T";
420
+ readonly A_SAVE_EDITED_MSG_DRAFT_R: "A-save_edited_msg_draft-R";
421
+ readonly A_GET_EDITED_MSG_DRAFT_T: "A-get_edited_msg_draft-T";
422
+ readonly A_GET_EDITED_MSG_DRAFT_R: "A-get_edited_msg_draft-R";
423
+ readonly A_CLEAR_EDITED_MSG_DRAFT_T: "A-clear_edited_msg_draft-T";
424
+ readonly A_CLEAR_EDITED_MSG_DRAFT_R: "A-clear_edited_msg_draft-R";
425
+ readonly A_GET_UNREAD_MENTION_ME_CONVERSATION_LIST_T: "A-get_unread_mention_me_conversation_list-T";
426
+ readonly A_GET_UNREAD_MENTION_ME_CONVERSATION_LIST_R: "A-get_unread_mention_me_conversation_list-R";
313
427
  };
314
428
 
315
429
  /** [EN]
@@ -3738,16 +3852,16 @@ declare enum OnlineStatus {
3738
3852
  OFFLINE = 0
3739
3853
  }
3740
3854
  /** [EN]
3741
- * Platform information
3855
+ * Platform identifier
3742
3856
  * @since 5.9.8
3743
3857
  * @category Enum
3744
3858
  */
3745
3859
  /**
3746
- * 平台信息
3860
+ * 平台标识
3747
3861
  * @since 5.9.8
3748
3862
  * @category Enum
3749
3863
  */
3750
- declare enum PlatformInfo {
3864
+ declare enum Platform {
3751
3865
  /** [EN]
3752
3866
  * Others
3753
3867
  */
@@ -4987,10 +5101,35 @@ interface ITagInfo {
4987
5101
  createdTime?: number;
4988
5102
  }
4989
5103
 
5104
+ /** [EN]
5105
+ * Edited message draft
5106
+ * @category Interface
5107
+ * @since 5.28.0
5108
+ */
5109
+ /**
5110
+ * 会话消息编辑草稿
5111
+ * @category Interface
5112
+ * @since 5.28.0
5113
+ */
5114
+ interface IEditedMessageDraft {
5115
+ /** [EN]
5116
+ * Message UID
5117
+ */
5118
+ /**
5119
+ * 消息 UID
5120
+ */
5121
+ messageUId: string;
5122
+ /** [EN]
5123
+ * Message edit draft content
5124
+ */
5125
+ /**
5126
+ * 草稿内容
5127
+ */
5128
+ content: string;
5129
+ }
4990
5130
  /** [EN]
4991
5131
  * Conversation change updates
4992
5132
  * @category Interface
4993
-
4994
5133
  */
4995
5134
  /**
4996
5135
  * 会话变更更新项
@@ -5284,6 +5423,15 @@ interface IReceivedConversation {
5284
5423
  * * 自 5.20.0 版本开始,新增支持单群聊会话,数据基于本地接收到的消息计算得出,并在本地缓存和维护,服务器不记录
5285
5424
  */
5286
5425
  firstUnreadMessage?: IUltraUnreadMsg | null;
5426
+ /** [EN]
5427
+ * Edited message draft, only supported on Electron platform
5428
+ * @since 5.28.0
5429
+ */
5430
+ /**
5431
+ * 会话消息编辑草稿,仅支持 Electron 平台
5432
+ * @since 5.28.0
5433
+ */
5434
+ editedMessageDraft?: IEditedMessageDraft;
5287
5435
  }
5288
5436
  /** [EN]
5289
5437
  * @category Interface
@@ -5328,23 +5476,6 @@ interface IUpdatedConversation extends IReceivedConversation {
5328
5476
  */
5329
5477
  updatedItems?: IUpdateItem;
5330
5478
  }
5331
- /** [EN]
5332
- * Conversation basic information
5333
- * @category Interface
5334
- */
5335
- /**
5336
- * 会话基础信息
5337
- * @category Interface
5338
- */
5339
- interface IBaseConversationInfo extends IConversationIdentifier {
5340
- /** [EN]
5341
- * Channel ID
5342
- */
5343
- /**
5344
- * 频道 ID
5345
- */
5346
- channelId: string;
5347
- }
5348
5479
  /** [EN]
5349
5480
  * Specifies the parameters for ultra group conversation
5350
5481
  * @category Interface
@@ -5598,16 +5729,6 @@ interface IConversationIdentifier {
5598
5729
  * 会话 Id
5599
5730
  */
5600
5731
  targetId: string;
5601
- }
5602
- /** [EN]
5603
- * Conversation attributes
5604
- * @category Interface
5605
- */
5606
- /**
5607
- * 会话属性
5608
- * @category Interface
5609
- */
5610
- interface IConversationOption extends IConversationIdentifier {
5611
5732
  /** [EN]
5612
5733
  * **channelId**: String type. Must not contain underscores (`_`) and cannot exceed 20 characters in length.
5613
5734
  */
@@ -5620,9 +5741,41 @@ interface IConversationOption extends IConversationIdentifier {
5620
5741
  */
5621
5742
  channelId?: string;
5622
5743
  }
5623
- interface IConversationUnreadCount extends IConversationOption {
5744
+ /** [EN]
5745
+ * Conversation identifier; Deprecated, please use {@link IConversationIdentifier} instead.
5746
+ * @category Interface
5747
+ */
5748
+ /**
5749
+ * 会话标识,用于标识会话的类型和 ID;已废弃,建议使用 {@link IConversationIdentifier} 替代
5750
+ * @category Interface
5751
+ */
5752
+ declare type IConversationOption = IConversationIdentifier;
5753
+ interface IConversationUnreadCount extends IConversationIdentifier {
5624
5754
  unreadCount: number;
5625
5755
  }
5756
+ /**
5757
+ * 获取未读 @ 消息会话列表参数
5758
+ * @category Interface
5759
+ * @since 5.28.0
5760
+ */
5761
+ interface IGetUnreadMentionMeConversationListParams {
5762
+ /**
5763
+ * 获取会话起始时间,需要精确到毫秒,0 表示当前时间
5764
+ */
5765
+ timestamp: number;
5766
+ /**
5767
+ * 获取会话数量,有效值 [1, 100]
5768
+ */
5769
+ count: number;
5770
+ /**
5771
+ * 是否置顶优先,仅 Electron 平台有效
5772
+ */
5773
+ topPriority?: boolean;
5774
+ /**
5775
+ * 会话类型列表
5776
+ */
5777
+ conversationTypes: ConversationType[];
5778
+ }
5626
5779
 
5627
5780
  /** [EN]
5628
5781
  * Read receipt response information
@@ -5904,7 +6057,7 @@ interface IReceivedMessage<T = any> {
5904
6057
  * Indicates whether the message is an offline message. This does not apply to ultra groups.
5905
6058
  */
5906
6059
  /**
5907
- * 是否为离线消息,不适用于超级群消息
6060
+ * 是否为离线消息,不适用于超级群消息,不适用于历史消息
5908
6061
  */
5909
6062
  isOffLineMessage: boolean;
5910
6063
  /** [EN]
@@ -6050,7 +6203,8 @@ interface IReceivedMessage<T = any> {
6050
6203
  * Whether there is a gap
6051
6204
  */
6052
6205
  /**
6053
- * 是否断档
6206
+ * 消息是否存在断档,仅 Electron 平台有效。Web 平台所有历史消息从服务器拉取,因此因此不会存在断档的情况。
6207
+ * 当值为 true 时,需要开发者依据当前消息发送时间,调用从服务器拉取历史消息接口获取断档消息。
6054
6208
  */
6055
6209
  hasMore?: boolean;
6056
6210
  /** [EN]
@@ -6465,22 +6619,21 @@ interface ISendMsgOptions {
6465
6619
  */
6466
6620
  needReceipt?: boolean;
6467
6621
  }
6468
- interface IInsertMsgOptions {
6622
+ interface InnerInsertMessageParams {
6469
6623
  senderUserId: string;
6470
6624
  messageType: string;
6471
6625
  content: any;
6472
- messageDirection: number;
6626
+ messageDirection: MessageDirection;
6473
6627
  readStatus?: number;
6474
6628
  receivedStatusInfo?: IReceivedStatusInfo;
6475
- sentStatus?: number;
6629
+ sentStatus?: SentStatus;
6476
6630
  sentTime?: number;
6477
6631
  searchContent?: string;
6478
6632
  isUnread?: boolean;
6479
- messageUId?: string;
6633
+ messageUId: string;
6480
6634
  disableNotification?: boolean;
6481
6635
  canIncludeExpansion?: boolean;
6482
- expansionMsg?: string;
6483
- channelId: string;
6636
+ expansion?: Record<string, string>;
6484
6637
  directedUserIds?: string[];
6485
6638
  disableUpdateLastMessage?: boolean;
6486
6639
  }
@@ -6514,7 +6667,7 @@ interface IInsertMessage {
6514
6667
  /**
6515
6668
  * 频道 ID
6516
6669
  */
6517
- channelId: string;
6670
+ channelId?: string;
6518
6671
  /** [EN]
6519
6672
  * Message direction
6520
6673
  */
@@ -6586,7 +6739,7 @@ interface IInsertMessage {
6586
6739
  */
6587
6740
  expansion?: {
6588
6741
  [key: string]: any;
6589
- } | null;
6742
+ };
6590
6743
  /** [EN]
6591
6744
  * Receipt status
6592
6745
  */
@@ -6644,65 +6797,6 @@ interface IInsertMessage {
6644
6797
  */
6645
6798
  disableUpdateLastMessage?: boolean;
6646
6799
  }
6647
- interface ISendExMsgOptions {
6648
- channelId: string;
6649
- conversationType: ConversationType;
6650
- targetId: string;
6651
- /**
6652
- * 消息 ID
6653
- */
6654
- messageUId: string;
6655
- /**
6656
- * 原始消息是否支持扩展的字段
6657
- */
6658
- canIncludeExpansion: boolean;
6659
- /**
6660
- * 删除的 keys
6661
- */
6662
- keys?: string[];
6663
- /**
6664
- * 扩展对象
6665
- */
6666
- expansion?: {
6667
- [key: string]: string;
6668
- };
6669
- /**
6670
- * 消息类型
6671
- */
6672
- messageType: string;
6673
- }
6674
- interface IUltraExMsgOptions {
6675
- canIncludeExpansion: boolean;
6676
- channelId: string;
6677
- conversationType: ConversationType;
6678
- targetId: string;
6679
- messageUId: string;
6680
- sendTime: number;
6681
- /**
6682
- * 删除的 keys
6683
- */
6684
- keys?: string[];
6685
- /**
6686
- * 扩展对象
6687
- */
6688
- expansion?: {
6689
- [key: string]: string;
6690
- };
6691
- /**
6692
- * 是否删除所有扩展
6693
- */
6694
- removeAll?: boolean;
6695
- }
6696
- interface IUltraMsgQueryInfo {
6697
- sendTime: number;
6698
- messageUId: string;
6699
- channelId?: string;
6700
- }
6701
- interface IUltraMsgQueryOptions {
6702
- conversationType: ConversationType;
6703
- targetId: string;
6704
- messages: IUltraMsgQueryInfo[];
6705
- }
6706
6800
  /** [EN]
6707
6801
  * Information about blocked messages
6708
6802
  * @category Interface
@@ -6814,7 +6908,7 @@ interface IUltraGroupUnreadMentionedOption {
6814
6908
  * @category Interface
6815
6909
  */
6816
6910
  /**
6817
- * 超级群获取指定会话 @ 未读消息列表结果
6911
+ * 超级群指定会话未读 @ 消息摘要
6818
6912
  * @category Interface
6819
6913
  */
6820
6914
  interface IUltraUnreadMsg {
@@ -6838,7 +6932,7 @@ interface IUltraUnreadMsg {
6838
6932
  /**
6839
6933
  * @ 类型:1 所有人;2: 部分人
6840
6934
  */
6841
- mentionedType?: number;
6935
+ mentionedType?: MentionedType;
6842
6936
  /** [EN]
6843
6937
  * Message type
6844
6938
  */
@@ -6893,12 +6987,6 @@ interface IClearMessageOption extends IConversationOption {
6893
6987
  */
6894
6988
  timestamp?: number;
6895
6989
  }
6896
- interface IGetMsgOption {
6897
- timestamp?: number;
6898
- count?: number;
6899
- order?: number;
6900
- channelId?: string;
6901
- }
6902
6990
  declare type IGetHistoryMessageResult = {
6903
6991
  list: IReceivedMessage[];
6904
6992
  hasMore: boolean;
@@ -6995,6 +7083,89 @@ interface IEnginRefreshReferenceMessageResult {
6995
7083
  message?: IReceivedMessage;
6996
7084
  code: number;
6997
7085
  }
7086
+ /**
7087
+ * 消息关键信息结构
7088
+ * @category Interface
7089
+ */
7090
+ interface IMessageDesc {
7091
+ /**
7092
+ * 消息唯一标识
7093
+ */
7094
+ messageUId: string;
7095
+ /**
7096
+ * 消息发送时间
7097
+ * @deprecated 5.28.0 版本开始不再需要传递消息的发送时间
7098
+ */
7099
+ sendTime?: number;
7100
+ }
7101
+ /** [EN]
7102
+ * Retrieve historical message configuration
7103
+ * @category Type
7104
+ */
7105
+ /**
7106
+ * 获取历史消息配置项
7107
+ * @category Interface
7108
+ */
7109
+ interface IGetHistoryMessageOption {
7110
+ /** [EN]
7111
+ * Retrieve messages before this timestamp. Use 0 to fetch messages from the current time.
7112
+ */
7113
+ /**
7114
+ * 获取此时间之前的消息,0 为从当前时间拉取
7115
+ */
7116
+ timestamp?: number;
7117
+ /** [EN]
7118
+ * Specifies the number of messages to retrieve, range: 1-100
7119
+ * For SDK versions < 5.7.4, the range is [1-20]; for SDK versions ≧ 5.7.4, the range is [1-100]. Default value is `20`.
7120
+ */
7121
+ /**
7122
+ * 获取消息的数量,有效值范围 [1-100],默认值 `20`
7123
+ * * SDK < 5.7.4,范围为 [1-20]
7124
+ * * SDK ≧ 5.7.4,范围为 [1-100]
7125
+ */
7126
+ count?: number;
7127
+ /** [EN]
7128
+ * Message sorting order
7129
+ * 0: Ascending
7130
+ * 1: Descending
7131
+ */
7132
+ /**
7133
+ * 获取消息的排列顺序
7134
+ * * 0: 升序
7135
+ * * 1: 降序
7136
+ */
7137
+ order?: 0 | 1;
7138
+ /** [EN]
7139
+ * Message type, only valid for local messages on the Electron platform.
7140
+ */
7141
+ /**
7142
+ * 获取指定消息类型,仅 Electron 平台获取本地消息时有效。
7143
+ * @deprecated 暂仅 v2-Adapter 中使用,v5 版本中未使用,且未对外暴露相关能力。
7144
+ */
7145
+ messageType?: string;
7146
+ }
7147
+ /** [EN]
7148
+ * Get historical message configuration by message type
7149
+ * @category Interface
7150
+ */
7151
+ /**
7152
+ * 通过消息类型获取历史消息配置项
7153
+ * @category Interface
7154
+ */
7155
+ interface IGetHistoryMessagesByTypesOption extends Omit<IGetHistoryMessageOption, 'messageType'> {
7156
+ /** [EN]
7157
+ * Message types
7158
+ */
7159
+ /**
7160
+ * 消息类型列表
7161
+ */
7162
+ messageTypes: string[];
7163
+ }
7164
+ /**
7165
+ * 更新消息拓展时需要传递的必要消息属性,用于校验调用合法性。
7166
+ * @since 5.28.0
7167
+ */
7168
+ declare type IMessageAttrsForUpdateExpansion = Pick<IReceivedMessage, 'conversationType' | 'targetId' | 'channelId' | 'messageUId' | 'messageType' | 'canIncludeExpansion' | 'sentTime'>;
6998
7169
 
6999
7170
  /** [EN]
7000
7171
  * TODO(Translation)
@@ -8031,10 +8202,10 @@ interface IChatroomRejoinedSuccessed extends IChatroomJoinResponse {
8031
8202
  */
8032
8203
  chatroomId: string;
8033
8204
  /** [EN]
8034
- * Number of messages pulled for automatically rejoined chatrooms
8205
+ * @deprecated
8035
8206
  */
8036
8207
  /**
8037
- * 自动重新加入的聊天室拉取消息的数量
8208
+ * @deprecated
8038
8209
  */
8039
8210
  count: number;
8040
8211
  }
@@ -8273,12 +8444,21 @@ interface IChatroomListenerData {
8273
8444
  */
8274
8445
  rejoinedRoom?: IChatroomRejoinedInfo;
8275
8446
  /** [EN]
8276
- * Chatroom KV update notification
8447
+ * Chatroom KV update notification, from 5.28.0 version, this event supports Electron.
8277
8448
  */
8278
8449
  /**
8279
- * 监听到的聊天室 KV 更新
8450
+ * 监听到的聊天室 KV 更新,从 5.28.0 版本开始该事件支持 Electron 平台。
8280
8451
  */
8281
8452
  updatedEntries?: IChatroomEntryListenerData[];
8453
+ /** [EN]
8454
+ * Chatroom KV synced notification, value is chatroom ID
8455
+ * @since 5.28.0
8456
+ */
8457
+ /**
8458
+ * 聊天室 KV 同步完成通知,值为聊天室 ID
8459
+ * @since 5.28.0
8460
+ */
8461
+ entriesSynced?: string;
8282
8462
  /** [EN]
8283
8463
  * User Login/Logout notification
8284
8464
  */
@@ -8287,7 +8467,7 @@ interface IChatroomListenerData {
8287
8467
  */
8288
8468
  userChange?: IChatroomUserChangeInfo;
8289
8469
  /** [EN]
8290
- * Chatroom destroyed
8470
+ * Chatroom destroyed, value is destroyed chatroom ID.
8291
8471
  */
8292
8472
  /**
8293
8473
  * 聊天室销毁事件,值为销毁的聊天室 ID
@@ -8337,10 +8517,10 @@ interface IChatroomEntry {
8337
8517
  */
8338
8518
  value: string;
8339
8519
  /** [EN]
8340
- * Whether to send a notification message after successful setup
8520
+ * Whether to send a notification message after successful setup. This property is invalid when setting multiple properties at once.
8341
8521
  */
8342
8522
  /**
8343
- * 设置成功后是否发送通知消息
8523
+ * 设置成功后是否发送通知消息,批量设置时无效。
8344
8524
  */
8345
8525
  isSendNotification?: boolean;
8346
8526
  /** [EN]
@@ -8392,7 +8572,6 @@ interface IChatroomInfo {
8392
8572
  */
8393
8573
  /**
8394
8574
  * 成员列表
8395
- * @todo 需确认数组元素的数据结构
8396
8575
  */
8397
8576
  userInfos: IChatroomUser[];
8398
8577
  /** [EN]
@@ -8418,10 +8597,10 @@ interface IRemoveChatroomEntry {
8418
8597
  */
8419
8598
  key: string;
8420
8599
  /** [EN]
8421
- * Whether to send a notification message after successful deletion
8600
+ * Whether to send a notification message after successful deletion. This property is invalid when deleting multiple properties at once.
8422
8601
  */
8423
8602
  /**
8424
- * 删除成功后是否发送通知消息
8603
+ * 删除成功后是否发送通知消息,批量删除时无效。
8425
8604
  */
8426
8605
  isSendNotification?: boolean;
8427
8606
  /** [EN]
@@ -8445,9 +8624,7 @@ interface IRemoveChatroomEntries {
8445
8624
  /**
8446
8625
  * key 属性名称,支持英文字母、数字、+、=、-、_ 的组合方式,最大长度 128 字符
8447
8626
  */
8448
- entries: {
8449
- key: string;
8450
- }[];
8627
+ keys: string[];
8451
8628
  /** [EN]
8452
8629
  * Whether to send a notification message after successful deletion
8453
8630
  */
@@ -8483,19 +8660,6 @@ interface IChatroomEntries {
8483
8660
  key: string;
8484
8661
  value: string;
8485
8662
  }[];
8486
- /** [EN]
8487
- * Whether to send a notification message after successful setup
8488
- */
8489
- /**
8490
- * 设置成功后是否发送通知消息
8491
- */
8492
- /** [EN]
8493
- * RC:chrmKVNotiMsg Additional information carried in the message.
8494
- */
8495
- /**
8496
- * RC:chrmKVNotiMsg 消息中携带的附加信息
8497
- */
8498
- notificationExtra?: string;
8499
8663
  /** [EN]
8500
8664
  * Whether to clear this attribute when the user exits the chatroom.
8501
8665
  */
@@ -8511,6 +8675,10 @@ interface IChatroomEntries {
8511
8675
  */
8512
8676
  isForce?: boolean;
8513
8677
  }
8678
+ declare type IChatroomErrorKeys = Array<{
8679
+ key: string;
8680
+ errorCode: number;
8681
+ }>;
8514
8682
  /** [EN]
8515
8683
  * Callback for successful chatroom join
8516
8684
  * @5.8.3
@@ -8574,34 +8742,6 @@ interface IChatroomJoinResponse {
8574
8742
  */
8575
8743
  joinTime: number;
8576
8744
  }
8577
- interface IChrmKVEntry {
8578
- key: string;
8579
- value?: string;
8580
- isSendNotification?: boolean;
8581
- notificationExtra?: string;
8582
- isOverwrite?: boolean;
8583
- isAutoDelete?: boolean;
8584
- timestamp?: number;
8585
- userId?: string;
8586
- type?: number;
8587
- isDeleted?: boolean;
8588
- version?: number;
8589
- }
8590
- interface IChrmKVEntries {
8591
- entries: {
8592
- key: string;
8593
- value?: string;
8594
- timestamp?: number;
8595
- version?: number;
8596
- }[];
8597
- notificationExtra?: string;
8598
- isOverwrite?: boolean;
8599
- isAutoDelete?: boolean;
8600
- timestamp?: number;
8601
- userId?: string;
8602
- type?: number;
8603
- isDeleted?: boolean;
8604
- }
8605
8745
 
8606
8746
  /** [EN]
8607
8747
  * @category Interface
@@ -9328,7 +9468,11 @@ declare class Validator {
9328
9468
  /** 当结果无效时定义错误码 */
9329
9469
  private _code;
9330
9470
  private _errmsg;
9331
- /** 检测结果失败时定义错误码及错误信息,整个检测过程中仅第一次调用生效 */
9471
+ /**
9472
+ * 当验证结果为失败时,设置错误码和错误信息;若验证结果未失败,则不生效
9473
+ * @param code 错误码
9474
+ * @param msg 错误信息
9475
+ */
9332
9476
  fail(code: number, msg?: string): Validator;
9333
9477
  /**
9334
9478
  * 设置验证结果为失败,并设置错误码和错误信息
@@ -9388,6 +9532,7 @@ declare class Validator {
9388
9532
  /** 整数检查 */
9389
9533
  assertInteger(key: string, value: unknown, required?: boolean): Validator;
9390
9534
  isLimitedInteger(key: string, value: unknown, min: number, max: number, required?: boolean): Validator;
9535
+ isTimestamp(key: string, value: unknown, required?: boolean): Validator;
9391
9536
  /** 有限整数检查 */
9392
9537
  assertLimitedInteger(key: string, value: unknown, min: number, max: number, required?: boolean): Validator;
9393
9538
  isArray(key: string, value: unknown, required?: boolean): Validator;
@@ -9497,7 +9642,6 @@ interface INaviInfo {
9497
9642
  voipCallInfo: string | null;
9498
9643
  /**
9499
9644
  * 聊天室 kv 存储开关
9500
- * @todo 需确认详细有效值
9501
9645
  * @description 公有云独有配置
9502
9646
  */
9503
9647
  kvStorage: number;
@@ -9717,11 +9861,11 @@ interface INaviInfo {
9717
9861
  */
9718
9862
  repairHisMsg?: number;
9719
9863
  /**
9720
- * #用户订阅驱动配置,位标记!!:
9864
+ * #用户订阅驱动配置,按位运算:
9721
9865
  * * 第一位:是否开启在线状态订阅功能
9722
9866
  * * 第二位:是否开启用户信息托管订阅功能
9723
- * * 第三位:好友在线状态订阅功能
9724
- * * 第四位:好友资料变更订阅功能
9867
+ * * 第三位:好友在线状态订阅功能;开启后,仅对之后新添加的好友生效,对已存在的好友无效;
9868
+ * * 第四位:好友资料变更订阅功能;开启后,仅对之后新添加的好友生效,对已存在的好友无效;
9725
9869
  */
9726
9870
  subDriven?: number;
9727
9871
  /**
@@ -9820,12 +9964,11 @@ declare type IPromiseResult<T = void> = Promise<IAsyncRes<T>>;
9820
9964
  /** [EN]
9821
9965
  * User information
9822
9966
  * @since 5.10.1
9823
- *
9824
9967
  */
9825
9968
  /**
9826
9969
  * 用户信息
9827
9970
  * @since 5.10.1
9828
- * */
9971
+ */
9829
9972
  interface IUserProfileInfo {
9830
9973
  /** [EN]
9831
9974
  * User ID
@@ -9916,7 +10059,6 @@ interface IUserProfileInfo {
9916
10059
  * Subscription relationship information
9917
10060
  * @since 5.9.8
9918
10061
  * @category Interface
9919
-
9920
10062
  */
9921
10063
  /**
9922
10064
  * 订阅关系信息
@@ -9964,7 +10106,6 @@ interface ISubscribeRelationInfo {
9964
10106
  * Subscribe to user status information
9965
10107
  * @category Interface
9966
10108
  * @since 5.9.8
9967
-
9968
10109
  */
9969
10110
  /**
9970
10111
  * 订阅用户状态信息
@@ -10049,44 +10190,110 @@ interface ISubscribeStatusDetail {
10049
10190
  /**
10050
10191
  * 平台
10051
10192
  */
10052
- platform: PlatformInfo;
10193
+ platform: Platform;
10053
10194
  }
10054
-
10055
10195
  /** [EN]
10056
- * Friend relationship
10196
+ * Platform online status
10057
10197
  * @category Interface
10058
- * @since 5.12.0
10198
+ * @since 5.28.0
10059
10199
  */
10060
10200
  /**
10061
- * 好友关系
10201
+ * 平台在线状态
10062
10202
  * @category Interface
10063
- * @since 5.12.0
10203
+ * @since 5.28.0
10064
10204
  */
10065
- interface IFriendRelationInfo {
10205
+ interface IPlatformOnlineStatus {
10066
10206
  /** [EN]
10067
- * User ID
10207
+ * Platform identifier
10068
10208
  */
10069
10209
  /**
10070
- * 用户 ID
10210
+ * 平台标识
10071
10211
  */
10072
- userId: string;
10212
+ platform: Platform;
10073
10213
  /** [EN]
10074
- * Friend relationship
10214
+ * Online status in the current platform
10075
10215
  */
10076
10216
  /**
10077
- * 好友关系
10217
+ * 在当前平台的在线状态
10078
10218
  */
10079
- relationType: FriendRelationType;
10219
+ isOnline: boolean;
10220
+ /** [EN]
10221
+ * Update time
10222
+ */
10223
+ /**
10224
+ * 更新时间
10225
+ */
10226
+ updateTime: number;
10080
10227
  }
10081
10228
  /** [EN]
10082
- * Friend information
10229
+ * Online status of subscribed users
10083
10230
  * @category Interface
10084
- * @since 5.12.0
10085
- */
10231
+ * @since 5.28.0
10232
+ */
10086
10233
  /**
10087
- * 好友信息
10234
+ * 已订阅用户的在线状态
10088
10235
  * @category Interface
10089
- * @since 5.12.0
10236
+ * @since 5.28.0
10237
+ */
10238
+ interface ISubscribeUserOnlineStatus {
10239
+ /** [EN]
10240
+ * User ID
10241
+ */
10242
+ /**
10243
+ * 用户 ID
10244
+ */
10245
+ userId: string;
10246
+ /** [EN]
10247
+ * Whether the user is online, this field is used to mark whether the user is online, not to pay attention to the specific online platform
10248
+ */
10249
+ /**
10250
+ * 是否在线,该字段用于标记用户是否在线,不关注具体在线平台
10251
+ */
10252
+ isOnline: boolean;
10253
+ /** [EN]
10254
+ * Platform online status details, record the online status of different platforms
10255
+ */
10256
+ /**
10257
+ * 在线状态详情,记录不同平台的在线状态信息
10258
+ */
10259
+ details: IPlatformOnlineStatus[];
10260
+ }
10261
+
10262
+ /** [EN]
10263
+ * Friend relationship
10264
+ * @category Interface
10265
+ * @since 5.12.0
10266
+ */
10267
+ /**
10268
+ * 好友关系
10269
+ * @category Interface
10270
+ * @since 5.12.0
10271
+ */
10272
+ interface IFriendRelationInfo {
10273
+ /** [EN]
10274
+ * User ID
10275
+ */
10276
+ /**
10277
+ * 用户 ID
10278
+ */
10279
+ userId: string;
10280
+ /** [EN]
10281
+ * Friend relationship
10282
+ */
10283
+ /**
10284
+ * 好友关系
10285
+ */
10286
+ relationType: FriendRelationType;
10287
+ }
10288
+ /** [EN]
10289
+ * Friend information
10290
+ * @category Interface
10291
+ * @since 5.12.0
10292
+ */
10293
+ /**
10294
+ * 好友信息
10295
+ * @category Interface
10296
+ * @since 5.12.0
10090
10297
  */
10091
10298
  interface IFriendInfo {
10092
10299
  /**
@@ -11228,62 +11435,29 @@ declare function getMessageTypeDescription(type: string): MessageTypeDescription
11228
11435
  declare function hasMessageTypeDescription(type: string): boolean;
11229
11436
 
11230
11437
  /**
11231
- * 会话列表查询条件枚举
11232
- */
11233
- declare const ConversationListFilterType: {
11234
- /**
11235
- * 按时间戳查询会话列表
11236
- */
11237
- readonly TIMESTAMP: 0;
11238
- /**
11239
- * 获取置顶会话列表
11240
- */
11241
- readonly TOP: 1;
11242
- /**
11243
- * 获取免打扰会话列表,暂不支持 Electron 平台
11244
- */
11245
- readonly BLOCKED: 2;
11246
- /**
11247
- * 获取未读会话列表
11248
- */
11249
- readonly UNREAD: 3;
11250
- /**
11251
- * 获取全部会话列表,仅 Electron 平台支持
11252
- */
11253
- readonly ALL: 4;
11254
- /**
11255
- * 按分页索引获取会话列表,仅 Electron 平台支持;目前仅 v2-adapter 中有调用
11256
- */
11257
- readonly PAGE_INDEX: 5;
11258
- };
11259
- /**
11260
- * 按时间戳查询参数
11438
+ * 按时间戳查询会话列表参数
11261
11439
  */
11262
- declare type GetConversationListByTimestampParams = {
11440
+ declare type IGetConversationListByTimestampParams = {
11263
11441
  /**
11264
11442
  * 获取会话起始时间,需要精确到毫秒,0 表示当前时间
11265
11443
  */
11266
11444
  startTime: number;
11267
11445
  /**
11268
- * 分页数量,默认值
11446
+ * 分页数量
11269
11447
  */
11270
11448
  count: number;
11271
11449
  /**
11272
- * 该参数在 Electron 平台下无效,Electron 平台下始终为 0;
11450
+ * 查询方向。该参数对 Electron 平台无效,Electron 平台下始终为 0;
11273
11451
  * * 0 - 从 startTime 开始向前查询,数据按时间降序排序
11274
11452
  * * 1 - 从 startTime 开始向后查询,数据按时间升序排序
11275
11453
  */
11276
11454
  order?: 0 | 1;
11277
11455
  /**
11278
- * 单群聊的组织 ID,非超级群的频道 ID
11279
- * * 该参数对 Web 平台无效
11280
- * * Electron 平台下,当值为 undefined 时,将获取全部会话,其他查询条件失效
11456
+ * 单、群聊会话的组织 ID,用于多组织场景查询;仅 Electron 平台有效
11281
11457
  */
11282
11458
  channelId?: string;
11283
11459
  /**
11284
- * 是否置顶优先
11285
- * * 当前仅支持 Electron 平台
11286
- * * 当 channelId 非 undefined 时,该参数无效
11460
+ * 是否置顶优先,仅 Electron 平台有效
11287
11461
  */
11288
11462
  topPriority?: boolean;
11289
11463
  /**
@@ -11291,89 +11465,6 @@ declare type GetConversationListByTimestampParams = {
11291
11465
  */
11292
11466
  conversationTypes?: ConversationType[];
11293
11467
  };
11294
- /**
11295
- * 置顶列表查询参数
11296
- */
11297
- declare type GetTopConversationListParams = {
11298
- /**
11299
- * 会话类型,值为空或长度为 0 时,获取全部会话类型
11300
- */
11301
- conversationTypes?: ConversationType[];
11302
- /**
11303
- * 频道 ID,当值为 undefined 时,获取全部频道会话;
11304
- * * 参数对超级群无效,超级群始终只返回默认频道数据
11305
- */
11306
- channelId?: string;
11307
- };
11308
- /**
11309
- * 未读列表查询参数
11310
- */
11311
- interface GetUnreadConversationListParams extends Pick<GetTopConversationListParams, 'conversationTypes'> {
11312
- }
11313
- /**
11314
- * 全部列表查询参数
11315
- */
11316
- declare type GetAllConversationListFilterParams = {
11317
- /**
11318
- * 频道 ID,当值为 undefined 时,获取全部频道会话
11319
- * * 参数对超级群无效,超级群始终只返回默认频道数据
11320
- */
11321
- channelId?: string;
11322
- };
11323
- /**
11324
- * 按分页索引获取会话列表查询参数
11325
- */
11326
- declare type GetConversationListByPageIndexParams = {
11327
- /**
11328
- * 分页索引
11329
- */
11330
- index: number;
11331
- /**
11332
- * 分页数量
11333
- */
11334
- limit: number;
11335
- /**
11336
- * 会话类型,值为空或长度为 0 时,获取全部会话类型
11337
- */
11338
- conversationTypes?: ConversationType[];
11339
- };
11340
- /**
11341
- * 会话列表查询参数
11342
- * * type 为 ConversationListFilterType 的枚举值
11343
- * * params 为对应的查询参数
11344
- */
11345
- declare type ConversationListFilter = {
11346
- type: typeof ConversationListFilterType.ALL;
11347
- params?: GetAllConversationListFilterParams;
11348
- } | {
11349
- type: typeof ConversationListFilterType.TIMESTAMP;
11350
- params: GetConversationListByTimestampParams;
11351
- } | {
11352
- type: typeof ConversationListFilterType.TOP;
11353
- params?: GetTopConversationListParams;
11354
- } | {
11355
- type: typeof ConversationListFilterType.UNREAD;
11356
- params?: GetUnreadConversationListParams;
11357
- } | {
11358
- type: typeof ConversationListFilterType.BLOCKED;
11359
- params?: never;
11360
- } | {
11361
- type: typeof ConversationListFilterType.PAGE_INDEX;
11362
- params: GetConversationListByPageIndexParams;
11363
- };
11364
- /**
11365
- * 会话列表查询结果
11366
- */
11367
- declare type GetConversationListResponse = {
11368
- /**
11369
- * 会话列表
11370
- */
11371
- list: IReceivedConversation[];
11372
- /**
11373
- * 是否还有更多数据,当值为 undefined 时,需要业务自行判断
11374
- */
11375
- hasNext?: boolean;
11376
- };
11377
11468
 
11378
11469
  /** 已读回执用户信息 */
11379
11470
  declare type ReadReceiptUser = {
@@ -11525,6 +11616,28 @@ interface ConversationBatchDeletionParams {
11525
11616
  deleteMessages: boolean;
11526
11617
  }
11527
11618
 
11619
+ interface IExpansionMsgContent {
11620
+ /**
11621
+ * 消息扩展 Key-Value 对象
11622
+ */
11623
+ put?: Record<string, string>;
11624
+ /**
11625
+ * 删除的 keys
11626
+ */
11627
+ del?: string[];
11628
+ /**
11629
+ * messageUId
11630
+ */
11631
+ mid: string;
11632
+ /**
11633
+ * 是否删除所有扩展,当值为 1 时,put、del 配置将无效
11634
+ * * 0: 不删除
11635
+ * * 1: 删除所有扩展
11636
+ * @description 目前 SDK 上行暂未使用到,服务器下行可能存在该属性。
11637
+ */
11638
+ clear?: number;
11639
+ }
11640
+
11528
11641
  /**
11529
11642
  * 进程内缓存数据
11530
11643
  */
@@ -11564,42 +11677,15 @@ interface IIPCMethods {
11564
11677
  getConnectedTime(): number;
11565
11678
  /**
11566
11679
  * 获取历史消息
11567
- * @param conversationType
11568
- * @param targetId
11569
- * @param timestamp
11570
- * @param count
11571
- * @param order
11572
- */
11573
- getHistoryMessage(conversationType: ConversationType, targetId: string,
11574
- /**
11575
- * 拉取时间戳,值为 `0` 表示从当前时间拉取
11576
- */
11577
- timestamp: number,
11578
- /**
11579
- * 获取条数,有效值 `1` - `20`
11580
- */
11581
- count: number,
11582
- /**
11583
- * @description
11584
- * 1. `0` 表示升序,获取消息发送时间比传入 `sentTime` 小 的消息
11585
- * 2. `1` 表示降序,获取消息发送时间比传入 `sentTime` 大 的消息
11586
- */
11587
- order: 0 | 1,
11588
- /**
11589
- * 会话的业务标识
11590
- */
11591
- channelId: string,
11592
- /**
11593
- * 消息类型
11594
11680
  */
11595
- objectName: string): IPromiseResult<{
11681
+ getHistoryMessage(conversation: IConversationOption, options: Required<IGetHistoryMessageOption>, fromLocal: boolean): Promise<RCResult<{
11596
11682
  list: IReceivedMessage[];
11597
11683
  hasMore: boolean;
11598
- }>;
11684
+ }>>;
11599
11685
  /**
11600
11686
  * 获取指定消息类型的历史消息
11601
11687
  */
11602
- getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, timestamp: number, count: number, messageTypes: string[], order: number, channelId: string): Promise<IAsyncRes<{
11688
+ getHistoryMessagesByObjectNames(conversation: IConversationOption, option: Required<IGetHistoryMessagesByTypesOption>): Promise<RCResult<{
11603
11689
  list: IReceivedMessage[];
11604
11690
  hasMore: boolean;
11605
11691
  }>>;
@@ -11621,11 +11707,11 @@ interface IIPCMethods {
11621
11707
  /**
11622
11708
  * 根据过滤条件获取会话列表
11623
11709
  * * 开启'会话列表支持超级群'功能后,结果数据中将包含超级群默认频道会话数据;
11624
- *
11625
- * @param filter 过滤条件
11710
+ * @param params 过滤条件
11711
+ * @param includeUG 会话列表支持超级群开关
11626
11712
  * @returns 会话列表,始终保持时间升序返回
11627
11713
  */
11628
- getConversationListByFilter(filter: ConversationListFilter): Promise<RCResult<GetConversationListResponse>>;
11714
+ getConversationListByTimestamp(params: IGetConversationListByTimestampParams, includeUG: boolean): Promise<RCResult<IReceivedConversation[]>>;
11629
11715
  /**
11630
11716
  * 分页获取未打标签的会话列表
11631
11717
  * @param timestamp 获取会话起始时间,需要精确到毫秒,0 表示当前时间
@@ -11639,7 +11725,7 @@ interface IIPCMethods {
11639
11725
  * @param targetId
11640
11726
  * @param channelId
11641
11727
  */
11642
- getConversation(conversationType: ConversationType, targetId: string, channelId: string): Promise<RCResult<IReceivedConversation>>;
11728
+ getConversation(conversation: IConversationOption): Promise<RCResult<IReceivedConversation>>;
11643
11729
  /**
11644
11730
  * 批量设置会话置顶
11645
11731
  * @param conversations 会话列表
@@ -11679,44 +11765,47 @@ interface IIPCMethods {
11679
11765
  batchDeleteConversations(params: ConversationBatchDeletionParams): Promise<RCResult>;
11680
11766
  /**
11681
11767
  * 获取所有会话未读数
11682
- * @param channelId 多组织 Id,仅限于获取单群聊,超级群会话仅查询默认频道未读数
11683
11768
  * @param conversationTypes
11684
11769
  * @param includeMuted 包含已设置免打扰的会话
11770
+ * @param includeUg 会话列表支持超级群开关
11771
+ * @param channelId 单群聊多组织 Id,仅限于获取单群聊会话数据,超级群会话仅查询默认频道未读数,目前仅 v2-adapter 支持传递
11685
11772
  */
11686
- getTotalUnreadCount(channelId: string, conversationTypes: ConversationType[], includeMuted: boolean): Promise<RCResult<number>>;
11773
+ getTotalUnreadCount(conversationTypes: ConversationType[], includeMuted: boolean, channelId?: string): Promise<RCResult<number>>;
11687
11774
  /**
11688
11775
  * 获取指定会话未读数
11689
11776
  */
11690
- getConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<number>;
11777
+ getConversationUnreadCount(conversation: IConversationOption): Promise<RCResult<number>>;
11691
11778
  /**
11692
11779
  * 清除指定会话未读数
11693
11780
  */
11694
- clearConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
11781
+ clearConversationUnreadCount(conversation: IConversationOption): Promise<RCResult>;
11695
11782
  /**
11696
- * 清除全部会话未读数
11783
+ * 清除全部会话未读数,不包含超级群会话
11697
11784
  */
11698
- clearAllUnreadCount(): Promise<RCResult>;
11785
+ clearAllSGUnreadCount(): Promise<RCResult>;
11699
11786
  /**
11700
11787
  * 获取第一个未读消息
11701
11788
  */
11702
- getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedMessage | null>;
11703
- getFirstUnreadMessageInfo(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IFirstUnreadMessageInfo | null>;
11789
+ getFirstUnreadMessage(conversation: IConversationOption): Promise<RCResult<IReceivedMessage | null>>;
11790
+ /**
11791
+ * 获取第一条未读消息摘要
11792
+ */
11793
+ getFirstUnreadMessageDigest(conversation: IConversationOption): Promise<RCResult<IFirstUnreadMessageInfo | null>>;
11704
11794
  /**
11705
11795
  * 设置/保存指定会话消息草稿
11706
- * @draft 草稿内容
11707
11796
  */
11708
- saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string, channelId: string): Promise<ErrorCode>;
11797
+ saveTextMessageDraft(conversation: IConversationOption, draft: string): Promise<RCResult>;
11709
11798
  /**
11710
11799
  * 获取指定会话消息草稿
11711
11800
  */
11712
- getConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<string>;
11801
+ getTextMessageDraft(conversation: IConversationOption): Promise<RCResult<string>>;
11713
11802
  /**
11714
11803
  * 清除指定会话消息草稿
11715
11804
  */
11716
- clearConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
11805
+ clearTextMessageDraft(conversation: IConversationOption): Promise<RCResult>;
11717
11806
  getConversationNotificationLevel(conversation: IConversationOption): Promise<RCResult<NotificationLevel>>;
11718
- getTotalUnreadCountByLevels(conversationTypes: ConversationType[], levels: NotificationLevel[], isMentioned?: boolean): Promise<IAsyncRes<number>>;
11719
- sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void, traceId?: string): IPromiseResult<IReceivedMessage>;
11807
+ getTotalUnreadCountByLevels(conversationTypes: ConversationType[], levels: NotificationLevel[], isMentioned?: boolean): Promise<RCResult<number>>;
11808
+ sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, traceId: string, onBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
11720
11809
  /**
11721
11810
  * 断开连接
11722
11811
  */
@@ -11729,68 +11818,58 @@ interface IIPCMethods {
11729
11818
  registerMessageType(objectName: string, params: MessageTypeDescription): void;
11730
11819
  /**
11731
11820
  * 加入聊天室
11821
+ * @param chatroomId 聊天室 id
11732
11822
  * @param count 拉取消息数量
11823
+ * @param createIfNotExist 若聊天室不存在则创建聊天室
11824
+ * @param extra 扩展信息
11733
11825
  */
11734
- joinChatroom(chatroomId: string, count: number, extra?: string): Promise<ErrorCode>;
11735
- /**
11736
- * 加入已存在的聊天室
11737
- * @param count 拉取消息数量
11738
- */
11739
- joinExistChatroom(chatroomId: string, count: number, extra?: string): Promise<IAsyncRes<IChatroomJoinResponse>>;
11826
+ joinChatroom(chatroomId: string, count: number, createIfNotExist: boolean, extra?: string): Promise<RCResult<IChatroomJoinResponse>>;
11740
11827
  /**
11741
11828
  * 退出聊天室
11742
11829
  */
11743
- quitChatroom(chatroomId: string): Promise<ErrorCode>;
11830
+ quitChatroom(chatroomId: string): Promise<RCResult>;
11744
11831
  /**
11745
11832
  * 获取聊天室信息
11746
11833
  * @param count 获取人数,范围 0 - 20
11747
11834
  * @param order 排序方式,1 正序,2 倒序
11748
11835
  */
11749
- getChatroomInfo(chatroomId: string, count: number, order: number): IPromiseResult<IChatroomInfo>;
11836
+ getChatroomInfo(chatroomId: string, count: number, order: 1 | 2): Promise<RCResult<IChatroomInfo>>;
11750
11837
  /**
11751
11838
  * 获取聊天室历史消息
11752
11839
  */
11753
11840
  getChatroomHistoryMessages(chatroomId: string, timestamp: number, count: number, order: number): Promise<RCResult<IGetHistoryMessageResult>>;
11754
11841
  /**
11755
11842
  * 设置聊天室属性
11843
+ * @param chatroomId 聊天室 id
11844
+ * @param entry 属性信息
11845
+ * @param isForce 是否强制覆盖已有属性
11756
11846
  */
11757
- setChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
11847
+ setChatroomEntry(chatroomId: string, entry: IChatroomEntry, isForce: boolean): Promise<RCResult>;
11758
11848
  /**
11759
11849
  * 批量设置聊天室属性
11760
11850
  */
11761
- setChatroomEntries(chatroomId: string, entry: IChrmKVEntries): Promise<{
11762
- code: ErrorCode;
11763
- data?: any;
11764
- }>;
11765
- /**
11766
- * 强制设置聊天室属性
11767
- */
11768
- forceSetChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
11851
+ setChatroomEntries(chatroomId: string, entry: IChatroomEntries): Promise<RCResult>;
11769
11852
  /**
11770
11853
  * 删除聊天室属性
11771
11854
  */
11772
- removeChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
11855
+ removeChatroomEntry(chatroomId: string, entry: IRemoveChatroomEntry, isForce: boolean): Promise<RCResult>;
11773
11856
  /**
11774
11857
  * 批量删除聊天室属性
11775
11858
  */
11776
- removeChatroomEntries(chatroomId: string, entries: IChrmKVEntries): Promise<{
11777
- code: ErrorCode;
11778
- data?: any;
11779
- }>;
11780
- /**
11781
- * 强制删除聊天室属性
11782
- */
11783
- forceRemoveChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
11859
+ removeChatroomEntries(chatroomId: string, entries: IRemoveChatroomEntries): Promise<RCResult>;
11784
11860
  /**
11785
11861
  * 获取聊天室 key 对应 value
11786
11862
  */
11787
- getChatroomEntry(chatroomId: string, key: string): IPromiseResult<string | null>;
11863
+ getChatroomEntry(chatroomId: string, key: string): Promise<RCResult<string>>;
11788
11864
  /**
11789
11865
  * 获取聊天室所有 key value
11790
11866
  */
11791
- getAllChatroomEntry(chatroomId: string): IPromiseResult<{
11792
- [key: string]: string;
11793
- }>;
11867
+ getAllChatroomEntries(chatroomId: string): Promise<RCResult<Record<string, string>>>;
11868
+ /**
11869
+ * 设置聊天室消息重排开关
11870
+ * @param enableCheck
11871
+ */
11872
+ setCheckChatRoomDuplicateMessage(enableCheck: boolean): Promise<RCResult>;
11794
11873
  /**
11795
11874
  * 获取上传认证信息
11796
11875
  * @description
@@ -11918,9 +11997,9 @@ interface IIPCMethods {
11918
11997
  status: string;
11919
11998
  }>;
11920
11999
  /**
11921
- * 清空所有会话
12000
+ * 清空所有会话,目前仅 v2-adapter 中提供
11922
12001
  */
11923
- clearConversations(conversationTypes?: ConversationType[], channelId?: string): Promise<ErrorCode>;
12002
+ clearConversations(conversationTypes?: ConversationType[], channelId?: string): Promise<RCResult>;
11924
12003
  /**
11925
12004
  * 加入黑名单
11926
12005
  */
@@ -11940,30 +12019,39 @@ interface IIPCMethods {
11940
12019
  /**
11941
12020
  * 向本地插入一条消息,不发送到服务器
11942
12021
  */
11943
- insertMessage(conversationType: ConversationType, targetId: string, insertOptions: IInsertMsgOptions): IPromiseResult<IReceivedMessage>;
12022
+ insertMessage(conversation: IConversationOption, insertOptions: InnerInsertMessageParams): Promise<RCResult<IReceivedMessage>>;
11944
12023
  /**
11945
- * 删除本地消息
12024
+ * 向本地批量插入消息
12025
+ * @param messages
12026
+ * @param checkDuplicate
11946
12027
  */
11947
- deleteMessages(messageIds: number[]): Promise<ErrorCode>;
12028
+ batchInsertMessage(messages: IInsertMessage[], checkDuplicate: boolean): Promise<RCResult<boolean>>;
11948
12029
  /**
11949
12030
  * 通过时间戳删除本地消息
11950
12031
  */
11951
- deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId: string): Promise<ErrorCode>;
11952
- batchClearMessagesByTimestamp(options: IClearMessageOption[]): Promise<ErrorCode>;
11953
- batchClearMessagesByTimestamp(options: IClearMessageOption[]): Promise<ErrorCode>;
11954
- batchClearRemoteHistoryMessages(options: IClearMessageOption[], isDeleteLocal?: boolean): Promise<RCResult>;
12032
+ deleteLocalMessagesByTimestamp(conversation: IConversationOption, timestamp: number, cleanSpace: boolean): Promise<RCResult>;
12033
+ batchClearLocalMessagesByTimestamp(options: IClearMessageOption[]): Promise<RCResult>;
12034
+ batchClearRemoteHistoryMessages(options: IClearMessageOption[], isDeleteLocal: boolean): Promise<RCResult>;
11955
12035
  /**
11956
12036
  * 清空会话下历史消息
11957
12037
  */
11958
- clearMessages(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
12038
+ clearLocalMessages(conversation: IConversationOption): Promise<RCResult>;
12039
+ /**
12040
+ * 删除本地消息
12041
+ * @param messageIds 消息 ID 数组
12042
+ */
12043
+ deleteLocalMessages(messageIds: number[]): Promise<RCResult>;
11959
12044
  /**
11960
12045
  * 获取消息
11961
12046
  */
11962
12047
  getMessage(messageId: number | string): Promise<RCResult<IReceivedMessage>>;
11963
12048
  /**
11964
12049
  * 设置消息内容
12050
+ * @param messageId 消息 ID
12051
+ * @param content 消息内容,JSON 字符串
12052
+ * @param messageType 消息类型
11965
12053
  */
11966
- setMessageContent(messageId: number, content: any, messageType: string): Promise<ErrorCode>;
12054
+ setMessageContent(messageId: number, content: string, messageType: string): Promise<RCResult>;
11967
12055
  /**
11968
12056
  * 设置消息搜索字段
11969
12057
  */
@@ -11979,9 +12067,13 @@ interface IIPCMethods {
11979
12067
  */
11980
12068
  searchMessagesWithParams(params: ISearchMessageParams): Promise<RCResult<ISearchMessagesResult>>;
11981
12069
  /**
11982
- * 获取会话下所有未读的 @ 消息
12070
+ * 获取单一会话下所有未读的 @ 消息
12071
+ */
12072
+ getUnreadMentionedMessages(conversation: IConversationOption): Promise<RCResult<IReceivedMessage[]>>;
12073
+ /**
12074
+ * 获取单一会话的 @ 消息未读数
11983
12075
  */
11984
- getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId: string): IReceivedMessage[];
12076
+ getUnreadMentionedCount(conversation: IConversationOption): Promise<RCResult<number>>;
11985
12077
  /**
11986
12078
  * 设置消息发送状态
11987
12079
  */
@@ -11999,16 +12091,9 @@ interface IIPCMethods {
11999
12091
  */
12000
12092
  clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
12001
12093
  /**
12002
- * 协议栈获取远端历史消息
12003
- */
12004
- getRemoteHistoryMessages(conversationType: ConversationType, targetId: string, timestamp: number, count: number, order: 0 | 1, channelId: string): IPromiseResult<{
12005
- list: IReceivedMessage[];
12006
- hasMore: boolean;
12007
- }>;
12008
- /**
12009
- * 获取所有群聊会话 @ 消息未读数
12094
+ * 获取所有群聊会话 @ 消息未读数,不包含超级群会话
12010
12095
  */
12011
- getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
12096
+ getAllUnreadMentionedCount(): Promise<RCResult<number>>;
12012
12097
  clearLocalData(): Promise<RCResult<boolean>>;
12013
12098
  /**
12014
12099
  * 获取运行时的系统信息,仅限 Electron 平台可用
@@ -12043,9 +12128,9 @@ interface IIPCMethods {
12043
12128
  */
12044
12129
  getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<IAsyncRes<ISubscribeUserStatusInfo[]>>;
12045
12130
  /**
12046
- * 获取指定用户的在线状态
12131
+ * 获取指定用户的在线状态
12047
12132
  */
12048
- getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<IAsyncRes<ISubscribeUserStatusInfo[]>>;
12133
+ getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
12049
12134
  updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<IUpdateMyProfileFail>>;
12050
12135
  getUserProfiles(userIds: string[]): Promise<IAsyncRes<IUserProfileInfo[]>>;
12051
12136
  getMyUserProfile(): Promise<IAsyncRes<IUserProfileInfo>>;
@@ -12137,11 +12222,11 @@ interface IIPCMethods {
12137
12222
  */
12138
12223
  getAutoTranslateEnabled(): Promise<RCResult<boolean>>;
12139
12224
  rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<IAsyncRes<any>>;
12225
+ bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<RCResult>;
12140
12226
  rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<{
12141
12227
  code: ErrorCode;
12142
12228
  buffer?: any;
12143
12229
  }>;
12144
- removeChatroomFromCatch(roomId: string): void;
12145
12230
  requestSpeechToTextForMessage(messageUId: string, option?: IConvertSpeechToTextOption): Promise<RCResult>;
12146
12231
  setMessageSpeechToTextVisible(messageId: number, isVisible: boolean): Promise<RCResult>;
12147
12232
  /**
@@ -12170,6 +12255,125 @@ interface IIPCMethods {
12170
12255
  * 同步服务器会话列表至本地数据库
12171
12256
  */
12172
12257
  syncRemoteConversations(): Promise<RCResult>;
12258
+ /**
12259
+ * 超级群消息正在输入中
12260
+ * @param options
12261
+ */
12262
+ sendUltraGroupTypingStatus(options: IConversationOption): Promise<RCResult>;
12263
+ /**
12264
+ * 获取超级群会话列表
12265
+ */
12266
+ getUltraGroupList(options?: IGetUltraGroupListOption): Promise<RCResult<IReceivedConversation[]>>;
12267
+ /**
12268
+ * 根据消息 UId 列表从服务器获取消息
12269
+ * @param conversation 会话信息
12270
+ * @param messageUIds 消息 UId 列表
12271
+ */
12272
+ getRemoteMessagesByUIds(conversation: IConversationOption, messageUIds: string[]): Promise<RCResult<IReceivedMessage[]>>;
12273
+ /**
12274
+ * 获取超级群未读 @ 消息摘要
12275
+ */
12276
+ getUGUnreadMentionedDigest(options: IUltraGroupUnreadMentionedOption): Promise<RCResult<IUltraUnreadMsg[]>>;
12277
+ getContinuousMessages(conversation: IConversationOption, options: Required<IGetHistoryMessageOption>): Promise<RCResult<{
12278
+ list: IReceivedMessage[];
12279
+ timestamp: number;
12280
+ hasMore: boolean;
12281
+ }>>;
12282
+ getMessagesAroundTimestamp(conversation: IConversationOption, timestamp: number, beforeCount: number, afterCount: number): Promise<RCResult<IReceivedMessage[]>>;
12283
+ /**
12284
+ * 按时间戳清除超级群下所有子频道本地历史消息
12285
+ * @param targetId 超级群 ID
12286
+ * @param timestamp 时间戳
12287
+ */
12288
+ deleteLocalUGMessagesForAllChannel(targetId: string, timestamp: number): Promise<RCResult>;
12289
+ /**
12290
+ * 更新超级群消息扩展
12291
+ * @param conversation 会话信息
12292
+ * @param content 扩展内容
12293
+ * @param sentTime 消息发送时间
12294
+ */
12295
+ updateUGMessageExpansion(conversation: IConversationOption, content: IExpansionMsgContent, sentTime: number): Promise<RCResult>;
12296
+ /**
12297
+ * 设置指定超级群默认通知配置
12298
+ * @param targetId 指定超级群 Id
12299
+ * @param notificationLevel 超级群通知级别
12300
+ * @param channelId 指定超级群指定频道 Id
12301
+ */
12302
+ setUGDefaultNotificationLevel(targetId: string, notificationLevel: NotificationLevel, channelId?: string): Promise<RCResult>;
12303
+ /**
12304
+ * 获取指定超级群默认通知配置
12305
+ * @param targetId 指定超级群 Id
12306
+ * @param channelId 指定超级群指定频道 Id
12307
+ */
12308
+ getUGDefaultNotificationLevel(targetId: string, channelId?: string): Promise<RCResult<NotificationLevel>>;
12309
+ /**
12310
+ * 获取指定超级群所有子频道未读数
12311
+ * @param targetId 指定超级群 Id
12312
+ * @param levels 通知级别
12313
+ * @param getMentionedCount 是否为获取 @ 未读数
12314
+ */
12315
+ getUGUnreadCountForAllChannels(targetId: string, levels: NotificationLevel[], getMentionedCount: boolean): Promise<RCResult<number>>;
12316
+ /**
12317
+ * 根据超级群的 targetId 数组,获取每个超级群下所有频道会话信息
12318
+ * @param targetIds
12319
+ */
12320
+ getUGUnreadInfoList(targetIds: string[]): Promise<RCResult<IUltraGroupUnreadInfo[]>>;
12321
+ /**
12322
+ * 获取超级群指定会话第一条未读消息摘要
12323
+ * @param conversation
12324
+ */
12325
+ getUGFirstUnreadMessageDigest(conversation: IConversationOption): Promise<RCResult<IUltraUnreadMsg>>;
12326
+ getLocalMessageCount(conversation: IConversationOption): Promise<RCResult<number>>;
12327
+ getConversations(identifiers: IConversationOption[]): Promise<RCResult<IReceivedConversation[]>>;
12328
+ /**
12329
+ * 获取置顶会话列表,开启'会话列表支持超级群'功能后,该接口将包含超级群默认频道会话
12330
+ * @param includeUG 会话列表支持超级群开关
12331
+ * @param conversationTypes 会话类型
12332
+ * @param channelId 单、群聊会话的组织 ID,用于多组织场景
12333
+ */
12334
+ getTopConversationList(includeUG: boolean, conversationTypes?: ConversationType[], channelId?: string): Promise<RCResult<IReceivedConversation[]>>;
12335
+ /**
12336
+ * 获取未读会话列表,开启'会话列表支持超级群'功能后,该接口将包含超级群默认频道会话
12337
+ * @param includeUG 会话列表支持超级群开关
12338
+ * @param conversationTypes 会话类型
12339
+ */
12340
+ getUnreadConversationList(includeUG: boolean, conversationTypes?: ConversationType[]): Promise<RCResult<IReceivedConversation[]>>;
12341
+ /**
12342
+ * 分页获取会话列表,V2-Adapter Electron 独有功能,Web 平台不支持
12343
+ * @param index 分页索引
12344
+ * @param limit 分页数量
12345
+ * @returns 会话列表
12346
+ */
12347
+ getConversationListByPageIndex(index: number, limit: number): Promise<RCResult<IReceivedConversation[]>>;
12348
+ /**
12349
+ * 获取全部本地会话列表,仅支持 Electron 平台
12350
+ * @param includeUG 会话列表支持超级群开关
12351
+ * @param channelId 组织 ID,用于多组织场景,不传则获取全部组织会话
12352
+ */
12353
+ getAllConversationList(includeUG: boolean, channelId?: string): Promise<RCResult<IReceivedConversation[]>>;
12354
+ /**
12355
+ * 获取免打扰超级群列表
12356
+ */
12357
+ getBlockedUGList(): Promise<RCResult<IReceivedConversation[]>>;
12358
+ /**
12359
+ * 获取免打扰会话列表
12360
+ * @param includeUG 会话列表支持超级群开关
12361
+ */
12362
+ getBlockedConversationList(includeUG: boolean): Promise<RCResult<IReceivedConversation[]>>;
12363
+ /**
12364
+ * 获取订阅用户在线状态
12365
+ * @param userIds 用户 ID 列表
12366
+ */
12367
+ getSubscribeUsersOnlineStatus(userIds: string[]): Promise<RCResult<ISubscribeUserOnlineStatus[]>>;
12368
+ saveEditedMessageDraft(draft: IEditedMessageDraft, conversation: IConversationIdentifier): Promise<RCResult>;
12369
+ getEditedMessageDraft(conversation: IConversationIdentifier): Promise<RCResult<IEditedMessageDraft | null>>;
12370
+ clearEditedMessageDraft(conversation: IConversationIdentifier): Promise<RCResult>;
12371
+ /**
12372
+ * 获取未读 @ 消息会话列表
12373
+ * @param params 获取未读 @ 消息会话列表参数
12374
+ * @param includeUG 会话列表支持超级群开关
12375
+ */
12376
+ getUnreadMentionMeConversationList(params: IGetUnreadMentionMeConversationListParams, includeUG: boolean): Promise<RCResult<IReceivedConversation[]>>;
12173
12377
  }
12174
12378
 
12175
12379
  /**
@@ -12511,6 +12715,7 @@ interface IEngineWatcher extends IConnectionListener<false> {
12511
12715
  friendApplicationStatusChanged: (data: IFriendApplicationStatusChange) => void;
12512
12716
  friendCleared: (data: number) => void;
12513
12717
  friendInfoChangedSync: (data: IFriendInfoChangedSync) => void;
12718
+ databaseOpened: (code: number, recreate: boolean) => void;
12514
12719
  databaseUpgradeWillStart: () => void;
12515
12720
  databaseUpgrading: (progress: number) => void;
12516
12721
  databaseUpgradeDidComplete: (code: ErrorCode) => void;
@@ -12695,7 +12900,6 @@ declare const isHttpUrl: (value: any) => boolean;
12695
12900
  */
12696
12901
  declare const notEmptyObject: (val: Object) => boolean;
12697
12902
  declare const isValidConversationType: (conversation: number) => boolean;
12698
- declare const isValidNotificationLevel: (level: number) => boolean;
12699
12903
  declare const isValidEnum: (param: {
12700
12904
  value: unknown;
12701
12905
  type: object;
@@ -12917,9 +13121,13 @@ declare abstract class BasicLogger {
12917
13121
  constructor(_appkey: string, _id: string, _type: LogType, logDB: LogDBProxy);
12918
13122
  protected _write(logData: ILogData): void;
12919
13123
  /**
12920
- * 创建事务追踪 ID,全局唯一,便于跨进程、异步事务追踪,需要考虑多进程
13124
+ * 生成事务追踪 ID,全局唯一,便于跨进程、异步事务追踪,需要考虑多进程
13125
+ * @returns
12921
13126
  */
12922
13127
  createTraceId(): string;
13128
+ /**
13129
+ * @deprecated 请使用 genTId 替代
13130
+ */
12923
13131
  /**
12924
13132
  * 获取当前进程的 sessionId,全局唯一
12925
13133
  * @returns
@@ -13788,6 +13996,7 @@ interface IWatcher {
13788
13996
  friendApplicationStatusChanged?: (data: IFriendApplicationStatusChange) => void;
13789
13997
  friendCleared?: (data: number) => void;
13790
13998
  friendInfoChangedSync?: (data: IFriendInfoChangedSync) => void;
13999
+ databaseOpened?: (code: number, recreate: boolean) => void;
13791
14000
  databaseUpgradeWillStart?: () => void;
13792
14001
  databaseUpgrading?: (progress: number) => void;
13793
14002
  databaseUpgradeDidComplete?: (code: ErrorCode) => void;
@@ -13915,16 +14124,189 @@ declare class AppSettings {
13915
14124
  get messageModifiableMinutes(): number;
13916
14125
  }
13917
14126
 
13918
- declare class APIContext {
13919
- #private;
13920
- private static _context?;
13921
- static init(options: IAPIContextOption): APIContext;
14127
+ /**
14128
+ * 聊天室模块
14129
+ */
14130
+ interface IChatroomService extends Pick<IIPCMethods, 'getChatroomHistoryMessages' | 'joinChatroom' | 'quitChatroom' | 'getChatroomInfo' | 'setChatroomEntry' | 'setChatroomEntries' | 'removeChatroomEntry' | 'removeChatroomEntries' | 'getChatroomEntry' | 'getAllChatroomEntries' | 'bindRTCRoomForChatroom' | 'setCheckChatRoomDuplicateMessage'> {
14131
+ }
14132
+
14133
+ interface IModuleContext {
13922
14134
  /**
13923
- * 获取 APIContext 实例
14135
+ * 应用 Key
13924
14136
  */
13925
- static getContext(): APIContext | undefined;
14137
+ get appkey(): string;
13926
14138
  /**
13927
- * 获取初始化配置
14139
+ * 初始化选项
14140
+ */
14141
+ get initOption(): IAPIContextOption;
14142
+ /**
14143
+ * 当前连接状态
14144
+ */
14145
+ get connectionStatus(): RCConnectionStatus;
14146
+ /**
14147
+ * 当前登录用户 ID,未登录时返回空字符串
14148
+ */
14149
+ get userId(): string;
14150
+ /**
14151
+ * 服务器时间,通过客户端时间和服务器时间差计算得出,可能存在误差
14152
+ */
14153
+ get serverTime(): number;
14154
+ /**
14155
+ * 设备 ID
14156
+ */
14157
+ get deviceId(): string;
14158
+ /**
14159
+ * 连接建立时间
14160
+ */
14161
+ get connectedTime(): number;
14162
+ /**
14163
+ * 从缓存中获取导航数据
14164
+ */
14165
+ get naviInfo(): INaviInfo | null;
14166
+ /**
14167
+ * 日志工具
14168
+ */
14169
+ get logger(): BasicLogger;
14170
+ }
14171
+
14172
+ declare class BaseModule {
14173
+ protected readonly ctx: IModuleContext;
14174
+ /**
14175
+ * 日志工具
14176
+ */
14177
+ protected readonly logger: BasicLogger;
14178
+ constructor(ctx: IModuleContext);
14179
+ /** 高阶函数,生成一个验证方法,验证是否处于连接中状态,并在连接状态可用时返回导航数据 */
14180
+ protected get validateConnected(): () => RCResult<INaviInfo>;
14181
+ /**
14182
+ * 高阶函数,生成一个验证方法,验证是否处于登录状态
14183
+ * * 本地数据查询时,只需要验证用户已经登录过且未主动断开,无需校验当前连接状态
14184
+ */
14185
+ protected get validateLogin(): () => RCResult<INaviInfo>;
14186
+ /**
14187
+ * 检查是否已登录
14188
+ * @param allowSuspended 是否允许已登录但连接状态为中断状态;Electron 平台一些接口为本地数据查询,允许连接状态为中断状态
14189
+ * @returns
14190
+ */
14191
+ protected checkAuthed(allowSuspended: boolean): RCResult<INaviInfo>;
14192
+ }
14193
+
14194
+ declare class ChatroomModule extends BaseModule {
14195
+ /**
14196
+ * 聊天室服务
14197
+ */
14198
+ private readonly serv;
14199
+ constructor(ctx: IModuleContext,
14200
+ /**
14201
+ * 聊天室服务
14202
+ */
14203
+ serv: IChatroomService);
14204
+ /**
14205
+ * 加入聊天室,若聊天室不存在则创建聊天室
14206
+ * @param chatroomId 聊天室房间 Id
14207
+ * @param count 进入聊天室成功后
14208
+ * @param createIfNotExist 若聊天室不存在则创建聊天室
14209
+ * @param extra 扩展信息
14210
+ */
14211
+ joinChatroom(chatroomId: string, count: number, createIfNotExist: boolean, extra?: string): Promise<RCResult<IChatroomJoinResponse>>;
14212
+ /**
14213
+ * 退出聊天室
14214
+ * @param roomId
14215
+ */
14216
+ quitChatroom(roomId: string): Promise<RCResult>;
14217
+ /**
14218
+ * 获取聊天室房间数据
14219
+ * @description count 或 order 有一个为 0 时,只返回成员总数,不返回成员列表信息
14220
+ * @param roomId 聊天室 Id
14221
+ * @param count 获取房间人员列表数量,最大有效值 `20`,最小值未 `0`,默认为 0
14222
+ * @param order 人员排序方式,`1` 为正序,`2` 为倒序,默认为 0,服务器以升序返回
14223
+ */
14224
+ getChatroomInfo(roomId: string, count?: number, order?: 0 | 1 | 2): Promise<RCResult<IChatroomInfo>>;
14225
+ /**
14226
+ * 在指定聊天室中设置自定义属性
14227
+ * @description 仅聊天室中不存在此属性或属性设置者为己方时可设置成功
14228
+ * @param roomId 聊天室房间 id
14229
+ * @param entry 属性信息
14230
+ * @param isForce 是否强制覆盖已有属性
14231
+ */
14232
+ setChatroomEntry(roomId: string, entry: IChatroomEntry, isForce: boolean): Promise<RCResult>;
14233
+ setChatroomEntries(roomId: string, entryOptions: IChatroomEntries): Promise<RCResult>;
14234
+ /**
14235
+ * 删除聊天室属性
14236
+ * @description 该方法仅限于删除自己设置的聊天室属性
14237
+ * @param roomId 聊天室房间 id
14238
+ * @param entry 要移除的属性信息
14239
+ * @param isForce 是否强制删除
14240
+ */
14241
+ removeChatroomEntry(roomId: string, entry: IRemoveChatroomEntry, isForce: boolean): Promise<RCResult>;
14242
+ /**
14243
+ * 批量删除聊天室属性
14244
+ * @description 该方法仅限于删除自己设置的聊天室属性
14245
+ * @param roomId 聊天室房间 id
14246
+ * @param entry 要移除的属性信息
14247
+ */
14248
+ removeChatroomEntries(roomId: string, entryOptions: IRemoveChatroomEntries): Promise<RCResult>;
14249
+ /**
14250
+ * 获取聊天室中的指定属性
14251
+ * @param roomId 聊天室房间 id
14252
+ * @param key 属性键名
14253
+ */
14254
+ getChatroomEntry(roomId: string, key: string): Promise<RCResult<string>>;
14255
+ /**
14256
+ * 获取聊天室内的所有属性
14257
+ * @param roomId 聊天室房间 id
14258
+ */
14259
+ getAllChatroomEntries(roomId: string): Promise<RCResult<Record<string, string>>>;
14260
+ /**
14261
+ * 拉取聊天室内的历史消息
14262
+ * @param roomId
14263
+ * @param count 拉取消息条数,有效值范围 `1 - 20`
14264
+ * @param order 获取顺序,默认值为 0。
14265
+ * 0:降序,用于获取早于指定时间戳发送的消息
14266
+ * 1:升序,用于获取晚于指定时间戳发送的消息
14267
+ * @param timestamp 指定拉取消息用到的时间戳。默认值为 `0`,表示按当前时间拉取
14268
+ */
14269
+ getChatroomHistoryMessages(roomId: string, count?: number, order?: 0 | 1, timestamp?: number): Promise<RCResult<IGetHistoryMessageResult>>;
14270
+ /**
14271
+ * 设置聊天室消息重排开关
14272
+ */
14273
+ setCheckChatRoomDuplicateMessage(enableCheck: boolean): Promise<RCResult>;
14274
+ /**
14275
+ * SDK 设置聊天室关联的 RTC 房间
14276
+ */
14277
+ bindRTCRoomForChatroom(option: IRTCRoomBindOption): Promise<RCResult>;
14278
+ }
14279
+
14280
+ /**
14281
+ * 会话聊天模块
14282
+ */
14283
+ 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'> {
14284
+ getRealtimeConversations(count: number, startTime: number, order: 0 | 1): Promise<RCResult<IReceivedConversation[]>>;
14285
+ getRealtimeConTotalUnreadCount(): Promise<RCResult<number>>;
14286
+ clearRealtimeConUnreadCount(identifier: IConversationIdentifier): Promise<RCResult>;
14287
+ removeRealtimeConversations(identifiers: IConversationIdentifier[]): Promise<RCResult>;
14288
+ batchGetRealtimeConUnreadCount(identifiers: IConversationIdentifier[]): Promise<RCResult<IConversationUnreadCount[]>>;
14289
+ }
14290
+
14291
+ declare class ChatModule extends BaseModule {
14292
+ #private;
14293
+ private readonly svr;
14294
+ constructor(ctx: IModuleContext, svr: IChatService);
14295
+ saveEditedMessageDraft(draft: IEditedMessageDraft, identifier: IConversationIdentifier): Promise<RCResult>;
14296
+ getEditedMessageDraft(identifier: IConversationIdentifier): Promise<RCResult<IEditedMessageDraft | null>>;
14297
+ clearEditedMessageDraft(identifier: IConversationIdentifier): Promise<RCResult>;
14298
+ }
14299
+
14300
+ declare class APIContext {
14301
+ #private;
14302
+ private static _context?;
14303
+ static init(options: IAPIContextOption): APIContext;
14304
+ /**
14305
+ * 获取 APIContext 实例
14306
+ */
14307
+ static getContext(): APIContext | undefined;
14308
+ /**
14309
+ * 获取初始化配置
13928
14310
  */
13929
14311
  getOptions(): IAPIContextOption;
13930
14312
  static destroy(): Promise<void>;
@@ -13942,6 +14324,8 @@ declare class APIContext {
13942
14324
  private readonly _options;
13943
14325
  /** 流式消息处理模块 */
13944
14326
  readonly sse: SSEModule;
14327
+ readonly chatroom: ChatroomModule;
14328
+ readonly chat: ChatModule;
13945
14329
  private _versionInfo;
13946
14330
  private _typingInfo;
13947
14331
  /**
@@ -13954,6 +14338,10 @@ declare class APIContext {
13954
14338
  * engine 内部日志工具
13955
14339
  */
13956
14340
  readonly logger: BasicLogger;
14341
+ /**
14342
+ * 超级群同步完成记录
14343
+ */
14344
+ private _ugSynced;
13957
14345
  constructor(options: IAPIContextOption);
13958
14346
  /**
13959
14347
  * 安装使用插件,并初始化插件实例
@@ -13967,58 +14355,11 @@ declare class APIContext {
13967
14355
  */
13968
14356
  getAppSettings(): RCResult<AppSettings>;
13969
14357
  private _onConnectionStatusChange;
13970
- private _processChrmMemChangeMessage;
13971
14358
  private _processTypingStatusMessage;
13972
14359
  private _processInterceptMessage;
13973
14360
  /**
13974
- * 聊天室用户加入退出多端同步消息
13975
- * @since 5.7.9
13976
- * 多端登录相关事件通知回调,包含三种通知 case
13977
- * 1. 多端登录情况,一端加入聊天室,需要通知另一终端,指定聊天室中所有成员,包括当前加入用户
13978
- * 2. 多端登录情况,一端退出聊天室,需要通知另一终端,指定聊天室中所有成员,包括当前退出用户
13979
- * 3. 用户多端加入聊天室场景:用户在 Android 端加入聊天室,在 Web 端登录后又加入一个新的聊天室,
13980
- * 自动将用户从上一个聊天室踢出,被踢出聊天室中的所有成员,包括被踢出用户
13981
- * 注:case 3 如果开通了一个用户可加入多个聊天室的情况不会进行通知
13982
- */
13983
- private _processChrmSyncMessage;
13984
- /**
13985
- * @since 5.7.9
13986
- * 封禁用户相关事件通知回调,包含两种通知 case
13987
- * 1. 封禁用户,聊天室中所有成员,包括被封禁用户
13988
- * 注:
13989
- * 封禁后用户被自动踢出聊天室
13990
- * 封禁后用户不会再收到被踢出的通知
13991
- *
13992
- * 2. 解除封禁,被解除封禁的成员
13993
- * 注:
13994
- * 用户未在线时,再登录时不会收到通知
13995
- * 服务端仅对主动解除封禁做通知,封禁时间到了,自动解除的不通知,此刻调用加入聊天室接口可成功
13996
- */
13997
- private _processChrmMemBlockMessage;
13998
- /**
13999
- * @since 5.7.9
14000
- * 禁言相关事件通知回调,包含以下 case
14001
- * 注:禁言,受到白名单保护,即白名单中用户不会被禁言
14002
- * 1. 禁言指定聊天室中用户,指定聊天室中任何成员
14003
- * 2. 解除指定聊天室中用户禁言,指定聊天室中任何成员
14004
- *
14005
- * 注:全体禁言,也受到白名单保护,即白名单中用户不会被禁言
14006
- * 3. 聊天室全体禁言,针对聊天室中所有成员
14007
- * 4. 解除聊天室全体禁言,针对聊天室中所有成员
14008
- *
14009
- * 注:白名单是聊天室维度,添加后,用户在此聊天室内无法被设置禁言,即被保护
14010
- * 生命周期跟随聊天室,销毁后,清空白名单,重建聊天室时,需要再次调用接口添加
14011
- * 5. 添加禁言用户白名单,对应聊天室中所有成员
14012
- * 6. 移出禁言用户白名单,对应聊天室中所有成员
14013
- *
14014
- * 注:全局禁言是最高优先级,全局禁言后,禁言用户在所有聊天室内都无法发言,即便配置白名单也不行
14015
- * 7. 用户聊天室全局禁言,指定全局禁言用户
14016
- * 8. 解除用户聊天室全局禁言,指定解除全局禁言用户
14017
- */
14018
- private _processChrmMemBanMessage;
14019
- /**
14020
- * 消息处理器(v2/v4/next 版本中兼容)
14021
- * 返回 false | undefined:消息继续向上抛出,true:内部处理或转为事件回调,无需向上抛出
14361
+ * 消息处理器(v2/next 版本中兼容)
14362
+ * 返回 false | undefined:消息继续向上抛出;true:内部处理或转为事件回调,无需向上抛出
14022
14363
  */
14023
14364
  private _compatibleMessageProccessor;
14024
14365
  private _processReadReceiptMessage;
@@ -14091,6 +14432,7 @@ declare class APIContext {
14091
14432
  * 导航数据变更通知
14092
14433
  */
14093
14434
  private _naviDataChange;
14435
+ private _databaseOpened;
14094
14436
  /**
14095
14437
  * 数据库升级开始
14096
14438
  */
@@ -14210,11 +14552,26 @@ declare class APIContext {
14210
14552
  * @param content
14211
14553
  * @param options
14212
14554
  */
14213
- sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void, traceId?: string): Promise<RCResult<IReceivedMessage>>;
14555
+ sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, traceId: string, onBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
14214
14556
  /**
14215
- * 发送扩展消息
14216
- */
14217
- sendExpansionMessage(options: ISendExMsgOptions): Promise<IAsyncRes<ErrorCode>>;
14557
+ * 更新消息拓展
14558
+ * @param expansion 拓展数据
14559
+ * @param attrs 必要的消息属性数据,用于更新校验
14560
+ */
14561
+ updateMessageExpansion(expansion: Record<string, string>, attrs: IMessageAttrsForUpdateExpansion): Promise<RCResult>;
14562
+ /**
14563
+ * 删除消息扩展
14564
+ * @param keys 要删除的扩展键
14565
+ * @param attrs 必要的消息属性数据,用于更新校验
14566
+ */
14567
+ removeMessageExpansion(keys: string[], attrs: IMessageAttrsForUpdateExpansion): Promise<RCResult>;
14568
+ /**
14569
+ * 删除消息中的所有消息扩展
14570
+ * @param attrs 必要的消息属性数据,用于更新校验
14571
+ * @description 仅允许删除超级群消息中的扩展;移动端不支持全删,全删可能导致移动端解析问题。
14572
+ * Web 历史版本中提供了超级群的消息拓展全删能力,需向前兼容,因此保留该接口;底层能力全支持,目前暂不开放。
14573
+ */
14574
+ removeAllMessageExpansion(attrs: IMessageAttrsForUpdateExpansion): Promise<RCResult>;
14218
14575
  /**
14219
14576
  * 发送群组消息已读回执,根据导航开关配置确定发送 v1 或 v2 版本;不支持处理其他已读回执版本
14220
14577
  * @param targetId 群组会话 Id
@@ -14259,53 +14616,55 @@ declare class APIContext {
14259
14616
  */
14260
14617
  private _destroy;
14261
14618
  /**
14262
- * @param conversationType
14263
- * @param targetId 会话 Id
14264
- * @param timestamp 拉取时间戳
14265
- * @param count 拉取条数
14266
- * @param order 1 正序拉取,0 为倒序拉取
14267
- * @param channelId
14268
- * @param objectName
14269
- */
14270
- getHistoryMessage(conversationType: ConversationType, targetId: string, timestamp?: number, count?: number, order?: 0 | 1, channelId?: string, objectName?: string, traceId?: string): Promise<IAsyncRes<{
14271
- list: IReceivedMessage[];
14272
- hasMore: boolean;
14273
- }>>;
14274
- /**
14275
- * @param conversationType
14276
- * @param targetId 会话 Id
14277
- * @param timestamp 拉取时间戳
14278
- * @param count 拉取条数
14279
- * @param order 1 正序拉取,0 为倒序拉取
14280
- * @param channelId
14619
+ * 获取历史消息
14620
+ * @param conversation 会话
14621
+ * @param options 获取历史消息参数
14281
14622
  */
14282
- getMessages(conversationType: ConversationType, targetId: string, timestamp?: number, count?: number, order?: 0 | 1, channelId?: string, traceId?: string): Promise<IAsyncRes<{
14623
+ getHistoryMessage(conversation: IConversationOption, options?: IGetHistoryMessageOption): Promise<RCResult<{
14283
14624
  list: IReceivedMessage[];
14284
14625
  hasMore: boolean;
14285
14626
  }>>;
14286
14627
  /**
14287
14628
  * 获取本地与远端历史消息(断档补齐动作由协议栈底层完成)
14288
- * @param conversationType
14289
- * @param targetId
14290
- * @param timestamp
14291
- * @param count
14292
- * @param order
14293
- * @param channelId
14294
- * @returns
14629
+ * 不支持超级群会话
14295
14630
  */
14296
- getContinuousMessages(conversationType: ConversationType, targetId: string, timestamp?: number, count?: number, order?: 0 | 1, channelId?: string): Promise<IAsyncRes<{
14631
+ getContinuousMessages(conversation: IConversationOption, options: IGetHistoryMessageOption): Promise<RCResult<{
14297
14632
  list: IReceivedMessage[];
14298
14633
  timestamp: number;
14299
14634
  hasMore: boolean;
14300
14635
  }>>;
14301
- getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, timestamp: number, count: number, messageTypes: string[], order: number, channelId: string): Promise<IAsyncRes<{
14636
+ getHistoryMessagesByObjectNames(conversation: IConversationOption, option: IGetHistoryMessagesByTypesOption): Promise<RCResult<{
14302
14637
  list: IReceivedMessage[];
14303
14638
  hasMore: boolean;
14304
14639
  }>>;
14640
+ getTopConversationList(conversationTypes?: ConversationType[], channelId?: string): Promise<RCResult<IReceivedConversation[]>>;
14641
+ getUnreadConversationList(conversationTypes?: ConversationType[]): Promise<RCResult<IReceivedConversation[]>>;
14642
+ getBlockedConversationList(): Promise<RCResult<IReceivedConversation[]>>;
14643
+ /**
14644
+ * 分页获取会话列表,V2-Adapter Electron 独有功能,Web 平台不支持
14645
+ * @param index 分页索引
14646
+ * @param limit 分页数量
14647
+ * @returns 会话列表
14648
+ */
14649
+ getConversationListByPageIndex(index: number, limit: number): Promise<RCResult<IReceivedConversation[]>>;
14650
+ /**
14651
+ * 获取全部本地会话列表
14652
+ * @param channelId 组织 ID,用于多组织场景,不传则获取全部组织会话
14653
+ * @returns 会话列表
14654
+ */
14655
+ getAllConversationList(channelId?: string): Promise<RCResult<IReceivedConversation[]>>;
14656
+ /**
14657
+ * 既有版本接口实现中,getConversationList 接口存在二义性(channelId 为空时,获取全部会话,其他查询条件失效),因此该接口已废弃。
14658
+ * 不可直接删除,原因在于二义性只存在于 Electron 平台,Web 端不提供获取全部会话功能,channelId 为无效参数。
14659
+ * @deprecated
14660
+ * @param params 获取会话列表参数
14661
+ * @returns 会话列表
14662
+ */
14663
+ getConversationList(params: IGetConversationListByTimestampParams): Promise<RCResult<IReceivedConversation[]>>;
14305
14664
  /**
14306
14665
  * 查询会话列表
14307
14666
  */
14308
- getConversationListByFilter(filter: ConversationListFilter): Promise<RCResult<IReceivedConversation[]>>;
14667
+ getConversationListByTimestamp(params: IGetConversationListByTimestampParams): Promise<RCResult<IReceivedConversation[]>>;
14309
14668
  /**
14310
14669
  * 从本地缓存获取单一会话数据
14311
14670
  * @param conversationType
@@ -14321,50 +14680,50 @@ declare class APIContext {
14321
14680
  /**
14322
14681
  * 获取超级群会话列表
14323
14682
  */
14324
- getUltraGroupList(options: IGetUltraGroupListOption): Promise<IAsyncRes<IUltraGroupConversation[]>>;
14683
+ getUltraGroupList(options?: IGetUltraGroupListOption): Promise<RCResult<IReceivedConversation[]>>;
14325
14684
  /**
14326
14685
  * 获取超级群免打扰列表
14327
14686
  */
14328
- getBlockUltraGroupList(): Promise<IAsyncRes<IBaseConversationInfo[]>>;
14687
+ getBlockedUGList(): Promise<RCResult<IReceivedConversation[]>>;
14329
14688
  /**
14330
14689
  * 清除会话消息未读数
14331
14690
  */
14332
- clearUnreadCount(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
14691
+ clearUnreadCount(conversation: IConversationOption): Promise<RCResult>;
14333
14692
  /**
14334
- * 清除全部会话消息未读数
14693
+ * 清除全部会话消息未读数,不包含超级群会话
14335
14694
  */
14336
14695
  clearAllUnreadCount(): Promise<RCResult>;
14337
14696
  /**
14338
14697
  * 获取指定会话消息未读数
14339
14698
  */
14340
- getUnreadCount(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<number>>;
14699
+ getUnreadCount(conversation: IConversationOption): Promise<RCResult<number>>;
14341
14700
  /**
14342
14701
  * 获取所有会话未读数
14343
14702
  * * 自 5.20.0 版本开始,在开启了会话列表支持超级群功能后,该接口返回的未读数包含超级群未读数
14344
- * @param channelId 多组织 Id
14345
14703
  * @param conversationTypes
14346
14704
  * @param includeMuted 包含已设置免打扰的会话
14705
+ * @param channelId 多组织 Id,目前仅 v2-adapter 支持传递
14347
14706
  */
14348
- getTotalUnreadCount(channelId: string, conversationTypes?: ConversationType[], includeMuted?: boolean): Promise<RCResult<number>>;
14707
+ getTotalUnreadCount(conversationTypes?: ConversationType[], includeMuted?: boolean, channelId?: string): Promise<RCResult<number>>;
14349
14708
  /**
14350
14709
  * 获取会话指定免打扰级别未读消息总数
14351
14710
  * @param conversationTypes 会话类型
14352
14711
  * @param levels 免打扰级别
14353
14712
  * @param isMentioned 是否是 @ 消息未读数
14354
14713
  */
14355
- getTotalUnreadCountByLevels(conversationTypes: ConversationType[], levels: NotificationLevel[], isMentioned?: boolean): Promise<IAsyncRes<number>>;
14714
+ getTotalUnreadCountByLevels(conversationTypes: ConversationType[], levels: NotificationLevel[], isMentioned?: boolean): Promise<RCResult<number>>;
14356
14715
  /**
14357
14716
  * 获取第一个未读消息
14358
14717
  */
14359
- getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<IReceivedMessage | null>>;
14360
- getFirstUnreadMessageInfo(conversationType: ConversationType, targetId: string, channelId: string): Promise<IAsyncRes<IFirstUnreadMessageInfo | null>>;
14718
+ getFirstUnreadMessage(conversation: IConversationOption): Promise<RCResult<IReceivedMessage | null>>;
14719
+ getFirstUnreadMessageDigest(conversation: IConversationOption): Promise<RCResult<IFirstUnreadMessageInfo | null>>;
14361
14720
  batchSetConversationNotificationLevel(conversations: IConversationOption[], notificationLevel: NotificationLevel): Promise<RCResult>;
14362
14721
  /** 批量设置会话置顶 */
14363
14722
  batchSetConversationToTop(conversations: IConversationOption[], isTop: boolean, isUpdateTime?: boolean, isCreateConversation?: boolean): Promise<RCResult>;
14364
14723
  batchSetConversationTranslateStrategy(conversations: IConversationOption[], strategy: TranslateStrategy): Promise<RCResult>;
14365
- saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string, channelId?: string): Promise<ErrorCode>;
14366
- getConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<string>>;
14367
- clearConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
14724
+ saveTextMessageDraft(conversation: IConversationOption, draft: string): Promise<RCResult>;
14725
+ getTextMessageDraft(conversation: IConversationOption): Promise<RCResult<string>>;
14726
+ clearTextMessageDraft(conversation: IConversationOption): Promise<RCResult>;
14368
14727
  /**
14369
14728
  * 撤回消息
14370
14729
  * @param conversation 会话信息
@@ -14376,9 +14735,8 @@ declare class APIContext {
14376
14735
  recallMessage(conversation: IConversationOption, recallMsgOptions: IRecallMsgOptions): Promise<RCResult<IReceivedMessage>>;
14377
14736
  /**
14378
14737
  * 删除远端消息
14379
- * @param conversationType
14380
- * @param targetId
14381
- * @param list
14738
+ * @param conversation 会话信息
14739
+ * @param messages 消息列表
14382
14740
  */
14383
14741
  deleteRemoteMessage(conversation: IConversationOption, messages: {
14384
14742
  messageUId: string;
@@ -14391,96 +14749,6 @@ declare class APIContext {
14391
14749
  * @param timestamp 时间戳
14392
14750
  */
14393
14751
  deleteRemoteMessageByTimestamp(identifier: IConversationOption, timestamp: number): Promise<RCResult>;
14394
- /**
14395
- * 加入聊天室,若聊天室不存在则创建聊天室
14396
- * @param roomId 聊天室房间 Id
14397
- * @param count 进入聊天室成功后,自动拉取的历史消息数量,默认值为 `10`,最大有效值为 `50`,`-1` 为不拉取
14398
- */
14399
- joinChatroom(roomId: string, count?: number, traceId?: string, extra?: string): Promise<ErrorCode>;
14400
- /**
14401
- * 加入聊天室,若聊天室不存在则抛出异常
14402
- * @param roomId 聊天室房间 Id
14403
- * @param count 进入聊天室成功后,自动拉取的历史消息数量,默认值为 `10`,最大有效值为 `50`,`-1` 为不拉取
14404
- */
14405
- joinExistChatroom(roomId: string, count?: number, traceId?: string, extra?: string): Promise<IAsyncRes<IChatroomJoinResponse>>;
14406
- /**
14407
- * 退出聊天室
14408
- * @param roomId
14409
- */
14410
- quitChatroom(roomId: string): Promise<ErrorCode>;
14411
- /**
14412
- * 获取聊天室房间数据
14413
- * @description count 或 order 有一个为 0 时,只返回成员总数,不返回成员列表信息
14414
- * @param roomId 聊天室 Id
14415
- * @param count 获取房间人员列表数量,最大有效值 `20`,最小值未 `0`,默认为 0
14416
- * @param order 人员排序方式,`1` 为正序,`2` 为倒序,默认为 0
14417
- */
14418
- getChatroomInfo(roomId: string, count?: number, order?: 0 | 1 | 2): Promise<IAsyncRes<IChatroomInfo>>;
14419
- /**
14420
- * 在指定聊天室中设置自定义属性
14421
- * @description 仅聊天室中不存在此属性或属性设置者为己方时可设置成功
14422
- * @param roomId 聊天室房间 id
14423
- * @param entry 属性信息
14424
- */
14425
- setChatroomEntry(roomId: string, entry: IChatroomEntry): Promise<ErrorCode>;
14426
- setChatroomEntries(roomId: string, entryOptions: IChatroomEntries): Promise<{
14427
- code: ErrorCode;
14428
- data?: any;
14429
- }>;
14430
- /**
14431
- * 在指定聊天室中强制增加 / 修改任意聊天室属性
14432
- * @description 仅聊天室中不存在此属性或属性设置者为己方时可设置成功
14433
- * @param roomId 聊天室房间 id
14434
- * @param entry 属性信息
14435
- */
14436
- forceSetChatroomEntry(roomId: string, entry: IChatroomEntry): Promise<ErrorCode>;
14437
- /**
14438
- * 删除聊天室属性
14439
- * @description 该方法仅限于删除自己设置的聊天室属性
14440
- * @param roomId 聊天室房间 id
14441
- * @param entry 要移除的属性信息
14442
- */
14443
- removeChatroomEntry(roomId: string, entry: IRemoveChatroomEntry): Promise<ErrorCode>;
14444
- /**
14445
- * 批量删除聊天室属性
14446
- * @description 该方法仅限于删除自己设置的聊天室属性
14447
- * @param roomId 聊天室房间 id
14448
- * @param entry 要移除的属性信息
14449
- */
14450
- removeChatroomEntries(roomId: string, entryOptions: IRemoveChatroomEntries): Promise<{
14451
- code: ErrorCode;
14452
- data?: any;
14453
- }>;
14454
- /**
14455
- * 强制删除任意聊天室属性
14456
- * @description 该方法仅限于删除自己设置的聊天室属性
14457
- * @param roomId 聊天室房间 id
14458
- * @param entry 要移除的属性信息
14459
- */
14460
- forceRemoveChatroomEntry(roomId: string, entry: IRemoveChatroomEntry): Promise<ErrorCode>;
14461
- /**
14462
- * 获取聊天室中的指定属性
14463
- * @param roomId 聊天室房间 id
14464
- * @param key 属性键名
14465
- */
14466
- getChatroomEntry(roomId: string, key: string): Promise<IAsyncRes<string | null>>;
14467
- /**
14468
- * 获取聊天室内的所有属性
14469
- * @param roomId 聊天室房间 id
14470
- */
14471
- getAllChatroomEntries(roomId: string): Promise<IAsyncRes<{
14472
- [key: string]: string;
14473
- }>>;
14474
- /**
14475
- * 拉取聊天室内的历史消息
14476
- * @param roomId
14477
- * @param count 拉取消息条数,有效值范围 `1 - 20`
14478
- * @param order 获取顺序,默认值为 0。
14479
- * 0:降序,用于获取早于指定时间戳发送的消息
14480
- * 1:升序,用于获取晚于指定时间戳发送的消息
14481
- * @param timestamp 指定拉取消息用到的时间戳。默认值为 `0`,表示按当前时间拉取
14482
- */
14483
- getChatroomHistoryMessages(roomId: string, count?: number, order?: 0 | 1, timestamp?: number): Promise<RCResult<IGetHistoryMessageResult>>;
14484
14752
  /**
14485
14753
  * 获取存储服务鉴权信息
14486
14754
  * @param fileType 文件类型
@@ -14571,59 +14839,41 @@ declare class APIContext {
14571
14839
  getTagsForConversation(conversation: IConversationOption): Promise<RCResult<IConversationTag[]>>;
14572
14840
  getUnreadMentionedCount(conversation: IConversationOption): Promise<RCResult<number>>;
14573
14841
  /**
14574
- * 获取所有群聊会话 @ 消息未读数
14575
- */
14576
- getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
14842
+ * 获取所有群聊会话 @ 消息未读数,不包含超级群会话
14843
+ */
14844
+ getAllUnreadMentionedCount(): Promise<RCResult<number>>;
14577
14845
  /**
14578
14846
  * 超级群正在输入中
14579
14847
  * @param options
14580
14848
  */
14581
- sendUltraGroupTypingStatus(options: IConversationOption): Promise<IAsyncRes>;
14849
+ sendUltraGroupTypingStatus(options: IConversationOption): Promise<RCResult>;
14582
14850
  /**
14583
14851
  * 根据消息 ID 查询消息列表
14584
14852
  * @param options
14585
14853
  */
14586
- getUltraGroupMessageListByMessageUId(options: IUltraMsgQueryOptions): Promise<IAsyncRes<{
14854
+ getUltraGroupMessageListByMessageUId(conversation: IConversationOption, messages: IMessageDesc[]): Promise<RCResult<{
14587
14855
  [messageUid: string]: IReceivedMessage | undefined;
14588
14856
  }>>;
14589
14857
  /**
14590
- * 扩展已有的超级群消息
14591
- * @param options 设置的扩展
14592
- */
14593
- expandUltraMessage(options: IUltraExMsgOptions): Promise<IAsyncRes<ErrorCode>>;
14594
- /**
14595
- * 根据会话 ID 获取所有子频道 @ 消息未读数
14596
- * @param targetId
14597
- */
14598
- getUltraGroupUnreadMentionedCountByTargetId(targetId: string, levels?: NotificationLevel[]): Promise<IAsyncRes<number>>;
14599
- /**
14600
- * 获取指定超级群所有频道未读数
14858
+ * 获取指定超级群所有子频道未读数
14601
14859
  * @param targetId 超级群 Id
14860
+ * @param levels 免打扰级别,不传或传空数组则获取全部级别
14602
14861
  * @returns 未读数
14603
14862
  */
14604
- getUltraGroupUnreadCountByTargetId(targetId: string, levels?: NotificationLevel[]): Promise<IAsyncRes<number>>;
14863
+ getUGUnreadCountForAllChannels(targetId: string, isGetMentioned: boolean, levels?: NotificationLevel[]): Promise<RCResult<number>>;
14605
14864
  /**
14606
- * 超级群类型未读数
14607
- * @param isMentioned 是否是 @ 消息,默认为 false
14608
- * @returns 未读数
14609
- */
14610
- getAllUltraGroupUnreadCount(isMentioned?: boolean): Promise<IAsyncRes<number>>;
14611
- /**
14612
- * 超级群类型获取未读 @ 消息列表
14613
- * @param options
14614
- * @returns 指定会话未读 @ 消息列表
14865
+ * 获取超级群未读 @ 消息摘要
14615
14866
  */
14616
- getUltraGroupUnreadMentionedMessages(options: IUltraGroupUnreadMentionedOption): Promise<IAsyncRes<IUltraUnreadMsg[]>>;
14867
+ getUGUnreadMentionedDigest(options: IUltraGroupUnreadMentionedOption): Promise<RCResult<IUltraUnreadMsg[]>>;
14617
14868
  /**
14618
- * 超级群获取指定会话第一条未读消息时间戳
14869
+ * 获取超级群指定会话第一条未读消息摘要
14619
14870
  * @param conversation
14620
- * @returns 指定会话第一条未读消息时间戳
14621
14871
  */
14622
- getUltraGroupFirstUnreadMessageTimestamp(options: IUltraGroupOption): Promise<IAsyncRes<IUltraUnreadMsg>>;
14872
+ getUGFirstUnreadMessageDigest(options: IUltraGroupOption): Promise<RCResult<IUltraUnreadMsg>>;
14623
14873
  /**
14624
14874
  * 根据超级群的 targetId 数组,获取每个超级群下所有频道会话信息
14625
14875
  */
14626
- getUltraGroupUnreadInfoList(targetIds: string[]): Promise<IAsyncRes<IUltraGroupUnreadInfo[]>>;
14876
+ getUGUnreadInfoList(targetIds: string[]): Promise<RCResult<IUltraGroupUnreadInfo[]>>;
14627
14877
  /**
14628
14878
  * 获取运行时的系统信息,仅限 Electron 平台可用
14629
14879
  */
@@ -14654,9 +14904,10 @@ declare class APIContext {
14654
14904
  */
14655
14905
  getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<IAsyncRes<ISubscribeUserStatusInfo[]>>;
14656
14906
  /**
14657
- * 获取指定用户的在线状态
14907
+ * 获取指定用户的在线状态
14658
14908
  */
14659
- getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<IAsyncRes<ISubscribeUserStatusInfo[]>>;
14909
+ getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
14910
+ getSubscribeUsersOnlineStatus(userIds: string[]): Promise<RCResult<ISubscribeUserOnlineStatus[]>>;
14660
14911
  updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<IUpdateMyProfileFail>>;
14661
14912
  getUserProfiles(userIds: string[]): Promise<IAsyncRes<IUserProfileInfo[]>>;
14662
14913
  getMyUserProfile(): Promise<IAsyncRes<IUserProfileInfo>>;
@@ -14664,9 +14915,9 @@ declare class APIContext {
14664
14915
  getMyUserProfileVisibility(): Promise<IAsyncRes<UserProfileVisibility>>;
14665
14916
  searchUserProfileByUniqueId(uniqueId: string): Promise<IAsyncRes<IUserProfileInfo>>;
14666
14917
  /**
14667
- * 删除所有会话
14918
+ * 删除所有会话,目前仅 v2 提供
14668
14919
  */
14669
- clearConversations(conversationTypes?: ConversationType[], tag?: string): Promise<ErrorCode>;
14920
+ clearConversations(conversationTypes?: ConversationType[], tag?: string): Promise<RCResult>;
14670
14921
  /**
14671
14922
  * 设置用户连接状态监听器
14672
14923
  */
@@ -14692,37 +14943,38 @@ declare class APIContext {
14692
14943
  /**
14693
14944
  * 向本地插入一条消息,不发送到服务器
14694
14945
  */
14695
- insertMessage(conversationType: ConversationType, targetId: string, insertOptions: IInsertMsgOptions): Promise<IAsyncRes<IReceivedMessage>>;
14696
- batchInsertMessage(messages: IInsertMessage[], checkDuplicate: boolean): Promise<IAsyncRes<boolean>>;
14946
+ insertMessage(conversation: IConversationOption, params: InnerInsertMessageParams): Promise<RCResult<IReceivedMessage>>;
14947
+ batchInsertMessage(messages: IInsertMessage[], checkDuplicate: boolean): Promise<RCResult<boolean>>;
14697
14948
  /**
14698
14949
  * 获取会话所有消息数
14699
14950
  */
14700
- getMessageCount(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<number>>;
14951
+ getLocalMessageCount(conversation: IConversationOption): Promise<RCResult<number>>;
14701
14952
  /**
14702
14953
  * 删除本地消息
14703
- */
14704
- deleteMessages(messageIds: number[]): Promise<ErrorCode>;
14954
+ */
14955
+ deleteLocalMessages(messageIds: number[]): Promise<RCResult>;
14705
14956
  /**
14706
14957
  * 从本地消息数据库中删除某一会话指定时间之前的消息数据
14707
14958
  */
14708
- deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId?: string): Promise<ErrorCode>;
14959
+ deleteLocalMessagesByTimestamp(conversation: IConversationOption, timestamp: number, cleanSpace: boolean): Promise<RCResult>;
14709
14960
  /**
14710
14961
  * 通过时间戳批量清除本地消息
14711
14962
  */
14712
- batchClearMessagesByTimestamp(options: IClearMessageOption[]): Promise<ErrorCode>;
14963
+ batchClearLocalMessagesByTimestamp(options: IClearMessageOption[]): Promise<RCResult>;
14713
14964
  batchClearRemoteHistoryMessages(options: IClearMessageOption[], isDeleteLocal?: boolean): Promise<RCResult>;
14714
14965
  /**
14715
14966
  * 清空会话下历史消息
14716
14967
  */
14717
- clearMessages(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
14968
+ clearLocalMessages(conversation: IConversationOption): Promise<RCResult>;
14718
14969
  /**
14719
14970
  * 获取本地消息
14720
14971
  */
14721
14972
  getLocalMessage(messageId: number | string): Promise<RCResult<IReceivedMessage>>;
14973
+ _innerSetMessageContent(messageId: number, content: string, messageType: string): Promise<RCResult>;
14722
14974
  /**
14723
14975
  * 设置消息内容
14724
14976
  */
14725
- setMessageContent(messageId: number, content: any, messageType: string): Promise<ErrorCode>;
14977
+ setMessageContent(messageId: number, content: any, messageType: string): Promise<RCResult>;
14726
14978
  /**
14727
14979
  * 设置消息搜索字段
14728
14980
  */
@@ -14771,13 +15023,13 @@ declare class APIContext {
14771
15023
  * @param params 搜索参数
14772
15024
  */
14773
15025
  searchMessagesWithParams(params: ISearchMessageParams): Promise<RCResult<ISearchMessagesResult>>;
14774
- getMessagesByTimestamp(conversation: IConversationOption, timestamp: number, beforeCount: number, afterCount: number): IPromiseResult<IReceivedMessage[]>;
14775
- getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId?: string): IReceivedMessage[];
15026
+ getMessagesAroundTimestamp(conversation: IConversationOption, timestamp: number, beforeCount: number, afterCount: number): Promise<RCResult<IReceivedMessage[]>>;
15027
+ getUnreadMentionedMessages(conversation: IConversationOption): Promise<RCResult<IReceivedMessage[]>>;
14776
15028
  clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<ErrorCode>;
14777
15029
  /**
14778
15030
  * 查询指定超级群默认通知配置
14779
15031
  */
14780
- getUltraGroupDefaultNotificationLevel(targetId: string, channelId?: string): Promise<IAsyncRes<NotificationLevel>>;
15032
+ getUltraGroupDefaultNotificationLevel(targetId: string, channelId?: string): Promise<RCResult<NotificationLevel>>;
14781
15033
  /**
14782
15034
  * 设置指定超级群默认通知配置
14783
15035
  * @param targetId 指定超级群 Id
@@ -14785,37 +15037,29 @@ declare class APIContext {
14785
15037
  * NotificationLevel
14786
15038
  * @param channelId 指定超级群指定频道 Id
14787
15039
  */
14788
- setUltraGroupDefaultNotificationLevel(targetId: string, notificationLevel: NotificationLevel, channelId?: string): Promise<IAsyncRes<void>>;
15040
+ setUltraGroupDefaultNotificationLevel(targetId: string, notificationLevel: NotificationLevel, channelId?: string): Promise<RCResult>;
14789
15041
  /**
14790
15042
  * 获取会话免打扰状态
14791
15043
  */
14792
15044
  getConversationNotificationLevel(conversation: IConversationOption): Promise<RCResult<NotificationLevel>>;
14793
15045
  setConversationTypeNotificationLevel(conversationType: ConversationType, level: NotificationLevel): Promise<RCResult>;
14794
15046
  getConversationTypeNotificationLevel(conversationType: ConversationType): Promise<RCResult<NotificationLevel>>;
14795
- getRemoteHistoryMessages(conversationType: ConversationType, targetId: string, timestamp: number, count: number, order: 0 | 1, channelId: string): Promise<IAsyncRes<{
15047
+ getRemoteHistoryMessages(conversation: IConversationOption, options?: IGetHistoryMessageOption): Promise<RCResult<{
14796
15048
  list: IReceivedMessage[];
14797
15049
  hasMore: boolean;
14798
15050
  }>>;
14799
15051
  clearLocalData(): Promise<RCResult<boolean>>;
14800
15052
  createLogger(id: string, type: LogType): BasicLogger;
14801
- getConversations(conversationList: IConversationOption[]): Promise<IAsyncRes<IReceivedConversation[]>>;
15053
+ getConversations(identifiers: IConversationOption[]): Promise<RCResult<IReceivedConversation[]>>;
14802
15054
  /**
14803
15055
  * 设置融云消息重排开关
14804
15056
  */
14805
15057
  setCheckDuplicateMessage(enableCheck: boolean): Promise<IAsyncRes<boolean>>;
14806
- /**
14807
- * 设置聊天室消息重排开关
14808
- */
14809
- setCheckChatRoomDuplicateMessage(enableCheck: boolean): Promise<IAsyncRes<boolean>>;
14810
15058
  rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<{
14811
15059
  code: ErrorCode;
14812
15060
  buffer?: Uint8Array;
14813
15061
  }>;
14814
15062
  rtcPing(roomId: string, mode: number, mediaType?: number): Promise<IAsyncRes<any>>;
14815
- /**
14816
- * SDK 设置聊天室关联的 RTC 房间
14817
- */
14818
- bindRTCRoomForChatroom(option: IRTCRoomBindOption): Promise<ErrorCode>;
14819
15063
  /**
14820
15064
  * 设置代理
14821
15065
  */
@@ -14875,23 +15119,23 @@ declare class APIContext {
14875
15119
  /**
14876
15120
  * 查询实时会话列表
14877
15121
  */
14878
- getRealtimeConversations(count: number, startTime: number, order: 0 | 1): Promise<IAsyncRes<IReceivedConversation[]>>;
15122
+ getRealtimeConversations(count: number, startTime: number, order: 0 | 1): Promise<RCResult<IReceivedConversation[]>>;
14879
15123
  /**
14880
15124
  * 查询实时会话未读总数
14881
15125
  */
14882
- getRealtimeConTotalUnreadCount(): Promise<IAsyncRes<number>>;
15126
+ getRealtimeConTotalUnreadCount(): Promise<RCResult<number>>;
14883
15127
  /**
14884
15128
  * 清除实时会话未读数
14885
15129
  */
14886
- clearRealtimeConUnreadCount(conversation: IConversationIdentifier): Promise<IAsyncRes>;
15130
+ clearRealtimeConUnreadCount(identifier: IConversationIdentifier): Promise<RCResult>;
14887
15131
  /**
14888
15132
  * 删除实时会话
14889
15133
  */
14890
- removeRealtimeConversations(conversations: IConversationIdentifier[]): Promise<IAsyncRes>;
15134
+ removeRealtimeConversations(identifiers: IConversationIdentifier[]): Promise<RCResult>;
14891
15135
  /**
14892
15136
  * 批量查询实时会话未读数
14893
15137
  */
14894
- getRealtimeConUnreadCounts(conversations: IConversationIdentifier[]): Promise<IAsyncRes<IConversationUnreadCount[]>>;
15138
+ batchGetRealtimeConUnreadCount(identifiers: IConversationIdentifier[]): Promise<RCResult<IConversationUnreadCount[]>>;
14895
15139
  setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
14896
15140
  removeNotificationQuietHoursSetting(): Promise<RCResult>;
14897
15141
  getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
@@ -14919,6 +15163,13 @@ declare class APIContext {
14919
15163
  * Electron 平台下同步服务器会话列表至本地数据库
14920
15164
  */
14921
15165
  syncRemoteConversations(): Promise<RCResult>;
15166
+ /**
15167
+ * 按时间戳清除超级群下所有子频道的本地历史消息
15168
+ * @param targetId 超级群 ID
15169
+ * @param timestamp 时间戳
15170
+ */
15171
+ deleteLocalUGMessagesForAllChannel(targetId: string, timestamp: number): Promise<RCResult>;
15172
+ getUnreadMentionMeConversationList(params: IGetUnreadMentionMeConversationListParams): Promise<RCResult<IReceivedConversation[]>>;
14922
15173
  }
14923
15174
 
14924
15175
  declare class RTCPluginContext extends PluginContext {
@@ -15120,45 +15371,40 @@ declare class RTCPluginContext extends PluginContext {
15120
15371
  getRTCJoinedUserInfo(userId: string): IPromiseResult<IRTCJoinedInfo[]>;
15121
15372
  }
15122
15373
 
15123
- /**
15124
- * 会话聊天模块
15125
- */
15126
- declare type IChatModule = Pick<IIPCMethods, 'getConversationListByFilter' | 'getTotalUnreadCount' | 'getConversation' | 'batchSetConversationToTop' | 'batchSetConversationNotificationLevel' | 'getConversationNotificationLevel' | 'setConversationTypeNotificationLevel' | 'getConversationTypeNotificationLevel' | 'clearAllUnreadCount' | 'deleteRemoteMessage' | 'deleteRemoteMessageByTimestamp' | 'batchClearRemoteHistoryMessages' | 'sendReadReceiptResponseV5' | 'getMessageReadReceiptInfoV5ByIdentifiers' | 'getMessagesReadReceiptUsersByPageV5' | 'getMessagesReadReceiptByUsersV5' | 'searchConversationByContent' | 'requestSpeechToTextForMessage' | 'setMessageSpeechToTextVisible' | 'addTagForConversations' | 'getTagsForConversation' | 'setConversationStatusInTag' | 'removeTagForConversations' | 'removeTagsForConversation' | 'getConversationListByTag' | 'getUnreadCountByTag' | 'getUntaggedConversationListByPage' | 'batchSetConversationTranslateStrategy' | 'modifyMessageWithParams' | 'refreshReferenceMessageWithParams' | 'batchDeleteConversations' | 'sendReadReceiptV2' | 'syncRemoteConversations'>;
15127
-
15128
- /**
15129
- * 聊天室模块
15130
- */
15131
- interface IChatroomModule extends Pick<IIPCMethods, 'getChatroomHistoryMessages'> {
15132
- }
15133
-
15134
15374
  /**
15135
15375
  * 用户设置模块
15136
15376
  */
15137
15377
  declare type IUserSettingsModule = Pick<IIPCMethods, 'setTranslationLanguage' | 'getTranslationLanguage' | 'setAutoTranslateEnabled' | 'getAutoTranslateEnabled'>;
15138
15378
 
15139
- declare type IIPCMethodsInEngine = Pick<IIPCMethods, 'searchMessagesWithParams' | 'createTag' | 'removeTag' | 'updateTag' | 'getTagList' | 'translateWithParams' | 'getFileUrl'>;
15140
- declare abstract class BasicEngine implements IIPCMethodsInEngine {
15379
+ 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'>;
15380
+ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContext {
15141
15381
  protected readonly rtcCodec: Codec<InnerRTCKeyMaps>;
15142
15382
  protected readonly _watcher: IEngineWatcher;
15143
15383
  protected readonly _options: IAPIContextOption;
15144
- protected readonly logger: BasicLogger;
15384
+ private readonly _logger;
15145
15385
  /**
15146
15386
  * 连接时间
15147
15387
  */
15148
- abstract getConnectedTime(): number;
15388
+ abstract get connectedTime(): number;
15149
15389
  protected readonly _appkey: string;
15150
15390
  private _rtcKVManager;
15151
15391
  /**
15152
15392
  * 会话聊天模块
15153
15393
  */
15154
- abstract get chat(): IChatModule;
15155
- abstract get chatroom(): IChatroomModule;
15394
+ abstract get chat(): IChatService;
15395
+ abstract get chatroom(): IChatroomService;
15156
15396
  abstract get userSettings(): IUserSettingsModule;
15397
+ abstract get naviInfo(): INaviInfo | null;
15398
+ get appkey(): string;
15399
+ get initOption(): IAPIContextOption;
15400
+ abstract get connectionStatus(): RCConnectionStatus;
15401
+ abstract get userId(): string;
15402
+ get logger(): BasicLogger;
15157
15403
  /**
15158
15404
  * 引擎初始化
15159
15405
  * @param _appkey
15160
15406
  */
15161
- constructor(rtcCodec: Codec<InnerRTCKeyMaps>, _watcher: IEngineWatcher, _options: IAPIContextOption, logger: BasicLogger);
15407
+ constructor(rtcCodec: Codec<InnerRTCKeyMaps>, _watcher: IEngineWatcher, _options: IAPIContextOption, _logger: BasicLogger);
15162
15408
  protected _rtcSignalingListener?: (buffer: Uint8Array) => void;
15163
15409
  /**
15164
15410
  * 注册 RTC KV 变更监听器
@@ -15169,18 +15415,10 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15169
15415
  * 忽视缓存,重新请求导航数据
15170
15416
  */
15171
15417
  abstract refetchNaviInfo(): IPromiseResult<INaviInfo | null>;
15172
- /**
15173
- * 获取导航缓存数据
15174
- */
15175
- abstract getNaviInfoFromCache(): INaviInfo | null;
15176
15418
  /**
15177
15419
  * 为非 engine 包创建 logger 工具实例
15178
15420
  */
15179
15421
  abstract createLogger(id: string, type: LogType): BasicLogger;
15180
- /**
15181
- * 获取 engine 包内部 logger 工具
15182
- */
15183
- getInnerLogger(): BasicLogger;
15184
15422
  /**
15185
15423
  * 建立连接
15186
15424
  * @param token
@@ -15196,110 +15434,25 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15196
15434
  abstract reportSDKInfo(versionInfo: {
15197
15435
  [name: string]: string;
15198
15436
  }): void;
15199
- /**
15200
- * 获取历史消息
15201
- * @param conversationType
15202
- * @param targetId
15203
- * @param timestamp
15204
- * @param count
15205
- * @param order
15206
- */
15207
- abstract getHistoryMessage(conversationType: ConversationType, targetId: string,
15208
- /**
15209
- * 拉取时间戳,值为 `0` 表示从当前时间拉取
15210
- */
15211
- timestamp: number, count: number,
15212
- /**
15213
- * @description
15214
- * 1. `0` 表示升序,获取消息发送时间比传入 `sentTime` 小 的消息
15215
- * 2. `1` 表示降序,获取消息发送时间比传入 `sentTime` 大 的消息
15216
- */
15217
- order: 0 | 1,
15218
- /**
15219
- * 会话的业务标识
15220
- */
15221
- channelId: string,
15222
- /**
15223
- * 消息类型
15224
- */
15225
- objectName: string, traceId?: string): IPromiseResult<{
15226
- list: IReceivedMessage[];
15227
- hasMore: boolean;
15228
- }>;
15229
- /**
15230
- * 获取历史消息 (pc 端支持断档补偿,web 端同 getHistoryMessage)
15231
- * @param conversationType
15232
- * @param targetId
15233
- * @param timestamp
15234
- * @param count
15235
- * @param order
15236
- */
15237
- abstract getMessages(conversationType: ConversationType, targetId: string,
15238
- /**
15239
- * 拉取时间戳,值为 `0` 表示从当前时间拉取
15240
- */
15241
- timestamp: number, count: number,
15242
- /**
15243
- * @description
15244
- * 1. `0` 表示升序,获取消息发送时间比传入 `sentTime` 小 的消息
15245
- * 2. `1` 表示降序,获取消息发送时间比传入 `sentTime` 大 的消息
15246
- */
15247
- order: 0 | 1,
15248
- /**
15249
- * 会话的业务标识
15250
- */
15251
- channelId: string, traceId?: string): IPromiseResult<{
15252
- list: IReceivedMessage[];
15253
- hasMore: boolean;
15254
- }>;
15255
- abstract getContinuousMessages(conversationType: ConversationType, targetId: string, timestamp: number, count: number, order: 0 | 1, channelId: string): IPromiseResult<{
15256
- list: IReceivedMessage[];
15257
- timestamp: number;
15258
- hasMore: boolean;
15259
- }>;
15260
- /**
15261
- * 获取指定消息类型的历史消息
15262
- */
15263
- abstract getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, timestamp: number, count: number, messageTypes: string[], order: number, channelId: string): Promise<IAsyncRes<{
15437
+ abstract getHistoryMessage(conversation: IConversationOption, options: Required<IGetHistoryMessageOption>, fromLocal: boolean): Promise<RCResult<{
15264
15438
  list: IReceivedMessage[];
15265
15439
  hasMore: boolean;
15266
15440
  }>>;
15267
15441
  abstract recallMsg(conversation: IConversationOption, recallMsgOptions: IRecallMsgOptions): Promise<RCResult<IReceivedMessage>>;
15268
- /**
15269
- * 获取会话指定免打扰级别的未读总数
15270
- */
15271
- abstract getTotalUnreadCountByLevels(conversationTypes: ConversationType[], levels: NotificationLevel[], isMentioned?: boolean): Promise<IAsyncRes<number>>;
15272
- /**
15273
- * 获取指定会话未读数
15274
- */
15275
- abstract getConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<number>;
15276
- /**
15277
- * 清除指定会话未读数
15278
- */
15279
- abstract clearConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
15280
- /**
15281
- * 获取第一个未读消息
15282
- */
15283
- abstract getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedMessage | null>;
15284
- abstract getFirstUnreadMessageInfo(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IFirstUnreadMessageInfo | null>;
15285
- /**
15286
- * 设置/保存指定会话消息草稿
15287
- * @draft 草稿内容
15288
- */
15289
- abstract saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string, channelId: string): Promise<ErrorCode>;
15442
+ abstract saveTextMessageDraft(conversation: IConversationOption, draft: string): Promise<RCResult>;
15290
15443
  /**
15291
15444
  * 获取指定会话消息草稿
15292
15445
  */
15293
- abstract getConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<string>;
15446
+ abstract getTextMessageDraft(conversation: IConversationOption): Promise<RCResult<string>>;
15294
15447
  /**
15295
15448
  * 清除指定会话消息草稿
15296
15449
  */
15297
- abstract clearConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
15298
- abstract sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions,
15450
+ abstract clearTextMessageDraft(conversation: IConversationOption): Promise<RCResult>;
15451
+ abstract sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, traceId: string,
15299
15452
  /**
15300
15453
  * c++ 消息写库后存在自增 Id,必要时需要向业务层暴露,JSEngine 无需实现
15301
15454
  */
15302
- onBefore?: (messageId: number) => void, traceId?: string): IPromiseResult<IReceivedMessage>;
15455
+ onBefore?: (messageId: number) => void): IPromiseResult<IReceivedMessage>;
15303
15456
  /**
15304
15457
  * 获取群组消息已读列表
15305
15458
  * @param targetId
@@ -15328,76 +15481,12 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15328
15481
  * @param disablePush 是否禁用推送,默认为 false(≥ 5.20.0)
15329
15482
  */
15330
15483
  abstract disconnect(closeDB?: boolean, disablePush?: boolean): Promise<void>;
15331
- /**
15332
- * 获取当前连接状态
15333
- */
15334
- abstract getConnectionStatus(): RCConnectionStatus;
15335
15484
  /**
15336
15485
  * 消息注册
15337
15486
  * @description
15338
15487
  * 消息注册需在应用初始化完成前进行,否则在搭配 C++ 协议栈使用时,本端发出的消息将不默认作为未知消息处理,不存储、不计数
15339
15488
  */
15340
15489
  abstract registerMessageType(objectName: string, desc: MessageRegisterParams): void;
15341
- /**
15342
- * 加入聊天室
15343
- * @param count 拉取消息数量
15344
- */
15345
- abstract joinChatroom(chatroomId: string, count: number, extra?: string, traceId?: string): Promise<ErrorCode>;
15346
- /**
15347
- * 加入已存在的聊天室
15348
- * @param count 拉取消息数量
15349
- */
15350
- abstract joinExistChatroom(chatroomId: string, count: number, extra?: string, traceId?: string): Promise<IAsyncRes<IChatroomJoinResponse>>;
15351
- /**
15352
- * 退出聊天室
15353
- */
15354
- abstract quitChatroom(chatroomId: string): Promise<ErrorCode>;
15355
- /**
15356
- * 获取聊天室信息
15357
- * @param count 获取人数,范围 0 - 20
15358
- * @param order 排序方式,1 正序,2 倒序
15359
- */
15360
- abstract getChatroomInfo(chatroomId: string, count: number, order: number): IPromiseResult<IChatroomInfo>;
15361
- /**
15362
- * 设置聊天室属性
15363
- */
15364
- abstract setChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
15365
- /**
15366
- * 批量设置聊天室属性
15367
- */
15368
- abstract setChatroomEntries(chatroomId: string, entry: IChrmKVEntries): Promise<{
15369
- code: ErrorCode;
15370
- data?: any;
15371
- }>;
15372
- /**
15373
- * 强制设置聊天室属性
15374
- */
15375
- abstract forceSetChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
15376
- /**
15377
- * 删除聊天室属性
15378
- */
15379
- abstract removeChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
15380
- /**
15381
- * 批量删除聊天室属性
15382
- */
15383
- abstract removeChatroomEntries(chatroomId: string, entry: IChrmKVEntries): Promise<{
15384
- code: ErrorCode;
15385
- data?: any;
15386
- }>;
15387
- /**
15388
- * 强制删除聊天室属性
15389
- */
15390
- abstract forceRemoveChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
15391
- /**
15392
- * 获取聊天室 key 对应 value
15393
- */
15394
- abstract getChatroomEntry(chatroomId: string, key: string): IPromiseResult<string | null>;
15395
- /**
15396
- * 获取聊天室所有 key value
15397
- */
15398
- abstract getAllChatroomEntry(chatroomId: string): IPromiseResult<{
15399
- [key: string]: string;
15400
- }>;
15401
15490
  /**
15402
15491
  * 获取存储服务鉴权信息
15403
15492
  * @param fileType 文件类型
@@ -15445,90 +15534,22 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15445
15534
  /**
15446
15535
  * 获取服务器时间
15447
15536
  */
15448
- abstract getServerTime(): number;
15537
+ abstract get serverTime(): number;
15449
15538
  /**
15450
15539
  * 获取设备 ID
15451
15540
  */
15452
- abstract getDeviceId(): string;
15541
+ abstract get deviceId(): string;
15453
15542
  /**
15454
15543
  * 设置推送配置
15455
15544
  * @param config 推送配置
15456
15545
  */
15457
15546
  abstract setPushConfig(config: IAppPushConfig): void;
15458
- /**
15459
- * 获取当前 userId
15460
- */
15461
- abstract getCurrentUserId(): string;
15462
- /**
15463
- * 获取所有超级群会话列表
15464
- */
15465
- abstract getUltraGroupList(options: IGetUltraGroupListOption): Promise<IAsyncRes<IUltraGroupConversation[]>>;
15466
- /**
15467
- * 获取超级群免打扰列表
15468
- */
15469
- abstract getBlockUltraGroupList(): Promise<IAsyncRes<IBaseConversationInfo[]>>;
15470
- /**
15471
- * 上报超级群会话已读时间
15472
- * @param targetId
15473
- * @param channelId
15474
- */
15475
- abstract clearUltraUnreadcount(targetId: string, channelId: string): Promise<ErrorCode>;
15476
- /**
15477
- * 根据会话 ID 获取所有子频道 @ 消息未读数
15478
- * @todo
15479
- * @param targetId
15480
- */
15481
- abstract getUltraGroupUnreadMentionedCountByTargetId(targetId: string, levels?: NotificationLevel[]): Promise<IAsyncRes<number>>;
15482
- /**
15483
- * 获取指定超级群所有子频道未读数
15484
- * @param targetId 超级群 Id
15485
- * @returns 未读数
15486
- */
15487
- abstract getUltraGroupUnreadCountByTargetId(targetId: string, levels?: NotificationLevel[]): IPromiseResult<number>;
15488
- /**
15489
- * 超级群类型未读数
15490
- * @param isMentioned 是否是 @ 消息
15491
- * @returns 未读数
15492
- */
15493
- abstract getAllUltraGroupUnreadCount(isMentioned?: boolean): Promise<IAsyncRes<number>>;
15494
15547
  /**
15495
15548
  * 超级群消息发送
15496
15549
  * @param targetId
15497
15550
  * @param options
15498
15551
  */
15499
- abstract sendUltraMessage(targetId: string, options: ISendMsgOptions, onSendBefore?: (messageId: number) => void, traceId?: string): Promise<IAsyncRes<IReceivedMessage>>;
15500
- /**
15501
- * 超级群消息正在输入中
15502
- * @param options
15503
- */
15504
- abstract sendUltraGroupTypingStatus(options: IConversationOption, operationType?: OperateStatus): Promise<IAsyncRes>;
15505
- /**
15506
- * 拉取超级群变更后的消息列表
15507
- * @param time
15508
- */
15509
- abstract getUltraGroupMessageListByMessageUId(options: IUltraMsgQueryOptions): Promise<IAsyncRes<{
15510
- [messageUid: string]: IReceivedMessage | undefined;
15511
- }>>;
15512
- /**
15513
- * 对已有的消息进行扩展
15514
- * @param options
15515
- */
15516
- abstract expandUltraMessage(options: IUltraExMsgOptions): Promise<IAsyncRes>;
15517
- /**
15518
- * 超级群获取历史消息
15519
- * @param targetId
15520
- * @param options
15521
- */
15522
- abstract getUltraHistoryMsg(targetId: string, options: IGetMsgOption, traceId?: string): Promise<IAsyncRes<{
15523
- list: IReceivedMessage[];
15524
- syncTime: number;
15525
- hasMore: boolean;
15526
- }>>;
15527
- /**
15528
- * 根据超级群的 targetId 数组,获取每个超级群下所有频道会话信息
15529
- * @param targetIds
15530
- */
15531
- abstract getUltraGroupUnreadInfoList(targetIds: string[]): Promise<IAsyncRes<IUltraGroupUnreadInfo[]>>;
15552
+ abstract sendUltraMessage(targetId: string, options: ISendMsgOptions, traceId: string, onSendBefore?: (messageId: number) => void): Promise<IAsyncRes<IReceivedMessage>>;
15532
15553
  /**
15533
15554
  * 设置用户在线状态监听器
15534
15555
  */
@@ -15549,10 +15570,6 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15549
15570
  abstract getUserStatus(userId: string): IPromiseResult<{
15550
15571
  status: string;
15551
15572
  }>;
15552
- /**
15553
- * 清空所有会话
15554
- */
15555
- abstract clearConversations(conversationTypes?: ConversationType[], channelId?: string): Promise<ErrorCode>;
15556
15573
  /**
15557
15574
  * 加入黑名单
15558
15575
  */
@@ -15572,33 +15589,29 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15572
15589
  /**
15573
15590
  * 向本地插入一条消息,不发送到服务器
15574
15591
  */
15575
- abstract insertMessage(conversationType: ConversationType, targetId: string, insertOptions: IInsertMsgOptions): IPromiseResult<IReceivedMessage>;
15592
+ abstract insertMessage(conversation: IConversationOption, insertOptions: InnerInsertMessageParams): Promise<RCResult<IReceivedMessage>>;
15576
15593
  /**
15577
15594
  * 向本地批量插入消息
15578
15595
  * @param messages
15579
15596
  * @param checkDuplicate
15580
15597
  */
15581
- abstract batchInsertMessage(messages: IInsertMessage[], checkDuplicate: boolean): IPromiseResult<boolean>;
15582
- /**
15583
- * 查询会话消息数
15584
- */
15585
- abstract getMessageCount(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<number>;
15598
+ abstract batchInsertMessage(messages: IInsertMessage[], checkDuplicate: boolean): Promise<RCResult<boolean>>;
15586
15599
  /**
15587
15600
  * 删除本地消息
15588
15601
  */
15589
- abstract deleteMessages(messageIds: number[]): Promise<ErrorCode>;
15602
+ abstract deleteLocalMessages(messageIds: number[]): Promise<RCResult>;
15590
15603
  /**
15591
15604
  * 通过时间戳删除本地消息
15592
15605
  */
15593
- abstract deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId: string): Promise<ErrorCode>;
15606
+ abstract deleteLocalMessagesByTimestamp(conversation: IConversationOption, timestamp: number, cleanSpace: boolean): Promise<RCResult>;
15594
15607
  /**
15595
15608
  * 通过时间戳批量清除本地消息
15596
- */
15597
- abstract batchClearMessagesByTimestamp(options: IClearMessageOption[]): Promise<ErrorCode>;
15609
+ */
15610
+ abstract batchClearLocalMessagesByTimestamp(options: IClearMessageOption[]): Promise<RCResult>;
15598
15611
  /**
15599
15612
  * 清空会话下历史消息
15600
15613
  */
15601
- abstract clearMessages(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
15614
+ abstract clearLocalMessages(conversation: IConversationOption): Promise<RCResult>;
15602
15615
  /**
15603
15616
  * 获取消息
15604
15617
  */
@@ -15606,7 +15619,7 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15606
15619
  /**
15607
15620
  * 设置消息内容
15608
15621
  */
15609
- abstract setMessageContent(messageId: number, content: any, messageType: string): Promise<ErrorCode>;
15622
+ abstract setMessageContent(messageId: number, content: any, messageType: string): Promise<RCResult>;
15610
15623
  /**
15611
15624
  * 设置消息搜索字段
15612
15625
  */
@@ -15616,10 +15629,6 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15616
15629
  */
15617
15630
  abstract searchConversationByContentWithAllChannel(keyword: string, messageTypes: string[], conversationTypes: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
15618
15631
  abstract searchMessagesWithParams(params: ISearchMessageParams): Promise<RCResult<ISearchMessagesResult>>;
15619
- /**
15620
- * 获取会话下所有未读的 @ 消息
15621
- */
15622
- abstract getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId: string): IReceivedMessage[];
15623
15632
  /**
15624
15633
  * 设置消息发送状态
15625
15634
  */
@@ -15634,48 +15643,13 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15634
15643
  abstract updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<RCResult<boolean>>;
15635
15644
  /**
15636
15645
  * 删除时间戳前的未读数
15637
- */
15638
- abstract clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
15639
- /**
15640
- * 设置指定超级群默认通知配置
15641
- * @param targetId 指定超级群 Id
15642
- * @param notificationLevel 超级群通知级别
15643
- * NotificationLevel
15644
- * @param channelId 指定超级群指定频道 Id
15645
15646
  */
15646
- abstract setUltraGroupDefaultNotificationLevel(targetId: string, notificationLevel: NotificationLevel, channelId: string): IPromiseResult<void>;
15647
- /**
15648
- * 查询指定超级群默认通知配置
15649
- */
15650
- abstract getUltraGroupDefaultNotificationLevel(targetId: string, channelId: string): IPromiseResult<NotificationLevel>;
15651
- /**
15652
- * 协议栈获取远端历史消息
15653
- */
15654
- abstract getRemoteHistoryMessages(conversationType: ConversationType, targetId: string, timestamp: number, count: number, order: 0 | 1, channelId: string): IPromiseResult<{
15655
- list: IReceivedMessage[];
15656
- hasMore: boolean;
15657
- }>;
15647
+ abstract clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
15658
15648
  abstract setCallInfo(targetId: string, key: string, value: string): IPromiseResult<{
15659
15649
  key: string;
15660
15650
  value: string;
15661
15651
  }>;
15662
- /**
15663
- * 获取单个群聊会话 @ 消息未读数
15664
- */
15665
- abstract getUnreadMentionedCount(conversation: IConversationOption): Promise<RCResult<number>>;
15666
- /**
15667
- * 获取所有群聊会话 @ 消息未读数
15668
- */
15669
- abstract getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
15670
15652
  abstract clearLocalData(): Promise<RCResult<boolean>>;
15671
- /**
15672
- * 超级群获取指定会话未读 @ 消息列表
15673
- */
15674
- abstract getUltraGroupUnreadMentionedMessages(options: IUltraGroupUnreadMentionedOption): Promise<IAsyncRes<IUltraUnreadMsg[]>>;
15675
- /**
15676
- * 超级群获取指定会话第一条未读消息时间戳
15677
- */
15678
- abstract getUltraGroupFirstUnreadMessageTimestamp(options: IUltraGroupOption): Promise<IAsyncRes<IUltraUnreadMsg>>;
15679
15653
  /**
15680
15654
  * 获取运行时的系统信息,仅限 Electron 平台可用
15681
15655
  */
@@ -15692,10 +15666,6 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15692
15666
  * 设置融云消息重排开关
15693
15667
  */
15694
15668
  abstract setCheckDuplicateMessage(enableCheck: boolean): IPromiseResult<boolean>;
15695
- /**
15696
- * 设置聊天室消息重排开关
15697
- */
15698
- abstract setCheckChatRoomDuplicateMessage(enableCheck: boolean): IPromiseResult<boolean>;
15699
15669
  /**
15700
15670
  * RTC 通用调用接口
15701
15671
  * 在非 Comet 协议下,入参 sourceData 应为 ArrayBuffer 数据,返回结果为 Uint8Array 数据
@@ -15710,10 +15680,6 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15710
15680
  }>;
15711
15681
  abstract rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<IAsyncRes<any>>;
15712
15682
  pullRTCRoomEntry(roomId: string, _timestamp: number): Promise<IAsyncRes<number>>;
15713
- /**
15714
- * 设置聊天室关联的 rtc 房间
15715
- */
15716
- abstract bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<ErrorCode>;
15717
15683
  /**
15718
15684
  * 接收 rtc 资源变更
15719
15685
  */
@@ -15753,22 +15719,13 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15753
15719
  /**
15754
15720
  * 获取指定用户的在线状态
15755
15721
  */
15756
- abstract getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<IAsyncRes<ISubscribeUserStatusInfo[]>>;
15722
+ abstract getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
15757
15723
  abstract updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<IUpdateMyProfileFail>>;
15758
15724
  abstract getUserProfiles(userIds: string[]): Promise<IAsyncRes<IUserProfileInfo[]>>;
15759
15725
  abstract getMyUserProfile(): Promise<IAsyncRes<IUserProfileInfo>>;
15760
15726
  abstract updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<IAsyncRes>;
15761
15727
  abstract getMyUserProfileVisibility(): Promise<IAsyncRes<UserProfileVisibility>>;
15762
15728
  abstract searchUserProfileByUniqueId(uniqueId: string): Promise<IAsyncRes<IUserProfileInfo>>;
15763
- /**
15764
- * 获取本地指定时间戳前后 N 条消息方法
15765
- * @param conversation
15766
- * @param timestamp
15767
- * @param beforeCount
15768
- * @param afterCount
15769
- */
15770
- abstract getMessagesByTimestamp(conversation: IConversationOption, timestamp: number, beforeCount: number, afterCount: number): IPromiseResult<IReceivedMessage[]>;
15771
- abstract getConversations(conversations: IConversationOption[]): Promise<IAsyncRes<IReceivedConversation[]>>;
15772
15729
  abstract createGroup(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
15773
15730
  [key: string]: string;
15774
15731
  } | undefined, inviteeUserIds: string[]): Promise<IAsyncRes<ICreateGroupFail>>;
@@ -15817,12 +15774,6 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15817
15774
  abstract searchFriendsInfo(nickname: string): Promise<IAsyncRes<IFriendInfo[]>>;
15818
15775
  abstract setFriendAddPermission(permission: FriendAddPermission): Promise<IAsyncRes<void>>;
15819
15776
  abstract getFriendAddPermission(): Promise<IAsyncRes<FriendAddPermission>>;
15820
- abstract removeChatroomFromCatch(chatroomId: string): void;
15821
- abstract getRealtimeConversations(count: number, startTime: number, order: 0 | 1): Promise<IAsyncRes<IReceivedConversation[]>>;
15822
- abstract getRealtimeConTotalUnreadCount(): Promise<IAsyncRes<number>>;
15823
- abstract clearRealtimeConUnreadCount(conversation: IConversationIdentifier): Promise<IAsyncRes>;
15824
- abstract removeRealtimeConversations(conversations: IConversationIdentifier[]): Promise<IAsyncRes>;
15825
- abstract getRealtimeConUnreadCounts(conversations: IConversationIdentifier[]): Promise<IAsyncRes<IConversationUnreadCount[]>>;
15826
15777
  abstract setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
15827
15778
  abstract removeNotificationQuietHoursSetting(): Promise<RCResult>;
15828
15779
  abstract getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
@@ -15831,6 +15782,8 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine {
15831
15782
  */
15832
15783
  abstract getStatsUrlList(): Promise<RCResult<string[]>>;
15833
15784
  abstract translateWithParams(list: InnerTransParam[], mode: TranslateMode, force: boolean, from: 0 | 1): Promise<RCResult>;
15785
+ abstract getLocalMessageCount(conversation: IConversationOption): Promise<RCResult<number>>;
15786
+ abstract getSubscribeUsersOnlineStatus(userIds: string[]): Promise<RCResult<ISubscribeUserOnlineStatus[]>>;
15834
15787
  }
15835
15788
 
15836
15789
  /**
@@ -15927,7 +15880,6 @@ interface IErrorCodeKey {
15927
15880
  messageType: number;
15928
15881
  messageIds: number;
15929
15882
  typingContentType: number;
15930
- cleanSpace: number;
15931
15883
  messageDirection: number;
15932
15884
  canIncludeExpansion: number;
15933
15885
  expansion: number;
@@ -15945,7 +15897,6 @@ interface IErrorCodeKey {
15945
15897
  rtcRoomId: number;
15946
15898
  token: number;
15947
15899
  conversations: number;
15948
- draft: number;
15949
15900
  conversationTypes: number;
15950
15901
  levels: number;
15951
15902
  notificationLevel: number;
@@ -15987,8 +15938,6 @@ interface IErrorCodeKey {
15987
15938
  expiry: number;
15988
15939
  subscribeUserIds: number;
15989
15940
  subscribePageSize: number;
15990
- beforeCount: number;
15991
- afterCount: number;
15992
15941
  conversationList: number;
15993
15942
  conversationTypeNotSupport: number;
15994
15943
  profile: number;
@@ -16185,4 +16134,4 @@ declare class AppStorage {
16185
16134
  }): void;
16186
16135
  }
16187
16136
 
16188
- export { APIContext, AbsCodec, AppSettings, AppStorage, AreaCode, AssertRules, BasicEngine, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationBatchDeletionParams, ConversationListFilter, ConversationListFilterType, ConversationType, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GetAllConversationListFilterParams, GetConversationListByPageIndexParams, GetConversationListByTimestampParams, GetConversationListResponse, GetTopConversationListParams, GetUnreadConversationListParams, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAppPushConfig, IAsyncRes, IAuditInfoKeyInMessage, IAuditInfoValueInMessage, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatModule, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomModule, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IClearMessageOption, ICombineMessageContent, ICombineV2MessageContent, ICombinedMessage, ICommandMessageContent, IConnectionStatusListener, IConversationFilter, IConversationIdentifier, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IConversationUnreadCount, IConvertHQVoiceMessageToTextOption, IConvertSpeechToTextOption, IConvertVoiceMessageToTextOption, ICreateGroupFail, IDataHostingModule, IDeletedExpansion, IDownloadAuth, IEnginRefreshReferenceMessageResult, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IExtraDataKeyInMessage, IFileMessageContent, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGIFMessageContent, IGetHistoryMessageResult, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupNotificationMessageContent, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHQVoiceMessageContent, IHarmonyOSPushConfig, IIPCMethods, IImageMessageContent, IInformationNotificationMessageContent, IInsertMessage, IInsertMsgOptions, ILocalTagStatus, ILocationMessageContent, ILogData, ILogger, IMentionedInfoKeyInMessage, IMessageFilter, IMessageIdentifier, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, IModifyMessageParams, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IReferContentInMessage, IReferContentKeyInMessage, IReferenceMessageContent, IRefreshReferenceMessageParams, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRichContentMessageContent, IRuntime, ISearchMessageParams, ISearchMessagesResult, ISendMsgOptions, IServerGroupBaseInfo, ISightMessageContent, ISpeechToTextInfo, ISpeechToTextResponse, IStorage, IStreamMessageContent, IStreamMessageResponseChunkData, IStreamMessageResponseEventData, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITextMessageContent, ITimeRange, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraMsgQueryOptions, IUltraUnreadMsg, IUpdateItem, IUpdateMyProfileFail, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserExtraKeyInMessage, IUserExtraValueInMessage, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IUserSettingsChangedEvent, IUserSettingsModule, IVoiceMessageContent, IWatcher, IiOSPushConfig, InnerRTCKeyMaps, InnerTransParam, InterruptionLevel, ItypingStateListener, KVString, LogDBProxy, LogL, LogLevel, LogSource, 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, PlatformInfo, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReadReceiptInfoV5, ReadReceiptResponseV5, ReadReceiptUser, ReadReceiptUsersOption, ReadReceiptUsersResult, ReceivedStatus, 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, ValidatorManage, VersionManage, assert, createLogDBProxy, fail, fixUrlProtocol, forEach, getMessageTypeDescription, getUUID, getUUID22, hasMessageTypeDescription, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversation, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidNotificationLevel, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, runtime, trans2IReceivedStatusInfo, trans2NotificationLevel, trans2NotificationStatus, transformReceivedStatusFlag, usingCppEngine, validate };
16137
+ export { APIContext, AbsCodec, AppSettings, AppStorage, AreaCode, AssertRules, BasicEngine, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationBatchDeletionParams, ConversationType, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, 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, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IConversationUnreadCount, IConvertHQVoiceMessageToTextOption, IConvertSpeechToTextOption, IConvertVoiceMessageToTextOption, ICreateGroupFail, IDataHostingModule, IDeletedExpansion, IDownloadAuth, IEditedMessageDraft, IEnginRefreshReferenceMessageResult, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraDataKeyInMessage, IFileMessageContent, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGIFMessageContent, IGetConversationListByTimestampParams, 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, IMentionedInfoKeyInMessage, IMessageAttrsForUpdateExpansion, IMessageDesc, IMessageFilter, IMessageIdentifier, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, 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, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IReferContentInMessage, IReferContentKeyInMessage, IReferenceMessageContent, IRefreshReferenceMessageParams, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRichContentMessageContent, 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, InnerRTCKeyMaps, 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, 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, ValidatorManage, VersionManage, assert, createLogDBProxy, fail, fixUrlProtocol, forEach, getMessageTypeDescription, getUUID, getUUID22, hasMessageTypeDescription, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversation, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, runtime, trans2IReceivedStatusInfo, trans2NotificationLevel, trans2NotificationStatus, transformReceivedStatusFlag, usingCppEngine, validate };