/** * DSL Parser * * Cung cấp các hàm để phân tích DSL từ các file JSON */ import { ComponentSchema } from '../types'; /** * Interface cho DSL của module */ export interface ModuleDSL { applicationInfo: { name: string; createAt: number; createBy: string; applicationId: string; applicationType: number; }; applicationDSL: { ui: { compType: string; comp: { io?: { inputs?: Array<{ name: string; description: string; type: string; defaultValue: any; test: any; }>; outputs?: Array<{ name: string; value: string; }>; }; methods?: Array<{ name: string; action: any; }>; events?: { enableEventTestMessage: boolean; }; container: { layout: Record; items: Record; }; containerSize?: { height: number; width: number; }; }; }; queries?: Array; refTree?: any; hooks?: Array; settings?: any; preload?: any; }; } /** * Phân tích DSL từ file JSON thành component schema * * @param dsl DSL của module * @returns ComponentSchema */ export declare function parseDSLToSchema(dsl: ModuleDSL): ComponentSchema; /** * Phân tích file DSL từ đường dẫn * * @param filePath Đường dẫn đến file DSL * @param fs FileSystem * @returns Promise */ export declare function parseDSLFileToSchema(filePath: string, fs: any): Promise; /** * Phân tích nhiều file DSL từ đường dẫn * * @param filePaths Mảng đường dẫn đến các file DSL * @param fs FileSystem * @returns Promise */ export declare function parseMultipleDSLFilesToSchemas(filePaths: string[], fs: any): Promise;