/** * Singles API Route Handlers for Next.js * * These route handlers can be re-exported in your Next.js application to provide * Singles listing endpoints at /api/singles. * * 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/singles/route.ts * export { GET } from 'nextly/api/singles'; * ``` * * @module api/singles */ /** * GET handler for listing Singles with pagination and filters. * * Requires manage-settings, matching the dispatcher's `listSingles` * authorization — this lists Single definitions (builder surface), not * their published content. * * Query Parameters: * - source: Filter by source type ("code" | "ui" | "built-in") * - search: Search query for slug and labels * - limit: Maximum results (default: 50, becomes `meta.limit` in response) * - offset: Number of results to skip (default: 0, derives `page` in meta) * - page: 1-based page number. Alternative to `offset`; `offset` wins when * both are provided. * * Response: * - 200 OK: `{ "items": [...], "meta": { total, page, limit, totalPages, hasNext, hasPrev } }` * - On error: `application/problem+json` per spec §10.1. */ declare const GET: (request: Request) => Promise; export { GET };