k2-im 0.1.18 → 0.1.20
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/README.md +36 -0
- package/dist/browser.js +1 -1
- package/dist/chat-kit-pinia.d.ts +317 -17
- package/dist/chat-kit-pinia.js +1 -1
- package/dist/chat-kit-vue.d.ts +93 -6
- package/dist/chat-kit-vue.js +1 -1
- package/dist/chat-kit.d.ts +358 -23
- package/dist/chat-kit.js +1 -1
- package/dist/chunk-4RG5NHIL.js +7 -0
- package/dist/chunk-67E52PC5.js +2 -0
- package/dist/chunk-BKZ3VNAT.js +1 -0
- package/dist/chunk-EEICKR6L.js +1 -0
- package/dist/chunk-IYDCZ2PY.js +1 -0
- package/dist/chunk-LNCHWSAT.js +2 -0
- package/dist/chunk-ZDD7A2BS.js +1 -0
- package/dist/i18n.d.ts +121 -4
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +461 -28
- package/dist/index.js +1 -1
- package/dist/sdk.d.ts +320 -17
- package/dist/sdk.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-ACU6MYJB.js +0 -2
- package/dist/chunk-DFJWOEGQ.js +0 -7
- package/dist/chunk-EBFUMES6.js +0 -2
- package/dist/chunk-G7IJFU6R.js +0 -1
- package/dist/chunk-IXEEIWDI.js +0 -1
- package/dist/chunk-LCNFKUGH.js +0 -1
- package/dist/chunk-RKZTPXBQ.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'./chunk-IDECJJXC.js';import'./chunk-SXY56EVC.js';export{c as DEFAULT_LOADING_MINIMUM_VISIBLE_MS,b as DEFAULT_LOADING_SHOW_DELAY_MS,u as SPIKE_STEP,q as calculateMediaBox,f as canPromoteMediaPresentationSource,h as captureRuntimeClientOperation,g as captureRuntimeOperation,d as createDelayedLoadingIndicator,o as createLinkMatcher,s as formatFileSize,r as formatMediaDuration,t as getFileExtension,n as hasLinkCandidate,l as highlightSegments,i as mediaService,m as normalizeLinkHref,x as placeholderWaveform,j as readService,w as resampleWaveform,e as resolveBestMediaPresentationSource,a as resolveConversationListPresentation,p as resolveMediaPresentation,k as resolveQuotedMessagePresentation,v as spikeCountForDuration}from'./chunk-
|
|
1
|
+
import'./chunk-IDECJJXC.js';import'./chunk-SXY56EVC.js';export{c as DEFAULT_LOADING_MINIMUM_VISIBLE_MS,b as DEFAULT_LOADING_SHOW_DELAY_MS,u as SPIKE_STEP,q as calculateMediaBox,f as canPromoteMediaPresentationSource,h as captureRuntimeClientOperation,g as captureRuntimeOperation,d as createDelayedLoadingIndicator,o as createLinkMatcher,s as formatFileSize,r as formatMediaDuration,t as getFileExtension,n as hasLinkCandidate,l as highlightSegments,i as mediaService,m as normalizeLinkHref,x as placeholderWaveform,j as readService,w as resampleWaveform,e as resolveBestMediaPresentationSource,a as resolveConversationListPresentation,p as resolveMediaPresentation,k as resolveQuotedMessagePresentation,v as spikeCountForDuration}from'./chunk-LNCHWSAT.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,L as MAX_BATCH_FILES,a as MAX_RECENT_EMOJI_COUNT,g as UNICODE_EMOJI_CATALOG,K as blockReasonForChannelSession,J as blockReasonForChannelState,Q as blockReasonForGroupState,T as blockReasonForSession,E as canEditMessage,u as canPinChannelMessage,t as canPinGroupMessage,v as canPinMessage,D as canRecallMessage,aa as cancelMediaUpload,O as classifyGifFile,s as createChatRuntime,p as createEmojiMatcher,G as decideConversationAction,I as decideMemberTargetAction,H as decideMessageAction,l as emojiAssetUrl,n as emojiUrlByCode,Aa as fetchConversationFileBatch,Ba as fetchConversationImageBatch,ya as fetchConversationMessageBatch,Ca as fetchConversationVideoBatch,Da as fetchConversationVoiceBatch,Ea as fetchNextConversationSearchBatch,da as forwardService,o as hasEmojiCandidate,P as isGifFile,w as isPinnedMessageProtected,X as isVoiceStorageConfigured,M as mediaBatchBudgetBytes,ia as messageService,e as parseUnicodeEmojiCode,na as pinnedMessageService,d as prependRecentEmoji,xa as profileService,W as replaceInterruptedMediaFile,R as requiresConversationEncryption,z as resolveChannelMemberAvatarUrl,y as resolveChannelMemberDisplayName,k as resolveEmojiToken,C as resolveFriendDisplayName,oa as resolveImProfileAccessDestination,x as resolveMemberDisplayName,r as resolveMessageNotificationDecision,B as resolvePublicNickname,A as resolveSenderAvatarUrl,q as resolveStandaloneEmojiMessage,h as resolveUnicodeEmoji,ba as retryMessage,N as runMediaSendBatch,$ as sendAsFilesBatch,F as sendBlockReasonForDecision,Z as sendMediaAlbum,V as sendMediaFile,_ as sendMediaFilesBatch,U as sendText,Y as sendVoice,S as supportsConversationMention,f as unicodeEmojiTextFromCode}from'./chunk-BKZ3VNAT.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-EEICKR6L.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-IYDCZ2PY.js';export{l as IM_CHAT_FONT_SCALES,e as IM_DIAGNOSTIC_CATEGORIES,h as IM_EMOJI_CATALOG,c as ImPinnedMessageOperationError,k as buildSessionFavoritePlainBody,d as createFaceToFaceGroupQrPayload,m as createImClient,f as createImConsoleDiagnosticSink,p as createImDiagnosticMemoryBuffer,g as createSdkDiagnosticWriter,a as migrateImCachePrefix,i as resolveImEmojiToken,j as resolveSessionFavoriteKindFromMessage}from'./chunk-67E52PC5.js';export{Ra as MediaTransferError,$a as createVoicePlayer,ab as createVoiceRecordingSession,Za as detectVoiceCapabilities,Sa as mediaTransferErrorCodeOf,Ta as normalizeMediaUploadCredentials,_a as voiceErrorCodeOf}from'./chunk-4RG5NHIL.js';export{la as EDIT_WINDOW_MS,m as MEDIA_ALBUM_CAPTION_MAX_LENGTH,n as MEDIA_ALBUM_MAX_ITEMS,ta as REACTION_SUPPORTED_CONTENT_TYPES,ua as canReactToMessage,pa as canTransmit,na as canTransmitByType,oa as canTransmitContent,q as classifyStickerImageType,aa as createImTextSearchMatcher,_ as extractSearchText,$ as getImTextSearchInitial,ma as requiresForwardTypeConfirmation,wa as resolveChannelAccess,o as resolveMediaAlbumSendContentType,fa as resolveTextSegments,Ca as sortSessions,Da as sumSessionsUnread}from'./chunk-ZDD7A2BS.js';import'./chunk-WOT6VMZA.js';
|
package/dist/sdk.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ interface ConversationDraft$1 {
|
|
|
40
40
|
updatedAt: number;
|
|
41
41
|
}
|
|
42
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' | 'unknown';
|
|
43
|
+
type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'call' | 'redPacket' | 'mediaAlbum' | 'unknown';
|
|
44
44
|
/**
|
|
45
45
|
* 发送态(客户端态):消息从本地创建到服务端确认的生命周期。
|
|
46
46
|
* `uploading` 仅媒体消息使用:文件上传阶段(uploading→pending→sending→sent);
|
|
@@ -50,7 +50,7 @@ type MessageSendStatus = 'pending' | 'uploading' | 'sending' | 'sent' | 'failed'
|
|
|
50
50
|
/** 送达/已读态(服务端态):消息在对端的回执状态。 */
|
|
51
51
|
type MessageReceipt = 'unread' | 'delivered' | 'read';
|
|
52
52
|
/** 群系统提示事件类型(结构化语义;UI/i18n 层据此渲染文案,**不在 mapper 写死中文**)。 */
|
|
53
|
-
type ImSystemEventType = 'direct_contact_established' | 'direct_contact_required' | 'direct_message_refused' | 'group_info_changed' | 'group_activated' | 'group_member_joined' | 'group_member_invited' | 'group_member_left' | 'group_member_removed' | 'group_master_changed' | 'group_dismissed' | 'group_member_renamed' | 'group_message_pinned' | 'group_message_unpinned' | 'channel_name_changed' | 'channel_avatar_changed' | 'channel_announcement_changed' | 'channel_member_joined' | 'channel_member_invited' | 'channel_member_left' | 'channel_member_removed' | 'channel_owner_transferred' | 'channel_admin_added' | 'channel_admin_removed' | 'channel_dismissed' | 'channel_all_muted' | 'channel_all_unmuted' | 'channel_created' | 'channel_private_chat_disabled' | 'channel_private_chat_enabled' | 'channel_member_renamed' | 'channel_member_muted' | 'channel_member_unmuted' | 'channel_message_pinned' | 'channel_message_unpinned' | 'channel_unknown' | 'red_packet_claimed' | 'red_packet_claimed_thunder' | 'unknown';
|
|
53
|
+
type ImSystemEventType = 'direct_contact_established' | 'direct_contact_required' | 'direct_message_refused' | 'group_info_changed' | 'group_activated' | 'group_member_joined' | 'group_member_invited' | 'group_member_left' | 'group_member_removed' | 'group_master_changed' | 'group_dismissed' | 'group_member_renamed' | 'group_message_pinned' | 'group_message_unpinned' | 'group_call_started' | 'group_call_ended' | 'group_call_missed' | 'channel_name_changed' | 'channel_avatar_changed' | 'channel_announcement_changed' | 'channel_member_joined' | 'channel_member_invited' | 'channel_member_left' | 'channel_member_removed' | 'channel_owner_transferred' | 'channel_admin_added' | 'channel_admin_removed' | 'channel_dismissed' | 'channel_all_muted' | 'channel_all_unmuted' | 'channel_created' | 'channel_private_chat_disabled' | 'channel_private_chat_enabled' | 'channel_member_renamed' | 'channel_member_muted' | 'channel_member_unmuted' | 'channel_message_pinned' | 'channel_message_unpinned' | 'channel_unknown' | 'red_packet_claimed' | 'red_packet_claimed_thunder' | 'unknown';
|
|
54
54
|
/** 系统提示结构化内容(contentType==='system'):存语义,不把最终中文句子当主数据源(UI/composable 据 eventType + 资料生成文案)。 */
|
|
55
55
|
interface ImSystemMessageBody {
|
|
56
56
|
eventType: ImSystemEventType;
|
|
@@ -117,6 +117,18 @@ type LastMessageSummary = {
|
|
|
117
117
|
} | {
|
|
118
118
|
kind: 'voice';
|
|
119
119
|
durationMs?: number;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* 媒体合集(contentType 28)。
|
|
123
|
+
*
|
|
124
|
+
* 只给结构化计数与配文,**不在这里拼「2 张照片, 1 个视频」这种文案**——中英文的量词、复数与
|
|
125
|
+
* 连接符各不相同,必须由 im-i18n 按 locale 组装。`caption` 非空时宿主优先显示配文(对齐三端)。
|
|
126
|
+
*/
|
|
127
|
+
| {
|
|
128
|
+
kind: 'mediaAlbum';
|
|
129
|
+
imageCount: number;
|
|
130
|
+
videoCount: number;
|
|
131
|
+
caption?: string;
|
|
120
132
|
} | {
|
|
121
133
|
kind: 'encrypted';
|
|
122
134
|
} | {
|
|
@@ -419,6 +431,59 @@ interface UnknownMessageBody {
|
|
|
419
431
|
reason: 'unsupported-content-type' | 'malformed-content';
|
|
420
432
|
}
|
|
421
433
|
/** 按 contentType 的结构化内容体。 */
|
|
434
|
+
/**
|
|
435
|
+
* 媒体合集单项:一张图片或一个视频。
|
|
436
|
+
*
|
|
437
|
+
* 对应协议 `content` JSON 里 `items[]` 的一个元素(wire `mediaType` 1=图片 2=视频)。
|
|
438
|
+
* 与 `ImImageBody` / `ImVideoBody` 的区别是它**不是**独立的一条消息——同一条合集消息里的
|
|
439
|
+
* 若干项共享消息级的撤回、已读、引用与转发语义。
|
|
440
|
+
*/
|
|
441
|
+
interface ImMediaAlbumItem {
|
|
442
|
+
/** 该项是图片还是视频;由协议 `mediaType` 归一而来,未知取值的项在解析阶段已被丢弃。 */
|
|
443
|
+
kind: 'image' | 'video';
|
|
444
|
+
/** 远端地址。加密项也是这个地址,解密用本项自己的 `teaKey`。 */
|
|
445
|
+
url: string;
|
|
446
|
+
/** 原始像素宽。宫格按它判定朝向,为 0 时宿主用兜底几何。 */
|
|
447
|
+
width: number;
|
|
448
|
+
/** 原始像素高。 */
|
|
449
|
+
height: number;
|
|
450
|
+
/**
|
|
451
|
+
* 视频时长,**毫秒**。
|
|
452
|
+
*
|
|
453
|
+
* 协议 `items[].duration` 本身就是毫秒,这里不做换算——注意这与单视频消息
|
|
454
|
+
* `ImVideoBody.duration`(秒)单位不同,所以刻意用 `durationMs` 命名区分。图片项没有此字段。
|
|
455
|
+
*/
|
|
456
|
+
durationMs?: number;
|
|
457
|
+
/** 远端缩略图地址;可能缺省,此时只能用 `thumbData`。 */
|
|
458
|
+
thumbUrl?: string;
|
|
459
|
+
/** 内嵌缩略图/封面 JPEG 字节。加密消息服务端出不了封面,宫格首屏只能靠它。 */
|
|
460
|
+
thumbData?: Uint8Array;
|
|
461
|
+
/** 原文件 MD5。 */
|
|
462
|
+
md5?: string;
|
|
463
|
+
/** 原文件大小(字节)。 */
|
|
464
|
+
size?: number;
|
|
465
|
+
/** 本项的文件解密 TEA key;`fileEncryptType` 为 0/2/3 时必有。 */
|
|
466
|
+
teaKey?: Uint8Array;
|
|
467
|
+
/** 文件加密类型:0=跟随消息 1=不加密 2=前 32 字节 TEA 3=完整 TEA。 */
|
|
468
|
+
fileEncryptType?: number;
|
|
469
|
+
/** 发送方勾选了「原图」。仅作展示角标,不影响下载与解密。 */
|
|
470
|
+
hd?: boolean;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* 媒体合集正文(`contentType === 'mediaAlbum'`,协议 28)。
|
|
474
|
+
*
|
|
475
|
+
* 一条消息同时承载一段可选配文和 1–9 个图片/视频项。产品上的「图文消息」就是
|
|
476
|
+
* `items.length === 1 && caption` 非空的情形,所以**分档判断一律看 `items.length`,不要看 contentType**。
|
|
477
|
+
*
|
|
478
|
+
* `items` 为空数组只会出现在入站解析残缺时(所有项的 `mediaType` 都不认识,或都无法解密);
|
|
479
|
+
* 这种正文不可出站——出站编码会显式拒绝,避免把坏消息转发出去。
|
|
480
|
+
*/
|
|
481
|
+
interface ImMediaAlbumBody {
|
|
482
|
+
/** 配文;缺省与空串等价,出站不写空串。 */
|
|
483
|
+
caption?: string;
|
|
484
|
+
/** 媒体项,顺序即用户选择顺序(决定宫格 index 与首项朝向)。 */
|
|
485
|
+
items: readonly ImMediaAlbumItem[];
|
|
486
|
+
}
|
|
422
487
|
interface ImMessageBody {
|
|
423
488
|
/** P0 文本内容(明文,解密后的结果)。 */
|
|
424
489
|
text?: string;
|
|
@@ -446,6 +511,8 @@ interface ImMessageBody {
|
|
|
446
511
|
call?: ImCallRecordBody;
|
|
447
512
|
/** contentType==='redPacket' 时的红包卡片。 */
|
|
448
513
|
redPacket?: ImRedPacketBody;
|
|
514
|
+
/** contentType==='mediaAlbum' 时的媒体合集正文(配文 + 1~9 个图片/视频项)。 */
|
|
515
|
+
mediaAlbum?: ImMediaAlbumBody;
|
|
449
516
|
/** contentType==='unknown' 时的稳定未知正文,不含原始 wire type。 */
|
|
450
517
|
unknown?: UnknownMessageBody;
|
|
451
518
|
}
|
|
@@ -480,7 +547,7 @@ type ImMessageFailureReason = 'timeout' | 'rejected' | 'encrypt_failed' | 'netwo
|
|
|
480
547
|
* 失败**展示语义**码(强类型枚举,非裸串):供 im-i18n 按 locale 渲染失败气泡文案。
|
|
481
548
|
* 由 `reason` / `SendMediaFailReason` / ACK errcode 穷尽映射而来,与 im-i18n failure catalog 键一一对应(media.* 带 mediaKind 参数)。
|
|
482
549
|
*/
|
|
483
|
-
type ImFailureDisplayCode = 'media.empty' | 'media.noCrypto' | 'media.previewFailed' | 'media.encryptFailed' | 'media.uploadFailed' | 'media.cancelled' | 'media.invalidDuration' | 'media.uploadInterrupted' | 'contactRequired' | 'messageRefused' | 'forbiddenOrLeft' | 'contentRejected' | 'groupDismissed' | 'groupUnavailable' | 'channelDismissed' | 'channelMuted' | 'channelNotMember' | 'channelAdminRequired' | 'conversationUnsupported' | 'sendCanceled' | 'sessionLoggedOut' | 'timeout' | 'network' | 'unknown';
|
|
550
|
+
type ImFailureDisplayCode = 'media.empty' | 'media.noCrypto' | 'media.previewFailed' | 'media.encryptFailed' | 'media.uploadFailed' | 'media.cancelled' | 'media.invalidDuration' | 'media.uploadInterrupted' | 'media.contentTooLarge' | 'contactRequired' | 'messageRefused' | 'forbiddenOrLeft' | 'contentRejected' | 'groupDismissed' | 'groupUnavailable' | 'channelDismissed' | 'channelMuted' | 'channelNotMember' | 'channelAdminRequired' | 'conversationUnsupported' | 'sendCanceled' | 'sessionLoggedOut' | 'timeout' | 'network' | 'unknown';
|
|
484
551
|
interface ImMessageFailure {
|
|
485
552
|
/** 归一后的错误码(来自 MESChatAck.errcode 或本地失败码,本地码用负值)。 */
|
|
486
553
|
code: number;
|
|
@@ -508,7 +575,12 @@ interface MediaTaskUpdate {
|
|
|
508
575
|
direction: 'upload' | 'download';
|
|
509
576
|
state: 'queued' | 'running' | 'completed' | 'failed' | 'canceled';
|
|
510
577
|
percent: number;
|
|
511
|
-
/**
|
|
578
|
+
/**
|
|
579
|
+
* upload 任务子阶段。
|
|
580
|
+
*
|
|
581
|
+
* `waiting-upload-slot` 与 `state: 'queued'` 同时出现,表示还没开始传字节(在生成缩略图或在等上传槽位),
|
|
582
|
+
* 此时 percent 恒为 0;`transferring` 正在传字节;`finalizing` 是等待远端 URL 最终确认。
|
|
583
|
+
*/
|
|
512
584
|
phase?: 'waiting-upload-slot' | 'transferring' | 'finalizing';
|
|
513
585
|
failure?: ImMessageFailure;
|
|
514
586
|
}
|
|
@@ -802,15 +874,25 @@ interface ForwardTarget {
|
|
|
802
874
|
conversationId: string;
|
|
803
875
|
conversationType: ForwardTargetConversationType;
|
|
804
876
|
}
|
|
805
|
-
/**
|
|
806
|
-
|
|
877
|
+
/**
|
|
878
|
+
* 转发只接收稳定消息身份;编排层必须回 DomainState 重取正文和最新撤回/编辑状态。
|
|
879
|
+
*
|
|
880
|
+
* `itemIndex` 只对媒体合集有意义:带上它表示「把 `body.mediaAlbum.items[itemIndex]` 这一项当成一条
|
|
881
|
+
* 独立的图片/视频消息转发出去」,出站 contentType 是该项自己的 kind(image 或 video),不是源消息的
|
|
882
|
+
* mediaAlbum。不传(默认)就是整条原样转发,行为与该字段出现之前逐字节一致。
|
|
883
|
+
*/
|
|
884
|
+
type ForwardMessageSource = Pick<ImMessage, 'id' | 'conversationId' | 'conversationType'> & {
|
|
885
|
+
itemIndex?: number;
|
|
886
|
+
};
|
|
807
887
|
/** forwardMessages 入参:有序源消息回复(选中序;单条 = length 1)+ 目标列表(1..9)。 */
|
|
808
888
|
interface ForwardMessagesInput {
|
|
809
889
|
messages: ForwardMessageSource[];
|
|
810
890
|
targets: ForwardTarget[];
|
|
811
891
|
}
|
|
812
892
|
/** 单条「源消息 × 目标会话」转发结果原因。 */
|
|
813
|
-
type ForwardFailReason = 'empty-input' | 'too-many-targets' | 'unsupported-target-type' | 'type-not-allowed' | 'media-not-ready'
|
|
893
|
+
type ForwardFailReason = 'empty-input' | 'too-many-targets' | 'unsupported-target-type' | 'type-not-allowed' | 'media-not-ready'
|
|
894
|
+
/** 按合集项转发时 `itemIndex` 越界,或该项在最新正文里已经不存在。 */
|
|
895
|
+
| 'album-item-not-found' | 'conversation-blocked' | 'send-failed';
|
|
814
896
|
/** 单条源消息向一个目标的结果;目标必须携带类型,避免同 id 的 direct/GROUP/CHANNEL 结果碰撞。 */
|
|
815
897
|
type ForwardItemStatus = {
|
|
816
898
|
ok: true;
|
|
@@ -1311,8 +1393,14 @@ interface ImExpressionEmojiRecent {
|
|
|
1311
1393
|
}
|
|
1312
1394
|
type ImExpressionRecentItem$1 = ImExpressionAsset$1 | ImExpressionEmojiRecent;
|
|
1313
1395
|
|
|
1314
|
-
/**
|
|
1315
|
-
|
|
1396
|
+
/**
|
|
1397
|
+
* 会话收藏可展示的内容类型;与 iOS `isSupportCollectionMsgType` 对齐。
|
|
1398
|
+
*
|
|
1399
|
+
* @remarks 这些值与收藏接口的 `content_type` 数值一一对应,而那个数值就是消息自己的 contentType
|
|
1400
|
+
* (1=文本 2=图片 3=视频 4=语音 5=位置 11=文件 **28=媒体合集**),不是另一套收藏专用枚举。
|
|
1401
|
+
* Android `MessageCollectExecute` 直接写 `message.getContentType()`,iOS 写 `msg.msgType`,两端一致。
|
|
1402
|
+
*/
|
|
1403
|
+
type ImSessionFavoriteKind = 'text' | 'image' | 'video' | 'voice' | 'location' | 'file' | 'mediaAlbum';
|
|
1316
1404
|
/** 服务端一条会话收藏快照;列表以 HTTP 为准,不回写原消息。 */
|
|
1317
1405
|
interface ImSessionFavoriteItem$1 {
|
|
1318
1406
|
readonly collectId: string;
|
|
@@ -1572,6 +1660,35 @@ type ImEvent = {
|
|
|
1572
1660
|
};
|
|
1573
1661
|
type ImEventListener = (event: ImEvent) => void;
|
|
1574
1662
|
|
|
1663
|
+
/** caption 长度上限,对齐 iOS 与旧 Web H5 的 1024。 */
|
|
1664
|
+
declare const MEDIA_ALBUM_CAPTION_MAX_LENGTH = 1024;
|
|
1665
|
+
/** 单条合集最多的项数,三端一致(Android CHOOSE_MAX_COUNT / iOS photoMaxNum / 旧 H5 MAX_COUNT)。 */
|
|
1666
|
+
declare const MEDIA_ALBUM_MAX_ITEMS = 9;
|
|
1667
|
+
/**
|
|
1668
|
+
* 预判一次媒体合集发送最终会建出哪种气泡。
|
|
1669
|
+
*
|
|
1670
|
+
* 发送编排按 R2/R3(与 Android、旧 Web H5 逐字一致)对「**恰好 1 项且没有配文**」**不发 28**,
|
|
1671
|
+
* 而是回落成普通图片 / 视频消息;纯空白配文等同于没有配文(对齐 Android `shouldUseMediaAlbum` 的 trim 判空)。
|
|
1672
|
+
* `hd` 不影响这个判定——回落路径上它本来就会丢掉,单图/单视频正文里没有这个字段。
|
|
1673
|
+
*
|
|
1674
|
+
* **为什么要对外暴露**:宿主判断「SDK 已受理」的时刻是乐观气泡落库,而不是发送 promise resolve
|
|
1675
|
+
* (后者要等所有项上传完并入 Outbox)。宿主要认出那条气泡就必须能预判它的 contentType,
|
|
1676
|
+
* 否则「只选 1 张图、不写配文」这一档永远等不到自己要找的 `mediaAlbum` 气泡。
|
|
1677
|
+
* **不要在宿主里重写这条规则**:它是协议侧的三端约定,写两份必然漂。
|
|
1678
|
+
*
|
|
1679
|
+
* 只覆盖**首次发送**。重发走的是已经成型的合集上下文,不会在中途改变消息类型。
|
|
1680
|
+
*
|
|
1681
|
+
* @param input.items 合集项;只读项数与首项的 `kind`。
|
|
1682
|
+
* @param input.caption 配文;`undefined` 与纯空白都算没有配文。
|
|
1683
|
+
* @returns 首次发送会建出的气泡 contentType。
|
|
1684
|
+
*/
|
|
1685
|
+
declare function resolveMediaAlbumSendContentType(input: {
|
|
1686
|
+
items: readonly {
|
|
1687
|
+
kind: 'image' | 'video';
|
|
1688
|
+
}[];
|
|
1689
|
+
caption?: string;
|
|
1690
|
+
}): 'mediaAlbum' | 'image' | 'video';
|
|
1691
|
+
|
|
1575
1692
|
/** 文本搜索命中的原文 UTF-16 区间;可直接用于 JavaScript `slice(start, end)`。 */
|
|
1576
1693
|
interface ImTextSearchRange {
|
|
1577
1694
|
start: number;
|
|
@@ -1843,6 +1960,10 @@ type ForwardCandidateMessage = ForwardContentCandidate & Pick<ImMessage, 'encryp
|
|
|
1843
1960
|
/**
|
|
1844
1961
|
* 多选转发时是否需要先提示用户“剔除后继续”。
|
|
1845
1962
|
* 覆盖语音、所有显式 unknown 与解密失败;原始 wire 类型不进入产品判定。
|
|
1963
|
+
*
|
|
1964
|
+
* 点名的都是**根本转不出去**的类型(语音、通话记录、unknown 都没有注册转发策略),提示的含义是
|
|
1965
|
+
* “这几条会被剔除”。已注册策略的类型一律不在此列——**媒体合集也不在**:它和图片/视频一样整条正文
|
|
1966
|
+
* 克隆、不重新上传,把它加进来会对一条能完整转发的消息发出假警告。
|
|
1846
1967
|
*/
|
|
1847
1968
|
declare function requiresForwardTypeConfirmation(message: ForwardCandidateMessage): boolean;
|
|
1848
1969
|
/**
|
|
@@ -1904,6 +2025,38 @@ interface ReactionParentMessage {
|
|
|
1904
2025
|
*/
|
|
1905
2026
|
declare function canReactToMessage(message: ReactionParentMessage): boolean;
|
|
1906
2027
|
|
|
2028
|
+
/** 浏览器 PushSubscription.toJSON() 的可移植数据;不依赖 DOM 或浏览器全局。 */
|
|
2029
|
+
interface ImWebPushSubscription {
|
|
2030
|
+
endpoint?: string;
|
|
2031
|
+
expirationTime?: number | null;
|
|
2032
|
+
keys?: Record<string, string>;
|
|
2033
|
+
}
|
|
2034
|
+
/** 状态不包含 endpoint、加密密钥或登录凭据,可安全用于设置页。 */
|
|
2035
|
+
interface ImPushSnapshot {
|
|
2036
|
+
status: 'idle' | 'pending' | 'syncing' | 'synced' | 'unconfirmed' | 'error' | 'disposed';
|
|
2037
|
+
error?: 'timeout' | 'invalid-ack' | 'server-rejected' | 'send-failed';
|
|
2038
|
+
/** unconfirmed 表示已收到旧后端默认错误码 ACK,不能据此证明绑定成功或失败。 */
|
|
2039
|
+
serverCode?: number;
|
|
2040
|
+
/** 超时等失败后等下一条连接恢复;不主动反复重报或制造重连。 */
|
|
2041
|
+
requiresReconnect?: boolean;
|
|
2042
|
+
}
|
|
2043
|
+
/**
|
|
2044
|
+
* 当前账号的推送绑定。浏览器授权、订阅和取消订阅由宿主拥有。
|
|
2045
|
+
* setWebSubscription 只提交同步意图;只有 snapshot.status === 'synced' 表示收到服务端成功 ACK。
|
|
2046
|
+
*/
|
|
2047
|
+
interface ImPushApi {
|
|
2048
|
+
/** 必须携带创建订阅时的账号,防止异步结果被交给另一个账号。离线时保留最新意图。 */
|
|
2049
|
+
setWebSubscription: (input: {
|
|
2050
|
+
userId: string;
|
|
2051
|
+
subscription: ImWebPushSubscription;
|
|
2052
|
+
}) => void;
|
|
2053
|
+
/** 停止本地同步并释放订阅数据;不宣称服务端解绑,宿主仍须调用 PushSubscription.unsubscribe()。 */
|
|
2054
|
+
clear: () => void;
|
|
2055
|
+
snapshot: () => ImPushSnapshot;
|
|
2056
|
+
/** 立即提供快照,返回退订函数;监听器的异常经宿主错误端口报告。 */
|
|
2057
|
+
subscribe: (listener: (snapshot: ImPushSnapshot) => void) => () => void;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
1907
2060
|
/**
|
|
1908
2061
|
* 在宿主显式授权时迁移旧 `cache.prefix` 下的当前账号本地数据。
|
|
1909
2062
|
* 迁移使用新旧 namespace factory 精确定位,不扫描未知库,也不自动删除源数据;失败必须由调用方处理。
|
|
@@ -2051,11 +2204,27 @@ interface MediaTransferAdapterConfig {
|
|
|
2051
2204
|
* 部署可置 false 立即退回全量单次 PutObject(大文件回到单连接与整包内存的旧行为),无需发版。
|
|
2052
2205
|
*/
|
|
2053
2206
|
multipartUpload?: boolean;
|
|
2207
|
+
/**
|
|
2208
|
+
* 大于 16MiB 的明文/simple 文件是否尝试 Range 并发下载(默认 true)。
|
|
2209
|
+
* 需要下载域名支持 Range,并暴露 Content-Range 与强 ETag;返回 200 时消费完整响应并记录诊断。
|
|
2210
|
+
* 置 false 使用单次 GET。此开关不改变上传或整文件 TEA 的行为。
|
|
2211
|
+
*/
|
|
2212
|
+
rangeDownload?: boolean;
|
|
2054
2213
|
/**
|
|
2055
2214
|
* 媒体发送阶段的并发上限;由 im-core 消费,adapter 本身仍只负责单个上传任务。
|
|
2056
|
-
*
|
|
2215
|
+
*
|
|
2216
|
+
* 并发按媒体体积分两档:图片与不超过分片阈值(16 MiB)的小文件走单次 PutObject、不占分片缓冲,
|
|
2217
|
+
* 缺省 5;视频与超过阈值(或字节数未知)的文件走分片,每路各带分片缓冲,缺省 3。
|
|
2218
|
+
* 两档都只接受 1-6 的整数,超出范围由 core 显式报错。
|
|
2219
|
+
* - 传一个数字:所有媒体共用这一个并发数,与分档前的语义一致。
|
|
2220
|
+
* - 传 `{ total, largeFiles }`:显式分档,`largeFiles` 不得超过 `total`。
|
|
2057
2221
|
*/
|
|
2058
|
-
maxConcurrentUploads?: number
|
|
2222
|
+
maxConcurrentUploads?: number | {
|
|
2223
|
+
/** 在途上传总数上限(两档合计);缺省 5。 */
|
|
2224
|
+
total?: number;
|
|
2225
|
+
/** 其中大文件档的上限(视频、超过分片阈值或字节数未知的内容);缺省 min(3, total)。 */
|
|
2226
|
+
largeFiles?: number;
|
|
2227
|
+
};
|
|
2059
2228
|
}
|
|
2060
2229
|
|
|
2061
2230
|
/**
|
|
@@ -2068,8 +2237,11 @@ interface MediaTransferAdapterConfig {
|
|
|
2068
2237
|
* - `multipart-etag-missing`:分片响应读不到 ETag,**桶 CORS 缺 `ExposeHeaders: ETag`**,不是网络问题。
|
|
2069
2238
|
* - `multipart-abort-failed`:分片失败后的 `AbortMultipartUpload` 清理本身失败,已上传分片可能残留并计费。
|
|
2070
2239
|
* - `multipart-upload-failed`:分片上传因其它原因失败;`cause` 保留原始错误,消息列出分片对 CORS 的额外要求。
|
|
2240
|
+
* - `download-range-invalid`:分段状态、范围、长度或可读响应头不符合合同。
|
|
2241
|
+
* - `download-object-changed`:分段之间的强 ETag 或总长度改变,拒绝混合不同文件版本。
|
|
2242
|
+
* - `download-range-failed`:下载返回非成功 HTTP 状态。
|
|
2071
2243
|
*/
|
|
2072
|
-
type MediaTransferErrorCode = 'bucket-unconfigured' | 'credentials-provider-missing' | 'credentials-request-failed' | 'credentials-invalid' | 'upload-source-invalid' | 'multipart-etag-missing' | 'multipart-abort-failed' | 'multipart-upload-failed';
|
|
2244
|
+
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';
|
|
2073
2245
|
/** 媒体传输统一错误:携带稳定业务码 + 可选底层 cause(诊断用,永不携带凭证明文)。 */
|
|
2074
2246
|
declare class MediaTransferError extends Error {
|
|
2075
2247
|
readonly code: MediaTransferErrorCode;
|
|
@@ -2346,12 +2518,16 @@ interface ImMessageReactions {
|
|
|
2346
2518
|
aggregates: readonly ImMessageReactionAggregate[];
|
|
2347
2519
|
}
|
|
2348
2520
|
/** 可渲染媒体正文;密钥和底层文件加密策略只允许留在 SDK/Core。 */
|
|
2349
|
-
interface ImMessageViewBody extends Omit<ImMessageBody, 'image' | 'video' | 'voice' | 'file' | 'sticker'> {
|
|
2521
|
+
interface ImMessageViewBody extends Omit<ImMessageBody, 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'mediaAlbum'> {
|
|
2350
2522
|
image?: Readonly<Omit<NonNullable<ImMessageBody['image']>, 'teaKey' | 'fileEncryptType'>>;
|
|
2351
2523
|
video?: Readonly<Omit<NonNullable<ImMessageBody['video']>, 'teaKey' | 'fileEncryptType'>>;
|
|
2352
2524
|
voice?: Readonly<Omit<NonNullable<ImMessageBody['voice']>, 'teaKey' | 'fileEncryptType'>>;
|
|
2353
2525
|
file?: Readonly<Omit<NonNullable<ImMessageBody['file']>, 'teaKey' | 'fileEncryptType'>>;
|
|
2354
2526
|
sticker?: Readonly<NonNullable<ImMessageBody['sticker']>>;
|
|
2527
|
+
/** 合集的每一项都带自己的密钥材料,逐项剥离后才交给产品层;按项下载走 SDK handle,不需要这些字段。 */
|
|
2528
|
+
mediaAlbum?: Readonly<Omit<NonNullable<ImMessageBody['mediaAlbum']>, 'items'> & {
|
|
2529
|
+
items: readonly Readonly<Omit<ImMediaAlbumItem, 'teaKey' | 'fileEncryptType'>>[];
|
|
2530
|
+
}>;
|
|
2355
2531
|
}
|
|
2356
2532
|
/**
|
|
2357
2533
|
* 官方 Chat Kit 与宿主消息线程使用的完整稳定消息 DTO。
|
|
@@ -2427,6 +2603,44 @@ interface MiniProgramMessageOptions {
|
|
|
2427
2603
|
interface TransferMessageOptions {
|
|
2428
2604
|
replyToMessageId?: string;
|
|
2429
2605
|
}
|
|
2606
|
+
/**
|
|
2607
|
+
* 媒体合集里的一项:一张图片或一个视频。
|
|
2608
|
+
*
|
|
2609
|
+
* @remarks `kind` 由**调用方**按 MIME 分类,SDK 不嗅探文件内容——宿主的文件选择器本来就要按类型分流
|
|
2610
|
+
* (GIF 得走 `sendGif`),再让 SDK 猜一次只会多一处口径不一致。
|
|
2611
|
+
*/
|
|
2612
|
+
interface MediaAlbumItemInput {
|
|
2613
|
+
/** 这一项是图片还是视频。 */
|
|
2614
|
+
kind: 'image' | 'video';
|
|
2615
|
+
/** 原文件;`File` 可直接传,`Blob` 需调用方保证 `type` 可判定。 */
|
|
2616
|
+
file: File | Blob;
|
|
2617
|
+
/** 宿主创建的本地 object URL,仅供上传中的宫格显示这一格;URL 释放由宿主生命周期负责。 */
|
|
2618
|
+
localPreviewUrl?: string;
|
|
2619
|
+
/**
|
|
2620
|
+
* 这一项的本地宽高(视频再带时长与首帧)。
|
|
2621
|
+
*
|
|
2622
|
+
* 不传时 SDK 会自己读一次(与单图/单视频同一条预览路径)。宫格的格子几何按原始宽高算,
|
|
2623
|
+
* 缺了它整条消息的格子比例会在上传完成时跳变。
|
|
2624
|
+
*/
|
|
2625
|
+
localPreviewMetadata?: ImagePreviewMetadata | VideoPreviewMetadata;
|
|
2626
|
+
}
|
|
2627
|
+
/**
|
|
2628
|
+
* 媒体合集发送选项。
|
|
2629
|
+
*
|
|
2630
|
+
* @remarks 恰好 1 项且没有配文时,SDK 内部会回落成普通图片/视频消息(与 Android / iOS / 旧 H5 一致),
|
|
2631
|
+
* 此时返回的仍是同样的 `SendMessageResult`,调用方不需要区分。
|
|
2632
|
+
*/
|
|
2633
|
+
interface MediaAlbumMessageOptions {
|
|
2634
|
+
/** 配文,最长 1024 字符;纯空白等同于没有配文。超长由 SDK 明确拒绝,**不静默截断**。 */
|
|
2635
|
+
caption?: string;
|
|
2636
|
+
replyToMessageId?: string;
|
|
2637
|
+
/**
|
|
2638
|
+
* 发送方勾选了「原图」,写进每一项的 `hd` 标记。
|
|
2639
|
+
*
|
|
2640
|
+
* 本期不做任何图片/视频压缩,勾与不勾都发原文件,这个字段只让接收端显示「原图」角标。
|
|
2641
|
+
*/
|
|
2642
|
+
hd?: boolean;
|
|
2643
|
+
}
|
|
2430
2644
|
/**
|
|
2431
2645
|
* 本地视频的固有尺寸、时长与首帧封面。
|
|
2432
2646
|
*
|
|
@@ -3521,6 +3735,18 @@ type ConversationLastMessageSummary = {
|
|
|
3521
3735
|
} | {
|
|
3522
3736
|
kind: 'voice';
|
|
3523
3737
|
durationMs?: number;
|
|
3738
|
+
}
|
|
3739
|
+
/**
|
|
3740
|
+
* 媒体合集(一条消息内 1~9 个图片/视频 + 可选配文)。
|
|
3741
|
+
*
|
|
3742
|
+
* 只给计数与配文,数量文案由宿主经 im-i18n 按 locale 组装;有配文时优先显示配文。
|
|
3743
|
+
* 两个计数都为 0 表示入站正文残缺(所有项都无法解析),宿主应按未知正文处理。
|
|
3744
|
+
*/
|
|
3745
|
+
| {
|
|
3746
|
+
kind: 'mediaAlbum';
|
|
3747
|
+
imageCount: number;
|
|
3748
|
+
videoCount: number;
|
|
3749
|
+
caption?: string;
|
|
3524
3750
|
} | {
|
|
3525
3751
|
kind: 'encrypted';
|
|
3526
3752
|
} | {
|
|
@@ -3973,6 +4199,16 @@ interface ConversationMessageApi {
|
|
|
3973
4199
|
sendFile: (file: File | Blob, options?: FileMessageOptions) => Promise<SendMessageResult>;
|
|
3974
4200
|
/** 发送 GIF 贴图;原文件明文上传 sticker bucket,消息固定 EXPRESSION/LINK/GIF。 */
|
|
3975
4201
|
sendGif: (file: File | Blob, options?: GifMessageOptions) => Promise<SendMessageResult>;
|
|
4202
|
+
/**
|
|
4203
|
+
* 发送媒体合集:1~9 个图片/视频合成**一条**消息,可带一段配文。
|
|
4204
|
+
*
|
|
4205
|
+
* @remarks 全部项上传成功才发出;任一项失败整条失败,不发半条消息。恰好 1 项且没有配文时
|
|
4206
|
+
* SDK 内部回落成普通图片/视频消息(三端一致)。**校验是整条的**——某一项超限会拒绝整条,
|
|
4207
|
+
* 因为协议上它就是一条消息,没有「发一半」这种状态。
|
|
4208
|
+
*
|
|
4209
|
+
* GIF 不能进合集(三端一致),调用方要先按 MIME 把它拆出去走 `sendGif`。
|
|
4210
|
+
*/
|
|
4211
|
+
sendMediaAlbum: (items: readonly MediaAlbumItemInput[], options?: MediaAlbumMessageOptions) => Promise<SendMessageResult>;
|
|
3976
4212
|
/** 发送已经托管在远端的静态贴图;资源和贴图包身份均为必填合同。 */
|
|
3977
4213
|
sendSticker: (asset: ImStickerAssetInput, options?: ExpressionMessageOptions) => Promise<SendMessageResult>;
|
|
3978
4214
|
/** 发送已经托管在远端的 GIF;Giphy 没有 package identity,输入不得提供 packageId。 */
|
|
@@ -4053,6 +4289,43 @@ interface ConversationMessageApi {
|
|
|
4053
4289
|
* ```
|
|
4054
4290
|
*/
|
|
4055
4291
|
forward: (messageIds: readonly string[], targets: readonly ConversationRef<ProductHandleConversationType>[]) => Promise<ForwardMessagesResult>;
|
|
4292
|
+
/**
|
|
4293
|
+
* 把媒体合集里的第 `itemIndex` 项,当成**一条独立的图片或视频消息**转发到多个目标会话。
|
|
4294
|
+
*
|
|
4295
|
+
* 用途:全屏预览里点转发时,用户要转的是当前正在看的这一格,而不是整条合集。
|
|
4296
|
+
*
|
|
4297
|
+
* @remarks
|
|
4298
|
+
* 与 `forward` 的区别是产出的消息类型变了(合集 → 图片/视频),所以是独立方法而不是给 `forward`
|
|
4299
|
+
* 放宽入参。与 `forward` 相同的是:复用该项已有的远端地址与解密 key,**不重新上传**;目标会话仍由
|
|
4300
|
+
* direct/GROUP/CHANNEL 各自的 SendStrategy 组帧入 Outbox。
|
|
4301
|
+
*
|
|
4302
|
+
* 视频项在合集里的时长是毫秒,转成单视频消息时 SDK 会换算成协议要求的秒,调用方不需要处理。
|
|
4303
|
+
* 合集项上的「原图」角标与远端缩略图地址不会带到单媒体消息上——单图/单视频正文没有这两个字段。
|
|
4304
|
+
*
|
|
4305
|
+
* 三种情况进 `failed`:源消息不是媒体合集(`IM_SDK_FORWARD_CONTENT_UNSUPPORTED`)、
|
|
4306
|
+
* `itemIndex` 越界或该项已不存在(`IM_SDK_MEDIA_ALBUM_ITEM_INVALID`)、该项还没有可复用的远端地址
|
|
4307
|
+
* (还在上传或入站残缺,`IM_SDK_FORWARD_MEDIA_NOT_READY`,可重试)。
|
|
4308
|
+
*
|
|
4309
|
+
* **还有一类结果三个数组会全空**:源消息已撤回、已被双删、解密失败、在本地已经查不到,
|
|
4310
|
+
* 或它的类型本身就不可转发时,这条消息在预检阶段就被剔除,只出现在 `skippedSourceMessageIds` 里。
|
|
4311
|
+
* 这与 `forward` 的批量语义一致(批量转发本来就要把不可转的源剔掉再发其余的),
|
|
4312
|
+
* 但单条调用时它意味着**什么都没发出去**。所以调用方判成功要看 `sent`,
|
|
4313
|
+
* 不要只判 `failed.length > 0`——那样在「预览期间原消息被撤回」这种竞态下会既不发送也不提示。
|
|
4314
|
+
*
|
|
4315
|
+
* @param messageId 当前 handle 中的合集消息 id。
|
|
4316
|
+
* @param itemIndex 宫格里的项下标,从 0 起;必须是非负整数。
|
|
4317
|
+
* @param targets 目标会话,最多 9 个。
|
|
4318
|
+
* @example
|
|
4319
|
+
* ```ts
|
|
4320
|
+
* const result = await handle.messages.forwardMediaAlbumItem('message-42', 2, [
|
|
4321
|
+
* { conversationType: 'direct', conversationId: '1001' },
|
|
4322
|
+
* ])
|
|
4323
|
+
* // 一条都没发出去就要提示:失败原因在 failed 里,源消息被剔除时 failed 也是空的。
|
|
4324
|
+
* if (result.sent.length === 0)
|
|
4325
|
+
* showError(result.failed[0]?.error.code ?? 'IM_SDK_FORWARD_CONTENT_UNSUPPORTED')
|
|
4326
|
+
* ```
|
|
4327
|
+
*/
|
|
4328
|
+
forwardMediaAlbumItem: (messageId: string, itemIndex: number, targets: readonly ConversationRef<ProductHandleConversationType>[]) => Promise<ForwardMessagesResult>;
|
|
4056
4329
|
/**
|
|
4057
4330
|
* 按 id 向服务端取回本地没有的消息,并回填进本地历史。
|
|
4058
4331
|
*
|
|
@@ -4271,6 +4544,14 @@ interface ImMessageRef {
|
|
|
4271
4544
|
conversation: ConversationRef<ProductHandleConversationType>;
|
|
4272
4545
|
/** 当前会话内的稳定消息 id。 */
|
|
4273
4546
|
messageId: string;
|
|
4547
|
+
/**
|
|
4548
|
+
* 媒体合集里的第几项(从 0 起)。
|
|
4549
|
+
*
|
|
4550
|
+
* **只有合集消息需要它,也只有合集消息接受它**:一条合集是一条消息、多个文件,光靠 messageId
|
|
4551
|
+
* 指不到具体某一项。给单媒体消息传这个字段会被显式拒绝,而不是忽略——忽略的话调用方以为自己
|
|
4552
|
+
* 在下载第 3 项,实际拿到的是整条消息的唯一媒体。
|
|
4553
|
+
*/
|
|
4554
|
+
itemIndex?: number;
|
|
4274
4555
|
}
|
|
4275
4556
|
/**
|
|
4276
4557
|
* 可观察媒体上传/下载任务的只读产品投影。
|
|
@@ -4285,13 +4566,27 @@ interface ImMediaTask {
|
|
|
4285
4566
|
messageId: string;
|
|
4286
4567
|
/** 关联消息的精确会话 sibling。 */
|
|
4287
4568
|
ref: ConversationRef<ProductHandleConversationType>;
|
|
4569
|
+
/**
|
|
4570
|
+
* 媒体合集的项下标;单媒体消息与全部上传任务为 undefined。
|
|
4571
|
+
*
|
|
4572
|
+
* 一条合集的多项共用同一个 messageId,各自是独立的下载任务。调用方按 messageId 找任务时
|
|
4573
|
+
* 必须连这个字段一起比,否则并发下载两项时会把另一项的进度读成自己的。
|
|
4574
|
+
* 上传任务不带下标:一条合集整体只有一条上传进度(所有项都传完才算这条消息发出去)。
|
|
4575
|
+
*/
|
|
4576
|
+
itemIndex?: number;
|
|
4288
4577
|
/** upload 来自发送链路,download 来自本产品 API。 */
|
|
4289
4578
|
direction: 'upload' | 'download';
|
|
4290
4579
|
/** 终态 completed/failed/canceled 不会被同一尝试的迟到 progress 回退。 */
|
|
4291
4580
|
state: 'queued' | 'running' | 'completed' | 'failed' | 'canceled';
|
|
4292
4581
|
/** 0-100 的归一化整数。 */
|
|
4293
4582
|
percent: number;
|
|
4294
|
-
/**
|
|
4583
|
+
/**
|
|
4584
|
+
* upload 子阶段。
|
|
4585
|
+
*
|
|
4586
|
+
* `waiting-upload-slot` 与 `state: 'queued'` 同时出现,表示这条媒体还没开始传字节(在生成缩略图或在
|
|
4587
|
+
* 等上传槽位),此时 `percent` 恒为 0——宿主应显示「等待中」而不是把 0 当成停住的进度。
|
|
4588
|
+
* `transferring` 是正在传字节,`finalizing` 是字节已传完、在等对象存储确认。
|
|
4589
|
+
*/
|
|
4295
4590
|
phase?: 'waiting-upload-slot' | 'transferring' | 'finalizing';
|
|
4296
4591
|
/** 可供产品按 code/category 决策的稳定错误;不含底层 URL、密钥或响应正文。 */
|
|
4297
4592
|
error?: ImSdkErrorShape;
|
|
@@ -4813,7 +5108,13 @@ interface ImSessionFavoritesApi {
|
|
|
4813
5108
|
}) => Promise<ImSessionFavoriteItem>;
|
|
4814
5109
|
delete: (collectIds: readonly string[]) => Promise<void>;
|
|
4815
5110
|
}
|
|
4816
|
-
/**
|
|
5111
|
+
/**
|
|
5112
|
+
* 对齐 iOS Cell:文本 / 图 / 视频 / 语音 / 文件 / 媒体合集可收藏;表情、名片、通话等不可。
|
|
5113
|
+
*
|
|
5114
|
+
* 两端的收藏类型判定都是**黑名单**(iOS `isSupportCollectionMsgType` 排除名片/通话/表情/游戏/未知;
|
|
5115
|
+
* Android `isCanCollectByType` 排除通话/表情/名片/未知/解密失败),媒体合集不在黑名单里,
|
|
5116
|
+
* 收藏接口的 `content_type` 直接用消息自己的 28。
|
|
5117
|
+
*/
|
|
4817
5118
|
declare function resolveSessionFavoriteKindFromMessage(message: ImMessageView): ImSessionFavoriteKind | null;
|
|
4818
5119
|
/**
|
|
4819
5120
|
* 组收藏快照明文。content 空则返回 null,对齐 iOS `collectMsg:YES` 不写空 body。
|
|
@@ -5259,6 +5560,8 @@ interface AdvancedConversationsApi extends ImConversationsApi, ImConversationBac
|
|
|
5259
5560
|
* ```
|
|
5260
5561
|
*/
|
|
5261
5562
|
interface ImProductClient {
|
|
5563
|
+
/** 当前设备推送订阅的服务端绑定与同步状态。 */
|
|
5564
|
+
readonly push: ImPushApi;
|
|
5262
5565
|
readonly session: ImSessionApi;
|
|
5263
5566
|
readonly capabilities: ImConversationCapabilitiesApi;
|
|
5264
5567
|
readonly conversations: ImConversationListApi;
|
|
@@ -5419,5 +5722,5 @@ interface ImDiagnosticMemoryBuffer extends ImDiagnosticSink {
|
|
|
5419
5722
|
*/
|
|
5420
5723
|
declare function createImDiagnosticMemoryBuffer(options?: ImDiagnosticMemoryBufferOptions): ImDiagnosticMemoryBuffer;
|
|
5421
5724
|
|
|
5422
|
-
export { EDIT_WINDOW_MS, IM_CHAT_FONT_SCALES, IM_DIAGNOSTIC_CATEGORIES, IM_EMOJI_CATALOG, ImPinnedMessageOperationError, MediaTransferError, REACTION_SUPPORTED_CONTENT_TYPES, buildSessionFavoritePlainBody, canReactToMessage, canTransmit, canTransmitByType, canTransmitContent, classifyStickerImageType, createFaceToFaceGroupQrPayload, createImClient, createImConsoleDiagnosticSink, createImDiagnosticMemoryBuffer, createImTextSearchMatcher, createSdkDiagnosticWriter, createVoicePlayer, createVoiceRecordingSession, detectVoiceCapabilities, extractSearchText, getImTextSearchInitial, mediaTransferErrorCodeOf, migrateImCachePrefix, normalizeMediaUploadCredentials, requiresForwardTypeConfirmation, resolveChannelAccess, resolveImEmojiToken, resolveSessionFavoriteKindFromMessage, resolveTextSegments, sortSessions, sumSessionsUnread, voiceErrorCodeOf };
|
|
5423
|
-
export type { CapabilityAvailability, CapabilityDecision, CapabilityReason, ChannelAccessSnapshot, ChannelBaseSessionState, ChannelConversationCapabilities, ChannelConversationMessageApi, ChannelJoinApplication, ChannelJoinApplicationNotification, ChannelJoinApplicationPage, ChannelMember, ChannelMemberPage, ChannelMentionMember, ChannelMentionMemberPage, ChannelMiniProgramRel, ChannelMiniProgramRelConfigType, ChannelMuteReason, ChannelPermissionSet, ChannelProfile, ChannelRole, ChannelSessionState, ContactCardInput, ContactMessageOptions, ConversationBackgroundPreset, ConversationBackgroundSelection, ConversationCapabilitySnapshot, ConversationDraft, ConversationDraftApi, ConversationEntryUnreadSnapshot, ConversationHandle, ConversationHandleSnapshot, ConversationInitialPosition, ConversationLastMessageSummary, ConversationListItem, ConversationListMention, ConversationMessageApi, ConversationOpenOptions, ConversationRef, ConversationSearchPage, ConversationSearchResult, ConversationSystemSummary, ConversationType, DirectConversationCapabilities, DirectConversationMessageApi, DraftInput, EditTextOptions, ExpressionMessageOptions, FileMessageOptions, ForwardFailReason, ForwardItemStatus, ForwardMessageFailure, ForwardMessagesInput, ForwardMessagesResult, ForwardTarget, ForwardedMessageRef, GameMessageOptions, GifMessageOptions, GroupConversationCapabilities, GroupConversationMessageApi, GroupMemberItem, GroupProfile, ImAppearanceSettingsApi, ImApplicationItem, ImApplicationRef, ImApplicationsApi, ImAuthIssue, ImAuthProvider, ImCacheOptions, ImCachePrefixMigrationContext, ImCachePrefixMigrator, ImCallKind, ImCallOutcome, ImCallRecordBody, ImChannelConversationAccessSnapshot, ImChannelMentionApi, ImChannelMiniProgramRel, ImChannelPermissions, ImChannelPinnedMessage, ImChannelProfile, 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, ImFileBody, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, ImGiphyAsset, ImGiphyPage, ImGiphyPageOptions, ImGroupCallAnswerInput, ImGroupCallBusyInput, ImGroupCallCreateInput, ImGroupCallJoinInput, ImGroupCallMeetingSnapshot, ImGroupCallMember, ImGroupCallMemberStatus, ImGroupCallStatusInput, ImGroupCallTargetInput, ImGroupCallsApi, ImGroupConversationState, ImGroupMentionApi, ImGroupPinnedMessage, ImGroupProfile, ImGroupsApi, ImImageBody, ImLifecycleSnapshot, ImLocalDataApi, ImLocalDataInfo, ImLogoutOptions, ImMediaConfig, ImMediaTask, ImMediaTasksApi, ImMembershipJoinResult, ImMessageMention, ImMessageReactionAggregate, ImMessageReactions, ImMessageRef, ImMessageSearchApi, ImMessageView, ImMessageViewBody, ImMessagesByIdResult, ImMiniProgramBody, ImMiniProgramShowType, ImOutboxApi, ImOutboxItem, ImPageToken, ImPinnedMessageErrorKind, ImPinnedMessageOperation, ImProductApplicationUpdate, ImProductAuthInvalidReason, ImProductClient, ImProductEvent, ImProductEventError, ImProductEventMap, ImProductMessage, ImReactionChangeAction, ImReactionChangeResult, ImReadReceiptSettingsApi, ImRedPacketBody, ImRedPacketType, ImSdkErrorCategory, ImSdkErrorShape, ImSearchApi, ImSessionApi, ImSessionFavoriteItem, ImSessionFavoriteKind, ImSessionFavoritesApi, ImSessionLifecycleState, ImSettingsApi, ImStickerAssetInput, ImStickerBody, ImStickerPack, ImSupportedConversationRef, ImTextSearchMatch, ImTextSearchMatchOptions, ImTextSearchMatcher, ImTextSearchRange, ImTransferBody, ImTransferSessionType, ImTransferStatus, ImVideoBody, ImVoiceBody, ImageMessageOptions, ImagePreviewMetadata, LocalConversationHistoryClearResult, LocalMessageDeletionResult, MediaTransferErrorCode, MediaUploadCredentials, MediaUploadCredentialsProvider, MediaUploadCredentialsRequest, MentionCandidate, MentionCandidatePage, MentionInput, MessageContentType, MessageWindowInfo, MessageWindowPage, MessagesByIdFailure, MigrateImCachePrefixInput, MiniProgramMessageOptions, ProductConversationListType, ProductHandleConversationType, ProductMessageSearchPage, ProductMessageSearchResult, ResolveTextOptions, ResolvedConversationBackground, SegmentMatch, SegmentMatcher, SendMessageResult, StickerAssetKind, TextMessageOptions, TextSegment, TransferMessageOptions, UnknownMessageBody, UserProfile, VideoMessageOptions, VideoPreviewMetadata, VoiceCapabilities, VoiceErrorCode, VoiceMessageMetadata, VoicePlayer, VoicePlayerOptions, VoicePlayerState, VoiceRecordingResult, VoiceRecordingSession, VoiceRecordingSessionOptions, VoiceRecordingState, VoiceToggleOptions };
|
|
5725
|
+
export { EDIT_WINDOW_MS, IM_CHAT_FONT_SCALES, IM_DIAGNOSTIC_CATEGORIES, IM_EMOJI_CATALOG, ImPinnedMessageOperationError, MEDIA_ALBUM_CAPTION_MAX_LENGTH, MEDIA_ALBUM_MAX_ITEMS, MediaTransferError, REACTION_SUPPORTED_CONTENT_TYPES, buildSessionFavoritePlainBody, canReactToMessage, canTransmit, canTransmitByType, canTransmitContent, classifyStickerImageType, createFaceToFaceGroupQrPayload, createImClient, createImConsoleDiagnosticSink, createImDiagnosticMemoryBuffer, createImTextSearchMatcher, createSdkDiagnosticWriter, createVoicePlayer, createVoiceRecordingSession, detectVoiceCapabilities, extractSearchText, getImTextSearchInitial, mediaTransferErrorCodeOf, migrateImCachePrefix, normalizeMediaUploadCredentials, requiresForwardTypeConfirmation, resolveChannelAccess, resolveImEmojiToken, resolveMediaAlbumSendContentType, resolveSessionFavoriteKindFromMessage, resolveTextSegments, sortSessions, sumSessionsUnread, voiceErrorCodeOf };
|
|
5726
|
+
export type { CapabilityAvailability, CapabilityDecision, CapabilityReason, ChannelAccessSnapshot, ChannelBaseSessionState, ChannelConversationCapabilities, ChannelConversationMessageApi, ChannelJoinApplication, ChannelJoinApplicationNotification, ChannelJoinApplicationPage, ChannelMember, ChannelMemberPage, ChannelMentionMember, ChannelMentionMemberPage, ChannelMiniProgramRel, ChannelMiniProgramRelConfigType, ChannelMuteReason, ChannelPermissionSet, ChannelProfile, ChannelRole, ChannelSessionState, ContactCardInput, ContactMessageOptions, ConversationBackgroundPreset, ConversationBackgroundSelection, ConversationCapabilitySnapshot, ConversationDraft, ConversationDraftApi, ConversationEntryUnreadSnapshot, ConversationHandle, ConversationHandleSnapshot, ConversationInitialPosition, ConversationLastMessageSummary, ConversationListItem, ConversationListMention, ConversationMessageApi, ConversationOpenOptions, ConversationRef, ConversationSearchPage, ConversationSearchResult, ConversationSystemSummary, ConversationType, DirectConversationCapabilities, DirectConversationMessageApi, DraftInput, EditTextOptions, ExpressionMessageOptions, FileMessageOptions, ForwardFailReason, ForwardItemStatus, ForwardMessageFailure, ForwardMessagesInput, ForwardMessagesResult, ForwardTarget, ForwardedMessageRef, GameMessageOptions, GifMessageOptions, GroupConversationCapabilities, GroupConversationMessageApi, GroupMemberItem, GroupProfile, ImAppearanceSettingsApi, ImApplicationItem, ImApplicationRef, ImApplicationsApi, ImAuthIssue, ImAuthProvider, ImCacheOptions, ImCachePrefixMigrationContext, ImCachePrefixMigrator, ImCallKind, ImCallOutcome, ImCallRecordBody, ImChannelConversationAccessSnapshot, ImChannelMentionApi, ImChannelMiniProgramRel, ImChannelPermissions, ImChannelPinnedMessage, ImChannelProfile, 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, ImFileBody, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, ImGiphyAsset, ImGiphyPage, ImGiphyPageOptions, ImGroupCallAnswerInput, ImGroupCallBusyInput, ImGroupCallCreateInput, ImGroupCallJoinInput, ImGroupCallMeetingSnapshot, ImGroupCallMember, ImGroupCallMemberStatus, ImGroupCallStatusInput, ImGroupCallTargetInput, ImGroupCallsApi, ImGroupConversationState, ImGroupMentionApi, ImGroupPinnedMessage, ImGroupProfile, ImGroupsApi, ImImageBody, ImLifecycleSnapshot, ImLocalDataApi, ImLocalDataInfo, ImLogoutOptions, ImMediaAlbumBody, ImMediaAlbumItem, ImMediaConfig, ImMediaTask, ImMediaTasksApi, ImMembershipJoinResult, ImMessageMention, ImMessageReactionAggregate, ImMessageReactions, ImMessageRef, ImMessageSearchApi, ImMessageView, ImMessageViewBody, ImMessagesByIdResult, ImMiniProgramBody, ImMiniProgramShowType, ImOutboxApi, ImOutboxItem, ImPageToken, ImPinnedMessageErrorKind, ImPinnedMessageOperation, ImProductApplicationUpdate, ImProductAuthInvalidReason, ImProductClient, ImProductEvent, ImProductEventError, ImProductEventMap, ImProductMessage, ImPushApi, ImPushSnapshot, ImReactionChangeAction, ImReactionChangeResult, ImReadReceiptSettingsApi, ImRedPacketBody, ImRedPacketType, ImSdkErrorCategory, ImSdkErrorShape, ImSearchApi, ImSessionApi, ImSessionFavoriteItem, ImSessionFavoriteKind, ImSessionFavoritesApi, ImSessionLifecycleState, ImSettingsApi, ImStickerAssetInput, ImStickerBody, ImStickerPack, ImSupportedConversationRef, ImTextSearchMatch, ImTextSearchMatchOptions, ImTextSearchMatcher, ImTextSearchRange, ImTransferBody, ImTransferSessionType, ImTransferStatus, ImVideoBody, ImVoiceBody, ImWebPushSubscription, ImageMessageOptions, ImagePreviewMetadata, LocalConversationHistoryClearResult, LocalMessageDeletionResult, MediaAlbumItemInput, MediaAlbumMessageOptions, MediaTransferErrorCode, MediaUploadCredentials, MediaUploadCredentialsProvider, MediaUploadCredentialsRequest, MentionCandidate, MentionCandidatePage, MentionInput, MessageContentType, MessageWindowInfo, MessageWindowPage, MessagesByIdFailure, MigrateImCachePrefixInput, MiniProgramMessageOptions, ProductConversationListType, ProductHandleConversationType, ProductMessageSearchPage, ProductMessageSearchResult, ResolveTextOptions, ResolvedConversationBackground, SegmentMatch, SegmentMatcher, SendMessageResult, StickerAssetKind, TextMessageOptions, TextSegment, TransferMessageOptions, UnknownMessageBody, UserProfile, VideoMessageOptions, VideoPreviewMetadata, VoiceCapabilities, VoiceErrorCode, VoiceMessageMetadata, VoicePlayer, VoicePlayerOptions, VoicePlayerState, VoiceRecordingResult, VoiceRecordingSession, VoiceRecordingSessionOptions, VoiceRecordingState, VoiceToggleOptions };
|
package/dist/sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'./chunk-IDECJJXC.js';export{l as IM_CHAT_FONT_SCALES,e as IM_DIAGNOSTIC_CATEGORIES,h as IM_EMOJI_CATALOG,c as ImPinnedMessageOperationError,k as buildSessionFavoritePlainBody,d as createFaceToFaceGroupQrPayload,m as createImClient,f as createImConsoleDiagnosticSink,p as createImDiagnosticMemoryBuffer,g as createSdkDiagnosticWriter,a as migrateImCachePrefix,i as resolveImEmojiToken,j as resolveSessionFavoriteKindFromMessage}from'./chunk-
|
|
1
|
+
import'./chunk-IDECJJXC.js';export{l as IM_CHAT_FONT_SCALES,e as IM_DIAGNOSTIC_CATEGORIES,h as IM_EMOJI_CATALOG,c as ImPinnedMessageOperationError,k as buildSessionFavoritePlainBody,d as createFaceToFaceGroupQrPayload,m as createImClient,f as createImConsoleDiagnosticSink,p as createImDiagnosticMemoryBuffer,g as createSdkDiagnosticWriter,a as migrateImCachePrefix,i as resolveImEmojiToken,j as resolveSessionFavoriteKindFromMessage}from'./chunk-67E52PC5.js';export{Ra as MediaTransferError,$a as createVoicePlayer,ab as createVoiceRecordingSession,Za as detectVoiceCapabilities,Sa as mediaTransferErrorCodeOf,Ta as normalizeMediaUploadCredentials,_a as voiceErrorCodeOf}from'./chunk-4RG5NHIL.js';export{la as EDIT_WINDOW_MS,m as MEDIA_ALBUM_CAPTION_MAX_LENGTH,n as MEDIA_ALBUM_MAX_ITEMS,ta as REACTION_SUPPORTED_CONTENT_TYPES,ua as canReactToMessage,pa as canTransmit,na as canTransmitByType,oa as canTransmitContent,q as classifyStickerImageType,aa as createImTextSearchMatcher,_ as extractSearchText,$ as getImTextSearchInitial,ma as requiresForwardTypeConfirmation,wa as resolveChannelAccess,o as resolveMediaAlbumSendContentType,fa as resolveTextSegments,Ca as sortSessions,Da as sumSessionsUnread}from'./chunk-ZDD7A2BS.js';import'./chunk-WOT6VMZA.js';
|