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/index.d.ts
CHANGED
|
@@ -119,8 +119,11 @@ type LastMessageSummary = {
|
|
|
119
119
|
kind: 'transfer';
|
|
120
120
|
} | {
|
|
121
121
|
kind: 'gift';
|
|
122
|
-
}
|
|
122
|
+
}
|
|
123
|
+
/** 直播间分享。`title` 与卡片主标题一致:先主播昵称,没有再用房间标题。 */
|
|
124
|
+
| {
|
|
123
125
|
kind: 'liveRoom';
|
|
126
|
+
title?: string;
|
|
124
127
|
} | {
|
|
125
128
|
kind: 'call';
|
|
126
129
|
callKind: ImCallKind;
|
|
@@ -619,20 +622,21 @@ interface ImMediaAlbumBody {
|
|
|
619
622
|
/** 媒体项,顺序即用户选择顺序(决定宫格 index 与首项朝向)。 */
|
|
620
623
|
items: readonly ImMediaAlbumItem[];
|
|
621
624
|
}
|
|
622
|
-
/** 直播间分享的直播类型。wire `liveType`:1 视频、2 语音、3 双手机、4 单手机录屏、5
|
|
625
|
+
/** 直播间分享的直播类型。wire `liveType`:1 视频、2 语音、3 双手机、4 单手机录屏、5 语聊房。空字符串对应 wire 0,表示调用方没有类型,不猜成某一种直播。 */
|
|
623
626
|
type ImLiveRoomType = 'video' | 'voice' | 'dual-phone' | 'screen-record' | 'voice-chat';
|
|
624
627
|
/** 直播间分享的房间状态。wire `liveRoomStatus`:1 预告、2 直播中、3 已结束。 */
|
|
625
628
|
type ImLiveRoomStatus = 'preview' | 'live' | 'ended';
|
|
626
629
|
/**
|
|
627
|
-
* 直播间分享卡片正文(contentType==='liveRoom',协议 BMessage.contentType=30,fields 98-
|
|
630
|
+
* 直播间分享卡片正文(contentType==='liveRoom',协议 BMessage.contentType=30,fields 98-113)。
|
|
628
631
|
*
|
|
629
632
|
* @remarks 调用方先拿到直播间快照再写入本结构。Core 不请求直播接口,也不把缺省枚举猜成某一种直播。
|
|
630
633
|
* `uid` 是声网 SDK 初始化用的 UID,不是 IM 用户 id。
|
|
631
634
|
*/
|
|
632
635
|
interface ImLiveRoomBody {
|
|
633
|
-
/** 直播间 ID(BMessage.liveRoomId
|
|
636
|
+
/** 直播间 ID(BMessage.liveRoomId)。没有房间号时为空字符串。 */
|
|
634
637
|
liveRoomId: string;
|
|
635
|
-
|
|
638
|
+
/** 没有直播类型时为空字符串。 */
|
|
639
|
+
liveType: ImLiveRoomType | '';
|
|
636
640
|
liveRoomStatus: ImLiveRoomStatus;
|
|
637
641
|
/** 当前账号是否已关注主播。协议 bool 无法区分未设置,false 也是有效状态。 */
|
|
638
642
|
isFocus: boolean;
|
|
@@ -652,6 +656,8 @@ interface ImLiveRoomBody {
|
|
|
652
656
|
livePreviewId?: string;
|
|
653
657
|
/** 直播间人数字符串,保持协议原文,不在 Core 换算。 */
|
|
654
658
|
liveRoomViewers?: string;
|
|
659
|
+
/** 点赞数十进制字符串,保持协议原文,不在 Core 换算。 */
|
|
660
|
+
liveRoomLikes?: string;
|
|
655
661
|
}
|
|
656
662
|
interface ImMessageBody {
|
|
657
663
|
/** P0 文本内容(明文,解密后的结果)。 */
|
|
@@ -1987,10 +1993,10 @@ interface ImProfilePort {
|
|
|
1987
1993
|
* 会话收藏可展示的内容类型;与 iOS `isSupportCollectionMsgType` 对齐。
|
|
1988
1994
|
*
|
|
1989
1995
|
* @remarks 这些值与收藏接口的 `content_type` 数值一一对应,而那个数值就是消息自己的 contentType
|
|
1990
|
-
* (1=文本 2=图片 3=视频 4=语音 5=位置 11=文件 28=媒体合集 29
|
|
1996
|
+
* (1=文本 2=图片 3=视频 4=语音 5=位置 11=文件 28=媒体合集 29=文件合集 30=直播间分享),不是另一套收藏专用枚举。
|
|
1991
1997
|
* Android `MessageCollectExecute` 直接写 `message.getContentType()`,iOS 写 `msg.msgType`,两端一致。
|
|
1992
1998
|
*/
|
|
1993
|
-
type ImSessionFavoriteKind = 'text' | 'image' | 'video' | 'voice' | 'location' | 'file' | 'mediaAlbum' | 'filesAlbum';
|
|
1999
|
+
type ImSessionFavoriteKind = 'text' | 'image' | 'video' | 'voice' | 'location' | 'file' | 'mediaAlbum' | 'filesAlbum' | 'liveRoom';
|
|
1994
2000
|
/** 服务端一条会话收藏快照;列表以 HTTP 为准,不回写原消息。 */
|
|
1995
2001
|
interface ImSessionFavoriteItem$1 {
|
|
1996
2002
|
readonly collectId: string;
|
|
@@ -2978,8 +2984,10 @@ declare function canTransmit(message: ForwardCandidateMessage): boolean;
|
|
|
2978
2984
|
*/
|
|
2979
2985
|
|
|
2980
2986
|
/**
|
|
2981
|
-
*
|
|
2982
|
-
*
|
|
2987
|
+
* 允许被表情回应的父消息正文类型。
|
|
2988
|
+
* 文本、图片、视频、语音、文件、贴纸、名片、小程序、骰子/猜拳,以及转账、通话记录卡片和红包卡片本身,
|
|
2989
|
+
* 与 iOS `SZChatReactionService.supportsReactionForMessage:` 一致。
|
|
2990
|
+
* 媒体合集和直播间分享是后续显式放行:回应挂在整条消息上。
|
|
2983
2991
|
* 系统灰条(含红包领取通知、群提示、频道通知)与 unknown(未知/未来类型)不在白名单内。
|
|
2984
2992
|
*
|
|
2985
2993
|
* 这里刻意维持显式白名单而不是「排除 system 和 unknown」:新增 contentType 时默认拒绝,
|
|
@@ -5839,14 +5847,16 @@ interface ConversationHandle<TType extends ProductHandleConversationType = Produ
|
|
|
5839
5847
|
/**
|
|
5840
5848
|
* 按稳定消息 id 打开目标附近的连续历史窗口。
|
|
5841
5849
|
*
|
|
5842
|
-
* @remarks
|
|
5843
|
-
*
|
|
5844
|
-
*
|
|
5845
|
-
*
|
|
5846
|
-
*
|
|
5847
|
-
*
|
|
5850
|
+
* @remarks 冷启动置顶和搜索结果只提供目标 id;目标不在当前窗口或本地原文时,须经精确会话
|
|
5851
|
+
* `by_id` 确认真实原文及排序位置。预览或搜索位置不能充当历史游标。
|
|
5852
|
+
* GROUP/CHANNEL 使用远端相邻页准备两侧上下文后一次替换窗口;失败保留原窗口。
|
|
5853
|
+
* `signal` 取消本次定位,阻止提交准备中的窗口;不会撤销共享按 ID 查询已取得的合法缓存。
|
|
5854
|
+
* @throws 仅 `by_id` 明确确认缺失时抛 `IM_SDK_MESSAGE_NOT_FOUND`;没有可信原文时抛
|
|
5855
|
+
* `IM_SDK_MESSAGE_ANCHOR_UNAVAILABLE`。存储、权限与协议异常保留原错误身份。
|
|
5848
5856
|
*/
|
|
5849
|
-
loadAround: (messageId: string
|
|
5857
|
+
loadAround: (messageId: string, options?: {
|
|
5858
|
+
signal?: AbortSignal;
|
|
5859
|
+
}) => Promise<void>;
|
|
5850
5860
|
/**
|
|
5851
5861
|
* 清空当前账号下此精确会话的本机历史。
|
|
5852
5862
|
*
|
|
@@ -6718,11 +6728,11 @@ interface ImSessionFavoritesApi {
|
|
|
6718
6728
|
delete: (collectIds: readonly string[]) => Promise<void>;
|
|
6719
6729
|
}
|
|
6720
6730
|
/**
|
|
6721
|
-
* 对齐 iOS Cell:文本 / 图 / 视频 / 语音 / 文件 / 媒体合集 /
|
|
6731
|
+
* 对齐 iOS Cell:文本 / 图 / 视频 / 语音 / 文件 / 媒体合集 / 文件合集 / 直播间分享可收藏;表情、名片、通话等不可。
|
|
6722
6732
|
*
|
|
6723
6733
|
* 两端的收藏类型判定都是**黑名单**(iOS `isSupportCollectionMsgType` 排除名片/通话/表情/游戏/未知;
|
|
6724
|
-
* Android `isCanCollectByType`
|
|
6725
|
-
* 收藏接口的 `content_type` 直接用消息自己的 28。
|
|
6734
|
+
* Android `isCanCollectByType` 排除通话/表情/名片/未知/解密失败)。媒体合集与直播间分享不在黑名单里,
|
|
6735
|
+
* 收藏接口的 `content_type` 直接用消息自己的 28 / 30。
|
|
6726
6736
|
*/
|
|
6727
6737
|
declare function resolveSessionFavoriteKindFromMessage(message: ImMessageView): ImSessionFavoriteKind | null;
|
|
6728
6738
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'./chunk-IDECJJXC.js';import'./chunk-SXY56EVC.js';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
|
+
import'./chunk-IDECJJXC.js';import'./chunk-SXY56EVC.js';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-KFVKMPCY.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-DLZBFAYO.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-2LUSPYH5.js';export{a as DEFAULT_LOCALE,k as createImI18n,f as formatFailure,h as formatLastMessageSummary,i as formatMediaPlaceholder,j as formatMentionAll,l as formatServiceText,g as formatSystemMessage,c as getImTimeCatalog,b as normalizeImLocale,d as registerImCatalogOverrides,e as resetImCatalogOverrides}from'./chunk-JOD67FT3.js';export{e as IMAGE_MESSAGE_ACCEPT,n as IM_CHAT_FONT_SCALES,g as IM_DIAGNOSTIC_CATEGORIES,j as IM_EMOJI_CATALOG,c as ImPinnedMessageOperationError,m as buildSessionFavoritePlainBody,d as createFaceToFaceGroupQrPayload,o as createImClient,h as createImConsoleDiagnosticSink,r as createImDiagnosticMemoryBuffer,s as createImResourceUploader,i as createSdkDiagnosticWriter,f as isSupportedImageFile,a as migrateImCachePrefix,k as resolveImEmojiToken,l as resolveSessionFavoriteKindFromMessage}from'./chunk-6EPXLFLD.js';export{Ya as MediaTransferError,kb as createVoicePlayer,lb as createVoiceRecordingSession,ib as detectVoiceCapabilities,Za as mediaTransferErrorCodeOf,$a as normalizeMediaUploadCredentials,jb as voiceErrorCodeOf}from'./chunk-ZFYM6YHK.js';export{Aa as EDIT_WINDOW_MS,p as MEDIA_ALBUM_CAPTION_MAX_LENGTH,q as MEDIA_ALBUM_MAX_ITEMS,Ia as REACTION_SUPPORTED_CONTENT_TYPES,Ja as canReactToMessage,Ea as canTransmit,Ca as canTransmitByType,Da as canTransmitContent,x as classifyStickerImageType,pa as createImTextSearchMatcher,na as extractSearchText,oa as getImTextSearchInitial,Cb as parseSessionFavoriteAlbumItems,Fb as parseSessionFavoriteFileItems,Ba as requiresForwardTypeConfirmation,La as resolveChannelAccess,r as resolveMediaAlbumSendContentType,Db as resolveSessionFavoriteAlbumCaption,Bb as resolveSessionFavoriteAlbumItemPreviewUrl,ua as resolveTextSegments,Qa as sortSessions,Ra as sumSessionsUnread}from'./chunk-JHGB6KYI.js';import'./chunk-WOT6VMZA.js';
|
package/dist/sdk.d.ts
CHANGED
|
@@ -119,8 +119,11 @@ type LastMessageSummary = {
|
|
|
119
119
|
kind: 'transfer';
|
|
120
120
|
} | {
|
|
121
121
|
kind: 'gift';
|
|
122
|
-
}
|
|
122
|
+
}
|
|
123
|
+
/** 直播间分享。`title` 与卡片主标题一致:先主播昵称,没有再用房间标题。 */
|
|
124
|
+
| {
|
|
123
125
|
kind: 'liveRoom';
|
|
126
|
+
title?: string;
|
|
124
127
|
} | {
|
|
125
128
|
kind: 'call';
|
|
126
129
|
callKind: ImCallKind;
|
|
@@ -619,20 +622,21 @@ interface ImMediaAlbumBody {
|
|
|
619
622
|
/** 媒体项,顺序即用户选择顺序(决定宫格 index 与首项朝向)。 */
|
|
620
623
|
items: readonly ImMediaAlbumItem[];
|
|
621
624
|
}
|
|
622
|
-
/** 直播间分享的直播类型。wire `liveType`:1 视频、2 语音、3 双手机、4 单手机录屏、5
|
|
625
|
+
/** 直播间分享的直播类型。wire `liveType`:1 视频、2 语音、3 双手机、4 单手机录屏、5 语聊房。空字符串对应 wire 0,表示调用方没有类型,不猜成某一种直播。 */
|
|
623
626
|
type ImLiveRoomType = 'video' | 'voice' | 'dual-phone' | 'screen-record' | 'voice-chat';
|
|
624
627
|
/** 直播间分享的房间状态。wire `liveRoomStatus`:1 预告、2 直播中、3 已结束。 */
|
|
625
628
|
type ImLiveRoomStatus = 'preview' | 'live' | 'ended';
|
|
626
629
|
/**
|
|
627
|
-
* 直播间分享卡片正文(contentType==='liveRoom',协议 BMessage.contentType=30,fields 98-
|
|
630
|
+
* 直播间分享卡片正文(contentType==='liveRoom',协议 BMessage.contentType=30,fields 98-113)。
|
|
628
631
|
*
|
|
629
632
|
* @remarks 调用方先拿到直播间快照再写入本结构。Core 不请求直播接口,也不把缺省枚举猜成某一种直播。
|
|
630
633
|
* `uid` 是声网 SDK 初始化用的 UID,不是 IM 用户 id。
|
|
631
634
|
*/
|
|
632
635
|
interface ImLiveRoomBody {
|
|
633
|
-
/** 直播间 ID(BMessage.liveRoomId
|
|
636
|
+
/** 直播间 ID(BMessage.liveRoomId)。没有房间号时为空字符串。 */
|
|
634
637
|
liveRoomId: string;
|
|
635
|
-
|
|
638
|
+
/** 没有直播类型时为空字符串。 */
|
|
639
|
+
liveType: ImLiveRoomType | '';
|
|
636
640
|
liveRoomStatus: ImLiveRoomStatus;
|
|
637
641
|
/** 当前账号是否已关注主播。协议 bool 无法区分未设置,false 也是有效状态。 */
|
|
638
642
|
isFocus: boolean;
|
|
@@ -652,6 +656,8 @@ interface ImLiveRoomBody {
|
|
|
652
656
|
livePreviewId?: string;
|
|
653
657
|
/** 直播间人数字符串,保持协议原文,不在 Core 换算。 */
|
|
654
658
|
liveRoomViewers?: string;
|
|
659
|
+
/** 点赞数十进制字符串,保持协议原文,不在 Core 换算。 */
|
|
660
|
+
liveRoomLikes?: string;
|
|
655
661
|
}
|
|
656
662
|
interface ImMessageBody {
|
|
657
663
|
/** P0 文本内容(明文,解密后的结果)。 */
|
|
@@ -1606,10 +1612,10 @@ type ImExpressionRecentItem$1 = ImExpressionAsset$1 | ImExpressionEmojiRecent;
|
|
|
1606
1612
|
* 会话收藏可展示的内容类型;与 iOS `isSupportCollectionMsgType` 对齐。
|
|
1607
1613
|
*
|
|
1608
1614
|
* @remarks 这些值与收藏接口的 `content_type` 数值一一对应,而那个数值就是消息自己的 contentType
|
|
1609
|
-
* (1=文本 2=图片 3=视频 4=语音 5=位置 11=文件 28=媒体合集 29
|
|
1615
|
+
* (1=文本 2=图片 3=视频 4=语音 5=位置 11=文件 28=媒体合集 29=文件合集 30=直播间分享),不是另一套收藏专用枚举。
|
|
1610
1616
|
* Android `MessageCollectExecute` 直接写 `message.getContentType()`,iOS 写 `msg.msgType`,两端一致。
|
|
1611
1617
|
*/
|
|
1612
|
-
type ImSessionFavoriteKind = 'text' | 'image' | 'video' | 'voice' | 'location' | 'file' | 'mediaAlbum' | 'filesAlbum';
|
|
1618
|
+
type ImSessionFavoriteKind = 'text' | 'image' | 'video' | 'voice' | 'location' | 'file' | 'mediaAlbum' | 'filesAlbum' | 'liveRoom';
|
|
1613
1619
|
/** 服务端一条会话收藏快照;列表以 HTTP 为准,不回写原消息。 */
|
|
1614
1620
|
interface ImSessionFavoriteItem$1 {
|
|
1615
1621
|
readonly collectId: string;
|
|
@@ -2222,8 +2228,10 @@ declare function canTransmit(message: ForwardCandidateMessage): boolean;
|
|
|
2222
2228
|
*/
|
|
2223
2229
|
|
|
2224
2230
|
/**
|
|
2225
|
-
*
|
|
2226
|
-
*
|
|
2231
|
+
* 允许被表情回应的父消息正文类型。
|
|
2232
|
+
* 文本、图片、视频、语音、文件、贴纸、名片、小程序、骰子/猜拳,以及转账、通话记录卡片和红包卡片本身,
|
|
2233
|
+
* 与 iOS `SZChatReactionService.supportsReactionForMessage:` 一致。
|
|
2234
|
+
* 媒体合集和直播间分享是后续显式放行:回应挂在整条消息上。
|
|
2227
2235
|
* 系统灰条(含红包领取通知、群提示、频道通知)与 unknown(未知/未来类型)不在白名单内。
|
|
2228
2236
|
*
|
|
2229
2237
|
* 这里刻意维持显式白名单而不是「排除 system 和 unknown」:新增 contentType 时默认拒绝,
|
|
@@ -4863,14 +4871,16 @@ interface ConversationHandle<TType extends ProductHandleConversationType = Produ
|
|
|
4863
4871
|
/**
|
|
4864
4872
|
* 按稳定消息 id 打开目标附近的连续历史窗口。
|
|
4865
4873
|
*
|
|
4866
|
-
* @remarks
|
|
4867
|
-
*
|
|
4868
|
-
*
|
|
4869
|
-
*
|
|
4870
|
-
*
|
|
4871
|
-
*
|
|
4874
|
+
* @remarks 冷启动置顶和搜索结果只提供目标 id;目标不在当前窗口或本地原文时,须经精确会话
|
|
4875
|
+
* `by_id` 确认真实原文及排序位置。预览或搜索位置不能充当历史游标。
|
|
4876
|
+
* GROUP/CHANNEL 使用远端相邻页准备两侧上下文后一次替换窗口;失败保留原窗口。
|
|
4877
|
+
* `signal` 取消本次定位,阻止提交准备中的窗口;不会撤销共享按 ID 查询已取得的合法缓存。
|
|
4878
|
+
* @throws 仅 `by_id` 明确确认缺失时抛 `IM_SDK_MESSAGE_NOT_FOUND`;没有可信原文时抛
|
|
4879
|
+
* `IM_SDK_MESSAGE_ANCHOR_UNAVAILABLE`。存储、权限与协议异常保留原错误身份。
|
|
4872
4880
|
*/
|
|
4873
|
-
loadAround: (messageId: string
|
|
4881
|
+
loadAround: (messageId: string, options?: {
|
|
4882
|
+
signal?: AbortSignal;
|
|
4883
|
+
}) => Promise<void>;
|
|
4874
4884
|
/**
|
|
4875
4885
|
* 清空当前账号下此精确会话的本机历史。
|
|
4876
4886
|
*
|
|
@@ -5742,11 +5752,11 @@ interface ImSessionFavoritesApi {
|
|
|
5742
5752
|
delete: (collectIds: readonly string[]) => Promise<void>;
|
|
5743
5753
|
}
|
|
5744
5754
|
/**
|
|
5745
|
-
* 对齐 iOS Cell:文本 / 图 / 视频 / 语音 / 文件 / 媒体合集 /
|
|
5755
|
+
* 对齐 iOS Cell:文本 / 图 / 视频 / 语音 / 文件 / 媒体合集 / 文件合集 / 直播间分享可收藏;表情、名片、通话等不可。
|
|
5746
5756
|
*
|
|
5747
5757
|
* 两端的收藏类型判定都是**黑名单**(iOS `isSupportCollectionMsgType` 排除名片/通话/表情/游戏/未知;
|
|
5748
|
-
* Android `isCanCollectByType`
|
|
5749
|
-
* 收藏接口的 `content_type` 直接用消息自己的 28。
|
|
5758
|
+
* Android `isCanCollectByType` 排除通话/表情/名片/未知/解密失败)。媒体合集与直播间分享不在黑名单里,
|
|
5759
|
+
* 收藏接口的 `content_type` 直接用消息自己的 28 / 30。
|
|
5750
5760
|
*/
|
|
5751
5761
|
declare function resolveSessionFavoriteKindFromMessage(message: ImMessageView): ImSessionFavoriteKind | null;
|
|
5752
5762
|
/**
|
package/dist/sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'./chunk-IDECJJXC.js';export{e as IMAGE_MESSAGE_ACCEPT,n as IM_CHAT_FONT_SCALES,g as IM_DIAGNOSTIC_CATEGORIES,j as IM_EMOJI_CATALOG,c as ImPinnedMessageOperationError,m as buildSessionFavoritePlainBody,d as createFaceToFaceGroupQrPayload,o as createImClient,h as createImConsoleDiagnosticSink,r as createImDiagnosticMemoryBuffer,s as createImResourceUploader,i as createSdkDiagnosticWriter,f as isSupportedImageFile,a as migrateImCachePrefix,k as resolveImEmojiToken,l as resolveSessionFavoriteKindFromMessage}from'./chunk-
|
|
1
|
+
import'./chunk-IDECJJXC.js';export{e as IMAGE_MESSAGE_ACCEPT,n as IM_CHAT_FONT_SCALES,g as IM_DIAGNOSTIC_CATEGORIES,j as IM_EMOJI_CATALOG,c as ImPinnedMessageOperationError,m as buildSessionFavoritePlainBody,d as createFaceToFaceGroupQrPayload,o as createImClient,h as createImConsoleDiagnosticSink,r as createImDiagnosticMemoryBuffer,s as createImResourceUploader,i as createSdkDiagnosticWriter,f as isSupportedImageFile,a as migrateImCachePrefix,k as resolveImEmojiToken,l as resolveSessionFavoriteKindFromMessage}from'./chunk-6EPXLFLD.js';export{Ya as MediaTransferError,kb as createVoicePlayer,lb as createVoiceRecordingSession,ib as detectVoiceCapabilities,Za as mediaTransferErrorCodeOf,$a as normalizeMediaUploadCredentials,jb as voiceErrorCodeOf}from'./chunk-ZFYM6YHK.js';export{Aa as EDIT_WINDOW_MS,p as MEDIA_ALBUM_CAPTION_MAX_LENGTH,q as MEDIA_ALBUM_MAX_ITEMS,Ia as REACTION_SUPPORTED_CONTENT_TYPES,Ja as canReactToMessage,Ea as canTransmit,Ca as canTransmitByType,Da as canTransmitContent,x as classifyStickerImageType,pa as createImTextSearchMatcher,na as extractSearchText,oa as getImTextSearchInitial,Cb as parseSessionFavoriteAlbumItems,Fb as parseSessionFavoriteFileItems,Ba as requiresForwardTypeConfirmation,La as resolveChannelAccess,r as resolveMediaAlbumSendContentType,Db as resolveSessionFavoriteAlbumCaption,Bb as resolveSessionFavoriteAlbumItemPreviewUrl,ua as resolveTextSegments,Qa as sortSessions,Ra as sumSessionsUnread}from'./chunk-JHGB6KYI.js';import'./chunk-WOT6VMZA.js';
|