k2-im 0.1.28 → 0.1.30
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 +165 -18
- package/dist/chat-kit-pinia.js +1 -1
- package/dist/chat-kit-vue.d.ts +98 -18
- package/dist/chat-kit-vue.js +1 -1
- package/dist/chat-kit.d.ts +213 -20
- package/dist/chat-kit.js +1 -1
- package/dist/chunk-37HOEWMF.js +1 -0
- package/dist/chunk-4KPJTXQN.js +2 -0
- package/dist/chunk-GHZUH7RB.js +7 -0
- package/dist/chunk-MNWNUGIV.js +2 -0
- package/dist/chunk-SLFKCTEX.js +1 -0
- package/dist/chunk-VRGWQLDM.js +1 -0
- package/dist/chunk-XA4W5PWT.js +2 -0
- package/dist/i18n.d.ts +77 -5
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +292 -21
- package/dist/index.js +1 -1
- package/dist/sdk.d.ts +189 -17
- package/dist/sdk.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-BIFDS3MH.js +0 -1
- package/dist/chunk-D2FFU7J5.js +0 -2
- package/dist/chunk-DVQGXZ6S.js +0 -2
- package/dist/chunk-FQJBDSXT.js +0 -7
- package/dist/chunk-H7AM5DTT.js +0 -1
- package/dist/chunk-O7GQQMEW.js +0 -2
- package/dist/chunk-YUPKU2L7.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
/** 媒体业务类型:实现据此选对象存储逻辑桶;sticker 对应 app-sticker。 */
|
|
2
2
|
type MediaKind = 'image' | 'video' | 'voice' | 'file' | 'sticker';
|
|
3
|
+
/** 传输进度(上传/下载共用)。percent=0-100 整数(UI 进度环);字节数供精确展示。 */
|
|
4
|
+
interface MediaTransferProgress {
|
|
5
|
+
percent: number;
|
|
6
|
+
bytesTransferred: number;
|
|
7
|
+
bytesTotal: number;
|
|
8
|
+
/** 上传专用阶段;finalizing 表示请求体已发完、正在等待对象存储成功响应。下载可省略。 */
|
|
9
|
+
phase?: 'transferring' | 'finalizing';
|
|
10
|
+
}
|
|
3
11
|
|
|
4
12
|
/** 会话类型。P0 只用 direct / group。 */
|
|
5
13
|
type ConversationType = 'direct' | 'group' | 'channel' | 'supergroup';
|
|
@@ -39,8 +47,8 @@ interface ConversationDraft$1 {
|
|
|
39
47
|
attachments: readonly [];
|
|
40
48
|
updatedAt: number;
|
|
41
49
|
}
|
|
42
|
-
/** 消息内容类型。sticker=表情/贴图(BMessage contentType=7);call=单聊通话记录(contentType=10);transfer=转账(contentType=16);miniProgram=小程序分享卡(contentType=22);redPacket=红包卡(contentType=25);game=小游戏(contentType=27);未知 wire 正文统一归一为 unknown。 */
|
|
43
|
-
type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'call' | 'redPacket' | 'mediaAlbum' | 'unknown';
|
|
50
|
+
/** 消息内容类型。sticker=表情/贴图(BMessage contentType=7);call=单聊通话记录(contentType=10);transfer=转账(contentType=16);robot=机器人卡片(contentType=18);miniProgram=小程序分享卡(contentType=22);redPacket=红包卡(contentType=25);game=小游戏(contentType=27);未知 wire 正文统一归一为 unknown。 */
|
|
51
|
+
type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'call' | 'redPacket' | 'mediaAlbum' | 'robot' | 'unknown';
|
|
44
52
|
/**
|
|
45
53
|
* 发送态(客户端态):消息从本地创建到服务端确认的生命周期。
|
|
46
54
|
* `uploading` 仅媒体消息使用:文件上传阶段(uploading→pending→sending→sent);
|
|
@@ -102,6 +110,8 @@ type LastMessageSummary = {
|
|
|
102
110
|
kind: 'contact';
|
|
103
111
|
} | {
|
|
104
112
|
kind: 'miniProgram';
|
|
113
|
+
} | {
|
|
114
|
+
kind: 'robot';
|
|
105
115
|
} | {
|
|
106
116
|
kind: 'game';
|
|
107
117
|
gameType: ImGameType;
|
|
@@ -136,6 +146,13 @@ type LastMessageSummary = {
|
|
|
136
146
|
firstItemKind?: 'image' | 'video';
|
|
137
147
|
} | {
|
|
138
148
|
kind: 'encrypted';
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* 密文解密失败/缺密钥占位。必须独立于 `encrypted`:后者只表示「还是密文」,
|
|
152
|
+
* 前者要对齐 iOS 解密失败长文案,不能再伪装成「[加密消息]」。
|
|
153
|
+
*/
|
|
154
|
+
| {
|
|
155
|
+
kind: 'decrypt-failed';
|
|
139
156
|
} | {
|
|
140
157
|
kind: 'recalled';
|
|
141
158
|
by: string;
|
|
@@ -190,8 +207,12 @@ interface ImVideoBody {
|
|
|
190
207
|
thumbData?: Uint8Array;
|
|
191
208
|
/** 视频文件 MD5(BMessage.MD5;Android 当前未赋值,保留可选)。 */
|
|
192
209
|
md5?: string;
|
|
193
|
-
/**
|
|
210
|
+
/** 已确认的视频大小(字节),来自本地文件或合集;历史单视频的大小单位不明确时省略,下载总量由 HTTP 响应确定。 */
|
|
194
211
|
size?: number;
|
|
212
|
+
/** SDK 本地字节值标记,供持久化读取区分旧版本曾按 KB 换算的记录。 */
|
|
213
|
+
sizeUnit?: 'bytes';
|
|
214
|
+
/** 未确认单位的历史大小,十进制无符号整数;SDK 仅用于原样转发,宿主不得将它用于显示大小或规划下载。 */
|
|
215
|
+
unverifiedFileLength?: string;
|
|
195
216
|
/** 视频描述(BMessage.describe,可选)。 */
|
|
196
217
|
describe?: string;
|
|
197
218
|
/** 文件解密 TEA key 原始字节(仅密文视频有;接收端解 BContent 后从 BMessage.teaKey 得,用于解下载到的原视频文件)。 */
|
|
@@ -326,6 +347,53 @@ interface ImMiniProgramBody {
|
|
|
326
347
|
/** 多语言子游戏名 JSON 字符串,例如 `{"ch":"...","en":"..."}`。 */
|
|
327
348
|
subGameName?: string;
|
|
328
349
|
}
|
|
350
|
+
/**
|
|
351
|
+
* 机器人卡片文本模块(wire `section`)。
|
|
352
|
+
*
|
|
353
|
+
* `content` 保留原文,可含 Markdown 链接与裸 URL;宿主负责展示层解析,不在 Core 拆成富文本树。
|
|
354
|
+
*/
|
|
355
|
+
interface ImRobotTextModule {
|
|
356
|
+
type: 'section';
|
|
357
|
+
textType: string;
|
|
358
|
+
content: string;
|
|
359
|
+
}
|
|
360
|
+
/** 机器人卡片图片组;`src` 是明文 http(s),不走消息 TEA 文件通道。 */
|
|
361
|
+
interface ImRobotImageGroupModule {
|
|
362
|
+
type: 'image-group';
|
|
363
|
+
images: readonly string[];
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* 机器人卡片倒计时。
|
|
367
|
+
*
|
|
368
|
+
* `endTimeMs` 已归一为 epoch 毫秒;wire 秒/毫秒混用只在 mapper 转换,宿主不要再猜单位。
|
|
369
|
+
*/
|
|
370
|
+
interface ImRobotCountdownModule {
|
|
371
|
+
type: 'countdown';
|
|
372
|
+
endTimeMs: number;
|
|
373
|
+
}
|
|
374
|
+
type ImRobotModule = ImRobotTextModule | ImRobotImageGroupModule | ImRobotCountdownModule;
|
|
375
|
+
/** 机器人卡片底部指令;`miniProgram` 仅打开小程序时存在。 */
|
|
376
|
+
interface ImRobotCommand {
|
|
377
|
+
menuName: string;
|
|
378
|
+
menuId?: string;
|
|
379
|
+
/** wire `msg_type`;`2` 表示打开小程序,其它走固定话术。第一期宿主可只展示。 */
|
|
380
|
+
messageType?: string;
|
|
381
|
+
miniProgram?: {
|
|
382
|
+
path?: string;
|
|
383
|
+
appId?: string;
|
|
384
|
+
domain?: string;
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* 机器人卡片正文(contentType==='robot',协议 BMessage.contentType=18)。
|
|
389
|
+
*
|
|
390
|
+
* @remarks 排版数据在 `BMessage.content` JSON。解析失败仍保留 robot 类型与空模块,
|
|
391
|
+
* 不能退化成 unknown——iOS 此时仍画出卡片头。divider 与未识别 module 在 mapper 丢弃。
|
|
392
|
+
*/
|
|
393
|
+
interface ImRobotBody {
|
|
394
|
+
modules: readonly ImRobotModule[];
|
|
395
|
+
commands: readonly (readonly ImRobotCommand[])[];
|
|
396
|
+
}
|
|
329
397
|
/** 转账状态。0 待领取 / 1 已收款 / 2 已退还 / 3 已过期(对齐 iOS IMTranferBody,过期 3 以客户端为准)。 */
|
|
330
398
|
type ImTransferStatus = 0 | 1 | 2 | 3;
|
|
331
399
|
/** 转账会话类型。1 个人 / 2 群(BMessage.sessionType)。 */
|
|
@@ -520,6 +588,8 @@ interface ImMessageBody {
|
|
|
520
588
|
redPacket?: ImRedPacketBody;
|
|
521
589
|
/** contentType==='mediaAlbum' 时的媒体合集正文(配文 + 1~9 个图片/视频项)。 */
|
|
522
590
|
mediaAlbum?: ImMediaAlbumBody;
|
|
591
|
+
/** contentType==='robot' 时的机器人卡片。 */
|
|
592
|
+
robot?: ImRobotBody;
|
|
523
593
|
/** contentType==='unknown' 时的稳定未知正文,不含原始 wire type。 */
|
|
524
594
|
unknown?: UnknownMessageBody;
|
|
525
595
|
}
|
|
@@ -596,7 +666,7 @@ interface ImMessageEncryption {
|
|
|
596
666
|
encrypted: boolean;
|
|
597
667
|
/** 扩展:加密方案标识,默认 'rsa-tea'。 */
|
|
598
668
|
scheme?: 'rsa-tea';
|
|
599
|
-
/** true=密文但解密失败/缺密钥(占位,非真实空正文):供 UI
|
|
669
|
+
/** true=密文但解密失败/缺密钥(占位,非真实空正文):供 UI 显式渲染解密失败提示,与明文空消息、普通密文区分。 */
|
|
600
670
|
decryptFailed?: boolean;
|
|
601
671
|
}
|
|
602
672
|
/** 单条消息领域模型(§4.1)。主键为客户端生成的 id(无 serverId)。 */
|
|
@@ -1820,6 +1890,41 @@ interface ImSessionFavoritePort {
|
|
|
1820
1890
|
delete: (collectIds: readonly string[]) => Promise<void>;
|
|
1821
1891
|
}
|
|
1822
1892
|
|
|
1893
|
+
/**
|
|
1894
|
+
* SDK 已取得的最近一页请求结果;只是可重建缓存,不代表消息已进入 DomainState 或处理过入站副作用。
|
|
1895
|
+
* 消息、Reaction 与分页边界必须整页原子保存,只有前台实际消费时才进入正常消息流程。
|
|
1896
|
+
*/
|
|
1897
|
+
interface ImRecentHistoryPage {
|
|
1898
|
+
/** 缓存记录格式版本;不认识的版本不能当作有效页使用。 */
|
|
1899
|
+
version: 1;
|
|
1900
|
+
/** 当前账号内的精确 GROUP/CHANNEL 会话;direct 没有此远端最近页能力。 */
|
|
1901
|
+
conversation: ConversationRef<'group' | 'channel'>;
|
|
1902
|
+
/** 成功获取页面的毫秒时间,用于保留期限和按获取时间淘汰。 */
|
|
1903
|
+
fetchedAt: number;
|
|
1904
|
+
/** SDK 生成的请求与会话状态指纹;存储层不解释其内容。 */
|
|
1905
|
+
fingerprint: string;
|
|
1906
|
+
/** 已净化的消息事实,缓存保存不得发布消息或已读事件。 */
|
|
1907
|
+
messages: readonly ImMessage[];
|
|
1908
|
+
/** 解码时暂存的 Reaction 事实,预取阶段不得提前应用。 */
|
|
1909
|
+
reactions: readonly ImReactionEvent[];
|
|
1910
|
+
/** 服务端是否明确没有更早一页,空页也保留这一结果。 */
|
|
1911
|
+
exhausted: boolean;
|
|
1912
|
+
/** 服务端返回的向旧游标,存储层仅原样保存。 */
|
|
1913
|
+
nextCursor?: string;
|
|
1914
|
+
/** SDK 按净化后的整页计算的字节数,用于存储预算。 */
|
|
1915
|
+
byteLength: number;
|
|
1916
|
+
}
|
|
1917
|
+
/** 账号隔离的最近页缓存;过期、淘汰或清理后重新请求即可,不影响消息真相。 */
|
|
1918
|
+
interface ImRecentHistoryCachePort {
|
|
1919
|
+
/** 读取精确会话的整页;不存在或超过保留期限时返回 null。 */
|
|
1920
|
+
get: (conversation: ConversationRef<'group' | 'channel'>) => Promise<ImRecentHistoryPage | null>;
|
|
1921
|
+
/** 原子保存整页;仅 durable 事务提交后返回 true,预算或保留期限不允许时返回 false。 */
|
|
1922
|
+
put: (page: ImRecentHistoryPage) => Promise<boolean>;
|
|
1923
|
+
/** 删除精确会话的缓存页,不删除正常历史或会话。 */
|
|
1924
|
+
delete: (conversation: ConversationRef<'group' | 'channel'>) => Promise<void>;
|
|
1925
|
+
/** 清空当前账号的最近页缓存。 */
|
|
1926
|
+
clear: () => Promise<void>;
|
|
1927
|
+
}
|
|
1823
1928
|
/** 迁移期存储会话入参;新代码使用 ref,string 仅兼容唯一命中的旧调用。 */
|
|
1824
1929
|
type ImStorageConversation = ConversationRef | string;
|
|
1825
1930
|
/** 打开账号库的选项。namespace = 账号隔离键(登录 userId)。 */
|
|
@@ -1968,6 +2073,8 @@ type StoredConversationBackground = {
|
|
|
1968
2073
|
* 失败经 `error` 事件(scope:'storage')暴露、不静默吞、不阻塞内存主流程。
|
|
1969
2074
|
*/
|
|
1970
2075
|
interface ImStoragePort {
|
|
2076
|
+
/** 可选的最近页持久缓存;缺少该能力时 SDK 必须明确跳过持久预取。 */
|
|
2077
|
+
recentHistoryCache?: ImRecentHistoryCachePort;
|
|
1971
2078
|
/** 打开/创建账号库并跑迁移(幂等)。open 前的读写应视为未就绪并抛错(不静默兜底)。 */
|
|
1972
2079
|
open: (options: ImStorageOpenOptions) => Promise<void>;
|
|
1973
2080
|
/** 关闭库句柄(登出/切账号)。 */
|
|
@@ -2129,6 +2236,10 @@ interface ImStoragePort {
|
|
|
2129
2236
|
type ImEvent = {
|
|
2130
2237
|
type: 'connection:changed';
|
|
2131
2238
|
state: ImConnectionState;
|
|
2239
|
+
}
|
|
2240
|
+
/** 同账号已由另一个浏览器页面接管;本页会话不可复用,但宿主登录仍有效。 */
|
|
2241
|
+
| {
|
|
2242
|
+
type: 'session:replaced';
|
|
2132
2243
|
} | {
|
|
2133
2244
|
type: 'message:received';
|
|
2134
2245
|
message: ImMessage;
|
|
@@ -3104,24 +3215,32 @@ interface MediaTransferAdapterConfig {
|
|
|
3104
3215
|
/** 是否启用 S3 Transfer Acceleration(默认 true;`cn-` 分区没有加速端点,会强制关闭)。 */
|
|
3105
3216
|
useAccelerateEndpoint?: boolean;
|
|
3106
3217
|
/**
|
|
3107
|
-
*
|
|
3218
|
+
* 统一允许 S3 分片上传和 Range 分段下载,默认 false(单次 PUT / 普通 GET)。
|
|
3219
|
+
* 显式 true 后仍按 16MiB 阈值及已确认下载大小选择策略,小资源不分片。
|
|
3220
|
+
* 开启前各桶须支持分片请求方法,并暴露上传 ETag、下载 Content-Range 与强 ETag。
|
|
3221
|
+
* @example { multipartTransfer: true } 同时允许大资源分片上传、下载。
|
|
3222
|
+
*/
|
|
3223
|
+
multipartTransfer?: boolean;
|
|
3224
|
+
/**
|
|
3225
|
+
* 总开关开启后,是否允许超过分片阈值(16MiB)的上传使用 S3 分片上传。
|
|
3108
3226
|
*
|
|
3109
3227
|
* 分片相比单次 PUT 需要各物理桶的 CORS 额外放行 POST(Create/CompleteMultipartUpload)、
|
|
3110
3228
|
* DELETE(AbortMultipartUpload)并 `ExposeHeaders: ETag`;未配齐时分片会直接失败。
|
|
3111
|
-
*
|
|
3229
|
+
* @deprecated 优先使用 multipartTransfer 统一控制;本字段 false 仅进一步关闭上传,true 不能单独开启。
|
|
3112
3230
|
*/
|
|
3113
3231
|
multipartUpload?: boolean;
|
|
3114
3232
|
/**
|
|
3115
|
-
*
|
|
3233
|
+
* 总开关开启后,大于 16MiB 的明文/simple 文件是否尝试 Range 并发下载。
|
|
3116
3234
|
* 需要下载域名支持 Range,并暴露 Content-Range 与强 ETag;返回 200 时消费完整响应并记录诊断。
|
|
3117
|
-
*
|
|
3235
|
+
* @deprecated 优先使用 multipartTransfer 统一控制;本字段 false 仅进一步关闭下载,true 不能单独开启。
|
|
3118
3236
|
*/
|
|
3119
3237
|
rangeDownload?: boolean;
|
|
3120
3238
|
/**
|
|
3121
|
-
* 媒体发送阶段的并发上限;由 im-core
|
|
3239
|
+
* 媒体发送阶段的并发上限;由 im-core 消费,限制媒体任务数而非分片请求数。
|
|
3122
3240
|
*
|
|
3123
|
-
*
|
|
3124
|
-
* 缺省 5
|
|
3241
|
+
* 并发按媒体体积分两档:不超过分片阈值(16 MiB)的非视频媒体走小文件档,
|
|
3242
|
+
* 缺省 5;视频与超过阈值(或字节数未知)的内容走大文件档,缺省 3。
|
|
3243
|
+
* 分档只限制媒体任务数;实际 PUT/UploadPart 另受 adapter 的六路数据请求限制。
|
|
3125
3244
|
* 两档都只接受 1-6 的整数,超出范围由 core 显式报错。
|
|
3126
3245
|
* - 传一个数字:所有媒体共用这一个并发数,与分档前的语义一致。
|
|
3127
3246
|
* - 传 `{ total, largeFiles }`:显式分档,`largeFiles` 不得超过 `total`。
|
|
@@ -3141,6 +3260,7 @@ interface MediaTransferAdapterConfig {
|
|
|
3141
3260
|
* - `credentials-request-failed`:宿主取凭证失败(网络、鉴权或业务码非成功);`cause` 保留宿主原始错误。
|
|
3142
3261
|
* - `credentials-invalid`:凭证回包缺少必要字段或字段非法,不允许用半份凭证去签名。
|
|
3143
3262
|
* - `upload-source-invalid`:上传内容既不是 `Uint8Array` 也不是 `Blob`(纯 JS 宿主绕过类型时的 fail-fast)。
|
|
3263
|
+
* - `upload-size-exceeded`:超过单次 PUT 或当前固定分片策略的大小上限,申请凭据前拒绝。
|
|
3144
3264
|
* - `multipart-etag-missing`:分片响应读不到 ETag,**桶 CORS 缺 `ExposeHeaders: ETag`**,不是网络问题。
|
|
3145
3265
|
* - `multipart-abort-failed`:分片失败后的 `AbortMultipartUpload` 清理本身失败,已上传分片可能残留并计费。
|
|
3146
3266
|
* - `multipart-upload-failed`:分片上传因其它原因失败;`cause` 保留原始错误,消息列出分片对 CORS 的额外要求。
|
|
@@ -3148,7 +3268,7 @@ interface MediaTransferAdapterConfig {
|
|
|
3148
3268
|
* - `download-object-changed`:分段之间的强 ETag 或总长度改变,拒绝混合不同文件版本。
|
|
3149
3269
|
* - `download-range-failed`:下载返回非成功 HTTP 状态。
|
|
3150
3270
|
*/
|
|
3151
|
-
type MediaTransferErrorCode = 'bucket-unconfigured' | 'credentials-provider-missing' | 'credentials-request-failed' | 'credentials-invalid' | 'upload-source-invalid' | 'multipart-etag-missing' | 'multipart-abort-failed' | 'multipart-upload-failed' | 'download-range-invalid' | 'download-object-changed' | 'download-range-failed';
|
|
3271
|
+
type MediaTransferErrorCode = 'bucket-unconfigured' | 'credentials-provider-missing' | 'credentials-request-failed' | 'credentials-invalid' | 'upload-source-invalid' | 'upload-size-exceeded' | 'multipart-etag-missing' | 'multipart-abort-failed' | 'multipart-upload-failed' | 'download-range-invalid' | 'download-object-changed' | 'download-range-failed';
|
|
3152
3272
|
/** 媒体传输统一错误:携带稳定业务码 + 可选底层 cause(诊断用,永不携带凭证明文)。 */
|
|
3153
3273
|
declare class MediaTransferError extends Error {
|
|
3154
3274
|
readonly code: MediaTransferErrorCode;
|
|
@@ -3195,8 +3315,8 @@ interface IndexedDbStorageAdapterOptions {
|
|
|
3195
3315
|
maxPendingWriteBytes?: number;
|
|
3196
3316
|
};
|
|
3197
3317
|
}
|
|
3198
|
-
/** 官方浏览器 adapter
|
|
3199
|
-
type IndexedDbStorageAdapter = ImStoragePort & MediaAssetCachePort & Required<Pick<ImStoragePort, 'getConversationBackground' | 'saveConversationBackground' | 'deleteConversationBackground' | 'getDefaultConversationBackground' | 'saveDefaultConversationBackground' | 'deleteDefaultConversationBackground'>>;
|
|
3318
|
+
/** 官方浏览器 adapter 始终提供背景和最近历史缓存;可选只存在于通用 `ImStoragePort` 兼容边界。 */
|
|
3319
|
+
type IndexedDbStorageAdapter = ImStoragePort & MediaAssetCachePort & Required<Pick<ImStoragePort, 'getConversationBackground' | 'recentHistoryCache' | 'saveConversationBackground' | 'deleteConversationBackground' | 'getDefaultConversationBackground' | 'saveDefaultConversationBackground' | 'deleteDefaultConversationBackground'>>;
|
|
3200
3320
|
/**
|
|
3201
3321
|
* 创建 IndexedDB 存储 adapter(实现 ImStoragePort)。
|
|
3202
3322
|
* 生命周期:先 `open({ namespace })`(幂等,跑 schema 迁移),再读写;`close()` 释放句柄。
|
|
@@ -3975,6 +4095,21 @@ interface ImContactApi extends ImDirectoryApi<'individual'> {
|
|
|
3975
4095
|
deleteFriendship: (userId: string) => Promise<void>;
|
|
3976
4096
|
}
|
|
3977
4097
|
|
|
4098
|
+
/** 后台最近页预取的取消条件;取消不影响正在复用同一请求的前台会话。 */
|
|
4099
|
+
interface ConversationPrefetchOptions {
|
|
4100
|
+
signal?: AbortSignal;
|
|
4101
|
+
}
|
|
4102
|
+
/**
|
|
4103
|
+
* 单个会话的后台预取结果。ready 只在完整页面已写入当前账号缓存后返回。
|
|
4104
|
+
* skipped 表示当前类型、权限、存储或预算不允许预取;失败不改变正常打开会话的行为。
|
|
4105
|
+
*/
|
|
4106
|
+
interface ConversationPrefetchResult {
|
|
4107
|
+
ref: ConversationRef<'direct' | 'group' | 'channel'>;
|
|
4108
|
+
status: 'ready' | 'skipped' | 'failed' | 'cancelled';
|
|
4109
|
+
reason?: 'unsupported' | 'unavailable' | 'storage-unavailable' | 'budget' | 'page-too-large' | 'decrypt-failed' | 'invalidated' | 'cancelled';
|
|
4110
|
+
error?: ImSdkErrorShape;
|
|
4111
|
+
}
|
|
4112
|
+
|
|
3978
4113
|
/**
|
|
3979
4114
|
* 当前账号草稿的产品 DTO、跨组件 API 与 handle 绑定门面。
|
|
3980
4115
|
* 草稿按复合会话身份串行持久化,SDK DomainState 是唯一真相;附件尚未闭合时非空输入明确拒绝。
|
|
@@ -4064,6 +4199,8 @@ interface ImConversationsApi {
|
|
|
4064
4199
|
pullOffline: () => Promise<ImMessage[]>;
|
|
4065
4200
|
/** 运行 direct/GROUP/CHANNEL sibling 离线同步。 */
|
|
4066
4201
|
sync: () => Promise<void>;
|
|
4202
|
+
/** 静默准备最近页;结果成功表示当前账号缓存事务已提交。 */
|
|
4203
|
+
prefetchRecent: (refs: readonly ImSupportedConversationRef[], options?: ConversationPrefetchOptions) => Promise<readonly ConversationPrefetchResult[]>;
|
|
4067
4204
|
/** 聚合总未读;默认排除 muted 会话。 */
|
|
4068
4205
|
getTotalUnread: (options?: {
|
|
4069
4206
|
includeMuted?: boolean;
|
|
@@ -4684,6 +4821,8 @@ type ConversationLastMessageSummary = {
|
|
|
4684
4821
|
kind: 'contact';
|
|
4685
4822
|
} | {
|
|
4686
4823
|
kind: 'miniProgram';
|
|
4824
|
+
} | {
|
|
4825
|
+
kind: 'robot';
|
|
4687
4826
|
} | {
|
|
4688
4827
|
kind: 'transfer';
|
|
4689
4828
|
} | {
|
|
@@ -4714,6 +4853,10 @@ type ConversationLastMessageSummary = {
|
|
|
4714
4853
|
firstItemKind?: 'image' | 'video';
|
|
4715
4854
|
} | {
|
|
4716
4855
|
kind: 'encrypted';
|
|
4856
|
+
}
|
|
4857
|
+
/** 密文解密失败占位;与 `encrypted` 分开,列表走独立 iOS 长文案。 */
|
|
4858
|
+
| {
|
|
4859
|
+
kind: 'decrypt-failed';
|
|
4717
4860
|
} | {
|
|
4718
4861
|
kind: 'recalled';
|
|
4719
4862
|
by: string;
|
|
@@ -4795,6 +4938,8 @@ interface ImConversationListApi extends ImConversationBackgroundApi {
|
|
|
4795
4938
|
subscribe: (listener: (snapshot: ImConversationListSnapshot) => void) => () => void;
|
|
4796
4939
|
/** 显式运行 direct/GROUP/CHANNEL sibling 同步;失败抛稳定产品错误并进入 error 快照。 */
|
|
4797
4940
|
refresh: () => Promise<void>;
|
|
4941
|
+
/** 静默预取各会话最近一页;不激活线程,ready 只表示持久缓存已完成。 */
|
|
4942
|
+
prefetchRecent: (refs: readonly ConversationRef<ProductConversationListType>[], options?: ConversationPrefetchOptions) => Promise<readonly ConversationPrefetchResult[]>;
|
|
4798
4943
|
/** 读取总未读;默认排除 muted 会话。 */
|
|
4799
4944
|
getTotalUnread: (options?: {
|
|
4800
4945
|
includeMuted?: boolean;
|
|
@@ -5080,6 +5225,8 @@ type ConversationInitialPosition = 'latest' | 'first-unread';
|
|
|
5080
5225
|
* @remarks 选项只影响初始连续窗口和 `entryUnread` 快照;发送、历史分页、已读和 close 语义保持不变。
|
|
5081
5226
|
*/
|
|
5082
5227
|
interface ConversationOpenOptions {
|
|
5228
|
+
/** 取消尚未交付的会话打开及其历史请求;句柄交付后由 close 管理生命周期。 */
|
|
5229
|
+
signal?: AbortSignal;
|
|
5083
5230
|
/**
|
|
5084
5231
|
* 初始连续窗口位置。
|
|
5085
5232
|
*
|
|
@@ -5718,6 +5865,8 @@ interface ImProductEventMap {
|
|
|
5718
5865
|
'connection:changed': Readonly<{
|
|
5719
5866
|
snapshot: ImLifecycleSnapshot;
|
|
5720
5867
|
}>;
|
|
5868
|
+
/** 另一个页面接管聊天;宿主可提示刷新此页重新接管,不应退出业务登录。 */
|
|
5869
|
+
'session:replaced': Readonly<Record<never, never>>;
|
|
5721
5870
|
'message:received': Readonly<{
|
|
5722
5871
|
ref: ConversationRef<ProductConversationListType>;
|
|
5723
5872
|
message: ImProductMessage;
|
|
@@ -6232,15 +6381,16 @@ declare function resolveImEmojiToken(token: string): ImEmojiCatalogEntry | undef
|
|
|
6232
6381
|
*
|
|
6233
6382
|
* 形状 = im-browser `MediaTransferAdapterConfig`:必填 `getUploadCredentials`(按逻辑桶名向宿主自己的 BFF 申请
|
|
6234
6383
|
* STS 临时凭证)+ 各 `MediaKind`(image/video/voice/file/sticker)的**逻辑桶名** + 可选 `channelBuckets`(社群会话
|
|
6235
|
-
* 按类型覆盖)、`avatarBucket`、`useAccelerateEndpoint`、`
|
|
6384
|
+
* 按类型覆盖)、`avatarBucket`、`useAccelerateEndpoint`、`multipartTransfer`、`maxConcurrentUploads`。
|
|
6236
6385
|
*
|
|
6237
6386
|
* 上传凭证由业务后端按登录态签发(与 iOS、prod H5 同一个接口),回包同时给出**物理桶**、区域、`key_prefix` 和
|
|
6238
6387
|
* 公开访问域名;SDK 据此拼 object key 与消息体 URL,宿主 env 里配的只是申请凭证用的逻辑桶名。凭证缓存(本地
|
|
6239
6388
|
* 1 小时、按服务端过期时间提前 5 分钟失效)、同桶单飞与失败重签由 SDK 负责,宿主只需提供「打一次接口」的纯函数。
|
|
6240
6389
|
*
|
|
6241
|
-
*
|
|
6390
|
+
* 默认单次 PUT/GET;仅 multipartTransfer=true 才允许大资源分片上传、下载。
|
|
6391
|
+
* 各 bucket 需在对象存储侧配置 CORS 允许本站 origin 的 PUT + GET;开启分片后,超过 16MiB 的上传另需放行
|
|
6242
6392
|
* POST(Create/CompleteMultipartUpload)、DELETE(AbortMultipartUpload)并 ExposeHeaders: ETag。CORS 未配齐时
|
|
6243
|
-
*
|
|
6393
|
+
* 下载还需暴露 Content-Range 与强 ETag;multipartTransfer=false 统一关闭分片上传和下载。
|
|
6244
6394
|
* ⚠ 并发字段只由 SDK core 的媒体编排消费;adapter 会忽略该字段。高内存设备可设置 5-6,低内存设备建议 2-3。
|
|
6245
6395
|
*/
|
|
6246
6396
|
type ImMediaConfig = MediaTransferAdapterConfig;
|
|
@@ -6859,6 +7009,65 @@ declare const IMAGE_MESSAGE_ACCEPT = "image/jpeg,image/png,image/webp";
|
|
|
6859
7009
|
*/
|
|
6860
7010
|
declare function isSupportedImageFile(file: Blob): Promise<boolean>;
|
|
6861
7011
|
|
|
7012
|
+
/** 通用资源类型,只决定使用哪个宿主逻辑桶,不包含消息或会话语义。 */
|
|
7013
|
+
type ImResourceKind = MediaKind;
|
|
7014
|
+
/** 上传进度;请求体传完后仍需等待对象存储确认,成功响应后才报告 100%。 */
|
|
7015
|
+
type ImResourceUploadProgress = Readonly<MediaTransferProgress>;
|
|
7016
|
+
/** 复用 IM 的普通媒体桶和凭证合同;不采用社群覆盖桶,不需要认证或连接运行时。 */
|
|
7017
|
+
type ImResourceUploaderConfig = Pick<MediaTransferAdapterConfig, 'buckets' | 'getUploadCredentials' | 'useAccelerateEndpoint' | 'multipartTransfer' | 'multipartUpload'>;
|
|
7018
|
+
/** 上传原始资源的参数。文件选择、压缩、转码和缩略图生成由宿主决定。 */
|
|
7019
|
+
interface ImResourceUploadInput {
|
|
7020
|
+
/** 原始 File/Blob;直接交给传输层,不预读整个文件,不执行消息加密。 */
|
|
7021
|
+
file: Blob;
|
|
7022
|
+
/** 资源类型;使用 config.buckets[kind],缺少桶配置时明确失败。 */
|
|
7023
|
+
kind: ImResourceKind;
|
|
7024
|
+
/** 可覆盖 File.name;Blob 没有文件名时可提供扩展名。对象名由 SDK 生成。 */
|
|
7025
|
+
filename?: string;
|
|
7026
|
+
/** 主动取消会中断请求并清理未完成分片;不提供跨调用或刷新续传。 */
|
|
7027
|
+
signal?: AbortSignal;
|
|
7028
|
+
/** 只在本次上传仍有效时通知;回调应保持同步、无异常。 */
|
|
7029
|
+
onProgress?: (progress: ImResourceUploadProgress) => void;
|
|
7030
|
+
}
|
|
7031
|
+
/** 对象存储确认上传成功后的资源,不包含签名凭证或私有分片状态。 */
|
|
7032
|
+
interface ImResourceUploadResult {
|
|
7033
|
+
/** 服务端凭证中公开域名对应的资源 URL,可交给动态、资料等宿主业务。 */
|
|
7034
|
+
url: string;
|
|
7035
|
+
}
|
|
7036
|
+
/** 独立资源上传器;不创建消息、Outbox 项或 client.media 任务。 */
|
|
7037
|
+
interface ImResourceUploader {
|
|
7038
|
+
/**
|
|
7039
|
+
* 上传原始文件。默认单次 PUT;multipartTransfer=true 且 >16 MiB 才允许分片,沿用既有凭证刷新策略。
|
|
7040
|
+
* 失败会清理未完成分片并保留错误,显式重试须再次调用 upload;不会退回旧 HTTP 上传接口。
|
|
7041
|
+
* @throws 取消为 AbortError;若取消后的分片清理失败,仍报告 multipart-abort-failed。
|
|
7042
|
+
* 配置、凭证、S3 或清理失败直接拒绝;dispose 后不可再使用。
|
|
7043
|
+
*/
|
|
7044
|
+
upload: (input: ImResourceUploadInput) => Promise<ImResourceUploadResult>;
|
|
7045
|
+
/**
|
|
7046
|
+
* 幂等释放:立即禁止新上传,取消并等待所有在途上传结束。
|
|
7047
|
+
* 具体上传/分片清理错误仍交给各自 upload Promise,dispose 本身不重复拒绝。
|
|
7048
|
+
*/
|
|
7049
|
+
dispose: () => Promise<void>;
|
|
7050
|
+
}
|
|
7051
|
+
/**
|
|
7052
|
+
* 创建与 IM 会话无关的浏览器 S3 上传器,复用普通媒体桶、凭证缓存及分片执行器。
|
|
7053
|
+
*
|
|
7054
|
+
* 宿主应按账号/页面持有实例,在退出或切账号时 dispose,并为凭证回调校验账号身份。
|
|
7055
|
+
* 该实例不会读取宿主登录态;桶配置在创建时复制,凭证仅保存在实例内存中。
|
|
7056
|
+
* 不限制动态条目数量或业务文件大小,不创建 DOM/object URL,也不删除已成功上传的对象。
|
|
7057
|
+
*
|
|
7058
|
+
* @example
|
|
7059
|
+
* ```ts
|
|
7060
|
+
* const uploader = createImResourceUploader(mediaConfig);
|
|
7061
|
+
* try {
|
|
7062
|
+
* const { url } = await uploader.upload({ file, kind: 'video', signal });
|
|
7063
|
+
* await savePost({ videoUrl: url });
|
|
7064
|
+
* } finally {
|
|
7065
|
+
* await uploader.dispose();
|
|
7066
|
+
* }
|
|
7067
|
+
* ```
|
|
7068
|
+
*/
|
|
7069
|
+
declare function createImResourceUploader(config: ImResourceUploaderConfig): ImResourceUploader;
|
|
7070
|
+
|
|
6862
7071
|
/**
|
|
6863
7072
|
* 频道 rel 能否打开:跨宿主纯决策。打开器、Toast、分享快照仍归 Host。
|
|
6864
7073
|
* 置顶/悬浮游戏都要有 appId 和可拼地址;无 appId 的置顶游戏根本不会进入可见列表。
|
|
@@ -7104,6 +7313,8 @@ interface ImMediaCatalog {
|
|
|
7104
7313
|
contact: string;
|
|
7105
7314
|
/** 小程序卡片回复摘要,对齐 iOS `min_program_name`。 */
|
|
7106
7315
|
miniProgram: string;
|
|
7316
|
+
/** 机器人卡片回复摘要,对齐 iOS `reply_message`。 */
|
|
7317
|
+
robot: string;
|
|
7107
7318
|
/** 转账卡片回复摘要,对齐 iOS `chat_tranfer`。 */
|
|
7108
7319
|
transfer: string;
|
|
7109
7320
|
/** 语音通话记录回复摘要。 */
|
|
@@ -7189,6 +7400,7 @@ interface ImFailureCatalog {
|
|
|
7189
7400
|
*
|
|
7190
7401
|
* 方括号只保留给**列表里不带类型图标**的那些:语音、文件、名片、小程序、转账、通话、红包、
|
|
7191
7402
|
* 小游戏、加密、不支持。它们没有图标,方括号是唯一能和「对方真的发了『语音』两个字」区分开的标记。
|
|
7403
|
+
* 解密失败例外:对齐 iOS 长句、不加方括号。
|
|
7192
7404
|
*
|
|
7193
7405
|
* 照片、视频、GIF、贴图和媒体合集在 PC/H5 会话列表里都带 16px 类型图标(设计稿 13328:305728),
|
|
7194
7406
|
* 图标已经表明类型,所以文案不带方括号、与回复摘要 `media.*` 用同一份词(决策 D26)。
|
|
@@ -7207,6 +7419,8 @@ interface ImLastMessageCatalog {
|
|
|
7207
7419
|
contact: string;
|
|
7208
7420
|
/** 小程序卡片会话摘要,对齐 iOS `[%@]` + `min_program_name`。 */
|
|
7209
7421
|
miniProgram: string;
|
|
7422
|
+
/** 机器人卡片会话摘要,对齐 iOS `reply_message`。 */
|
|
7423
|
+
robot: string;
|
|
7210
7424
|
/** 转账会话摘要,对齐 iOS `[chat_tranfer]`。 */
|
|
7211
7425
|
transfer: string;
|
|
7212
7426
|
/** 语音通话记录会话摘要。 */
|
|
@@ -7227,6 +7441,11 @@ interface ImLastMessageCatalog {
|
|
|
7227
7441
|
/** 媒体合集:图片与视频混合,参数 `{photoCount}` `{videoCount}`(各语言自行决定量词与连接符)。 */
|
|
7228
7442
|
mediaAlbumMixed: string;
|
|
7229
7443
|
encrypted: string;
|
|
7444
|
+
/**
|
|
7445
|
+
* 解密失败会话列表摘要,对齐 iOS `sz_conversation_message_decryption_failed`。
|
|
7446
|
+
* 与气泡同一条长文案,不加方括号;不含 iOS「查看原因」,Web 尚未做该入口。
|
|
7447
|
+
*/
|
|
7448
|
+
decryptFailed: string;
|
|
7230
7449
|
/** 未注册或无法解析的正文。 */
|
|
7231
7450
|
unknown: string;
|
|
7232
7451
|
/** 自己撤回。 */
|
|
@@ -7241,7 +7460,7 @@ interface ImLastMessageCatalog {
|
|
|
7241
7460
|
* 二期收敛:kit 框架无关层不再直接产中文,改产本联合里的码 + 参数(如 {reason}/{label}/{size}),由宿主经 im-i18n 渲染。
|
|
7242
7461
|
* 动态原始报错(error.message)作为 `{reason}` 参数拼接,不入 catalog(属诊断,不翻译)。
|
|
7243
7462
|
*/
|
|
7244
|
-
type ImServiceTextKey = 'common.notConnected' | 'common.selectOrOpenConversation' | 'common.conversationTypeNotReady' | 'common.conversationNotReady' | `recall.${RecallFailReason}` | `edit.${EditFailReason}` | 'localDelete.done' | 'localDelete.notFound' | 'localDelete.inFlight' | 'localDelete.failed' | 'channelDelete.notFound' | 'channelDelete.unsupported' | 'channelDelete.notSent' | 'channelDelete.unavailable' | 'channelDelete.forbidden' | 'channelDelete.timeout' | 'channelDelete.failed' | 'channelDelete.disconnected' | 'directBlock.contactRequired' | 'groupBlock.left' | 'groupBlock.removed' | 'groupBlock.dismissed' | 'groupBlock.unknownRestricted' | 'channelBlock.guest' | 'channelBlock.left' | 'channelBlock.removed' | 'channelBlock.dismissed' | 'channelBlock.muted' | 'channelBlock.allMembersMuted' | 'channelBlock.currentUserMuted' | 'channelBlock.blacklisted' | 'channelBlock.unknownRestricted' | 'channelProfile.loadFailed' | 'channelProfile.notFound' | 'channelProfile.retryAction' | 'channelMembers.title' | 'channelMembers.searchPlaceholder' | 'channelMembers.loading' | 'channelMembers.loadFailed' | 'channelMembers.retryAction' | 'channelMembers.empty' | 'channelMembers.loadingMore' | 'channelMembers.loadMoreFailed' | 'channelMembers.exhausted' | 'channelMembers.loadMoreAction' | 'label.image' | 'label.video' | 'label.file' | 'label.sticker' | 'send.failed' | 'send.retryFailed' | 'send.cancelFailed' | 'send.mediaFailed' | 'send.mediaEmpty' | 'send.mediaCancelled' | 'send.mediaCountLimit' | 'send.mediaTooLarge' | 'send.mediaFormatMismatch' | 'send.imageFormatUnsupported' | 'send.videoTooLong' | 'send.videoDurationUnavailable' | 'send.voiceEmpty' | 'send.voiceStorageNotConfigured' | 'send.voiceCancelled' | 'send.voiceFailed' | 'media.uploadWaiting' | 'media.voiceNotReady' | 'media.voiceLoadEmpty' | 'media.voiceLoadFailed' | 'media.videoOpenEmpty' | 'media.videoLoadFailed' | 'media.imageInvalid' | 'media.imageLoadFailed' | 'media.fileDownloadEmpty' | 'media.fileDownloadFailed' | 'conversation.muteEnableFailed' | 'conversation.muteDisableFailed' | 'conversation.backgroundLoadFailed' | 'read.markReadFailed' | 'storage.failed' | 'sync.failed' | 'draft.saveFailed' | 'history.returnLatestFailed' | 'pinned.forbidden' | 'pinned.network' | 'pinned.contract' | 'pinned.unsupported' | 'pinned.failed' | 'pinned.previewUnavailable' | 'pinned.locateFailed' | 'pinned.recalled' | 'pinned.deleted' | 'pinned.protected' | 'pinned.pinAction' | 'pinned.unpinAction' | 'pinned.unpinConfirm' | 'pinned.cancelAction' | 'lifecycle.missingLoginState' | 'lifecycle.prepareFailed' | 'lifecycle.missingConnectParams' | 'lifecycle.connectFailed' | 'lifecycle.disposed' | 'forward.emptyInput' | 'forward.allSkipped' | 'forward.partialSkipped' | 'forward.done' | 'forward.failed';
|
|
7463
|
+
type ImServiceTextKey = 'common.notConnected' | 'common.selectOrOpenConversation' | 'common.conversationTypeNotReady' | 'common.conversationNotReady' | `recall.${RecallFailReason}` | `edit.${EditFailReason}` | 'localDelete.done' | 'localDelete.notFound' | 'localDelete.inFlight' | 'localDelete.failed' | 'channelDelete.notFound' | 'channelDelete.unsupported' | 'channelDelete.notSent' | 'channelDelete.unavailable' | 'channelDelete.forbidden' | 'channelDelete.timeout' | 'channelDelete.failed' | 'channelDelete.disconnected' | 'directBlock.contactRequired' | 'groupBlock.left' | 'groupBlock.removed' | 'groupBlock.dismissed' | 'groupBlock.unknownRestricted' | 'channelBlock.guest' | 'channelBlock.left' | 'channelBlock.removed' | 'channelBlock.dismissed' | 'channelBlock.muted' | 'channelBlock.allMembersMuted' | 'channelBlock.currentUserMuted' | 'channelBlock.blacklisted' | 'channelBlock.unknownRestricted' | 'channelProfile.loadFailed' | 'channelProfile.notFound' | 'channelProfile.retryAction' | 'channelMembers.title' | 'channelMembers.searchPlaceholder' | 'channelMembers.loading' | 'channelMembers.loadFailed' | 'channelMembers.retryAction' | 'channelMembers.empty' | 'channelMembers.loadingMore' | 'channelMembers.loadMoreFailed' | 'channelMembers.exhausted' | 'channelMembers.loadMoreAction' | 'label.image' | 'label.video' | 'label.file' | 'label.sticker' | 'send.failed' | 'send.retryFailed' | 'send.cancelFailed' | 'send.mediaFailed' | 'send.mediaEmpty' | 'send.mediaCancelled' | 'send.mediaCountLimit' | 'send.mediaTooLarge' | 'send.mediaFormatMismatch' | 'send.imageFormatUnsupported' | 'send.videoTooLong' | 'send.videoDurationUnavailable' | 'send.voiceEmpty' | 'send.voiceStorageNotConfigured' | 'send.voiceCancelled' | 'send.voiceFailed' | 'media.uploadWaiting' | 'media.voiceNotReady' | 'media.voiceLoadEmpty' | 'media.voiceLoadFailed' | 'media.videoOpenEmpty' | 'media.videoLoadFailed' | 'media.imageInvalid' | 'media.imageLoadFailed' | 'media.fileDownloadEmpty' | 'media.fileDownloadFailed' | 'conversation.muteEnableFailed' | 'conversation.muteDisableFailed' | 'conversation.backgroundLoadFailed' | 'read.markReadFailed' | 'storage.failed' | 'sync.failed' | 'draft.saveFailed' | 'history.returnLatestFailed' | 'pinned.forbidden' | 'pinned.network' | 'pinned.contract' | 'pinned.unsupported' | 'pinned.failed' | 'pinned.previewUnavailable' | 'pinned.locateFailed' | 'pinned.recalled' | 'pinned.deleted' | 'pinned.protected' | 'pinned.pinAction' | 'pinned.unpinAction' | 'pinned.unpinConfirm' | 'pinned.cancelAction' | 'lifecycle.missingLoginState' | 'lifecycle.prepareFailed' | 'lifecycle.missingConnectParams' | 'lifecycle.connectFailed' | 'lifecycle.disposed' | 'lifecycle.connectionOccupied' | 'lifecycle.connectionCoordinationUnavailable' | 'forward.emptyInput' | 'forward.allSkipped' | 'forward.partialSkipped' | 'forward.done' | 'forward.failed';
|
|
7245
7464
|
/** 命令/生命周期操作提示 catalog(key 齐全,模板含 {reason}/{label}/{size} 占位)。 */
|
|
7246
7465
|
type ImServiceCatalog = Record<ImServiceTextKey, string>;
|
|
7247
7466
|
/** 星期文案键按 JavaScript `Date#getDay()` 的 Sunday-first 顺序命名。 */
|
|
@@ -7559,6 +7778,20 @@ interface ConversationListPresentation {
|
|
|
7559
7778
|
*/
|
|
7560
7779
|
declare function resolveConversationListPresentation(item: ConversationListItem, options: ConversationListPresentationOptions): ConversationListPresentation;
|
|
7561
7780
|
|
|
7781
|
+
/**
|
|
7782
|
+
* PC/H5 会话行与菜单角标共用的显示规则;不修改 SDK 未读消息条数。
|
|
7783
|
+
*
|
|
7784
|
+
* @example `999 → '999'`、`1249 → '1k'`、`10000 → '10k'`、`10001 → '10k+'`。
|
|
7785
|
+
* 会话内的未读提示有独立的 999+ 规则,不使用本函数。
|
|
7786
|
+
*/
|
|
7787
|
+
declare function formatConversationUnreadBadge(count: number): string;
|
|
7788
|
+
/**
|
|
7789
|
+
* 从 SDK 完整会话列表计算菜单未读会话数:每个非免打扰且有未读的会话只计一次。
|
|
7790
|
+
*
|
|
7791
|
+
* SDK 已把手动未读提醒投影到 unreadCount;这里不重新解释消息状态,也不使用宿主筛选后的列表。
|
|
7792
|
+
*/
|
|
7793
|
+
declare function countUnreadConversations(items: readonly Pick<ConversationListItem, 'unreadCount' | 'muted'>[]): number;
|
|
7794
|
+
|
|
7562
7795
|
interface DelayedLoadingIndicatorOptions {
|
|
7563
7796
|
/** loading 持续超过该时间后才显示,缓存快速命中不会闪出提示。 */
|
|
7564
7797
|
showDelayMs?: number;
|
|
@@ -7975,7 +8208,8 @@ interface ChatRuntime {
|
|
|
7975
8208
|
/**
|
|
7976
8209
|
* 在账号或 token 发生变化时,立即停止并清理旧账号运行资源。
|
|
7977
8210
|
*
|
|
7978
|
-
*
|
|
8211
|
+
* 它会立即停止旧连接并丢弃页面资源,异步销毁 SDK Client、关闭消息库和释放浏览器锁;
|
|
8212
|
+
* 新 prepare/connect 等待清理完成,账号版本号同步递增;
|
|
7979
8213
|
* 已注册的 Store 监听器会保留,以便新账号重新连接后继续接收事件。通常由 `applySession` 自动调用。
|
|
7980
8214
|
*/
|
|
7981
8215
|
resetForAuthChange: () => void;
|
|
@@ -8057,6 +8291,43 @@ interface ChatRuntime {
|
|
|
8057
8291
|
*/
|
|
8058
8292
|
declare function createChatRuntime(factories: ChatRuntimeFactories): ChatRuntime;
|
|
8059
8293
|
|
|
8294
|
+
type PrefetchClient = Pick<ImProductClient, 'conversations'>;
|
|
8295
|
+
/** 宿主只提供当前投影和调度许可;请求去重、网络预算与持久化仍由 SDK 管理。 */
|
|
8296
|
+
interface ConversationPrefetchControllerOptions {
|
|
8297
|
+
/** 当前账号公开 Client;未准备好时返回 null,不在后台主动创建 Client。 */
|
|
8298
|
+
getClient: () => PrefetchClient | null;
|
|
8299
|
+
/** SDK 会话列表当前顺序;控制器只挑常用会话,不维护消息副本。 */
|
|
8300
|
+
getCandidates: () => readonly ConversationListItem[];
|
|
8301
|
+
/** 前台正在阅读的精确会话;它的历史由正常打开流程负责。 */
|
|
8302
|
+
getActiveRef: () => ConversationRef | null;
|
|
8303
|
+
/** 宿主判断开关、账号、连接、页面可见性和网络策略是否允许预取。 */
|
|
8304
|
+
getRunnable: () => boolean;
|
|
8305
|
+
/** 在首屏绘制后的浏览器空闲期执行,返回取消尚未开始任务的函数。 */
|
|
8306
|
+
scheduleIdle: (task: () => void) => () => void;
|
|
8307
|
+
/** 意外拒绝的结构化诊断出口;预取失败不能转成前台通知。 */
|
|
8308
|
+
onError: (cause: unknown) => void;
|
|
8309
|
+
/** 可选的统一诊断端口;只记录调度状态,不存消息,也不作为运行许可。 */
|
|
8310
|
+
diagnostics?: ImDiagnosticWriter;
|
|
8311
|
+
}
|
|
8312
|
+
/** 应用级常用会话预取控制器;不依赖 Vue、Pinia 或浏览器页面资源。 */
|
|
8313
|
+
interface ConversationPrefetchController {
|
|
8314
|
+
/** 列表、活动会话或运行条件改变时调用;普通刷新复用在途请求。 */
|
|
8315
|
+
refresh: () => void;
|
|
8316
|
+
/** 换账号或退出时取消任务并清除本轮请求记录;后续 refresh 可重新开始。 */
|
|
8317
|
+
reset: () => void;
|
|
8318
|
+
/** 应用卸载时永久释放;后续 refresh 不再调度。 */
|
|
8319
|
+
dispose: () => void;
|
|
8320
|
+
}
|
|
8321
|
+
/**
|
|
8322
|
+
* 创建常用会话预取编排:每次空闲只提交一个候选,完成后重读列表再选下一项。
|
|
8323
|
+
*
|
|
8324
|
+
* 页间重新等待宿主空闲调度,使置顶、未读、删除和活动会话变化及时影响下一页,
|
|
8325
|
+
* SDK 仍负责请求去重、前台优先与本次账号 Runtime 的网络总预算。
|
|
8326
|
+
* 同一 Client 下完成或失败的候选本轮不自动重试;取消项可在运行条件恢复后重新排队。
|
|
8327
|
+
* reset/client 更换会作废旧请求,旧 Promise 完成后不能修改新账号的请求记录。
|
|
8328
|
+
*/
|
|
8329
|
+
declare function createConversationPrefetchController(options: ConversationPrefetchControllerOptions): ConversationPrefetchController;
|
|
8330
|
+
|
|
8060
8331
|
/**
|
|
8061
8332
|
* 一次异步业务操作发起时捕获的账号生命周期。
|
|
8062
8333
|
*
|
|
@@ -9884,5 +10155,5 @@ declare function resampleWaveform(data: readonly number[], targetCount: number):
|
|
|
9884
10155
|
*/
|
|
9885
10156
|
declare function placeholderWaveform(seed: string, count: number): number[];
|
|
9886
10157
|
|
|
9887
|
-
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_LANG_NUMBERS, MediaTransferError, REACTION_SUPPORTED_CONTENT_TYPES, SPIKE_STEP, UNICODE_EMOJI_CATALOG, blockReasonForChannelSession, blockReasonForChannelState, blockReasonForGroupState, blockReasonForSession, buildSessionFavoritePlainBody, calculateMediaBox, canEditMessage, canPinChannelMessage, canPinGroupMessage, canPinMessage, canPromoteMediaPresentationSource, canReactToMessage, canRecallMessage, canTransmit, canTransmitByType, canTransmitContent, cancelMediaUpload, captureRuntimeClientOperation, captureRuntimeOperation, channelMiniProgramRelKey, classifyGifFile, classifyMediaFile, classifyStickerImageType, createChatRuntime, createDelayedLoadingIndicator, createEmojiMatcher, createFaceToFaceGroupQrPayload, createImClient, createImConsoleDiagnosticSink, createImDiagnosticMemoryBuffer, createImI18n, createImTextSearchMatcher, createLinkMatcher, createNewMessageBadgeController, createSdkDiagnosticWriter, createThreadItems, createVoicePlayer, createVoiceRecordingSession, csvIncludes, decideChannelMiniProgramRelOpen, decideConversationAction, decideMemberTargetAction, decideMessageAction, detectVoiceCapabilities, emojiAssetUrl, emojiUrlByCode, extractSearchText, fetchConversationFileBatch, fetchConversationImageBatch, fetchConversationMessageBatch, fetchConversationVideoBatch, fetchConversationVoiceBatch, fetchNextConversationSearchBatch, formatChatDateSeparator, formatConversationDisplayTime, formatFailure, formatFileSize, formatLastMessageSummary, formatMediaDuration, formatMediaPlaceholder, formatMentionAll, formatServiceText, formatSystemMessage, forward_service as forwardService, getFileExtension, getImTextSearchInitial, getImTimeCatalog, getLocalDayKey, hasEmojiCandidate, hasLinkCandidate, highlightSegments, isGifFile, isMessageLocateScrollProtected, isMessageTailChangeFromOlderWindowTrim, isMessageViewportMeasurable, isMessageVisibleForNewMessageBadge, 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, 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 };
|
|
9888
|
-
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, ConversationEntryUnreadSnapshot, ConversationHandle, ConversationHandleSnapshot, ConversationInitialPosition, ConversationLastMessageSummary, ConversationListItem, ConversationListMention, ConversationListPresentation, ConversationListPresentationLabels, ConversationListPresentationOptions, ConversationListPreviewMediaKind, ConversationListPreviewSegment, ConversationMessageApi, ConversationOpenOptions, 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, 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, ImForwardOperationResult, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, 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, 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, MiniProgramHostLocale, MiniProgramMessageOptions, MiniProgramOpenUrlInput, NewMessageBadgeController, NewMessageBadgeCountListener, NewMessageBadgeVisibilityInput, NewerHistoryPageTriggerInput, OlderHistoryPrefetchInput, PrependAnchorCandidate, PrependAnchorViewport, PrependMessageAnchorPosition, ProductConversationListType, ProductHandleConversationType, ProductMessageSearchPage, ProductMessageSearchResult, RemoteMessageBadgeTrackingInput, ResolveMediaPresentationInput, ResolveTextOptions, ResolvedConversationBackground, ResolvedMediaPresentation, RichExtraSegment, 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 };
|
|
10158
|
+
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_LANG_NUMBERS, MediaTransferError, REACTION_SUPPORTED_CONTENT_TYPES, SPIKE_STEP, UNICODE_EMOJI_CATALOG, blockReasonForChannelSession, blockReasonForChannelState, blockReasonForGroupState, blockReasonForSession, buildSessionFavoritePlainBody, calculateMediaBox, 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, 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, hasEmojiCandidate, hasLinkCandidate, highlightSegments, isGifFile, isMessageLocateScrollProtected, isMessageTailChangeFromOlderWindowTrim, isMessageViewportMeasurable, isMessageVisibleForNewMessageBadge, 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, 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 };
|
|
10159
|
+
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, 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, 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, ImForwardOperationResult, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, 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, ImRobotModule, 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, MiniProgramHostLocale, MiniProgramMessageOptions, MiniProgramOpenUrlInput, NewMessageBadgeController, NewMessageBadgeCountListener, NewMessageBadgeVisibilityInput, NewerHistoryPageTriggerInput, OlderHistoryPrefetchInput, PrependAnchorCandidate, PrependAnchorViewport, PrependMessageAnchorPosition, ProductConversationListType, ProductHandleConversationType, ProductMessageSearchPage, ProductMessageSearchResult, RemoteMessageBadgeTrackingInput, ResolveMediaPresentationInput, ResolveTextOptions, ResolvedConversationBackground, ResolvedMediaPresentation, RichExtraSegment, 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 };
|