import { BodyparserOptions } from './bodyparser-options.js'; import { Application, HttpContext, HttpRequest, Middleware, NextHandler } from '@supercharge/contracts'; export declare class BodyparserMiddleware implements Middleware { /** * The application instance. */ protected readonly app: Application; /** * Create a new middleware instance. */ constructor(app: Application); /** * Returns the options determining how to serve assets. */ options(): BodyparserOptions; /** * Handle the incoming request. */ handle({ request }: HttpContext, next: NextHandler): Promise; /** * Determine whether to parse incoming request body. */ shouldParsePayload(request: HttpRequest): boolean; /** * Determine whether to parse incoming request body. */ hasConfiguredMethod(request: HttpRequest): boolean; /** * Parse incoming request body and return the result. */ parse(request: HttpRequest): Promise; /** * Determine whether the given `request` contains a JSON body. */ protected isJson(request: HttpRequest): boolean; /** * Returns the parsed JSON data. */ parseJson(request: HttpRequest): Promise; /** * Determine whether the given `request` contains a text body. */ protected isText(request: HttpRequest): boolean; /** * Returns the parsed text data. */ parseText(request: HttpRequest): Promise; /** * Determine whether the given `request` contains form-url-encoded data. */ protected isFormUrlEncoded(request: HttpRequest): boolean; /** * Returns the parsed form data. */ parseFormUrlEncoded(request: HttpRequest): Promise; /** * Determine whether the given `request` contains multipart data. */ protected isMultipart(request: HttpRequest): boolean; /** * Returns the parsed multipart data. */ parseMultipart(request: HttpRequest): Promise; /** * Returns the fields as an object and properties that are an * array with a single value are resolved to that value. */ private resolveMultipartFields; /** * Fetch the incoming data from the given `request`. */ collectBodyFrom(request: HttpRequest, options: { limit: number; }): Promise; }