k2-im 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +1 -1
- package/dist/chat-kit-pinia.d.ts +194 -20
- package/dist/chat-kit-pinia.js +1 -1
- package/dist/chat-kit-vue.d.ts +81 -17
- package/dist/chat-kit-vue.js +1 -1
- package/dist/chat-kit.d.ts +152 -19
- package/dist/chat-kit.js +1 -1
- package/dist/chunk-ACU6MYJB.js +2 -0
- package/dist/chunk-DFJWOEGQ.js +7 -0
- package/dist/{chunk-HFB7A67C.js → chunk-EBFUMES6.js} +1 -1
- package/dist/{chunk-7HTZ3OXY.js → chunk-G7IJFU6R.js} +1 -1
- package/dist/{chunk-CLEJGY6F.js → chunk-IXEEIWDI.js} +1 -1
- package/dist/chunk-LCNFKUGH.js +1 -0
- package/dist/chunk-RKZTPXBQ.js +1 -0
- package/dist/i18n.d.ts +1 -1
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +207 -22
- package/dist/index.js +1 -1
- package/dist/sdk.d.ts +182 -20
- package/dist/sdk.js +1 -1
- package/package.json +1 -3
- package/dist/chunk-2R5T6ZOX.js +0 -1
- package/dist/chunk-KBKZ27GY.js +0 -7
- package/dist/chunk-KZM3GLRL.js +0 -1
- package/dist/chunk-UY3JAQMB.js +0 -2
package/dist/browser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as createLazyBrowserApiProtocolClient}from'./chunk-
|
|
1
|
+
export{A as createLazyBrowserApiProtocolClient}from'./chunk-DFJWOEGQ.js';import'./chunk-RKZTPXBQ.js';import'./chunk-WOT6VMZA.js';
|
package/dist/chat-kit-pinia.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as pinia from 'pinia';
|
|
2
2
|
import { Pinia, Store } from 'pinia';
|
|
3
3
|
|
|
4
|
-
/**
|
|
4
|
+
/** 媒体业务类型:实现据此选对象存储逻辑桶;sticker 对应 app-sticker。 */
|
|
5
5
|
type MediaKind = 'image' | 'video' | 'voice' | 'file' | 'sticker';
|
|
6
6
|
|
|
7
7
|
/** 会话类型。P0 只用 direct / group。 */
|
|
@@ -1313,6 +1313,13 @@ interface ImLoginContext {
|
|
|
1313
1313
|
interface ImAuthIssue {
|
|
1314
1314
|
code: number;
|
|
1315
1315
|
reason: 'token_expired' | 'kicked' | 'banned' | 'unknown';
|
|
1316
|
+
/**
|
|
1317
|
+
* 服务端记录的账号上次登录时间(毫秒时间戳),用于宿主提示「你的账号于某时在其他设备登录」。
|
|
1318
|
+
*
|
|
1319
|
+
* 只有登录被拒的被踢路径(CMLoginAck.nLastLoginTime)能拿到该时间;运行期收到
|
|
1320
|
+
* CM_KICKOUT_NOTIFICATION 时协议不带时间,此处为 undefined,由宿主自行决定如何展示。
|
|
1321
|
+
*/
|
|
1322
|
+
lastLoginTime?: number;
|
|
1316
1323
|
}
|
|
1317
1324
|
interface ImAuthProvider {
|
|
1318
1325
|
/** 返回登录上下文;返回 null 表示当前不可登录(缺凭据)。 */
|
|
@@ -1645,6 +1652,45 @@ interface ImProfilePort {
|
|
|
1645
1652
|
clearCache?: () => void;
|
|
1646
1653
|
}
|
|
1647
1654
|
|
|
1655
|
+
/** 会话收藏可展示的内容类型;与 iOS `isSupportCollectionMsgType` 对齐。 */
|
|
1656
|
+
type ImSessionFavoriteKind = 'text' | 'image' | 'video' | 'voice' | 'location' | 'file';
|
|
1657
|
+
/** 服务端一条会话收藏快照;列表以 HTTP 为准,不回写原消息。 */
|
|
1658
|
+
interface ImSessionFavoriteItem$1 {
|
|
1659
|
+
readonly collectId: string;
|
|
1660
|
+
readonly msgId: string;
|
|
1661
|
+
readonly kind: ImSessionFavoriteKind;
|
|
1662
|
+
readonly senderId: string;
|
|
1663
|
+
readonly senderName: string;
|
|
1664
|
+
readonly avatarUrl: string;
|
|
1665
|
+
readonly createdAt: string;
|
|
1666
|
+
readonly text: string;
|
|
1667
|
+
readonly imageUrl: string;
|
|
1668
|
+
readonly fileName: string;
|
|
1669
|
+
readonly body: Readonly<Record<string, unknown>>;
|
|
1670
|
+
readonly conversation: ConversationRef | null;
|
|
1671
|
+
}
|
|
1672
|
+
/** 把一条会话消息写成收藏快照时所需的已校验字段。 */
|
|
1673
|
+
interface ImSessionFavoriteWriteInput {
|
|
1674
|
+
readonly messageId: string;
|
|
1675
|
+
readonly conversation: ConversationRef;
|
|
1676
|
+
readonly senderId: string;
|
|
1677
|
+
readonly createdAt: number;
|
|
1678
|
+
readonly kind: ImSessionFavoriteKind;
|
|
1679
|
+
readonly plainBody: Readonly<Record<string, unknown>>;
|
|
1680
|
+
readonly peerId: string;
|
|
1681
|
+
readonly hide?: boolean;
|
|
1682
|
+
}
|
|
1683
|
+
/**
|
|
1684
|
+
* 会话收藏 HTTP 端口。
|
|
1685
|
+
*
|
|
1686
|
+
* Browser adapter 负责 `/user/favorite/*`、收藏 TEA 和 DTO 映射;Core 不持有收藏列表副本。
|
|
1687
|
+
*/
|
|
1688
|
+
interface ImSessionFavoritePort {
|
|
1689
|
+
list: () => Promise<readonly ImSessionFavoriteItem$1[]>;
|
|
1690
|
+
add: (input: ImSessionFavoriteWriteInput) => Promise<ImSessionFavoriteItem$1>;
|
|
1691
|
+
delete: (collectIds: readonly string[]) => Promise<void>;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1648
1694
|
/** 迁移期存储会话入参;新代码使用 ref,string 仅兼容唯一命中的旧调用。 */
|
|
1649
1695
|
type ImStorageConversation = ConversationRef | string;
|
|
1650
1696
|
/** 打开账号库的选项。namespace = 账号隔离键(登录 userId)。 */
|
|
@@ -2063,6 +2109,10 @@ type ImEvent = {
|
|
|
2063
2109
|
| {
|
|
2064
2110
|
type: 'application:updated';
|
|
2065
2111
|
application: ApplicationUpdate;
|
|
2112
|
+
}
|
|
2113
|
+
/** 其它端改了会话收藏;权威列表必须重新拉 HTTP,不携带收藏正文。 */
|
|
2114
|
+
| {
|
|
2115
|
+
type: 'session-favorites:changed';
|
|
2066
2116
|
} | {
|
|
2067
2117
|
type: 'sync:complete';
|
|
2068
2118
|
conversations: ConversationRef[];
|
|
@@ -2442,20 +2492,69 @@ interface MembershipJoinResult {
|
|
|
2442
2492
|
outcome: MembershipJoinOutcome;
|
|
2443
2493
|
}
|
|
2444
2494
|
|
|
2445
|
-
/**
|
|
2446
|
-
interface
|
|
2495
|
+
/** 服务端按逻辑桶签发的 S3 临时上传凭证(已归一为 SDK 合同字段)。 */
|
|
2496
|
+
interface MediaUploadCredentials {
|
|
2497
|
+
/** STS access key id(服务端字段 `access_key_id`)。 */
|
|
2498
|
+
accessKeyId: string;
|
|
2499
|
+
/** STS secret access key(服务端字段 `secret_key`)。 */
|
|
2500
|
+
secretAccessKey: string;
|
|
2501
|
+
/** STS session token(服务端字段 `session_token`)。 */
|
|
2502
|
+
sessionToken: string;
|
|
2503
|
+
/** 服务端声明的过期时间(Unix 秒);缺省时该凭证只受 SDK 本地 TTL 约束。 */
|
|
2504
|
+
expiresAtSeconds?: number;
|
|
2505
|
+
/** 服务端解析出的**物理桶**名,可能与申请用的逻辑桶名不同;PutObject 必须用它。 */
|
|
2447
2506
|
bucket: string;
|
|
2448
|
-
|
|
2507
|
+
/** 物理桶所在区域,决定上传端点;不再从身份池 id 前缀推断。 */
|
|
2508
|
+
region: string;
|
|
2509
|
+
/** 对象 key 前缀;STS 策略只允许写该前缀下的对象,SDK 生成的 key 必须以它开头。 */
|
|
2510
|
+
keyPrefix?: string;
|
|
2511
|
+
/** 公开访问域名(已归一为带 scheme、无尾斜杠);写进消息体的媒体 URL 以它为准。 */
|
|
2512
|
+
dnsPoint: string;
|
|
2513
|
+
/** 服务端身份标识;SDK 不使用,仅原样透出供宿主排查。 */
|
|
2514
|
+
identityId?: string;
|
|
2515
|
+
}
|
|
2516
|
+
/** SDK 向宿主申请凭证时给出的上下文。 */
|
|
2517
|
+
interface MediaUploadCredentialsRequest {
|
|
2518
|
+
/** 宿主 env 配置的**逻辑桶名**;宿主原样提交给自己的 BFF。 */
|
|
2519
|
+
bucket: string;
|
|
2520
|
+
/** true 表示 SDK 判定旧凭证不可用(上传被拒或已过期),宿主必须真的重新请求,不得返回自己的缓存。 */
|
|
2521
|
+
forceRefresh: boolean;
|
|
2449
2522
|
}
|
|
2523
|
+
/**
|
|
2524
|
+
* 宿主注入的取凭证函数:按逻辑桶名向宿主自己的 BFF 申请一次 STS 临时凭证。
|
|
2525
|
+
*
|
|
2526
|
+
* @remarks 这里刻意不带 `AbortSignal`:同一逻辑桶的并发上传会共用同一次在途请求,
|
|
2527
|
+
* 单个上传被取消不应连带中止其它上传正在等待的凭证。宿主实现应当是「打一次接口」的纯函数,
|
|
2528
|
+
* 缓存、TTL、单飞与失败重签由 SDK 负责。
|
|
2529
|
+
*/
|
|
2530
|
+
type MediaUploadCredentialsProvider = (request: MediaUploadCredentialsRequest) => Promise<MediaUploadCredentials>;
|
|
2531
|
+
|
|
2450
2532
|
interface MediaTransferAdapterConfig {
|
|
2451
|
-
/**
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2533
|
+
/**
|
|
2534
|
+
* 按**逻辑桶名**申请 S3 临时上传凭证;由宿主实现(打自己的 BFF),SDK 不硬编码接口路径与前缀。
|
|
2535
|
+
* 缓存、TTL、同桶单飞与失败重签由本 adapter 负责,宿主实现应当是「打一次接口」的纯函数。
|
|
2536
|
+
*/
|
|
2537
|
+
getUploadCredentials: MediaUploadCredentialsProvider;
|
|
2538
|
+
/** 各媒体类型的**逻辑桶名**(宿主 env 配置,如 image→app-image);物理桶以服务端回包为准。 */
|
|
2539
|
+
buckets: Record<MediaKind, string>;
|
|
2540
|
+
/**
|
|
2541
|
+
* CHANNEL(社群)会话按媒体类型覆盖的逻辑桶名;未覆盖的类型继续使用 `buckets`。
|
|
2542
|
+
* iOS 与 prod H5 都为社群媒体准备了独立桶,但对「社群文件是否也走社群桶」结论相反,
|
|
2543
|
+
* 因此这里只提供按类型覆盖的机制,由部署配置决定覆盖哪些类型。
|
|
2544
|
+
*/
|
|
2545
|
+
channelBuckets?: Partial<Record<MediaKind, string>>;
|
|
2546
|
+
/** 群、社群与用户头像使用的独立 app-header 逻辑桶名;不得复用聊天图片桶。 */
|
|
2547
|
+
avatarBucket?: string;
|
|
2548
|
+
/** 是否启用 S3 Transfer Acceleration(默认 true;`cn-` 分区没有加速端点,会强制关闭)。 */
|
|
2458
2549
|
useAccelerateEndpoint?: boolean;
|
|
2550
|
+
/**
|
|
2551
|
+
* 是否允许超过分片阈值(16MiB)的上传使用 S3 分片上传(默认 true)。
|
|
2552
|
+
*
|
|
2553
|
+
* 分片相比单次 PUT 需要各物理桶的 CORS 额外放行 POST(Create/CompleteMultipartUpload)、
|
|
2554
|
+
* DELETE(AbortMultipartUpload)并 `ExposeHeaders: ETag`;未配齐时分片会直接失败。
|
|
2555
|
+
* 部署可置 false 立即退回全量单次 PutObject(大文件回到单连接与整包内存的旧行为),无需发版。
|
|
2556
|
+
*/
|
|
2557
|
+
multipartUpload?: boolean;
|
|
2459
2558
|
/**
|
|
2460
2559
|
* 媒体发送阶段的并发上限;由 im-core 消费,adapter 本身仍只负责单个上传任务。
|
|
2461
2560
|
* 缺省为 4,允许 1-6;高并发会提高吞吐,也会增加文件加密的内存峰值。
|
|
@@ -4719,12 +4818,16 @@ interface ImProductEventMap {
|
|
|
4719
4818
|
'application:updated': Readonly<{
|
|
4720
4819
|
application: ImProductApplicationUpdate;
|
|
4721
4820
|
}>;
|
|
4821
|
+
/** 其它端改了会话收藏;权威列表必须重新拉 HTTP。 */
|
|
4822
|
+
'session-favorites:changed': Readonly<Record<never, never>>;
|
|
4722
4823
|
'sync:complete': Readonly<{
|
|
4723
4824
|
conversations: readonly ConversationRef<ProductConversationListType>[];
|
|
4724
4825
|
}>;
|
|
4826
|
+
/** `lastLoginTime` 为服务端记录的上次登录时间(毫秒),仅被踢且走登录 ACK 的路径才有值。 */
|
|
4725
4827
|
'auth:invalid': Readonly<{
|
|
4726
4828
|
code: string;
|
|
4727
4829
|
reason: ImProductAuthInvalidReason;
|
|
4830
|
+
lastLoginTime?: number;
|
|
4728
4831
|
}>;
|
|
4729
4832
|
'error': Readonly<{
|
|
4730
4833
|
error: ImProductEventError;
|
|
@@ -5010,6 +5113,25 @@ interface ImSearchApi {
|
|
|
5010
5113
|
readonly messages: ImMessageSearchApi;
|
|
5011
5114
|
}
|
|
5012
5115
|
|
|
5116
|
+
/**
|
|
5117
|
+
* 会话收藏稳定产品门面。
|
|
5118
|
+
*
|
|
5119
|
+
* 本模块不缓存服务端列表;每次 list/add/delete 都以当前账号 provider 为准。
|
|
5120
|
+
* 收藏快照与原聊天消息解耦:原消息删除、撤回或编辑不会回写收藏。
|
|
5121
|
+
*/
|
|
5122
|
+
|
|
5123
|
+
type ImSessionFavoriteItem = Readonly<ImSessionFavoriteItem$1>;
|
|
5124
|
+
/** 产品层会话收藏 API。 */
|
|
5125
|
+
interface ImSessionFavoritesApi {
|
|
5126
|
+
list: () => Promise<readonly ImSessionFavoriteItem[]>;
|
|
5127
|
+
addFromMessage: (input: {
|
|
5128
|
+
message: ImMessageView;
|
|
5129
|
+
conversation: ConversationRef;
|
|
5130
|
+
selfId: string;
|
|
5131
|
+
}) => Promise<ImSessionFavoriteItem>;
|
|
5132
|
+
delete: (collectIds: readonly string[]) => Promise<void>;
|
|
5133
|
+
}
|
|
5134
|
+
|
|
5013
5135
|
/**
|
|
5014
5136
|
* 当前账号的 IM 本地偏好产品域。
|
|
5015
5137
|
*
|
|
@@ -5064,12 +5186,20 @@ interface ImSettingsApi {
|
|
|
5064
5186
|
}
|
|
5065
5187
|
|
|
5066
5188
|
/**
|
|
5067
|
-
* 媒体对象存储(S3)配置:由宿主注入的**部署基建配置**,SDK
|
|
5068
|
-
*
|
|
5069
|
-
*
|
|
5070
|
-
*
|
|
5071
|
-
*
|
|
5072
|
-
*
|
|
5189
|
+
* 媒体对象存储(S3)配置:由宿主注入的**部署基建配置**,SDK 不硬编码逻辑桶名,也不硬编码取凭证的接口路径。
|
|
5190
|
+
*
|
|
5191
|
+
* 形状 = im-browser `MediaTransferAdapterConfig`:必填 `getUploadCredentials`(按逻辑桶名向宿主自己的 BFF 申请
|
|
5192
|
+
* STS 临时凭证)+ 各 `MediaKind`(image/video/voice/file/sticker)的**逻辑桶名** + 可选 `channelBuckets`(社群会话
|
|
5193
|
+
* 按类型覆盖)、`avatarBucket`、`useAccelerateEndpoint`、`multipartUpload`、`maxConcurrentUploads`。
|
|
5194
|
+
*
|
|
5195
|
+
* 上传凭证由业务后端按登录态签发(与 iOS、prod H5 同一个接口),回包同时给出**物理桶**、区域、`key_prefix` 和
|
|
5196
|
+
* 公开访问域名;SDK 据此拼 object key 与消息体 URL,宿主 env 里配的只是申请凭证用的逻辑桶名。凭证缓存(本地
|
|
5197
|
+
* 1 小时、按服务端过期时间提前 5 分钟失效)、同桶单飞与失败重签由 SDK 负责,宿主只需提供「打一次接口」的纯函数。
|
|
5198
|
+
*
|
|
5199
|
+
* ⚠ 各 bucket 需在对象存储侧配置 CORS 允许本站 origin 的 PUT + GET;超过 16MiB 的上传走 S3 分片,另需放行
|
|
5200
|
+
* POST(Create/CompleteMultipartUpload)、DELETE(AbortMultipartUpload)并 ExposeHeaders: ETag。CORS 未配齐时
|
|
5201
|
+
* 可用 `multipartUpload: false` 退回全量单次 PutObject。
|
|
5202
|
+
* ⚠ 并发字段只由 SDK core 的媒体编排消费;adapter 会忽略该字段。高内存设备可设置 5-6,低内存设备建议 2-3。
|
|
5073
5203
|
*/
|
|
5074
5204
|
type ImMediaConfig = MediaTransferAdapterConfig;
|
|
5075
5205
|
/**
|
|
@@ -5235,6 +5365,8 @@ interface ImAdvancedClientOptions extends ImClientOptions {
|
|
|
5235
5365
|
coreClient?: ApiProtocolClient;
|
|
5236
5366
|
/** 高级/测试入口可注入端口替身;default 始终使用 Browser adapter。 */
|
|
5237
5367
|
expressionProvider?: ImExpressionPort;
|
|
5368
|
+
/** 高级/测试入口可注入会话收藏端口替身;default 始终使用 Browser adapter。 */
|
|
5369
|
+
sessionFavoriteProvider?: ImSessionFavoritePort;
|
|
5238
5370
|
}
|
|
5239
5371
|
/** 产品级账号与连接生命周期;adapter、transport 和连接状态机原子不进入该接口。 */
|
|
5240
5372
|
interface ImSessionApi {
|
|
@@ -5510,6 +5642,7 @@ interface ImProductClient {
|
|
|
5510
5642
|
readonly channels: ImChannelsApi;
|
|
5511
5643
|
readonly applications: ImApplicationsApi;
|
|
5512
5644
|
readonly expressions: ImExpressionsApi;
|
|
5645
|
+
readonly sessionFavorites: ImSessionFavoritesApi;
|
|
5513
5646
|
readonly outbox: ImOutboxApi;
|
|
5514
5647
|
readonly drafts: ImDraftsApi;
|
|
5515
5648
|
readonly search: ImSearchApi;
|
|
@@ -6086,7 +6219,7 @@ type ImPinnedMessageActionResult = Readonly<{
|
|
|
6086
6219
|
}>;
|
|
6087
6220
|
|
|
6088
6221
|
type ConversationCapabilityAction = 'conversation.openProfile' | 'conversation.readHistory' | 'conversation.listPreferences' | 'composer.send' | 'composer.mentionAll' | 'profile.edit' | 'relationship.manage' | 'members.view' | 'members.manage' | 'members.invite' | 'members.remove' | 'members.setAdmin' | 'ownership.transfer' | 'conversation.leave' | 'channel.manageMute' | 'channel.setMemberPrivateChat' | 'channel.dismiss';
|
|
6089
|
-
type MessageCapabilityAction = 'message.reply' | 'message.recall' | 'message.edit' | 'message.pin' | 'message.unpin' | 'message.deleteLocal' | 'message.deleteForEveryone' | 'message.forward' | 'message.multiSelect';
|
|
6222
|
+
type MessageCapabilityAction = 'message.reply' | 'message.recall' | 'message.edit' | 'message.pin' | 'message.unpin' | 'message.deleteLocal' | 'message.deleteForEveryone' | 'message.forward' | 'message.favorite' | 'message.multiSelect';
|
|
6090
6223
|
type MemberTargetCapabilityAction = 'members.removeTarget' | 'members.editNicknameTarget' | 'members.setAdminTarget' | 'members.unsetAdminTarget';
|
|
6091
6224
|
interface MemberTargetCapabilityInput {
|
|
6092
6225
|
snapshot: ConversationCapabilitySnapshot;
|
|
@@ -7945,6 +8078,47 @@ type ImSearchOperationResult = Readonly<{
|
|
|
7945
8078
|
/** 取得当前 Vue setup 或显式 Pinia 的搜索 Store;不同宿主实例不会共享查询或定位状态。 */
|
|
7946
8079
|
declare function useImSearchStore(pinia?: Pinia): any;
|
|
7947
8080
|
|
|
8081
|
+
/**
|
|
8082
|
+
* 为 PC/H5 提供同一套会话收藏列表和已收藏标记。
|
|
8083
|
+
*
|
|
8084
|
+
* 【状态来源】
|
|
8085
|
+
* `items` 始终来自 SDK `client.sessionFavorites.list()`。4633 产品事件只唤醒重拉,不从通知拼造条目。
|
|
8086
|
+
* 已收藏标记由当前列表按 `msgId → collectId` 派生,不写回 ImMessage。
|
|
8087
|
+
*
|
|
8088
|
+
* 【明确不负责】
|
|
8089
|
+
* 页面、预览、Toast、路由和 i18n 属于宿主;HTTP、收藏 TEA 和协议通知属于 SDK。
|
|
8090
|
+
*/
|
|
8091
|
+
|
|
8092
|
+
type ImSessionFavoritesStoreError = Readonly<Pick<ImSdkErrorShape, 'code' | 'category' | 'operation' | 'retryable'>>;
|
|
8093
|
+
type ImSessionFavoritesReloadResult = Readonly<{
|
|
8094
|
+
ok: true;
|
|
8095
|
+
operation: 'reload';
|
|
8096
|
+
} | {
|
|
8097
|
+
ok: false;
|
|
8098
|
+
operation: 'reload';
|
|
8099
|
+
reason: 'stale';
|
|
8100
|
+
} | {
|
|
8101
|
+
ok: false;
|
|
8102
|
+
operation: 'reload';
|
|
8103
|
+
reason: 'failed';
|
|
8104
|
+
error: ImSessionFavoritesStoreError;
|
|
8105
|
+
}>;
|
|
8106
|
+
type ImSessionFavoritesWriteResult = Readonly<{
|
|
8107
|
+
ok: true;
|
|
8108
|
+
operation: 'add' | 'delete';
|
|
8109
|
+
collectId: string;
|
|
8110
|
+
} | {
|
|
8111
|
+
ok: false;
|
|
8112
|
+
operation: 'add' | 'delete';
|
|
8113
|
+
reason: 'stale';
|
|
8114
|
+
} | {
|
|
8115
|
+
ok: false;
|
|
8116
|
+
operation: 'add' | 'delete';
|
|
8117
|
+
reason: 'failed';
|
|
8118
|
+
error: ImSessionFavoritesStoreError;
|
|
8119
|
+
}>;
|
|
8120
|
+
declare function useImSessionFavoritesStore(pinia?: Pinia): any;
|
|
8121
|
+
|
|
7948
8122
|
/** 页面可展示的 IM 启动阶段:空闲、恢复本机数据、联网、可用、失败或永久销毁。 */
|
|
7949
8123
|
type ImSessionPhase = 'idle' | 'preparing' | 'connecting' | 'ready' | 'error' | 'disposed';
|
|
7950
8124
|
/** 宿主每次登录、退出或切账号时交给 `applySession` 的完整输入。 */
|
|
@@ -8146,5 +8320,5 @@ type ImThreadStore = Store<'k2-im-thread', ImThreadStoreState, Record<string, ne
|
|
|
8146
8320
|
/** 取得当前 Vue setup 或显式 Pinia 的消息线程 Store;每个实例只管理一个当前会话。 */
|
|
8147
8321
|
declare function useImThreadStore(pinia?: Pinia): ImThreadStore;
|
|
8148
8322
|
|
|
8149
|
-
export { applicationKey, createAndInstallImChatKit, createImChatKitContext, disposeImChatKit, ensureImChatKitSelfProfile, getImChatKitContext, installImChatKit, useImApplicationsStore, useImCapabilitiesStore, useImComposerStore, useImConversationActivationCoordinator, useImConversationDeletionCoordinator, useImConversationListStore, useImExpressionStore, useImHistoryReturnAfterSendCoordinator, useImMediaStore, useImMessageOperationsStore, useImProfileDirectoryStore, useImQuotedMessageStore, useImReactionStore, useImSearchStore, useImSessionStore, useImThreadPagingStore, useImThreadReturnToLatestCoordinator, useImThreadStore };
|
|
8150
|
-
export type { ApplyImSessionInput, ChatRuntimeFactories, ChatRuntimeHostDeps, ImApplicationDomainCounts, ImApplicationReviewOperation, ImApplicationReviewResult, ImApplicationsReloadResult, ImApplicationsStoreError, ImCapabilitiesStore, ImChannelManagementMemberTarget, ImChannelMemberManagementOperation, ImChannelMemberManagementResult, ImChannelMemberManagementResultFor, ImChannelProfileActionResult, ImChannelProfileActionResultFor, ImChannelProfileOperation, ImChatKitContext, ImChatKitInstallation, ImComposerStore, ImComposerStoreActions, ImComposerStoreState, ImComposerSubmitResult, ImConversationActivationCoordinator, ImConversationActivationError, ImConversationActivationResult, ImConversationDeletionCoordinator, ImConversationDeletionError, ImConversationDeletionResult, ImConversationListActionError, ImConversationListMutationOperation, ImConversationListMutationResult, ImConversationListRefreshResult, ImConversationListStore, ImDirectContactActionResult, ImDirectContactActionResultFor, ImDirectContactOperation, ImDirectoryState, ImEmojiPanelRecentEntry, ImEmojiRecentEntry, ImExpressionLoadStatus, ImExpressionOperation, ImExpressionOperationResult, ImExpressionRecentPersistencePort, ImExpressionRecentPersistenceSnapshot, ImExpressionRecentViewItem, ImExpressionResetOptions, ImExpressionSendResult, ImExpressionStore, ImExpressionStoreActions, ImExpressionStoreError, ImExpressionStoreGetters, ImExpressionStoreState, ImForwardPreparationResult, ImGameRecentEntry, ImGroupMemberManagementOperation, ImGroupMemberManagementResult, ImGroupMemberManagementResultFor, ImGroupProfileActionResult, ImGroupProfileActionResultFor, ImGroupProfileOperation, ImHistoryReturnAfterSendCoordinator, ImHistoryReturnError, ImHistoryReturnExecution, ImHistoryReturnResult, ImMediaOperationResult, ImMediaReplacementRequest, ImMediaStoreError, ImMediaTaskPresentation, ImMembershipJoinActionResult, ImMembershipJoinOperation, ImMessageOperationsStore, ImMessageOperationsStoreActions, ImMessageOperationsStoreState, ImMessageSelectionResult, ImPersistedEmojiPanelRecentEntry, ImPersistedEmojiRecentEntry, ImPersistedExpressionAssetRecentEntry, ImPersistedGameRecentEntry, ImProfileAccessDestination, ImProfileAccessResult, ImProfileDirectoryResult, ImQuotedMessageState, ImQuotedMessageStore, ImQuotedMessageStoreActions, ImQuotedMessageStoreState, ImReactionOperationResult, ImReactionStore, ImReactionStoreActions, ImReactionStoreError, ImReactionStoreState, ImSearchOperationResult, ImSessionPhase, ImSessionStore, ImThreadPagingActions, ImThreadPagingState, ImThreadPagingStore, ImThreadReturnToLatestCoordinator, ImThreadStore, ImThreadStoreActions, ImThreadStoreState };
|
|
8323
|
+
export { applicationKey, createAndInstallImChatKit, createImChatKitContext, disposeImChatKit, ensureImChatKitSelfProfile, getImChatKitContext, installImChatKit, useImApplicationsStore, useImCapabilitiesStore, useImComposerStore, useImConversationActivationCoordinator, useImConversationDeletionCoordinator, useImConversationListStore, useImExpressionStore, useImHistoryReturnAfterSendCoordinator, useImMediaStore, useImMessageOperationsStore, useImProfileDirectoryStore, useImQuotedMessageStore, useImReactionStore, useImSearchStore, useImSessionFavoritesStore, useImSessionStore, useImThreadPagingStore, useImThreadReturnToLatestCoordinator, useImThreadStore };
|
|
8324
|
+
export type { ApplyImSessionInput, ChatRuntimeFactories, ChatRuntimeHostDeps, ImApplicationDomainCounts, ImApplicationReviewOperation, ImApplicationReviewResult, ImApplicationsReloadResult, ImApplicationsStoreError, ImCapabilitiesStore, ImChannelManagementMemberTarget, ImChannelMemberManagementOperation, ImChannelMemberManagementResult, ImChannelMemberManagementResultFor, ImChannelProfileActionResult, ImChannelProfileActionResultFor, ImChannelProfileOperation, ImChatKitContext, ImChatKitInstallation, ImComposerStore, ImComposerStoreActions, ImComposerStoreState, ImComposerSubmitResult, ImConversationActivationCoordinator, ImConversationActivationError, ImConversationActivationResult, ImConversationDeletionCoordinator, ImConversationDeletionError, ImConversationDeletionResult, ImConversationListActionError, ImConversationListMutationOperation, ImConversationListMutationResult, ImConversationListRefreshResult, ImConversationListStore, ImDirectContactActionResult, ImDirectContactActionResultFor, ImDirectContactOperation, ImDirectoryState, ImEmojiPanelRecentEntry, ImEmojiRecentEntry, ImExpressionLoadStatus, ImExpressionOperation, ImExpressionOperationResult, ImExpressionRecentPersistencePort, ImExpressionRecentPersistenceSnapshot, ImExpressionRecentViewItem, ImExpressionResetOptions, ImExpressionSendResult, ImExpressionStore, ImExpressionStoreActions, ImExpressionStoreError, ImExpressionStoreGetters, ImExpressionStoreState, ImForwardPreparationResult, ImGameRecentEntry, ImGroupMemberManagementOperation, ImGroupMemberManagementResult, ImGroupMemberManagementResultFor, ImGroupProfileActionResult, ImGroupProfileActionResultFor, ImGroupProfileOperation, ImHistoryReturnAfterSendCoordinator, ImHistoryReturnError, ImHistoryReturnExecution, ImHistoryReturnResult, ImMediaOperationResult, ImMediaReplacementRequest, ImMediaStoreError, ImMediaTaskPresentation, ImMembershipJoinActionResult, ImMembershipJoinOperation, ImMessageOperationsStore, ImMessageOperationsStoreActions, ImMessageOperationsStoreState, ImMessageSelectionResult, ImPersistedEmojiPanelRecentEntry, ImPersistedEmojiRecentEntry, ImPersistedExpressionAssetRecentEntry, ImPersistedGameRecentEntry, ImProfileAccessDestination, ImProfileAccessResult, ImProfileDirectoryResult, ImQuotedMessageState, ImQuotedMessageStore, ImQuotedMessageStoreActions, ImQuotedMessageStoreState, ImReactionOperationResult, ImReactionStore, ImReactionStoreActions, ImReactionStoreError, ImReactionStoreState, ImSearchOperationResult, ImSessionFavoritesReloadResult, ImSessionFavoritesStoreError, ImSessionFavoritesWriteResult, ImSessionPhase, ImSessionStore, ImThreadPagingActions, ImThreadPagingState, ImThreadPagingStore, ImThreadReturnToLatestCoordinator, ImThreadStore, ImThreadStoreActions, ImThreadStoreState };
|