/** * Spec Normalization — Shared Spec Behaviour Rules * * Converts spec data between formats: * - Array-format attributes/relationships/lifecycles → object format * - Lifecycle flow strings → states + transitions * - Array model references → single model string * * Single source of truth used by: * - generators (server-generator embeds normalized spec) * - @specverse/runtime (frontend consumes normalized schemas) * - app-demo (dynamic engine normalizes on load) */ /** * Parsed lifecycle flow result */ export interface LifecycleFlowResult { states: Array<{ name: string; }>; transitions: Array<{ from: string; to: string; }>; initialState: string; } /** * Parse a lifecycle flow string into states and transitions. * E.g., "draft -> open -> closed" → { states: [{name:"draft"}, ...], transitions: [{from:"draft",to:"open"}, ...] } */ export declare function parseLifecycleFlow(flow: string): LifecycleFlowResult; /** * Normalize spec data for consistent consumption. * * Converts: * - Array attributes → object keyed by name * - Array relationships → object keyed by name (with targetModel alias) * - Array lifecycles → object keyed by name * - Lifecycle flow strings → parsed states + transitions * - Array view.model → single string (first element) */ export declare function normalizeSpec(spec: any): any; //# sourceMappingURL=spec-normalization.d.ts.map