import type { HttpContext } from '@adonisjs/core/http'; import type { LucidRow } from '@adonisjs/lucid/types/model'; import type { Document, JsonApiQueryParams, Links, Meta } from './types.ts'; import { type JsonApiRegistry } from './registry.ts'; import type { LinkBuilder } from './links.ts'; export type Paginatorish = { all(): LucidRow[]; getMeta(): Record; total: number; perPage: number; currentPage: number; lastPage: number; }; /** * Builds JSON:API compound documents from Lucid rows, driven entirely by * Lucid's own metadata ($columnsDefinitions, $relationsDefinitions, * $preloaded) plus the parsed request parameters. */ export declare class DocumentBuilder { #private; constructor(registry: JsonApiRegistry, params: JsonApiQueryParams, links: LinkBuilder, ctx?: HttpContext); build(input: LucidRow | LucidRow[] | Paginatorish | null, extras?: { meta?: Meta; links?: Links; }): Document; }