import { ApiResponse } from "@gongt/ts-stl-library/request/protocol"; import { ErrorResponse } from "@gongt/ts-stl-library/request/request-error"; import { Router } from "express-serve-static-core"; import { RequestContext } from "./base/context"; import { ExpressHandler } from "./base/handler"; import { AssignFunction, AssignObjectFunction, MultiValueResponseWrapper } from "./base/response-wrapper"; export declare type ViewSettings = { success: string; failed: string; }; export declare class WebpageHandler extends ExpressHandler> { private defaultView; protected instanceContext(req: any, res: any): WebpageRequestContext; registerRouter(route: Router): void; setDefaultView(view: string, error?: string): void; } export declare class WebpageRequestContext extends RequestContext { assign: AssignFunction; assignObject: AssignObjectFunction; readonly defaultView: ViewSettings; readonly response: WebpageResponseWrapper; constructor(req: any, res: any, defaultView: ViewSettings); protected createResponseWrapper(): WebpageResponseWrapper; render(view?: string): void; } export declare class WebpageResponseWrapper extends MultiValueResponseWrapper { private context; private view; protected result: ResType & ApiResponse | ErrorResponse; constructor(res: any, context: WebpageRequestContext); render(view?: string): void; protected asyncResolve(res: ResType): void; protected asyncReject(error: any): void; protected _send(): void; }