@xpert-ai/chatkit-types 0.0.5 → 0.0.7

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/index.d.ts CHANGED
@@ -231,6 +231,10 @@ export declare interface ChatkitMessage {
231
231
  }
232
232
 
233
233
  export declare type ChatKitOptions = {
234
+ /**
235
+ * ChatKit iframe URL for web component integrations.
236
+ */
237
+ frameUrl?: string;
234
238
  api: CustomApiConfig | HostedApiConfig;
235
239
  /**
236
240
  * Locale override for ChatKit UI. If not provided, the browser's locale
@@ -658,22 +662,22 @@ export declare type FileUploadStrategy = {
658
662
  };
659
663
 
660
664
  /**
661
- * Playground 复制的配置中过滤出允许的配置项
665
+ * Filter out only the allowed options from a Playground config
662
666
  *
663
- * @param options - playground 复制的完整配置
664
- * @returns 只包含白名单配置项的对象
667
+ * @param options - Full config copied from the playground
668
+ * @returns An object containing only whitelisted options
665
669
  *
666
670
  * @example
667
671
  * ```ts
668
- * // playground 复制的配置
672
+ * // Config copied from the playground
669
673
  * const playgroundConfig = {
670
674
  * theme: { colorScheme: 'light', radius: 'pill' },
671
- * threadItemActions: { feedback: true }, // 会被过滤掉
675
+ * threadItemActions: { feedback: true }, // will be filtered out
672
676
  * startScreen: { greeting: 'Hello!' },
673
677
  * };
674
678
  *
675
679
  * const filtered = filterPlaygroundOptions(playgroundConfig);
676
- * // 结果: { theme: { colorScheme: 'light', radius: 'pill' }, startScreen: { greeting: 'Hello!' } }
680
+ * // Result: { theme: { colorScheme: 'light', radius: 'pill' }, startScreen: { greeting: 'Hello!' } }
677
681
  * ```
678
682
  */
679
683
  export declare function filterPlaygroundOptions<T extends Partial<ChatKitOptions>>(options: T): PlaygroundAllowedOptions;
@@ -850,28 +854,28 @@ export declare type Markdown = {
850
854
  };
851
855
 
852
856
  /**
853
- * 合并 Playground 配置与本地配置
854
- * Playground 配置会覆盖本地配置中的对应项(只限白名单内的配置)
857
+ * Merge Playground config with local config
858
+ * Playground config overrides matching items in local config (whitelist only)
855
859
  *
856
- * @param localOptions - 本地项目中的基础配置(可包含 onClientTool, header 等)
857
- * @param playgroundOptions - playground 复制的配置
858
- * @returns 合并后的配置
860
+ * @param localOptions - Base config in the local project (can include onClientTool, header, etc.)
861
+ * @param playgroundOptions - Config copied from the playground
862
+ * @returns Merged config
859
863
  *
860
864
  * @example
861
865
  * ```ts
862
866
  * const localConfig = {
863
867
  * api: { getClientSecret: async () => '...' },
864
- * onClientTool: async () => { ... }, // 保留
865
- * header: { enabled: true }, // 保留
868
+ * onClientTool: async () => { ... }, // kept
869
+ * header: { enabled: true }, // kept
866
870
  * };
867
871
  *
868
872
  * const playgroundConfig = {
869
873
  * theme: { colorScheme: 'dark' },
870
- * threadItemActions: { feedback: true }, // 被过滤
874
+ * threadItemActions: { feedback: true }, // filtered out
871
875
  * };
872
876
  *
873
877
  * const merged = mergeWithPlaygroundOptions(localConfig, playgroundConfig);
874
- * // 结果: { api, onClientTool, header, theme }
878
+ * // Result: { api, onClientTool, header, theme }
875
879
  * ```
876
880
  */
877
881
  export declare function mergeWithPlaygroundOptions<T extends Partial<ChatKitOptions>>(localOptions: T, playgroundOptions: Partial<ChatKitOptions>): T & PlaygroundAllowedOptions;
@@ -903,11 +907,11 @@ export declare type ModelOption = {
903
907
  };
904
908
 
905
909
  /**
906
- * Playground 配置白名单 - 只允许这些配置项从 playground 复制过来生效
907
- * 过滤掉: locale, initialThread, header, history, threadItemActions, disclaimer, entities, widgets, onClientTool
910
+ * Playground configuration whitelist - only allow these options to take effect when copied from the playground
911
+ * Filters out: locale, initialThread, header, history, threadItemActions, disclaimer, entities, widgets, onClientTool
908
912
  */
909
913
  /**
910
- * 允许从 Playground 配置的选项类型
914
+ * Options allowed to be configured from Playground
911
915
  */
912
916
  export declare type PlaygroundAllowedOptions = {
913
917
  api?: ChatKitOptions['api'];