k2-im 0.1.36 → 0.1.38
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 +1 -1
- package/dist/chat-kit-pinia.d.ts +157 -19
- package/dist/chat-kit-pinia.js +1 -1
- package/dist/chat-kit-vue.d.ts +123 -2
- package/dist/chat-kit-vue.js +1 -1
- package/dist/chat-kit.d.ts +162 -16
- package/dist/chat-kit.js +1 -1
- package/dist/chunk-3ST5E6YS.js +1 -0
- package/dist/chunk-4I23ADH2.js +2 -0
- package/dist/{chunk-4WMIGRG4.js → chunk-GHFHAGJ7.js} +1 -1
- package/dist/{chunk-SWQXHZDF.js → chunk-HWA7NOXG.js} +1 -1
- package/dist/chunk-ITOAFWZU.js +2 -0
- package/dist/chunk-LMP34HNC.js +2 -0
- package/dist/chunk-ZERTVCH2.js +7 -0
- package/dist/i18n.d.ts +3 -1
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +164 -17
- package/dist/index.js +1 -1
- package/dist/sdk.d.ts +96 -11
- package/dist/sdk.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4CH72T6I.js +0 -7
- package/dist/chunk-ANHUDX3C.js +0 -2
- package/dist/chunk-NB6MXFCH.js +0 -2
- package/dist/chunk-R3FWUQK4.js +0 -2
- package/dist/chunk-UKL2AULH.js +0 -1
package/dist/chat-kit.d.ts
CHANGED
|
@@ -199,6 +199,8 @@ interface ImVideoBody {
|
|
|
199
199
|
width: number;
|
|
200
200
|
/** 视频像素高(BMessage.height)。 */
|
|
201
201
|
height: number;
|
|
202
|
+
/** 发送方显式选择了 HD 原视频(BMessage.hd);不按分辨率猜测。 */
|
|
203
|
+
hd?: boolean;
|
|
202
204
|
/** 时长(秒,可含小数);移动端旧消息的毫秒值由 SDK 转换,宿主不得猜单位。 */
|
|
203
205
|
duration?: number;
|
|
204
206
|
/** SDK 已确认时长为秒的标记;兼容旧缓存时防止重复转换。缺省仍按公开 API 的秒约定传入。 */
|
|
@@ -708,7 +710,7 @@ interface MediaTaskUpdate {
|
|
|
708
710
|
* upload 任务子阶段。
|
|
709
711
|
*
|
|
710
712
|
* `waiting-upload-slot` 与 `state: 'queued'` 同时出现,表示还没开始传字节(在生成缩略图或在等上传槽位),
|
|
711
|
-
*
|
|
713
|
+
* 首发 percent 为 0,断点恢复时保留已有进度;`transferring` 正在传字节;`finalizing` 是等待远端 URL 最终确认。
|
|
712
714
|
*/
|
|
713
715
|
phase?: 'waiting-upload-slot' | 'waiting-retry' | 'transferring' | 'finalizing';
|
|
714
716
|
/** 当前发送意图的尝试序号与总上限。 */
|
|
@@ -717,6 +719,18 @@ interface MediaTaskUpdate {
|
|
|
717
719
|
/** 已传与总字节数,供共享展示层估算速度。 */
|
|
718
720
|
bytesTransferred?: number;
|
|
719
721
|
bytesTotal?: number;
|
|
722
|
+
/** 上传合集的逐项真实字节快照;整组发送仍由外层任务控制,不为每格创建独立发送。 */
|
|
723
|
+
items?: readonly Readonly<{
|
|
724
|
+
/** 从零开始的合集位置。 */
|
|
725
|
+
itemIndex: number;
|
|
726
|
+
/** 本项实际上传字节与源文件总字节。 */
|
|
727
|
+
bytesTransferred: number;
|
|
728
|
+
bytesTotal: number;
|
|
729
|
+
/** 远端资源确认完成前最多 99%。 */
|
|
730
|
+
percent: number;
|
|
731
|
+
/** 本项状态;已完成项不随兄弟项取消或失败回退。 */
|
|
732
|
+
state: 'queued' | 'running' | 'completed' | 'failed' | 'canceled';
|
|
733
|
+
}>[];
|
|
720
734
|
/** 跨刷新恢复可用性;缺省尚未建立恢复记录。 */
|
|
721
735
|
recovery?: 'available' | 'session-only';
|
|
722
736
|
recoveryReason?: string;
|
|
@@ -771,7 +785,7 @@ interface ImMessage {
|
|
|
771
785
|
};
|
|
772
786
|
/**
|
|
773
787
|
* CHANNEL 管理员/社群主全员删除终态。它与发送者本人撤回、`deleteLocal` 完全不同:服务端通过
|
|
774
|
-
* `RADIO_ADMIN_CANCEL_*`
|
|
788
|
+
* `RADIO_ADMIN_CANCEL_*` 同步给全员,正文不可逆清空;线程与会话摘要仅向群主、管理员展示删除提示,普通成员及未知角色隐藏。
|
|
775
789
|
*/
|
|
776
790
|
deletedForEveryone?: {
|
|
777
791
|
by: string;
|
|
@@ -953,6 +967,15 @@ interface ImSession {
|
|
|
953
967
|
* 派生展示字段(随最新消息变化,会话列表据此显示发送中 loading / 失败图标);运行期真相,不持久化(persistSession 落盘时剔除)。
|
|
954
968
|
*/
|
|
955
969
|
lastMessageSendState?: 'sending' | 'failed';
|
|
970
|
+
/**
|
|
971
|
+
* 最新一条己方已发送消息的回执态。
|
|
972
|
+
*
|
|
973
|
+
* 只在自己发出且 `status='sent'` 时投影;发送中/失败、对端消息、撤回、全员删除和系统提示都不给。
|
|
974
|
+
* `delivered` 与尚未回执一样投影为 `unread`;当前协议没有送达通知,不能把 `sent` 当作对端已收到。
|
|
975
|
+
* 该字段随最新消息变化,并随会话落盘,避免冷启动后
|
|
976
|
+
* 因「盘中缺字段 / 内存有字段」反复广播;对端已读变化必须刷新会话行。
|
|
977
|
+
*/
|
|
978
|
+
lastMessageReceipt?: 'unread' | 'read';
|
|
956
979
|
/** P0 我方已读游标(见 §4.3)。 */
|
|
957
980
|
readCursor?: string;
|
|
958
981
|
/** 群受限状态(仅 group;来自 0x2204 群通知 side-effect)。缺省视为 'active'(可正常发送)。 */
|
|
@@ -1054,8 +1077,8 @@ interface UserProfile {
|
|
|
1054
1077
|
/** 用户自设昵称(后端 `nick_name`)。 */
|
|
1055
1078
|
nickname: string;
|
|
1056
1079
|
/**
|
|
1057
|
-
*
|
|
1058
|
-
* 与 `nickname` 并存:展示名优先级 =
|
|
1080
|
+
* 好友展示备注(后端 `/user/info/friend` 的 `remark_name`,无备注时回退 `contact_name`,仅好友关系有)。
|
|
1081
|
+
* 与 `nickname` 并存:展示名优先级 = 备注名/通讯录名 > 昵称(安卓 SessionUtils.getShowUserName 实证)。
|
|
1059
1082
|
*/
|
|
1060
1083
|
remark?: string;
|
|
1061
1084
|
avatar?: string;
|
|
@@ -1846,6 +1869,8 @@ interface MediaAssetCacheStrategy {
|
|
|
1846
1869
|
softMaxBytes: number;
|
|
1847
1870
|
maxEntries: number;
|
|
1848
1871
|
maxEntryBytes: number;
|
|
1872
|
+
/** 完整媒体副本允许连续未访问的最长毫秒数;省略时不按时间过期,仍执行容量限制。 */
|
|
1873
|
+
maxIdleMs?: number;
|
|
1849
1874
|
}
|
|
1850
1875
|
/** 精确按 kind 解析策略;未注册返回 undefined,不提供默认策略。 */
|
|
1851
1876
|
interface MediaAssetCacheStrategyRegistry {
|
|
@@ -1859,8 +1884,12 @@ interface MediaAssetCacheStrategyRegistry {
|
|
|
1859
1884
|
*/
|
|
1860
1885
|
interface MediaAssetCachePort {
|
|
1861
1886
|
get: (key: MediaAssetCacheKey) => Promise<MediaAssetCacheEntry | null>;
|
|
1887
|
+
/** 按输入顺序检查完整资源是否存在且未过期;不读取 Blob、不延长闲置期限,存储故障必须抛出。 */
|
|
1888
|
+
hasMany?: (keys: readonly MediaAssetCacheKey[]) => Promise<readonly boolean[]>;
|
|
1862
1889
|
put: (entry: MediaAssetCacheEntry) => Promise<'stored' | 'skipped'>;
|
|
1863
1890
|
clear: () => Promise<void>;
|
|
1891
|
+
/** 删除超过闲置期限的完整持久副本;不撤销已经返回的 Blob 或宿主持有的播放地址。 */
|
|
1892
|
+
prune?: () => Promise<void>;
|
|
1864
1893
|
}
|
|
1865
1894
|
|
|
1866
1895
|
interface ImProfilePort {
|
|
@@ -2106,6 +2135,11 @@ type StoredConversationBackground = {
|
|
|
2106
2135
|
* 失败经 `error` 事件(scope:'storage')暴露、不静默吞、不阻塞内存主流程。
|
|
2107
2136
|
*/
|
|
2108
2137
|
interface ImStoragePort {
|
|
2138
|
+
/**
|
|
2139
|
+
* 显式支持 CHANNEL 持久同步位置。声明 true 的 adapter 必须在删除会话正文/清历史事务中
|
|
2140
|
+
* 同时删除 channelSyncCheckpointKey 对应 meta;旧 adapter 缺省不启用跨运行续传。
|
|
2141
|
+
*/
|
|
2142
|
+
readonly supportsChannelSyncCheckpoint?: true;
|
|
2109
2143
|
/** 可选的最近页持久缓存;缺少该能力时 SDK 必须明确跳过持久预取。 */
|
|
2110
2144
|
recentHistoryCache?: ImRecentHistoryCachePort;
|
|
2111
2145
|
/** 打开/创建账号库并跑迁移(幂等)。open 前的读写应视为未就绪并抛错(不静默兜底)。 */
|
|
@@ -2171,12 +2205,13 @@ interface ImStoragePort {
|
|
|
2171
2205
|
deleteSession: (conversation: ImStorageConversation) => Promise<void>;
|
|
2172
2206
|
/** 删除单会话已读态(删除会话用)。 */
|
|
2173
2207
|
deleteReadState: (conversation: ImStorageConversation) => Promise<void>;
|
|
2174
|
-
/**
|
|
2208
|
+
/** 删除某会话全部本地消息及对应 CHANNEL 同步位置,二者须在同一事务内清理。 */
|
|
2175
2209
|
deleteConversationMessages: (conversation: ImStorageConversation) => Promise<void>;
|
|
2176
2210
|
/**
|
|
2177
2211
|
* 原子清空精确会话的本机历史,并同步写入清空后的会话摘要与本机读态。
|
|
2178
2212
|
*
|
|
2179
2213
|
* @remarks 这是可选 capability,供产品 `history.clearLocal()` 使用;自定义 adapter 未实现时必须显式拒绝,不能退化为多次写入制造半清理状态。
|
|
2214
|
+
* 同一事务还须删除 channelSyncCheckpointKey(conversation) 对应同步位置,避免正文已清而继续跳过旧页。
|
|
2180
2215
|
* 不删除会话行、草稿、Outbox、置顶消息或任何远端数据。
|
|
2181
2216
|
*/
|
|
2182
2217
|
clearConversationHistory?: (conversation: ConversationRef, nextSession?: ImSession, nextReadState?: ReadState) => Promise<void>;
|
|
@@ -3047,8 +3082,8 @@ interface IndexedDbStorageAdapterOptions {
|
|
|
3047
3082
|
maxPendingWriteBytes?: number;
|
|
3048
3083
|
};
|
|
3049
3084
|
}
|
|
3050
|
-
/** 官方浏览器 adapter
|
|
3051
|
-
type IndexedDbStorageAdapter = ImStoragePort & MediaAssetCachePort & Required<Pick<ImStoragePort, 'getConversationBackground' | 'recentHistoryCache' | 'saveConversationBackground' | 'deleteConversationBackground' | 'getDefaultConversationBackground' | 'saveDefaultConversationBackground' | 'deleteDefaultConversationBackground'>>;
|
|
3085
|
+
/** 官方浏览器 adapter 始终提供背景、最近历史和媒体缓存维护;通用端口为其它实现保留可选能力。 */
|
|
3086
|
+
type IndexedDbStorageAdapter = ImStoragePort & MediaAssetCachePort & Required<Pick<MediaAssetCachePort, 'prune' | 'hasMany'>> & Required<Pick<ImStoragePort, 'getConversationBackground' | 'recentHistoryCache' | 'saveConversationBackground' | 'deleteConversationBackground' | 'getDefaultConversationBackground' | 'saveDefaultConversationBackground' | 'deleteDefaultConversationBackground'>>;
|
|
3052
3087
|
/**
|
|
3053
3088
|
* 创建 IndexedDB 存储 adapter(实现 ImStoragePort)。
|
|
3054
3089
|
* 生命周期:先 `open({ namespace })`(幂等,跑 schema 迁移),再读写;`close()` 释放句柄。
|
|
@@ -4438,6 +4473,13 @@ interface ConversationListItem {
|
|
|
4438
4473
|
by: string;
|
|
4439
4474
|
}>;
|
|
4440
4475
|
lastMessageSendState?: 'sending' | 'failed';
|
|
4476
|
+
/**
|
|
4477
|
+
* 最新一条己方已发送消息的对端已读态。
|
|
4478
|
+
*
|
|
4479
|
+
* 只在自己发出且已发送成功时出现;发送中/失败、对端消息、撤回和系统提示都不给。
|
|
4480
|
+
* 单聊会话列表用它在摘要前画灰色单勾/绿色双勾;群组与社群即使有该字段也不展示。
|
|
4481
|
+
*/
|
|
4482
|
+
lastMessageReceipt?: 'unread' | 'read';
|
|
4441
4483
|
timestamp: number;
|
|
4442
4484
|
unreadCount: number;
|
|
4443
4485
|
/** 是否为用户手工添加的本地未读提醒;此时 `unreadCount` 至少投影为 1。 */
|
|
@@ -4626,6 +4668,21 @@ type ConversationEntryUnreadSnapshot = Readonly<{
|
|
|
4626
4668
|
}> | Readonly<{
|
|
4627
4669
|
state: 'unavailable';
|
|
4628
4670
|
}>;
|
|
4671
|
+
/** 进入时冻结的导航提示;数量独立于会话已读,不暴露内部历史排序边界。 */
|
|
4672
|
+
type ConversationEntryUnreadNavigation = Readonly<{
|
|
4673
|
+
state: 'none';
|
|
4674
|
+
}> | Readonly<{
|
|
4675
|
+
state: 'pending' | 'unavailable';
|
|
4676
|
+
count: number;
|
|
4677
|
+
}> | Readonly<{
|
|
4678
|
+
state: 'located';
|
|
4679
|
+
count: number;
|
|
4680
|
+
firstMessageId: string;
|
|
4681
|
+
}> | Readonly<{
|
|
4682
|
+
state: 'failed';
|
|
4683
|
+
count: number;
|
|
4684
|
+
error: ImSdkErrorShape;
|
|
4685
|
+
}>;
|
|
4629
4686
|
|
|
4630
4687
|
/**
|
|
4631
4688
|
* Emoji、GIF 与贴图稳定产品门面。
|
|
@@ -4789,6 +4846,8 @@ interface ConversationOpenOptions {
|
|
|
4789
4846
|
* 后续 read 事件或新消息不会移动分隔线。
|
|
4790
4847
|
*/
|
|
4791
4848
|
initialPosition?: ConversationInitialPosition;
|
|
4849
|
+
/** 冻结进入时未读导航,独立于初始位置;清会话未读后仍可定位原边界。 */
|
|
4850
|
+
captureEntryUnread?: boolean;
|
|
4792
4851
|
/**
|
|
4793
4852
|
* 初始历史加载方式,默认 `blocking`。
|
|
4794
4853
|
*
|
|
@@ -4816,6 +4875,8 @@ interface ConversationHandleSnapshot<TType extends ProductHandleConversationType
|
|
|
4816
4875
|
messages: readonly ImMessageView[];
|
|
4817
4876
|
/** 本次打开时冻结的未读入口;只用于产品 UI 分隔线,不作为 SDK 已读真相。 */
|
|
4818
4877
|
entryUnread: ConversationEntryUnreadSnapshot;
|
|
4878
|
+
/** 显式请求的进入导航快照;旧消费者不请求时省略。 */
|
|
4879
|
+
entryUnreadNavigation?: ConversationEntryUnreadNavigation;
|
|
4819
4880
|
/** 当前账号本机草稿;不承诺跨端同步。 */
|
|
4820
4881
|
draft: ConversationDraft | null;
|
|
4821
4882
|
loading: boolean;
|
|
@@ -5116,15 +5177,17 @@ interface ConversationHandle<TType extends ProductHandleConversationType = Produ
|
|
|
5116
5177
|
resolveMessage: (messageId: string) => Promise<ImMessageView | null>;
|
|
5117
5178
|
history: {
|
|
5118
5179
|
loadLatest: () => Promise<void>;
|
|
5180
|
+
/** 有限加载进入时冻结边界;成功才替换窗口,不可定位返回 false,网络失败抛错并保留数量。 */
|
|
5181
|
+
loadEntryUnread: () => Promise<boolean>;
|
|
5119
5182
|
loadOlder: () => Promise<void>;
|
|
5120
5183
|
/** 历史定位窗口向更新方向连续翻页;接回最新端后 `hasNewer` 变为 false。 */
|
|
5121
5184
|
loadNewer: () => Promise<void>;
|
|
5122
5185
|
/**
|
|
5123
5186
|
* 按稳定消息 id 打开目标附近的连续历史窗口。
|
|
5124
5187
|
*
|
|
5125
|
-
* @remarks
|
|
5126
|
-
*
|
|
5127
|
-
* @throws
|
|
5188
|
+
* @remarks GROUP 完整置顶预览可按消息时间定位;CHANNEL 置顶未缓存时先按 ID 取回正式历史记录,
|
|
5189
|
+
* 以服务端游标继续双向分页。短期搜索结果只作为只读锚点;partial 置顶和过期搜索结果明确拒绝定位。
|
|
5190
|
+
* @throws 没有可用锚点、远端确认缺失或目标不属于当前复合会话时,抛出稳定 `IM_SDK_MESSAGE_NOT_FOUND`
|
|
5128
5191
|
* (`category: 'state'`、`retryable: false`、`details.messageId`)。这是常见产品结果而非链路异常,
|
|
5129
5192
|
* 调用方应据此与真正的存储/协议失败区分反馈,不要解析错误文案。
|
|
5130
5193
|
*/
|
|
@@ -5146,6 +5209,10 @@ interface ConversationHandle<TType extends ProductHandleConversationType = Produ
|
|
|
5146
5209
|
draft: ConversationDraftApi;
|
|
5147
5210
|
/** 标记窗口最新消息或显式可见消息为已读;SDK 按精确 sibling 解析真实 read cursor。 */
|
|
5148
5211
|
markRead: (messageId?: string) => Promise<void>;
|
|
5212
|
+
/** 结算最新可信边界的会话未读;不会将整个范围登记为对端可见回执。 */
|
|
5213
|
+
markConversationRead: () => Promise<void>;
|
|
5214
|
+
/** 只登记实际可见的消息 ID;历史消息也可补报,媒体消费继续使用独立动作。 */
|
|
5215
|
+
markVisibleMessages: (messageIds: readonly string[]) => Promise<void>;
|
|
5149
5216
|
setMuted: (muted: boolean) => Promise<void>;
|
|
5150
5217
|
close: () => void;
|
|
5151
5218
|
}
|
|
@@ -5256,6 +5323,8 @@ interface ImMediaTask {
|
|
|
5256
5323
|
* 上传任务不带下标:一条合集整体只有一条上传进度(所有项都传完才算这条消息发出去)。
|
|
5257
5324
|
*/
|
|
5258
5325
|
itemIndex?: number;
|
|
5326
|
+
/** 合集各项的真实上传快照;控制动作仍作用于整条消息,不包含资源或传输凭据。 */
|
|
5327
|
+
items?: MediaTaskUpdate['items'];
|
|
5259
5328
|
/** upload 来自发送链路,download 来自本产品 API。 */
|
|
5260
5329
|
direction: 'upload' | 'download';
|
|
5261
5330
|
/** 终态 completed/failed/canceled 不会被同一尝试的迟到 progress 回退。 */
|
|
@@ -5301,6 +5370,20 @@ interface ImMediaTask {
|
|
|
5301
5370
|
* ```
|
|
5302
5371
|
*/
|
|
5303
5372
|
interface ImMediaTasksApi {
|
|
5373
|
+
/** 清除当前账号完整媒体缓存及下载断点;保留消息、草稿、上传源和已交付的播放资源,在途下载仍可完成。 */
|
|
5374
|
+
clearCache: () => Promise<void>;
|
|
5375
|
+
/**
|
|
5376
|
+
* 按输入顺序查询完整本机媒体是否可用;不下载、不读取 Blob、不续缓存期限或创建任务。
|
|
5377
|
+
* 仅支持图片/视频(含媒体合集);未配置持久缓存时只检查内存。
|
|
5378
|
+
* @throws 不支持轻量查询或存储读取失败时明确拒绝,不伪装成未命中。
|
|
5379
|
+
* @example const [available] = await client.media.probeCached([messageRef])
|
|
5380
|
+
*/
|
|
5381
|
+
probeCached: (messages: readonly ImMessageRef[]) => Promise<readonly boolean[]>;
|
|
5382
|
+
/**
|
|
5383
|
+
* 缓存写入、清理或过期后通知消费者重新查询;账号销毁后自动退订。
|
|
5384
|
+
* @example const stop = client.media.subscribeCacheChanges(() => refreshVisibleMedia())
|
|
5385
|
+
*/
|
|
5386
|
+
subscribeCacheChanges: (listener: () => void) => () => void;
|
|
5304
5387
|
/**
|
|
5305
5388
|
* 返回当前账号全部活跃任务与近期终态任务的冻结快照;总量超过 128 时只淘汰终态,极端并发活跃可暂时超过上限。
|
|
5306
5389
|
* @throws runtime 已 logout/dispose 时抛 `IM_SDK_MEDIA_RUNTIME_INACTIVE`。
|
|
@@ -5315,7 +5398,10 @@ interface ImMediaTasksApi {
|
|
|
5315
5398
|
* 取消 queued/running 任务;上传委托 core,下载中止当前 AbortController。
|
|
5316
5399
|
* @throws 未知任务、非法状态或底层未受理时以稳定 `IM_SDK_MEDIA_TASK_*` 错误拒绝。
|
|
5317
5400
|
*/
|
|
5318
|
-
cancel: (taskId: string
|
|
5401
|
+
cancel: (taskId: string, options?: {
|
|
5402
|
+
/** 取消发送但保留已确认上传分片与原文件,只有用户显式重试才继续。默认取消仍清理。 */
|
|
5403
|
+
retainCheckpoint?: boolean;
|
|
5404
|
+
}) => Promise<void>;
|
|
5319
5405
|
/** 暂停上传,等待请求收尾后返回;下载不支持暂停。 */
|
|
5320
5406
|
pause: (taskId: string) => Promise<void>;
|
|
5321
5407
|
/** 恢复已暂停上传,复用同一原文件与消息。 */
|
|
@@ -5333,19 +5419,28 @@ interface ImMediaTasksApi {
|
|
|
5333
5419
|
/**
|
|
5334
5420
|
* 重试 failed/canceled 任务;上传复用保留原文件,下载重新解析同一精确消息引用。
|
|
5335
5421
|
* 续传不可用或清理未确认时,必须先征得用户同意重新上传,再传 restartUpload:true。
|
|
5336
|
-
*
|
|
5422
|
+
* 保留式取消后的重发复用已确认分片和原密钥;默认清理式取消不保证保有原文件。
|
|
5337
5423
|
* 下载取消已受理后即可创建新尝试,不复用旧取消 Promise;旧 loader 结束前仍占用并发槽,但不能覆盖新任务。
|
|
5338
5424
|
* @throws 原文件已淘汰、任务仍在途或消息/下载 capability 不可用时显式拒绝。
|
|
5339
5425
|
*/
|
|
5340
5426
|
retry: (taskId: string, options?: {
|
|
5341
5427
|
/** 用户已确认放弃旧进度并重新上传;仅上传任务接受,清理失败时仍停止。 */
|
|
5342
5428
|
restartUpload?: boolean;
|
|
5429
|
+
/** 下载断点已失效或超出缓存预算时,用户确认从头下载。 */
|
|
5430
|
+
restartDownload?: boolean;
|
|
5343
5431
|
}) => Promise<void>;
|
|
5344
5432
|
/**
|
|
5345
5433
|
* 下载并按消息正文合同解密,同一消息并发调用复用同一 Promise,成功返回 Blob。
|
|
5346
5434
|
* @throws 消息不存在/非媒体/无远端 URL/未装配 capability、传输失败、取消或 teardown 均以稳定错误拒绝,不返回空 Blob。
|
|
5347
5435
|
*/
|
|
5348
5436
|
download: (message: ImMessageRef) => Promise<Blob>;
|
|
5437
|
+
/**
|
|
5438
|
+
* 将最近预览的精确媒体项设为最高下载优先级,不新建或取消任务。
|
|
5439
|
+
* 下一空闲任务/分片请求名额优先给该项;已发请求不中断,关闭播放器不撤销优先级。
|
|
5440
|
+
* 后续调用替换上一个目标;账号退出后不可调用。
|
|
5441
|
+
* @example client.media.prioritizeDownload({ conversation, messageId, itemIndex: 1 })
|
|
5442
|
+
*/
|
|
5443
|
+
prioritizeDownload: (message: ImMessageRef) => void;
|
|
5349
5444
|
/**
|
|
5350
5445
|
* 仅读取当前账号内存或持久媒体资产缓存;命中返回 Blob,未缓存或类型未注册返回 `null`。
|
|
5351
5446
|
*
|
|
@@ -6143,6 +6238,7 @@ interface ImClientOptions {
|
|
|
6143
6238
|
/** 显式开启视频/文件跨刷新续传。最多 3 条、24 小时,保存加密密钥但不保存文件副本;注销清除。 */
|
|
6144
6239
|
uploadRecovery?: {
|
|
6145
6240
|
enabled: boolean;
|
|
6241
|
+
retainFailedUploads?: boolean;
|
|
6146
6242
|
};
|
|
6147
6243
|
}
|
|
6148
6244
|
/**
|
|
@@ -6733,6 +6829,13 @@ interface ConversationListPresentation {
|
|
|
6733
6829
|
* 名片等没有产品 glyph 的类型同样不给,它们的文案自带方括号来和真实文本区分。
|
|
6734
6830
|
*/
|
|
6735
6831
|
previewMediaKind?: ConversationListPreviewMediaKind;
|
|
6832
|
+
/**
|
|
6833
|
+
* 单聊自己发出的已发送消息在摘要前显示的回执态;未读(尚无已读回执)灰单勾、已读绿双勾。
|
|
6834
|
+
*
|
|
6835
|
+
* 群组/社群、对端消息、草稿、发送中/失败、撤回、系统提示都不给。可与 `previewMediaKind` 同时存在,
|
|
6836
|
+
* 宿主必须把已读图标画在类型图标前面。
|
|
6837
|
+
*/
|
|
6838
|
+
previewReceipt?: 'unread' | 'read';
|
|
6736
6839
|
/** 群聊或社群普通消息的发送者前缀;其它摘要为空串。 */
|
|
6737
6840
|
senderPrefix: string;
|
|
6738
6841
|
/** 未读 @ 提示;草稿、系统、撤回和管理员删除摘要为空串。 */
|
|
@@ -7024,6 +7127,7 @@ interface ChatRuntimeHostDeps {
|
|
|
7024
7127
|
/** 显式启用账号隔离的跨刷新恢复记录;保存密钥、不保存原文件,注销清除。 */
|
|
7025
7128
|
uploadRecovery?: {
|
|
7026
7129
|
enabled: boolean;
|
|
7130
|
+
retainFailedUploads?: boolean;
|
|
7027
7131
|
};
|
|
7028
7132
|
/** 获取 GIF provider 配置;API key 只留在宿主闭包与 SDK adapter,不进入共享 Store。 */
|
|
7029
7133
|
getExpressionOptions?: () => ImExpressionOptions | undefined;
|
|
@@ -7301,7 +7405,11 @@ interface ChatRuntime {
|
|
|
7301
7405
|
resolveMediaPreviewToRemote: (ref: ChatMediaMessageRef, contentType: 'image' | 'video' | 'sticker', byteSize?: number) => void;
|
|
7302
7406
|
/** 为指定消息取得本地媒体播放租约;没有本地缓存时返回 `undefined`,调用方应改用远端资源。 */
|
|
7303
7407
|
acquireMediaBlob: (ref: ChatMediaMessageRef) => MediaObjectUrlLease | undefined;
|
|
7408
|
+
/** 只读检查完整本地媒体是否可用,不取得租约、不改变缓存淘汰顺序。 */
|
|
7409
|
+
hasMediaBlob: (ref: ChatMediaMessageRef) => boolean;
|
|
7304
7410
|
/** 撤销当前账号创建的全部媒体预览地址并释放 Blob 内存,切账号、退出或销毁时调用。 */
|
|
7411
|
+
/** 清理当前账号完整媒体缓存和下载断点;上传源保留,正在使用的播放地址在释放后才撤销。 */
|
|
7412
|
+
clearMediaCache: () => Promise<void>;
|
|
7305
7413
|
cleanupLocalMediaBlobs: () => void;
|
|
7306
7414
|
/** 删除会话时释放该会话绑定的本地媒体预览/播放缓存。 */
|
|
7307
7415
|
cleanupConversationMediaBlobs: (conversation: ConversationRef<'direct' | 'group' | 'channel' | 'robot'>) => void;
|
|
@@ -7683,6 +7791,12 @@ type GifFileClassification = 'gif' | 'not-gif' | 'invalid-gif';
|
|
|
7683
7791
|
declare function classifyGifFile(file: Blob): Promise<GifFileClassification>;
|
|
7684
7792
|
declare function isGifFile(file: Blob): Promise<boolean>;
|
|
7685
7793
|
|
|
7794
|
+
/**
|
|
7795
|
+
* 将用户最后预览的媒体项交给 SDK 提高下载优先级,不创建任务或持有页面资源。
|
|
7796
|
+
* 在异步查缓存、加载 URL 之前调用,重复打开已有下载也会更新优先级。
|
|
7797
|
+
* @example mediaService.prioritizeMediaDownload(runtime, message, 1)
|
|
7798
|
+
*/
|
|
7799
|
+
declare function prioritizeMediaDownload(runtime: ChatRuntime, message: ImMessageView, itemIndex?: number): void;
|
|
7686
7800
|
/**
|
|
7687
7801
|
* 为宿主手里的本地图片/视频文件预读展示元信息(尺寸、视频时长、视频首帧封面 JPEG 字节)。
|
|
7688
7802
|
*
|
|
@@ -7746,7 +7860,7 @@ declare function loadCachedVideoObjectUrl(runtime: ChatRuntime, message: ImMessa
|
|
|
7746
7860
|
* 同一条门槛),不把无效二进制交给 `<img>`。
|
|
7747
7861
|
*
|
|
7748
7862
|
* 返回 `null` 表示下标越界、正文不是合集、内容非法或下载失败,失败原因经 `setNote` 反馈。
|
|
7749
|
-
*
|
|
7863
|
+
* **唯一不反馈的失败是用户自己取消**(点击停止按钮取消这一项的在途下载):同样返回 `null`,但不提示。
|
|
7750
7864
|
* **调用方在不再使用地址时必须 `URL.revokeObjectURL`。**
|
|
7751
7865
|
*/
|
|
7752
7866
|
declare function loadMediaAlbumItemObjectUrl(runtime: ChatRuntime, message: ImMessageView, itemIndex: number, hooks: ServiceNoteHooks, onProgress?: (percent: number) => void): Promise<string | null>;
|
|
@@ -7791,6 +7905,7 @@ declare const media_service_loadMediaAlbumItemObjectUrl: typeof loadMediaAlbumIt
|
|
|
7791
7905
|
declare const media_service_loadVideoObjectUrl: typeof loadVideoObjectUrl;
|
|
7792
7906
|
declare const media_service_loadVoiceBytes: typeof loadVoiceBytes;
|
|
7793
7907
|
declare const media_service_prepareLocalMediaPreview: typeof prepareLocalMediaPreview;
|
|
7908
|
+
declare const media_service_prioritizeMediaDownload: typeof prioritizeMediaDownload;
|
|
7794
7909
|
declare namespace media_service {
|
|
7795
7910
|
export {
|
|
7796
7911
|
media_service_acquireMediaBlob as acquireMediaBlob,
|
|
@@ -7805,6 +7920,7 @@ declare namespace media_service {
|
|
|
7805
7920
|
media_service_loadVideoObjectUrl as loadVideoObjectUrl,
|
|
7806
7921
|
media_service_loadVoiceBytes as loadVoiceBytes,
|
|
7807
7922
|
media_service_prepareLocalMediaPreview as prepareLocalMediaPreview,
|
|
7923
|
+
media_service_prioritizeMediaDownload as prioritizeMediaDownload,
|
|
7808
7924
|
};
|
|
7809
7925
|
}
|
|
7810
7926
|
|
|
@@ -8447,7 +8563,7 @@ declare function cancelMediaUpload(runtime: ChatRuntime, messageId: string, hook
|
|
|
8447
8563
|
/**
|
|
8448
8564
|
* 重试当前线程中的一条失败消息。
|
|
8449
8565
|
*
|
|
8450
|
-
*
|
|
8566
|
+
* 上传失败及保留式取消时尝试续传;restartUpload 只接受宿主明确确认后的完整重传。
|
|
8451
8567
|
* 已经完成媒体上传但消息发送失败,或普通文本失败时,重试
|
|
8452
8568
|
* SDK 待发送队列。两种路径都复用原消息 ID,不新增气泡。只有账号未变化且 SDK 接受重试时返回 `true`。
|
|
8453
8569
|
*/
|
|
@@ -8557,6 +8673,10 @@ type ImThreadIntent = Readonly<{
|
|
|
8557
8673
|
kind: 'load-newer';
|
|
8558
8674
|
}> | Readonly<{
|
|
8559
8675
|
kind: 'jump-to-latest';
|
|
8676
|
+
}> | Readonly<{
|
|
8677
|
+
kind: 'jump-to-entry-unread';
|
|
8678
|
+
}> | Readonly<{
|
|
8679
|
+
kind: 'mark-conversation-read';
|
|
8560
8680
|
}> | Readonly<{
|
|
8561
8681
|
kind: 'locate-message';
|
|
8562
8682
|
messageId: string;
|
|
@@ -9121,6 +9241,32 @@ declare function formatFileSize(bytes: number): string;
|
|
|
9121
9241
|
*/
|
|
9122
9242
|
declare function getFileExtension(fileName: string): string;
|
|
9123
9243
|
|
|
9244
|
+
/** 列表和预览共用的传输展示;不持有任务、网络请求或页面资源。 */
|
|
9245
|
+
interface MediaTransferPresentation {
|
|
9246
|
+
/** 取消上传作用于整条消息,取消下载只作用于当前项。 */
|
|
9247
|
+
direction: 'upload' | 'download';
|
|
9248
|
+
/** completed 只保留视频时长,其余状态由宿主渲染同一胶囊。 */
|
|
9249
|
+
state: 'waiting' | 'running' | 'paused' | 'failed' | 'completed';
|
|
9250
|
+
/** 真实字节可计算时才提供百分比,缺少大小时不能用等权平均替代。 */
|
|
9251
|
+
percent?: number;
|
|
9252
|
+
/** 当前正在核对完整缓存;宿主暂不把 waiting 显示为确定的下载入口。 */
|
|
9253
|
+
resolving?: boolean;
|
|
9254
|
+
}
|
|
9255
|
+
/** 从 SDK 快照投影某一媒体格,折叠格按固定范围内全部项的字节数加权。 */
|
|
9256
|
+
declare function resolveMediaTransferPresentation(input: {
|
|
9257
|
+
message: ImMessageView;
|
|
9258
|
+
uploadTask?: ImMediaTask;
|
|
9259
|
+
downloadTasks: readonly ImMediaTask[];
|
|
9260
|
+
itemIndex?: number;
|
|
9261
|
+
aggregateFrom?: number;
|
|
9262
|
+
/** 宿主确实持有的完整本地资源;单条媒体以 undefined 表示,缩略图不属于完整资源。 */
|
|
9263
|
+
availableItemIndices?: readonly (number | undefined)[];
|
|
9264
|
+
/** SDK 明确查到完整缓存已不存在;历史 completed 任务不能替代当前资源证据。 */
|
|
9265
|
+
unavailableItemIndices?: readonly (number | undefined)[];
|
|
9266
|
+
/** 当前窗口正在查询的媒体项,不表示未下载。 */
|
|
9267
|
+
pendingItemIndices?: readonly (number | undefined)[];
|
|
9268
|
+
}): MediaTransferPresentation;
|
|
9269
|
+
|
|
9124
9270
|
/**
|
|
9125
9271
|
* 消息正文中由 Chat Kit 额外识别的可渲染片段类型。
|
|
9126
9272
|
*
|
|
@@ -9222,5 +9368,5 @@ declare function resampleWaveform(data: readonly number[], targetCount: number):
|
|
|
9222
9368
|
*/
|
|
9223
9369
|
declare function placeholderWaveform(seed: string, count: number): number[];
|
|
9224
9370
|
|
|
9225
|
-
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, canCopyMessageImage, canEditMessage, canPinChannelMessage, canPinGroupMessage, canPinMessage, canPromoteMediaPresentationSource, canRecallMessage, canTransmit, canTransmitByType, canTransmitContent, cancelMediaUpload, captureRuntimeClientOperation, captureRuntimeOperation, channelMiniProgramRelKey, classifyGifFile, classifyMediaFile, countUnreadConversations, createChatRuntime, createConversationPrefetchController, createDelayedLoadingIndicator, createEmojiMatcher, createLinkMatcher, createMessageImageCopySource, 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, getMessageCopyImageUrl, getMessageCopyText, 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 };
|
|
9226
|
-
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 };
|
|
9371
|
+
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, canCopyMessageImage, canEditMessage, canPinChannelMessage, canPinGroupMessage, canPinMessage, canPromoteMediaPresentationSource, canRecallMessage, canTransmit, canTransmitByType, canTransmitContent, cancelMediaUpload, captureRuntimeClientOperation, captureRuntimeOperation, channelMiniProgramRelKey, classifyGifFile, classifyMediaFile, countUnreadConversations, createChatRuntime, createConversationPrefetchController, createDelayedLoadingIndicator, createEmojiMatcher, createLinkMatcher, createMessageImageCopySource, 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, getMessageCopyImageUrl, getMessageCopyText, 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, resolveMediaTransferPresentation, 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 };
|
|
9372
|
+
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, MediaTransferPresentation, 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{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,
|
|
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,R as SPIKE_STEP,M as calculateMediaBox,C as canCopyMessageImage,t as canPromoteMediaPresentationSource,z as captureRuntimeClientOperation,y as captureRuntimeOperation,n as channelMiniProgramRelKey,x as createConversationPrefetchController,r as createDelayedLoadingIndicator,K as createLinkMatcher,D as createMessageImageCopySource,f as csvIncludes,d as decideChannelMiniProgramRelOpen,O as formatFileSize,N as formatMediaDuration,P as getFileExtension,B as getMessageCopyImageUrl,A as getMessageCopyText,J as hasLinkCandidate,H as highlightSegments,a as isMiniProgramShowTypeOpenable,E as mediaService,I as normalizeLinkHref,U as placeholderWaveform,F as readService,T as resampleWaveform,s as resolveBestMediaPresentationSource,h as resolveChannelMiniProgramRelIcon,g as resolveChannelMiniProgramRelName,j as resolveChannelMiniProgramRelOpenSurface,i as resolveChannelMiniProgramRelUrl,k as resolveChannelPinnedGameCopy,o as resolveConversationListPresentation,L as resolveMediaPresentation,Q as resolveMediaTransferPresentation,c as resolveMiniProgramFloatLinkUrl,w as resolveMiniProgramGamePreviewLayout,b as resolveMiniProgramOpenUrl,G as resolveQuotedMessagePresentation,m as resolveVisibleChannelMiniProgramRels,l as sortChannelMiniProgramFloatingItems,S as spikeCountForDuration}from'./chunk-ITOAFWZU.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-3ST5E6YS.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-HWA7NOXG.js';import'./chunk-GHFHAGJ7.js';import'./chunk-LMP34HNC.js';import'./chunk-ZERTVCH2.js';export{va as canTransmit,ta as canTransmitByType,ua as canTransmitContent,sa as requiresForwardTypeConfirmation}from'./chunk-4I23ADH2.js';import'./chunk-WOT6VMZA.js';
|