@rongcloud/imlib-next 5.26.1 → 5.28.0-c-tmp.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts 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.26.2 版本开始,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,18 @@ 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
+ /** [EN]
5491
+ * Sync server conversation list to local database. The event `Events.CONVERSATIONS_SYNCED` will be triggered after the synchronization is completed.
5492
+ * @category Electron Only
5493
+ * @since 5.26.2
5494
+ */
5495
+ /**
5496
+ * 同步服务器会话列表至本地数据库,同步完成后,SDK 将通知 `Events.CONVERSATIONS_SYNCED` 事件。
5497
+ * 该接口需要开通“同步服务端会话信息到本地”,且未开启“SDK 自动拉取服务端会话”功能时才能使用,否则将返回错误码。
5498
+ * @category Electron 独有
5499
+ * @since 5.26.2
5500
+ */
5501
+ declare function getRemoteConversations(): Promise<RCResult>;
5482
5502
 
5483
5503
  /** [EN]
5484
5504
  * Search local messages by keyword
@@ -6465,6 +6485,7 @@ declare const index_getAllConversationList: typeof getAllConversationList;
6465
6485
  declare const index_searchConversationByContent: typeof searchConversationByContent;
6466
6486
  declare const index_getConversations: typeof getConversations;
6467
6487
  declare const index_getUntaggedConversationListByPage: typeof getUntaggedConversationListByPage;
6488
+ declare const index_getRemoteConversations: typeof getRemoteConversations;
6468
6489
  declare const index_searchMessages: typeof searchMessages;
6469
6490
  declare const index_searchMessageInTimeRange: typeof searchMessageInTimeRange;
6470
6491
  declare const index_searchMessagesByUser: typeof searchMessagesByUser;
@@ -6497,6 +6518,7 @@ declare namespace index {
6497
6518
  index_searchConversationByContent as searchConversationByContent,
6498
6519
  index_getConversations as getConversations,
6499
6520
  index_getUntaggedConversationListByPage as getUntaggedConversationListByPage,
6521
+ index_getRemoteConversations as getRemoteConversations,
6500
6522
  index_searchMessages as searchMessages,
6501
6523
  index_searchMessageInTimeRange as searchMessageInTimeRange,
6502
6524
  index_searchMessagesByUser as searchMessagesByUser,
@@ -7928,9 +7950,11 @@ declare function getConversation(options: IConversationOption): Promise<RCResult
7928
7950
  /**
7929
7951
  * 移除指定的会话
7930
7952
  * * 自 5.20.0 版本开始,该接口支持删除超级群会话;
7953
+ * * 自 5.26.2 版本开始,该接口支持 Electron 平台删除服务器端会话
7931
7954
  * @category 会话
7932
7955
  * @description 移除指定的会话,不会删除会话内的消息
7933
7956
  * @param options 会话信息
7957
+ * @param deleteRemotely 是否删除服务器端会话,该参数仅 Electron 平台有效
7934
7958
  * @example
7935
7959
  * 移除指定的会话示例:
7936
7960
  * ```ts
@@ -7942,7 +7966,7 @@ declare function getConversation(options: IConversationOption): Promise<RCResult
7942
7966
  * console.info('移除指定的会话结果:', conversation);
7943
7967
  * ```
7944
7968
  */
7945
- declare const removeConversation: MonitorableAPI<(options: IConversationOption) => Promise<RCResult>>;
7969
+ declare const removeConversation: MonitorableAPI<(options: IConversationOption, deleteRemotely?: boolean | undefined) => Promise<RCResult>>;
7946
7970
  /** [EN]
7947
7971
  * Batch remove conversations
7948
7972
  * @param conversations Conversation list, with a maximum of 20 items