k2-im 0.1.30 → 0.1.31

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
@@ -9,8 +9,8 @@ interface MediaTransferProgress {
9
9
  phase?: 'transferring' | 'finalizing';
10
10
  }
11
11
 
12
- /** 会话类型。P0 只用 direct / group。 */
13
- type ConversationType = 'direct' | 'group' | 'channel' | 'supergroup';
12
+ /** 会话类型。P0 只用 direct / group;`robot` 是独立私聊 sibling,不得并入 direct。 */
13
+ type ConversationType = 'direct' | 'group' | 'channel' | 'supergroup' | 'robot';
14
14
  /**
15
15
  * 会话复合身份;`conversationId` 只在对应 `conversationType` 的领域内唯一。
16
16
  *
@@ -47,8 +47,8 @@ interface ConversationDraft$1 {
47
47
  attachments: readonly [];
48
48
  updatedAt: number;
49
49
  }
50
- /** 消息内容类型。sticker=表情/贴图(BMessage contentType=7);call=单聊通话记录(contentType=10);transfer=转账(contentType=16);robot=机器人卡片(contentType=18);miniProgram=小程序分享卡(contentType=22);redPacket=红包卡(contentType=25);game=小游戏(contentType=27);未知 wire 正文统一归一为 unknown。 */
51
- type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'call' | 'redPacket' | 'mediaAlbum' | 'robot' | 'unknown';
50
+ /** 消息内容类型。sticker=表情/贴图(BMessage contentType=7);call=单聊通话记录(contentType=10);transfer=转账(contentType=16);gift=礼品/刮刮卡(contentType=17);robot=机器人卡片(contentType=18);miniProgram=小程序分享卡(contentType=22);redPacket=红包卡(contentType=25);game=小游戏(contentType=27);未知 wire 正文统一归一为 unknown。 */
51
+ type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'gift' | 'call' | 'redPacket' | 'mediaAlbum' | 'robot' | 'unknown';
52
52
  /**
53
53
  * 发送态(客户端态):消息从本地创建到服务端确认的生命周期。
54
54
  * `uploading` 仅媒体消息使用:文件上传阶段(uploading→pending→sending→sent);
@@ -117,6 +117,8 @@ type LastMessageSummary = {
117
117
  gameType: ImGameType;
118
118
  } | {
119
119
  kind: 'transfer';
120
+ } | {
121
+ kind: 'gift';
120
122
  } | {
121
123
  kind: 'call';
122
124
  callKind: ImCallKind;
@@ -316,13 +318,14 @@ type ImGameBody = {
316
318
  * - `default`:0,普通可点卡片
317
319
  * - `board-game`:1,棋牌样式且不可点
318
320
  * - `board-game-link`:2,棋牌样式且可点
321
+ * - `game-preview`:3,气泡内嵌游戏预览 WebView
319
322
  * - `unknown`:必须同时保留 `rawShowType`,不得猜成可点/不可点
320
323
  */
321
- type ImMiniProgramShowType = 'default' | 'board-game' | 'board-game-link' | 'unknown';
324
+ type ImMiniProgramShowType = 'default' | 'board-game' | 'board-game-link' | 'game-preview' | 'unknown';
322
325
  /**
323
326
  * 小程序分享卡片正文(contentType==='miniProgram',协议 BMessage.contentType=22)。
324
327
  *
325
- * @remarks 字段来自 iOS `IMMiniProgramMessageBody` / proto 61-67、80-82、90-93。
328
+ * @remarks 字段来自 iOS `IMMiniProgramMessageBody` / proto 61-67、80-82、90-96。
326
329
  * `currencySource` 对应 proto field 90(无 miniProgram 前缀):`xj` 现金公司、`xy` 信用公司。
327
330
  * `subGameName` 保持服务端 JSON 字符串,不在 Core 解析语种表。打开小程序与 X 币/信用 ID 属于宿主,不进本 DTO。
328
331
  */
