/** * Components Detail API Route Handlers for Next.js * * These route handlers can be re-exported in your Next.js application to provide * individual component management endpoints at /api/field-groups/[slug]. * * Services are auto-initialized on first request using environment variables: * - DB_DIALECT: Database dialect ("postgresql" | "mysql" | "sqlite") * - DATABASE_URL: Database connection string * * @example * ```typescript * // In your Next.js app: app/api/field-groups/[slug]/route.ts * export { GET, PATCH, DELETE } from 'nextly/api/field-groups-detail'; * ``` * * @module api/field-groups-detail */ /** * Context object for dynamic route handlers. * Next.js 15+ requires params to be a Promise. */ interface RouteContext { params: Promise<{ slug: string; }>; } /** * GET handler for retrieving a single component by slug. * * Requires read-settings (or manage-settings), matching the dispatcher's * components authorization. */ declare const GET: (request: Request, context: RouteContext) => Promise; /** * PATCH handler for updating a component. * * Requires update-settings (or manage-settings), matching the dispatcher's * components authorization. The registry returns 403 (mapped to LOCKED in * `logContext`) if the component is locked (code-first components cannot be * modified via API). */ declare const PATCH: (request: Request, context: RouteContext) => Promise; /** * DELETE handler for removing a component. * * Requires delete-settings (or manage-settings), matching the dispatcher's * components authorization. The registry returns 403 if the component is * locked, or 409 if it is referenced by other entities. */ declare const DELETE: (request: Request, context: RouteContext) => Promise; export { DELETE, GET, PATCH };