1 | import { Action } from '../Action';
|
2 | import { ActionMetadataArgs } from './args/ActionMetadataArgs';
|
3 | import { ActionType } from './types/ActionType';
|
4 | import { ClassTransformOptions } from 'class-transformer';
|
5 | import { ControllerMetadata } from './ControllerMetadata';
|
6 | import { InterceptorMetadata } from './InterceptorMetadata';
|
7 | import { ParamMetadata } from './ParamMetadata';
|
8 | import { ResponseHandlerMetadata } from './ResponseHandleMetadata';
|
9 | import { HandlerOptions } from '../decorator-options/HandlerOptions';
|
10 | import { RoutingControllersOptions } from '../RoutingControllersOptions';
|
11 | import { UseMetadata } from './UseMetadata';
|
12 |
|
13 |
|
14 |
|
15 | export declare class ActionMetadata {
|
16 | private globalOptions;
|
17 | |
18 |
|
19 |
|
20 | controllerMetadata: ControllerMetadata;
|
21 | |
22 |
|
23 |
|
24 | params: ParamMetadata[];
|
25 | |
26 |
|
27 |
|
28 | uses: UseMetadata[];
|
29 | |
30 |
|
31 |
|
32 | interceptors: InterceptorMetadata[];
|
33 | |
34 |
|
35 |
|
36 | target: Function;
|
37 | |
38 |
|
39 |
|
40 | method: string;
|
41 | |
42 |
|
43 |
|
44 | options: HandlerOptions;
|
45 | |
46 |
|
47 |
|
48 |
|
49 | type: ActionType;
|
50 | |
51 |
|
52 |
|
53 | route: string | RegExp;
|
54 | |
55 |
|
56 |
|
57 | fullRoute: string | RegExp;
|
58 | |
59 |
|
60 |
|
61 | isBodyUsed: boolean;
|
62 | |
63 |
|
64 |
|
65 | isFileUsed: boolean;
|
66 | |
67 |
|
68 |
|
69 | isFilesUsed: boolean;
|
70 | |
71 |
|
72 |
|
73 | isJsonTyped: boolean;
|
74 | |
75 |
|
76 |
|
77 | isAuthorizedUsed: boolean;
|
78 | |
79 |
|
80 |
|
81 | responseClassTransformOptions: ClassTransformOptions;
|
82 | |
83 |
|
84 |
|
85 | undefinedResultCode: number | Function;
|
86 | |
87 |
|
88 |
|
89 | nullResultCode: number | Function;
|
90 | |
91 |
|
92 |
|
93 | successHttpCode: number;
|
94 | |
95 |
|
96 |
|
97 | redirect: string;
|
98 | |
99 |
|
100 |
|
101 | renderedTemplate: string;
|
102 | |
103 |
|
104 |
|
105 | headers: {
|
106 | [name: string]: any;
|
107 | };
|
108 | |
109 |
|
110 |
|
111 | bodyExtraOptions: any;
|
112 | |
113 |
|
114 |
|
115 | authorizedRoles: any[];
|
116 | |
117 |
|
118 |
|
119 | appendParams?: (action: Action) => any[];
|
120 | |
121 |
|
122 |
|
123 | methodOverride?: (actionMetadata: ActionMetadata, action: Action, params: any[]) => Promise<any> | any;
|
124 | constructor(controllerMetadata: ControllerMetadata, args: ActionMetadataArgs, globalOptions: RoutingControllersOptions);
|
125 | /**
|
126 | * Appends base route to a given regexp route.
|
127 | */
|
128 | static appendBaseRoute(baseRoute: string, route: RegExp | string): string | RegExp;
|
129 | /**
|
130 | * Builds everything action metadata needs.
|
131 | * Action metadata can be used only after its build.
|
132 | */
|
133 | build(responseHandlers: ResponseHandlerMetadata[]): void;
|
134 | /**
|
135 | * Calls action method.
|
136 | * Action method is an action defined in a user controller.
|
137 | */
|
138 | callMethod(params: any[], action: Action): any;
|
139 | /**
|
140 | * Builds full action route.
|
141 | */
|
142 | private buildFullRoute;
|
143 | /**
|
144 | * Builds action response headers.
|
145 | */
|
146 | private buildHeaders;
|
147 | }
|