/** * JSON Parser - converts JSON manifest to IR * * @module json/parser */ import { FieldConfig } from '../fields'; import { RelationConfig } from '../relations'; import { EntityIR, ProtectedIR, HooksIR } from '../entity'; import { ManifestIR } from '../manifest'; import { ExternalSourceConfig } from '../source'; import { FieldJSON, RelationJSON, EntityJSON, ManifestJSON, ExternalSourceJSON, ProtectedJSON, HooksJSON } from './types'; /** * Parse a JSON field definition to FieldConfig */ export declare function parseFieldJSON(field: FieldJSON): FieldConfig; /** * Parse a JSON relation definition to RelationConfig */ export declare function parseRelationJSON(relation: RelationJSON): RelationConfig; /** * Parse a JSON external source to ExternalSourceConfig */ export declare function parseExternalSourceJSON(source: ExternalSourceJSON): ExternalSourceConfig; /** * Parse a JSON protected option to ProtectedIR */ export declare function parseProtectedJSON(option?: ProtectedJSON): ProtectedIR; /** * Parse a JSON hooks option to HooksIR */ export declare function parseHooksJSON(option?: boolean | HooksJSON): HooksIR; /** * Parse a JSON entity definition to EntityIR */ export declare function parseEntityJSON(entity: EntityJSON): EntityIR; /** * Parse a JSON manifest to ManifestIR * * @param json - JSON manifest object or string * @returns Compiled ManifestIR * @throws Error if JSON is invalid or validation fails * * @example * ```typescript * const manifest = parseManifestJSON({ * entities: [ * { name: 'User', fields: { email: { type: 'text', email: true } } } * ], * database: { type: 'sqlite', file: './app.db' } * }) * ``` */ export declare function parseManifestJSON(json: ManifestJSON | string): ManifestIR; /** * Load manifest from a JSON file * * @param filePath - Path to JSON file * @returns Compiled ManifestIR */ export declare function loadManifestFromJSONFile(filePath: string): Promise; //# sourceMappingURL=parser.d.ts.map