k2-im 0.1.31 → 0.1.32

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/dist/browser.js CHANGED
@@ -1 +1 @@
1
- export{B as createLazyBrowserApiProtocolClient}from'./chunk-SMWPQSGR.js';import'./chunk-CIY4WBFJ.js';import'./chunk-WOT6VMZA.js';
1
+ export{B as createLazyBrowserApiProtocolClient}from'./chunk-GAAHNTJM.js';import'./chunk-QQ23QYWK.js';import'./chunk-WOT6VMZA.js';
@@ -2290,6 +2290,11 @@ type ImEvent = {
2290
2290
  type: 'session:updated';
2291
2291
  session: ImSession;
2292
2292
  conversation: ConversationRef;
2293
+ }
2294
+ /** 已打开聊天的资料或权限变化,不代表新增会话列表项。 */
2295
+ | {
2296
+ type: 'conversation-context:updated';
2297
+ conversation: ConversationRef;
2293
2298
  } | {
2294
2299
  type: 'session:removed';
2295
2300
  conversationId: string;
@@ -4668,6 +4673,11 @@ interface ConversationOpenOptions {
4668
4673
  */
4669
4674
  interface ConversationHandleSnapshot<TType extends ProductHandleConversationType = ProductHandleConversationType> {
4670
4675
  ref: ConversationRef<TType>;
4676
+ /** 已校验的聊天标题与头像;即使尚无会话列表项,宿主也可正常展示聊天头部。 */
4677
+ display?: Readonly<{
4678
+ title: string;
4679
+ avatar?: string;
4680
+ }>;
4671
4681
  messages: readonly ImMessageView[];
4672
4682
  /** 本次打开时冻结的未读入口;只用于产品 UI 分隔线,不作为 SDK 已读真相。 */
4673
4683
  entryUnread: ConversationEntryUnreadSnapshot;
@@ -6245,13 +6255,18 @@ interface AdvancedChannelsApi extends ImDirectoryApi<'channel'> {
6245
6255
  /** advanced 会话门面:保留兼容列表动作,同时暴露与 default 共用的背景产品能力。 */
6246
6256
  interface AdvancedConversationsApi extends ImConversationsApi, ImConversationBackgroundApi {
6247
6257
  /**
6248
- * 为产品 `openConversation` 完成缺失会话的本地对象/资料/访问校验并提交 DomainState 摘要。
6258
+ * 为产品 `openConversation` 完成本地对象/资料/访问校验;打开本身不创建会话列表项。
6249
6259
  *
6250
6260
  * advanced/testing 的原始 handle 测试不得把它当成第二个宿主入口。
6251
6261
  *
6252
6262
  * @internal
6253
6263
  */
6254
6264
  ensureOpenableConversation: (ref: ConversationRef) => Promise<ConversationRef<'direct' | 'group' | 'channel' | 'robot'>>;
6265
+ /**
6266
+ * 读取已有会话或本次账号内已校验的目标资料;返回值不代表列表成员资格。
6267
+ * @internal
6268
+ */
6269
+ getContext: (ref: ConversationRef) => ImSession | undefined;
6255
6270
  }
6256
6271
  /**
6257
6272
  * 普通宿主的真实 default client。
@@ -9039,6 +9054,8 @@ type ProductConversationHandle = ConversationHandle<ProductHandleConversationTyp
9039
9054
  /** Thread Store 中由 Pinia 管理的当前窗口投影;句柄、订阅和租约留在闭包中。 */
9040
9055
  interface ImThreadStoreState {
9041
9056
  activeRef: ConversationRef<ProductHandleConversationType> | null;
9057
+ /** SDK 已校验的活动聊天展示资料;不依赖该聊天是否已进入会话列表。 */
9058
+ display: ConversationHandleSnapshot['display'] | null;
9042
9059
  messages: readonly ImMessageView[];
9043
9060
  entryUnread: ConversationEntryUnreadSnapshot;
9044
9061
  draft: ConversationDraft | null;