k2-im 0.1.30 → 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-GHZUH7RB.js';import'./chunk-4KPJTXQN.js';import'./chunk-WOT6VMZA.js';
1
+ export{B as createLazyBrowserApiProtocolClient}from'./chunk-GAAHNTJM.js';import'./chunk-QQ23QYWK.js';import'./chunk-WOT6VMZA.js';
@@ -4,8 +4,8 @@ import { Pinia, Store } from 'pinia';
4
4
  /** 媒体业务类型:实现据此选对象存储逻辑桶;sticker 对应 app-sticker。 */
5
5
  type MediaKind = 'image' | 'video' | 'voice' | 'file' | 'sticker';
6
6
 
7
- /** 会话类型。P0 只用 direct / group。 */
8
- type ConversationType = 'direct' | 'group' | 'channel' | 'supergroup';
7
+ /** 会话类型。P0 只用 direct / group;`robot` 是独立私聊 sibling,不得并入 direct。 */
8
+ type ConversationType = 'direct' | 'group' | 'channel' | 'supergroup' | 'robot';
9
9
  /**
10
10
  * 会话复合身份;`conversationId` 只在对应 `conversationType` 的领域内唯一。
11
11
  *
@@ -42,8 +42,8 @@ interface ConversationDraft$1 {
42
42
  attachments: readonly [];
43
43
  updatedAt: number;
44
44
  }
45
- /** 消息内容类型。sticker=表情/贴图(BMessage contentType=7);call=单聊通话记录(contentType=10);transfer=转账(contentType=16);robot=机器人卡片(contentType=18);miniProgram=小程序分享卡(contentType=22);redPacket=红包卡(contentType=25);game=小游戏(contentType=27);未知 wire 正文统一归一为 unknown。 */
46
- type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'call' | 'redPacket' | 'mediaAlbum' | 'robot' | 'unknown';
45
+ /** 消息内容类型。sticker=表情/贴图(BMessage contentType=7);call=单聊通话记录(contentType=10);transfer=转账(contentType=16);gift=礼品/刮刮卡(contentType=17);robot=机器人卡片(contentType=18);miniProgram=小程序分享卡(contentType=22);redPacket=红包卡(contentType=25);game=小游戏(contentType=27);未知 wire 正文统一归一为 unknown。 */
46
+ type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'gift' | 'call' | 'redPacket' | 'mediaAlbum' | 'robot' | 'unknown';
47
47
  /**
48
48
  * 发送态(客户端态):消息从本地创建到服务端确认的生命周期。
49
49
  * `uploading` 仅媒体消息使用:文件上传阶段(uploading→pending→sending→sent);
@@ -112,6 +112,8 @@ type LastMessageSummary = {
112
112
  gameType: ImGameType;
113
113
  } | {
114
114
  kind: 'transfer';
115
+ } | {
116
+ kind: 'gift';
115
117
  } | {
116
118
  kind: 'call';
117
119
  callKind: ImCallKind;
@@ -311,13 +313,14 @@ type ImGameBody = {
311
313
  * - `default`:0,普通可点卡片
312
314
  * - `board-game`:1,棋牌样式且不可点
313
315
  * - `board-game-link`:2,棋牌样式且可点
316
+ * - `game-preview`:3,气泡内嵌游戏预览 WebView
314
317
  * - `unknown`:必须同时保留 `rawShowType`,不得猜成可点/不可点
315
318
  */
316
- type ImMiniProgramShowType = 'default' | 'board-game' | 'board-game-link' | 'unknown';
319
+ type ImMiniProgramShowType = 'default' | 'board-game' | 'board-game-link' | 'game-preview' | 'unknown';
317
320
  /**
318
321
  * 小程序分享卡片正文(contentType==='miniProgram',协议 BMessage.contentType=22)。
319
322
  *
320
- * @remarks 字段来自 iOS `IMMiniProgramMessageBody` / proto 61-67、80-82、90-93。
323
+ * @remarks 字段来自 iOS `IMMiniProgramMessageBody` / proto 61-67、80-82、90-96。
321
324
  * `currencySource` 对应 proto field 90(无 miniProgram 前缀):`xj` 现金公司、`xy` 信用公司。
322
325
  * `subGameName` 保持服务端 JSON 字符串,不在 Core 解析语种表。打开小程序与 X 币/信用 ID 属于宿主,不进本 DTO。
323
326
  */
