/** * Single Version API Route Handler for Next.js * * Returns one version including its snapshot. * * 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]/[versionNo]/route.ts * export { GET } from 'nextly/api/versions-detail'; * ``` * * @module api/versions-detail */ /** * 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; versionNo: string; }>; } /** * GET handler returning one version with its snapshot. * * Both path parameters are validated before the access gate so malformed input * fails fast. The gate confirms the caller may read the live document (which is * what applies owner-only rules and status filtering), and the snapshot is then * passed through field-level read redaction — a stored snapshot must never * reveal a field a normal read would hide. */ declare const GET: (request: Request, context: RouteContext) => Promise; export { GET };