import { CookieJar } from '@redwoodjs/cookie-jar'; export declare class MiddlewareShortCircuit extends Error { mwResponse: MiddlewareResponse; constructor(body?: BodyInit | null, responseInit?: ResponseInit); } /** * This is actually a Response builder class * After setting all the required properties, we can call `build` to get a Web * API Response object */ export declare class MiddlewareResponse { cookies: CookieJar; headers: Headers; body: BodyInit | null | undefined; status: number; statusText: string | undefined; constructor(body?: BodyInit | null, init?: ResponseInit); static fromResponse: (res: Response) => MiddlewareResponse; /** * * Short circuit the middleware chain and return early. * This will skip all the remaining middleware and return the response immediately. * * @returns MiddlewareResponse */ shortCircuit: (body?: BodyInit | null, init?: ResponseInit) => never; /** * Skip the current middleware and move to the next one. * Careful: It creates a new Response, so any middleware that modifies the * response before the current one will be lost. * @returns MiddlewareResponse */ static next: () => MiddlewareResponse; /** * Return a MiddlewareResponse object that will redirect the client to the * specified location * * @returns MiddlewareResponse */ static redirect: (location: string, type?: "permanent" | "temporary") => MiddlewareResponse; isRedirect: () => boolean; toResponse: () => Response; } //# sourceMappingURL=MiddlewareResponse.d.ts.map