declare interface AIAppMetadata { /** * * 豆包应用 ID * */ appId: string; /** * 应用名称 */ name?: string; /** * 应用描述 */ description?: string; /** * 应用图标 * * 1x, 2x, 3x 分别对应 1x, 2x, 3x 倍的图标 */ icons?: Icons; /** * 应用关键词 */ keywords?: string[]; /** * 应用版本 */ version?: string; } declare type AIPageMetadata = Omit; declare type AIWidgetMetadata = { /** * The widget unique identifier */ id: string; /** * widget name */ name?: string; /** * Describe the characteristics of widget */ description?: string; /** * Widget box type in Chat UI */ boxType?: 'inbox' | 'full_box'; /** * Whether add widget border */ border?: boolean; /** * Keywords of things */ keywords?: string[]; /** * Icons */ icons?: Icons; /** * Set extra widget properties */ prop?: string; /** * Widget title type * - none: 默认,无标题 * - normal: 常规标题 * - float: 浮动标题 */ titleType?: 'none' | 'normal' | 'float'; }; declare interface BaseDefinition { /** * Unique identifier */ id: string; /** * Basic name */ name?: string; /** * Describe the characteristics of things */ description?: string; } /** * 目前 BaseModuleDefinition 用于 Manifest 中的 Applet、Widget、Page 模块 */ declare interface BaseModuleDefinition extends BaseDefinition { /** * Keywords of things */ keywords?: string[]; /** * Icons */ icons?: Icons; /** * Used to check widget is corrected for this package */ digest: string; /** * The applet/widget properties, Used to define some limits for user */ prop?: string; } export declare type DefineAppConfig = (config: DoubaoAppsAppConfig) => DoubaoAppsAppConfig; export declare const defineAppConfig: (config: DoubaoAppsAppConfig) => DoubaoAppsMetaConfig; export declare type DefineConfig = (config: Config) => Config; export declare const defineConfig: (config: Config) => Config; export declare type DoubaoAppsAppConfig = DoubaoAppsMetaConfig; export declare interface DoubaoAppsBuildConfig { resolve?: { alias?: DoubaoAppsObject; [key: string]: unknown; }; /** * Configure source file compilation. */ source?: { include?: unknown; exclude?: unknown; define?: Record; alias?: DoubaoAppsObject; decorators?: unknown; [key: string]: unknown; }; experiments?: { /** * Taro experiment config. */ taro?: TaroPluginOptions; [key: string]: unknown; }; [key: string]: unknown; } export declare interface DoubaoAppsConfig extends DoubaoAppsBuildConfig { plugins?: DoubaoAppsPlugin[]; /** * Debug driver used to debug applet. */ debugDriver?: DoubaoAppsDebugDriverName; /** Skip ADB foreground app watcher. */ skipAdbForegroundAppWatch?: boolean; } export declare type DoubaoAppsDebugDriverName = 'adb' | 'hdt' | 'devtools'; export declare type DoubaoAppsLegacyEntryConfig = Record; export declare interface DoubaoAppsMetaConfig extends AIAppMetadata { /** * Page entries and page metadata. The first page is used as the home page. */ pages?: DoubaoAppsPageConfig; /** * Widget entries and widget metadata. */ widgets?: DoubaoAppsWidgetConfig; } export declare type DoubaoAppsObject = Record; export declare type DoubaoAppsPageConfig = DoubaoAppsPageEntryConfig[] | DoubaoAppsLegacyEntryConfig; export declare type DoubaoAppsPageEntryConfig = string | ({ entry: string; } & DoubaoAppsPageMetaConfig); export declare type DoubaoAppsPageMetaConfig = Omit & { /** * Page ID. Defaults to the entry directory name. * * @deprecated Page ID is not consumed by the platform. Prefer the generated default. */ id?: string; title?: string; /** * @deprecated Page description is not consumed by the platform. */ description?: string; /** * @deprecated Page keywords are not consumed by the platform. */ keywords?: string[]; /** * Whether this page should produce a Web bundle. */ web?: boolean; }; export declare interface DoubaoAppsPlugin { /** * Plugin name. */ name: string; setup: (api: any) => void | Promise; } export declare type DoubaoAppsWidgetConfig = DoubaoAppsWidgetEntryConfig[] | DoubaoAppsLegacyEntryConfig; export declare type DoubaoAppsWidgetEntryConfig = string | ({ entry: string; } & DoubaoAppsWidgetMetaConfig); export declare type DoubaoAppsWidgetMetaConfig = Omit & { /** * Widget ID. Defaults to the entry directory name. */ id?: string; name?: string; description?: string; boxType?: 'inbox' | 'full_box'; border?: boolean; keywords?: string[]; icons?: Icons; prop?: string; titleType?: 'none' | 'normal' | 'float'; /** * Whether this widget should produce a Web bundle. */ web?: boolean; }; export declare type Icons = string | Record<'1x' | '2x' | '3x', string>; declare interface PageDefinition extends UIModuleDefinition { /** * The page navbar title */ title?: string; /** * The page path */ path: string; } export declare interface TaroPluginOptions { /** * Doubao app name. */ name: string; /** * Doubao app ID. */ appId: string; /** * Doubao app icons. */ icons?: string; /** * Widget metadata config. */ widgets?: Record; } export declare type TaroWidgetOptions = Omit; declare interface UIModuleDefinition extends BaseModuleDefinition { /** * The applet/widget render type, used to choose the render engine */ renderType?: 'lynx'; /** * The view entry */ entry: string; /** * Web platform view metadata. */ web?: WebModuleDefinition; } export declare type UserConfig = DoubaoAppsConfig; declare interface WebModuleDefinition { /** * The Web bundle entry. */ entry: string; } export { }