k2-im 0.1.48 → 0.1.50
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 +24 -15
- package/dist/chat-kit-pinia.js +1 -1
- package/dist/chat-kit-vue.d.ts +58 -9
- package/dist/chat-kit-vue.js +1 -1
- package/dist/chat-kit.d.ts +22 -14
- package/dist/chat-kit.js +1 -1
- package/dist/chunk-2LUSPYH5.js +1 -0
- package/dist/chunk-6EPXLFLD.js +2 -0
- package/dist/chunk-DLZBFAYO.js +1 -0
- package/dist/chunk-JHGB6KYI.js +2 -0
- package/dist/{chunk-ICG32ESA.js → chunk-JOD67FT3.js} +1 -1
- package/dist/{chunk-ZAX3Q5WO.js → chunk-KFVKMPCY.js} +1 -1
- package/dist/chunk-Q2DEFN53.js +1 -0
- package/dist/chunk-ZFYM6YHK.js +7 -0
- package/dist/i18n.d.ts +11 -5
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +29 -19
- package/dist/index.js +1 -1
- package/dist/sdk.d.ts +29 -19
- package/dist/sdk.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-ELGE657I.js +0 -7
- package/dist/chunk-FMEZINTJ.js +0 -2
- package/dist/chunk-HPS3TBSB.js +0 -2
- package/dist/chunk-PAEBGHDI.js +0 -1
- package/dist/chunk-RDTT34ZF.js +0 -1
package/dist/browser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Ua as canCopyImageToClipboard,Va as copyImageToClipboard,B as createLazyBrowserApiProtocolClient}from'./chunk-
|
|
1
|
+
export{Ua as canCopyImageToClipboard,Va as copyImageToClipboard,B as createLazyBrowserApiProtocolClient}from'./chunk-ZFYM6YHK.js';import'./chunk-JHGB6KYI.js';import'./chunk-WOT6VMZA.js';
|
package/dist/chat-kit-pinia.d.ts
CHANGED
|
@@ -114,8 +114,11 @@ type LastMessageSummary = {
|
|
|
114
114
|
kind: 'transfer';
|
|
115
115
|
} | {
|
|
116
116
|
kind: 'gift';
|
|
117
|
-
}
|
|
117
|
+
}
|
|
118
|
+
/** 直播间分享。`title` 与卡片主标题一致:先主播昵称,没有再用房间标题。 */
|
|
119
|
+
| {
|
|
118
120
|
kind: 'liveRoom';
|
|
121
|
+
title?: string;
|
|
119
122
|
} | {
|
|
120
123
|
kind: 'call';
|
|
121
124
|
callKind: ImCallKind;
|
|
@@ -614,20 +617,21 @@ interface ImMediaAlbumBody {
|
|
|
614
617
|
/** 媒体项,顺序即用户选择顺序(决定宫格 index 与首项朝向)。 */
|
|
615
618
|
items: readonly ImMediaAlbumItem[];
|
|
616
619
|
}
|
|
617
|
-
/** 直播间分享的直播类型。wire `liveType`:1 视频、2 语音、3 双手机、4 单手机录屏、5
|
|
620
|
+
/** 直播间分享的直播类型。wire `liveType`:1 视频、2 语音、3 双手机、4 单手机录屏、5 语聊房。空字符串对应 wire 0,表示调用方没有类型,不猜成某一种直播。 */
|
|
618
621
|
type ImLiveRoomType = 'video' | 'voice' | 'dual-phone' | 'screen-record' | 'voice-chat';
|
|
619
622
|
/** 直播间分享的房间状态。wire `liveRoomStatus`:1 预告、2 直播中、3 已结束。 */
|
|
620
623
|
type ImLiveRoomStatus = 'preview' | 'live' | 'ended';
|
|
621
624
|
/**
|
|
622
|
-
* 直播间分享卡片正文(contentType==='liveRoom',协议 BMessage.contentType=30,fields 98-
|
|
625
|
+
* 直播间分享卡片正文(contentType==='liveRoom',协议 BMessage.contentType=30,fields 98-113)。
|
|
623
626
|
*
|
|
624
627
|
* @remarks 调用方先拿到直播间快照再写入本结构。Core 不请求直播接口,也不把缺省枚举猜成某一种直播。
|
|
625
628
|
* `uid` 是声网 SDK 初始化用的 UID,不是 IM 用户 id。
|
|
626
629
|
*/
|
|
627
630
|
interface ImLiveRoomBody {
|
|
628
|
-
/** 直播间 ID(BMessage.liveRoomId
|
|
631
|
+
/** 直播间 ID(BMessage.liveRoomId)。没有房间号时为空字符串。 */
|
|
629
632
|
liveRoomId: string;
|
|
630
|
-
|
|
633
|
+
/** 没有直播类型时为空字符串。 */
|
|
634
|
+
liveType: ImLiveRoomType | '';
|
|
631
635
|
liveRoomStatus: ImLiveRoomStatus;
|
|
632
636
|
/** 当前账号是否已关注主播。协议 bool 无法区分未设置,false 也是有效状态。 */
|
|
633
637
|
isFocus: boolean;
|
|
@@ -647,6 +651,8 @@ interface ImLiveRoomBody {
|
|
|
647
651
|
livePreviewId?: string;
|
|
648
652
|
/** 直播间人数字符串,保持协议原文,不在 Core 换算。 */
|
|
649
653
|
liveRoomViewers?: string;
|
|
654
|
+
/** 点赞数十进制字符串,保持协议原文,不在 Core 换算。 */
|
|
655
|
+
liveRoomLikes?: string;
|
|
650
656
|
}
|
|
651
657
|
interface ImMessageBody {
|
|
652
658
|
/** P0 文本内容(明文,解密后的结果)。 */
|
|
@@ -1949,10 +1955,10 @@ interface ImProfilePort {
|
|
|
1949
1955
|
* 会话收藏可展示的内容类型;与 iOS `isSupportCollectionMsgType` 对齐。
|
|
1950
1956
|
*
|
|
1951
1957
|
* @remarks 这些值与收藏接口的 `content_type` 数值一一对应,而那个数值就是消息自己的 contentType
|
|
1952
|
-
* (1=文本 2=图片 3=视频 4=语音 5=位置 11=文件 28=媒体合集 29
|
|
1958
|
+
* (1=文本 2=图片 3=视频 4=语音 5=位置 11=文件 28=媒体合集 29=文件合集 30=直播间分享),不是另一套收藏专用枚举。
|
|
1953
1959
|
* Android `MessageCollectExecute` 直接写 `message.getContentType()`,iOS 写 `msg.msgType`,两端一致。
|
|
1954
1960
|
*/
|
|
1955
|
-
type ImSessionFavoriteKind = 'text' | 'image' | 'video' | 'voice' | 'location' | 'file' | 'mediaAlbum' | 'filesAlbum';
|
|
1961
|
+
type ImSessionFavoriteKind = 'text' | 'image' | 'video' | 'voice' | 'location' | 'file' | 'mediaAlbum' | 'filesAlbum' | 'liveRoom';
|
|
1956
1962
|
/** 服务端一条会话收藏快照;列表以 HTTP 为准,不回写原消息。 */
|
|
1957
1963
|
interface ImSessionFavoriteItem$1 {
|
|
1958
1964
|
readonly collectId: string;
|
|
@@ -5175,14 +5181,16 @@ interface ConversationHandle<TType extends ProductHandleConversationType = Produ
|
|
|
5175
5181
|
/**
|
|
5176
5182
|
* 按稳定消息 id 打开目标附近的连续历史窗口。
|
|
5177
5183
|
*
|
|
5178
|
-
* @remarks
|
|
5179
|
-
*
|
|
5180
|
-
*
|
|
5181
|
-
*
|
|
5182
|
-
*
|
|
5183
|
-
*
|
|
5184
|
+
* @remarks 冷启动置顶和搜索结果只提供目标 id;目标不在当前窗口或本地原文时,须经精确会话
|
|
5185
|
+
* `by_id` 确认真实原文及排序位置。预览或搜索位置不能充当历史游标。
|
|
5186
|
+
* GROUP/CHANNEL 使用远端相邻页准备两侧上下文后一次替换窗口;失败保留原窗口。
|
|
5187
|
+
* `signal` 取消本次定位,阻止提交准备中的窗口;不会撤销共享按 ID 查询已取得的合法缓存。
|
|
5188
|
+
* @throws 仅 `by_id` 明确确认缺失时抛 `IM_SDK_MESSAGE_NOT_FOUND`;没有可信原文时抛
|
|
5189
|
+
* `IM_SDK_MESSAGE_ANCHOR_UNAVAILABLE`。存储、权限与协议异常保留原错误身份。
|
|
5184
5190
|
*/
|
|
5185
|
-
loadAround: (messageId: string
|
|
5191
|
+
loadAround: (messageId: string, options?: {
|
|
5192
|
+
signal?: AbortSignal;
|
|
5193
|
+
}) => Promise<void>;
|
|
5186
5194
|
/**
|
|
5187
5195
|
* 清空当前账号下此精确会话的本机历史。
|
|
5188
5196
|
*
|
|
@@ -9221,6 +9229,7 @@ interface ImThreadStoreActions {
|
|
|
9221
9229
|
/** 默认重新定位;skipIfLoaded 仅在目标已显示且没有在途窗口操作时复用当前窗口。 */
|
|
9222
9230
|
loadAround: (messageId: string, options?: {
|
|
9223
9231
|
skipIfLoaded?: boolean;
|
|
9232
|
+
signal?: AbortSignal;
|
|
9224
9233
|
}) => Promise<boolean>;
|
|
9225
9234
|
resolveMessage: (messageId: string) => Promise<ImMessageView | null>;
|
|
9226
9235
|
retainHandle: (handle?: ProductConversationHandle) => () => void;
|
|
@@ -9271,7 +9280,7 @@ type ImSearchOperationResult = Readonly<{
|
|
|
9271
9280
|
} | {
|
|
9272
9281
|
ok: false;
|
|
9273
9282
|
operation: SearchOperation;
|
|
9274
|
-
reason: 'not-ready' | 'no-condition' | 'busy' | 'exhausted' | 'stale' | 'failed';
|
|
9283
|
+
reason: 'not-ready' | 'no-condition' | 'busy' | 'exhausted' | 'stale' | 'failed' | 'not-found' | 'anchor-unavailable' | 'cancelled';
|
|
9275
9284
|
error?: ImSdkErrorShape;
|
|
9276
9285
|
}>;
|
|
9277
9286
|
declare function defineImSearchStore(pinia: Pinia): pinia.StoreDefinition<"k2-im-search", Pick<{
|