import { Awaitable } from './utils/common-types.js'; import { Context } from './index.js'; export interface ContentType { /** The best content type _acceptable to the client_. */ type: T; } export interface ContentLanguage { /** The best language _acceptable to the client_. */ language: T; } export interface ContentEncoding { /** The best encoding _acceptable to the client_. */ encoding: T; } export interface Accepted { /** The request's `Content-Type` header iff acceptable to this endpoint */ accepted: T; } export interface AcceptedLanguage { /** The request's `Language` header if (and only if) accepted by this endpoint */ acceptedLanguage: T; } export interface AcceptedEncoding { /** The request's `Encoding` header if (and only if) accepted by this endpoint */ acceptedEncoding: T; } /** * Performs content negotiation over the content type of the response. * @param types The content types _provided_ by this endpoint. */ export declare function contentTypes(types: TS): (ax: Awaitable) => Promise>; /** * Performs content negotiation over the content language of the response. * @param languages The languages _provided_ by this endpoint. */ export declare function contentLanguages(languages: TS): (ax: Awaitable) => Promise>; /** * Performs content negotiation over the content encoding of the response. * @param encodings The encodings _provided_ by this endpoint. */ export declare function contentEncodings(encodings: TS): (ax: Awaitable) => Promise>; export { contentTypes as provides, contentLanguages as providesLanguages, contentEncodings as providesEncodings, }; /** * Determines if a request body content type is _acceptable_ to this endpoint. * @param types The content types _acceptable_ to this endpoint. */ export declare function accepts(types: TS): (ax: Awaitable) => Promise>; /** * Determines if a request body content language is _acceptable_ to this endpoint. * @param languages The languages (of the request body) _acceptable_ to this endpoint. */ export declare function acceptsLanguages(languages: TS): (ax: Awaitable) => Promise>; /** * Determines if a request body content encoding is _acceptable_ to this endpoint. * @param encodings The body encodings _acceptable_ to this endpoint. */ export declare function acceptsEncodings(encodings: TS): (ax: Awaitable) => Promise>;