@rongcloud/imlib-next 5.26.1 → 5.26.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -415,8 +415,16 @@ declare enum Events {
415
415
  * @since 5.2.0
416
416
  */
417
417
  ULTRA_GROUP_ENABLE = "ULTRA_GROUP_ENABLE",
418
+ /** [EN]
419
+ * Single group chat conversation list synchronization completed
420
+ * * Non Electron platform only valid after the "conversation list supports super group" function is enabled. When the switch is off, the local will not cache the single group chat conversation list.
421
+ * * Since 5.28.0, Electron platform enables the "synchronize server conversation information to local" function, this event will be triggered when the synchronization of server conversation list is completed.
422
+ * @since 5.20.0
423
+ */
418
424
  /**
419
- * 单群聊会话列表同步完成,仅在会话列表支持超级群功能后有效。开关关闭的情况下,本地不会缓存单群聊会话列表。
425
+ * 单群聊会话列表同步完成
426
+ * * 非 Electron 平台下,仅在“会话列表支持超级群”功能开启后有效。开关关闭的情况下,本地不会缓存单群聊会话列表。
427
+ * * 5.28.0 版本开始,Electron 平台开启了“同步服务器会话信息到本地”功能后,该事件将在同步服务器会话列表完成时触发。
420
428
  * @since 5.20.0
421
429
  */
422
430
  CONVERSATIONS_SYNCED = "CONVERSATIONS_SYNCED",
@@ -1635,7 +1643,7 @@ declare type EventListeners = {
1635
1643
  [Events.USER_SETTINGS_SYNCED]: (code: number) => void;
1636
1644
  [Events.USER_SETTINGS_CHANGED]: (evt: IUserSettingsChangedEvent) => void;
1637
1645
  [Events.CONVERSATIONS_SETTINGS_SYNCED]: (code: number) => void;
1638
- [Events.CONVERSATIONS_SYNCED]: () => void;
1646
+ [Events.CONVERSATIONS_SYNCED]: (code: number) => void;
1639
1647
  [Events.CONVERSATION_TAG]: () => void;
1640
1648
  [Events.TYPING_STATUS]: (event: ITypingStatusEvent) => void;
1641
1649
  [Events.MESSAGE_BLOCKED]: (data: IBlockedMessageInfo) => void;
@@ -5479,6 +5487,12 @@ declare function getConversations(conversations: IConversationOption[]): Promise
5479
5487
  * @returns 返回一个 {@link RCResult} 类型 Promise,data 为 {@link IAReceivedConversation} 类型数组
5480
5488
  */
5481
5489
  declare function getUntaggedConversationListByPage(timestamp: number, count: number, topPriority: boolean): Promise<RCResult<IAReceivedConversation[]>>;
5490
+ /**
5491
+ * 同步服务器会话列表至本地数据库,同步完成后,SDK 将通知 `Events.CONVERSATIONS_SYNCED` 事件。
5492
+ * 该接口需要开通“同步服务端会话信息到本地”,且未开启“SDK 自动拉取服务端会话”功能时才能使用,否则将返回错误码。
5493
+ * @since 5.28.0
5494
+ */
5495
+ declare function getRemoteConversations(): Promise<RCResult>;
5482
5496
 
5483
5497
  /** [EN]
5484
5498
  * Search local messages by keyword
@@ -6465,6 +6479,7 @@ declare const index_getAllConversationList: typeof getAllConversationList;
6465
6479
  declare const index_searchConversationByContent: typeof searchConversationByContent;
6466
6480
  declare const index_getConversations: typeof getConversations;
6467
6481
  declare const index_getUntaggedConversationListByPage: typeof getUntaggedConversationListByPage;
6482
+ declare const index_getRemoteConversations: typeof getRemoteConversations;
6468
6483
  declare const index_searchMessages: typeof searchMessages;
6469
6484
  declare const index_searchMessageInTimeRange: typeof searchMessageInTimeRange;
6470
6485
  declare const index_searchMessagesByUser: typeof searchMessagesByUser;
@@ -6497,6 +6512,7 @@ declare namespace index {
6497
6512
  index_searchConversationByContent as searchConversationByContent,
6498
6513
  index_getConversations as getConversations,
6499
6514
  index_getUntaggedConversationListByPage as getUntaggedConversationListByPage,
6515
+ index_getRemoteConversations as getRemoteConversations,
6500
6516
  index_searchMessages as searchMessages,
6501
6517
  index_searchMessageInTimeRange as searchMessageInTimeRange,
6502
6518
  index_searchMessagesByUser as searchMessagesByUser,
@@ -7928,9 +7944,11 @@ declare function getConversation(options: IConversationOption): Promise<RCResult
7928
7944
  /**
7929
7945
  * 移除指定的会话
7930
7946
  * * 自 5.20.0 版本开始,该接口支持删除超级群会话;
7947
+ * * 自 5.26.2 版本开始,该接口支持 Electron 平台删除服务器端会话
7931
7948
  * @category 会话
7932
7949
  * @description 移除指定的会话,不会删除会话内的消息
7933
7950
  * @param options 会话信息
7951
+ * @param deleteRemotely 是否删除服务器端会话,该参数仅 Electron 平台有效
7934
7952
  * @example
7935
7953
  * 移除指定的会话示例:
7936
7954
  * ```ts
@@ -7942,7 +7960,7 @@ declare function getConversation(options: IConversationOption): Promise<RCResult
7942
7960
  * console.info('移除指定的会话结果:', conversation);
7943
7961
  * ```
7944
7962
  */
7945
- declare const removeConversation: MonitorableAPI<(options: IConversationOption) => Promise<RCResult>>;
7963
+ declare const removeConversation: MonitorableAPI<(options: IConversationOption, deleteRemotely?: boolean | undefined) => Promise<RCResult>>;
7946
7964
  /** [EN]
7947
7965
  * Batch remove conversations
7948
7966
  * @param conversations Conversation list, with a maximum of 20 items