import type { FormSchema, FormComponent } from '../FormBuilder/types/FormSchema'; /** * Parser configuration interface */ export interface ParserConfig { strict: boolean; maxInputSize: number; defaultTextType: 'textbox' | 'textarea'; inferTypeFromValue: boolean; generateIds: boolean; includeMetadata: boolean; customTypeMap?: Record; validateUnknownFields?: boolean; } /** * Format detection result */ export interface FormatDetectionResult { format: 'json-schema' | 'surveyjs' | 'openapi' | 'data-inference' | 'configured-schema' | 'unknown'; confidence: 'high' | 'medium' | 'low'; hints: string[]; ambiguousFormats?: string[]; } /** * Parse result with metadata */ export interface ParseResult { success: boolean; schema: FormSchema | null; errors: string[]; warnings: string[]; metadata: { detectedFormat: string; confidence: 'high' | 'medium' | 'low'; sourceHints: string[]; }; } /** * Validation result interface */ export interface ValidationResult { valid: boolean; errors?: string[]; warnings?: string[]; } /** * Parse result with components and warnings */ export interface ParseComponentsResult { components: FormComponent[]; warnings: string[]; } /** * ==================== UNIVERSAL JSON PARSER CLASS ==================== */ export declare class UniversalJsonParser { private config; constructor(customConfig?: Partial); parse(input: string | any): ParseResult; private formatError; private detectFormat; private hasExampleFields; private isDataInferenceCandidate; private inferComponentType; private inferTypeFromValue; private matchFieldNamePattern; private parseJsonSchema; private flattenNestedProperties; private collectFlattenedFieldNames; private parseSurveyJS; private createComponentFromSurveyJS; private mapSurveyJSType; private parseOpenAPI; private parseDataInference; private createComponent; private parseDateFromValue; private formatDate; private formatDateTimeValue; private mapJsonSchemaType; private generateComponentId; private humanizeFieldName; } /** * Validates JSON syntax */ export declare const validateJSON: (jsonString: string) => ValidationResult; /** * Validates the structure of a FormSchema object */ export declare const validateFormSchema: (schema: any) => ValidationResult; /** * Sanitizes and normalizes a form schema * Adds default values for missing optional properties */ export declare const sanitizeFormSchema: (schema: any) => FormSchema; /** * Exports a FormSchema to formatted JSON string */ export declare const exportFormSchema: (schema: FormSchema) => string;