import { Action } from './Action'; import { BaseDriver } from './driver/BaseDriver'; import { ActionMetadata } from './metadata/ActionMetadata'; import { InterceptorMetadata } from './metadata/InterceptorMetadata'; import { RoutingControllersOptions } from './RoutingControllersOptions'; import { Newable } from './types/Types'; /** * Registers controllers and middlewares in the given server framework. */ export declare class RoutingControllers { private driver; private options; /** * Used to check and handle controller action parameters. */ private parameterHandler; /** * Used to build metadata objects for controllers and middlewares. */ private metadataBuilder; /** * Global interceptors run on each controller action. */ private interceptors; constructor(driver: T, options: RoutingControllersOptions); /** * Initializes the things driver needs before routes and middleware registration. */ initialize(options: RoutingControllersOptions): Promise; /** * Registers all given interceptors. */ registerInterceptors(classes?: Newable[]): this; /** * Registers all given controllers and actions from those controllers. */ registerControllers(classes?: Newable[]): Promise; /** * Registers post-execution middlewares in the driver. */ registerMiddlewares(type: 'before' | 'after', classes?: Newable[]): this; /** * Executes given controller action. */ protected executeAction(actionMetadata: ActionMetadata, action: Action, interceptorFns: Newable[]): Promise; /** * Handles result of the action method execution. */ protected handleCallMethodResult(result: any, action: ActionMetadata, options: Action, interceptorFns: any[]): any; /** * Creates interceptors from the given "use interceptors". */ protected prepareInterceptors(uses: InterceptorMetadata[]): any[]; }