/** * CURVED Protocol Mapping — Shared Spec Behaviour Rules * * Maps CURVED operations (Create, Update, Retrieve, Validate, Evolve, Delete) * to HTTP protocol details. Single source of truth used by: * - generators (at build time to emit static route code) * - @specverse/runtime (at render time for API calls) * - app-demo (at request time for dynamic routing) */ /** * CURVED operations supported by SpecVerse */ export type CURVEDOperation = 'create' | 'update' | 'retrieve' | 'retrieve_many' | 'validate' | 'evolve' | 'delete'; /** * Protocol mapping for a CURVED operation */ export interface ProtocolMapping { method: string; pathPattern: string; } /** * Default CURVED → HTTP protocol mapping. * Maps semantic CRUD operations to REST endpoints. */ export declare const CURVED_PROTOCOL_MAPPING: Record; /** * Infer HTTP method from operation name. */ export declare function inferHttpMethod(operation: string): string; /** * Infer canonical relative path from operation name. * Returns path relative to the resource base (e.g., /, /:id, /:id/evolve). */ export declare function inferPath(operation: string): string; /** * Derive REST base path from model name. * E.g., "Post" → "/api/posts", "Category" → "/api/categories" */ export declare function deriveBasePath(modelName: string): string; /** * Derived endpoint from a CURVED operation */ export interface DerivedEndpoint { operation: string; method: string; path: string; } /** * Convert CURED operations object to endpoint list. */ export declare function curedToEndpoints(cured: Record): DerivedEndpoint[]; //# sourceMappingURL=curved-protocol.d.ts.map