import { Application } from "express"; import { Container } from "inversify"; import { ApiApp, ApiRequest, ApiResponse, AppConfig } from "ts-lambda-api"; /** * Simple console application that hosts an express HTTP * server. * * A request is mapped from the HTTP request to the ApiServer * event format, a ApiServer instance then processes the request. * The ApiServer response is mapped to a standard HTTP response and * returned to the express client. */ export declare class ApiConsoleApp extends ApiApp { private static readonly MAX_REQUEST_BODY_SIZE; private static readonly HTTP_METHODS_WITH_ENTITY; private static readonly APP_OPTIONS; protected readonly expressApp: Application; private server?; /** * Builds an new console app. * * If `appConfig` is not passed or the `serverLogger` property is missing, timestamps will be enabled for logger output. * * @param controllersPath - The path to the directory containing the API controllers. * @param appConfig - Optional configuration for the application. If not provided, default values will be used. * @param autoInjectionEnabled - Whether automatic dependency injection is enabled. Defaults to `true` if not provided. * @param appContainer - An optional container for managing dependencies. If not provided, a new one will be created. * You must ensure `autoInjectionEnabled` reflects your IOC config if you provide an instance here. */ constructor(controllersPath: string[], appConfig?: AppConfig, autoInjectionEnabled?: boolean, appContainer?: Container); run(request: ApiRequest, context: any): Promise; /** * Starts the express server. * * @param args Command line arguments for this server, see --help for more info. */ runServer(args: string[]): Promise; private configureServer; private configureSwaggerUi; stopServer(): Promise; private parseArguments; private handleHttpRequest; private mapRequestToApiEvent; private forwardApiResponse; }