import { n as RoutekitResponse, r as RoutekitResponseInit } from "../core-CzUCxvGk.mjs"; import { HttpStatus } from "@mpen/http"; //#region src/router/response/formats/content/content.d.ts /** * Create a represented `text/plain` response. * * @example * ```ts * return text('pong') * ``` * * @param value - Text response body. * @param init - Response status and headers. * @returns Routekit logical response with `Content-Type` set. */ declare function text(value: string): RoutekitResponse; declare function text(value: string, init: Omit): RoutekitResponse; declare function text(value: string, init: RoutekitResponseInit & { status: Status; }): RoutekitResponse; /** * Create a represented `text/html` response. * * @example * ```ts * return html('

Hello

') * ``` * * @param value - HTML response body. * @param init - Response status and headers. * @returns Routekit logical response with `Content-Type` set. */ declare function html(value: string): RoutekitResponse; declare function html(value: string, init: Omit): RoutekitResponse; declare function html(value: string, init: RoutekitResponseInit & { status: Status; }): RoutekitResponse; //#endregion //#region src/router/response/formats/content/bodyless.d.ts /** * Create an empty response with the provided status. * * @example * ```ts * return empty(HttpStatus.ACCEPTED) * ``` * * @param statusCode - HTTP status code to use. * @param init - Response headers. * @returns Routekit logical response with no body. */ declare function empty(statusCode?: Status, init?: Omit): RoutekitResponse; /** * Create a `204 No Content` response. * * @example * ```ts * return noContent() * ``` * * @returns Routekit logical response with no body. */ declare function noContent(): RoutekitResponse; /** * Create a redirect response. * * @example * ```ts * return redirect('/login') * ``` * * @param url - Redirect target URL. * @param statusCode - Redirect status code. Defaults to `302`. * @returns Routekit logical response with a `Location` header. */ declare function redirect(url: string, statusCode?: Status): RoutekitResponse; //#endregion export { empty, html, noContent, redirect, text };