k2-im 0.1.43 → 0.1.45
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 +128 -39
- package/dist/chat-kit-pinia.js +1 -1
- package/dist/chat-kit-vue.d.ts +41 -2
- package/dist/chat-kit-vue.js +1 -1
- package/dist/chat-kit.d.ts +130 -41
- package/dist/chat-kit.js +1 -1
- package/dist/{chunk-TMIAJBDG.js → chunk-CO4DXVJT.js} +1 -1
- package/dist/chunk-EQVFLMM3.js +1 -0
- package/dist/chunk-GISCLEZV.js +1 -0
- package/dist/chunk-OGCY77K3.js +2 -0
- package/dist/chunk-SVYZRVHS.js +7 -0
- package/dist/chunk-XNBJ3NXF.js +2 -0
- package/dist/chunk-YP6KFYYU.js +2 -0
- package/dist/i18n.d.ts +48 -6
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +136 -43
- package/dist/index.js +1 -1
- package/dist/sdk.d.ts +126 -37
- package/dist/sdk.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6FH2DBQE.js +0 -7
- package/dist/chunk-6WAB2ZRF.js +0 -2
- package/dist/chunk-7DZ5R7KR.js +0 -1
- package/dist/chunk-DX6Q2DQD.js +0 -2
- package/dist/chunk-PCUF66O4.js +0 -2
- package/dist/chunk-TWSAZG5J.js +0 -1
package/dist/chat-kit.d.ts
CHANGED
|
@@ -39,8 +39,8 @@ interface ConversationDraft$1 {
|
|
|
39
39
|
attachments: readonly [];
|
|
40
40
|
updatedAt: number;
|
|
41
41
|
}
|
|
42
|
-
/** 消息内容类型。sticker=表情/贴图(BMessage contentType=7);call=单聊通话记录(contentType=10);transfer=转账(contentType=16);gift=礼品/刮刮卡(contentType=17);robot=机器人卡片(contentType=18);miniProgram=小程序分享卡(contentType=22);redPacket=红包卡(contentType=25);game=小游戏(contentType=27);未知 wire 正文统一归一为 unknown。 */
|
|
43
|
-
type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'gift' | 'call' | 'redPacket' | 'mediaAlbum' | 'filesAlbum' | 'robot' | 'unknown';
|
|
42
|
+
/** 消息内容类型。sticker=表情/贴图(BMessage contentType=7);call=单聊通话记录(contentType=10);transfer=转账(contentType=16);gift=礼品/刮刮卡(contentType=17);robot=机器人卡片(contentType=18);miniProgram=小程序分享卡(contentType=22);redPacket=红包卡(contentType=25);game=小游戏(contentType=27);liveRoom=直播间分享(contentType=30);未知 wire 正文统一归一为 unknown。 */
|
|
43
|
+
type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'gift' | 'call' | 'redPacket' | 'mediaAlbum' | 'filesAlbum' | 'robot' | 'liveRoom' | 'unknown';
|
|
44
44
|
/**
|
|
45
45
|
* 发送态(客户端态):消息从本地创建到服务端确认的生命周期。
|
|
46
46
|
* `uploading` 仅媒体消息使用:文件上传阶段(uploading→pending→sending→sent);
|
|
@@ -111,6 +111,8 @@ type LastMessageSummary = {
|
|
|
111
111
|
kind: 'transfer';
|
|
112
112
|
} | {
|
|
113
113
|
kind: 'gift';
|
|
114
|
+
} | {
|
|
115
|
+
kind: 'liveRoom';
|
|
114
116
|
} | {
|
|
115
117
|
kind: 'call';
|
|
116
118
|
callKind: ImCallKind;
|
|
@@ -609,6 +611,40 @@ interface ImMediaAlbumBody {
|
|
|
609
611
|
/** 媒体项,顺序即用户选择顺序(决定宫格 index 与首项朝向)。 */
|
|
610
612
|
items: readonly ImMediaAlbumItem[];
|
|
611
613
|
}
|
|
614
|
+
/** 直播间分享的直播类型。wire `liveType`:1 视频、2 语音、3 双手机、4 单手机录屏、5 语聊房。 */
|
|
615
|
+
type ImLiveRoomType = 'video' | 'voice' | 'dual-phone' | 'screen-record' | 'voice-chat';
|
|
616
|
+
/** 直播间分享的房间状态。wire `liveRoomStatus`:1 预告、2 直播中、3 已结束。 */
|
|
617
|
+
type ImLiveRoomStatus = 'preview' | 'live' | 'ended';
|
|
618
|
+
/**
|
|
619
|
+
* 直播间分享卡片正文(contentType==='liveRoom',协议 BMessage.contentType=30,fields 98-112)。
|
|
620
|
+
*
|
|
621
|
+
* @remarks 调用方先拿到直播间快照再写入本结构。Core 不请求直播接口,也不把缺省枚举猜成某一种直播。
|
|
622
|
+
* `uid` 是声网 SDK 初始化用的 UID,不是 IM 用户 id。
|
|
623
|
+
*/
|
|
624
|
+
interface ImLiveRoomBody {
|
|
625
|
+
/** 直播间 ID(BMessage.liveRoomId)。 */
|
|
626
|
+
liveRoomId: string;
|
|
627
|
+
liveType: ImLiveRoomType;
|
|
628
|
+
liveRoomStatus: ImLiveRoomStatus;
|
|
629
|
+
/** 当前账号是否已关注主播。协议 bool 无法区分未设置,false 也是有效状态。 */
|
|
630
|
+
isFocus: boolean;
|
|
631
|
+
/** 当前账号是否已预约这场直播。 */
|
|
632
|
+
isReservation: boolean;
|
|
633
|
+
liveRecordId?: string;
|
|
634
|
+
/** 画面比例原文,例如 `16:9`。 */
|
|
635
|
+
screenRatio?: string;
|
|
636
|
+
broadcasterUserId?: string;
|
|
637
|
+
broadcasterUserName?: string;
|
|
638
|
+
/** 声网 SDK 初始化 UID(BMessage.uid)。 */
|
|
639
|
+
uid?: string;
|
|
640
|
+
liveCover?: string;
|
|
641
|
+
liveRoomName?: string;
|
|
642
|
+
/** 预告时间,秒级时间戳的十进制字符串。 */
|
|
643
|
+
livePreviewTime?: string;
|
|
644
|
+
livePreviewId?: string;
|
|
645
|
+
/** 直播间人数字符串,保持协议原文,不在 Core 换算。 */
|
|
646
|
+
liveRoomViewers?: string;
|
|
647
|
+
}
|
|
612
648
|
interface ImMessageBody {
|
|
613
649
|
/** P0 文本内容(明文,解密后的结果)。 */
|
|
614
650
|
text?: string;
|
|
@@ -644,6 +680,8 @@ interface ImMessageBody {
|
|
|
644
680
|
filesAlbum?: ImFilesAlbumBody;
|
|
645
681
|
/** contentType==='robot' 时的机器人卡片。 */
|
|
646
682
|
robot?: ImRobotBody;
|
|
683
|
+
/** contentType==='liveRoom' 时的直播间分享卡片。 */
|
|
684
|
+
liveRoom?: ImLiveRoomBody;
|
|
647
685
|
/** contentType==='unknown' 时的稳定未知正文,不含原始 wire type。 */
|
|
648
686
|
unknown?: UnknownMessageBody;
|
|
649
687
|
}
|
|
@@ -2719,7 +2757,7 @@ interface ResolvedChannelAccess {
|
|
|
2719
2757
|
*/
|
|
2720
2758
|
declare function resolveChannelAccess(input: ResolveChannelAccessInput): ResolvedChannelAccess;
|
|
2721
2759
|
|
|
2722
|
-
type EditFailReason = 'not-found' | 'not-own' | 'not-sent' | 'recalled' | 'deleted' | 'expired' | 'unsupported' | 'empty' | 'restricted' | 'unsupported-content' | 'no-key' | 'encrypt-failed' | 'timeout' | 'failed' | 'disconnected';
|
|
2760
|
+
type EditFailReason = 'not-found' | 'not-own' | 'pinned' | 'not-sent' | 'recalled' | 'deleted' | 'expired' | 'unsupported' | 'empty' | 'restricted' | 'unsupported-content' | 'no-key' | 'encrypt-failed' | 'timeout' | 'failed' | 'disconnected';
|
|
2723
2761
|
|
|
2724
2762
|
/** UI 转发预检所需的最小稳定消息视图;不依赖 sortKey、raw 或协议扩展。 */
|
|
2725
2763
|
type ForwardContentCandidate = Pick<ImMessage, 'contentType' | 'body'>;
|
|
@@ -2750,7 +2788,7 @@ declare function canTransmitContent(message: ForwardContentCandidate): boolean;
|
|
|
2750
2788
|
*/
|
|
2751
2789
|
declare function canTransmit(message: ForwardCandidateMessage): boolean;
|
|
2752
2790
|
|
|
2753
|
-
type RecallFailReason = 'not-found' | 'not-own' | 'not-sent' | 'expired' | 'unsupported' | 'timeout' | 'server-expired' | 'failed' | 'disconnected';
|
|
2791
|
+
type RecallFailReason = 'not-found' | 'not-own' | 'pinned' | 'not-sent' | 'expired' | 'unsupported' | 'timeout' | 'server-expired' | 'failed' | 'disconnected';
|
|
2754
2792
|
|
|
2755
2793
|
/** 浏览器 PushSubscription.toJSON() 的可移植数据;不依赖 DOM 或浏览器全局。 */
|
|
2756
2794
|
interface ImWebPushSubscription {
|
|
@@ -3303,6 +3341,10 @@ interface TransferMessageOptions {
|
|
|
3303
3341
|
interface GiftMessageOptions {
|
|
3304
3342
|
replyToMessageId?: string;
|
|
3305
3343
|
}
|
|
3344
|
+
/** 直播间分享卡发送选项;正文由调用方提供,Core 不补默认直播类型。 */
|
|
3345
|
+
interface LiveRoomMessageOptions {
|
|
3346
|
+
replyToMessageId?: string;
|
|
3347
|
+
}
|
|
3306
3348
|
/**
|
|
3307
3349
|
* 媒体合集里的一项:一张图片或一个视频。
|
|
3308
3350
|
*
|
|
@@ -3516,6 +3558,36 @@ interface ImDirectorySearchApi {
|
|
|
3516
3558
|
search: (keyword: string) => Promise<ImDirectorySearchResult>;
|
|
3517
3559
|
}
|
|
3518
3560
|
|
|
3561
|
+
/** 回源失败的原因与能否重试。 */
|
|
3562
|
+
interface MessagesByIdFailure {
|
|
3563
|
+
/**
|
|
3564
|
+
* 能否稍后重试。
|
|
3565
|
+
*
|
|
3566
|
+
* 服务端错误、网络异常和登录过期都算可以重试;无权限(已退群或已退出频道)和参数错误是终态,
|
|
3567
|
+
* 再试多少次结果都一样,调用方应该停下来而不是反复打接口。
|
|
3568
|
+
*/
|
|
3569
|
+
retryable: boolean;
|
|
3570
|
+
/** 原始错误,供诊断与上报。 */
|
|
3571
|
+
error: unknown;
|
|
3572
|
+
}
|
|
3573
|
+
/** 回源的汇总结果。三组 id 互不重叠,合起来覆盖调用方传入的全部有效 id。 */
|
|
3574
|
+
interface ImMessagesByIdResult<TMessage> {
|
|
3575
|
+
/** 成功取回的消息。已经进了本地历史,后续本地查询就能命中。 */
|
|
3576
|
+
readonly messages: readonly TMessage[];
|
|
3577
|
+
/**
|
|
3578
|
+
* 服务端确认没有这些消息:已被删除、超出保留期被清理,或对当前用户不可见。
|
|
3579
|
+
* 这是终态,调用方应记下来并停止重试。
|
|
3580
|
+
*/
|
|
3581
|
+
readonly missingMessageIds: readonly string[];
|
|
3582
|
+
/**
|
|
3583
|
+
* 这次没取到、但不代表不存在的消息 id(请求失败了)。
|
|
3584
|
+
* 是否值得再试看 `failure.retryable`。
|
|
3585
|
+
*/
|
|
3586
|
+
readonly unresolvedMessageIds: readonly string[];
|
|
3587
|
+
/** `unresolvedMessageIds` 非空时的失败原因;全部取到或全部确认缺失时不存在。 */
|
|
3588
|
+
readonly failure?: MessagesByIdFailure;
|
|
3589
|
+
}
|
|
3590
|
+
|
|
3519
3591
|
/**
|
|
3520
3592
|
* SDK 内部 CHANNEL sibling:装配资料、成员、申请、置顶、历史限制与通知修复能力。
|
|
3521
3593
|
*
|
|
@@ -3668,6 +3740,15 @@ interface ImContactSearchResult {
|
|
|
3668
3740
|
age?: number;
|
|
3669
3741
|
relationship: ImContactRelationship;
|
|
3670
3742
|
}
|
|
3743
|
+
/** 当前账号黑名单中的一名用户;不暴露关系记录 id、status 等后端字段。 */
|
|
3744
|
+
interface ImBlockedContact {
|
|
3745
|
+
userId: string;
|
|
3746
|
+
/** 优先当前账号设置的备注,没有备注时为对方昵称。 */
|
|
3747
|
+
displayName: string;
|
|
3748
|
+
nickname: string;
|
|
3749
|
+
remark?: string;
|
|
3750
|
+
avatarUrl?: string;
|
|
3751
|
+
}
|
|
3671
3752
|
/** 好友申请提交结果;调用成功不等于一定需要对端审核。 */
|
|
3672
3753
|
interface ImFriendshipRequestResult {
|
|
3673
3754
|
status: 'sent' | 'added' | 'already-friend';
|
|
@@ -3707,6 +3788,15 @@ interface ImContactApi extends ImDirectoryApi<'individual'> {
|
|
|
3707
3788
|
}) => Promise<ImFriendshipRequestResult>;
|
|
3708
3789
|
/** 远端确认后加入黑名单,并清理该用户的本机 direct 会话和聊天数据。 */
|
|
3709
3790
|
blockUser: (userId: string) => Promise<void>;
|
|
3791
|
+
/** 读取当前账号的黑名单;结果直接来自服务端,空数组表示名单为空。 */
|
|
3792
|
+
listBlocked: () => Promise<readonly ImBlockedContact[]>;
|
|
3793
|
+
/**
|
|
3794
|
+
* 远端确认后把用户移出黑名单。
|
|
3795
|
+
*
|
|
3796
|
+
* @remarks 移出后双方是否恢复为好友由服务端决定,SDK 不猜:本地关系先改为 `unknown`,
|
|
3797
|
+
* 再强制查询服务端关系并刷新资料。拉黑时已删除的 direct 会话和聊天记录不会恢复。
|
|
3798
|
+
*/
|
|
3799
|
+
unblockUser: (userId: string) => Promise<void>;
|
|
3710
3800
|
/** 提交联系人举报;该操作不修改好友关系、会话或本地资料。 */
|
|
3711
3801
|
reportUser: (userId: string, problem: string) => Promise<void>;
|
|
3712
3802
|
/**
|
|
@@ -4423,6 +4513,8 @@ type ConversationLastMessageSummary = {
|
|
|
4423
4513
|
kind: 'transfer';
|
|
4424
4514
|
} | {
|
|
4425
4515
|
kind: 'gift';
|
|
4516
|
+
} | {
|
|
4517
|
+
kind: 'liveRoom';
|
|
4426
4518
|
} | {
|
|
4427
4519
|
kind: 'redPacket';
|
|
4428
4520
|
} | {
|
|
@@ -4809,36 +4901,6 @@ interface ImExpressionsApi {
|
|
|
4809
4901
|
};
|
|
4810
4902
|
}
|
|
4811
4903
|
|
|
4812
|
-
/** 回源失败的原因与能否重试。 */
|
|
4813
|
-
interface MessagesByIdFailure {
|
|
4814
|
-
/**
|
|
4815
|
-
* 能否稍后重试。
|
|
4816
|
-
*
|
|
4817
|
-
* 服务端错误、网络异常和登录过期都算可以重试;无权限(已退群或已退出频道)和参数错误是终态,
|
|
4818
|
-
* 再试多少次结果都一样,调用方应该停下来而不是反复打接口。
|
|
4819
|
-
*/
|
|
4820
|
-
retryable: boolean;
|
|
4821
|
-
/** 原始错误,供诊断与上报。 */
|
|
4822
|
-
error: unknown;
|
|
4823
|
-
}
|
|
4824
|
-
/** 回源的汇总结果。三组 id 互不重叠,合起来覆盖调用方传入的全部有效 id。 */
|
|
4825
|
-
interface ImMessagesByIdResult<TMessage> {
|
|
4826
|
-
/** 成功取回的消息。已经进了本地历史,后续本地查询就能命中。 */
|
|
4827
|
-
readonly messages: readonly TMessage[];
|
|
4828
|
-
/**
|
|
4829
|
-
* 服务端确认没有这些消息:已被删除、超出保留期被清理,或对当前用户不可见。
|
|
4830
|
-
* 这是终态,调用方应记下来并停止重试。
|
|
4831
|
-
*/
|
|
4832
|
-
readonly missingMessageIds: readonly string[];
|
|
4833
|
-
/**
|
|
4834
|
-
* 这次没取到、但不代表不存在的消息 id(请求失败了)。
|
|
4835
|
-
* 是否值得再试看 `failure.retryable`。
|
|
4836
|
-
*/
|
|
4837
|
-
readonly unresolvedMessageIds: readonly string[];
|
|
4838
|
-
/** `unresolvedMessageIds` 非空时的失败原因;全部取到或全部确认缺失时不存在。 */
|
|
4839
|
-
readonly failure?: MessagesByIdFailure;
|
|
4840
|
-
}
|
|
4841
|
-
|
|
4842
4904
|
/**
|
|
4843
4905
|
* 绑定单个精确会话的产品句柄与独立连续消息窗口。
|
|
4844
4906
|
* 句柄提供历史、消息、草稿、已读和免打扰动作;SDK/DomainState 仍拥有消息真相,关闭只释放窗口和订阅。
|
|
@@ -4996,6 +5058,12 @@ interface ConversationMessageApi {
|
|
|
4996
5058
|
* @remarks CHANNEL 当前产品入口不发送礼物,会返回 unsupported。消息固定明文。
|
|
4997
5059
|
*/
|
|
4998
5060
|
sendGift: (gift: ImGiftBody, options?: GiftMessageOptions) => Promise<SendMessageResult>;
|
|
5061
|
+
/**
|
|
5062
|
+
* 分享直播间卡片。调用方必须先拿到直播间快照。
|
|
5063
|
+
*
|
|
5064
|
+
* @remarks Core 不请求直播接口,也不补默认直播类型或房间状态。群和频道按会话加密发送。
|
|
5065
|
+
*/
|
|
5066
|
+
sendLiveRoom: (liveRoom: ImLiveRoomBody, options?: LiveRoomMessageOptions) => Promise<SendMessageResult>;
|
|
4999
5067
|
/** 当前用户已选相同 emoji 时移除,否则添加或替换。emoji 必须是协议 token,例如 `[Great]`。 */
|
|
5000
5068
|
toggleReaction: (messageId: string, emoji: string) => Promise<ImReactionChangeResult>;
|
|
5001
5069
|
/** 显式添加/替换或移除,供参与者详情等不能用 toggle 猜动作的产品交互。 */
|
|
@@ -5023,7 +5091,7 @@ interface ConversationMessageApi {
|
|
|
5023
5091
|
*/
|
|
5024
5092
|
replaceInterruptedFile: (messageId: string, file: File | Blob, options?: FileMessageOptions) => Promise<SendMessageResult>;
|
|
5025
5093
|
/**
|
|
5026
|
-
*
|
|
5094
|
+
* 编辑当前会话的一条非置顶文本消息;所有权、正文类型、时间窗、加密与 CHANNEL 权限由对应 core sibling 校验。
|
|
5027
5095
|
* @throws 消息不属于当前 handle,或 core 返回稳定业务失败时抛出 `ImSdkErrorShape`;不暴露协议 errcode。
|
|
5028
5096
|
* @example
|
|
5029
5097
|
* ```ts
|
|
@@ -5034,10 +5102,10 @@ interface ConversationMessageApi {
|
|
|
5034
5102
|
* ```
|
|
5035
5103
|
*/
|
|
5036
5104
|
editText: (messageId: string, text: string, options?: EditTextOptions) => Promise<ImProductMessage>;
|
|
5037
|
-
/**
|
|
5105
|
+
/** 撤回当前会话非置顶消息;成功后由同一 DomainState 更新窗口,失败抛稳定产品错误。 */
|
|
5038
5106
|
recall: (messageId: string) => Promise<void>;
|
|
5039
5107
|
/**
|
|
5040
|
-
*
|
|
5108
|
+
* 仅从当前账号本机删除一条已落地且未置顶的消息。
|
|
5041
5109
|
*
|
|
5042
5110
|
* @remarks 不清理已读、置顶、草稿、宿主下载文件、独立媒体缓存或远端历史。仍由 Outbox 持有或正在上传的消息会被拒绝;
|
|
5043
5111
|
* queued 消息只有在 `client.outbox.cancel` 成功移除账本后,才能删除其本地失败气泡,避免把删除气泡误当作取消发送。
|
|
@@ -5159,7 +5227,7 @@ interface ChannelConversationMessageApi extends ConversationMessageApi {
|
|
|
5159
5227
|
*
|
|
5160
5228
|
* @remarks 不受本人撤回时间窗限制;权限由 CHANNEL profile 预检并由服务端最终校验。成功后消息进入
|
|
5161
5229
|
* `deletedForEveryone` 终态;Chat Kit 时间线仅向社群群主和管理员显示删除提示,普通成员隐藏该项。
|
|
5162
|
-
*
|
|
5230
|
+
* 置顶原消息即使由管理员或群主操作也会拒绝;该方法不用于本机删除,也不适用于普通群。
|
|
5163
5231
|
* @example
|
|
5164
5232
|
* ```ts
|
|
5165
5233
|
* const channel = await client.openConversation({ conversationType: 'channel', conversationId: '9001' })
|
|
@@ -6389,6 +6457,25 @@ interface ImContactsApi extends ImDirectoryApi<'individual'> {
|
|
|
6389
6457
|
* ```
|
|
6390
6458
|
*/
|
|
6391
6459
|
blockUser: (userId: string) => Promise<void>;
|
|
6460
|
+
/**
|
|
6461
|
+
* 读取当前账号的黑名单;每次都查询服务端,空数组表示名单为空。
|
|
6462
|
+
*
|
|
6463
|
+
* @example
|
|
6464
|
+
* ```ts
|
|
6465
|
+
* const blocked = await client.contacts.listBlocked()
|
|
6466
|
+
* ```
|
|
6467
|
+
*/
|
|
6468
|
+
listBlocked: () => Promise<readonly ImBlockedContact[]>;
|
|
6469
|
+
/**
|
|
6470
|
+
* 把用户移出黑名单。
|
|
6471
|
+
*
|
|
6472
|
+
* @remarks 远端成功后 SDK 重新向服务端查询双方关系,不假设恢复为好友;拉黑时已删除的会话和聊天记录不会恢复。
|
|
6473
|
+
* @example
|
|
6474
|
+
* ```ts
|
|
6475
|
+
* await client.contacts.unblockUser('user-7')
|
|
6476
|
+
* ```
|
|
6477
|
+
*/
|
|
6478
|
+
unblockUser: (userId: string) => Promise<void>;
|
|
6392
6479
|
/**
|
|
6393
6480
|
* 举报联系人;成功只表示服务端已接收,不改变好友关系或本地会话。
|
|
6394
6481
|
*
|
|
@@ -6521,6 +6608,8 @@ interface AdvancedContactsApi extends ImDirectoryApi<'individual'> {
|
|
|
6521
6608
|
searchUser: ImContactApi['searchUser'];
|
|
6522
6609
|
requestFriendship: ImContactApi['requestFriendship'];
|
|
6523
6610
|
blockUser: ImContactApi['blockUser'];
|
|
6611
|
+
listBlocked: ImContactApi['listBlocked'];
|
|
6612
|
+
unblockUser: ImContactApi['unblockUser'];
|
|
6524
6613
|
reportUser: ImContactApi['reportUser'];
|
|
6525
6614
|
deleteFriendship: ImContactApi['deleteFriendship'];
|
|
6526
6615
|
}
|
|
@@ -6806,7 +6895,7 @@ type ImLocale = 'en-US' | 'th-TH' | 'vi-VN' | 'zh-CN' | 'zh-TW';
|
|
|
6806
6895
|
* 二期收敛:kit 框架无关层不再直接产中文,改产本联合里的码 + 参数(如 {reason}/{label}/{size}),由宿主经 im-i18n 渲染。
|
|
6807
6896
|
* 动态原始报错(error.message)作为 `{reason}` 参数拼接,不入 catalog(属诊断,不翻译)。
|
|
6808
6897
|
*/
|
|
6809
|
-
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';
|
|
6898
|
+
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.messageNotFound' | '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';
|
|
6810
6899
|
|
|
6811
6900
|
/** 会话列表摘要的框架无关分段;宿主可自行决定表情使用图片、文本或其它组件呈现。 */
|
|
6812
6901
|
type ConversationListPreviewSegment = {
|
|
@@ -6826,7 +6915,7 @@ type ConversationListPreviewSegment = {
|
|
|
6826
6915
|
* `mediaAlbum` 专指「照片和视频混装」的合集,产品用相机图标;只有照片或只有视频的合集归到
|
|
6827
6916
|
* `image` / `video`,因为用户看到的文案也是「2张照片」「2个视频」。
|
|
6828
6917
|
*/
|
|
6829
|
-
type ConversationListPreviewMediaKind = 'image' | 'video' | 'gif' | 'sticker' | 'mediaAlbum' | 'voice';
|
|
6918
|
+
type ConversationListPreviewMediaKind = 'image' | 'video' | 'gif' | 'sticker' | 'mediaAlbum' | 'voice' | 'file';
|
|
6830
6919
|
/** 由各宿主按当前产品语言注入的会话列表标签。 */
|
|
6831
6920
|
interface ConversationListPresentationLabels {
|
|
6832
6921
|
/** 没有草稿和最后消息时显示的占位文案。 */
|
|
@@ -6865,7 +6954,7 @@ interface ConversationListPresentation {
|
|
|
6865
6954
|
/**
|
|
6866
6955
|
* 摘要前面该显示哪个类型图标;不需要图标时缺省。
|
|
6867
6956
|
*
|
|
6868
|
-
*
|
|
6957
|
+
* 草稿、撤回、管理员删除、系统事件显示的是整句话而不是类型占位,一律不给图标;文件与文件配文共用文件图标。
|
|
6869
6958
|
* 名片等没有产品 glyph 的类型同样不给,它们的文案自带方括号来和真实文本区分。
|
|
6870
6959
|
*/
|
|
6871
6960
|
previewMediaKind?: ConversationListPreviewMediaKind;
|
package/dist/chat-kit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{q as DEFAULT_LOADING_MINIMUM_VISIBLE_MS,p as DEFAULT_LOADING_SHOW_DELAY_MS,x as MINI_PROGRAM_GAME_PREVIEW_FALLBACK_HEIGHT,w as MINI_PROGRAM_GAME_PREVIEW_FALLBACK_WIDTH,e as MINI_PROGRAM_LANG_NUMBERS,S as SPIKE_STEP,N as calculateMediaBox,E as canCopyMessageImage,t as canPromoteMediaPresentationSource,B as captureRuntimeClientOperation,A as captureRuntimeOperation,n as channelMiniProgramRelKey,z as createConversationPrefetchController,r as createDelayedLoadingIndicator,L as createLinkMatcher,F as createMessageImageCopySource,f as csvIncludes,d as decideChannelMiniProgramRelOpen,P as formatFileSize,O as formatMediaDuration,Q as getFileExtension,D as getMessageCopyImageUrl,C as getMessageCopyText,K as hasLinkCandidate,u as highlightSegments,a as isMiniProgramShowTypeOpenable,G as mediaService,J as normalizeLinkHref,V as placeholderWaveform,H as readService,U as resampleWaveform,s as resolveBestMediaPresentationSource,h as resolveChannelMiniProgramRelIcon,g as resolveChannelMiniProgramRelName,j as resolveChannelMiniProgramRelOpenSurface,i as resolveChannelMiniProgramRelUrl,k as resolveChannelPinnedGameCopy,o as resolveConversationListPresentation,M as resolveMediaPresentation,R as resolveMediaTransferPresentation,v as resolveMessageSearchPreview,c as resolveMiniProgramFloatLinkUrl,y as resolveMiniProgramGamePreviewLayout,b as resolveMiniProgramOpenUrl,I as resolveQuotedMessagePresentation,m as resolveVisibleChannelMiniProgramRels,l as sortChannelMiniProgramFloatingItems,T as spikeCountForDuration}from'./chunk-
|
|
1
|
+
export{q as DEFAULT_LOADING_MINIMUM_VISIBLE_MS,p as DEFAULT_LOADING_SHOW_DELAY_MS,x as MINI_PROGRAM_GAME_PREVIEW_FALLBACK_HEIGHT,w as MINI_PROGRAM_GAME_PREVIEW_FALLBACK_WIDTH,e as MINI_PROGRAM_LANG_NUMBERS,S as SPIKE_STEP,N as calculateMediaBox,E as canCopyMessageImage,t as canPromoteMediaPresentationSource,B as captureRuntimeClientOperation,A as captureRuntimeOperation,n as channelMiniProgramRelKey,z as createConversationPrefetchController,r as createDelayedLoadingIndicator,L as createLinkMatcher,F as createMessageImageCopySource,f as csvIncludes,d as decideChannelMiniProgramRelOpen,P as formatFileSize,O as formatMediaDuration,Q as getFileExtension,D as getMessageCopyImageUrl,C as getMessageCopyText,K as hasLinkCandidate,u as highlightSegments,a as isMiniProgramShowTypeOpenable,G as mediaService,J as normalizeLinkHref,V as placeholderWaveform,H as readService,U as resampleWaveform,s as resolveBestMediaPresentationSource,h as resolveChannelMiniProgramRelIcon,g as resolveChannelMiniProgramRelName,j as resolveChannelMiniProgramRelOpenSurface,i as resolveChannelMiniProgramRelUrl,k as resolveChannelPinnedGameCopy,o as resolveConversationListPresentation,M as resolveMediaPresentation,R as resolveMediaTransferPresentation,v as resolveMessageSearchPreview,c as resolveMiniProgramFloatLinkUrl,y as resolveMiniProgramGamePreviewLayout,b as resolveMiniProgramOpenUrl,I as resolveQuotedMessagePresentation,m as resolveVisibleChannelMiniProgramRels,l as sortChannelMiniProgramFloatingItems,T as spikeCountForDuration}from'./chunk-OGCY77K3.js';export{j as DEFAULT_EMOJI_ASSET_BASE,i as EMOJI_CATALOG,c as EMOJI_GAME_DICE_STABLE_KEY,b as EMOJI_GAME_RPS_STABLE_KEY,m as EMOJI_TOKEN_RE,P as MAX_BATCH_FILES,a as MAX_RECENT_EMOJI_COUNT,g as UNICODE_EMOJI_CATALOG,O as blockReasonForChannelSession,N as blockReasonForChannelState,V as blockReasonForGroupState,Y as blockReasonForSession,I as canEditMessage,w as canPinChannelMessage,v as canPinGroupMessage,x as canPinMessage,H as canRecallMessage,fa as cancelMediaUpload,T as classifyGifFile,S as classifyMediaFile,s as countUnreadConversations,u as createChatRuntime,p as createEmojiMatcher,K as decideConversationAction,M as decideMemberTargetAction,L as decideMessageAction,l as emojiAssetUrl,n as emojiUrlByCode,Fa as fetchConversationFileBatch,Ga as fetchConversationImageBatch,Da as fetchConversationMessageBatch,Ha as fetchConversationVideoBatch,Ia as fetchConversationVoiceBatch,Ja as fetchNextConversationSearchBatch,r as formatConversationUnreadBadge,ia as forwardService,o as hasEmojiCandidate,U as isGifFile,y as isPinnedMessageProtected,aa as isVoiceStorageConfigured,Q as mediaBatchBudgetBytes,na as messageService,e as parseUnicodeEmojiCode,sa as pinnedMessageService,d as prependRecentEmoji,Ca as profileService,$ as replaceInterruptedMediaFile,W as requiresConversationEncryption,D as resolveChannelMemberAvatarUrl,C as resolveChannelMemberDisplayName,k as resolveEmojiToken,G as resolveFriendDisplayName,ta as resolveImProfileAccessDestination,A as resolveMemberDisplayName,t as resolveMessageNotificationDecision,F as resolvePublicNickname,E as resolveSenderAvatarUrl,q as resolveStandaloneEmojiMessage,h as resolveUnicodeEmoji,ga as retryMessage,R as runMediaSendBatch,ea as sendAsFilesBatch,J as sendBlockReasonForDecision,ca as sendMediaAlbum,_ as sendMediaFile,da as sendMediaFilesBatch,Z as sendText,ba as sendVoice,X as supportsConversationMention,f as unicodeEmojiTextFromCode}from'./chunk-CO4DXVJT.js';export{C as createNewMessageBadgeController,i as createThreadItems,f as formatChatDateSeparator,e as formatConversationDisplayTime,c as getLocalDayKey,l as isMessageLocateScrollProtected,v as isMessageTailChangeFromOlderWindowTrim,k as isMessageViewportMeasurable,B as isMessageVisibleForNewMessageBadge,x as loadOlderUntilBoundary,p as refreshPrependMessageAnchorPosition,j as resolveCenteredMessageScrollTop,a as resolveDisplayTimestamp,g as resolveImThreadActiveDate,h as resolveMessageBodyKind,b as resolveMessageTimelineTimestamp,n as resolvePrependMessageAnchor,q as resolvePrependMessageAnchorAdjustment,o as resolvePrependMessageAnchorPosition,s as resolveSurvivingMessageAnchorAdjustment,r as resolveVisibleMessageAnchorPositions,t as shouldCompleteInitialViewport,y as shouldFillInitialHistoryViewport,u as shouldFollowIncomingMessage,z as shouldLoadNewerHistoryPage,m as shouldPrefetchOlderHistory,w as shouldRestoreMessageViewportFocus,d as shouldShowChatDateSeparator,A as shouldTrackRemoteMessageForBadge}from'./chunk-EQVFLMM3.js';import'./chunk-GISCLEZV.js';import'./chunk-YP6KFYYU.js';import'./chunk-SVYZRVHS.js';export{va as canTransmit,ta as canTransmitByType,ua as canTransmitContent,sa as requiresForwardTypeConfirmation}from'./chunk-XNBJ3NXF.js';import'./chunk-WOT6VMZA.js';
|