import { CloudConfig, FunConfig } from '../../types'; export interface ThemeValue { /** * 主题值范围类型 */ rangeType: 'blank' | 'bool' | 'enum'; /** * 主题值类型 */ type: string; /** * 主题值初始化 */ value: { initialize: string; }; } export interface GlobalConfig { /** * 背景配置 */ background: string; /** * 字体颜色配置 */ fontColor: string; /** * 主题色配置 */ themeColor: string; } export interface IoTPublicConfig { /** * 背景图片配置项 */ background?: ThemeValue; /** * @deprecated IoT 平台配置的云定时和跳转链接,请使用 bic 字段 */ cloud?: CloudConfig; /** * 和设备功能点相关的配置项 */ dps?: any; /** * 字体颜色配置项 */ fontColor?: ThemeValue; /** * 全局配置项 */ global: GlobalConfig; /** * 主题配置,暗色或亮色系 */ theme: 'default' | 'light'; /** * 主题色配置项 */ themeColor?: ThemeValue; /** * 主题图片配置项 */ themeImage?: ThemeValue; /** * 子 UI ID,只有公版面板支持 */ subUiId?: string; /** * 界面配置最近更新时间 */ timestamp?: number; /** * 其他配置项 */ other?: Record; } /** * 从云端返回的面板配置 */ export type PanelConfig = { cloudDp: { cloud: CloudConfig; subUiId: string; }; powerCode: FunConfig; uiContent?: IoTPublicConfig; }; /** * 从 App 返回的缓存的面板配置 */ export type AppPanelConfig = { config: PanelConfig; }; export interface Config { /** * 是否初始化完毕 */ initialized: boolean; /** * IoT 的产品配置信息,仅公版面板支持 */ iot: IoTPublicConfig; /** * IoT 的功能配置信息 */ fun: FunConfig; /** * IoT 平台配置的云定时和跳转链接 */ bic: CloudConfig; /** * 小程序主题配置数据 */ themeInfo: Record; }