import type { HttpContext } from '@adonisjs/core/http'; import type { NextFn } from '@adonisjs/core/types/http'; /** * JSON:API extensions (https://jsonapi.org/format/#extensions) this package * understands. The `ext` media type parameter is a semantic contract — a * server that does not support a requested extension must reject the * request rather than silently process the document without it. The Atomic * Operations extension will be registered here when implemented. */ export declare const SUPPORTED_EXTENSIONS: readonly string[]; /** * JSON:API content negotiation, per https://jsonapi.org/format/#content-negotiation-servers * * - 415 when the request Content-Type is the JSON:API media type with any * media type parameter other than ext/profile, or with an ext naming an * unsupported extension. * - 406 when the Accept header mentions the JSON:API media type and no * instance of it is acceptable (unparameterized, or parameterized only * with profile/supported ext). * * `profile` is always allowed through — the spec permits servers to ignore * profiles they do not recognize. */ export default class JsonApiNegotiationMiddleware { #private; constructor(supportedExtensions?: readonly string[]); handle(ctx: HttpContext, next: NextFn): unknown; }