1 | import { Action } from './Action';
|
2 | import { BaseDriver } from './driver/BaseDriver';
|
3 | import { ActionMetadata } from './metadata/ActionMetadata';
|
4 | import { InterceptorMetadata } from './metadata/InterceptorMetadata';
|
5 | import { RoutingControllersOptions } from './RoutingControllersOptions';
|
6 |
|
7 |
|
8 |
|
9 | export declare class RoutingControllers<T extends BaseDriver> {
|
10 | private driver;
|
11 | private options;
|
12 | |
13 |
|
14 |
|
15 | private parameterHandler;
|
16 | |
17 |
|
18 |
|
19 | private metadataBuilder;
|
20 | |
21 |
|
22 |
|
23 | private interceptors;
|
24 | constructor(driver: T, options: RoutingControllersOptions);
|
25 | /**
|
26 | * Initializes the things driver needs before routes and middleware registration.
|
27 | */
|
28 | initialize(): this;
|
29 | /**
|
30 | * Registers all given interceptors.
|
31 | */
|
32 | registerInterceptors(classes?: Function[]): this;
|
33 | /**
|
34 | * Registers all given controllers and actions from those controllers.
|
35 | */
|
36 | registerControllers(classes?: Function[]): this;
|
37 | /**
|
38 | * Registers post-execution middlewares in the driver.
|
39 | */
|
40 | registerMiddlewares(type: 'before' | 'after', classes?: Function[]): this;
|
41 | /**
|
42 | * Executes given controller action.
|
43 | */
|
44 | protected executeAction(actionMetadata: ActionMetadata, action: Action, interceptorFns: Function[]): Promise<any>;
|
45 | /**
|
46 | * Handles result of the action method execution.
|
47 | */
|
48 | protected handleCallMethodResult(result: any, action: ActionMetadata, options: Action, interceptorFns: Function[]): any;
|
49 | /**
|
50 | * Creates interceptors from the given "use interceptors".
|
51 | */
|
52 | protected prepareInterceptors(uses: InterceptorMetadata[]): Function[];
|
53 | }
|