@@ -341,6 +344,12 @@ interface ImMiniProgramBody {
341
344
  gamePath?: string;
342
345
  /** 多语言子游戏名 JSON 字符串,例如 `{"ch":"...","en":"..."}`。 */
343
346
  subGameName?: string;
347
+ /** 游戏预览页地址(BMessage.miniProgramGamePreviewUrl,showType=3)。 */
348
+ gamePreviewUrl?: string;
349
+ /** 游戏预览设计宽(BMessage.miniProgramGamePreviewWidth)。 */
350
+ gamePreviewWidth?: number;
351
+ /** 游戏预览设计高(BMessage.miniProgramGamePreviewHeight)。 */
352
+ gamePreviewHeight?: number;
344
353
  }
345
354
  /**
346
355
  * 机器人卡片文本模块(wire `section`)。
@@ -419,6 +428,40 @@ interface ImTransferBody {
419
428
  coinName?: string;
420
429
  coinIcon?: string;
421
430
  }
431
+ /** 礼品类型。协议注释为刮刮卡 1 / 奖品 2;Android 当前会把 WelfareGiftType=0 写进消息,入站必须接受 0。 */
432
+ type ImGiftType = 0 | 1 | 2;
433
+ /** 礼品状态。0 待领取 / 1 已收款 / 2 已退还 / 3 已过期(对齐 iOS IMGiftMessageBody)。 */
434
+ type ImGiftStatus = 0 | 1 | 2 | 3;
435
+ /** 礼品会话类型。1 个人 / 2 群(BMessage.sessionType)。 */
436
+ type ImGiftSessionType = 1 | 2;
437
+ /**
438
+ * 礼品卡片正文(contentType==='gift',协议 BMessage.contentType=17)。
439
+ *
440
+ * @remarks 字段来自 iOS `IMGiftMessageBody` / proto 51-59,并复用转账字段族的 fromUid/toUid/serialNumber。
441
+ * 赠卡 HTTP 属于宿主;本 DTO 只承载会话卡片。H5 出站刮刮卡写 giftType=1。
442
+ */
443
+ interface ImGiftBody {
444
+ fromUid: string;
445
+ toUid: string;
446
+ fromUserName?: string;
447
+ toUserName?: string;
448
+ giftType: ImGiftType;
449
+ giftName: string;
450
+ giftIcon?: string;
451
+ explain?: string;
452
+ state: ImGiftStatus;
453
+ serialNumber: string;
454
+ sessionType: ImGiftSessionType;
455
+ initiateTime: number;
456
+ /** 单张金额的十进制字符串;0 或缺省表示未带金额。 */
457
+ amount?: string;
458
+ receiveTime?: number;
459
+ returnTime?: number;
460
+ isRead?: boolean;
461
+ zhangCount?: string;
462
+ benCount?: string;
463
+ fissionNumber?: string;
464
+ }
422
465
  /** 领域通话媒体类型;已从各端 wire 0/1 对调口径归一,宿主禁止再读 raw callType。 */
423
466
  type ImCallKind = 'audio' | 'video';
424
467
  /**
@@ -577,6 +620,8 @@ interface ImMessageBody {
577
620
  game?: ImGameBody;
578
621
  /** contentType==='transfer' 时的转账卡片。 */
579
622
  transfer?: ImTransferBody;
623
+ /** contentType==='gift' 时的礼品/刮刮卡卡片。 */
624
+ gift?: ImGiftBody;
580
625
  /** contentType==='call' 时的单聊通话记录。 */
581
626
  call?: ImCallRecordBody;
582
627
  /** contentType==='redPacket' 时的红包卡片。 */
@@ -965,7 +1010,7 @@ interface OutboxMessage {
965
1010
  resumePolicy?: 'automatic' | 'manual';
966
1011
  }
967
1012
  /** 当前 SDK 已注册发送策略、因此可作为转发目标的会话类型;supergroup 未注册,继续在编译期排除。 */
968
- type ForwardTargetConversationType = Extract<ConversationType, 'direct' | 'group' | 'channel'>;
1013
+ type ForwardTargetConversationType = Extract<ConversationType, 'direct' | 'group' | 'channel' | 'robot'>;
969
1014
  /** 转发目标会话;运行时仍由 SendStrategyRegistry 复核,避免类型声明与实际装配漂移。 */
