1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | Object.defineProperty(exports, "__esModule", { value: true });
|
7 | exports.RestTags = exports.RestBindings = void 0;
|
8 | const core_1 = require("@loopback/core");
|
9 | const express_1 = require("@loopback/express");
|
10 |
|
11 |
|
12 |
|
13 | var RestBindings;
|
14 | (function (RestBindings) {
|
15 | |
16 |
|
17 |
|
18 | RestBindings.CONFIG = core_1.CoreBindings.APPLICATION_CONFIG.deepProperty('rest');
|
19 | |
20 |
|
21 |
|
22 | RestBindings.HOST = core_1.BindingKey.create('rest.host');
|
23 | |
24 |
|
25 |
|
26 | RestBindings.PORT = core_1.BindingKey.create('rest.port');
|
27 | |
28 |
|
29 |
|
30 | RestBindings.PATH = core_1.BindingKey.create('rest.path');
|
31 | |
32 |
|
33 |
|
34 | RestBindings.URL = core_1.BindingKey.create('rest.url');
|
35 | |
36 |
|
37 |
|
38 | RestBindings.PROTOCOL = core_1.BindingKey.create('rest.protocol');
|
39 | |
40 |
|
41 |
|
42 | RestBindings.HTTPS_OPTIONS = core_1.BindingKey.create('rest.httpsOptions');
|
43 | |
44 |
|
45 |
|
46 | RestBindings.SERVER = core_1.BindingKey.create('servers.RestServer');
|
47 | |
48 |
|
49 |
|
50 | RestBindings.BASE_PATH = core_1.BindingKey.create('rest.basePath');
|
51 | |
52 |
|
53 |
|
54 | RestBindings.HANDLER = core_1.BindingKey.create('rest.handler');
|
55 | |
56 |
|
57 |
|
58 | RestBindings.ROUTER = core_1.BindingKey.create('rest.router');
|
59 | RestBindings.ROUTER_OPTIONS = core_1.BindingKey.create('rest.router.options');
|
60 | |
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 | RestBindings.ERROR_WRITER_OPTIONS = core_1.BindingKey.create('rest.errorWriterOptions');
|
69 | |
70 |
|
71 |
|
72 | RestBindings.REQUEST_BODY_PARSER_OPTIONS = core_1.BindingKey.create('rest.requestBodyParserOptions');
|
73 | |
74 |
|
75 |
|
76 | RestBindings.REQUEST_BODY_PARSER = core_1.BindingKey.create('rest.requestBodyParser');
|
77 | function bodyParserBindingKey(parser) {
|
78 | return `${RestBindings.REQUEST_BODY_PARSER}.${parser}`;
|
79 | }
|
80 | |
81 |
|
82 |
|
83 | RestBindings.REQUEST_BODY_PARSER_JSON = core_1.BindingKey.create(bodyParserBindingKey('JsonBodyParser'));
|
84 | |
85 |
|
86 |
|
87 | RestBindings.REQUEST_BODY_PARSER_URLENCODED = core_1.BindingKey.create(bodyParserBindingKey('UrlEncodedBodyParser'));
|
88 | |
89 |
|
90 |
|
91 | RestBindings.REQUEST_BODY_PARSER_TEXT = core_1.BindingKey.create(bodyParserBindingKey('TextBodyParser'));
|
92 | |
93 |
|
94 |
|
95 | RestBindings.REQUEST_BODY_PARSER_RAW = core_1.BindingKey.create(bodyParserBindingKey('RawBodyParser'));
|
96 | |
97 |
|
98 |
|
99 | RestBindings.REQUEST_BODY_PARSER_STREAM = core_1.BindingKey.create(bodyParserBindingKey('StreamBodyParser'));
|
100 | |
101 |
|
102 |
|
103 | RestBindings.AJV_FACTORY = core_1.BindingKey.create(bodyParserBindingKey('rest.ajvFactory'));
|
104 | |
105 |
|
106 |
|
107 | RestBindings.API_SPEC = core_1.BindingKey.create('rest.apiSpec');
|
108 | |
109 |
|
110 |
|
111 | RestBindings.OPERATION_SPEC_CURRENT = core_1.BindingKey.create('rest.operationSpec.current');
|
112 | |
113 |
|
114 |
|
115 | RestBindings.SEQUENCE = core_1.BindingKey.create('rest.sequence');
|
116 | |
117 |
|
118 |
|
119 |
|
120 | RestBindings.INVOKE_MIDDLEWARE_SERVICE = core_1.BindingKey.create('rest.invokeMiddleware');
|
121 | |
122 |
|
123 |
|
124 | let SequenceActions;
|
125 | (function (SequenceActions) {
|
126 | |
127 |
|
128 |
|
129 | SequenceActions.INVOKE_MIDDLEWARE = core_1.BindingKey.create('rest.sequence.actions.invokeMiddleware');
|
130 | |
131 |
|
132 |
|
133 | SequenceActions.FIND_ROUTE = core_1.BindingKey.create('rest.sequence.actions.findRoute');
|
134 | |
135 |
|
136 |
|
137 | SequenceActions.PARSE_PARAMS = core_1.BindingKey.create('rest.sequence.actions.parseParams');
|
138 | |
139 |
|
140 |
|
141 | SequenceActions.INVOKE_METHOD = core_1.BindingKey.create('rest.sequence.actions.invokeMethod');
|
142 | |
143 |
|
144 |
|
145 | SequenceActions.LOG_ERROR = core_1.BindingKey.create('rest.sequence.actions.logError');
|
146 | |
147 |
|
148 |
|
149 | SequenceActions.SEND = core_1.BindingKey.create('rest.sequence.actions.send');
|
150 | |
151 |
|
152 |
|
153 | SequenceActions.REJECT = core_1.BindingKey.create('rest.sequence.actions.reject');
|
154 | })(SequenceActions = RestBindings.SequenceActions || (RestBindings.SequenceActions = {}));
|
155 | let Operation;
|
156 | (function (Operation) {
|
157 | Operation.ROUTE = core_1.BindingKey.create('rest.operation.route');
|
158 | Operation.PARAMS = core_1.BindingKey.create('rest.operation.params');
|
159 | Operation.RETURN_VALUE = core_1.BindingKey.create('rest.operation.returnValue');
|
160 | })(Operation = RestBindings.Operation || (RestBindings.Operation = {}));
|
161 | |
162 |
|
163 |
|
164 | let Http;
|
165 | (function (Http) {
|
166 | |
167 |
|
168 |
|
169 | Http.REQUEST = core_1.BindingKey.create('rest.http.request');
|
170 | |
171 |
|
172 |
|
173 | Http.RESPONSE = core_1.BindingKey.create('rest.http.response');
|
174 | |
175 |
|
176 |
|
177 | Http.CONTEXT = core_1.BindingKey.create('rest.http.request.context');
|
178 | })(Http = RestBindings.Http || (RestBindings.Http = {}));
|
179 | |
180 |
|
181 |
|
182 | RestBindings.ROUTES = 'routes';
|
183 | })(RestBindings || (exports.RestBindings = RestBindings = {}));
|
184 |
|
185 |
|
186 |
|
187 | var RestTags;
|
188 | (function (RestTags) {
|
189 | |
190 |
|
191 |
|
192 | RestTags.REST_ROUTE = 'restRoute';
|
193 | |
194 |
|
195 |
|
196 | RestTags.ROUTE_VERB = 'restRouteVerb';
|
197 | |
198 |
|
199 |
|
200 | RestTags.ROUTE_PATH = 'restRoutePath';
|
201 | |
202 |
|
203 |
|
204 | RestTags.CONTROLLER_ROUTE = 'controllerRoute';
|
205 | |
206 |
|
207 |
|
208 |
|
209 | RestTags.CONTROLLER_BINDING = 'controllerBinding';
|
210 | RestTags.AJV_KEYWORD = 'ajvKeyword';
|
211 | RestTags.AJV_FORMAT = 'ajvFormat';
|
212 | RestTags.REST_MIDDLEWARE_CHAIN = express_1.DEFAULT_MIDDLEWARE_CHAIN;
|
213 | |
214 |
|
215 |
|
216 | RestTags.ACTION_MIDDLEWARE_CHAIN = 'middlewareChain.rest.actions';
|
217 | })(RestTags || (exports.RestTags = RestTags = {}));
|
218 |
|
\ | No newline at end of file |