import { LocalFile } from "./core/LocalFile.js"; import { WrappedRequest, WrappedResponse } from "./core/Wrapped.js"; import { ServiceProvider } from "@entity-access/entity-access/dist/di/di.js"; import { IClassOf } from "@entity-access/entity-access/dist/decorators/IClassOf.js"; import { OutgoingHttpHeaders } from "http"; import Content, { IContent, Redirect } from "./Content.js"; export declare const isPage: unique symbol; export interface IRouteCheck { scope: ServiceProvider; method: string; current: string; path: string[]; route: { [key: string]: string; }; request: WrappedRequest; } export interface IFormData { fields: { [key: string]: string; }; files: LocalFile[]; } /** * Page should not contain any reference to underlying request/response objects. */ export default abstract class Page { static [isPage]: boolean; /** * This static method determines if the path can be handled by this page or not. * @param pageContext page related items * @returns true if it can handle the path, default is true */ static canHandle(pageContext: IRouteCheck): boolean | Promise; request: WrappedRequest; response: WrappedResponse; route: { [key: string]: string; }; maxUploadSize: number; get query(): TQuery; get body(): TInput; get form(): import("./core/Wrapped.js").IFormData; get sessionUser(): import("./core/SessionUser.js").SessionUser; get url(): string; get method(): string; get headers(): import("node:http").IncomingHttpHeaders | (import("node:http").IncomingHttpHeaders & import("node:http2").IncomingHttpHeaders); signal: AbortSignal; currentPath: string[]; childPath: string[]; filePath: string; cacheControl: string; disposables: Disposable[]; private formDataPromise; constructor(); abstract run(): Content | Promise; resolve(c: IClassOf): T; reportError(error: any): void; protected registerDisposable(d: Disposable | AsyncDisposable): void; protected content(h: IContent): Content; protected content(body: string, status?: number, contentType?: string, headers?: OutgoingHttpHeaders): Content; protected json(o: any, indent?: number, headers?: OutgoingHttpHeaders): Content; protected redirect(location: string, { status, headers }?: { status?: number; headers?: any; }): Redirect; protected notFound(suppressLog?: boolean): Content | Promise; protected serverError(error: any, status?: number): Content | Promise; } //# sourceMappingURL=Page.d.ts.map