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.
@@ -1,8 +1,8 @@
1
1
  /** 媒体业务类型:实现据此选对象存储逻辑桶;sticker 对应 app-sticker。 */
2
2
  type MediaKind = 'image' | 'video' | 'voice' | 'file' | 'sticker';
3
3
 
4
- /** 会话类型。P0 只用 direct / group。 */
5
- type ConversationType = 'direct' | 'group' | 'channel' | 'supergroup';
4
+ /** 会话类型。P0 只用 direct / group;`robot` 是独立私聊 sibling,不得并入 direct。 */
5
+ type ConversationType = 'direct' | 'group' | 'channel' | 'supergroup' | 'robot';
6
6
  /**
7
7
  * 会话复合身份;`conversationId` 只在对应 `conversationType` 的领域内唯一。
8
8
  *
@@ -39,8 +39,8 @@ interface ConversationDraft$1 {
39
39
  attachments: readonly [];
40
40
  updatedAt: number;
41
41
  }
42
- /** 消息内容类型。sticker=表情/贴图(BMessage contentType=7);call=单聊通话记录(contentType=10);transfer=转账(contentType=16);robot=机器人卡片(contentType=18);miniProgram=小程序分享卡(contentType=22);redPacket=红包卡(contentType=25);game=小游戏(contentType=27);未知 wire 正文统一归一为 unknown。 */
43
- type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'call' | 'redPacket' | 'mediaAlbum' | 'robot' | 'unknown';
42
+ /** 消息内容类型。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。 */
43
+ type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'gift' | 'call' | 'redPacket' | 'mediaAlbum' | 'robot' | 'unknown';
44
44
  /**
45
45
  * 发送态(客户端态):消息从本地创建到服务端确认的生命周期。
46
46
  * `uploading` 仅媒体消息使用:文件上传阶段(uploading→pending→sending→sent);
@@ -109,6 +109,8 @@ type LastMessageSummary = {
109
109
  gameType: ImGameType;
110
110
  } | {
111
111
  kind: 'transfer';
112
+ } | {
113
+ kind: 'gift';
112
114
  } | {
113
115
  kind: 'call';
114
116
  callKind: ImCallKind;
@@ -308,13 +310,14 @@ type ImGameBody = {
308
310
  * - `default`:0,普通可点卡片
309
311
  * - `board-game`:1,棋牌样式且不可点
310
312
  * - `board-game-link`:2,棋牌样式且可点
313
+ * - `game-preview`:3,气泡内嵌游戏预览 WebView
311
314
  * - `unknown`:必须同时保留 `rawShowType`,不得猜成可点/不可点
312
315
  */
313
- type ImMiniProgramShowType = 'default' | 'board-game' | 'board-game-link' | 'unknown';
316
+ type ImMiniProgramShowType = 'default' | 'board-game' | 'board-game-link' | 'game-preview' | 'unknown';
314
317
  /**
315
318
  * 小程序分享卡片正文(contentType==='miniProgram',协议 BMessage.contentType=22)。
316
319
  *
317
- * @remarks 字段来自 iOS `IMMiniProgramMessageBody` / proto 61-67、80-82、90-93。
320
+ * @remarks 字段来自 iOS `IMMiniProgramMessageBody` / proto 61-67、80-82、90-96。
318
321
  * `currencySource` 对应 proto field 90(无 miniProgram 前缀):`xj` 现金公司、`xy` 信用公司。
319
322
  * `subGameName` 保持服务端 JSON 字符串,不在 Core 解析语种表。打开小程序与 X 币/信用 ID 属于宿主,不进本 DTO。
320
323
  */
@@ -338,6 +341,12 @@ interface ImMiniProgramBody {
338
341
  gamePath?: string;
339
342
  /** 多语言子游戏名 JSON 字符串,例如 `{"ch":"...","en":"..."}`。 */
340
343
  subGameName?: string;
344
+ /** 游戏预览页地址(BMessage.miniProgramGamePreviewUrl,showType=3)。 */
345
+ gamePreviewUrl?: string;
346
+ /** 游戏预览设计宽(BMessage.miniProgramGamePreviewWidth)。 */
347
+ gamePreviewWidth?: number;
348
+ /** 游戏预览设计高(BMessage.miniProgramGamePreviewHeight)。 */
349
+ gamePreviewHeight?: number;
341
350
  }
342
351
  /**
343
352
  * 机器人卡片文本模块(wire `section`)。
@@ -416,6 +425,40 @@ interface ImTransferBody {
416
425
  coinName?: string;
417
426
  coinIcon?: string;
418
427
  }
428
+ /** 礼品类型。协议注释为刮刮卡 1 / 奖品 2;Android 当前会把 WelfareGiftType=0 写进消息,入站必须接受 0。 */
429
+ type ImGiftType = 0 | 1 | 2;
430
+ /** 礼品状态。0 待领取 / 1 已收款 / 2 已退还 / 3 已过期(对齐 iOS IMGiftMessageBody)。 */
431
+ type ImGiftStatus = 0 | 1 | 2 | 3;
432
+ /** 礼品会话类型。1 个人 / 2 群(BMessage.sessionType)。 */
433
+ type ImGiftSessionType = 1 | 2;
434
+ /**
435
+ * 礼品卡片正文(contentType==='gift',协议 BMessage.contentType=17)。
436
+ *
437
+ * @remarks 字段来自 iOS `IMGiftMessageBody` / proto 51-59,并复用转账字段族的 fromUid/toUid/serialNumber。
438
+ * 赠卡 HTTP 属于宿主;本 DTO 只承载会话卡片。H5 出站刮刮卡写 giftType=1。
439
+ */
440
+ interface ImGiftBody {
441
+ fromUid: string;
442
+ toUid: string;
443
+ fromUserName?: string;
444
+ toUserName?: string;
445
+ giftType: ImGiftType;
446
+ giftName: string;
447
+ giftIcon?: string;
448
+ explain?: string;
449
+ state: ImGiftStatus;
450
+ serialNumber: string;
451
+ sessionType: ImGiftSessionType;
452
+ initiateTime: number;
453
+ /** 单张金额的十进制字符串;0 或缺省表示未带金额。 */
454
+ amount?: string;
455
+ receiveTime?: number;
456
+ returnTime?: number;
457
+ isRead?: boolean;
458
+ zhangCount?: string;
459
+ benCount?: string;
460
+ fissionNumber?: string;
461
+ }
419
462
  /** 领域通话媒体类型;已从各端 wire 0/1 对调口径归一,宿主禁止再读 raw callType。 */
420
463
  type ImCallKind = 'audio' | 'video';
421
464
  /**
@@ -574,6 +617,8 @@ interface ImMessageBody {
574
617
  game?: ImGameBody;
575
618
  /** contentType==='transfer' 时的转账卡片。 */
576
619
  transfer?: ImTransferBody;
620
+ /** contentType==='gift' 时的礼品/刮刮卡卡片。 */
621
+ gift?: ImGiftBody;
577
622
  /** contentType==='call' 时的单聊通话记录。 */
578
623
  call?: ImCallRecordBody;
579
624
  /** contentType==='redPacket' 时的红包卡片。 */
