k2-im 0.1.55 → 0.1.57

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 CHANGED
@@ -1 +1 @@
1
- export{Va as canCopyImageToClipboard,Wa as copyImageToClipboard,C as createLazyBrowserApiProtocolClient}from'./chunk-KORCFTGX.js';import'./chunk-Q6TFPZMF.js';import'./chunk-WOT6VMZA.js';
1
+ export{Za as canCopyImageToClipboard,_a as copyImageToClipboard,C as createLazyBrowserApiProtocolClient}from'./chunk-46ARFR7U.js';import'./chunk-HQDLYL3K.js';import'./chunk-WOT6VMZA.js';
@@ -400,7 +400,7 @@ type ImRobotModule = ImRobotTextModule | ImRobotImageGroupModule | ImRobotCountd
400
400
  interface ImRobotCommand {
401
401
  menuName: string;
402
402
  menuId?: string;
403
- /** wire `msg_type`;`2` 表示打开小程序,其它走固定话术。第一期宿主可只展示。 */
403
+ /** wire `msg_type`。`2` 且带 appId、domain 时打开小程序,其它类型用 menuId 请求固定回复。 */
404
404
  messageType?: string;
405
405
  miniProgram?: {
406
406
  path?: string;
@@ -5928,6 +5928,44 @@ type ImRobotDirectoryScope = {
5928
5928
  /** `bound` 对齐 iOS 输入栏 `search_type=1`。 */
5929
5929
  filter?: 'bound';
5930
5930
  };
5931
+ /** 单个机器人的资料;字段缺失时不补默认文案或人数。 */
5932
+ interface ImRobotProfile {
5933
+ id: string;
5934
+ displayName: string;
5935
+ username?: string;
5936
+ avatarUrl?: string;
5937
+ developerName?: string;
5938
+ description?: string;
5939
+ userCount?: number;
5940
+ firstChat?: boolean;
5941
+ appId?: string;
5942
+ developerId?: string;
5943
+ appName?: string;
5944
+ domain?: string;
5945
+ suffixAddress?: string;
5946
+ h5Url?: string;
5947
+ dynamicHost?: boolean;
5948
+ }
5949
+ /** 机器人输入栏的一条指令。 */
5950
+ interface ImRobotChatMenuItem {
5951
+ id: string;
5952
+ name: string;
5953
+ kind: 'message' | 'app';
5954
+ requestsReply?: boolean;
5955
+ appId?: string;
5956
+ domain?: string;
5957
+ path?: string;
5958
+ }
5959
+ /** 请求某条发消息指令的固定回复。 */
5960
+ interface ImRobotMenuReplyInput {
5961
+ robotId: string;
5962
+ menuId: string;
5963
+ }
5964
+ /** 拉取机器人资料。`lang` 是旧端语言编号 1–5。 */
5965
+ interface ImRobotProfileInput {
5966
+ robotId: string;
5967
+ lang?: number;
5968
+ }
5931
5969
  /** 机器人目录项;只保留打开私聊和列表展示所需字段。 */
5932
5970
  interface ImRobotDirectoryItem {
5933
5971
  id: string;
@@ -5958,6 +5996,14 @@ interface ImRobotsApi {
5958
5996
  listNextPage: (pageToken: ImPageToken) => Promise<ImRobotDirectoryPage>;
5959
5997
  bindToConversation: (input: ImRobotConversationBindInput) => Promise<void>;
5960
5998
  unbindFromConversation: (input: ImRobotConversationBindInput) => Promise<void>;
5999
+ /** 读取机器人资料。未配置 coreApi 时显式失败。 */
6000
+ getProfile: (input: ImRobotProfileInput) => Promise<ImRobotProfile>;
6001
+ /** 确认用户开始与该机器人私聊。 */
6002
+ confirmChat: (robotId: string) => Promise<void>;
6003
+ /** 读取输入栏指令。没有指令时返回空列表。 */
6004
+ listChatMenus: (robotId: string) => Promise<readonly ImRobotChatMenuItem[]>;
6005
+ /** 请求发消息指令的固定回复。 */
6006
+ requestMenuReply: (input: ImRobotMenuReplyInput) => Promise<void>;
5961
6007
  }
5962
6008
 
5963
6009
  /**