import type { FastifyInstance } from 'fastify'; import type { SchemaRegistry } from '../schema/registry.js'; import type { DatabaseClient } from '../db/client.js'; import type { PermissionRegistry } from '../auth/permission-registry.js'; import type { HookRegistry } from '../hooks/registry.js'; import type { ServiceRegistry } from '../services/registry.js'; import type { EventBus } from '../events/bus.js'; import type { ResolvedModel } from '../schema/types.js'; import type { ScopeRegistry } from '../auth/scope-registry.js'; import type { ModuleConfig, PageDefinition, WidgetDefinitionMeta } from '@rangka/shared'; export interface RouteGeneratorOptions { permissionRegistry?: PermissionRegistry; hookRegistry?: HookRegistry; serviceRegistry?: ServiceRegistry; eventBus?: EventBus; scopeRegistry?: ScopeRegistry; config?: Record; pages?: Array<{ module: string; page: PageDefinition; }>; modules?: ModuleConfig[]; widgets?: WidgetDefinitionMeta[]; adapterRegistry?: import('../plugins/adapter-registry.js').AdapterRegistry; adapterCapabilities?: Record; } /** * Registers all REST routes for every model in the schema registry, * plus session and meta routes. */ export declare function generateRoutes(server: FastifyInstance, registry: SchemaRegistry, db: DatabaseClient, options?: RouteGeneratorOptions): void; /** Builds OpenAPI response schemas (200, 201, 400, 404, etc.) for a model's endpoints. */ export declare function buildOpenApiResponseSchemas(model: ResolvedModel): { list: { 200: { description: string; type: "object"; properties: { data: { type: "array"; items: import("./openapi-schema.js").JsonSchemaObject; }; meta: { type: "object"; properties: { total: { type: "integer"; }; page: { type: "integer"; }; limit: { type: "integer"; }; totalPages: { type: "integer"; }; }; }; }; }; }; get: { 200: { description: string; type: "object"; properties: { data: import("./openapi-schema.js").JsonSchemaObject; }; }; 404: { type: "object"; properties: { error: { type: "object"; properties: { code: { type: "string"; }; message: { type: "string"; }; }; }; }; }; }; create: { 201: { description: string; type: "object"; properties: { data: import("./openapi-schema.js").JsonSchemaObject; }; }; 400: { type: "object"; properties: { error: { type: "object"; properties: { code: { type: "string"; }; message: { type: "string"; }; }; }; }; }; }; update: { 200: { description: string; type: "object"; properties: { data: import("./openapi-schema.js").JsonSchemaObject; }; }; 404: { type: "object"; properties: { error: { type: "object"; properties: { code: { type: "string"; }; message: { type: "string"; }; }; }; }; }; }; delete: { 204: { description: string; type: "null"; }; 404: { type: "object"; properties: { error: { type: "object"; properties: { code: { type: "string"; }; message: { type: "string"; }; }; }; }; }; }; }; //# sourceMappingURL=route-generator.d.ts.map