@@ -962,7 +1007,7 @@ interface OutboxMessage {
962
1007
  resumePolicy?: 'automatic' | 'manual';
963
1008
  }
964
1009
  /** 当前 SDK 已注册发送策略、因此可作为转发目标的会话类型;supergroup 未注册,继续在编译期排除。 */
965
- type ForwardTargetConversationType = Extract<ConversationType, 'direct' | 'group' | 'channel'>;
1010
+ type ForwardTargetConversationType = Extract<ConversationType, 'direct' | 'group' | 'channel' | 'robot'>;
966
1011
  /** 转发目标会话;运行时仍由 SendStrategyRegistry 复核,避免类型声明与实际装配漂移。 */
967
1012
  interface ForwardTarget {
968
1013
  conversationId: string;
@@ -1854,8 +1899,11 @@ interface ImSessionFavoritePort {
1854
1899
  * 消息、Reaction 与分页边界必须整页原子保存,只有前台实际消费时才进入正常消息流程。
1855
1900
  */
1856
1901
  interface ImRecentHistoryPage {
1857
- /** 缓存记录格式版本;不认识的版本不能当作有效页使用。 */
1858
- version: 1;
1902
+ /**
1903
+ * 缓存记录格式版本;不认识的版本不能当作有效页使用。
1904
+ * v2:小程序 showType=3 / proto 94-96 进入领域正文,旧页必须重新拉网解析。
1905
+ */
1906
+ version: 2;
1859
1907
  /** 当前账号内的精确 GROUP/CHANNEL 会话;direct 没有此远端最近页能力。 */
1860
1908
  conversation: ConversationRef<'group' | 'channel'>;
1861
1909
  /** 成功获取页面的毫秒时间,用于保留期限和按获取时间淘汰。 */
@@ -2239,6 +2287,11 @@ type ImEvent = {
2239
2287
  type: 'session:updated';
2240
2288
  session: ImSession;
2241
2289
  conversation: ConversationRef;
2290
+ }
2291
+ /** 已打开聊天的资料或权限变化,不代表新增会话列表项。 */
2292
+ | {
2293
+ type: 'conversation-context:updated';
2294
+ conversation: ConversationRef;
2242
2295
  } | {
2243
2296
  type: 'session:removed';
2244
2297
  conversationId: string;
@@ -3155,6 +3208,10 @@ interface MiniProgramMessageOptions {
3155
3208
  interface TransferMessageOptions {
3156
3209
  replyToMessageId?: string;
3157
3210
  }
3211
+ /** 礼品卡片发送选项;正文必须已含福利中心赠送后的流水号与卡面。 */
3212
+ interface GiftMessageOptions {
3213
+ replyToMessageId?: string;
3214
+ }
3158
3215
  /**
3159
3216
  * 媒体合集里的一项:一张图片或一个视频。
3160
3217
  *
@@ -3575,7 +3632,7 @@ interface ConversationPrefetchOptions {
3575
3632
  * skipped 表示当前类型、权限、存储或预算不允许预取;失败不改变正常打开会话的行为。
3576
3633
  */
3577
3634
  interface ConversationPrefetchResult {
3578
- ref: ConversationRef<'direct' | 'group' | 'channel'>;
3635
+ ref: ConversationRef<'direct' | 'group' | 'channel' | 'robot'>;
3579
3636
  status: 'ready' | 'skipped' | 'failed' | 'cancelled';
3580
3637
  reason?: 'unsupported' | 'unavailable' | 'storage-unavailable' | 'budget' | 'page-too-large' | 'decrypt-failed' | 'invalidated' | 'cancelled';
3581
3638
  error?: ImSdkErrorShape;
@@ -3618,7 +3675,7 @@ interface ConversationDraftApi {
3618
3675
  subscribe: (listener: (draft: ConversationDraft | null) => void) => () => void;
3619
3676
  }
3620
3677
  /**
3621
- * 当前账号的跨组件草稿 API;所有动作都要求 direct/GROUP/CHANNEL 精确复合身份。
3678
+ * 当前账号的跨组件草稿 API;所有动作都要求 direct / GROUP / CHANNEL / robot 精确复合身份。
3622
3679
  *
3623
3680
  * @example
3624
3681
  * ```ts
@@ -3642,11 +3699,11 @@ interface ImDraftsApi {
3642
3699
 
3643
3700
  /**
3644
3701
  * SDK 会话列表内部 sibling 路由与会话级写动作。
3645
- * 置顶、免打扰、已读和本地删除都要求精确 `ConversationRef`,并按 direct/GROUP/CHANNEL 独立协议分流。
3702
+ * 置顶、免打扰、已读和本地删除都要求精确 `ConversationRef`,并按 direct/GROUP/CHANNEL/robot 独立协议分流。
3646
3703
  */
3647
3704
 
3648
3705
  /** 当前兼容门面支持的精确会话 ref。 */
3649
- type ImSupportedConversationRef = ConversationRef<'direct' | 'group' | 'channel'>;
3706
+ type ImSupportedConversationRef = ConversationRef<'direct' | 'group' | 'channel' | 'robot'>;
3650
3707
  /**
3651
3708
  * 会话 API 的迁移期入参。优先传完整 ref;旧 string 仅在当前 session 中唯一命中时可用。
3652
3709
  *
@@ -4045,7 +4102,7 @@ interface ImDirectCallsApi {
4045
4102
  * Blob 只经 storage 持久化。异步读取使用运行时代际防止切会话/切账号晚返回,宿主负责最终渲染与 URL 释放。
4046
4103
  */
4047
4104
 
4048
- type ConversationBackgroundConversationType = 'direct' | 'group' | 'channel';
4105
+ type ConversationBackgroundConversationType = 'direct' | 'group' | 'channel' | 'robot';
4049
4106
  interface ConversationBackgroundPreset {
4050
4107
  id: string;
4051
4108
  url: string;
@@ -4207,7 +4264,7 @@ interface ImChannelProfile {
4207
4264
  */
4208
4265
 
4209
4266
  /** default 会话列表支持的精确类型;`supergroup` 继续受产品 Gate 约束。 */
4210
- type ProductConversationListType = 'direct' | 'group' | 'channel';
4267
+ type ProductConversationListType = 'direct' | 'group' | 'channel' | 'robot';
4211
4268
  /** GROUP 会话限制状态;与 CHANNEL 状态保持独立 sibling。 */
4212
4269
  type ImGroupConversationState = GroupSessionState;
4213
4270
  /**
@@ -4266,6 +4323,8 @@ type ConversationLastMessageSummary = {
4266
4323
  kind: 'robot';
4267
4324
  } | {
4268
4325
  kind: 'transfer';
4326
+ } | {
4327
+ kind: 'gift';
4269
4328
  } | {
4270
4329
  kind: 'redPacket';
4271
4330
  } | {
@@ -4421,6 +4480,12 @@ interface DirectConversationCapabilities {
4421
4480
  canUseMessageActions: CapabilityDecision;
4422
4481
  canManageRelationship: CapabilityDecision;
4423
4482
  }
4483
+ interface RobotConversationCapabilities {
4484
+ canSendMessages: CapabilityDecision;
4485
+ canOpenProfile: CapabilityDecision;
4486
+ canUseMessageActions: CapabilityDecision;
4487
+ canReadHistory: CapabilityDecision;
4488
+ }
4424
4489
  /**
4425
4490
  * 普通群能力快照。
4426
4491
  *
@@ -4487,6 +4552,8 @@ type ConversationCapabilitySnapshot = (ConversationCapabilityBase<'direct'> & {
4487
4552
  value: GroupConversationCapabilities;
4488
4553
  }) | (ConversationCapabilityBase<'channel'> & {
4489
4554
  value: ChannelConversationCapabilities;
4555
+ }) | (ConversationCapabilityBase<'robot'> & {
4556
+ value: RobotConversationCapabilities;
4490
4557
  });
4491
4558
  interface ImConversationCapabilitiesApi {
4492
4559
  /** 只读取 SDK 当前本机真相与已刷新过的资料/关系投影,不隐式联网。 */
@@ -4653,7 +4720,7 @@ interface ImMessagesByIdResult<TMessage> {
4653
4720
  */
4654
4721
 
4655
4722
  /** 当前已接线的产品 handle 会话类型;三者只在无会话语义原子层复用。 */
4656
- type ProductHandleConversationType = 'direct' | 'group' | 'channel';
4723
+ type ProductHandleConversationType = 'direct' | 'group' | 'channel' | 'robot';
4657
4724
  /**
4658
4725
  * 会话 handle 初始打开位置。
4659
4726
  *
@@ -4694,6 +4761,11 @@ interface ConversationOpenOptions {
4694
4761
  */
4695
4762
  interface ConversationHandleSnapshot<TType extends ProductHandleConversationType = ProductHandleConversationType> {
4696
4763
  ref: ConversationRef<TType>;
4764
+ /** 已校验的聊天标题与头像;即使尚无会话列表项,宿主也可正常展示聊天头部。 */
4765
+ display?: Readonly<{
4766
+ title: string;
4767
+ avatar?: string;
4768
+ }>;
4697
4769
  messages: readonly ImMessageView[];
4698
4770
  /** 本次打开时冻结的未读入口;只用于产品 UI 分隔线,不作为 SDK 已读真相。 */
4699
4771
  entryUnread: ConversationEntryUnreadSnapshot;
@@ -4788,6 +4860,12 @@ interface ConversationMessageApi {
4788
4860
  * @remarks CHANNEL 当前产品入口不发送转账,会返回 unsupported。消息固定明文。
4789
4861
  */
4790
4862
  sendTransfer: (transfer: ImTransferBody, options?: TransferMessageOptions) => Promise<SendMessageResult>;
4863
+ /**
4864
+ * 发送礼品卡片。调用方必须先完成福利中心 HTTP 赠送。
4865
+ *
4866
+ * @remarks CHANNEL 当前产品入口不发送礼物,会返回 unsupported。消息固定明文。
4867
+ */
4868
+ sendGift: (gift: ImGiftBody, options?: GiftMessageOptions) => Promise<SendMessageResult>;
4791
4869
  /** 当前用户已选相同 emoji 时移除,否则添加或替换。emoji 必须是协议 token,例如 `[Great]`。 */
4792
4870
  toggleReaction: (messageId: string, emoji: string) => Promise<ImReactionChangeResult>;
4793
4871
  /** 显式添加/替换或移除,供参与者详情等不能用 toggle 猜动作的产品交互。 */
@@ -5627,6 +5705,57 @@ interface ImRequestError {
5627
5705
  */
5628
5706
  type ImRequestErrorHandler = (issue: ImRequestError) => void | Promise<void>;
5629
5707
 
5708
+ /**
5709
+ * 机器人目录产品分页运行时。
5710
+ * 服务端页码封装为绑定账号 runtime 与查询条件的 opaque token;伪造、跨筛选或已消费 token 显式失败。
5711
+ */
5712
+
5713
+ /**
5714
+ * 机器人目录查询范围。
5715
+ *
5716
+ * `catalog` 对齐通讯录「查找机器人」;`conversation` 对齐群/社群资料添加与输入栏已绑定列表。
5717
+ */
5718
+ type ImRobotDirectoryScope = {
5719
+ kind: 'catalog';
5720
+ } | {
5721
+ kind: 'conversation';
5722
+ conversationType: 'group' | 'channel';
5723
+ conversationId: string;
5724
+ /** `bound` 对齐 iOS 输入栏 `search_type=1`。 */
5725
+ filter?: 'bound';
5726
+ };
5727
+ /** 机器人目录项;只保留打开私聊和列表展示所需字段。 */
5728
+ interface ImRobotDirectoryItem {
5729
+ id: string;
5730
+ displayName: string;
5731
+ username?: string;
5732
+ avatarUrl?: string;
5733
+ bound?: boolean;
5734
+ }
5735
+ /** 把机器人绑定或解绑到普通群/社群。 */
5736
+ interface ImRobotConversationBindInput {
5737
+ robotId: string;
5738
+ conversationType: 'group' | 'channel';
5739
+ conversationId: string;
5740
+ }
5741
+ /** 机器人目录页;服务端页码由 SDK token 封装,UI 只能原样续页。 */
5742
+ interface ImRobotDirectoryPage {
5743
+ items: readonly ImRobotDirectoryItem[];
5744
+ nextPageToken?: ImPageToken;
5745
+ exhausted: boolean;
5746
+ }
5747
+ /** 机器人目录产品分页面。 */
5748
+ interface ImRobotsApi {
5749
+ listFirstPage: (options?: {
5750
+ scope?: ImRobotDirectoryScope;
5751
+ keyword?: string;
5752
+ pageSize?: number;
5753
+ }) => Promise<ImRobotDirectoryPage>;
5754
+ listNextPage: (pageToken: ImPageToken) => Promise<ImRobotDirectoryPage>;
5755
+ bindToConversation: (input: ImRobotConversationBindInput) => Promise<void>;
5756
+ unbindFromConversation: (input: ImRobotConversationBindInput) => Promise<void>;
5757
+ }
5758
+
5630
5759
  /**
5631
5760
  * 当前账号本地会话与消息的分场景产品搜索运行时。
5632
5761
  *
@@ -5689,6 +5818,8 @@ interface ImMessageSearchApi {
5689
5818
  inGroup: (conversation: ConversationRef<'group'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
5690
5819
  /** 搜索 CHANNEL 本地历史;当前不调用未闭合的远端 CHANNEL 搜索/定位协议。 */
5691
5820
  inChannel: (conversation: ConversationRef<'channel'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
5821
+ /** 搜索 robot 本地历史;无远端历史,不得回退 direct。 */
5822
+ inRobot: (conversation: ConversationRef<'robot'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
5692
5823
  /** 只搜索文本消息;关键词必填且不能为空。 */
5693
5824
  texts: (conversation: ConversationRef<ProductHandleConversationType>, keyword: string) => Promise<ProductMessageSearchPage<'text'>>;
5694
5825
  /** 只搜索文件消息;省略或传空白关键词时按文件分类浏览。 */
@@ -6219,13 +6350,18 @@ interface AdvancedChannelsApi extends ImDirectoryApi<'channel'> {
6219
6350
  /** advanced 会话门面:保留兼容列表动作,同时暴露与 default 共用的背景产品能力。 */
6220
6351
  interface AdvancedConversationsApi extends ImConversationsApi, ImConversationBackgroundApi {
6221
6352
  /**
6222
- * 为产品 `openConversation` 完成缺失会话的本地对象/资料/访问校验并提交 DomainState 摘要。
6353
+ * 为产品 `openConversation` 完成本地对象/资料/访问校验;打开本身不创建会话列表项。
6223
6354
  *
6224
6355
  * advanced/testing 的原始 handle 测试不得把它当成第二个宿主入口。
6225
6356
  *
6226
6357
  * @internal
6227
6358
  */
6228
- ensureOpenableConversation: (ref: ConversationRef) => Promise<ConversationRef<'direct' | 'group' | 'channel'>>;
6359
+ ensureOpenableConversation: (ref: ConversationRef) => Promise<ConversationRef<'direct' | 'group' | 'channel' | 'robot'>>;
6360
+ /**
6361
+ * 读取已有会话或本次账号内已校验的目标资料;返回值不代表列表成员资格。
6362
+ * @internal
6363
+ */
6364
+ getContext: (ref: ConversationRef) => ImSession | undefined;
6229
6365
  }
6230
6366
  /**
6231
6367
  * 普通宿主的真实 default client。
@@ -6249,6 +6385,8 @@ interface ImProductClient {
6249
6385
  readonly conversations: ImConversationListApi;
6250
6386
  /** 当前账号完整联系人、群组和社群目录的统一搜索。 */
6251
6387
  readonly directory: ImDirectorySearchApi;
6388
+ /** 机器人公开目录;通讯录查找与群/社群绑定列表共用分页合同。 */
6389
+ readonly robots: ImRobotsApi;
6252
6390
  readonly contacts: ImContactsApi;
6253
6391
  readonly groups: ImGroupsApi;
6254
6392
  readonly channels: ImChannelsApi;
@@ -6298,6 +6436,7 @@ interface ImClient extends Omit<ImProductClient, 'capabilities' | 'channels' | '
6298
6436
  (ref: ConversationRef<'direct'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'direct'>>;
6299
6437
  (ref: ConversationRef<'group'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'group'>>;
6300
6438
  (ref: ConversationRef<'channel'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'channel'>>;
6439
+ (ref: ConversationRef<'robot'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'robot'>>;
6301
6440
  };
6302
6441
  /** 当前账号草稿产品面;按复合身份持久化,handle.draft 委托同一状态源。 */
6303
6442
  drafts: ImDraftsApi;
@@ -6617,15 +6756,62 @@ type MessageNotificationDecision = {
6617
6756
  /** PC/H5 共用的实时消息提醒规则;离线历史回放不逐条弹通知。 */
6618
6757
  declare function resolveMessageNotificationDecision(input: MessageNotificationInput): MessageNotificationDecision;
6619
6758
 
6759
+ /**
6760
+ * 小程序游戏预览卡(消息 22 且 `showType=game-preview`)的呈现判定。
6761
+ *
6762
+ * 三端契约一致:BMessage proto 94 是一个远程页面地址,95/96 是它的作者尺寸。
6763
+ * 安卓用 WebView、iOS 用 WKWebView 顶层加载它,都不回退 `icon`。Web 宿主用 iframe 对应,
6764
+ * 但多了一个原生没有的问题——同一个字段偶尔指向的是图片资源,iframe 装图片会丢掉缩放控制。
6765
+ * 这个判定因此属于 Chat Kit 而不是某个宿主:两端要给出同一个答案,各写一份必然漂移。
6766
+ */
6767
+ /** proto 95/96 缺失时的源尺寸,与安卓 `bg_default_applet` 的 280×180 一致。 */
6768
+ declare const MINI_PROGRAM_GAME_PREVIEW_FALLBACK_WIDTH = 280;
6769
+ declare const MINI_PROGRAM_GAME_PREVIEW_FALLBACK_HEIGHT = 180;
6770
+ interface MiniProgramGamePreviewInput {
6771
+ gamePreviewUrl?: string;
6772
+ gamePreviewWidth?: number;
6773
+ gamePreviewHeight?: number;
6774
+ /** 宿主已经观察到 `<img>` 加载失败,说明该地址其实是文档,翻回 document。 */
6775
+ imageLoadFailed?: boolean;
6776
+ }
6777
+ interface MiniProgramGamePreviewLayout {
6778
+ /** 去空白后的 proto 94;为空串时 `render` 恒为 `empty`。 */
6779
+ url: string;
6780
+ /** 按源尺寸等比缩放用的作者宽高,永远是正数。 */
6781
+ sourceWidth: number;
6782
+ sourceHeight: number;
6783
+ /**
6784
+ * `document` 顶层加载远程页面(对应原生 WebView);`image` 地址明确是图片资源;
6785
+ * `empty` 无地址,画占位卡——占位本身是合法终态,不是待修复状态。
6786
+ */
6787
+ render: 'document' | 'image' | 'empty';
6788
+ }
6789
+ /**
6790
+ * 默认按 document 处理:线上真实地址形如 `…/p2p-share?lang=zh&banker_order_id=905`,
6791
+ * 既没有 `.html` 后缀也没有图片后缀,按后缀白名单猜 iframe 会把它错判成图片。
6792
+ */
6793
+ declare function resolveMiniProgramGamePreviewLayout(input: MiniProgramGamePreviewInput): MiniProgramGamePreviewLayout;
6794
+
6620
6795
  /**
6621
6796
  * 拼装频道 rel / 消息 22 打开小程序用的地址。
6622
6797
  * 有 host 时按大厅规则拼 suffix;只有 suffix 时只接受完整 URL 或带点的主机名,
6623
6798
  * 不能把 `/path` 当成域名。
6624
6799
  */
6800
+ /** `board-game` / `unknown` 不可点;默认卡、棋牌可点卡、游戏预览卡可以点开。 */
6801
+ declare function isMiniProgramShowTypeOpenable(showType: string): boolean;
6625
6802
  interface MiniProgramOpenUrlInput {
6626
6803
  domain?: string;
6627
6804
  suffixAddress?: string;
6628
6805
  h5Url?: string;
6806
+ /**
6807
+ * 正文字段 92 `miniProgramGamePath`,分享方写入的落地定位参数。
6808
+ *
6809
+ * 原样并进入口地址的 query,与 iOS `mergedSuffixAddressWithHost:suffixAddress:miniProgramGamePath:`
6810
+ * 同形:宿主据此得到的 `suffix_address` 才是 gameserver 认的载体(它从 suffix 里取
6811
+ * `game_params` 覆盖 `req.GameParams`)。值的编码由分享方负责,这里不再编解码,
6812
+ * 否则会多编或少编一层,`buildAppendUrlParams` 只解一次就会解坏。
6813
+ */
6814
+ gamePath?: string;
6629
6815
  }
6630
6816
  declare function resolveMiniProgramOpenUrl(input: MiniProgramOpenUrlInput): string;
6631
6817
  /** 悬浮外链:suffix 已是完整地址或主机名时直接用;只有路径时必须拼到 domain 上。 */
@@ -7029,7 +7215,7 @@ interface ChatRuntime {
7029
7215
  /** 撤销当前账号创建的全部媒体预览地址并释放 Blob 内存,切账号、退出或销毁时调用。 */
7030
7216
  cleanupLocalMediaBlobs: () => void;
7031
7217
  /** 删除会话时释放该会话绑定的本地媒体预览/播放缓存。 */
7032
- cleanupConversationMediaBlobs: (conversation: ConversationRef<'direct' | 'group' | 'channel'>) => void;
7218
+ cleanupConversationMediaBlobs: (conversation: ConversationRef<'direct' | 'group' | 'channel' | 'robot'>) => void;
7033
7219
  }
7034
7220
  /**
7035
7221
  * 创建一个可承载当前及后续登录账号的 IM 运行环境。
@@ -8914,5 +9100,5 @@ declare function resampleWaveform(data: readonly number[], targetCount: number):
8914
9100
  */
8915
9101
  declare function placeholderWaveform(seed: string, count: number): number[];
8916
9102
 
8917
- export { DEFAULT_EMOJI_ASSET_BASE, DEFAULT_LOADING_MINIMUM_VISIBLE_MS, DEFAULT_LOADING_SHOW_DELAY_MS, EMOJI_CATALOG, EMOJI_GAME_DICE_STABLE_KEY, EMOJI_GAME_RPS_STABLE_KEY, EMOJI_TOKEN_RE, MAX_BATCH_FILES, MAX_RECENT_EMOJI_COUNT, MINI_PROGRAM_LANG_NUMBERS, SPIKE_STEP, UNICODE_EMOJI_CATALOG, blockReasonForChannelSession, blockReasonForChannelState, blockReasonForGroupState, blockReasonForSession, calculateMediaBox, canEditMessage, canPinChannelMessage, canPinGroupMessage, canPinMessage, canPromoteMediaPresentationSource, canRecallMessage, canTransmit, canTransmitByType, canTransmitContent, cancelMediaUpload, captureRuntimeClientOperation, captureRuntimeOperation, channelMiniProgramRelKey, classifyGifFile, classifyMediaFile, countUnreadConversations, createChatRuntime, createConversationPrefetchController, createDelayedLoadingIndicator, createEmojiMatcher, createLinkMatcher, createNewMessageBadgeController, createThreadItems, csvIncludes, decideChannelMiniProgramRelOpen, decideConversationAction, decideMemberTargetAction, decideMessageAction, emojiAssetUrl, emojiUrlByCode, fetchConversationFileBatch, fetchConversationImageBatch, fetchConversationMessageBatch, fetchConversationVideoBatch, fetchConversationVoiceBatch, fetchNextConversationSearchBatch, formatChatDateSeparator, formatConversationDisplayTime, formatConversationUnreadBadge, formatFileSize, formatMediaDuration, forward_service as forwardService, getFileExtension, getLocalDayKey, hasEmojiCandidate, hasLinkCandidate, highlightSegments, isGifFile, isMessageLocateScrollProtected, isMessageTailChangeFromOlderWindowTrim, isMessageViewportMeasurable, isMessageVisibleForNewMessageBadge, isPinnedMessageProtected, isVoiceStorageConfigured, loadOlderUntilBoundary, mediaBatchBudgetBytes, media_service as mediaService, message_service as messageService, normalizeLinkHref, parseUnicodeEmojiCode, pinnedMessage_service as pinnedMessageService, placeholderWaveform, prependRecentEmoji, profile_service as profileService, read_service as readService, refreshPrependMessageAnchorPosition, replaceInterruptedMediaFile, requiresConversationEncryption, requiresForwardTypeConfirmation, resampleWaveform, resolveBestMediaPresentationSource, resolveCenteredMessageScrollTop, resolveChannelMemberAvatarUrl, resolveChannelMemberDisplayName, resolveChannelMiniProgramRelIcon, resolveChannelMiniProgramRelName, resolveChannelMiniProgramRelOpenSurface, resolveChannelMiniProgramRelUrl, resolveChannelPinnedGameCopy, resolveConversationListPresentation, resolveDisplayTimestamp, resolveEmojiToken, resolveFriendDisplayName, resolveImProfileAccessDestination, resolveImThreadActiveDate, resolveMediaPresentation, resolveMemberDisplayName, resolveMessageBodyKind, resolveMessageNotificationDecision, resolveMessageTimelineTimestamp, resolveMiniProgramFloatLinkUrl, resolveMiniProgramOpenUrl, resolvePrependMessageAnchor, resolvePrependMessageAnchorAdjustment, resolvePrependMessageAnchorPosition, resolvePublicNickname, resolveQuotedMessagePresentation, resolveSenderAvatarUrl, resolveStandaloneEmojiMessage, resolveSurvivingMessageAnchorAdjustment, resolveUnicodeEmoji, resolveVisibleChannelMiniProgramRels, resolveVisibleMessageAnchorPositions, retryMessage, runMediaSendBatch, sendAsFilesBatch, sendBlockReasonForDecision, sendMediaAlbum, sendMediaFile, sendMediaFilesBatch, sendText, sendVoice, shouldCompleteInitialViewport, shouldFillInitialHistoryViewport, shouldFollowIncomingMessage, shouldLoadNewerHistoryPage, shouldPrefetchOlderHistory, shouldRestoreMessageViewportFocus, shouldShowChatDateSeparator, shouldTrackRemoteMessageForBadge, sortChannelMiniProgramFloatingItems, spikeCountForDuration, supportsConversationMention, unicodeEmojiTextFromCode };
8918
- export type { ApplySessionResult, BrowseMessagesInput, CanPinMessageInput, CenteredMessageScrollInput, ChannelMiniProgramOpenGame, ChannelMiniProgramRelOpenDecision, ChannelMiniProgramRelOpenSurface, ChatMediaMessageRef, ChatProfileAdapter, ChatRuntime, ChatRuntimeCredentials, ChatRuntimeFactories, ChatRuntimeHostDeps, ChatRuntimeOpResult, ConversationCapabilityAction, ConversationListPresentation, ConversationListPresentationLabels, ConversationListPresentationOptions, ConversationListPreviewMediaKind, ConversationListPreviewSegment, ConversationPrefetchController, ConversationPrefetchControllerOptions, ConversationSearchCategory, CreateThreadItemsInput, DelayedLoadingIndicator, DelayedLoadingIndicatorOptions, EmojiEntry, EmojiRecentItem, EmojiSegment, FormatTimeDisplayContext, ForwardCommandHooks, GifFileClassification, HighlightSegment, ImChannelMemberPresentation, ImChannelMentionPresentation, ImChannelProfilePresentation, ImForwardOperationResult, ImGroupMemberPresentation, ImMediaBatchSendResult, ImMessageActionResult, ImMessageBodyKind, ImMessageView, ImPinnedMessageActionResult, ImPinnedMessageSnapshot, ImProfileAccessDestination, ImQuotedMessagePresentation, ImTextResolver, ImThreadActiveDateSnapshot, ImThreadDateMarkerMetric, ImThreadDecoration, ImThreadEncryptionItem, ImThreadIntent, ImThreadItem, ImThreadPresentationAdapter, ImThreadReadActions, ImThreadReadTargetResolver, ImThreadViewportMetrics, IncomingMessageFollowInput, InitialHistoryViewportFillInput, InitialViewportCompletionInput, LinkSegment, MediaBatchBudgetOptions, MediaBatchLimitInfo, MediaFileClassification, MediaLimitItem, MediaObjectUrlLease, MediaPresentationFit, MediaPresentationPolicy, MediaPresentationRule, MediaPresentationSourceCandidate, MediaPresentationSourceQuality, MediaSendBatchResult, MemberTargetCapabilityAction, MemberTargetCapabilityInput, MessageCapabilityAction, MessageCapabilityInput, MessageLocateScrollProtectionInput, MessageNotificationDecision, MessageNotificationInput, MiniProgramHostLocale, MiniProgramOpenUrlInput, NewMessageBadgeController, NewMessageBadgeCountListener, NewMessageBadgeVisibilityInput, NewerHistoryPageTriggerInput, OlderHistoryPrefetchInput, PrependAnchorCandidate, PrependAnchorViewport, PrependMessageAnchorPosition, RemoteMessageBadgeTrackingInput, ResolveMediaPresentationInput, ResolvedMediaPresentation, RichExtraSegment, RuntimeClientOperation, RuntimeOperation, SearchBatchResult, SearchFilesInput, SearchMessagesInput, SearchTextMessagesInput, SendCapabilityMode, SendCommandHooks, SendVoicePayload, SenderProfileEntry, ServiceNoteHooks, StandaloneEmojiMessage, UnicodeEmojiEntry, VisibleChannelMiniProgramRels };
9103
+ export { DEFAULT_EMOJI_ASSET_BASE, DEFAULT_LOADING_MINIMUM_VISIBLE_MS, DEFAULT_LOADING_SHOW_DELAY_MS, EMOJI_CATALOG, EMOJI_GAME_DICE_STABLE_KEY, EMOJI_GAME_RPS_STABLE_KEY, EMOJI_TOKEN_RE, MAX_BATCH_FILES, MAX_RECENT_EMOJI_COUNT, MINI_PROGRAM_GAME_PREVIEW_FALLBACK_HEIGHT, MINI_PROGRAM_GAME_PREVIEW_FALLBACK_WIDTH, MINI_PROGRAM_LANG_NUMBERS, SPIKE_STEP, UNICODE_EMOJI_CATALOG, blockReasonForChannelSession, blockReasonForChannelState, blockReasonForGroupState, blockReasonForSession, calculateMediaBox, canEditMessage, canPinChannelMessage, canPinGroupMessage, canPinMessage, canPromoteMediaPresentationSource, canRecallMessage, canTransmit, canTransmitByType, canTransmitContent, cancelMediaUpload, captureRuntimeClientOperation, captureRuntimeOperation, channelMiniProgramRelKey, classifyGifFile, classifyMediaFile, countUnreadConversations, createChatRuntime, createConversationPrefetchController, createDelayedLoadingIndicator, createEmojiMatcher, createLinkMatcher, createNewMessageBadgeController, createThreadItems, csvIncludes, decideChannelMiniProgramRelOpen, decideConversationAction, decideMemberTargetAction, decideMessageAction, emojiAssetUrl, emojiUrlByCode, fetchConversationFileBatch, fetchConversationImageBatch, fetchConversationMessageBatch, fetchConversationVideoBatch, fetchConversationVoiceBatch, fetchNextConversationSearchBatch, formatChatDateSeparator, formatConversationDisplayTime, formatConversationUnreadBadge, formatFileSize, formatMediaDuration, forward_service as forwardService, getFileExtension, getLocalDayKey, hasEmojiCandidate, hasLinkCandidate, highlightSegments, isGifFile, isMessageLocateScrollProtected, isMessageTailChangeFromOlderWindowTrim, isMessageViewportMeasurable, isMessageVisibleForNewMessageBadge, isMiniProgramShowTypeOpenable, isPinnedMessageProtected, isVoiceStorageConfigured, loadOlderUntilBoundary, mediaBatchBudgetBytes, media_service as mediaService, message_service as messageService, normalizeLinkHref, parseUnicodeEmojiCode, pinnedMessage_service as pinnedMessageService, placeholderWaveform, prependRecentEmoji, profile_service as profileService, read_service as readService, refreshPrependMessageAnchorPosition, replaceInterruptedMediaFile, requiresConversationEncryption, requiresForwardTypeConfirmation, resampleWaveform, resolveBestMediaPresentationSource, resolveCenteredMessageScrollTop, resolveChannelMemberAvatarUrl, resolveChannelMemberDisplayName, resolveChannelMiniProgramRelIcon, resolveChannelMiniProgramRelName, resolveChannelMiniProgramRelOpenSurface, resolveChannelMiniProgramRelUrl, resolveChannelPinnedGameCopy, resolveConversationListPresentation, resolveDisplayTimestamp, resolveEmojiToken, resolveFriendDisplayName, resolveImProfileAccessDestination, resolveImThreadActiveDate, resolveMediaPresentation, resolveMemberDisplayName, resolveMessageBodyKind, resolveMessageNotificationDecision, resolveMessageTimelineTimestamp, resolveMiniProgramFloatLinkUrl, resolveMiniProgramGamePreviewLayout, resolveMiniProgramOpenUrl, resolvePrependMessageAnchor, resolvePrependMessageAnchorAdjustment, resolvePrependMessageAnchorPosition, resolvePublicNickname, resolveQuotedMessagePresentation, resolveSenderAvatarUrl, resolveStandaloneEmojiMessage, resolveSurvivingMessageAnchorAdjustment, resolveUnicodeEmoji, resolveVisibleChannelMiniProgramRels, resolveVisibleMessageAnchorPositions, retryMessage, runMediaSendBatch, sendAsFilesBatch, sendBlockReasonForDecision, sendMediaAlbum, sendMediaFile, sendMediaFilesBatch, sendText, sendVoice, shouldCompleteInitialViewport, shouldFillInitialHistoryViewport, shouldFollowIncomingMessage, shouldLoadNewerHistoryPage, shouldPrefetchOlderHistory, shouldRestoreMessageViewportFocus, shouldShowChatDateSeparator, shouldTrackRemoteMessageForBadge, sortChannelMiniProgramFloatingItems, spikeCountForDuration, supportsConversationMention, unicodeEmojiTextFromCode };
9104
+ export type { ApplySessionResult, BrowseMessagesInput, CanPinMessageInput, CenteredMessageScrollInput, ChannelMiniProgramOpenGame, ChannelMiniProgramRelOpenDecision, ChannelMiniProgramRelOpenSurface, ChatMediaMessageRef, ChatProfileAdapter, ChatRuntime, ChatRuntimeCredentials, ChatRuntimeFactories, ChatRuntimeHostDeps, ChatRuntimeOpResult, ConversationCapabilityAction, ConversationListPresentation, ConversationListPresentationLabels, ConversationListPresentationOptions, ConversationListPreviewMediaKind, ConversationListPreviewSegment, ConversationPrefetchController, ConversationPrefetchControllerOptions, ConversationSearchCategory, CreateThreadItemsInput, DelayedLoadingIndicator, DelayedLoadingIndicatorOptions, EmojiEntry, EmojiRecentItem, EmojiSegment, FormatTimeDisplayContext, ForwardCommandHooks, GifFileClassification, HighlightSegment, ImChannelMemberPresentation, ImChannelMentionPresentation, ImChannelProfilePresentation, ImForwardOperationResult, ImGroupMemberPresentation, ImMediaBatchSendResult, ImMessageActionResult, ImMessageBodyKind, ImMessageView, ImPinnedMessageActionResult, ImPinnedMessageSnapshot, ImProfileAccessDestination, ImQuotedMessagePresentation, ImTextResolver, ImThreadActiveDateSnapshot, ImThreadDateMarkerMetric, ImThreadDecoration, ImThreadEncryptionItem, ImThreadIntent, ImThreadItem, ImThreadPresentationAdapter, ImThreadReadActions, ImThreadReadTargetResolver, ImThreadViewportMetrics, IncomingMessageFollowInput, InitialHistoryViewportFillInput, InitialViewportCompletionInput, LinkSegment, MediaBatchBudgetOptions, MediaBatchLimitInfo, MediaFileClassification, MediaLimitItem, MediaObjectUrlLease, MediaPresentationFit, MediaPresentationPolicy, MediaPresentationRule, MediaPresentationSourceCandidate, MediaPresentationSourceQuality, MediaSendBatchResult, MemberTargetCapabilityAction, MemberTargetCapabilityInput, MessageCapabilityAction, MessageCapabilityInput, MessageLocateScrollProtectionInput, MessageNotificationDecision, MessageNotificationInput, MiniProgramGamePreviewInput, MiniProgramGamePreviewLayout, MiniProgramHostLocale, MiniProgramOpenUrlInput, NewMessageBadgeController, NewMessageBadgeCountListener, NewMessageBadgeVisibilityInput, NewerHistoryPageTriggerInput, OlderHistoryPrefetchInput, PrependAnchorCandidate, PrependAnchorViewport, PrependMessageAnchorPosition, RemoteMessageBadgeTrackingInput, ResolveMediaPresentationInput, ResolvedMediaPresentation, RichExtraSegment, RuntimeClientOperation, RuntimeOperation, SearchBatchResult, SearchFilesInput, SearchMessagesInput, SearchTextMessagesInput, SendCapabilityMode, SendCommandHooks, SendVoicePayload, SenderProfileEntry, ServiceNoteHooks, StandaloneEmojiMessage, UnicodeEmojiEntry, VisibleChannelMiniProgramRels };
package/dist/chat-kit.js CHANGED
@@ -1 +1 @@
1
- export{p as DEFAULT_LOADING_MINIMUM_VISIBLE_MS,o as DEFAULT_LOADING_SHOW_DELAY_MS,d as MINI_PROGRAM_LANG_NUMBERS,I as SPIKE_STEP,E as calculateMediaBox,s as canPromoteMediaPresentationSource,v as captureRuntimeClientOperation,u as captureRuntimeOperation,m as channelMiniProgramRelKey,t as createConversationPrefetchController,q as createDelayedLoadingIndicator,C as createLinkMatcher,e as csvIncludes,c as decideChannelMiniProgramRelOpen,G as formatFileSize,F as formatMediaDuration,H as getFileExtension,B as hasLinkCandidate,z as highlightSegments,w as mediaService,A as normalizeLinkHref,L as placeholderWaveform,x as readService,K as resampleWaveform,r as resolveBestMediaPresentationSource,g as resolveChannelMiniProgramRelIcon,f as resolveChannelMiniProgramRelName,i as resolveChannelMiniProgramRelOpenSurface,h as resolveChannelMiniProgramRelUrl,j as resolveChannelPinnedGameCopy,n as resolveConversationListPresentation,D as resolveMediaPresentation,b as resolveMiniProgramFloatLinkUrl,a as resolveMiniProgramOpenUrl,y as resolveQuotedMessagePresentation,l as resolveVisibleChannelMiniProgramRels,k as sortChannelMiniProgramFloatingItems,J as spikeCountForDuration}from'./chunk-XA4W5PWT.js';export{j as DEFAULT_EMOJI_ASSET_BASE,i as EMOJI_CATALOG,c as EMOJI_GAME_DICE_STABLE_KEY,b as EMOJI_GAME_RPS_STABLE_KEY,m as EMOJI_TOKEN_RE,N as MAX_BATCH_FILES,a as MAX_RECENT_EMOJI_COUNT,g as UNICODE_EMOJI_CATALOG,M as blockReasonForChannelSession,L as blockReasonForChannelState,T as blockReasonForGroupState,W as blockReasonForSession,G as canEditMessage,w as canPinChannelMessage,v as canPinGroupMessage,x as canPinMessage,F as canRecallMessage,da as cancelMediaUpload,R as classifyGifFile,Q as classifyMediaFile,s as countUnreadConversations,u as createChatRuntime,p as createEmojiMatcher,I as decideConversationAction,K as decideMemberTargetAction,J as decideMessageAction,l as emojiAssetUrl,n as emojiUrlByCode,Da as fetchConversationFileBatch,Ea as fetchConversationImageBatch,Ba as fetchConversationMessageBatch,Fa as fetchConversationVideoBatch,Ga as fetchConversationVoiceBatch,Ha as fetchNextConversationSearchBatch,r as formatConversationUnreadBadge,ga as forwardService,o as hasEmojiCandidate,S as isGifFile,y as isPinnedMessageProtected,_ as isVoiceStorageConfigured,O as mediaBatchBudgetBytes,la as messageService,e as parseUnicodeEmojiCode,qa as pinnedMessageService,d as prependRecentEmoji,Aa as profileService,Z as replaceInterruptedMediaFile,U as requiresConversationEncryption,B as resolveChannelMemberAvatarUrl,A as resolveChannelMemberDisplayName,k as resolveEmojiToken,E as resolveFriendDisplayName,ra as resolveImProfileAccessDestination,z as resolveMemberDisplayName,t as resolveMessageNotificationDecision,D as resolvePublicNickname,C as resolveSenderAvatarUrl,q as resolveStandaloneEmojiMessage,h as resolveUnicodeEmoji,ea as retryMessage,P as runMediaSendBatch,ca as sendAsFilesBatch,H as sendBlockReasonForDecision,aa as sendMediaAlbum,Y as sendMediaFile,ba as sendMediaFilesBatch,X as sendText,$ as sendVoice,V as supportsConversationMention,f as unicodeEmojiTextFromCode}from'./chunk-VRGWQLDM.js';export{C as createNewMessageBadgeController,i as createThreadItems,f as formatChatDateSeparator,e as formatConversationDisplayTime,c as getLocalDayKey,l as isMessageLocateScrollProtected,v as isMessageTailChangeFromOlderWindowTrim,k as isMessageViewportMeasurable,B as isMessageVisibleForNewMessageBadge,x as loadOlderUntilBoundary,p as refreshPrependMessageAnchorPosition,j as resolveCenteredMessageScrollTop,a as resolveDisplayTimestamp,g as resolveImThreadActiveDate,h as resolveMessageBodyKind,b as resolveMessageTimelineTimestamp,n as resolvePrependMessageAnchor,q as resolvePrependMessageAnchorAdjustment,o as resolvePrependMessageAnchorPosition,s as resolveSurvivingMessageAnchorAdjustment,r as resolveVisibleMessageAnchorPositions,t as shouldCompleteInitialViewport,y as shouldFillInitialHistoryViewport,u as shouldFollowIncomingMessage,z as shouldLoadNewerHistoryPage,m as shouldPrefetchOlderHistory,w as shouldRestoreMessageViewportFocus,d as shouldShowChatDateSeparator,A as shouldTrackRemoteMessageForBadge}from'./chunk-SLFKCTEX.js';import'./chunk-37HOEWMF.js';import'./chunk-MNWNUGIV.js';import'./chunk-GHZUH7RB.js';export{ta as canTransmit,ra as canTransmitByType,sa as canTransmitContent,qa as requiresForwardTypeConfirmation}from'./chunk-4KPJTXQN.js';import'./chunk-WOT6VMZA.js';
1
+ export{q as DEFAULT_LOADING_MINIMUM_VISIBLE_MS,p as DEFAULT_LOADING_SHOW_DELAY_MS,v as MINI_PROGRAM_GAME_PREVIEW_FALLBACK_HEIGHT,u as MINI_PROGRAM_GAME_PREVIEW_FALLBACK_WIDTH,e as MINI_PROGRAM_LANG_NUMBERS,M as SPIKE_STEP,I as calculateMediaBox,t as canPromoteMediaPresentationSource,z as captureRuntimeClientOperation,y as captureRuntimeOperation,n as channelMiniProgramRelKey,x as createConversationPrefetchController,r as createDelayedLoadingIndicator,G as createLinkMatcher,f as csvIncludes,d as decideChannelMiniProgramRelOpen,K as formatFileSize,J as formatMediaDuration,L as getFileExtension,F as hasLinkCandidate,D as highlightSegments,a as isMiniProgramShowTypeOpenable,A as mediaService,E as normalizeLinkHref,P as placeholderWaveform,B as readService,O as resampleWaveform,s as resolveBestMediaPresentationSource,h as resolveChannelMiniProgramRelIcon,g as resolveChannelMiniProgramRelName,j as resolveChannelMiniProgramRelOpenSurface,i as resolveChannelMiniProgramRelUrl,k as resolveChannelPinnedGameCopy,o as resolveConversationListPresentation,H as resolveMediaPresentation,c as resolveMiniProgramFloatLinkUrl,w as resolveMiniProgramGamePreviewLayout,b as resolveMiniProgramOpenUrl,C as resolveQuotedMessagePresentation,m as resolveVisibleChannelMiniProgramRels,l as sortChannelMiniProgramFloatingItems,N as spikeCountForDuration}from'./chunk-JA5TKCQ2.js';export{j as DEFAULT_EMOJI_ASSET_BASE,i as EMOJI_CATALOG,c as EMOJI_GAME_DICE_STABLE_KEY,b as EMOJI_GAME_RPS_STABLE_KEY,m as EMOJI_TOKEN_RE,N as MAX_BATCH_FILES,a as MAX_RECENT_EMOJI_COUNT,g as UNICODE_EMOJI_CATALOG,M as blockReasonForChannelSession,L as blockReasonForChannelState,T as blockReasonForGroupState,W as blockReasonForSession,G as canEditMessage,w as canPinChannelMessage,v as canPinGroupMessage,x as canPinMessage,F as canRecallMessage,da as cancelMediaUpload,R as classifyGifFile,Q as classifyMediaFile,s as countUnreadConversations,u as createChatRuntime,p as createEmojiMatcher,I as decideConversationAction,K as decideMemberTargetAction,J as decideMessageAction,l as emojiAssetUrl,n as emojiUrlByCode,Da as fetchConversationFileBatch,Ea as fetchConversationImageBatch,Ba as fetchConversationMessageBatch,Fa as fetchConversationVideoBatch,Ga as fetchConversationVoiceBatch,Ha as fetchNextConversationSearchBatch,r as formatConversationUnreadBadge,ga as forwardService,o as hasEmojiCandidate,S as isGifFile,y as isPinnedMessageProtected,_ as isVoiceStorageConfigured,O as mediaBatchBudgetBytes,la as messageService,e as parseUnicodeEmojiCode,qa as pinnedMessageService,d as prependRecentEmoji,Aa as profileService,Z as replaceInterruptedMediaFile,U as requiresConversationEncryption,B as resolveChannelMemberAvatarUrl,A as resolveChannelMemberDisplayName,k as resolveEmojiToken,E as resolveFriendDisplayName,ra as resolveImProfileAccessDestination,z as resolveMemberDisplayName,t as resolveMessageNotificationDecision,D as resolvePublicNickname,C as resolveSenderAvatarUrl,q as resolveStandaloneEmojiMessage,h as resolveUnicodeEmoji,ea as retryMessage,P as runMediaSendBatch,ca as sendAsFilesBatch,H as sendBlockReasonForDecision,aa as sendMediaAlbum,Y as sendMediaFile,ba as sendMediaFilesBatch,X as sendText,$ as sendVoice,V as supportsConversationMention,f as unicodeEmojiTextFromCode}from'./chunk-HSVVRLGM.js';export{C as createNewMessageBadgeController,i as createThreadItems,f as formatChatDateSeparator,e as formatConversationDisplayTime,c as getLocalDayKey,l as isMessageLocateScrollProtected,v as isMessageTailChangeFromOlderWindowTrim,k as isMessageViewportMeasurable,B as isMessageVisibleForNewMessageBadge,x as loadOlderUntilBoundary,p as refreshPrependMessageAnchorPosition,j as resolveCenteredMessageScrollTop,a as resolveDisplayTimestamp,g as resolveImThreadActiveDate,h as resolveMessageBodyKind,b as resolveMessageTimelineTimestamp,n as resolvePrependMessageAnchor,q as resolvePrependMessageAnchorAdjustment,o as resolvePrependMessageAnchorPosition,s as resolveSurvivingMessageAnchorAdjustment,r as resolveVisibleMessageAnchorPositions,t as shouldCompleteInitialViewport,y as shouldFillInitialHistoryViewport,u as shouldFollowIncomingMessage,z as shouldLoadNewerHistoryPage,m as shouldPrefetchOlderHistory,w as shouldRestoreMessageViewportFocus,d as shouldShowChatDateSeparator,A as shouldTrackRemoteMessageForBadge}from'./chunk-OYH7COTJ.js';import'./chunk-SEHHXKP7.js';import'./chunk-MIFIQ45I.js';import'./chunk-GAAHNTJM.js';export{va as canTransmit,ta as canTransmitByType,ua as canTransmitContent,sa as requiresForwardTypeConfirmation}from'./chunk-QQ23QYWK.js';import'./chunk-WOT6VMZA.js';