import "reflect-metadata"; import express, { NextFunction, Request, Response } from "express"; import { ParameterConfiguration } from "./decorators/Request"; import { Config } from "../configs/config"; import { IAccessApi, ICallback } from "./authorization"; import "./authorization/RoleAndPermissions/roleAndPermission.controller"; import { Controller } from "./decorators/interfaces/controler"; import { WinstonService } from "./loggers/winston/winstonService"; interface IConfigApp { middlwareAuthExtend?: ICallback; logDocApi?: boolean; } declare class HttpException extends Error { statusCode: number; message: string; constructor(statusCode: number, message: string); } export declare const expressApp: typeof express; export declare class Application { readonly config: Config; app: any; logger: WinstonService; private info; constructor(config: Config); inital(): void; errorHandler: (error: HttpException, request: Request, response: Response, next: NextFunction) => void; generateRole(configRole: any): Promise; generatePermisson(roleName: any, api: IAccessApi): Promise; publishDocApi(): void; /** * * @param req Request of express * @param res Response of express * @param next Next function of express * @param paramConfigs Parameters * @param handlerName The name of the handler * @param controller The controller */ apiHandler(req: Request, res: Response, next: NextFunction, paramConfigs: ParameterConfiguration[], handlerName: string, controller: Controller): void; onExit(): void; runRouter(callback: ICallback | null): void; runScheduler(): void; handleOnExist(): Promise; run(config: IConfigApp): Promise; } export {};