UNPKG

cs-element

Version:

Advanced reactive data management library with state machines, blueprints, persistence, compression, networking, and multithreading support

77 lines 2.67 kB
import { IBlueprint, BlueprintType, BlueprintCategory, BlueprintParameter, BlueprintParameterGroup, BlueprintMetadata, BlueprintGenerationContext, BlueprintGenerationResult } from '../types/blueprint-interfaces'; /** * Базовая реализация шаблона */ export declare class Blueprint implements IBlueprint { readonly id: string; readonly name: string; readonly description: string; readonly type: BlueprintType; readonly category: BlueprintCategory; readonly version: string; readonly metadata: BlueprintMetadata; readonly parameterGroups: BlueprintParameterGroup[]; private readonly generator; constructor(config: { id: string; name: string; description: string; type: BlueprintType; category: BlueprintCategory; version?: string; metadata?: BlueprintMetadata; parameterGroups?: BlueprintParameterGroup[]; generator: (context: BlueprintGenerationContext) => Promise<BlueprintGenerationResult>; }); /** * Получение всех параметров в плоском списке */ get parameters(): BlueprintParameter[]; /** * Валидация параметров */ validateParameters(parameters: Record<string, any>): { valid: boolean; errors: Array<{ parameter: string; message: string; }>; warnings: Array<{ parameter: string; message: string; }>; }; /** * Валидация типа параметра */ private validateParameterType; /** * Валидация значения параметра */ private validateParameterValue; /** * Получение значений параметров по умолчанию */ getDefaultParameters(): Record<string, any>; /** * Генерация структуры на основе параметров */ generate(context: BlueprintGenerationContext): Promise<BlueprintGenerationResult>; /** * Предварительный просмотр структуры */ preview(parameters: Record<string, any>): Promise<{ structure: string; elementCount: number; estimatedSize: number; }>; /** * Генерация текстового представления структуры */ private generateStructureText; /** * Клонирование шаблона с модификациями */ clone(modifications?: Partial<IBlueprint>): IBlueprint; } //# sourceMappingURL=Blueprint.d.ts.map