k2-im 0.1.36 → 0.1.38

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/sdk.d.ts CHANGED
@@ -207,6 +207,8 @@ interface ImVideoBody {
207
207
  width: number;
208
208
  /** 视频像素高(BMessage.height)。 */
209
209
  height: number;
210
+ /** 发送方显式选择了 HD 原视频(BMessage.hd);不按分辨率猜测。 */
211
+ hd?: boolean;
210
212
  /** 时长(秒,可含小数);移动端旧消息的毫秒值由 SDK 转换,宿主不得猜单位。 */
211
213
  duration?: number;
212
214
  /** SDK 已确认时长为秒的标记;兼容旧缓存时防止重复转换。缺省仍按公开 API 的秒约定传入。 */
@@ -716,7 +718,7 @@ interface MediaTaskUpdate {
716
718
  * upload 任务子阶段。
717
719
  *
718
720
  * `waiting-upload-slot` 与 `state: 'queued'` 同时出现,表示还没开始传字节(在生成缩略图或在等上传槽位),
719
- * 此时 percent 恒为 0;`transferring` 正在传字节;`finalizing` 是等待远端 URL 最终确认。
721
+ * 首发 percent 为 0,断点恢复时保留已有进度;`transferring` 正在传字节;`finalizing` 是等待远端 URL 最终确认。
720
722
  */
721
723
  phase?: 'waiting-upload-slot' | 'waiting-retry' | 'transferring' | 'finalizing';
722
724
  /** 当前发送意图的尝试序号与总上限。 */
@@ -725,6 +727,18 @@ interface MediaTaskUpdate {
725
727
  /** 已传与总字节数,供共享展示层估算速度。 */
726
728
  bytesTransferred?: number;
727
729
  bytesTotal?: number;
730
+ /** 上传合集的逐项真实字节快照;整组发送仍由外层任务控制,不为每格创建独立发送。 */
731
+ items?: readonly Readonly<{
732
+ /** 从零开始的合集位置。 */
733
+ itemIndex: number;
734
+ /** 本项实际上传字节与源文件总字节。 */
735
+ bytesTransferred: number;
736
+ bytesTotal: number;
737
+ /** 远端资源确认完成前最多 99%。 */
738
+ percent: number;
739
+ /** 本项状态;已完成项不随兄弟项取消或失败回退。 */
740
+ state: 'queued' | 'running' | 'completed' | 'failed' | 'canceled';
741
+ }>[];
728
742
  /** 跨刷新恢复可用性;缺省尚未建立恢复记录。 */
729
743
  recovery?: 'available' | 'session-only';
730
744
  recoveryReason?: string;
@@ -779,7 +793,7 @@ interface ImMessage {
779
793
  };
780
794
  /**
781
795
  * CHANNEL 管理员/社群主全员删除终态。它与发送者本人撤回、`deleteLocal` 完全不同:服务端通过
782
- * `RADIO_ADMIN_CANCEL_*` 同步给全员,正文不可逆清空,产品统一展示“管理员删除了一条消息”。
796
+ * `RADIO_ADMIN_CANCEL_*` 同步给全员,正文不可逆清空;线程与会话摘要仅向群主、管理员展示删除提示,普通成员及未知角色隐藏。
783
797
  */
784
798
  deletedForEveryone?: {
785
799
  by: string;
@@ -961,6 +975,15 @@ interface ImSession {
961
975
  * 派生展示字段(随最新消息变化,会话列表据此显示发送中 loading / 失败图标);运行期真相,不持久化(persistSession 落盘时剔除)。
962
976
  */
963
977
  lastMessageSendState?: 'sending' | 'failed';
978
+ /**
979
+ * 最新一条己方已发送消息的回执态。
980
+ *
981
+ * 只在自己发出且 `status='sent'` 时投影;发送中/失败、对端消息、撤回、全员删除和系统提示都不给。
982
+ * `delivered` 与尚未回执一样投影为 `unread`;当前协议没有送达通知,不能把 `sent` 当作对端已收到。
983
+ * 该字段随最新消息变化,并随会话落盘,避免冷启动后
984
+ * 因「盘中缺字段 / 内存有字段」反复广播;对端已读变化必须刷新会话行。
985
+ */
986
+ lastMessageReceipt?: 'unread' | 'read';
964
987
  /** P0 我方已读游标(见 §4.3)。 */
965
988
  readCursor?: string;
966
989
  /** 群受限状态(仅 group;来自 0x2204 群通知 side-effect)。缺省视为 'active'(可正常发送)。 */
@@ -1070,8 +1093,8 @@ interface UserProfile {
1070
1093
  /** 用户自设昵称(后端 `nick_name`)。 */
1071
1094
  nickname: string;
1072
1095
  /**
1073
- * 好友备注名(后端 `/user/info/friend` 的 `remark_name`,仅好友关系有)。
1074
- * 与 `nickname` 并存:展示名优先级 = 备注名 > 昵称(安卓 SessionUtils.getShowUserName 实证)。
1096
+ * 好友展示备注(后端 `/user/info/friend` 的 `remark_name`,无备注时回退 `contact_name`,仅好友关系有)。
1097
+ * 与 `nickname` 并存:展示名优先级 = 备注名/通讯录名 > 昵称(安卓 SessionUtils.getShowUserName 实证)。
1075
1098
  */
1076
1099
  remark?: string;
1077
1100
  avatar?: string;
@@ -1882,7 +1905,8 @@ declare function extractSearchText(message: Pick<ImMessage, 'contentType' | 'bod
1882
1905
  /**
1883
1906
  * 获取通讯录/历史搜索可复用的首字母分组键。
1884
1907
  *
1885
- * @remarks 拉丁字母统一为 A-Z;中文使用 pinyin-pro 的首字母;数字、符号和 emoji 归入 `#`。
1908
+ * @remarks 拉丁字母统一为 A-Z;中文按整段文本上下文取首字读音的首字母,多音字随词语变化;
1909
+ * 数字、符号和 emoji 归入 `#`。
1886
1910
  * 该工具只负责文本归一,不持有目录或 UI 状态,H5/PC 可以共享同一规则。
1887
1911
  */
1888
1912
  declare function getImTextSearchInitial(text: string): Promise<string>;
@@ -4037,6 +4061,13 @@ interface ConversationListItem {
4037
4061
  by: string;
4038
4062
  }>;
4039
4063
  lastMessageSendState?: 'sending' | 'failed';
4064
+ /**
4065
+ * 最新一条己方已发送消息的对端已读态。
4066
+ *
4067
+ * 只在自己发出且已发送成功时出现;发送中/失败、对端消息、撤回和系统提示都不给。
4068
+ * 单聊会话列表用它在摘要前画灰色单勾/绿色双勾;群组与社群即使有该字段也不展示。
4069
+ */
4070
+ lastMessageReceipt?: 'unread' | 'read';
4040
4071
  timestamp: number;
4041
4072
  unreadCount: number;
4042
4073
  /** 是否为用户手工添加的本地未读提醒;此时 `unreadCount` 至少投影为 1。 */
@@ -4225,6 +4256,21 @@ type ConversationEntryUnreadSnapshot = Readonly<{
4225
4256
  }> | Readonly<{
4226
4257
  state: 'unavailable';
4227
4258
  }>;
4259
+ /** 进入时冻结的导航提示;数量独立于会话已读,不暴露内部历史排序边界。 */
4260
+ type ConversationEntryUnreadNavigation = Readonly<{
4261
+ state: 'none';
4262
+ }> | Readonly<{
4263
+ state: 'pending' | 'unavailable';
4264
+ count: number;
4265
+ }> | Readonly<{
4266
+ state: 'located';
4267
+ count: number;
4268
+ firstMessageId: string;
4269
+ }> | Readonly<{
4270
+ state: 'failed';
4271
+ count: number;
4272
+ error: ImSdkErrorShape;
4273
+ }>;
4228
4274
 
4229
4275
  /**
4230
4276
  * Emoji、GIF 与贴图稳定产品门面。
@@ -4388,6 +4434,8 @@ interface ConversationOpenOptions {
4388
4434
  * 后续 read 事件或新消息不会移动分隔线。
4389
4435
  */
4390
4436
  initialPosition?: ConversationInitialPosition;
4437
+ /** 冻结进入时未读导航,独立于初始位置;清会话未读后仍可定位原边界。 */
4438
+ captureEntryUnread?: boolean;
4391
4439
  /**
4392
4440
  * 初始历史加载方式,默认 `blocking`。
4393
4441
  *
@@ -4415,6 +4463,8 @@ interface ConversationHandleSnapshot<TType extends ProductHandleConversationType
4415
4463
  messages: readonly ImMessageView[];
4416
4464
  /** 本次打开时冻结的未读入口;只用于产品 UI 分隔线,不作为 SDK 已读真相。 */
4417
4465
  entryUnread: ConversationEntryUnreadSnapshot;
4466
+ /** 显式请求的进入导航快照;旧消费者不请求时省略。 */
4467
+ entryUnreadNavigation?: ConversationEntryUnreadNavigation;
4418
4468
  /** 当前账号本机草稿;不承诺跨端同步。 */
4419
4469
  draft: ConversationDraft | null;
4420
4470
  loading: boolean;
@@ -4715,15 +4765,17 @@ interface ConversationHandle<TType extends ProductHandleConversationType = Produ
4715
4765
  resolveMessage: (messageId: string) => Promise<ImMessageView | null>;
4716
4766
  history: {
4717
4767
  loadLatest: () => Promise<void>;
4768
+ /** 有限加载进入时冻结边界;成功才替换窗口,不可定位返回 false,网络失败抛错并保留数量。 */
4769
+ loadEntryUnread: () => Promise<boolean>;
4718
4770
  loadOlder: () => Promise<void>;
4719
4771
  /** 历史定位窗口向更新方向连续翻页;接回最新端后 `hasNewer` 变为 false。 */
4720
4772
  loadNewer: () => Promise<void>;
4721
4773
  /**
4722
4774
  * 按稳定消息 id 打开目标附近的连续历史窗口。
4723
4775
  *
4724
- * @remarks 冷启动时允许使用同一复合会话的完整置顶预览或短期搜索结果作为只读锚点;二者都不会因此写入
4725
- * 普通消息 Store,partial 置顶、过期搜索结果仍因缺少可信排序信息而明确拒绝定位。
4726
- * @throws 目标不在本机历史或不属于当前复合会话时,抛出稳定 `IM_SDK_MESSAGE_NOT_FOUND`
4776
+ * @remarks GROUP 完整置顶预览可按消息时间定位;CHANNEL 置顶未缓存时先按 ID 取回正式历史记录,
4777
+ * 以服务端游标继续双向分页。短期搜索结果只作为只读锚点;partial 置顶和过期搜索结果明确拒绝定位。
4778
+ * @throws 没有可用锚点、远端确认缺失或目标不属于当前复合会话时,抛出稳定 `IM_SDK_MESSAGE_NOT_FOUND`
4727
4779
  * (`category: 'state'`、`retryable: false`、`details.messageId`)。这是常见产品结果而非链路异常,
4728
4780
  * 调用方应据此与真正的存储/协议失败区分反馈,不要解析错误文案。
4729
4781
  */
@@ -4745,6 +4797,10 @@ interface ConversationHandle<TType extends ProductHandleConversationType = Produ
4745
4797
  draft: ConversationDraftApi;
4746
4798
  /** 标记窗口最新消息或显式可见消息为已读;SDK 按精确 sibling 解析真实 read cursor。 */
4747
4799
  markRead: (messageId?: string) => Promise<void>;
4800
+ /** 结算最新可信边界的会话未读;不会将整个范围登记为对端可见回执。 */
4801
+ markConversationRead: () => Promise<void>;
4802
+ /** 只登记实际可见的消息 ID;历史消息也可补报,媒体消费继续使用独立动作。 */
4803
+ markVisibleMessages: (messageIds: readonly string[]) => Promise<void>;
4748
4804
  setMuted: (muted: boolean) => Promise<void>;
4749
4805
  close: () => void;
4750
4806
  }
@@ -4864,6 +4920,8 @@ interface ImMediaTask {
4864
4920
  * 上传任务不带下标:一条合集整体只有一条上传进度(所有项都传完才算这条消息发出去)。
4865
4921
  */
4866
4922
  itemIndex?: number;
4923
+ /** 合集各项的真实上传快照;控制动作仍作用于整条消息,不包含资源或传输凭据。 */
4924
+ items?: MediaTaskUpdate['items'];
4867
4925
  /** upload 来自发送链路,download 来自本产品 API。 */
4868
4926
  direction: 'upload' | 'download';
4869
4927
  /** 终态 completed/failed/canceled 不会被同一尝试的迟到 progress 回退。 */
@@ -4909,6 +4967,20 @@ interface ImMediaTask {
4909
4967
  * ```
4910
4968
  */
4911
4969
  interface ImMediaTasksApi {
4970
+ /** 清除当前账号完整媒体缓存及下载断点;保留消息、草稿、上传源和已交付的播放资源,在途下载仍可完成。 */
4971
+ clearCache: () => Promise<void>;
4972
+ /**
4973
+ * 按输入顺序查询完整本机媒体是否可用;不下载、不读取 Blob、不续缓存期限或创建任务。
4974
+ * 仅支持图片/视频(含媒体合集);未配置持久缓存时只检查内存。
4975
+ * @throws 不支持轻量查询或存储读取失败时明确拒绝,不伪装成未命中。
4976
+ * @example const [available] = await client.media.probeCached([messageRef])
4977
+ */
4978
+ probeCached: (messages: readonly ImMessageRef[]) => Promise<readonly boolean[]>;
4979
+ /**
4980
+ * 缓存写入、清理或过期后通知消费者重新查询;账号销毁后自动退订。
4981
+ * @example const stop = client.media.subscribeCacheChanges(() => refreshVisibleMedia())
4982
+ */
4983
+ subscribeCacheChanges: (listener: () => void) => () => void;
4912
4984
  /**
4913
4985
  * 返回当前账号全部活跃任务与近期终态任务的冻结快照;总量超过 128 时只淘汰终态,极端并发活跃可暂时超过上限。
4914
4986
  * @throws runtime 已 logout/dispose 时抛 `IM_SDK_MEDIA_RUNTIME_INACTIVE`。
@@ -4923,7 +4995,10 @@ interface ImMediaTasksApi {
4923
4995
  * 取消 queued/running 任务;上传委托 core,下载中止当前 AbortController。
4924
4996
  * @throws 未知任务、非法状态或底层未受理时以稳定 `IM_SDK_MEDIA_TASK_*` 错误拒绝。
4925
4997
  */
4926
- cancel: (taskId: string) => Promise<void>;
4998
+ cancel: (taskId: string, options?: {
4999
+ /** 取消发送但保留已确认上传分片与原文件,只有用户显式重试才继续。默认取消仍清理。 */
5000
+ retainCheckpoint?: boolean;
5001
+ }) => Promise<void>;
4927
5002
  /** 暂停上传,等待请求收尾后返回;下载不支持暂停。 */
4928
5003
  pause: (taskId: string) => Promise<void>;
4929
5004
  /** 恢复已暂停上传,复用同一原文件与消息。 */
@@ -4941,19 +5016,28 @@ interface ImMediaTasksApi {
4941
5016
  /**
4942
5017
  * 重试 failed/canceled 任务;上传复用保留原文件,下载重新解析同一精确消息引用。
4943
5018
  * 续传不可用或清理未确认时,必须先征得用户同意重新上传,再传 restartUpload:true。
4944
- * 用户取消后的重发始终重新上传尚未完成的资源;成功的合集项仍可复用。
5019
+ * 保留式取消后的重发复用已确认分片和原密钥;默认清理式取消不保证保有原文件。
4945
5020
  * 下载取消已受理后即可创建新尝试,不复用旧取消 Promise;旧 loader 结束前仍占用并发槽,但不能覆盖新任务。
4946
5021
  * @throws 原文件已淘汰、任务仍在途或消息/下载 capability 不可用时显式拒绝。
4947
5022
  */
4948
5023
  retry: (taskId: string, options?: {
4949
5024
  /** 用户已确认放弃旧进度并重新上传;仅上传任务接受,清理失败时仍停止。 */
4950
5025
  restartUpload?: boolean;
5026
+ /** 下载断点已失效或超出缓存预算时,用户确认从头下载。 */
5027
+ restartDownload?: boolean;
4951
5028
  }) => Promise<void>;
4952
5029
  /**
4953
5030
  * 下载并按消息正文合同解密,同一消息并发调用复用同一 Promise,成功返回 Blob。
4954
5031
  * @throws 消息不存在/非媒体/无远端 URL/未装配 capability、传输失败、取消或 teardown 均以稳定错误拒绝,不返回空 Blob。
4955
5032
  */
4956
5033
  download: (message: ImMessageRef) => Promise<Blob>;
5034
+ /**
5035
+ * 将最近预览的精确媒体项设为最高下载优先级,不新建或取消任务。
5036
+ * 下一空闲任务/分片请求名额优先给该项;已发请求不中断,关闭播放器不撤销优先级。
5037
+ * 后续调用替换上一个目标;账号退出后不可调用。
5038
+ * @example client.media.prioritizeDownload({ conversation, messageId, itemIndex: 1 })
5039
+ */
5040
+ prioritizeDownload: (message: ImMessageRef) => void;
4957
5041
  /**
4958
5042
  * 仅读取当前账号内存或持久媒体资产缓存;命中返回 Blob,未缓存或类型未注册返回 `null`。
4959
5043
  *
@@ -5744,6 +5828,7 @@ interface ImClientOptions {
5744
5828
  /** 显式开启视频/文件跨刷新续传。最多 3 条、24 小时,保存加密密钥但不保存文件副本;注销清除。 */
5745
5829
  uploadRecovery?: {
5746
5830
  enabled: boolean;
5831
+ retainFailedUploads?: boolean;
5747
5832
  };
5748
5833
  }
5749
5834
  /** 产品级账号与连接生命周期;adapter、transport 和连接状态机原子不进入该接口。 */
@@ -6255,4 +6340,4 @@ interface ImResourceUploader {
6255
6340
  declare function createImResourceUploader(config: ImResourceUploaderConfig): ImResourceUploader;
6256
6341
 
6257
6342
  export { EDIT_WINDOW_MS, IMAGE_MESSAGE_ACCEPT, 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, createImResourceUploader, createImTextSearchMatcher, createSdkDiagnosticWriter, createVoicePlayer, createVoiceRecordingSession, detectVoiceCapabilities, extractSearchText, getImTextSearchInitial, isSupportedImageFile, mediaTransferErrorCodeOf, migrateImCachePrefix, normalizeMediaUploadCredentials, parseSessionFavoriteAlbumItems, requiresForwardTypeConfirmation, resolveChannelAccess, resolveImEmojiToken, resolveMediaAlbumSendContentType, resolveSessionFavoriteAlbumCaption, resolveSessionFavoriteAlbumItemPreviewUrl, resolveSessionFavoriteKindFromMessage, resolveTextSegments, sortSessions, sumSessionsUnread, voiceErrorCodeOf };
6258
- 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, ConversationPrefetchOptions, ConversationPrefetchResult, ConversationRef, ConversationSearchPage, ConversationSearchResult, ConversationSystemSummary, ConversationType, DirectConversationCapabilities, DirectConversationMessageApi, DraftInput, EditTextOptions, ExpressionMessageOptions, FileMessageOptions, ForwardFailReason, ForwardItemStatus, ForwardMessageFailure, ForwardMessagesInput, ForwardMessagesResult, ForwardTarget, ForwardedMessageRef, GameMessageOptions, GifMessageOptions, GiftMessageOptions, 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, ImFilesAlbumBody, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, ImGiftBody, ImGiftSessionType, ImGiftStatus, ImGiftType, 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, ImRequestError, ImRequestErrorHandler, ImResourceKind, ImResourceUploadInput, ImResourceUploadProgress, ImResourceUploadResult, ImResourceUploader, ImResourceUploaderConfig, ImRobotBody, ImRobotCommand, ImRobotConversationBindInput, ImRobotDirectoryItem, ImRobotDirectoryPage, ImRobotDirectoryScope, ImRobotModule, ImRobotsApi, ImSdkErrorCategory, ImSdkErrorShape, ImSearchApi, ImSessionApi, ImSessionFavoriteAlbumItem, 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, RobotConversationCapabilities, SegmentMatch, SegmentMatcher, SendMessageResult, StickerAssetKind, TextMessageOptions, TextSegment, TransferMessageOptions, UnknownMessageBody, UserProfile, VideoMessageOptions, VideoPreviewMetadata, VoiceCapabilities, VoiceErrorCode, VoiceMessageMetadata, VoicePlayer, VoicePlayerOptions, VoicePlayerState, VoiceRecordingResult, VoiceRecordingSession, VoiceRecordingSessionOptions, VoiceRecordingState, VoiceToggleOptions };
6343
+ 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, ConversationEntryUnreadNavigation, ConversationEntryUnreadSnapshot, ConversationHandle, ConversationHandleSnapshot, ConversationInitialPosition, ConversationLastMessageSummary, ConversationListItem, ConversationListMention, ConversationMessageApi, ConversationOpenOptions, ConversationPrefetchOptions, ConversationPrefetchResult, ConversationRef, ConversationSearchPage, ConversationSearchResult, ConversationSystemSummary, ConversationType, DirectConversationCapabilities, DirectConversationMessageApi, DraftInput, EditTextOptions, ExpressionMessageOptions, FileMessageOptions, ForwardFailReason, ForwardItemStatus, ForwardMessageFailure, ForwardMessagesInput, ForwardMessagesResult, ForwardTarget, ForwardedMessageRef, GameMessageOptions, GifMessageOptions, GiftMessageOptions, 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, ImFilesAlbumBody, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, ImGiftBody, ImGiftSessionType, ImGiftStatus, ImGiftType, 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, ImRequestError, ImRequestErrorHandler, ImResourceKind, ImResourceUploadInput, ImResourceUploadProgress, ImResourceUploadResult, ImResourceUploader, ImResourceUploaderConfig, ImRobotBody, ImRobotCommand, ImRobotConversationBindInput, ImRobotDirectoryItem, ImRobotDirectoryPage, ImRobotDirectoryScope, ImRobotModule, ImRobotsApi, ImSdkErrorCategory, ImSdkErrorShape, ImSearchApi, ImSessionApi, ImSessionFavoriteAlbumItem, 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, RobotConversationCapabilities, 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{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-NB6MXFCH.js';export{Xa as MediaTransferError,jb as createVoicePlayer,kb as createVoiceRecordingSession,hb as detectVoiceCapabilities,Ya as mediaTransferErrorCodeOf,_a as normalizeMediaUploadCredentials,ib as voiceErrorCodeOf}from'./chunk-4CH72T6I.js';export{ra as EDIT_WINDOW_MS,p as MEDIA_ALBUM_CAPTION_MAX_LENGTH,q as MEDIA_ALBUM_MAX_ITEMS,za as REACTION_SUPPORTED_CONTENT_TYPES,Aa as canReactToMessage,va as canTransmit,ta as canTransmitByType,ua as canTransmitContent,u as classifyStickerImageType,ga as createImTextSearchMatcher,ea as extractSearchText,fa as getImTextSearchInitial,vb as parseSessionFavoriteAlbumItems,sa as requiresForwardTypeConfirmation,Ca as resolveChannelAccess,r as resolveMediaAlbumSendContentType,wb as resolveSessionFavoriteAlbumCaption,ub as resolveSessionFavoriteAlbumItemPreviewUrl,la as resolveTextSegments,Ja as sortSessions,Ka as sumSessionsUnread}from'./chunk-ANHUDX3C.js';import'./chunk-WOT6VMZA.js';
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-LMP34HNC.js';export{Xa as MediaTransferError,jb as createVoicePlayer,kb as createVoiceRecordingSession,hb as detectVoiceCapabilities,Ya as mediaTransferErrorCodeOf,_a as normalizeMediaUploadCredentials,ib as voiceErrorCodeOf}from'./chunk-ZERTVCH2.js';export{ra as EDIT_WINDOW_MS,p as MEDIA_ALBUM_CAPTION_MAX_LENGTH,q as MEDIA_ALBUM_MAX_ITEMS,za as REACTION_SUPPORTED_CONTENT_TYPES,Aa as canReactToMessage,va as canTransmit,ta as canTransmitByType,ua as canTransmitContent,u as classifyStickerImageType,ga as createImTextSearchMatcher,ea as extractSearchText,fa as getImTextSearchInitial,xb as parseSessionFavoriteAlbumItems,sa as requiresForwardTypeConfirmation,Ca as resolveChannelAccess,r as resolveMediaAlbumSendContentType,yb as resolveSessionFavoriteAlbumCaption,wb as resolveSessionFavoriteAlbumItemPreviewUrl,la as resolveTextSegments,La as sortSessions,Ma as sumSessionsUnread}from'./chunk-4I23ADH2.js';import'./chunk-WOT6VMZA.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "k2-im",
3
3
  "type": "module",
4
- "version": "0.1.36",
4
+ "version": "0.1.38",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "publishConfig": {