@@ -346,6 +349,12 @@ interface ImMiniProgramBody {
346
349
  gamePath?: string;
347
350
  /** 多语言子游戏名 JSON 字符串,例如 `{"ch":"...","en":"..."}`。 */
348
351
  subGameName?: string;
352
+ /** 游戏预览页地址(BMessage.miniProgramGamePreviewUrl,showType=3)。 */
353
+ gamePreviewUrl?: string;
354
+ /** 游戏预览设计宽(BMessage.miniProgramGamePreviewWidth)。 */
355
+ gamePreviewWidth?: number;
356
+ /** 游戏预览设计高(BMessage.miniProgramGamePreviewHeight)。 */
357
+ gamePreviewHeight?: number;
349
358
  }
350
359
  /**
351
360
  * 机器人卡片文本模块(wire `section`)。
@@ -424,6 +433,40 @@ interface ImTransferBody {
424
433
  coinName?: string;
425
434
  coinIcon?: string;
426
435
  }
436
+ /** 礼品类型。协议注释为刮刮卡 1 / 奖品 2;Android 当前会把 WelfareGiftType=0 写进消息,入站必须接受 0。 */
437
+ type ImGiftType = 0 | 1 | 2;
438
+ /** 礼品状态。0 待领取 / 1 已收款 / 2 已退还 / 3 已过期(对齐 iOS IMGiftMessageBody)。 */
439
+ type ImGiftStatus = 0 | 1 | 2 | 3;
440
+ /** 礼品会话类型。1 个人 / 2 群(BMessage.sessionType)。 */
441
+ type ImGiftSessionType = 1 | 2;
442
+ /**
443
+ * 礼品卡片正文(contentType==='gift',协议 BMessage.contentType=17)。
444
+ *
445
+ * @remarks 字段来自 iOS `IMGiftMessageBody` / proto 51-59,并复用转账字段族的 fromUid/toUid/serialNumber。
446
+ * 赠卡 HTTP 属于宿主;本 DTO 只承载会话卡片。H5 出站刮刮卡写 giftType=1。
447
+ */
448
+ interface ImGiftBody {
449
+ fromUid: string;
450
+ toUid: string;
451
+ fromUserName?: string;
452
+ toUserName?: string;
453
+ giftType: ImGiftType;
454
+ giftName: string;
455
+ giftIcon?: string;
456
+ explain?: string;
457
+ state: ImGiftStatus;
458
+ serialNumber: string;
459
+ sessionType: ImGiftSessionType;
460
+ initiateTime: number;
461
+ /** 单张金额的十进制字符串;0 或缺省表示未带金额。 */
462
+ amount?: string;
463
+ receiveTime?: number;
464
+ returnTime?: number;
465
+ isRead?: boolean;
466
+ zhangCount?: string;
467
+ benCount?: string;
468
+ fissionNumber?: string;
469
+ }
427
470
  /** 领域通话媒体类型;已从各端 wire 0/1 对调口径归一,宿主禁止再读 raw callType。 */
428
471
  type ImCallKind = 'audio' | 'video';
429
472
  /**
@@ -582,6 +625,8 @@ interface ImMessageBody {
582
625
  game?: ImGameBody;
583
626
  /** contentType==='transfer' 时的转账卡片。 */
584
627
  transfer?: ImTransferBody;
628
+ /** contentType==='gift' 时的礼品/刮刮卡卡片。 */
629
+ gift?: ImGiftBody;
585
630
  /** contentType==='call' 时的单聊通话记录。 */
586
631
  call?: ImCallRecordBody;
587
632
  /** contentType==='redPacket' 时的红包卡片。 */
@@ -945,7 +990,7 @@ interface OutboxMessage {
945
990
  resumePolicy?: 'automatic' | 'manual';
946
991
  }
947
992
  /** 当前 SDK 已注册发送策略、因此可作为转发目标的会话类型;supergroup 未注册,继续在编译期排除。 */
948
- type ForwardTargetConversationType = Extract<ConversationType, 'direct' | 'group' | 'channel'>;
993
+ type ForwardTargetConversationType = Extract<ConversationType, 'direct' | 'group' | 'channel' | 'robot'>;
949
994
  /** 转发目标会话;运行时仍由 SendStrategyRegistry 复核,避免类型声明与实际装配漂移。 */