970
1015
  interface ForwardTarget {
971
1016
  conversationId: string;
@@ -1857,8 +1902,11 @@ interface ImSessionFavoritePort {
1857
1902
  * 消息、Reaction 与分页边界必须整页原子保存,只有前台实际消费时才进入正常消息流程。
1858
1903
  */
1859
1904
  interface ImRecentHistoryPage {
1860
- /** 缓存记录格式版本;不认识的版本不能当作有效页使用。 */
1861
- version: 1;
1905
+ /**
1906
+ * 缓存记录格式版本;不认识的版本不能当作有效页使用。
1907
+ * v2:小程序 showType=3 / proto 94-96 进入领域正文,旧页必须重新拉网解析。
1908
+ */
1909
+ version: 2;
1862
1910
  /** 当前账号内的精确 GROUP/CHANNEL 会话;direct 没有此远端最近页能力。 */
1863
1911
  conversation: ConversationRef<'group' | 'channel'>;
1864
1912
  /** 成功获取页面的毫秒时间,用于保留期限和按获取时间淘汰。 */
@@ -2242,6 +2290,11 @@ type ImEvent = {
2242
2290
  type: 'session:updated';
2243
2291
  session: ImSession;
2244
2292
  conversation: ConversationRef;
2293
+ }
2294
+ /** 已打开聊天的资料或权限变化,不代表新增会话列表项。 */
2295
+ | {
2296
+ type: 'conversation-context:updated';
2297
+ conversation: ConversationRef;
2245
2298
  } | {
2246
2299
  type: 'session:removed';
2247
2300
  conversationId: string;
@@ -3069,6 +3122,10 @@ interface MiniProgramMessageOptions {
3069
3122
  interface TransferMessageOptions {
3070
3123
  replyToMessageId?: string;
3071
3124
  }
3125
+ /** 礼品卡片发送选项;正文必须已含福利中心赠送后的流水号与卡面。 */
3126
+ interface GiftMessageOptions {
3127
+ replyToMessageId?: string;
3128
+ }
3072
3129
  /**
3073
3130
  * 媒体合集里的一项:一张图片或一个视频。
3074
3131
  *
@@ -3489,7 +3546,7 @@ interface ConversationPrefetchOptions {
3489
3546
  * skipped 表示当前类型、权限、存储或预算不允许预取;失败不改变正常打开会话的行为。
3490
3547
  */
3491
3548
  interface ConversationPrefetchResult {
3492
- ref: ConversationRef<'direct' | 'group' | 'channel'>;
3549
+ ref: ConversationRef<'direct' | 'group' | 'channel' | 'robot'>;
3493
3550
  status: 'ready' | 'skipped' | 'failed' | 'cancelled';
3494
3551
  reason?: 'unsupported' | 'unavailable' | 'storage-unavailable' | 'budget' | 'page-too-large' | 'decrypt-failed' | 'invalidated' | 'cancelled';
3495
3552
  error?: ImSdkErrorShape;
@@ -3532,7 +3589,7 @@ interface ConversationDraftApi {
3532
3589
  subscribe: (listener: (draft: ConversationDraft | null) => void) => () => void;
3533
3590
  }
3534
3591
  /**
3535
- * 当前账号的跨组件草稿 API;所有动作都要求 direct/GROUP/CHANNEL 精确复合身份。
3592
+ * 当前账号的跨组件草稿 API;所有动作都要求 direct / GROUP / CHANNEL / robot 精确复合身份。
3536
3593
  *
3537
3594
  * @example
3538
3595
  * ```ts
@@ -3556,11 +3613,11 @@ interface ImDraftsApi {
3556
3613
 
3557
3614
  /**
3558
3615
  * SDK 会话列表内部 sibling 路由与会话级写动作。
3559
- * 置顶、免打扰、已读和本地删除都要求精确 `ConversationRef`,并按 direct/GROUP/CHANNEL 独立协议分流。
3616
+ * 置顶、免打扰、已读和本地删除都要求精确 `ConversationRef`,并按 direct/GROUP/CHANNEL/robot 独立协议分流。
3560
3617
  */
3561
3618
 
3562
3619
  /** 当前兼容门面支持的精确会话 ref。 */
3563
- type ImSupportedConversationRef = ConversationRef<'direct' | 'group' | 'channel'>;
3620
+ type ImSupportedConversationRef = ConversationRef<'direct' | 'group' | 'channel' | 'robot'>;
3564
3621
  /**
3565
3622
  * 会话 API 的迁移期入参。优先传完整 ref;旧 string 仅在当前 session 中唯一命中时可用。
3566
3623
  *
@@ -3959,7 +4016,7 @@ interface ImDirectCallsApi {
3959
4016
  * Blob 只经 storage 持久化。异步读取使用运行时代际防止切会话/切账号晚返回,宿主负责最终渲染与 URL 释放。
3960
4017
  */
3961
4018
 
3962
- type ConversationBackgroundConversationType = 'direct' | 'group' | 'channel';
4019
+ type ConversationBackgroundConversationType = 'direct' | 'group' | 'channel' | 'robot';
3963
4020
  interface ConversationBackgroundPreset {
3964
4021
  id: string;
3965
4022
  url: string;
@@ -4119,7 +4176,7 @@ interface ImChannelProfile {
4119
4176
  */
4120
4177
 
4121
4178
  /** default 会话列表支持的精确类型;`supergroup` 继续受产品 Gate 约束。 */
4122
- type ProductConversationListType = 'direct' | 'group' | 'channel';
4179
+ type ProductConversationListType = 'direct' | 'group' | 'channel' | 'robot';
4123
4180
  /** GROUP 会话限制状态;与 CHANNEL 状态保持独立 sibling。 */
4124
4181
  type ImGroupConversationState = GroupSessionState;
4125
4182
  /**
@@ -4178,6 +4235,8 @@ type ConversationLastMessageSummary = {
4178
4235
  kind: 'robot';
4179
4236
  } | {
4180
4237
  kind: 'transfer';
4238
+ } | {
4239
+ kind: 'gift';
4181
4240
  } | {
4182
4241
  kind: 'redPacket';
4183
4242
  } | {
@@ -4333,6 +4392,12 @@ interface DirectConversationCapabilities {
4333
4392
  canUseMessageActions: CapabilityDecision;
4334
4393
  canManageRelationship: CapabilityDecision;
4335
4394
  }
4395
+ interface RobotConversationCapabilities {
4396
+ canSendMessages: CapabilityDecision;
4397
+ canOpenProfile: CapabilityDecision;
4398
+ canUseMessageActions: CapabilityDecision;
4399
+ canReadHistory: CapabilityDecision;
4400
+ }
4336
4401
  /**
4337
4402
  * 普通群能力快照。
4338
4403
  *
@@ -4399,6 +4464,8 @@ type ConversationCapabilitySnapshot = (ConversationCapabilityBase<'direct'> & {
4399
4464
  value: GroupConversationCapabilities;
4400
4465
  }) | (ConversationCapabilityBase<'channel'> & {
4401
4466
  value: ChannelConversationCapabilities;
4467
+ }) | (ConversationCapabilityBase<'robot'> & {
4468
+ value: RobotConversationCapabilities;
4402
4469
  });
4403
4470
  interface ImConversationCapabilitiesApi {
4404
4471
  /** 只读取 SDK 当前本机真相与已刷新过的资料/关系投影,不隐式联网。 */
@@ -4565,7 +4632,7 @@ interface ImMessagesByIdResult<TMessage> {
4565
4632
  */
4566
4633
 
4567
4634
  /** 当前已接线的产品 handle 会话类型;三者只在无会话语义原子层复用。 */
4568
- type ProductHandleConversationType = 'direct' | 'group' | 'channel';
4635
+ type ProductHandleConversationType = 'direct' | 'group' | 'channel' | 'robot';
4569
4636
  /**
4570
4637
  * 会话 handle 初始打开位置。
4571
4638
  *
@@ -4606,6 +4673,11 @@ interface ConversationOpenOptions {
4606
4673
  */
4607
4674
  interface ConversationHandleSnapshot<TType extends ProductHandleConversationType = ProductHandleConversationType> {
4608
4675
  ref: ConversationRef<TType>;
4676
+ /** 已校验的聊天标题与头像;即使尚无会话列表项,宿主也可正常展示聊天头部。 */
4677
+ display?: Readonly<{
4678
+ title: string;
4679
+ avatar?: string;
4680
+ }>;
4609
4681
  messages: readonly ImMessageView[];
4610
4682
  /** 本次打开时冻结的未读入口;只用于产品 UI 分隔线,不作为 SDK 已读真相。 */
4611
4683
  entryUnread: ConversationEntryUnreadSnapshot;
@@ -4700,6 +4772,12 @@ interface ConversationMessageApi {
4700
4772
  * @remarks CHANNEL 当前产品入口不发送转账,会返回 unsupported。消息固定明文。
4701
4773
  */
4702
4774
  sendTransfer: (transfer: ImTransferBody, options?: TransferMessageOptions) => Promise<SendMessageResult>;
4775
+ /**
4776
+ * 发送礼品卡片。调用方必须先完成福利中心 HTTP 赠送。
4777
+ *
4778
+ * @remarks CHANNEL 当前产品入口不发送礼物,会返回 unsupported。消息固定明文。
4779
+ */
4780
+ sendGift: (gift: ImGiftBody, options?: GiftMessageOptions) => Promise<SendMessageResult>;
4703
4781
  /** 当前用户已选相同 emoji 时移除,否则添加或替换。emoji 必须是协议 token,例如 `[Great]`。 */
4704
4782
  toggleReaction: (messageId: string, emoji: string) => Promise<ImReactionChangeResult>;
4705
4783
  /** 显式添加/替换或移除,供参与者详情等不能用 toggle 猜动作的产品交互。 */
@@ -5539,6 +5617,57 @@ interface ImRequestError {
5539
5617
  */
5540
5618
  type ImRequestErrorHandler = (issue: ImRequestError) => void | Promise<void>;
5541
5619
 
5620
+ /**
5621
+ * 机器人目录产品分页运行时。
5622
+ * 服务端页码封装为绑定账号 runtime 与查询条件的 opaque token;伪造、跨筛选或已消费 token 显式失败。
5623
+ */
5624
+
5625
+ /**
5626
+ * 机器人目录查询范围。
5627
+ *
5628
+ * `catalog` 对齐通讯录「查找机器人」;`conversation` 对齐群/社群资料添加与输入栏已绑定列表。
5629
+ */
5630
+ type ImRobotDirectoryScope = {
5631
+ kind: 'catalog';
5632
+ } | {
5633
+ kind: 'conversation';
5634
+ conversationType: 'group' | 'channel';
5635
+ conversationId: string;
5636
+ /** `bound` 对齐 iOS 输入栏 `search_type=1`。 */
5637
+ filter?: 'bound';
5638
+ };
5639
+ /** 机器人目录项;只保留打开私聊和列表展示所需字段。 */
5640
+ interface ImRobotDirectoryItem {
5641
+ id: string;
5642
+ displayName: string;
5643
+ username?: string;
5644
+ avatarUrl?: string;
5645
+ bound?: boolean;
5646
+ }
5647
+ /** 把机器人绑定或解绑到普通群/社群。 */
5648
+ interface ImRobotConversationBindInput {
5649
+ robotId: string;
5650
+ conversationType: 'group' | 'channel';
5651
+ conversationId: string;
5652
+ }
5653
+ /** 机器人目录页;服务端页码由 SDK token 封装,UI 只能原样续页。 */
5654
+ interface ImRobotDirectoryPage {
5655
+ items: readonly ImRobotDirectoryItem[];
5656
+ nextPageToken?: ImPageToken;
5657
+ exhausted: boolean;
5658
+ }
5659
+ /** 机器人目录产品分页面。 */
5660
+ interface ImRobotsApi {
5661
+ listFirstPage: (options?: {
5662
+ scope?: ImRobotDirectoryScope;
5663
+ keyword?: string;
5664
+ pageSize?: number;
5665
+ }) => Promise<ImRobotDirectoryPage>;
5666
+ listNextPage: (pageToken: ImPageToken) => Promise<ImRobotDirectoryPage>;
5667
+ bindToConversation: (input: ImRobotConversationBindInput) => Promise<void>;
5668
+ unbindFromConversation: (input: ImRobotConversationBindInput) => Promise<void>;
5669
+ }
5670
+
5542
5671
  /**
5543
5672
  * 当前账号本地会话与消息的分场景产品搜索运行时。
5544
5673
  *
@@ -5601,6 +5730,8 @@ interface ImMessageSearchApi {
5601
5730
  inGroup: (conversation: ConversationRef<'group'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
5602
5731
  /** 搜索 CHANNEL 本地历史;当前不调用未闭合的远端 CHANNEL 搜索/定位协议。 */
5603
5732
  inChannel: (conversation: ConversationRef<'channel'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
5733
+ /** 搜索 robot 本地历史;无远端历史,不得回退 direct。 */
5734
+ inRobot: (conversation: ConversationRef<'robot'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
5604
5735
  /** 只搜索文本消息;关键词必填且不能为空。 */
5605
5736
  texts: (conversation: ConversationRef<ProductHandleConversationType>, keyword: string) => Promise<ProductMessageSearchPage<'text'>>;
5606
5737
  /** 只搜索文件消息;省略或传空白关键词时按文件分类浏览。 */
@@ -6124,13 +6255,18 @@ interface AdvancedChannelsApi extends ImDirectoryApi<'channel'> {
6124
6255
  /** advanced 会话门面:保留兼容列表动作,同时暴露与 default 共用的背景产品能力。 */
6125
6256
  interface AdvancedConversationsApi extends ImConversationsApi, ImConversationBackgroundApi {
6126
6257
  /**
6127
- * 为产品 `openConversation` 完成缺失会话的本地对象/资料/访问校验并提交 DomainState 摘要。
6258
+ * 为产品 `openConversation` 完成本地对象/资料/访问校验;打开本身不创建会话列表项。
6128
6259
  *
6129
6260
  * advanced/testing 的原始 handle 测试不得把它当成第二个宿主入口。
6130
6261
  *
6131
6262
  * @internal
6132
6263
  */
6133
- ensureOpenableConversation: (ref: ConversationRef) => Promise<ConversationRef<'direct' | 'group' | 'channel'>>;
6264
+ ensureOpenableConversation: (ref: ConversationRef) => Promise<ConversationRef<'direct' | 'group' | 'channel' | 'robot'>>;
6265
+ /**
6266
+ * 读取已有会话或本次账号内已校验的目标资料;返回值不代表列表成员资格。
6267
+ * @internal
6268
+ */
6269
+ getContext: (ref: ConversationRef) => ImSession | undefined;
6134
6270
  }
6135
6271
  /**
6136
6272
  * 普通宿主的真实 default client。
@@ -6154,6 +6290,8 @@ interface ImProductClient {
6154
6290
  readonly conversations: ImConversationListApi;
6155
6291
  /** 当前账号完整联系人、群组和社群目录的统一搜索。 */
6156
6292
  readonly directory: ImDirectorySearchApi;
6293
+ /** 机器人公开目录;通讯录查找与群/社群绑定列表共用分页合同。 */
6294
+ readonly robots: ImRobotsApi;
6157
6295
  readonly contacts: ImContactsApi;
6158
6296
  readonly groups: ImGroupsApi;
6159
6297
  readonly channels: ImChannelsApi;
@@ -6203,6 +6341,7 @@ interface ImClient extends Omit<ImProductClient, 'capabilities' | 'channels' | '
6203
6341
  (ref: ConversationRef<'direct'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'direct'>>;
6204
6342
  (ref: ConversationRef<'group'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'group'>>;
6205
6343
  (ref: ConversationRef<'channel'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'channel'>>;
6344
+ (ref: ConversationRef<'robot'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'robot'>>;
6206
6345
  };
6207
6346
  /** 当前账号草稿产品面;按复合身份持久化,handle.draft 委托同一状态源。 */
6208
6347
  drafts: ImDraftsApi;
@@ -6716,7 +6855,7 @@ interface ChatRuntime {
6716
6855
  /** 撤销当前账号创建的全部媒体预览地址并释放 Blob 内存,切账号、退出或销毁时调用。 */
6717
6856
  cleanupLocalMediaBlobs: () => void;
6718
6857
  /** 删除会话时释放该会话绑定的本地媒体预览/播放缓存。 */
6719
- cleanupConversationMediaBlobs: (conversation: ConversationRef<'direct' | 'group' | 'channel'>) => void;
6858
+ cleanupConversationMediaBlobs: (conversation: ConversationRef<'direct' | 'group' | 'channel' | 'robot'>) => void;
6720
6859
  }
6721
6860
 
6722
6861
  /** 当前置顶消息的稳定资料;普通群和社群各自保留明确会话身份。 */
@@ -8915,6 +9054,8 @@ type ProductConversationHandle = ConversationHandle<ProductHandleConversationTyp
8915
9054
  /** Thread Store 中由 Pinia 管理的当前窗口投影;句柄、订阅和租约留在闭包中。 */
8916
9055
  interface ImThreadStoreState {
8917
9056
  activeRef: ConversationRef<ProductHandleConversationType> | null;
9057
+ /** SDK 已校验的活动聊天展示资料;不依赖该聊天是否已进入会话列表。 */
9058
+ display: ConversationHandleSnapshot['display'] | null;
8918
9059
  messages: readonly ImMessageView[];
8919
9060
  entryUnread: ConversationEntryUnreadSnapshot;
8920
9061
  draft: ConversationDraft | null;