@bepalo/spine 3.10.23 → 3.11.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generator.d.ts +2 -1
- package/dist/cjs/generator.d.ts.map +1 -1
- package/dist/cjs/generator.js +3 -3
- package/dist/cjs/generator.js.map +1 -1
- package/dist/cjs/router.d.ts +925 -84
- package/dist/cjs/router.d.ts.map +1 -1
- package/dist/cjs/router.js +910 -25
- package/dist/cjs/router.js.map +1 -1
- package/dist/cjs/types.d.ts +9 -8
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/generator.d.ts +2 -1
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js +3 -3
- package/dist/generator.js.map +1 -1
- package/dist/router.d.ts +925 -84
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +910 -25
- package/dist/router.js.map +1 -1
- package/dist/types.d.ts +9 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/router.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtractParams, type CTError, type EmptyRecord, type Handler, type HandlerType, type HttpMethod, type HttpMethodUpper, type MethodPath, type Path, type Pipe, type
|
|
1
|
+
import { ExtractParams, type CTError, type EmptyRecord, type Handler, type HandlerType, type HttpMethod, type HttpMethodUpper, type MethodPath, type Path, type Pipe, type RegisterPipelineOptions, type RespondContext, type RouterConfig, GenerateOpenApiInfo, GenerateOpenAPIOptions, GeneratedOpenApi, EndHandler, EndPipe, ErrorHandler, ErrorPipe } from "./types.ts";
|
|
2
2
|
import { CTParams } from "./parsers.ts";
|
|
3
3
|
export declare const EMPTY_PARAMS: Readonly<{}>;
|
|
4
4
|
export declare const PATH_PART_REGEX: RegExp;
|
|
@@ -25,9 +25,52 @@ export declare class Router<_ExtendContext extends Record<string, unknown> = Emp
|
|
|
25
25
|
after?: boolean | undefined;
|
|
26
26
|
catcher?: boolean | undefined;
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
get doNotStoreSetters(): boolean | undefined;
|
|
29
|
+
get setters(): {
|
|
30
|
+
handlerType: HandlerType;
|
|
31
|
+
methodPaths: MethodPath | Array<MethodPath>;
|
|
32
|
+
pipe: Handler<ExtendContext> | ErrorHandler<ExtendContext> | EndHandler<ExtendContext> | Pipe<ExtendContext> | ErrorPipe<ExtendContext> | EndPipe<ExtendContext>;
|
|
33
|
+
options?: RegisterPipelineOptions | RegisterPipelineOptions;
|
|
34
|
+
}[];
|
|
35
|
+
/**
|
|
36
|
+
* Create a new Router
|
|
37
|
+
*
|
|
38
|
+
* @param {RouterConfig<ExtendContext>} config Router configs
|
|
39
|
+
*/
|
|
40
|
+
constructor(config: RouterConfig<ExtendContext>);
|
|
41
|
+
/**
|
|
42
|
+
* Respond to a request according to the defined routes.
|
|
43
|
+
*
|
|
44
|
+
* @param {Request} request An http request object
|
|
45
|
+
* @param {RespondContext<ExtendContext>} ctxInit Context pre-initialization.
|
|
46
|
+
* Only headers and timestamps are allowed.
|
|
47
|
+
* But timestamps properties will not be overridden but rather extended.
|
|
48
|
+
* @returns {Response} An http response object
|
|
49
|
+
*/
|
|
50
|
+
respond(request: Request, ctxInit?: RespondContext<ExtendContext>): Promise<Response>;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @param {string} prefix Path prefix to prepend to paths.
|
|
54
|
+
* @param {Router<_ExtendContext,ExtendContext>} router The router to append routes definitions from.
|
|
55
|
+
* @param {{overwrite:boolean}} options Options to apply to each route definition.
|
|
56
|
+
* @param {boolean} [options.overwrite] Overwrite each route definition. This overrides the route specific options.
|
|
57
|
+
*/
|
|
58
|
+
appendTo(prefix: `/${string}`, router: Router<_ExtendContext, ExtendContext>, options?: {
|
|
59
|
+
overwrite: boolean;
|
|
60
|
+
}): void;
|
|
61
|
+
/**
|
|
62
|
+
* Dynamically load route definition files
|
|
63
|
+
*
|
|
64
|
+
* @param options
|
|
65
|
+
* @param {string} [options.routesPath] The root path of the route definitions
|
|
66
|
+
* @param {RegExp} [options.pattern] Regex pattern to use for matching and filtering route definition files.
|
|
67
|
+
* @param {RegExp} [options.dirPattern] Regex pattern to use for matching and filtering route definition folders.
|
|
68
|
+
* @param {(name:string)=>string} [options.processName] Route file name processor to decide the route path from filename.
|
|
69
|
+
* This is used for removing filename extensions and other appendages.
|
|
70
|
+
* The default removes only file extension.
|
|
71
|
+
* You can override this to remove custom appendages like '.route.ts'
|
|
72
|
+
*/
|
|
73
|
+
load(options: {
|
|
31
74
|
routesPath: string;
|
|
32
75
|
pattern?: RegExp;
|
|
33
76
|
dirPattern?: RegExp;
|
|
@@ -61,7 +104,7 @@ export declare class Router<_ExtendContext extends Record<string, unknown> = Emp
|
|
|
61
104
|
* - Receives one `GenerateOpenAPISortParam` parameter: `{ method, path, parts, tags }`
|
|
62
105
|
* - Return true to include, false to exclude
|
|
63
106
|
* @param options.routeSorter - Custom route sorter.
|
|
64
|
-
* -
|
|
107
|
+
* - Receives two `GenerateOpenAPISortParam` parameters: `{ method, path, parts, tags }`
|
|
65
108
|
* - Return -1, 0, 1
|
|
66
109
|
* @param options.includeOperationId - Whether to generate operationId for each operation (default: true)
|
|
67
110
|
* @param options.autoTag - Automatically tag operations based on path (default: true)
|
|
@@ -123,86 +166,884 @@ export declare class Router<_ExtendContext extends Record<string, unknown> = Emp
|
|
|
123
166
|
* @see {@link GeneratedOpenApi} for the return type structure
|
|
124
167
|
*/
|
|
125
168
|
generateOpenAPI(info?: GenerateOpenApiInfo, options?: GenerateOpenAPIOptions<ExtendContext>): Promise<GeneratedOpenApi>;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Define handlers for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
171
|
+
*
|
|
172
|
+
* @param {Path} paths One or more valid route paths
|
|
173
|
+
* @param pipe One or more request handlers
|
|
174
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
175
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
176
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
177
|
+
* @returns This router instance.
|
|
178
|
+
*/
|
|
179
|
+
all<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
180
|
+
/**
|
|
181
|
+
* Define handlers for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
182
|
+
*
|
|
183
|
+
* @param {Path} paths One or more valid route paths
|
|
184
|
+
* @param pipe One or more request handlers
|
|
185
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
186
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
187
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
188
|
+
* @returns This router instance.
|
|
189
|
+
*/
|
|
190
|
+
crud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
191
|
+
/**
|
|
192
|
+
* Define handlers for Head http method and the specified paths.
|
|
193
|
+
*
|
|
194
|
+
* @param {Path} paths One or more valid route paths
|
|
195
|
+
* @param pipe One or more request handlers
|
|
196
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
197
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
198
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
199
|
+
* @returns This router instance.
|
|
200
|
+
*/
|
|
201
|
+
head<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
202
|
+
/**
|
|
203
|
+
* Define handlers for Get http method and the specified paths.
|
|
204
|
+
*
|
|
205
|
+
* @param {Path} paths One or more valid route paths
|
|
206
|
+
* @param pipe One or more request handlers
|
|
207
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
208
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
209
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
210
|
+
* @returns This router instance.
|
|
211
|
+
*/
|
|
212
|
+
get<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
213
|
+
/**
|
|
214
|
+
* Define handlers for Query http method and the specified paths.
|
|
215
|
+
*
|
|
216
|
+
* @param {Path} paths One or more valid route paths
|
|
217
|
+
* @param pipe One or more request handlers
|
|
218
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
219
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
220
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
221
|
+
* @returns This router instance.
|
|
222
|
+
*/
|
|
223
|
+
query<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
224
|
+
/**
|
|
225
|
+
* Define handlers for Post http method and the specified paths.
|
|
226
|
+
*
|
|
227
|
+
* @param {Path} paths One or more valid route paths
|
|
228
|
+
* @param pipe One or more request handlers
|
|
229
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
230
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
231
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
232
|
+
* @returns This router instance.
|
|
233
|
+
*/
|
|
234
|
+
post<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
235
|
+
/**
|
|
236
|
+
* Define handlers for Put http method and the specified paths.
|
|
237
|
+
*
|
|
238
|
+
* @param {Path} paths One or more valid route paths
|
|
239
|
+
* @param pipe One or more request handlers
|
|
240
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
241
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
242
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
243
|
+
* @returns This router instance.
|
|
244
|
+
*/
|
|
245
|
+
put<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
246
|
+
/**
|
|
247
|
+
* Define handlers for Patch http method and the specified paths.
|
|
248
|
+
*
|
|
249
|
+
* @param {Path} paths One or more valid route paths
|
|
250
|
+
* @param pipe One or more request handlers
|
|
251
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
252
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
253
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
254
|
+
* @returns This router instance.
|
|
255
|
+
*/
|
|
256
|
+
patch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
257
|
+
/**
|
|
258
|
+
* Define handlers for Head Delete method and the specified paths.
|
|
259
|
+
*
|
|
260
|
+
* @param {Path} paths One or more valid route paths
|
|
261
|
+
* @param pipe One or more request handlers
|
|
262
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
263
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
264
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
265
|
+
* @returns This router instance.
|
|
266
|
+
*/
|
|
267
|
+
delete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
268
|
+
/**
|
|
269
|
+
* Define handlers for Options http method and the specified paths.
|
|
270
|
+
*
|
|
271
|
+
* @param {Path} paths One or more valid route paths
|
|
272
|
+
* @param pipe One or more request handlers
|
|
273
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
274
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
275
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
276
|
+
* @returns This router instance.
|
|
277
|
+
*/
|
|
278
|
+
options<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
279
|
+
/**
|
|
280
|
+
* Define handlers for Trace http method and the specified paths.
|
|
281
|
+
*
|
|
282
|
+
* @param {Path} paths One or more valid route paths
|
|
283
|
+
* @param pipe One or more request handlers
|
|
284
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
285
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
286
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
287
|
+
* @returns This router instance.
|
|
288
|
+
*/
|
|
289
|
+
trace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
290
|
+
/**
|
|
291
|
+
* Define handlers for Connect http method and the specified paths.
|
|
292
|
+
*
|
|
293
|
+
* @param {Path} paths One or more valid route paths
|
|
294
|
+
* @param pipe One or more request handlers
|
|
295
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
296
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
297
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
298
|
+
* @returns This router instance.
|
|
299
|
+
*/
|
|
300
|
+
connect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
301
|
+
/**
|
|
302
|
+
* Define filters for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
303
|
+
*
|
|
304
|
+
* @param {Path} paths One or more valid route paths
|
|
305
|
+
* @param pipe One or more request handlers
|
|
306
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
307
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
308
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
309
|
+
* @returns This router instance.
|
|
310
|
+
*/
|
|
311
|
+
filterAll<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
312
|
+
/**
|
|
313
|
+
* Define filters for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
314
|
+
*
|
|
315
|
+
* @param {Path} paths One or more valid route paths
|
|
316
|
+
* @param pipe One or more request handlers
|
|
317
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
318
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
319
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
320
|
+
* @returns This router instance.
|
|
321
|
+
*/
|
|
322
|
+
filterCrud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
323
|
+
/**
|
|
324
|
+
* Define filters for Head http method and the specified paths.
|
|
325
|
+
*
|
|
326
|
+
* @param {Path} paths One or more valid route paths
|
|
327
|
+
* @param pipe One or more request handlers
|
|
328
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
329
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
330
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
331
|
+
* @returns This router instance.
|
|
332
|
+
*/
|
|
333
|
+
filterHead<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
334
|
+
/**
|
|
335
|
+
* Define filters for Get http method and the specified paths.
|
|
336
|
+
*
|
|
337
|
+
* @param {Path} paths One or more valid route paths
|
|
338
|
+
* @param pipe One or more request handlers
|
|
339
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
340
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
341
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
342
|
+
* @returns This router instance.
|
|
343
|
+
*/
|
|
344
|
+
filterGet<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
345
|
+
/**
|
|
346
|
+
* Define filters for Query http method and the specified paths.
|
|
347
|
+
*
|
|
348
|
+
* @param {Path} paths One or more valid route paths
|
|
349
|
+
* @param pipe One or more request handlers
|
|
350
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
351
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
352
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
353
|
+
* @returns This router instance.
|
|
354
|
+
*/
|
|
355
|
+
filterQuery<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
356
|
+
/**
|
|
357
|
+
* Define filters for Post http method and the specified paths.
|
|
358
|
+
*
|
|
359
|
+
* @param {Path} paths One or more valid route paths
|
|
360
|
+
* @param pipe One or more request handlers
|
|
361
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
362
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
363
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
364
|
+
* @returns This router instance.
|
|
365
|
+
*/
|
|
366
|
+
filterPost<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
367
|
+
/**
|
|
368
|
+
* Define filters for Put http method and the specified paths.
|
|
369
|
+
*
|
|
370
|
+
* @param {Path} paths One or more valid route paths
|
|
371
|
+
* @param pipe One or more request handlers
|
|
372
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
373
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
374
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
375
|
+
* @returns This router instance.
|
|
376
|
+
*/
|
|
377
|
+
filterPut<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
378
|
+
/**
|
|
379
|
+
* Define filters for Patch http method and the specified paths.
|
|
380
|
+
*
|
|
381
|
+
* @param {Path} paths One or more valid route paths
|
|
382
|
+
* @param pipe One or more request handlers
|
|
383
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
384
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
385
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
386
|
+
* @returns This router instance.
|
|
387
|
+
*/
|
|
388
|
+
filterPatch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
389
|
+
/**
|
|
390
|
+
* Define filters for Head Delete method and the specified paths.
|
|
391
|
+
*
|
|
392
|
+
* @param {Path} paths One or more valid route paths
|
|
393
|
+
* @param pipe One or more request handlers
|
|
394
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
395
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
396
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
397
|
+
* @returns This router instance.
|
|
398
|
+
*/
|
|
399
|
+
filterDelete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
400
|
+
/**
|
|
401
|
+
* Define filters for Options http method and the specified paths.
|
|
402
|
+
*
|
|
403
|
+
* @param {Path} paths One or more valid route paths
|
|
404
|
+
* @param pipe One or more request handlers
|
|
405
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
406
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
407
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
408
|
+
* @returns This router instance.
|
|
409
|
+
*/
|
|
410
|
+
filterOptions<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
411
|
+
/**
|
|
412
|
+
* Define filters for Trace http method and the specified paths.
|
|
413
|
+
*
|
|
414
|
+
* @param {Path} paths One or more valid route paths
|
|
415
|
+
* @param pipe One or more request handlers
|
|
416
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
417
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
418
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
419
|
+
* @returns This router instance.
|
|
420
|
+
*/
|
|
421
|
+
filterTrace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
422
|
+
/**
|
|
423
|
+
* Define filters for Connect http method and the specified paths.
|
|
424
|
+
*
|
|
425
|
+
* @param {Path} paths One or more valid route paths
|
|
426
|
+
* @param pipe One or more request handlers
|
|
427
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
428
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
429
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
430
|
+
* @returns This router instance.
|
|
431
|
+
*/
|
|
432
|
+
filterConnect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
433
|
+
/**
|
|
434
|
+
* Define handlers for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
435
|
+
*
|
|
436
|
+
* @param {Path} paths One or more valid route paths
|
|
437
|
+
* @param pipe One or more request handlers
|
|
438
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
439
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
440
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
441
|
+
* @returns This router instance.
|
|
442
|
+
*/
|
|
443
|
+
handleAll<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
444
|
+
/**
|
|
445
|
+
* Define handlers for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
446
|
+
*
|
|
447
|
+
* @param {Path} paths One or more valid route paths
|
|
448
|
+
* @param pipe One or more request handlers
|
|
449
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
450
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
451
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
452
|
+
* @returns This router instance.
|
|
453
|
+
*/
|
|
454
|
+
handleCrud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
455
|
+
/**
|
|
456
|
+
* Define handlers for Head http method and the specified paths.
|
|
457
|
+
*
|
|
458
|
+
* @param {Path} paths One or more valid route paths
|
|
459
|
+
* @param pipe One or more request handlers
|
|
460
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
461
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
462
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
463
|
+
* @returns This router instance.
|
|
464
|
+
*/
|
|
465
|
+
handleHead<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
466
|
+
/**
|
|
467
|
+
* Define handlers for Get http method and the specified paths.
|
|
468
|
+
*
|
|
469
|
+
* @param {Path} paths One or more valid route paths
|
|
470
|
+
* @param pipe One or more request handlers
|
|
471
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
472
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
473
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
474
|
+
* @returns This router instance.
|
|
475
|
+
*/
|
|
476
|
+
handleGet<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
477
|
+
/**
|
|
478
|
+
* Define handlers for Query http method and the specified paths.
|
|
479
|
+
*
|
|
480
|
+
* @param {Path} paths One or more valid route paths
|
|
481
|
+
* @param pipe One or more request handlers
|
|
482
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
483
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
484
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
485
|
+
* @returns This router instance.
|
|
486
|
+
*/
|
|
487
|
+
handleQuery<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
488
|
+
/**
|
|
489
|
+
* Define handlers for Post http method and the specified paths.
|
|
490
|
+
*
|
|
491
|
+
* @param {Path} paths One or more valid route paths
|
|
492
|
+
* @param pipe One or more request handlers
|
|
493
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
494
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
495
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
496
|
+
* @returns This router instance.
|
|
497
|
+
*/
|
|
498
|
+
handlePost<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
499
|
+
/**
|
|
500
|
+
* Define handlers for Put http method and the specified paths.
|
|
501
|
+
*
|
|
502
|
+
* @param {Path} paths One or more valid route paths
|
|
503
|
+
* @param pipe One or more request handlers
|
|
504
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
505
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
506
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
507
|
+
* @returns This router instance.
|
|
508
|
+
*/
|
|
509
|
+
handlePut<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
510
|
+
/**
|
|
511
|
+
* Define handlers for Patch http method and the specified paths.
|
|
512
|
+
*
|
|
513
|
+
* @param {Path} paths One or more valid route paths
|
|
514
|
+
* @param pipe One or more request handlers
|
|
515
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
516
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
517
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
518
|
+
* @returns This router instance.
|
|
519
|
+
*/
|
|
520
|
+
handlePatch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
521
|
+
/**
|
|
522
|
+
* Define handlers for Head Delete method and the specified paths.
|
|
523
|
+
*
|
|
524
|
+
* @param {Path} paths One or more valid route paths
|
|
525
|
+
* @param pipe One or more request handlers
|
|
526
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
527
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
528
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
529
|
+
* @returns This router instance.
|
|
530
|
+
*/
|
|
531
|
+
handleDelete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
532
|
+
/**
|
|
533
|
+
* Define handlers for Options http method and the specified paths.
|
|
534
|
+
*
|
|
535
|
+
* @param {Path} paths One or more valid route paths
|
|
536
|
+
* @param pipe One or more request handlers
|
|
537
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
538
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
539
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
540
|
+
* @returns This router instance.
|
|
541
|
+
*/
|
|
542
|
+
handleOptions<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
543
|
+
/**
|
|
544
|
+
* Define handlers for Trace http method and the specified paths.
|
|
545
|
+
*
|
|
546
|
+
* @param {Path} paths One or more valid route paths
|
|
547
|
+
* @param pipe One or more request handlers
|
|
548
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
549
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
550
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
551
|
+
* @returns This router instance.
|
|
552
|
+
*/
|
|
553
|
+
handleTrace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
554
|
+
/**
|
|
555
|
+
* Define handlers for Connect http method and the specified paths.
|
|
556
|
+
*
|
|
557
|
+
* @param {Path} paths One or more valid route paths
|
|
558
|
+
* @param pipe One or more request handlers
|
|
559
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
560
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
561
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
562
|
+
* @returns This router instance.
|
|
563
|
+
*/
|
|
564
|
+
handleConnect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
565
|
+
/**
|
|
566
|
+
* Define fallbacks for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
567
|
+
*
|
|
568
|
+
* @param {Path} paths One or more valid route paths
|
|
569
|
+
* @param pipe One or more request handlers
|
|
570
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
571
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
572
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
573
|
+
* @returns This router instance.
|
|
574
|
+
*/
|
|
575
|
+
fallbackAll<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
576
|
+
/**
|
|
577
|
+
* Define fallbacks for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
578
|
+
*
|
|
579
|
+
* @param {Path} paths One or more valid route paths
|
|
580
|
+
* @param pipe One or more request handlers
|
|
581
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
582
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
583
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
584
|
+
* @returns This router instance.
|
|
585
|
+
*/
|
|
586
|
+
fallbackCrud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
587
|
+
/**
|
|
588
|
+
* Define fallbacks for Head http method and the specified paths.
|
|
589
|
+
*
|
|
590
|
+
* @param {Path} paths One or more valid route paths
|
|
591
|
+
* @param pipe One or more request handlers
|
|
592
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
593
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
594
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
595
|
+
* @returns This router instance.
|
|
596
|
+
*/
|
|
597
|
+
fallbackHead<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
598
|
+
/**
|
|
599
|
+
* Define fallbacks for Get http method and the specified paths.
|
|
600
|
+
*
|
|
601
|
+
* @param {Path} paths One or more valid route paths
|
|
602
|
+
* @param pipe One or more request handlers
|
|
603
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
604
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
605
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
606
|
+
* @returns This router instance.
|
|
607
|
+
*/
|
|
608
|
+
fallbackGet<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
609
|
+
/**
|
|
610
|
+
* Define fallbacks for Query http method and the specified paths.
|
|
611
|
+
*
|
|
612
|
+
* @param {Path} paths One or more valid route paths
|
|
613
|
+
* @param pipe One or more request handlers
|
|
614
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
615
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
616
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
617
|
+
* @returns This router instance.
|
|
618
|
+
*/
|
|
619
|
+
fallbackQuery<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
620
|
+
/**
|
|
621
|
+
* Define fallbacks for Post http method and the specified paths.
|
|
622
|
+
*
|
|
623
|
+
* @param {Path} paths One or more valid route paths
|
|
624
|
+
* @param pipe One or more request handlers
|
|
625
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
626
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
627
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
628
|
+
* @returns This router instance.
|
|
629
|
+
*/
|
|
630
|
+
fallbackPost<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
631
|
+
/**
|
|
632
|
+
* Define fallbacks for Put http method and the specified paths.
|
|
633
|
+
*
|
|
634
|
+
* @param {Path} paths One or more valid route paths
|
|
635
|
+
* @param pipe One or more request handlers
|
|
636
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
637
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
638
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
639
|
+
* @returns This router instance.
|
|
640
|
+
*/
|
|
641
|
+
fallbackPut<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
642
|
+
/**
|
|
643
|
+
* Define fallbacks for Patch http method and the specified paths.
|
|
644
|
+
*
|
|
645
|
+
* @param {Path} paths One or more valid route paths
|
|
646
|
+
* @param pipe One or more request handlers
|
|
647
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
648
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
649
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
650
|
+
* @returns This router instance.
|
|
651
|
+
*/
|
|
652
|
+
fallbackPatch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
653
|
+
/**
|
|
654
|
+
* Define fallbacks for Head Delete method and the specified paths.
|
|
655
|
+
*
|
|
656
|
+
* @param {Path} paths One or more valid route paths
|
|
657
|
+
* @param pipe One or more request handlers
|
|
658
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
659
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
660
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
661
|
+
* @returns This router instance.
|
|
662
|
+
*/
|
|
663
|
+
fallbackDelete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
664
|
+
/**
|
|
665
|
+
* Define fallbacks for Options http method and the specified paths.
|
|
666
|
+
*
|
|
667
|
+
* @param {Path} paths One or more valid route paths
|
|
668
|
+
* @param pipe One or more request handlers
|
|
669
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
670
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
671
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
672
|
+
* @returns This router instance.
|
|
673
|
+
*/
|
|
674
|
+
fallbackOptions<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
675
|
+
/**
|
|
676
|
+
* Define fallbacks for Trace http method and the specified paths.
|
|
677
|
+
*
|
|
678
|
+
* @param {Path} paths One or more valid route paths
|
|
679
|
+
* @param pipe One or more request handlers
|
|
680
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
681
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
682
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
683
|
+
* @returns This router instance.
|
|
684
|
+
*/
|
|
685
|
+
fallbackTrace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
686
|
+
/**
|
|
687
|
+
* Define fallbacks for Connect http method and the specified paths.
|
|
688
|
+
*
|
|
689
|
+
* @param {Path} paths One or more valid route paths
|
|
690
|
+
* @param pipe One or more request handlers
|
|
691
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
692
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
693
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
694
|
+
* @returns This router instance.
|
|
695
|
+
*/
|
|
696
|
+
fallbackConnect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: Handler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
697
|
+
/**
|
|
698
|
+
* Define afters for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
699
|
+
*
|
|
700
|
+
* @param {Path} paths One or more valid route paths
|
|
701
|
+
* @param pipe One or more request handlers
|
|
702
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
703
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
704
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
705
|
+
* @returns This router instance.
|
|
706
|
+
*/
|
|
707
|
+
afterAll<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
708
|
+
/**
|
|
709
|
+
* Define afters for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
710
|
+
*
|
|
711
|
+
* @param {Path} paths One or more valid route paths
|
|
712
|
+
* @param pipe One or more request handlers
|
|
713
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
714
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
715
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
716
|
+
* @returns This router instance.
|
|
717
|
+
*/
|
|
718
|
+
afterCrud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
719
|
+
/**
|
|
720
|
+
* Define afters for Head http method and the specified paths.
|
|
721
|
+
*
|
|
722
|
+
* @param {Path} paths One or more valid route paths
|
|
723
|
+
* @param pipe One or more request handlers
|
|
724
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
725
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
726
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
727
|
+
* @returns This router instance.
|
|
728
|
+
*/
|
|
729
|
+
afterHead<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
730
|
+
/**
|
|
731
|
+
* Define afters for Get http method and the specified paths.
|
|
732
|
+
*
|
|
733
|
+
* @param {Path} paths One or more valid route paths
|
|
734
|
+
* @param pipe One or more request handlers
|
|
735
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
736
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
737
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
738
|
+
* @returns This router instance.
|
|
739
|
+
*/
|
|
740
|
+
afterGet<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
741
|
+
/**
|
|
742
|
+
* Define afters for Query http method and the specified paths.
|
|
743
|
+
*
|
|
744
|
+
* @param {Path} paths One or more valid route paths
|
|
745
|
+
* @param pipe One or more request handlers
|
|
746
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
747
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
748
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
749
|
+
* @returns This router instance.
|
|
750
|
+
*/
|
|
751
|
+
afterQuery<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
752
|
+
/**
|
|
753
|
+
* Define afters for Post http method and the specified paths.
|
|
754
|
+
*
|
|
755
|
+
* @param {Path} paths One or more valid route paths
|
|
756
|
+
* @param pipe One or more request handlers
|
|
757
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
758
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
759
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
760
|
+
* @returns This router instance.
|
|
761
|
+
*/
|
|
762
|
+
afterPost<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
763
|
+
/**
|
|
764
|
+
* Define afters for Put http method and the specified paths.
|
|
765
|
+
*
|
|
766
|
+
* @param {Path} paths One or more valid route paths
|
|
767
|
+
* @param pipe One or more request handlers
|
|
768
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
769
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
770
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
771
|
+
* @returns This router instance.
|
|
772
|
+
*/
|
|
773
|
+
afterPut<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
774
|
+
/**
|
|
775
|
+
* Define afters for Patch http method and the specified paths.
|
|
776
|
+
*
|
|
777
|
+
* @param {Path} paths One or more valid route paths
|
|
778
|
+
* @param pipe One or more request handlers
|
|
779
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
780
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
781
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
782
|
+
* @returns This router instance.
|
|
783
|
+
*/
|
|
784
|
+
afterPatch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
785
|
+
/**
|
|
786
|
+
* Define afters for Head Delete method and the specified paths.
|
|
787
|
+
*
|
|
788
|
+
* @param {Path} paths One or more valid route paths
|
|
789
|
+
* @param pipe One or more request handlers
|
|
790
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
791
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
792
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
793
|
+
* @returns This router instance.
|
|
794
|
+
*/
|
|
795
|
+
afterDelete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
796
|
+
/**
|
|
797
|
+
* Define afters for Options http method and the specified paths.
|
|
798
|
+
*
|
|
799
|
+
* @param {Path} paths One or more valid route paths
|
|
800
|
+
* @param pipe One or more request handlers
|
|
801
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
802
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
803
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
804
|
+
* @returns This router instance.
|
|
805
|
+
*/
|
|
806
|
+
afterOptions<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
807
|
+
/**
|
|
808
|
+
* Define afters for Trace http method and the specified paths.
|
|
809
|
+
*
|
|
810
|
+
* @param {Path} paths One or more valid route paths
|
|
811
|
+
* @param pipe One or more request handlers
|
|
812
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
813
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
814
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
815
|
+
* @returns This router instance.
|
|
816
|
+
*/
|
|
817
|
+
afterTrace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
818
|
+
/**
|
|
819
|
+
* Define afters for Connect http method and the specified paths.
|
|
820
|
+
*
|
|
821
|
+
* @param {Path} paths One or more valid route paths
|
|
822
|
+
* @param pipe One or more request handlers
|
|
823
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
824
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
825
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
826
|
+
* @returns This router instance.
|
|
827
|
+
*/
|
|
828
|
+
afterConnect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
829
|
+
/**
|
|
830
|
+
* Define catchers for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
831
|
+
*
|
|
832
|
+
* @param {Path} paths One or more valid route paths
|
|
833
|
+
* @param pipe One or more request handlers
|
|
834
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
835
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
836
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
837
|
+
* @returns This router instance.
|
|
838
|
+
*/
|
|
839
|
+
catchAll<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
840
|
+
/**
|
|
841
|
+
* Define catchers for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
842
|
+
*
|
|
843
|
+
* @param {Path} paths One or more valid route paths
|
|
844
|
+
* @param pipe One or more request handlers
|
|
845
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
846
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
847
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
848
|
+
* @returns This router instance.
|
|
849
|
+
*/
|
|
850
|
+
catchCrud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
851
|
+
/**
|
|
852
|
+
* Define catchers for Head http method and the specified paths.
|
|
853
|
+
*
|
|
854
|
+
* @param {Path} paths One or more valid route paths
|
|
855
|
+
* @param pipe One or more request handlers
|
|
856
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
857
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
858
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
859
|
+
* @returns This router instance.
|
|
860
|
+
*/
|
|
861
|
+
catchHead<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
862
|
+
/**
|
|
863
|
+
* Define catchers for Get http method and the specified paths.
|
|
864
|
+
*
|
|
865
|
+
* @param {Path} paths One or more valid route paths
|
|
866
|
+
* @param pipe One or more request handlers
|
|
867
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
868
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
869
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
870
|
+
* @returns This router instance.
|
|
871
|
+
*/
|
|
872
|
+
catchGet<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
873
|
+
/**
|
|
874
|
+
* Define catchers for Query http method and the specified paths.
|
|
875
|
+
*
|
|
876
|
+
* @param {Path} paths One or more valid route paths
|
|
877
|
+
* @param pipe One or more request handlers
|
|
878
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
879
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
880
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
881
|
+
* @returns This router instance.
|
|
882
|
+
*/
|
|
883
|
+
catchQuery<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
884
|
+
/**
|
|
885
|
+
* Define catchers for Post http method and the specified paths.
|
|
886
|
+
*
|
|
887
|
+
* @param {Path} paths One or more valid route paths
|
|
888
|
+
* @param pipe One or more request handlers
|
|
889
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
890
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
891
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
892
|
+
* @returns This router instance.
|
|
893
|
+
*/
|
|
894
|
+
catchPost<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
895
|
+
/**
|
|
896
|
+
* Define catchers for Put http method and the specified paths.
|
|
897
|
+
*
|
|
898
|
+
* @param {Path} paths One or more valid route paths
|
|
899
|
+
* @param pipe One or more request handlers
|
|
900
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
901
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
902
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
903
|
+
* @returns This router instance.
|
|
904
|
+
*/
|
|
905
|
+
catchPut<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
906
|
+
/**
|
|
907
|
+
* Define catchers for Patch http method and the specified paths.
|
|
908
|
+
*
|
|
909
|
+
* @param {Path} paths One or more valid route paths
|
|
910
|
+
* @param pipe One or more request handlers
|
|
911
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
912
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
913
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
914
|
+
* @returns This router instance.
|
|
915
|
+
*/
|
|
916
|
+
catchPatch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
917
|
+
/**
|
|
918
|
+
* Define catchers for Head Delete method and the specified paths.
|
|
919
|
+
*
|
|
920
|
+
* @param {Path} paths One or more valid route paths
|
|
921
|
+
* @param pipe One or more request handlers
|
|
922
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
923
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
924
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
925
|
+
* @returns This router instance.
|
|
926
|
+
*/
|
|
927
|
+
catchDelete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
928
|
+
/**
|
|
929
|
+
* Define catchers for Options http method and the specified paths.
|
|
930
|
+
*
|
|
931
|
+
* @param {Path} paths One or more valid route paths
|
|
932
|
+
* @param pipe One or more request handlers
|
|
933
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
934
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
935
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
936
|
+
* @returns This router instance.
|
|
937
|
+
*/
|
|
938
|
+
catchOptions<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
939
|
+
/**
|
|
940
|
+
* Define catchers for Trace http method and the specified paths.
|
|
941
|
+
*
|
|
942
|
+
* @param {Path} paths One or more valid route paths
|
|
943
|
+
* @param pipe One or more request handlers
|
|
944
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
945
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
946
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
947
|
+
* @returns This router instance.
|
|
948
|
+
*/
|
|
949
|
+
catchTrace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
950
|
+
/**
|
|
951
|
+
* Define catchers for Connect http method and the specified paths.
|
|
952
|
+
*
|
|
953
|
+
* @param {Path} paths One or more valid route paths
|
|
954
|
+
* @param pipe One or more request handlers
|
|
955
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
956
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
957
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
958
|
+
* @returns This router instance.
|
|
959
|
+
*/
|
|
960
|
+
catchConnect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: Path | Array<Path>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
961
|
+
/**
|
|
962
|
+
* Define filters for the specified method paths.
|
|
963
|
+
*
|
|
964
|
+
* @param {MethodPath|Array<MethodPath>} methodPaths Method-path definitions in the form of: `Method /Path`, or [`Method /Path`, ...] or [[`Method`, ...], `/Path`, ...]
|
|
965
|
+
* @param pipe One or more request handlers
|
|
966
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
967
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
968
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
969
|
+
* @returns This router instance.
|
|
970
|
+
*/
|
|
971
|
+
filter<ExtendContextMore extends Record<string, unknown> = EmptyRecord>(methodPaths: MethodPath | Array<MethodPath> | [Array<HttpMethod>, ...Array<Path>], pipe: Handler<ExtendContext & ExtendContextMore> | Pipe<ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
972
|
+
/**
|
|
973
|
+
* Define handlers for the specified method paths.
|
|
974
|
+
*
|
|
975
|
+
* @param {MethodPath|Array<MethodPath>} methodPaths Method-path definitions in the form of: `Method /Path`, or [`Method /Path`, ...] or [[`Method`, ...], `/Path`, ...]
|
|
976
|
+
* @param pipe One or more request handlers
|
|
977
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
978
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
979
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
980
|
+
* @returns This router instance.
|
|
981
|
+
*/
|
|
982
|
+
handle<ExtendContextMore extends Record<string, unknown> = EmptyRecord>(methodPaths: MethodPath | Array<MethodPath> | [Array<HttpMethod>, ...Array<Path>], pipe: Handler<ExtendContext & ExtendContextMore> | Pipe<ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
983
|
+
/**
|
|
984
|
+
* Define fallbacks for the specified method paths.
|
|
985
|
+
*
|
|
986
|
+
* @param {MethodPath|Array<MethodPath>} methodPaths Method-path definitions in the form of: `Method /Path`, or [`Method /Path`, ...] or [[`Method`, ...], `/Path`, ...]
|
|
987
|
+
* @param pipe One or more request handlers
|
|
988
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
989
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
990
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
991
|
+
* @returns This router instance.
|
|
992
|
+
*/
|
|
993
|
+
fallback<ExtendContextMore extends Record<string, unknown> = EmptyRecord>(methodPaths: MethodPath | Array<MethodPath> | [Array<HttpMethod>, ...Array<Path>], pipe: Handler<ExtendContext & ExtendContextMore> | Pipe<ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
994
|
+
/**
|
|
995
|
+
* Define afters for the specified method paths.
|
|
996
|
+
*
|
|
997
|
+
* @param {MethodPath|Array<MethodPath>} methodPaths Method-path definitions in the form of: `Method /Path`, or [`Method /Path`, ...] or [[`Method`, ...], `/Path`, ...]
|
|
998
|
+
* @param pipe One or more request handlers
|
|
999
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1000
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1001
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
1002
|
+
* @returns This router instance.
|
|
1003
|
+
*/
|
|
1004
|
+
after<ExtendContextMore extends Record<string, unknown> = EmptyRecord>(methodPaths: MethodPath | Array<MethodPath> | [Array<HttpMethod>, ...Array<Path>], pipe: EndHandler<ExtendContext & ExtendContextMore> | EndPipe<ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
1005
|
+
/**
|
|
1006
|
+
* Define catchers for the specified method paths.
|
|
1007
|
+
*
|
|
1008
|
+
* @param {MethodPath|Array<MethodPath>} methodPaths Method-path definitions in the form of: `Method /Path`, or [`Method /Path`, ...] or [[`Method`, ...], `/Path`, ...]
|
|
1009
|
+
* @param pipe One or more request handlers
|
|
1010
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1011
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1012
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
1013
|
+
* @returns This router instance.
|
|
1014
|
+
*/
|
|
1015
|
+
catch<ExtendContextMore extends Record<string, unknown> = EmptyRecord>(methodPaths: MethodPath | Array<MethodPath> | [Array<HttpMethod>, ...Array<Path>], pipe: ErrorHandler<ExtendContext & ExtendContextMore> | ErrorPipe<ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<ExtendContext>;
|
|
1016
|
+
/**
|
|
1017
|
+
* Register route handlers for the specified handler type and method paths.
|
|
1018
|
+
*
|
|
1019
|
+
* @param {HandlerType} handlerType Handler type. `"handler"`, `"filter"`, `"fallback"`, `"after"`, `"catcher"`
|
|
1020
|
+
* @param {MethodPath|Array<MethodPath>} methodPaths Method-path definitions in the form of: `Method /Path`, or [`Method /Path`, ...] or [[`Method`, ...], `/Path`, ...]
|
|
1021
|
+
* @param pipe One or more request handlers
|
|
1022
|
+
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1023
|
+
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1024
|
+
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
1025
|
+
* @returns This router instance.
|
|
1026
|
+
*/
|
|
1027
|
+
register(handlerType: HandlerType, methodPaths: MethodPath | Array<MethodPath>, pipe: Handler<ExtendContext> | ErrorHandler<ExtendContext> | EndHandler<ExtendContext> | Pipe<ExtendContext> | ErrorPipe<ExtendContext> | EndPipe<ExtendContext>, options?: RegisterPipelineOptions | RegisterPipelineOptions): Router<ExtendContext>;
|
|
1028
|
+
/**
|
|
1029
|
+
*
|
|
1030
|
+
* @param pathname Valid url pathname
|
|
1031
|
+
* @param parts Destination parts array to push path parts to.
|
|
1032
|
+
* @param maxPath The max path part count limit.
|
|
1033
|
+
* @returns count of path parts if valid.
|
|
1034
|
+
* @returns -count if path parts are greater than maxPath.
|
|
1035
|
+
*/
|
|
204
1036
|
splitPath(pathname: string, parts: string[], maxPath: number): number;
|
|
205
1037
|
}
|
|
206
|
-
|
|
1038
|
+
/**
|
|
1039
|
+
* Translate route definition file pathname into valid route pathname.
|
|
1040
|
+
*
|
|
1041
|
+
* @param pathname The file path name of the route definition.
|
|
1042
|
+
* @param maxPath The max path part count limit.
|
|
1043
|
+
* @returns {string} Valid route pathname.
|
|
1044
|
+
* @throws {RouterError} `Invalid path ${pathname} -> ${part}` if invalid path encountered.
|
|
1045
|
+
* @throws {RouterError} `Max path exceeded` if maxPath is exceeded.
|
|
1046
|
+
*/
|
|
1047
|
+
export declare const translateRouteFilePath: (pathname: string, maxPath: number) => string;
|
|
207
1048
|
export default Router;
|
|
208
1049
|
//# sourceMappingURL=router.d.ts.map
|