950
995
  interface ForwardTarget {
951
996
  conversationId: string;
@@ -2724,6 +2769,10 @@ interface MiniProgramMessageOptions {
2724
2769
  interface TransferMessageOptions {
2725
2770
  replyToMessageId?: string;
2726
2771
  }
2772
+ /** 礼品卡片发送选项;正文必须已含福利中心赠送后的流水号与卡面。 */
2773
+ interface GiftMessageOptions {
2774
+ replyToMessageId?: string;
2775
+ }
2727
2776
  /**
2728
2777
  * 媒体合集里的一项:一张图片或一个视频。
2729
2778
  *
@@ -3144,7 +3193,7 @@ interface ConversationPrefetchOptions {
3144
3193
  * skipped 表示当前类型、权限、存储或预算不允许预取;失败不改变正常打开会话的行为。
3145
3194
  */
3146
3195
  interface ConversationPrefetchResult {
3147
- ref: ConversationRef<'direct' | 'group' | 'channel'>;
3196
+ ref: ConversationRef<'direct' | 'group' | 'channel' | 'robot'>;
3148
3197
  status: 'ready' | 'skipped' | 'failed' | 'cancelled';
3149
3198
  reason?: 'unsupported' | 'unavailable' | 'storage-unavailable' | 'budget' | 'page-too-large' | 'decrypt-failed' | 'invalidated' | 'cancelled';
3150
3199
  error?: ImSdkErrorShape;
@@ -3187,7 +3236,7 @@ interface ConversationDraftApi {
3187
3236
  subscribe: (listener: (draft: ConversationDraft | null) => void) => () => void;
3188
3237
  }
3189
3238
  /**
3190
- * 当前账号的跨组件草稿 API;所有动作都要求 direct/GROUP/CHANNEL 精确复合身份。
3239
+ * 当前账号的跨组件草稿 API;所有动作都要求 direct / GROUP / CHANNEL / robot 精确复合身份。
3191
3240
  *
3192
3241
  * @example
3193
3242
  * ```ts
@@ -3211,11 +3260,11 @@ interface ImDraftsApi {
3211
3260
 
3212
3261
  /**
3213
3262
  * SDK 会话列表内部 sibling 路由与会话级写动作。
3214
- * 置顶、免打扰、已读和本地删除都要求精确 `ConversationRef`,并按 direct/GROUP/CHANNEL 独立协议分流。
3263
+ * 置顶、免打扰、已读和本地删除都要求精确 `ConversationRef`,并按 direct/GROUP/CHANNEL/robot 独立协议分流。
3215
3264
  */
3216
3265
 
3217
3266
  /** 当前兼容门面支持的精确会话 ref。 */
3218
- type ImSupportedConversationRef = ConversationRef<'direct' | 'group' | 'channel'>;
3267
+ type ImSupportedConversationRef = ConversationRef<'direct' | 'group' | 'channel' | 'robot'>;
3219
3268
  /**
3220
3269
  * 会话 API 的迁移期入参。优先传完整 ref;旧 string 仅在当前 session 中唯一命中时可用。
3221
3270
  *
@@ -3644,7 +3693,7 @@ interface ImDirectCallsApi {
3644
3693
  * Blob 只经 storage 持久化。异步读取使用运行时代际防止切会话/切账号晚返回,宿主负责最终渲染与 URL 释放。
3645
3694
  */
3646
3695
 
3647
- type ConversationBackgroundConversationType = 'direct' | 'group' | 'channel';
3696
+ type ConversationBackgroundConversationType = 'direct' | 'group' | 'channel' | 'robot';
3648
3697
  interface ConversationBackgroundPreset {
3649
3698
  id: string;
3650
3699
  url: string;
@@ -3806,7 +3855,7 @@ interface ImChannelProfile {
3806
3855
  */
3807
3856
 
3808
3857
  /** default 会话列表支持的精确类型;`supergroup` 继续受产品 Gate 约束。 */
3809
- type ProductConversationListType = 'direct' | 'group' | 'channel';
3858
+ type ProductConversationListType = 'direct' | 'group' | 'channel' | 'robot';
3810
3859
  /** GROUP 会话限制状态;与 CHANNEL 状态保持独立 sibling。 */
3811
3860
  type ImGroupConversationState = GroupSessionState;
3812
3861
  /**
@@ -3865,6 +3914,8 @@ type ConversationLastMessageSummary = {
3865
3914
  kind: 'robot';
3866
3915
  } | {
3867
3916
  kind: 'transfer';
3917
+ } | {
3918
+ kind: 'gift';
3868
3919
  } | {
3869
3920
  kind: 'redPacket';
3870
3921
  } | {
@@ -4020,6 +4071,12 @@ interface DirectConversationCapabilities {
4020
4071
  canUseMessageActions: CapabilityDecision;
4021
4072
  canManageRelationship: CapabilityDecision;
4022
4073
  }
4074
+ interface RobotConversationCapabilities {
4075
+ canSendMessages: CapabilityDecision;
4076
+ canOpenProfile: CapabilityDecision;
4077
+ canUseMessageActions: CapabilityDecision;
4078
+ canReadHistory: CapabilityDecision;
4079
+ }
4023
4080
  /**
4024
4081
  * 普通群能力快照。
4025
4082
  *
@@ -4086,6 +4143,8 @@ type ConversationCapabilitySnapshot = (ConversationCapabilityBase<'direct'> & {
4086
4143
  value: GroupConversationCapabilities;
4087
4144
  }) | (ConversationCapabilityBase<'channel'> & {
4088
4145
  value: ChannelConversationCapabilities;
4146
+ }) | (ConversationCapabilityBase<'robot'> & {
4147
+ value: RobotConversationCapabilities;
4089
4148
  });
4090
4149
  interface ImConversationCapabilitiesApi {
4091
4150
  /** 只读取 SDK 当前本机真相与已刷新过的资料/关系投影,不隐式联网。 */
@@ -4252,7 +4311,7 @@ interface ImMessagesByIdResult<TMessage> {
4252
4311
  */
4253
4312
 
4254
4313
  /** 当前已接线的产品 handle 会话类型;三者只在无会话语义原子层复用。 */
4255
- type ProductHandleConversationType = 'direct' | 'group' | 'channel';
4314
+ type ProductHandleConversationType = 'direct' | 'group' | 'channel' | 'robot';
4256
4315
  /**
4257
4316
  * 会话 handle 初始打开位置。
4258
4317
  *
@@ -4387,6 +4446,12 @@ interface ConversationMessageApi {
4387
4446
  * @remarks CHANNEL 当前产品入口不发送转账,会返回 unsupported。消息固定明文。
4388
4447
  */
4389
4448
  sendTransfer: (transfer: ImTransferBody, options?: TransferMessageOptions) => Promise<SendMessageResult>;
4449
+ /**
4450
+ * 发送礼品卡片。调用方必须先完成福利中心 HTTP 赠送。
4451
+ *
4452
+ * @remarks CHANNEL 当前产品入口不发送礼物,会返回 unsupported。消息固定明文。
4453
+ */
4454
+ sendGift: (gift: ImGiftBody, options?: GiftMessageOptions) => Promise<SendMessageResult>;
4390
4455
  /** 当前用户已选相同 emoji 时移除,否则添加或替换。emoji 必须是协议 token,例如 `[Great]`。 */
4391
4456
  toggleReaction: (messageId: string, emoji: string) => Promise<ImReactionChangeResult>;
4392
4457
  /** 显式添加/替换或移除,供参与者详情等不能用 toggle 猜动作的产品交互。 */
@@ -5235,6 +5300,57 @@ interface ImRequestError {
5235
5300
  */
5236
5301
  type ImRequestErrorHandler = (issue: ImRequestError) => void | Promise<void>;
5237
5302
 
5303
+ /**
5304
+ * 机器人目录产品分页运行时。
5305
+ * 服务端页码封装为绑定账号 runtime 与查询条件的 opaque token;伪造、跨筛选或已消费 token 显式失败。
5306
+ */
5307
+
5308
+ /**
5309
+ * 机器人目录查询范围。
5310
+ *
5311
+ * `catalog` 对齐通讯录「查找机器人」;`conversation` 对齐群/社群资料添加与输入栏已绑定列表。
5312
+ */
5313
+ type ImRobotDirectoryScope = {
5314
+ kind: 'catalog';
5315
+ } | {
5316
+ kind: 'conversation';
5317
+ conversationType: 'group' | 'channel';
5318
+ conversationId: string;
5319
+ /** `bound` 对齐 iOS 输入栏 `search_type=1`。 */
5320
+ filter?: 'bound';
5321
+ };
5322
+ /** 机器人目录项;只保留打开私聊和列表展示所需字段。 */
5323
+ interface ImRobotDirectoryItem {
5324
+ id: string;
5325
+ displayName: string;
5326
+ username?: string;
5327
+ avatarUrl?: string;
5328
+ bound?: boolean;
5329
+ }
5330
+ /** 把机器人绑定或解绑到普通群/社群。 */
5331
+ interface ImRobotConversationBindInput {
5332
+ robotId: string;
5333
+ conversationType: 'group' | 'channel';
5334
+ conversationId: string;
5335
+ }
5336
+ /** 机器人目录页;服务端页码由 SDK token 封装,UI 只能原样续页。 */
5337
+ interface ImRobotDirectoryPage {
5338
+ items: readonly ImRobotDirectoryItem[];
5339
+ nextPageToken?: ImPageToken;
5340
+ exhausted: boolean;
5341
+ }
5342
+ /** 机器人目录产品分页面。 */
5343
+ interface ImRobotsApi {
5344
+ listFirstPage: (options?: {
5345
+ scope?: ImRobotDirectoryScope;
5346
+ keyword?: string;
5347
+ pageSize?: number;
5348
+ }) => Promise<ImRobotDirectoryPage>;
5349
+ listNextPage: (pageToken: ImPageToken) => Promise<ImRobotDirectoryPage>;
5350
+ bindToConversation: (input: ImRobotConversationBindInput) => Promise<void>;
5351
+ unbindFromConversation: (input: ImRobotConversationBindInput) => Promise<void>;
5352
+ }
5353
+
5238
5354
  /**
5239
5355
  * 当前账号本地会话与消息的分场景产品搜索运行时。
5240
5356
  *
@@ -5297,6 +5413,8 @@ interface ImMessageSearchApi {
5297
5413
  inGroup: (conversation: ConversationRef<'group'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
5298
5414
  /** 搜索 CHANNEL 本地历史;当前不调用未闭合的远端 CHANNEL 搜索/定位协议。 */
5299
5415
  inChannel: (conversation: ConversationRef<'channel'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
5416
+ /** 搜索 robot 本地历史;无远端历史,不得回退 direct。 */
5417
+ inRobot: (conversation: ConversationRef<'robot'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
5300
5418
  /** 只搜索文本消息;关键词必填且不能为空。 */
5301
5419
  texts: (conversation: ConversationRef<ProductHandleConversationType>, keyword: string) => Promise<ProductMessageSearchPage<'text'>>;
5302
5420
  /** 只搜索文件消息;省略或传空白关键词时按文件分类浏览。 */
@@ -5777,7 +5895,7 @@ interface AdvancedConversationsApi extends ImConversationsApi, ImConversationBac
5777
5895
  *
5778
5896
  * @internal
5779
5897
  */
5780
- ensureOpenableConversation: (ref: ConversationRef) => Promise<ConversationRef<'direct' | 'group' | 'channel'>>;
5898
+ ensureOpenableConversation: (ref: ConversationRef) => Promise<ConversationRef<'direct' | 'group' | 'channel' | 'robot'>>;
5781
5899
  }
5782
5900
  /**
5783
5901
  * 普通宿主的真实 default client。
@@ -5801,6 +5919,8 @@ interface ImProductClient {
5801
5919
  readonly conversations: ImConversationListApi;
5802
5920
  /** 当前账号完整联系人、群组和社群目录的统一搜索。 */
5803
5921
  readonly directory: ImDirectorySearchApi;
5922
+ /** 机器人公开目录;通讯录查找与群/社群绑定列表共用分页合同。 */
5923
+ readonly robots: ImRobotsApi;
5804
5924
  readonly contacts: ImContactsApi;
5805
5925
  readonly groups: ImGroupsApi;
5806
5926
  readonly channels: ImChannelsApi;
@@ -5850,6 +5970,7 @@ interface ImClient extends Omit<ImProductClient, 'capabilities' | 'channels' | '
5850
5970
  (ref: ConversationRef<'direct'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'direct'>>;
5851
5971
  (ref: ConversationRef<'group'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'group'>>;
5852
5972
  (ref: ConversationRef<'channel'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'channel'>>;
5973
+ (ref: ConversationRef<'robot'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'robot'>>;
5853
5974
  };
5854
5975
  /** 当前账号草稿产品面;按复合身份持久化,handle.draft 委托同一状态源。 */
5855
5976
  drafts: ImDraftsApi;
@@ -6031,4 +6152,4 @@ interface ImResourceUploader {
6031
6152
  declare function createImResourceUploader(config: ImResourceUploaderConfig): ImResourceUploader;
6032
6153
 
6033
6154
  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 };
6034
- 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, 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, ImRequestError, ImRequestErrorHandler, ImResourceKind, ImResourceUploadInput, ImResourceUploadProgress, ImResourceUploadResult, ImResourceUploader, ImResourceUploaderConfig, ImRobotBody, ImRobotCommand, ImRobotModule, 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, SegmentMatch, SegmentMatcher, SendMessageResult, StickerAssetKind, TextMessageOptions, TextSegment, TransferMessageOptions, UnknownMessageBody, UserProfile, VideoMessageOptions, VideoPreviewMetadata, VoiceCapabilities, VoiceErrorCode, VoiceMessageMetadata, VoicePlayer, VoicePlayerOptions, VoicePlayerState, VoiceRecordingResult, VoiceRecordingSession, VoiceRecordingSessionOptions, VoiceRecordingState, VoiceToggleOptions };
6155
+ 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, 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-MNWNUGIV.js';export{Sa as MediaTransferError,bb as createVoicePlayer,cb as createVoiceRecordingSession,$a as detectVoiceCapabilities,Ta as mediaTransferErrorCodeOf,Ua as normalizeMediaUploadCredentials,ab as voiceErrorCodeOf}from'./chunk-GHZUH7RB.js';export{pa as EDIT_WINDOW_MS,o as MEDIA_ALBUM_CAPTION_MAX_LENGTH,p as MEDIA_ALBUM_MAX_ITEMS,xa as REACTION_SUPPORTED_CONTENT_TYPES,ya as canReactToMessage,ta as canTransmit,ra as canTransmitByType,sa as canTransmitContent,s as classifyStickerImageType,ea as createImTextSearchMatcher,ca as extractSearchText,da as getImTextSearchInitial,qb as parseSessionFavoriteAlbumItems,qa as requiresForwardTypeConfirmation,Aa as resolveChannelAccess,q as resolveMediaAlbumSendContentType,rb as resolveSessionFavoriteAlbumCaption,pb as resolveSessionFavoriteAlbumItemPreviewUrl,ja as resolveTextSegments,Ha as sortSessions,Ia as sumSessionsUnread}from'./chunk-4KPJTXQN.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-O23EXDM5.js';export{Va as MediaTransferError,eb as createVoicePlayer,fb as createVoiceRecordingSession,cb as detectVoiceCapabilities,Wa as mediaTransferErrorCodeOf,Xa as normalizeMediaUploadCredentials,db as voiceErrorCodeOf}from'./chunk-SMWPQSGR.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-CIY4WBFJ.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.30",
4
+ "version": "0.1.31",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "publishConfig": {