/** * Version History API Route Handler for Next.js * * Lists version metadata for one document. Snapshots are never included; use * the detail route to fetch one. * * 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/versions/[kind]/[slug]/[id]/route.ts * export { GET } from 'nextly/api/versions'; * ``` * * @module api/versions */ /** * Context object for dynamic route handlers. * Next.js 15+ requires params to be a Promise. */ interface RouteContext { params: Promise<{ kind: string; slug: string; id: string; }>; } /** * GET handler listing version metadata, newest-first. * * Path and query parameters are validated before the access gate so malformed * input fails fast. The gate then confirms the caller may read the live * document: history metadata (authors, timestamps, how often a document * changed) is itself disclosure, so it is restricted exactly as the document is. * * Rows carry only an author id as stored, so each is resolved to a display name * before returning. */ declare const GET: (request: Request, context: RouteContext) => Promise; export { GET };