k2-im 0.1.37 → 0.1.39
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 +225 -96
- package/dist/chat-kit-pinia.js +1 -1
- package/dist/chat-kit-vue.d.ts +4 -2
- package/dist/chat-kit-vue.js +1 -1
- package/dist/chat-kit.d.ts +296 -152
- package/dist/chat-kit.js +1 -1
- package/dist/chunk-2EB5ZELD.js +1 -0
- package/dist/chunk-54HSPG2Z.js +2 -0
- package/dist/chunk-5KHSKIN3.js +2 -0
- package/dist/{chunk-32UUIS7N.js → chunk-A5WA7S7J.js} +1 -1
- package/dist/{chunk-NWBEXP2C.js → chunk-I7RLO6MT.js} +1 -1
- package/dist/chunk-SRMSBFOP.js +7 -0
- package/dist/chunk-WISC6Q2S.js +2 -0
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +283 -153
- package/dist/index.js +1 -1
- package/dist/sdk.d.ts +76 -10
- package/dist/sdk.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-75GNCLQQ.js +0 -2
- package/dist/chunk-CLO7E7BU.js +0 -1
- package/dist/chunk-HUSCO5JM.js +0 -7
- package/dist/chunk-MSYNU72L.js +0 -2
- package/dist/chunk-QT3PJWLT.js +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -718,7 +718,7 @@ interface MediaTaskUpdate {
|
|
|
718
718
|
* upload 任务子阶段。
|
|
719
719
|
*
|
|
720
720
|
* `waiting-upload-slot` 与 `state: 'queued'` 同时出现,表示还没开始传字节(在生成缩略图或在等上传槽位),
|
|
721
|
-
*
|
|
721
|
+
* 首发 percent 为 0,断点恢复时保留已有进度;`transferring` 正在传字节;`finalizing` 是等待远端 URL 最终确认。
|
|
722
722
|
*/
|
|
723
723
|
phase?: 'waiting-upload-slot' | 'waiting-retry' | 'transferring' | 'finalizing';
|
|
724
724
|
/** 当前发送意图的尝试序号与总上限。 */
|
|
@@ -727,6 +727,18 @@ interface MediaTaskUpdate {
|
|
|
727
727
|
/** 已传与总字节数,供共享展示层估算速度。 */
|
|
728
728
|
bytesTransferred?: number;
|
|
729
729
|
bytesTotal?: number;
|
|
730
|
+
/** 上传合集的逐项真实字节快照;整组发送仍由外层任务控制,不为每格创建独立发送。 */
|
|
731
|
+
items?: readonly Readonly<{
|
|
732
|
+
/** 从零开始的合集位置。 */
|
|
733
|
+
itemIndex: number;
|
|
734
|
+
/** 本项实际上传字节与源文件总字节。 */
|
|
735
|
+
bytesTransferred: number;
|
|
736
|
+
bytesTotal: number;
|
|
737
|
+
/** 远端资源确认完成前最多 99%。 */
|
|
738
|
+
percent: number;
|
|
739
|
+
/** 本项状态;已完成项不随兄弟项取消或失败回退。 */
|
|
740
|
+
state: 'queued' | 'running' | 'completed' | 'failed' | 'canceled';
|
|
741
|
+
}>[];
|
|
730
742
|
/** 跨刷新恢复可用性;缺省尚未建立恢复记录。 */
|
|
731
743
|
recovery?: 'available' | 'session-only';
|
|
732
744
|
recoveryReason?: string;
|
|
@@ -1898,6 +1910,8 @@ interface MediaAssetCacheStrategy {
|
|
|
1898
1910
|
softMaxBytes: number;
|
|
1899
1911
|
maxEntries: number;
|
|
1900
1912
|
maxEntryBytes: number;
|
|
1913
|
+
/** 完整媒体副本允许连续未访问的最长毫秒数;省略时不按时间过期,仍执行容量限制。 */
|
|
1914
|
+
maxIdleMs?: number;
|
|
1901
1915
|
}
|
|
1902
1916
|
/** 精确按 kind 解析策略;未注册返回 undefined,不提供默认策略。 */
|
|
1903
1917
|
interface MediaAssetCacheStrategyRegistry {
|
|
@@ -1911,8 +1925,12 @@ interface MediaAssetCacheStrategyRegistry {
|
|
|
1911
1925
|
*/
|
|
1912
1926
|
interface MediaAssetCachePort {
|
|
1913
1927
|
get: (key: MediaAssetCacheKey) => Promise<MediaAssetCacheEntry | null>;
|
|
1928
|
+
/** 按输入顺序检查完整资源是否存在且未过期;不读取 Blob、不延长闲置期限,存储故障必须抛出。 */
|
|
1929
|
+
hasMany?: (keys: readonly MediaAssetCacheKey[]) => Promise<readonly boolean[]>;
|
|
1914
1930
|
put: (entry: MediaAssetCacheEntry) => Promise<'stored' | 'skipped'>;
|
|
1915
1931
|
clear: () => Promise<void>;
|
|
1932
|
+
/** 删除超过闲置期限的完整持久副本;不撤销已经返回的 Blob 或宿主持有的播放地址。 */
|
|
1933
|
+
prune?: () => Promise<void>;
|
|
1916
1934
|
}
|
|
1917
1935
|
|
|
1918
1936
|
interface ImProfilePort {
|
|
@@ -2457,6 +2475,11 @@ type ImEvent = {
|
|
|
2457
2475
|
| {
|
|
2458
2476
|
type: 'receiving:changed';
|
|
2459
2477
|
receiving: boolean;
|
|
2478
|
+
}
|
|
2479
|
+
/** 全局会话与离线消息同步;不包含当前会话的打开或历史分页。 */
|
|
2480
|
+
| {
|
|
2481
|
+
type: 'syncing:changed';
|
|
2482
|
+
syncing: boolean;
|
|
2460
2483
|
} | {
|
|
2461
2484
|
type: 'auth:invalid';
|
|
2462
2485
|
issue: ImAuthIssue;
|
|
@@ -2641,7 +2664,8 @@ declare function extractSearchText(message: Pick<ImMessage, 'contentType' | 'bod
|
|
|
2641
2664
|
/**
|
|
2642
2665
|
* 获取通讯录/历史搜索可复用的首字母分组键。
|
|
2643
2666
|
*
|
|
2644
|
-
* @remarks 拉丁字母统一为 A-Z
|
|
2667
|
+
* @remarks 拉丁字母统一为 A-Z;中文按整段文本上下文取首字读音的首字母,多音字随词语变化;
|
|
2668
|
+
* 数字、符号和 emoji 归入 `#`。
|
|
2645
2669
|
* 该工具只负责文本归一,不持有目录或 UI 状态,H5/PC 可以共享同一规则。
|
|
2646
2670
|
*/
|
|
2647
2671
|
declare function getImTextSearchInitial(text: string): Promise<string>;
|
|
@@ -3419,8 +3443,8 @@ interface IndexedDbStorageAdapterOptions {
|
|
|
3419
3443
|
maxPendingWriteBytes?: number;
|
|
3420
3444
|
};
|
|
3421
3445
|
}
|
|
3422
|
-
/** 官方浏览器 adapter
|
|
3423
|
-
type IndexedDbStorageAdapter = ImStoragePort & MediaAssetCachePort & Required<Pick<ImStoragePort, 'getConversationBackground' | 'recentHistoryCache' | 'saveConversationBackground' | 'deleteConversationBackground' | 'getDefaultConversationBackground' | 'saveDefaultConversationBackground' | 'deleteDefaultConversationBackground'>>;
|
|
3446
|
+
/** 官方浏览器 adapter 始终提供背景、最近历史和媒体缓存维护;通用端口为其它实现保留可选能力。 */
|
|
3447
|
+
type IndexedDbStorageAdapter = ImStoragePort & MediaAssetCachePort & Required<Pick<MediaAssetCachePort, 'prune' | 'hasMany'>> & Required<Pick<ImStoragePort, 'getConversationBackground' | 'recentHistoryCache' | 'saveConversationBackground' | 'deleteConversationBackground' | 'getDefaultConversationBackground' | 'saveDefaultConversationBackground' | 'deleteDefaultConversationBackground'>>;
|
|
3424
3448
|
/**
|
|
3425
3449
|
* 创建 IndexedDB 存储 adapter(实现 ImStoragePort)。
|
|
3426
3450
|
* 生命周期:先 `open({ namespace })`(幂等,跑 schema 迁移),再读写;`close()` 释放句柄。
|
|
@@ -4549,6 +4573,8 @@ interface ImLifecycleSnapshot {
|
|
|
4549
4573
|
authenticated: boolean;
|
|
4550
4574
|
/** 会话同步或前台内容读取仍在进行;不包含后台预取、媒体下载和写操作,也不代表同步成功。 */
|
|
4551
4575
|
receiving: boolean;
|
|
4576
|
+
/** 全局会话与离线消息同步仍在进行;前台会话读取由 receiving 和窗口 loading 表示。 */
|
|
4577
|
+
syncing: boolean;
|
|
4552
4578
|
}
|
|
4553
4579
|
/** logout 的本地数据与在途消息策略。 */
|
|
4554
4580
|
interface ImLogoutOptions {
|
|
@@ -5721,17 +5747,19 @@ interface ConversationHandle<TType extends ProductHandleConversationType = Produ
|
|
|
5721
5747
|
resolveMessage: (messageId: string) => Promise<ImMessageView | null>;
|
|
5722
5748
|
history: {
|
|
5723
5749
|
loadLatest: () => Promise<void>;
|
|
5724
|
-
/**
|
|
5725
|
-
loadEntryUnread: (
|
|
5750
|
+
/** 读取进入时冻结边界;signal 取消会停止查询且不替换窗口,可重新发起。不可定位返回 false,失败抛错。 */
|
|
5751
|
+
loadEntryUnread: (options?: {
|
|
5752
|
+
signal?: AbortSignal;
|
|
5753
|
+
}) => Promise<boolean>;
|
|
5726
5754
|
loadOlder: () => Promise<void>;
|
|
5727
5755
|
/** 历史定位窗口向更新方向连续翻页;接回最新端后 `hasNewer` 变为 false。 */
|
|
5728
5756
|
loadNewer: () => Promise<void>;
|
|
5729
5757
|
/**
|
|
5730
5758
|
* 按稳定消息 id 打开目标附近的连续历史窗口。
|
|
5731
5759
|
*
|
|
5732
|
-
* @remarks
|
|
5733
|
-
*
|
|
5734
|
-
* @throws
|
|
5760
|
+
* @remarks GROUP 完整置顶预览可按消息时间定位;CHANNEL 置顶未缓存时先按 ID 取回正式历史记录,
|
|
5761
|
+
* 以服务端游标继续双向分页。短期搜索结果只作为只读锚点;partial 置顶和过期搜索结果明确拒绝定位。
|
|
5762
|
+
* @throws 没有可用锚点、远端确认缺失或目标不属于当前复合会话时,抛出稳定 `IM_SDK_MESSAGE_NOT_FOUND`
|
|
5735
5763
|
* (`category: 'state'`、`retryable: false`、`details.messageId`)。这是常见产品结果而非链路异常,
|
|
5736
5764
|
* 调用方应据此与真正的存储/协议失败区分反馈,不要解析错误文案。
|
|
5737
5765
|
*/
|
|
@@ -5876,6 +5904,8 @@ interface ImMediaTask {
|
|
|
5876
5904
|
* 上传任务不带下标:一条合集整体只有一条上传进度(所有项都传完才算这条消息发出去)。
|
|
5877
5905
|
*/
|
|
5878
5906
|
itemIndex?: number;
|
|
5907
|
+
/** 合集各项的真实上传快照;控制动作仍作用于整条消息,不包含资源或传输凭据。 */
|
|
5908
|
+
items?: MediaTaskUpdate['items'];
|
|
5879
5909
|
/** upload 来自发送链路,download 来自本产品 API。 */
|
|
5880
5910
|
direction: 'upload' | 'download';
|
|
5881
5911
|
/** 终态 completed/failed/canceled 不会被同一尝试的迟到 progress 回退。 */
|
|
@@ -5921,6 +5951,20 @@ interface ImMediaTask {
|
|
|
5921
5951
|
* ```
|
|
5922
5952
|
*/
|
|
5923
5953
|
interface ImMediaTasksApi {
|
|
5954
|
+
/** 清除当前账号完整媒体缓存及下载断点;保留消息、草稿、上传源和已交付的播放资源,在途下载仍可完成。 */
|
|
5955
|
+
clearCache: () => Promise<void>;
|
|
5956
|
+
/**
|
|
5957
|
+
* 按输入顺序查询完整本机媒体是否可用;不下载、不读取 Blob、不续缓存期限或创建任务。
|
|
5958
|
+
* 仅支持图片/视频(含媒体合集);未配置持久缓存时只检查内存。
|
|
5959
|
+
* @throws 不支持轻量查询或存储读取失败时明确拒绝,不伪装成未命中。
|
|
5960
|
+
* @example const [available] = await client.media.probeCached([messageRef])
|
|
5961
|
+
*/
|
|
5962
|
+
probeCached: (messages: readonly ImMessageRef[]) => Promise<readonly boolean[]>;
|
|
5963
|
+
/**
|
|
5964
|
+
* 缓存写入、清理或过期后通知消费者重新查询;账号销毁后自动退订。
|
|
5965
|
+
* @example const stop = client.media.subscribeCacheChanges(() => refreshVisibleMedia())
|
|
5966
|
+
*/
|
|
5967
|
+
subscribeCacheChanges: (listener: () => void) => () => void;
|
|
5924
5968
|
/**
|
|
5925
5969
|
* 返回当前账号全部活跃任务与近期终态任务的冻结快照;总量超过 128 时只淘汰终态,极端并发活跃可暂时超过上限。
|
|
5926
5970
|
* @throws runtime 已 logout/dispose 时抛 `IM_SDK_MEDIA_RUNTIME_INACTIVE`。
|
|
@@ -5935,7 +5979,10 @@ interface ImMediaTasksApi {
|
|
|
5935
5979
|
* 取消 queued/running 任务;上传委托 core,下载中止当前 AbortController。
|
|
5936
5980
|
* @throws 未知任务、非法状态或底层未受理时以稳定 `IM_SDK_MEDIA_TASK_*` 错误拒绝。
|
|
5937
5981
|
*/
|
|
5938
|
-
cancel: (taskId: string
|
|
5982
|
+
cancel: (taskId: string, options?: {
|
|
5983
|
+
/** 取消发送但保留已确认上传分片与原文件,只有用户显式重试才继续。默认取消仍清理。 */
|
|
5984
|
+
retainCheckpoint?: boolean;
|
|
5985
|
+
}) => Promise<void>;
|
|
5939
5986
|
/** 暂停上传,等待请求收尾后返回;下载不支持暂停。 */
|
|
5940
5987
|
pause: (taskId: string) => Promise<void>;
|
|
5941
5988
|
/** 恢复已暂停上传,复用同一原文件与消息。 */
|
|
@@ -5953,19 +6000,28 @@ interface ImMediaTasksApi {
|
|
|
5953
6000
|
/**
|
|
5954
6001
|
* 重试 failed/canceled 任务;上传复用保留原文件,下载重新解析同一精确消息引用。
|
|
5955
6002
|
* 续传不可用或清理未确认时,必须先征得用户同意重新上传,再传 restartUpload:true。
|
|
5956
|
-
*
|
|
6003
|
+
* 保留式取消后的重发复用已确认分片和原密钥;默认清理式取消不保证保有原文件。
|
|
5957
6004
|
* 下载取消已受理后即可创建新尝试,不复用旧取消 Promise;旧 loader 结束前仍占用并发槽,但不能覆盖新任务。
|
|
5958
6005
|
* @throws 原文件已淘汰、任务仍在途或消息/下载 capability 不可用时显式拒绝。
|
|
5959
6006
|
*/
|
|
5960
6007
|
retry: (taskId: string, options?: {
|
|
5961
6008
|
/** 用户已确认放弃旧进度并重新上传;仅上传任务接受,清理失败时仍停止。 */
|
|
5962
6009
|
restartUpload?: boolean;
|
|
6010
|
+
/** 下载断点已失效或超出缓存预算时,用户确认从头下载。 */
|
|
6011
|
+
restartDownload?: boolean;
|
|
5963
6012
|
}) => Promise<void>;
|
|
5964
6013
|
/**
|
|
5965
6014
|
* 下载并按消息正文合同解密,同一消息并发调用复用同一 Promise,成功返回 Blob。
|
|
5966
6015
|
* @throws 消息不存在/非媒体/无远端 URL/未装配 capability、传输失败、取消或 teardown 均以稳定错误拒绝,不返回空 Blob。
|
|
5967
6016
|
*/
|
|
5968
6017
|
download: (message: ImMessageRef) => Promise<Blob>;
|
|
6018
|
+
/**
|
|
6019
|
+
* 将最近预览的精确媒体项设为最高下载优先级,不新建或取消任务。
|
|
6020
|
+
* 下一空闲任务/分片请求名额优先给该项;已发请求不中断,关闭播放器不撤销优先级。
|
|
6021
|
+
* 后续调用替换上一个目标;账号退出后不可调用。
|
|
6022
|
+
* @example client.media.prioritizeDownload({ conversation, messageId, itemIndex: 1 })
|
|
6023
|
+
*/
|
|
6024
|
+
prioritizeDownload: (message: ImMessageRef) => void;
|
|
5969
6025
|
/**
|
|
5970
6026
|
* 仅读取当前账号内存或持久媒体资产缓存;命中返回 Blob,未缓存或类型未注册返回 `null`。
|
|
5971
6027
|
*
|
|
@@ -6175,6 +6231,10 @@ interface ImProductEventMap {
|
|
|
6175
6231
|
'receiving:changed': Readonly<{
|
|
6176
6232
|
receiving: boolean;
|
|
6177
6233
|
}>;
|
|
6234
|
+
/** 全局同步所有支路的汇总状态;不包含打开会话、历史分页或后台预取。 */
|
|
6235
|
+
'syncing:changed': Readonly<{
|
|
6236
|
+
syncing: boolean;
|
|
6237
|
+
}>;
|
|
6178
6238
|
/** `lastLoginTime` 为服务端记录的上次登录时间(毫秒),仅被踢且走登录 ACK 的路径才有值。 */
|
|
6179
6239
|
'auth:invalid': Readonly<{
|
|
6180
6240
|
code: string;
|
|
@@ -6491,7 +6551,18 @@ interface ProductMessageSearchResult<TContent extends MessageContentType = Messa
|
|
|
6491
6551
|
createdAt: number;
|
|
6492
6552
|
contentType: TContent;
|
|
6493
6553
|
preview: string;
|
|
6554
|
+
/** 展示用片段;正文/配文携带提及信息,文件名等业务字段保持普通文本。拼接后与 preview 相同。 */
|
|
6555
|
+
previewParts: readonly ProductMessageSearchPreviewPart[];
|
|
6494
6556
|
}
|
|
6557
|
+
/** 搜索摘要的最小内容投影;不携带完整消息、媒体资源或协议字段。 */
|
|
6558
|
+
type ProductMessageSearchPreviewPart = {
|
|
6559
|
+
kind: 'plain';
|
|
6560
|
+
text: string;
|
|
6561
|
+
} | {
|
|
6562
|
+
kind: 'rich-text';
|
|
6563
|
+
text: string;
|
|
6564
|
+
mention?: ImMessageMention;
|
|
6565
|
+
};
|
|
6495
6566
|
/** 产品消息搜索页;底层 `beforeSortKey` 仅存在于账号 runtime token registry。 */
|
|
6496
6567
|
interface ProductMessageSearchPage<TContent extends MessageContentType = MessageContentType> {
|
|
6497
6568
|
items: readonly ProductMessageSearchResult<TContent>[];
|
|
@@ -6779,6 +6850,7 @@ interface ImClientOptions {
|
|
|
6779
6850
|
/** 显式开启视频/文件跨刷新续传。最多 3 条、24 小时,保存加密密钥但不保存文件副本;注销清除。 */
|
|
6780
6851
|
uploadRecovery?: {
|
|
6781
6852
|
enabled: boolean;
|
|
6853
|
+
retainFailedUploads?: boolean;
|
|
6782
6854
|
};
|
|
6783
6855
|
}
|
|
6784
6856
|
/**
|
|
@@ -8162,6 +8234,163 @@ type MessageNotificationDecision = {
|
|
|
8162
8234
|
/** PC/H5 共用的实时消息提醒规则;离线历史回放不逐条弹通知。 */
|
|
8163
8235
|
declare function resolveMessageNotificationDecision(input: MessageNotificationInput): MessageNotificationDecision;
|
|
8164
8236
|
|
|
8237
|
+
/** Emoji 最近使用列表的固定上限,与 iOS `maxLatelyEmoji` 保持一致。 */
|
|
8238
|
+
declare const MAX_RECENT_EMOJI_COUNT = 14;
|
|
8239
|
+
/** 石头剪刀布入口的稳定身份;游戏结果不参与最近列表去重。 */
|
|
8240
|
+
declare const EMOJI_GAME_RPS_STABLE_KEY = "game:rps";
|
|
8241
|
+
/** 骰子入口的稳定身份;游戏结果不参与最近列表去重。 */
|
|
8242
|
+
declare const EMOJI_GAME_DICE_STABLE_KEY = "game:dice";
|
|
8243
|
+
/** 最近使用规则所需的最小表情合同。 */
|
|
8244
|
+
interface EmojiRecentItem {
|
|
8245
|
+
readonly stableKey: string;
|
|
8246
|
+
}
|
|
8247
|
+
/**
|
|
8248
|
+
* 将一次表情选择置顶,并返回最多 14 项的新列表。
|
|
8249
|
+
*
|
|
8250
|
+
* 相同 `stableKey` 只保留最新传入项,其余历史项按原顺序全量去重。函数不修改输入数组,也不负责
|
|
8251
|
+
* 持久化、账号隔离或网络上报;这些副作用由调用方在正确层级处理。
|
|
8252
|
+
*
|
|
8253
|
+
* @template TItem 具体表情 DTO,必须提供跨表情类型稳定且唯一的 `stableKey`。
|
|
8254
|
+
*/
|
|
8255
|
+
declare function prependRecentEmoji<TItem extends EmojiRecentItem>(recent: readonly TItem[], selected: TItem): readonly TItem[];
|
|
8256
|
+
|
|
8257
|
+
/** 面板可直接消费的一枚 Unicode 表情稳定 DTO。 */
|
|
8258
|
+
interface UnicodeEmojiEntry {
|
|
8259
|
+
/** 与其它表情类型不冲突的最近使用去重键。 */
|
|
8260
|
+
readonly stableKey: string;
|
|
8261
|
+
/** 从 iOS 文本预生成的 canonical code;多个 scalar 以单个空格分隔。 */
|
|
8262
|
+
readonly code: string;
|
|
8263
|
+
/** 已验证的 Unicode scalar sequence。 */
|
|
8264
|
+
readonly codePoints: readonly number[];
|
|
8265
|
+
/** 由 `codePoints` 生成的实际输入文本。 */
|
|
8266
|
+
readonly text: string;
|
|
8267
|
+
readonly kind: 'unicode';
|
|
8268
|
+
}
|
|
8269
|
+
/**
|
|
8270
|
+
* 把显式 code sequence 转成 Unicode scalar 数组。
|
|
8271
|
+
*
|
|
8272
|
+
* 本函数只解析由空格分隔的 `0x...` scalar,不用正则或字符外观猜测 grapheme。空段、代理项、
|
|
8273
|
+
* 越界值和非十六进制输入都会 fail-fast,避免坏目录在面板运行后才暴露。
|
|
8274
|
+
*/
|
|
8275
|
+
declare function parseUnicodeEmojiCode(code: string): readonly number[];
|
|
8276
|
+
/** 根据一个或多个显式 Unicode scalar 生成输入文本。 */
|
|
8277
|
+
declare function unicodeEmojiTextFromCode(code: string): string;
|
|
8278
|
+
/** iOS `emoji_string.json` 的 301 枚 Unicode 表情,只读且顺序稳定。 */
|
|
8279
|
+
declare const UNICODE_EMOJI_CATALOG: readonly UnicodeEmojiEntry[];
|
|
8280
|
+
/**
|
|
8281
|
+
* 按 canonical code 或实际 Unicode 文本解析目录项。
|
|
8282
|
+
*
|
|
8283
|
+
* 合法但不在目录中的 code/text 返回 `undefined`;以 `0x` 开头但格式非法的 code 会 fail-fast。
|
|
8284
|
+
* 文本仅做精确查表,并显式兼容末尾 U+FE0F,不扫描或推测 grapheme 边界。
|
|
8285
|
+
*/
|
|
8286
|
+
declare function resolveUnicodeEmoji(codeOrText: string): UnicodeEmojiEntry | undefined;
|
|
8287
|
+
|
|
8288
|
+
/**
|
|
8289
|
+
* IM 文本表情目录和识别工具。
|
|
8290
|
+
*
|
|
8291
|
+
* 输入框与消息正文使用 `[Anger]`、`[愤怒]`、`[666]` 这类 token 表示自定义表情。本文件读取同目录
|
|
8292
|
+
* `emoji-catalog.json`;该 JSON 是标准纯数据文件,格式不允许注释,每项字段含义统一记录在
|
|
8293
|
+
* `EmojiEntry`。当前目录来自 Android 同一套 110 枚图片,以保证跨端 token 和资源一致。
|
|
8294
|
+
*
|
|
8295
|
+
* 发送时保留原 token 文本,其他端或图片缺失时仍可显示;渲染时 matcher 只把目录中存在的 token
|
|
8296
|
+
* 转成图片段。未知 `[xxx]`、`@` 使用的方括号内容和不完整 token 保持普通文本。本文件不创建组件,
|
|
8297
|
+
* 表情面板与消息渲染器通过 `emojiAssetUrl` / `emojiUrlByCode` 取得图片地址。
|
|
8298
|
+
*/
|
|
8299
|
+
|
|
8300
|
+
/**
|
|
8301
|
+
* `emoji-catalog.json` 中的一枚表情。
|
|
8302
|
+
*
|
|
8303
|
+
* `code` 是跨端稳定标识;`tokens` 是正文中可识别的英文名和中文别名,均包含方括号且大小写敏感;
|
|
8304
|
+
* `file` 是静态图片文件名。
|
|
8305
|
+
*/
|
|
8306
|
+
type EmojiEntry = ImEmojiCatalogEntry;
|
|
8307
|
+
/** 可发送的完整表情目录,当前共 110 枚。 */
|
|
8308
|
+
declare const EMOJI_CATALOG: readonly ImEmojiCatalogEntry[];
|
|
8309
|
+
/**
|
|
8310
|
+
* PC Web 发送面板使用的当前版表情目录。
|
|
8311
|
+
*
|
|
8312
|
+
* H5 或 CDN 路径不同时,在 `emojiAssetUrl` / `emojiUrlByCode` 传入自己的 base,无需修改目录数据。
|
|
8313
|
+
* PC 消息回显会在当前版资源加载失败时显式尝试 `/images/emoji/v2`,因此旧目录不能复用这个默认值。
|
|
8314
|
+
*/
|
|
8315
|
+
declare const DEFAULT_EMOJI_ASSET_BASE = "/images/emoji/v1";
|
|
8316
|
+
/**
|
|
8317
|
+
* 按完整且大小写敏感的 token 查找表情,例如 `[愤怒]`。
|
|
8318
|
+
*
|
|
8319
|
+
* 未命中返回 `undefined`,消息渲染器继续把原 token 当普通文本显示。
|
|
8320
|
+
*/
|
|
8321
|
+
declare function resolveEmojiToken(token: string): EmojiEntry | undefined;
|
|
8322
|
+
/** 生成表情图片 URL;未传 base 时使用 PC Web 默认目录。 */
|
|
8323
|
+
declare function emojiAssetUrl(entry: EmojiEntry, base?: string): string;
|
|
8324
|
+
/**
|
|
8325
|
+
* 扫描正文中 1 到 20 个字符的 `[xxx]` 候选。
|
|
8326
|
+
*
|
|
8327
|
+
* 正则命中只表示“可能是表情”,必须再经 `resolveEmojiToken` 查目录;未命中的候选仍是普通文本。
|
|
8328
|
+
*/
|
|
8329
|
+
declare const EMOJI_TOKEN_RE: RegExp;
|
|
8330
|
+
/** 按稳定 code 取得图片 URL;未知 code 返回 `undefined`。 */
|
|
8331
|
+
declare function emojiUrlByCode(code: string, base?: string): string | undefined;
|
|
8332
|
+
/** 快速判断正文是否可能包含 `[表情名]` 候选。 */
|
|
8333
|
+
declare function hasEmojiCandidate(text: string): boolean;
|
|
8334
|
+
/** 当前目录中存在图片资源的表情片段。 */
|
|
8335
|
+
interface EmojiAssetSegment {
|
|
8336
|
+
kind: 'emoji';
|
|
8337
|
+
text: string;
|
|
8338
|
+
code: string;
|
|
8339
|
+
}
|
|
8340
|
+
/** 历史目录中存在、但当前版本没有图片映射的 token;宿主用默认表情占位呈现。 */
|
|
8341
|
+
interface LegacyEmojiPlaceholderSegment {
|
|
8342
|
+
kind: 'legacy-emoji-placeholder';
|
|
8343
|
+
text: string;
|
|
8344
|
+
}
|
|
8345
|
+
/**
|
|
8346
|
+
* 消息渲染器使用的表情片段。
|
|
8347
|
+
*
|
|
8348
|
+
* 当前表情保留稳定 `code` 以解析图片;历史表情只保留原 token 和占位语义。图片加载、候选切换与
|
|
8349
|
+
* 最终占位图标仍由宿主管理。
|
|
8350
|
+
*/
|
|
8351
|
+
type EmojiSegment = EmojiAssetSegment | LegacyEmojiPlaceholderSegment;
|
|
8352
|
+
/** 仅由已知 `[表情]` token 组成的文本消息展示信息。 */
|
|
8353
|
+
interface StandaloneEmojiMessage {
|
|
8354
|
+
/** 按正文顺序排列的 current/legacy 表情段。 */
|
|
8355
|
+
segments: readonly EmojiSegment[];
|
|
8356
|
+
/** 表情数量;宿主据此选择 1/2/3/4+ 的展示尺寸。 */
|
|
8357
|
+
count: number;
|
|
8358
|
+
}
|
|
8359
|
+
/**
|
|
8360
|
+
* 创建消息文本表情分段器。
|
|
8361
|
+
*
|
|
8362
|
+
* 当前目录优先于历史目录:当前 token 产出带 `code` 的图片片段,old-only token 产出无资源 URL 的
|
|
8363
|
+
* 占位片段。普通 `[123]`、`@` 的用户 ID、不完整 token 和两个目录都未知的内容继续显示为普通文本。
|
|
8364
|
+
*/
|
|
8365
|
+
declare function createEmojiMatcher(): SegmentMatcher<EmojiSegment>;
|
|
8366
|
+
/**
|
|
8367
|
+
* 判断一条文本消息是否完全由已知 `[表情]` token 组成。
|
|
8368
|
+
*
|
|
8369
|
+
* token 之间出现空格、换行、普通文本或未知 `[xxx]` 时返回 `null`,让宿主继续使用普通文本气泡。
|
|
8370
|
+
* 携带 mention metadata 的消息也返回 `null`,因为协议 mention 的解释优先于同形 token(例如 `[666]`)。
|
|
8371
|
+
* 本函数只提供无 UI 的分段和数量,不决定气泡颜色、尺寸或 DOM。
|
|
8372
|
+
*/
|
|
8373
|
+
declare function resolveStandaloneEmojiMessage(message: Pick<ImMessageView, 'body' | 'contentType' | 'encryption' | 'mention'>): StandaloneEmojiMessage | null;
|
|
8374
|
+
|
|
8375
|
+
/** 搜索摘要段保留表情与提及类型;hit 只控制宿主高亮,不产生点击行为。 */
|
|
8376
|
+
type MessageSearchPreviewSegment = TextSegment<EmojiSegment> & {
|
|
8377
|
+
hit: boolean;
|
|
8378
|
+
};
|
|
8379
|
+
/** 搜索预览与正文共用名称解析和接收端语言;matcher 使用最终显示文本计算命中位置。 */
|
|
8380
|
+
interface MessageSearchPreviewOptions {
|
|
8381
|
+
locale: ImLocale;
|
|
8382
|
+
resolveName: (userId: string, fallbackName?: string) => string;
|
|
8383
|
+
matcher: ImTextSearchMatcher | null;
|
|
8384
|
+
/** 没有可搜索正文时,由宿主提供本地化消息类型标签。 */
|
|
8385
|
+
emptyText: string;
|
|
8386
|
+
}
|
|
8387
|
+
/**
|
|
8388
|
+
* PC/H5 搜索摘要复用正文的提及解析与表情目录。先解析再匹配整个显示文本,保证 @ 名称长度变化、
|
|
8389
|
+
* 跨片段关键词和拼音高亮的坐标正确;表情命中时整枚高亮,不把 token 切碎而丢失图片。
|
|
8390
|
+
* 链接保留可读文字,整行仍只执行定位原消息,避免在结果按钮内嵌套链接和提及按钮。
|
|
8391
|
+
*/
|
|
8392
|
+
declare function resolveMessageSearchPreview(result: ProductMessageSearchResult, options: MessageSearchPreviewOptions): readonly MessageSearchPreviewSegment[];
|
|
8393
|
+
|
|
8165
8394
|
/**
|
|
8166
8395
|
* 小程序游戏预览卡(消息 22 且 `showType=game-preview`)的呈现判定。
|
|
8167
8396
|
*
|
|
@@ -8345,6 +8574,7 @@ interface ChatRuntimeHostDeps {
|
|
|
8345
8574
|
/** 显式启用账号隔离的跨刷新恢复记录;保存密钥、不保存原文件,注销清除。 */
|
|
8346
8575
|
uploadRecovery?: {
|
|
8347
8576
|
enabled: boolean;
|
|
8577
|
+
retainFailedUploads?: boolean;
|
|
8348
8578
|
};
|
|
8349
8579
|
/** 获取 GIF provider 配置;API key 只留在宿主闭包与 SDK adapter,不进入共享 Store。 */
|
|
8350
8580
|
getExpressionOptions?: () => ImExpressionOptions | undefined;
|
|
@@ -8622,7 +8852,11 @@ interface ChatRuntime {
|
|
|
8622
8852
|
resolveMediaPreviewToRemote: (ref: ChatMediaMessageRef, contentType: 'image' | 'video' | 'sticker', byteSize?: number) => void;
|
|
8623
8853
|
/** 为指定消息取得本地媒体播放租约;没有本地缓存时返回 `undefined`,调用方应改用远端资源。 */
|
|
8624
8854
|
acquireMediaBlob: (ref: ChatMediaMessageRef) => MediaObjectUrlLease | undefined;
|
|
8855
|
+
/** 只读检查完整本地媒体是否可用,不取得租约、不改变缓存淘汰顺序。 */
|
|
8856
|
+
hasMediaBlob: (ref: ChatMediaMessageRef) => boolean;
|
|
8625
8857
|
/** 撤销当前账号创建的全部媒体预览地址并释放 Blob 内存,切账号、退出或销毁时调用。 */
|
|
8858
|
+
/** 清理当前账号完整媒体缓存和下载断点;上传源保留,正在使用的播放地址在释放后才撤销。 */
|
|
8859
|
+
clearMediaCache: () => Promise<void>;
|
|
8626
8860
|
cleanupLocalMediaBlobs: () => void;
|
|
8627
8861
|
/** 删除会话时释放该会话绑定的本地媒体预览/播放缓存。 */
|
|
8628
8862
|
cleanupConversationMediaBlobs: (conversation: ConversationRef<'direct' | 'group' | 'channel' | 'robot'>) => void;
|
|
@@ -9004,6 +9238,12 @@ type GifFileClassification = 'gif' | 'not-gif' | 'invalid-gif';
|
|
|
9004
9238
|
declare function classifyGifFile(file: Blob): Promise<GifFileClassification>;
|
|
9005
9239
|
declare function isGifFile(file: Blob): Promise<boolean>;
|
|
9006
9240
|
|
|
9241
|
+
/**
|
|
9242
|
+
* 将用户最后预览的媒体项交给 SDK 提高下载优先级,不创建任务或持有页面资源。
|
|
9243
|
+
* 在异步查缓存、加载 URL 之前调用,重复打开已有下载也会更新优先级。
|
|
9244
|
+
* @example mediaService.prioritizeMediaDownload(runtime, message, 1)
|
|
9245
|
+
*/
|
|
9246
|
+
declare function prioritizeMediaDownload(runtime: ChatRuntime, message: ImMessageView, itemIndex?: number): void;
|
|
9007
9247
|
/**
|
|
9008
9248
|
* 为宿主手里的本地图片/视频文件预读展示元信息(尺寸、视频时长、视频首帧封面 JPEG 字节)。
|
|
9009
9249
|
*
|
|
@@ -9067,7 +9307,7 @@ declare function loadCachedVideoObjectUrl(runtime: ChatRuntime, message: ImMessa
|
|
|
9067
9307
|
* 同一条门槛),不把无效二进制交给 `<img>`。
|
|
9068
9308
|
*
|
|
9069
9309
|
* 返回 `null` 表示下标越界、正文不是合集、内容非法或下载失败,失败原因经 `setNote` 反馈。
|
|
9070
|
-
*
|
|
9310
|
+
* **唯一不反馈的失败是用户自己取消**(点击停止按钮取消这一项的在途下载):同样返回 `null`,但不提示。
|
|
9071
9311
|
* **调用方在不再使用地址时必须 `URL.revokeObjectURL`。**
|
|
9072
9312
|
*/
|
|
9073
9313
|
declare function loadMediaAlbumItemObjectUrl(runtime: ChatRuntime, message: ImMessageView, itemIndex: number, hooks: ServiceNoteHooks, onProgress?: (percent: number) => void): Promise<string | null>;
|
|
@@ -9112,6 +9352,7 @@ declare const media_service_loadMediaAlbumItemObjectUrl: typeof loadMediaAlbumIt
|
|
|
9112
9352
|
declare const media_service_loadVideoObjectUrl: typeof loadVideoObjectUrl;
|
|
9113
9353
|
declare const media_service_loadVoiceBytes: typeof loadVoiceBytes;
|
|
9114
9354
|
declare const media_service_prepareLocalMediaPreview: typeof prepareLocalMediaPreview;
|
|
9355
|
+
declare const media_service_prioritizeMediaDownload: typeof prioritizeMediaDownload;
|
|
9115
9356
|
declare namespace media_service {
|
|
9116
9357
|
export {
|
|
9117
9358
|
media_service_acquireMediaBlob as acquireMediaBlob,
|
|
@@ -9126,6 +9367,7 @@ declare namespace media_service {
|
|
|
9126
9367
|
media_service_loadVideoObjectUrl as loadVideoObjectUrl,
|
|
9127
9368
|
media_service_loadVoiceBytes as loadVoiceBytes,
|
|
9128
9369
|
media_service_prepareLocalMediaPreview as prepareLocalMediaPreview,
|
|
9370
|
+
media_service_prioritizeMediaDownload as prioritizeMediaDownload,
|
|
9129
9371
|
};
|
|
9130
9372
|
}
|
|
9131
9373
|
|
|
@@ -9768,7 +10010,7 @@ declare function cancelMediaUpload(runtime: ChatRuntime, messageId: string, hook
|
|
|
9768
10010
|
/**
|
|
9769
10011
|
* 重试当前线程中的一条失败消息。
|
|
9770
10012
|
*
|
|
9771
|
-
*
|
|
10013
|
+
* 上传失败及保留式取消时尝试续传;restartUpload 只接受宿主明确确认后的完整重传。
|
|
9772
10014
|
* 已经完成媒体上传但消息发送失败,或普通文本失败时,重试
|
|
9773
10015
|
* SDK 待发送队列。两种路径都复用原消息 ID,不新增气泡。只有账号未变化且 SDK 接受重试时返回 `true`。
|
|
9774
10016
|
*/
|
|
@@ -10095,144 +10337,6 @@ type ImQuotedMessagePresentation = 'hidden'
|
|
|
10095
10337
|
*/
|
|
10096
10338
|
declare function resolveQuotedMessagePresentation(original: ImMessageView): ImQuotedMessagePresentation;
|
|
10097
10339
|
|
|
10098
|
-
/** Emoji 最近使用列表的固定上限,与 iOS `maxLatelyEmoji` 保持一致。 */
|
|
10099
|
-
declare const MAX_RECENT_EMOJI_COUNT = 14;
|
|
10100
|
-
/** 石头剪刀布入口的稳定身份;游戏结果不参与最近列表去重。 */
|
|
10101
|
-
declare const EMOJI_GAME_RPS_STABLE_KEY = "game:rps";
|
|
10102
|
-
/** 骰子入口的稳定身份;游戏结果不参与最近列表去重。 */
|
|
10103
|
-
declare const EMOJI_GAME_DICE_STABLE_KEY = "game:dice";
|
|
10104
|
-
/** 最近使用规则所需的最小表情合同。 */
|
|
10105
|
-
interface EmojiRecentItem {
|
|
10106
|
-
readonly stableKey: string;
|
|
10107
|
-
}
|
|
10108
|
-
/**
|
|
10109
|
-
* 将一次表情选择置顶,并返回最多 14 项的新列表。
|
|
10110
|
-
*
|
|
10111
|
-
* 相同 `stableKey` 只保留最新传入项,其余历史项按原顺序全量去重。函数不修改输入数组,也不负责
|
|
10112
|
-
* 持久化、账号隔离或网络上报;这些副作用由调用方在正确层级处理。
|
|
10113
|
-
*
|
|
10114
|
-
* @template TItem 具体表情 DTO,必须提供跨表情类型稳定且唯一的 `stableKey`。
|
|
10115
|
-
*/
|
|
10116
|
-
declare function prependRecentEmoji<TItem extends EmojiRecentItem>(recent: readonly TItem[], selected: TItem): readonly TItem[];
|
|
10117
|
-
|
|
10118
|
-
/** 面板可直接消费的一枚 Unicode 表情稳定 DTO。 */
|
|
10119
|
-
interface UnicodeEmojiEntry {
|
|
10120
|
-
/** 与其它表情类型不冲突的最近使用去重键。 */
|
|
10121
|
-
readonly stableKey: string;
|
|
10122
|
-
/** 从 iOS 文本预生成的 canonical code;多个 scalar 以单个空格分隔。 */
|
|
10123
|
-
readonly code: string;
|
|
10124
|
-
/** 已验证的 Unicode scalar sequence。 */
|
|
10125
|
-
readonly codePoints: readonly number[];
|
|
10126
|
-
/** 由 `codePoints` 生成的实际输入文本。 */
|
|
10127
|
-
readonly text: string;
|
|
10128
|
-
readonly kind: 'unicode';
|
|
10129
|
-
}
|
|
10130
|
-
/**
|
|
10131
|
-
* 把显式 code sequence 转成 Unicode scalar 数组。
|
|
10132
|
-
*
|
|
10133
|
-
* 本函数只解析由空格分隔的 `0x...` scalar,不用正则或字符外观猜测 grapheme。空段、代理项、
|
|
10134
|
-
* 越界值和非十六进制输入都会 fail-fast,避免坏目录在面板运行后才暴露。
|
|
10135
|
-
*/
|
|
10136
|
-
declare function parseUnicodeEmojiCode(code: string): readonly number[];
|
|
10137
|
-
/** 根据一个或多个显式 Unicode scalar 生成输入文本。 */
|
|
10138
|
-
declare function unicodeEmojiTextFromCode(code: string): string;
|
|
10139
|
-
/** iOS `emoji_string.json` 的 301 枚 Unicode 表情,只读且顺序稳定。 */
|
|
10140
|
-
declare const UNICODE_EMOJI_CATALOG: readonly UnicodeEmojiEntry[];
|
|
10141
|
-
/**
|
|
10142
|
-
* 按 canonical code 或实际 Unicode 文本解析目录项。
|
|
10143
|
-
*
|
|
10144
|
-
* 合法但不在目录中的 code/text 返回 `undefined`;以 `0x` 开头但格式非法的 code 会 fail-fast。
|
|
10145
|
-
* 文本仅做精确查表,并显式兼容末尾 U+FE0F,不扫描或推测 grapheme 边界。
|
|
10146
|
-
*/
|
|
10147
|
-
declare function resolveUnicodeEmoji(codeOrText: string): UnicodeEmojiEntry | undefined;
|
|
10148
|
-
|
|
10149
|
-
/**
|
|
10150
|
-
* IM 文本表情目录和识别工具。
|
|
10151
|
-
*
|
|
10152
|
-
* 输入框与消息正文使用 `[Anger]`、`[愤怒]`、`[666]` 这类 token 表示自定义表情。本文件读取同目录
|
|
10153
|
-
* `emoji-catalog.json`;该 JSON 是标准纯数据文件,格式不允许注释,每项字段含义统一记录在
|
|
10154
|
-
* `EmojiEntry`。当前目录来自 Android 同一套 110 枚图片,以保证跨端 token 和资源一致。
|
|
10155
|
-
*
|
|
10156
|
-
* 发送时保留原 token 文本,其他端或图片缺失时仍可显示;渲染时 matcher 只把目录中存在的 token
|
|
10157
|
-
* 转成图片段。未知 `[xxx]`、`@` 使用的方括号内容和不完整 token 保持普通文本。本文件不创建组件,
|
|
10158
|
-
* 表情面板与消息渲染器通过 `emojiAssetUrl` / `emojiUrlByCode` 取得图片地址。
|
|
10159
|
-
*/
|
|
10160
|
-
|
|
10161
|
-
/**
|
|
10162
|
-
* `emoji-catalog.json` 中的一枚表情。
|
|
10163
|
-
*
|
|
10164
|
-
* `code` 是跨端稳定标识;`tokens` 是正文中可识别的英文名和中文别名,均包含方括号且大小写敏感;
|
|
10165
|
-
* `file` 是静态图片文件名。
|
|
10166
|
-
*/
|
|
10167
|
-
type EmojiEntry = ImEmojiCatalogEntry;
|
|
10168
|
-
/** 可发送的完整表情目录,当前共 110 枚。 */
|
|
10169
|
-
declare const EMOJI_CATALOG: readonly ImEmojiCatalogEntry[];
|
|
10170
|
-
/**
|
|
10171
|
-
* PC Web 发送面板使用的当前版表情目录。
|
|
10172
|
-
*
|
|
10173
|
-
* H5 或 CDN 路径不同时,在 `emojiAssetUrl` / `emojiUrlByCode` 传入自己的 base,无需修改目录数据。
|
|
10174
|
-
* PC 消息回显会在当前版资源加载失败时显式尝试 `/images/emoji/v2`,因此旧目录不能复用这个默认值。
|
|
10175
|
-
*/
|
|
10176
|
-
declare const DEFAULT_EMOJI_ASSET_BASE = "/images/emoji/v1";
|
|
10177
|
-
/**
|
|
10178
|
-
* 按完整且大小写敏感的 token 查找表情,例如 `[愤怒]`。
|
|
10179
|
-
*
|
|
10180
|
-
* 未命中返回 `undefined`,消息渲染器继续把原 token 当普通文本显示。
|
|
10181
|
-
*/
|
|
10182
|
-
declare function resolveEmojiToken(token: string): EmojiEntry | undefined;
|
|
10183
|
-
/** 生成表情图片 URL;未传 base 时使用 PC Web 默认目录。 */
|
|
10184
|
-
declare function emojiAssetUrl(entry: EmojiEntry, base?: string): string;
|
|
10185
|
-
/**
|
|
10186
|
-
* 扫描正文中 1 到 20 个字符的 `[xxx]` 候选。
|
|
10187
|
-
*
|
|
10188
|
-
* 正则命中只表示“可能是表情”,必须再经 `resolveEmojiToken` 查目录;未命中的候选仍是普通文本。
|
|
10189
|
-
*/
|
|
10190
|
-
declare const EMOJI_TOKEN_RE: RegExp;
|
|
10191
|
-
/** 按稳定 code 取得图片 URL;未知 code 返回 `undefined`。 */
|
|
10192
|
-
declare function emojiUrlByCode(code: string, base?: string): string | undefined;
|
|
10193
|
-
/** 快速判断正文是否可能包含 `[表情名]` 候选。 */
|
|
10194
|
-
declare function hasEmojiCandidate(text: string): boolean;
|
|
10195
|
-
/** 当前目录中存在图片资源的表情片段。 */
|
|
10196
|
-
interface EmojiAssetSegment {
|
|
10197
|
-
kind: 'emoji';
|
|
10198
|
-
text: string;
|
|
10199
|
-
code: string;
|
|
10200
|
-
}
|
|
10201
|
-
/** 历史目录中存在、但当前版本没有图片映射的 token;宿主用默认表情占位呈现。 */
|
|
10202
|
-
interface LegacyEmojiPlaceholderSegment {
|
|
10203
|
-
kind: 'legacy-emoji-placeholder';
|
|
10204
|
-
text: string;
|
|
10205
|
-
}
|
|
10206
|
-
/**
|
|
10207
|
-
* 消息渲染器使用的表情片段。
|
|
10208
|
-
*
|
|
10209
|
-
* 当前表情保留稳定 `code` 以解析图片;历史表情只保留原 token 和占位语义。图片加载、候选切换与
|
|
10210
|
-
* 最终占位图标仍由宿主管理。
|
|
10211
|
-
*/
|
|
10212
|
-
type EmojiSegment = EmojiAssetSegment | LegacyEmojiPlaceholderSegment;
|
|
10213
|
-
/** 仅由已知 `[表情]` token 组成的文本消息展示信息。 */
|
|
10214
|
-
interface StandaloneEmojiMessage {
|
|
10215
|
-
/** 按正文顺序排列的 current/legacy 表情段。 */
|
|
10216
|
-
segments: readonly EmojiSegment[];
|
|
10217
|
-
/** 表情数量;宿主据此选择 1/2/3/4+ 的展示尺寸。 */
|
|
10218
|
-
count: number;
|
|
10219
|
-
}
|
|
10220
|
-
/**
|
|
10221
|
-
* 创建消息文本表情分段器。
|
|
10222
|
-
*
|
|
10223
|
-
* 当前目录优先于历史目录:当前 token 产出带 `code` 的图片片段,old-only token 产出无资源 URL 的
|
|
10224
|
-
* 占位片段。普通 `[123]`、`@` 的用户 ID、不完整 token 和两个目录都未知的内容继续显示为普通文本。
|
|
10225
|
-
*/
|
|
10226
|
-
declare function createEmojiMatcher(): SegmentMatcher<EmojiSegment>;
|
|
10227
|
-
/**
|
|
10228
|
-
* 判断一条文本消息是否完全由已知 `[表情]` token 组成。
|
|
10229
|
-
*
|
|
10230
|
-
* token 之间出现空格、换行、普通文本或未知 `[xxx]` 时返回 `null`,让宿主继续使用普通文本气泡。
|
|
10231
|
-
* 携带 mention metadata 的消息也返回 `null`,因为协议 mention 的解释优先于同形 token(例如 `[666]`)。
|
|
10232
|
-
* 本函数只提供无 UI 的分段和数量,不决定气泡颜色、尺寸或 DOM。
|
|
10233
|
-
*/
|
|
10234
|
-
declare function resolveStandaloneEmojiMessage(message: Pick<ImMessageView, 'body' | 'contentType' | 'encryption' | 'mention'>): StandaloneEmojiMessage | null;
|
|
10235
|
-
|
|
10236
10340
|
/**
|
|
10237
10341
|
* 把一段文本按搜索命中位置切成普通片段和高亮片段。
|
|
10238
10342
|
*
|
|
@@ -10446,6 +10550,32 @@ declare function formatFileSize(bytes: number): string;
|
|
|
10446
10550
|
*/
|
|
10447
10551
|
declare function getFileExtension(fileName: string): string;
|
|
10448
10552
|
|
|
10553
|
+
/** 列表和预览共用的传输展示;不持有任务、网络请求或页面资源。 */
|
|
10554
|
+
interface MediaTransferPresentation {
|
|
10555
|
+
/** 取消上传作用于整条消息,取消下载只作用于当前项。 */
|
|
10556
|
+
direction: 'upload' | 'download';
|
|
10557
|
+
/** completed 只保留视频时长,其余状态由宿主渲染同一胶囊。 */
|
|
10558
|
+
state: 'waiting' | 'running' | 'paused' | 'failed' | 'completed';
|
|
10559
|
+
/** 真实字节可计算时才提供百分比,缺少大小时不能用等权平均替代。 */
|
|
10560
|
+
percent?: number;
|
|
10561
|
+
/** 当前正在核对完整缓存;宿主暂不把 waiting 显示为确定的下载入口。 */
|
|
10562
|
+
resolving?: boolean;
|
|
10563
|
+
}
|
|
10564
|
+
/** 从 SDK 快照投影某一媒体格,折叠格按固定范围内全部项的字节数加权。 */
|
|
10565
|
+
declare function resolveMediaTransferPresentation(input: {
|
|
10566
|
+
message: ImMessageView;
|
|
10567
|
+
uploadTask?: ImMediaTask;
|
|
10568
|
+
downloadTasks: readonly ImMediaTask[];
|
|
10569
|
+
itemIndex?: number;
|
|
10570
|
+
aggregateFrom?: number;
|
|
10571
|
+
/** 宿主确实持有的完整本地资源;单条媒体以 undefined 表示,缩略图不属于完整资源。 */
|
|
10572
|
+
availableItemIndices?: readonly (number | undefined)[];
|
|
10573
|
+
/** SDK 明确查到完整缓存已不存在;历史 completed 任务不能替代当前资源证据。 */
|
|
10574
|
+
unavailableItemIndices?: readonly (number | undefined)[];
|
|
10575
|
+
/** 当前窗口正在查询的媒体项,不表示未下载。 */
|
|
10576
|
+
pendingItemIndices?: readonly (number | undefined)[];
|
|
10577
|
+
}): MediaTransferPresentation;
|
|
10578
|
+
|
|
10449
10579
|
/**
|
|
10450
10580
|
* 消息正文中由 Chat Kit 额外识别的可渲染片段类型。
|
|
10451
10581
|
*
|
|
@@ -10547,5 +10677,5 @@ declare function resampleWaveform(data: readonly number[], targetCount: number):
|
|
|
10547
10677
|
*/
|
|
10548
10678
|
declare function placeholderWaveform(seed: string, count: number): number[];
|
|
10549
10679
|
|
|
10550
|
-
export { DEFAULT_EMOJI_ASSET_BASE, DEFAULT_LOADING_MINIMUM_VISIBLE_MS, DEFAULT_LOADING_SHOW_DELAY_MS, DEFAULT_LOCALE, EDIT_WINDOW_MS, EMOJI_CATALOG, EMOJI_GAME_DICE_STABLE_KEY, EMOJI_GAME_RPS_STABLE_KEY, EMOJI_TOKEN_RE, IMAGE_MESSAGE_ACCEPT, IM_CHAT_FONT_SCALES, IM_DIAGNOSTIC_CATEGORIES, IM_EMOJI_CATALOG, ImPinnedMessageOperationError, MAX_BATCH_FILES, MAX_RECENT_EMOJI_COUNT, MEDIA_ALBUM_CAPTION_MAX_LENGTH, MEDIA_ALBUM_MAX_ITEMS, MINI_PROGRAM_GAME_PREVIEW_FALLBACK_HEIGHT, MINI_PROGRAM_GAME_PREVIEW_FALLBACK_WIDTH, MINI_PROGRAM_LANG_NUMBERS, MediaTransferError, REACTION_SUPPORTED_CONTENT_TYPES, SPIKE_STEP, UNICODE_EMOJI_CATALOG, blockReasonForChannelSession, blockReasonForChannelState, blockReasonForGroupState, blockReasonForSession, buildSessionFavoritePlainBody, calculateMediaBox, canCopyMessageImage, canEditMessage, canPinChannelMessage, canPinGroupMessage, canPinMessage, canPromoteMediaPresentationSource, canReactToMessage, canRecallMessage, canTransmit, canTransmitByType, canTransmitContent, cancelMediaUpload, captureRuntimeClientOperation, captureRuntimeOperation, channelMiniProgramRelKey, classifyGifFile, classifyMediaFile, classifyStickerImageType, countUnreadConversations, createChatRuntime, createConversationPrefetchController, createDelayedLoadingIndicator, createEmojiMatcher, createFaceToFaceGroupQrPayload, createImClient, createImConsoleDiagnosticSink, createImDiagnosticMemoryBuffer, createImI18n, createImResourceUploader, createImTextSearchMatcher, createLinkMatcher, createMessageImageCopySource, createNewMessageBadgeController, createSdkDiagnosticWriter, createThreadItems, createVoicePlayer, createVoiceRecordingSession, csvIncludes, decideChannelMiniProgramRelOpen, decideConversationAction, decideMemberTargetAction, decideMessageAction, detectVoiceCapabilities, emojiAssetUrl, emojiUrlByCode, extractSearchText, fetchConversationFileBatch, fetchConversationImageBatch, fetchConversationMessageBatch, fetchConversationVideoBatch, fetchConversationVoiceBatch, fetchNextConversationSearchBatch, formatChatDateSeparator, formatConversationDisplayTime, formatConversationUnreadBadge, formatFailure, formatFileSize, formatLastMessageSummary, formatMediaDuration, formatMediaPlaceholder, formatMentionAll, formatServiceText, formatSystemMessage, forward_service as forwardService, getFileExtension, getImTextSearchInitial, getImTimeCatalog, getLocalDayKey, getMessageCopyImageUrl, getMessageCopyText, hasEmojiCandidate, hasLinkCandidate, highlightSegments, isGifFile, isMessageLocateScrollProtected, isMessageTailChangeFromOlderWindowTrim, isMessageViewportMeasurable, isMessageVisibleForNewMessageBadge, isMiniProgramShowTypeOpenable, isPinnedMessageProtected, isSupportedImageFile, isVoiceStorageConfigured, loadOlderUntilBoundary, mediaBatchBudgetBytes, media_service as mediaService, mediaTransferErrorCodeOf, message_service as messageService, migrateImCachePrefix, normalizeImLocale, normalizeLinkHref, normalizeMediaUploadCredentials, parseSessionFavoriteAlbumItems, parseUnicodeEmojiCode, pinnedMessage_service as pinnedMessageService, placeholderWaveform, prependRecentEmoji, profile_service as profileService, read_service as readService, refreshPrependMessageAnchorPosition, registerImCatalogOverrides, replaceInterruptedMediaFile, requiresConversationEncryption, requiresForwardTypeConfirmation, resampleWaveform, resetImCatalogOverrides, resolveBestMediaPresentationSource, resolveCenteredMessageScrollTop, resolveChannelAccess, resolveChannelMemberAvatarUrl, resolveChannelMemberDisplayName, resolveChannelMiniProgramRelIcon, resolveChannelMiniProgramRelName, resolveChannelMiniProgramRelOpenSurface, resolveChannelMiniProgramRelUrl, resolveChannelPinnedGameCopy, resolveConversationListPresentation, resolveDisplayTimestamp, resolveEmojiToken, resolveFriendDisplayName, resolveImEmojiToken, resolveImProfileAccessDestination, resolveImThreadActiveDate, resolveMediaAlbumSendContentType, resolveMediaPresentation, resolveMemberDisplayName, resolveMessageBodyKind, resolveMessageNotificationDecision, resolveMessageTimelineTimestamp, resolveMiniProgramFloatLinkUrl, resolveMiniProgramGamePreviewLayout, resolveMiniProgramOpenUrl, resolvePrependMessageAnchor, resolvePrependMessageAnchorAdjustment, resolvePrependMessageAnchorPosition, resolvePublicNickname, resolveQuotedMessagePresentation, resolveSenderAvatarUrl, resolveSessionFavoriteAlbumCaption, resolveSessionFavoriteAlbumItemPreviewUrl, resolveSessionFavoriteKindFromMessage, resolveStandaloneEmojiMessage, resolveSurvivingMessageAnchorAdjustment, resolveTextSegments, resolveUnicodeEmoji, resolveVisibleChannelMiniProgramRels, resolveVisibleMessageAnchorPositions, retryMessage, runMediaSendBatch, sendAsFilesBatch, sendBlockReasonForDecision, sendMediaAlbum, sendMediaFile, sendMediaFilesBatch, sendText, sendVoice, shouldCompleteInitialViewport, shouldFillInitialHistoryViewport, shouldFollowIncomingMessage, shouldLoadNewerHistoryPage, shouldPrefetchOlderHistory, shouldRestoreMessageViewportFocus, shouldShowChatDateSeparator, shouldTrackRemoteMessageForBadge, sortChannelMiniProgramFloatingItems, sortSessions, spikeCountForDuration, sumSessionsUnread, supportsConversationMention, unicodeEmojiTextFromCode, voiceErrorCodeOf };
|
|
10551
|
-
export type { ApplySessionResult, BrowseMessagesInput, CanPinMessageInput, CapabilityAvailability, CapabilityDecision, CapabilityReason, CenteredMessageScrollInput, ChannelAccessSnapshot, ChannelBaseSessionState, ChannelConversationCapabilities, ChannelConversationMessageApi, ChannelJoinApplication, ChannelJoinApplicationNotification, ChannelJoinApplicationPage, ChannelMember, ChannelMemberPage, ChannelMentionMember, ChannelMentionMemberPage, ChannelMiniProgramOpenGame, ChannelMiniProgramRel, ChannelMiniProgramRelConfigType, ChannelMiniProgramRelOpenDecision, ChannelMiniProgramRelOpenSurface, ChannelMuteReason, ChannelPermissionSet, ChannelProfile, ChannelRole, ChannelSessionState, ChatMediaMessageRef, ChatProfileAdapter, ChatRuntime, ChatRuntimeCredentials, ChatRuntimeFactories, ChatRuntimeHostDeps, ChatRuntimeOpResult, ContactCardInput, ContactMessageOptions, ConversationBackgroundPreset, ConversationBackgroundSelection, ConversationCapabilityAction, ConversationCapabilitySnapshot, ConversationDraft, ConversationDraftApi, ConversationEntryUnreadNavigation, ConversationEntryUnreadSnapshot, ConversationHandle, ConversationHandleSnapshot, ConversationInitialPosition, ConversationLastMessageSummary, ConversationListItem, ConversationListMention, ConversationListPresentation, ConversationListPresentationLabels, ConversationListPresentationOptions, ConversationListPreviewMediaKind, ConversationListPreviewSegment, ConversationMessageApi, ConversationOpenOptions, ConversationPrefetchController, ConversationPrefetchControllerOptions, ConversationPrefetchOptions, ConversationPrefetchResult, ConversationRef, ConversationSearchCategory, ConversationSearchPage, ConversationSearchResult, ConversationSystemSummary, ConversationType, CreateThreadItemsInput, DelayedLoadingIndicator, DelayedLoadingIndicatorOptions, DirectConversationCapabilities, DirectConversationMessageApi, DraftInput, EditTextOptions, EmojiEntry, EmojiRecentItem, EmojiSegment, ExpressionMessageOptions, FileMessageOptions, FormatFailureContext, FormatLastMessageContext, FormatMediaPlaceholderContext, FormatServiceTextContext, FormatSystemMessageContext, FormatTimeDisplayContext, ForwardCommandHooks, ForwardFailReason, ForwardItemStatus, ForwardMessageFailure, ForwardMessagesInput, ForwardMessagesResult, ForwardTarget, ForwardedMessageRef, GameMessageOptions, GifFileClassification, GifMessageOptions, GiftMessageOptions, GroupConversationCapabilities, GroupConversationMessageApi, GroupMemberItem, GroupProfile, HighlightSegment, ImAppearanceSettingsApi, ImApplicationItem, ImApplicationRef, ImApplicationsApi, ImAuthIssue, ImAuthProvider, ImCacheOptions, ImCachePrefixMigrationContext, ImCachePrefixMigrator, ImCallKind, ImCallOutcome, ImCallRecordBody, ImCatalog, ImCatalogOverrides, ImChannelConversationAccessSnapshot, ImChannelMemberPresentation, ImChannelMentionApi, ImChannelMentionPresentation, ImChannelMiniProgramRel, ImChannelPermissions, ImChannelPinnedMessage, ImChannelProfile, ImChannelProfilePresentation, ImChannelRole, ImChannelState, ImChannelsApi, ImChatFontScale, ImClientOptions, ImConnectionState, ImContactBody, ImContactKind, ImContactProfile, ImContactRelationship, ImContactRemarkPhone, ImContactSearchResult, ImContactsApi, ImConversationBackgroundApi, ImConversationCapabilitiesApi, ImConversationListApi, ImConversationListSnapshot, ImConversationListState, ImConversationSearchApi, ImCoreApiOptions, ImCreateChannelInput, ImCreateChannelResult, ImCreateFaceToFaceGroupResult, ImCreateGroupInput, ImCreateGroupResult, ImCreatedChannel, ImCreatedGroup, ImDebugOptions, ImDiagnosticCategory, ImDiagnosticError, ImDiagnosticLayer, ImDiagnosticLevel, ImDiagnosticMemoryBuffer, ImDiagnosticMemoryBufferFilter, ImDiagnosticMemoryBufferOptions, ImDiagnosticMemoryBufferSnapshot, ImDiagnosticMessage, ImDiagnosticRecord, ImDiagnosticSink, ImDiagnosticWriter, ImDirectCallAnswerResult, ImDirectCallFailReason, ImDirectCallHangupInput, ImDirectCallHangupReason, ImDirectCallInviteInput, ImDirectCallNotifyAudioInput, ImDirectCallTargetInput, ImDirectCallsApi, ImDirectReadReceiptSettings, ImDirectoryApi, ImDirectoryFieldMatch, ImDirectoryItem, ImDirectoryKind, ImDirectoryPage, ImDirectorySearchApi, ImDirectorySearchItem, ImDirectorySearchResult, ImDraftsApi, ImEmojiCatalogEntry, ImEndpointProvider, ImEventsApi, ImExpressionAsset, ImExpressionAssetInput, ImExpressionEmojiRecentInput, ImExpressionFavoriteKind, ImExpressionOptions, ImExpressionRecentInput, ImExpressionRecentItem, ImExpressionRecentItemKind, ImExpressionsApi, ImFaceToFaceGroup, ImFailureCatalog, ImFileBody, ImFilesAlbumBody, ImForwardOperationResult, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, ImGiftBody, ImGiftSessionType, ImGiftStatus, ImGiftType, ImGiphyAsset, ImGiphyPage, ImGiphyPageOptions, ImGroupCallAnswerInput, ImGroupCallBusyInput, ImGroupCallCreateInput, ImGroupCallJoinInput, ImGroupCallMeetingSnapshot, ImGroupCallMember, ImGroupCallMemberStatus, ImGroupCallStatusInput, ImGroupCallTargetInput, ImGroupCallsApi, ImGroupConversationState, ImGroupMemberPresentation, ImGroupMentionApi, ImGroupPinnedMessage, ImGroupProfile, ImGroupsApi, ImI18n, ImImageBody, ImLastMessageCatalog, ImLifecycleSnapshot, ImLocalDataApi, ImLocalDataInfo, ImLocale, ImLogoutOptions, ImMediaAlbumBody, ImMediaAlbumItem, ImMediaBatchSendResult, ImMediaCatalog, ImMediaConfig, ImMediaTask, ImMediaTasksApi, ImMembershipJoinResult, ImMentionCatalog, ImMessageActionResult, ImMessageBodyKind, ImMessageMention, ImMessageReactionAggregate, ImMessageReactions, ImMessageRef, ImMessageSearchApi, ImMessageView, ImMessageViewBody, ImMessagesByIdResult, ImMiniProgramBody, ImMiniProgramShowType, ImOutboxApi, ImOutboxItem, ImPageToken, ImPartialCatalog, ImPinnedMessageActionResult, ImPinnedMessageErrorKind, ImPinnedMessageOperation, ImPinnedMessageSnapshot, ImProductApplicationUpdate, ImProductAuthInvalidReason, ImProductClient, ImProductEvent, ImProductEventError, ImProductEventMap, ImProductMessage, ImProfileAccessDestination, ImPushApi, ImPushSnapshot, ImQuotedMessagePresentation, ImReactionChangeAction, ImReactionChangeResult, ImReadReceiptSettingsApi, ImRedPacketBody, ImRedPacketType, ImRequestError, ImRequestErrorHandler, ImResourceKind, ImResourceUploadInput, ImResourceUploadProgress, ImResourceUploadResult, ImResourceUploader, ImResourceUploaderConfig, ImRobotBody, ImRobotCommand, ImRobotConversationBindInput, ImRobotDirectoryItem, ImRobotDirectoryPage, ImRobotDirectoryScope, ImRobotModule, ImRobotsApi, ImSdkErrorCategory, ImSdkErrorShape, ImSearchApi, ImServiceCatalog, ImServiceTextKey, ImSessionApi, ImSessionFavoriteAlbumItem, ImSessionFavoriteItem, ImSessionFavoriteKind, ImSessionFavoritesApi, ImSessionLifecycleState, ImSettingsApi, ImStickerAssetInput, ImStickerBody, ImStickerPack, ImSupportedConversationRef, ImSystemCatalog, ImTextResolver, ImTextSearchMatch, ImTextSearchMatchOptions, ImTextSearchMatcher, ImTextSearchRange, ImThreadActiveDateSnapshot, ImThreadDateMarkerMetric, ImThreadDecoration, ImThreadEncryptionItem, ImThreadIntent, ImThreadItem, ImThreadPresentationAdapter, ImThreadReadActions, ImThreadReadTargetResolver, ImThreadViewportMetrics, ImTimeCatalog, ImTransferBody, ImTransferSessionType, ImTransferStatus, ImVideoBody, ImVoiceBody, ImWebPushSubscription, ImWeekdayKey, ImageMessageOptions, ImagePreviewMetadata, IncomingMessageFollowInput, InitialHistoryViewportFillInput, InitialViewportCompletionInput, LinkSegment, LocalConversationHistoryClearResult, LocalMessageDeletionResult, MediaAlbumItemInput, MediaAlbumMessageOptions, MediaBatchBudgetOptions, MediaBatchLimitInfo, MediaFileClassification, MediaLimitItem, MediaObjectUrlLease, MediaPresentationFit, MediaPresentationPolicy, MediaPresentationRule, MediaPresentationSourceCandidate, MediaPresentationSourceQuality, MediaSendBatchResult, MediaTransferErrorCode, MediaUploadCredentials, MediaUploadCredentialsProvider, MediaUploadCredentialsRequest, MemberTargetCapabilityAction, MemberTargetCapabilityInput, MentionCandidate, MentionCandidatePage, MentionInput, MessageCapabilityAction, MessageCapabilityInput, MessageContentType, MessageLocateScrollProtectionInput, MessageNotificationDecision, MessageNotificationInput, MessageWindowInfo, MessageWindowPage, MessagesByIdFailure, MigrateImCachePrefixInput, MiniProgramGamePreviewInput, MiniProgramGamePreviewLayout, MiniProgramHostLocale, MiniProgramMessageOptions, MiniProgramOpenUrlInput, NewMessageBadgeController, NewMessageBadgeCountListener, NewMessageBadgeVisibilityInput, NewerHistoryPageTriggerInput, OlderHistoryPrefetchInput, PrependAnchorCandidate, PrependAnchorViewport, PrependMessageAnchorPosition, ProductConversationListType, ProductHandleConversationType, ProductMessageSearchPage, ProductMessageSearchResult, RemoteMessageBadgeTrackingInput, ResolveMediaPresentationInput, ResolveTextOptions, ResolvedConversationBackground, ResolvedMediaPresentation, RichExtraSegment, RobotConversationCapabilities, RuntimeClientOperation, RuntimeOperation, SearchBatchResult, SearchFilesInput, SearchMessagesInput, SearchTextMessagesInput, SegmentMatch, SegmentMatcher, SendCapabilityMode, SendCommandHooks, SendMessageResult, SendVoicePayload, SenderProfileEntry, ServiceNoteHooks, StandaloneEmojiMessage, StickerAssetKind, TextMessageOptions, TextSegment, TransferMessageOptions, UnicodeEmojiEntry, UnknownMessageBody, UserProfile, VideoMessageOptions, VideoPreviewMetadata, VisibleChannelMiniProgramRels, VoiceCapabilities, VoiceErrorCode, VoiceMessageMetadata, VoicePlayer, VoicePlayerOptions, VoicePlayerState, VoiceRecordingResult, VoiceRecordingSession, VoiceRecordingSessionOptions, VoiceRecordingState, VoiceToggleOptions };
|
|
10680
|
+
export { DEFAULT_EMOJI_ASSET_BASE, DEFAULT_LOADING_MINIMUM_VISIBLE_MS, DEFAULT_LOADING_SHOW_DELAY_MS, DEFAULT_LOCALE, EDIT_WINDOW_MS, EMOJI_CATALOG, EMOJI_GAME_DICE_STABLE_KEY, EMOJI_GAME_RPS_STABLE_KEY, EMOJI_TOKEN_RE, IMAGE_MESSAGE_ACCEPT, IM_CHAT_FONT_SCALES, IM_DIAGNOSTIC_CATEGORIES, IM_EMOJI_CATALOG, ImPinnedMessageOperationError, MAX_BATCH_FILES, MAX_RECENT_EMOJI_COUNT, MEDIA_ALBUM_CAPTION_MAX_LENGTH, MEDIA_ALBUM_MAX_ITEMS, MINI_PROGRAM_GAME_PREVIEW_FALLBACK_HEIGHT, MINI_PROGRAM_GAME_PREVIEW_FALLBACK_WIDTH, MINI_PROGRAM_LANG_NUMBERS, MediaTransferError, REACTION_SUPPORTED_CONTENT_TYPES, SPIKE_STEP, UNICODE_EMOJI_CATALOG, blockReasonForChannelSession, blockReasonForChannelState, blockReasonForGroupState, blockReasonForSession, buildSessionFavoritePlainBody, calculateMediaBox, canCopyMessageImage, canEditMessage, canPinChannelMessage, canPinGroupMessage, canPinMessage, canPromoteMediaPresentationSource, canReactToMessage, canRecallMessage, canTransmit, canTransmitByType, canTransmitContent, cancelMediaUpload, captureRuntimeClientOperation, captureRuntimeOperation, channelMiniProgramRelKey, classifyGifFile, classifyMediaFile, classifyStickerImageType, countUnreadConversations, createChatRuntime, createConversationPrefetchController, createDelayedLoadingIndicator, createEmojiMatcher, createFaceToFaceGroupQrPayload, createImClient, createImConsoleDiagnosticSink, createImDiagnosticMemoryBuffer, createImI18n, createImResourceUploader, createImTextSearchMatcher, createLinkMatcher, createMessageImageCopySource, createNewMessageBadgeController, createSdkDiagnosticWriter, createThreadItems, createVoicePlayer, createVoiceRecordingSession, csvIncludes, decideChannelMiniProgramRelOpen, decideConversationAction, decideMemberTargetAction, decideMessageAction, detectVoiceCapabilities, emojiAssetUrl, emojiUrlByCode, extractSearchText, fetchConversationFileBatch, fetchConversationImageBatch, fetchConversationMessageBatch, fetchConversationVideoBatch, fetchConversationVoiceBatch, fetchNextConversationSearchBatch, formatChatDateSeparator, formatConversationDisplayTime, formatConversationUnreadBadge, formatFailure, formatFileSize, formatLastMessageSummary, formatMediaDuration, formatMediaPlaceholder, formatMentionAll, formatServiceText, formatSystemMessage, forward_service as forwardService, getFileExtension, getImTextSearchInitial, getImTimeCatalog, getLocalDayKey, getMessageCopyImageUrl, getMessageCopyText, hasEmojiCandidate, hasLinkCandidate, highlightSegments, isGifFile, isMessageLocateScrollProtected, isMessageTailChangeFromOlderWindowTrim, isMessageViewportMeasurable, isMessageVisibleForNewMessageBadge, isMiniProgramShowTypeOpenable, isPinnedMessageProtected, isSupportedImageFile, isVoiceStorageConfigured, loadOlderUntilBoundary, mediaBatchBudgetBytes, media_service as mediaService, mediaTransferErrorCodeOf, message_service as messageService, migrateImCachePrefix, normalizeImLocale, normalizeLinkHref, normalizeMediaUploadCredentials, parseSessionFavoriteAlbumItems, parseUnicodeEmojiCode, pinnedMessage_service as pinnedMessageService, placeholderWaveform, prependRecentEmoji, profile_service as profileService, read_service as readService, refreshPrependMessageAnchorPosition, registerImCatalogOverrides, replaceInterruptedMediaFile, requiresConversationEncryption, requiresForwardTypeConfirmation, resampleWaveform, resetImCatalogOverrides, resolveBestMediaPresentationSource, resolveCenteredMessageScrollTop, resolveChannelAccess, resolveChannelMemberAvatarUrl, resolveChannelMemberDisplayName, resolveChannelMiniProgramRelIcon, resolveChannelMiniProgramRelName, resolveChannelMiniProgramRelOpenSurface, resolveChannelMiniProgramRelUrl, resolveChannelPinnedGameCopy, resolveConversationListPresentation, resolveDisplayTimestamp, resolveEmojiToken, resolveFriendDisplayName, resolveImEmojiToken, resolveImProfileAccessDestination, resolveImThreadActiveDate, resolveMediaAlbumSendContentType, resolveMediaPresentation, resolveMediaTransferPresentation, resolveMemberDisplayName, resolveMessageBodyKind, resolveMessageNotificationDecision, resolveMessageSearchPreview, resolveMessageTimelineTimestamp, resolveMiniProgramFloatLinkUrl, resolveMiniProgramGamePreviewLayout, resolveMiniProgramOpenUrl, resolvePrependMessageAnchor, resolvePrependMessageAnchorAdjustment, resolvePrependMessageAnchorPosition, resolvePublicNickname, resolveQuotedMessagePresentation, resolveSenderAvatarUrl, resolveSessionFavoriteAlbumCaption, resolveSessionFavoriteAlbumItemPreviewUrl, resolveSessionFavoriteKindFromMessage, resolveStandaloneEmojiMessage, resolveSurvivingMessageAnchorAdjustment, resolveTextSegments, resolveUnicodeEmoji, resolveVisibleChannelMiniProgramRels, resolveVisibleMessageAnchorPositions, retryMessage, runMediaSendBatch, sendAsFilesBatch, sendBlockReasonForDecision, sendMediaAlbum, sendMediaFile, sendMediaFilesBatch, sendText, sendVoice, shouldCompleteInitialViewport, shouldFillInitialHistoryViewport, shouldFollowIncomingMessage, shouldLoadNewerHistoryPage, shouldPrefetchOlderHistory, shouldRestoreMessageViewportFocus, shouldShowChatDateSeparator, shouldTrackRemoteMessageForBadge, sortChannelMiniProgramFloatingItems, sortSessions, spikeCountForDuration, sumSessionsUnread, supportsConversationMention, unicodeEmojiTextFromCode, voiceErrorCodeOf };
|
|
10681
|
+
export type { ApplySessionResult, BrowseMessagesInput, CanPinMessageInput, CapabilityAvailability, CapabilityDecision, CapabilityReason, CenteredMessageScrollInput, ChannelAccessSnapshot, ChannelBaseSessionState, ChannelConversationCapabilities, ChannelConversationMessageApi, ChannelJoinApplication, ChannelJoinApplicationNotification, ChannelJoinApplicationPage, ChannelMember, ChannelMemberPage, ChannelMentionMember, ChannelMentionMemberPage, ChannelMiniProgramOpenGame, ChannelMiniProgramRel, ChannelMiniProgramRelConfigType, ChannelMiniProgramRelOpenDecision, ChannelMiniProgramRelOpenSurface, ChannelMuteReason, ChannelPermissionSet, ChannelProfile, ChannelRole, ChannelSessionState, ChatMediaMessageRef, ChatProfileAdapter, ChatRuntime, ChatRuntimeCredentials, ChatRuntimeFactories, ChatRuntimeHostDeps, ChatRuntimeOpResult, ContactCardInput, ContactMessageOptions, ConversationBackgroundPreset, ConversationBackgroundSelection, ConversationCapabilityAction, ConversationCapabilitySnapshot, ConversationDraft, ConversationDraftApi, ConversationEntryUnreadNavigation, ConversationEntryUnreadSnapshot, ConversationHandle, ConversationHandleSnapshot, ConversationInitialPosition, ConversationLastMessageSummary, ConversationListItem, ConversationListMention, ConversationListPresentation, ConversationListPresentationLabels, ConversationListPresentationOptions, ConversationListPreviewMediaKind, ConversationListPreviewSegment, ConversationMessageApi, ConversationOpenOptions, ConversationPrefetchController, ConversationPrefetchControllerOptions, ConversationPrefetchOptions, ConversationPrefetchResult, ConversationRef, ConversationSearchCategory, ConversationSearchPage, ConversationSearchResult, ConversationSystemSummary, ConversationType, CreateThreadItemsInput, DelayedLoadingIndicator, DelayedLoadingIndicatorOptions, DirectConversationCapabilities, DirectConversationMessageApi, DraftInput, EditTextOptions, EmojiEntry, EmojiRecentItem, EmojiSegment, ExpressionMessageOptions, FileMessageOptions, FormatFailureContext, FormatLastMessageContext, FormatMediaPlaceholderContext, FormatServiceTextContext, FormatSystemMessageContext, FormatTimeDisplayContext, ForwardCommandHooks, ForwardFailReason, ForwardItemStatus, ForwardMessageFailure, ForwardMessagesInput, ForwardMessagesResult, ForwardTarget, ForwardedMessageRef, GameMessageOptions, GifFileClassification, GifMessageOptions, GiftMessageOptions, GroupConversationCapabilities, GroupConversationMessageApi, GroupMemberItem, GroupProfile, HighlightSegment, ImAppearanceSettingsApi, ImApplicationItem, ImApplicationRef, ImApplicationsApi, ImAuthIssue, ImAuthProvider, ImCacheOptions, ImCachePrefixMigrationContext, ImCachePrefixMigrator, ImCallKind, ImCallOutcome, ImCallRecordBody, ImCatalog, ImCatalogOverrides, ImChannelConversationAccessSnapshot, ImChannelMemberPresentation, ImChannelMentionApi, ImChannelMentionPresentation, ImChannelMiniProgramRel, ImChannelPermissions, ImChannelPinnedMessage, ImChannelProfile, ImChannelProfilePresentation, ImChannelRole, ImChannelState, ImChannelsApi, ImChatFontScale, ImClientOptions, ImConnectionState, ImContactBody, ImContactKind, ImContactProfile, ImContactRelationship, ImContactRemarkPhone, ImContactSearchResult, ImContactsApi, ImConversationBackgroundApi, ImConversationCapabilitiesApi, ImConversationListApi, ImConversationListSnapshot, ImConversationListState, ImConversationSearchApi, ImCoreApiOptions, ImCreateChannelInput, ImCreateChannelResult, ImCreateFaceToFaceGroupResult, ImCreateGroupInput, ImCreateGroupResult, ImCreatedChannel, ImCreatedGroup, ImDebugOptions, ImDiagnosticCategory, ImDiagnosticError, ImDiagnosticLayer, ImDiagnosticLevel, ImDiagnosticMemoryBuffer, ImDiagnosticMemoryBufferFilter, ImDiagnosticMemoryBufferOptions, ImDiagnosticMemoryBufferSnapshot, ImDiagnosticMessage, ImDiagnosticRecord, ImDiagnosticSink, ImDiagnosticWriter, ImDirectCallAnswerResult, ImDirectCallFailReason, ImDirectCallHangupInput, ImDirectCallHangupReason, ImDirectCallInviteInput, ImDirectCallNotifyAudioInput, ImDirectCallTargetInput, ImDirectCallsApi, ImDirectReadReceiptSettings, ImDirectoryApi, ImDirectoryFieldMatch, ImDirectoryItem, ImDirectoryKind, ImDirectoryPage, ImDirectorySearchApi, ImDirectorySearchItem, ImDirectorySearchResult, ImDraftsApi, ImEmojiCatalogEntry, ImEndpointProvider, ImEventsApi, ImExpressionAsset, ImExpressionAssetInput, ImExpressionEmojiRecentInput, ImExpressionFavoriteKind, ImExpressionOptions, ImExpressionRecentInput, ImExpressionRecentItem, ImExpressionRecentItemKind, ImExpressionsApi, ImFaceToFaceGroup, ImFailureCatalog, ImFileBody, ImFilesAlbumBody, ImForwardOperationResult, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, ImGiftBody, ImGiftSessionType, ImGiftStatus, ImGiftType, ImGiphyAsset, ImGiphyPage, ImGiphyPageOptions, ImGroupCallAnswerInput, ImGroupCallBusyInput, ImGroupCallCreateInput, ImGroupCallJoinInput, ImGroupCallMeetingSnapshot, ImGroupCallMember, ImGroupCallMemberStatus, ImGroupCallStatusInput, ImGroupCallTargetInput, ImGroupCallsApi, ImGroupConversationState, ImGroupMemberPresentation, ImGroupMentionApi, ImGroupPinnedMessage, ImGroupProfile, ImGroupsApi, ImI18n, ImImageBody, ImLastMessageCatalog, ImLifecycleSnapshot, ImLocalDataApi, ImLocalDataInfo, ImLocale, ImLogoutOptions, ImMediaAlbumBody, ImMediaAlbumItem, ImMediaBatchSendResult, ImMediaCatalog, ImMediaConfig, ImMediaTask, ImMediaTasksApi, ImMembershipJoinResult, ImMentionCatalog, ImMessageActionResult, ImMessageBodyKind, ImMessageMention, ImMessageReactionAggregate, ImMessageReactions, ImMessageRef, ImMessageSearchApi, ImMessageView, ImMessageViewBody, ImMessagesByIdResult, ImMiniProgramBody, ImMiniProgramShowType, ImOutboxApi, ImOutboxItem, ImPageToken, ImPartialCatalog, ImPinnedMessageActionResult, ImPinnedMessageErrorKind, ImPinnedMessageOperation, ImPinnedMessageSnapshot, ImProductApplicationUpdate, ImProductAuthInvalidReason, ImProductClient, ImProductEvent, ImProductEventError, ImProductEventMap, ImProductMessage, ImProfileAccessDestination, ImPushApi, ImPushSnapshot, ImQuotedMessagePresentation, ImReactionChangeAction, ImReactionChangeResult, ImReadReceiptSettingsApi, ImRedPacketBody, ImRedPacketType, ImRequestError, ImRequestErrorHandler, ImResourceKind, ImResourceUploadInput, ImResourceUploadProgress, ImResourceUploadResult, ImResourceUploader, ImResourceUploaderConfig, ImRobotBody, ImRobotCommand, ImRobotConversationBindInput, ImRobotDirectoryItem, ImRobotDirectoryPage, ImRobotDirectoryScope, ImRobotModule, ImRobotsApi, ImSdkErrorCategory, ImSdkErrorShape, ImSearchApi, ImServiceCatalog, ImServiceTextKey, ImSessionApi, ImSessionFavoriteAlbumItem, ImSessionFavoriteItem, ImSessionFavoriteKind, ImSessionFavoritesApi, ImSessionLifecycleState, ImSettingsApi, ImStickerAssetInput, ImStickerBody, ImStickerPack, ImSupportedConversationRef, ImSystemCatalog, ImTextResolver, ImTextSearchMatch, ImTextSearchMatchOptions, ImTextSearchMatcher, ImTextSearchRange, ImThreadActiveDateSnapshot, ImThreadDateMarkerMetric, ImThreadDecoration, ImThreadEncryptionItem, ImThreadIntent, ImThreadItem, ImThreadPresentationAdapter, ImThreadReadActions, ImThreadReadTargetResolver, ImThreadViewportMetrics, ImTimeCatalog, ImTransferBody, ImTransferSessionType, ImTransferStatus, ImVideoBody, ImVoiceBody, ImWebPushSubscription, ImWeekdayKey, ImageMessageOptions, ImagePreviewMetadata, IncomingMessageFollowInput, InitialHistoryViewportFillInput, InitialViewportCompletionInput, LinkSegment, LocalConversationHistoryClearResult, LocalMessageDeletionResult, MediaAlbumItemInput, MediaAlbumMessageOptions, MediaBatchBudgetOptions, MediaBatchLimitInfo, MediaFileClassification, MediaLimitItem, MediaObjectUrlLease, MediaPresentationFit, MediaPresentationPolicy, MediaPresentationRule, MediaPresentationSourceCandidate, MediaPresentationSourceQuality, MediaSendBatchResult, MediaTransferErrorCode, MediaTransferPresentation, MediaUploadCredentials, MediaUploadCredentialsProvider, MediaUploadCredentialsRequest, MemberTargetCapabilityAction, MemberTargetCapabilityInput, MentionCandidate, MentionCandidatePage, MentionInput, MessageCapabilityAction, MessageCapabilityInput, MessageContentType, MessageLocateScrollProtectionInput, MessageNotificationDecision, MessageNotificationInput, MessageSearchPreviewOptions, MessageSearchPreviewSegment, MessageWindowInfo, MessageWindowPage, MessagesByIdFailure, MigrateImCachePrefixInput, MiniProgramGamePreviewInput, MiniProgramGamePreviewLayout, MiniProgramHostLocale, MiniProgramMessageOptions, MiniProgramOpenUrlInput, NewMessageBadgeController, NewMessageBadgeCountListener, NewMessageBadgeVisibilityInput, NewerHistoryPageTriggerInput, OlderHistoryPrefetchInput, PrependAnchorCandidate, PrependAnchorViewport, PrependMessageAnchorPosition, ProductConversationListType, ProductHandleConversationType, ProductMessageSearchPage, ProductMessageSearchPreviewPart, ProductMessageSearchResult, RemoteMessageBadgeTrackingInput, ResolveMediaPresentationInput, ResolveTextOptions, ResolvedConversationBackground, ResolvedMediaPresentation, RichExtraSegment, RobotConversationCapabilities, RuntimeClientOperation, RuntimeOperation, SearchBatchResult, SearchFilesInput, SearchMessagesInput, SearchTextMessagesInput, SegmentMatch, SegmentMatcher, SendCapabilityMode, SendCommandHooks, SendMessageResult, SendVoicePayload, SenderProfileEntry, ServiceNoteHooks, StandaloneEmojiMessage, StickerAssetKind, TextMessageOptions, TextSegment, TransferMessageOptions, UnicodeEmojiEntry, UnknownMessageBody, UserProfile, VideoMessageOptions, VideoPreviewMetadata, VisibleChannelMiniProgramRels, VoiceCapabilities, VoiceErrorCode, VoiceMessageMetadata, VoicePlayer, VoicePlayerOptions, VoicePlayerState, VoiceRecordingResult, VoiceRecordingSession, VoiceRecordingSessionOptions, VoiceRecordingState, VoiceToggleOptions };
|