@bepalo/spine 3.12.26 → 3.13.28
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/helpers.d.ts +2 -0
- package/dist/cjs/helpers.d.ts.map +1 -1
- package/dist/cjs/helpers.js +4 -2
- package/dist/cjs/helpers.js.map +1 -1
- package/dist/cjs/middlewares.d.ts +68 -3
- package/dist/cjs/middlewares.d.ts.map +1 -1
- package/dist/cjs/middlewares.js +95 -23
- package/dist/cjs/middlewares.js.map +1 -1
- package/dist/cjs/router.d.ts +213 -162
- package/dist/cjs/router.d.ts.map +1 -1
- package/dist/cjs/router.js +530 -83
- package/dist/cjs/router.js.map +1 -1
- package/dist/cjs/types.d.ts +7 -1
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/helpers.d.ts +2 -0
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +4 -2
- package/dist/helpers.js.map +1 -1
- package/dist/middlewares.d.ts +68 -3
- package/dist/middlewares.d.ts.map +1 -1
- package/dist/middlewares.js +95 -23
- package/dist/middlewares.js.map +1 -1
- package/dist/router.d.ts +213 -162
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +530 -83
- package/dist/router.js.map +1 -1
- package/dist/types.d.ts +7 -1
- 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 RegisterPipelineOptions, type RespondContext, type RouterConfig, GenerateOpenApiInfo, GenerateOpenAPIOptions, GeneratedOpenApi, EndHandler, EndPipe, ErrorHandler, ErrorPipe } from "./types.ts";
|
|
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, ExtractMethodPathsParams } 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;
|
|
@@ -13,10 +13,14 @@ export declare const HANDLER_TYPES: Set<HandlerType>;
|
|
|
13
13
|
* @template {Record<string, unknown>} ExtendContext - Extend Router Context
|
|
14
14
|
*/
|
|
15
15
|
export declare class Router<_ExtendContext extends Record<string, unknown> = EmptyRecord, ExtendContext extends {
|
|
16
|
-
router: Router<_ExtendContext
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
16
|
+
router: Router<_ExtendContext, {
|
|
17
|
+
router: any;
|
|
18
|
+
}>;
|
|
19
|
+
} = _ExtendContext & {
|
|
20
|
+
router: Router<_ExtendContext, {
|
|
21
|
+
router: any;
|
|
22
|
+
}>;
|
|
23
|
+
}> {
|
|
20
24
|
#private;
|
|
21
25
|
get maxPath(): number;
|
|
22
26
|
get enable(): {
|
|
@@ -42,13 +46,24 @@ export declare class Router<_ExtendContext extends Record<string, unknown> = Emp
|
|
|
42
46
|
* Respond to a request according to the defined routes.
|
|
43
47
|
*
|
|
44
48
|
* @param {Request} request An http request object
|
|
45
|
-
* @param {RespondContext<
|
|
49
|
+
* @param {RespondContext<_ExtendContext>} ctxInit Context pre-initialization.
|
|
46
50
|
* Only headers and timestamps are allowed.
|
|
47
51
|
* But timestamps properties will not be overridden but rather extended.
|
|
48
52
|
* @returns {Response} An http response object
|
|
49
53
|
*/
|
|
50
|
-
respond(request: Request, ctxInit?: RespondContext<
|
|
54
|
+
respond(request: Request, ctxInit?: RespondContext<_ExtendContext>): Promise<Response>;
|
|
51
55
|
/**
|
|
56
|
+
* Register routes defined in the other router to this router.
|
|
57
|
+
*
|
|
58
|
+
* @param {Router<_ExtendContext,ExtendContext>} router The router to append routes definitions from.
|
|
59
|
+
* @param {{overwrite:boolean}} options Options to apply to each route definition.
|
|
60
|
+
* @param {boolean} [options.overwrite] Overwrite each route definition. This overrides the route specific options.
|
|
61
|
+
*/
|
|
62
|
+
append(router: Router<_ExtendContext, ExtendContext>, options?: {
|
|
63
|
+
overwrite: boolean;
|
|
64
|
+
}): void;
|
|
65
|
+
/**
|
|
66
|
+
* Register routes defined in the other router to this router under the prefix path.
|
|
52
67
|
*
|
|
53
68
|
* @param {string} prefix Path prefix to prepend to paths.
|
|
54
69
|
* @param {Router<_ExtendContext,ExtendContext>} router The router to append routes definitions from.
|
|
@@ -170,849 +185,849 @@ export declare class Router<_ExtendContext extends Record<string, unknown> = Emp
|
|
|
170
185
|
* Define handlers for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
171
186
|
*
|
|
172
187
|
* @param {Path} paths One or more valid route paths
|
|
173
|
-
* @param pipe One or more
|
|
188
|
+
* @param pipe One or more main handlers
|
|
174
189
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
175
190
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
176
191
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
177
192
|
* @returns This router instance.
|
|
178
193
|
*/
|
|
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>;
|
|
194
|
+
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, ExtendContext>;
|
|
180
195
|
/**
|
|
181
196
|
* Define handlers for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
182
197
|
*
|
|
183
198
|
* @param {Path} paths One or more valid route paths
|
|
184
|
-
* @param pipe One or more
|
|
199
|
+
* @param pipe One or more main handlers
|
|
185
200
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
186
201
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
187
202
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
188
203
|
* @returns This router instance.
|
|
189
204
|
*/
|
|
190
|
-
crud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
205
|
+
crud<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, ExtendContext>;
|
|
191
206
|
/**
|
|
192
207
|
* Define handlers for Head http method and the specified paths.
|
|
193
208
|
*
|
|
194
209
|
* @param {Path} paths One or more valid route paths
|
|
195
|
-
* @param pipe One or more
|
|
210
|
+
* @param pipe One or more main handlers
|
|
196
211
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
197
212
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
198
213
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
199
214
|
* @returns This router instance.
|
|
200
215
|
*/
|
|
201
|
-
head<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
216
|
+
head<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, ExtendContext>;
|
|
202
217
|
/**
|
|
203
218
|
* Define handlers for Get http method and the specified paths.
|
|
204
219
|
*
|
|
205
220
|
* @param {Path} paths One or more valid route paths
|
|
206
|
-
* @param pipe One or more
|
|
221
|
+
* @param pipe One or more main handlers
|
|
207
222
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
208
223
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
209
224
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
210
225
|
* @returns This router instance.
|
|
211
226
|
*/
|
|
212
|
-
get<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
227
|
+
get<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, ExtendContext>;
|
|
213
228
|
/**
|
|
214
229
|
* Define handlers for Query http method and the specified paths.
|
|
215
230
|
*
|
|
216
231
|
* @param {Path} paths One or more valid route paths
|
|
217
|
-
* @param pipe One or more
|
|
232
|
+
* @param pipe One or more main handlers
|
|
218
233
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
219
234
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
220
235
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
221
236
|
* @returns This router instance.
|
|
222
237
|
*/
|
|
223
|
-
query<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
238
|
+
query<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, ExtendContext>;
|
|
224
239
|
/**
|
|
225
240
|
* Define handlers for Post http method and the specified paths.
|
|
226
241
|
*
|
|
227
242
|
* @param {Path} paths One or more valid route paths
|
|
228
|
-
* @param pipe One or more
|
|
243
|
+
* @param pipe One or more main handlers
|
|
229
244
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
230
245
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
231
246
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
232
247
|
* @returns This router instance.
|
|
233
248
|
*/
|
|
234
|
-
post<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
249
|
+
post<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, ExtendContext>;
|
|
235
250
|
/**
|
|
236
251
|
* Define handlers for Put http method and the specified paths.
|
|
237
252
|
*
|
|
238
253
|
* @param {Path} paths One or more valid route paths
|
|
239
|
-
* @param pipe One or more
|
|
254
|
+
* @param pipe One or more main handlers
|
|
240
255
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
241
256
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
242
257
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
243
258
|
* @returns This router instance.
|
|
244
259
|
*/
|
|
245
|
-
put<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
260
|
+
put<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, ExtendContext>;
|
|
246
261
|
/**
|
|
247
262
|
* Define handlers for Patch http method and the specified paths.
|
|
248
263
|
*
|
|
249
264
|
* @param {Path} paths One or more valid route paths
|
|
250
|
-
* @param pipe One or more
|
|
265
|
+
* @param pipe One or more main handlers
|
|
251
266
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
252
267
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
253
268
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
254
269
|
* @returns This router instance.
|
|
255
270
|
*/
|
|
256
|
-
patch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
271
|
+
patch<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, ExtendContext>;
|
|
257
272
|
/**
|
|
258
273
|
* Define handlers for Head Delete method and the specified paths.
|
|
259
274
|
*
|
|
260
275
|
* @param {Path} paths One or more valid route paths
|
|
261
|
-
* @param pipe One or more
|
|
276
|
+
* @param pipe One or more main handlers
|
|
262
277
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
263
278
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
264
279
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
265
280
|
* @returns This router instance.
|
|
266
281
|
*/
|
|
267
|
-
delete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
282
|
+
delete<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, ExtendContext>;
|
|
268
283
|
/**
|
|
269
284
|
* Define handlers for Options http method and the specified paths.
|
|
270
285
|
*
|
|
271
286
|
* @param {Path} paths One or more valid route paths
|
|
272
|
-
* @param pipe One or more
|
|
287
|
+
* @param pipe One or more main handlers
|
|
273
288
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
274
289
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
275
290
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
276
291
|
* @returns This router instance.
|
|
277
292
|
*/
|
|
278
|
-
options<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
293
|
+
options<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, ExtendContext>;
|
|
279
294
|
/**
|
|
280
295
|
* Define handlers for Trace http method and the specified paths.
|
|
281
296
|
*
|
|
282
297
|
* @param {Path} paths One or more valid route paths
|
|
283
|
-
* @param pipe One or more
|
|
298
|
+
* @param pipe One or more main handlers
|
|
284
299
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
285
300
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
286
301
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
287
302
|
* @returns This router instance.
|
|
288
303
|
*/
|
|
289
|
-
trace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
304
|
+
trace<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, ExtendContext>;
|
|
290
305
|
/**
|
|
291
306
|
* Define handlers for Connect http method and the specified paths.
|
|
292
307
|
*
|
|
293
308
|
* @param {Path} paths One or more valid route paths
|
|
294
|
-
* @param pipe One or more
|
|
309
|
+
* @param pipe One or more main handlers
|
|
295
310
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
296
311
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
297
312
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
298
313
|
* @returns This router instance.
|
|
299
314
|
*/
|
|
300
|
-
connect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
315
|
+
connect<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, ExtendContext>;
|
|
301
316
|
/**
|
|
302
317
|
* Define filters for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
303
318
|
*
|
|
304
319
|
* @param {Path} paths One or more valid route paths
|
|
305
|
-
* @param pipe One or more
|
|
320
|
+
* @param pipe One or more filtering handlers
|
|
306
321
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
307
322
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
308
323
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
309
324
|
* @returns This router instance.
|
|
310
325
|
*/
|
|
311
|
-
filterAll<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
326
|
+
filterAll<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, ExtendContext>;
|
|
312
327
|
/**
|
|
313
328
|
* Define filters for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
314
329
|
*
|
|
315
330
|
* @param {Path} paths One or more valid route paths
|
|
316
|
-
* @param pipe One or more
|
|
331
|
+
* @param pipe One or more filtering handlers
|
|
317
332
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
318
333
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
319
334
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
320
335
|
* @returns This router instance.
|
|
321
336
|
*/
|
|
322
|
-
filterCrud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
337
|
+
filterCrud<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, ExtendContext>;
|
|
323
338
|
/**
|
|
324
339
|
* Define filters for Head http method and the specified paths.
|
|
325
340
|
*
|
|
326
341
|
* @param {Path} paths One or more valid route paths
|
|
327
|
-
* @param pipe One or more
|
|
342
|
+
* @param pipe One or more filtering handlers
|
|
328
343
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
329
344
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
330
345
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
331
346
|
* @returns This router instance.
|
|
332
347
|
*/
|
|
333
|
-
filterHead<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
348
|
+
filterHead<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, ExtendContext>;
|
|
334
349
|
/**
|
|
335
350
|
* Define filters for Get http method and the specified paths.
|
|
336
351
|
*
|
|
337
352
|
* @param {Path} paths One or more valid route paths
|
|
338
|
-
* @param pipe One or more
|
|
353
|
+
* @param pipe One or more filtering handlers
|
|
339
354
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
340
355
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
341
356
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
342
357
|
* @returns This router instance.
|
|
343
358
|
*/
|
|
344
|
-
filterGet<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
359
|
+
filterGet<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, ExtendContext>;
|
|
345
360
|
/**
|
|
346
361
|
* Define filters for Query http method and the specified paths.
|
|
347
362
|
*
|
|
348
363
|
* @param {Path} paths One or more valid route paths
|
|
349
|
-
* @param pipe One or more
|
|
364
|
+
* @param pipe One or more filtering handlers
|
|
350
365
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
351
366
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
352
367
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
353
368
|
* @returns This router instance.
|
|
354
369
|
*/
|
|
355
|
-
filterQuery<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
370
|
+
filterQuery<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, ExtendContext>;
|
|
356
371
|
/**
|
|
357
372
|
* Define filters for Post http method and the specified paths.
|
|
358
373
|
*
|
|
359
374
|
* @param {Path} paths One or more valid route paths
|
|
360
|
-
* @param pipe One or more
|
|
375
|
+
* @param pipe One or more filtering handlers
|
|
361
376
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
362
377
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
363
378
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
364
379
|
* @returns This router instance.
|
|
365
380
|
*/
|
|
366
|
-
filterPost<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
381
|
+
filterPost<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, ExtendContext>;
|
|
367
382
|
/**
|
|
368
383
|
* Define filters for Put http method and the specified paths.
|
|
369
384
|
*
|
|
370
385
|
* @param {Path} paths One or more valid route paths
|
|
371
|
-
* @param pipe One or more
|
|
386
|
+
* @param pipe One or more filtering handlers
|
|
372
387
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
373
388
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
374
389
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
375
390
|
* @returns This router instance.
|
|
376
391
|
*/
|
|
377
|
-
filterPut<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
392
|
+
filterPut<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, ExtendContext>;
|
|
378
393
|
/**
|
|
379
394
|
* Define filters for Patch http method and the specified paths.
|
|
380
395
|
*
|
|
381
396
|
* @param {Path} paths One or more valid route paths
|
|
382
|
-
* @param pipe One or more
|
|
397
|
+
* @param pipe One or more filtering handlers
|
|
383
398
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
384
399
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
385
400
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
386
401
|
* @returns This router instance.
|
|
387
402
|
*/
|
|
388
|
-
filterPatch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
403
|
+
filterPatch<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, ExtendContext>;
|
|
389
404
|
/**
|
|
390
405
|
* Define filters for Head Delete method and the specified paths.
|
|
391
406
|
*
|
|
392
407
|
* @param {Path} paths One or more valid route paths
|
|
393
|
-
* @param pipe One or more
|
|
408
|
+
* @param pipe One or more filtering handlers
|
|
394
409
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
395
410
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
396
411
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
397
412
|
* @returns This router instance.
|
|
398
413
|
*/
|
|
399
|
-
filterDelete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
414
|
+
filterDelete<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, ExtendContext>;
|
|
400
415
|
/**
|
|
401
416
|
* Define filters for Options http method and the specified paths.
|
|
402
417
|
*
|
|
403
418
|
* @param {Path} paths One or more valid route paths
|
|
404
|
-
* @param pipe One or more
|
|
419
|
+
* @param pipe One or more filtering handlers
|
|
405
420
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
406
421
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
407
422
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
408
423
|
* @returns This router instance.
|
|
409
424
|
*/
|
|
410
|
-
filterOptions<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
425
|
+
filterOptions<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, ExtendContext>;
|
|
411
426
|
/**
|
|
412
427
|
* Define filters for Trace http method and the specified paths.
|
|
413
428
|
*
|
|
414
429
|
* @param {Path} paths One or more valid route paths
|
|
415
|
-
* @param pipe One or more
|
|
430
|
+
* @param pipe One or more filtering handlers
|
|
416
431
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
417
432
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
418
433
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
419
434
|
* @returns This router instance.
|
|
420
435
|
*/
|
|
421
|
-
filterTrace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
436
|
+
filterTrace<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, ExtendContext>;
|
|
422
437
|
/**
|
|
423
438
|
* Define filters for Connect http method and the specified paths.
|
|
424
439
|
*
|
|
425
440
|
* @param {Path} paths One or more valid route paths
|
|
426
|
-
* @param pipe One or more
|
|
441
|
+
* @param pipe One or more filtering handlers
|
|
427
442
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
428
443
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
429
444
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
430
445
|
* @returns This router instance.
|
|
431
446
|
*/
|
|
432
|
-
filterConnect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
447
|
+
filterConnect<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, ExtendContext>;
|
|
433
448
|
/**
|
|
434
449
|
* Define handlers for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
435
450
|
*
|
|
436
451
|
* @param {Path} paths One or more valid route paths
|
|
437
|
-
* @param pipe One or more
|
|
452
|
+
* @param pipe One or more main handlers
|
|
438
453
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
439
454
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
440
455
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
441
456
|
* @returns This router instance.
|
|
442
457
|
*/
|
|
443
|
-
handleAll<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
458
|
+
handleAll<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, ExtendContext>;
|
|
444
459
|
/**
|
|
445
460
|
* Define handlers for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
446
461
|
*
|
|
447
462
|
* @param {Path} paths One or more valid route paths
|
|
448
|
-
* @param pipe One or more
|
|
463
|
+
* @param pipe One or more main handlers
|
|
449
464
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
450
465
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
451
466
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
452
467
|
* @returns This router instance.
|
|
453
468
|
*/
|
|
454
|
-
handleCrud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
469
|
+
handleCrud<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, ExtendContext>;
|
|
455
470
|
/**
|
|
456
471
|
* Define handlers for Head http method and the specified paths.
|
|
457
472
|
*
|
|
458
473
|
* @param {Path} paths One or more valid route paths
|
|
459
|
-
* @param pipe One or more
|
|
474
|
+
* @param pipe One or more main handlers
|
|
460
475
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
461
476
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
462
477
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
463
478
|
* @returns This router instance.
|
|
464
479
|
*/
|
|
465
|
-
handleHead<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
480
|
+
handleHead<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, ExtendContext>;
|
|
466
481
|
/**
|
|
467
482
|
* Define handlers for Get http method and the specified paths.
|
|
468
483
|
*
|
|
469
484
|
* @param {Path} paths One or more valid route paths
|
|
470
|
-
* @param pipe One or more
|
|
485
|
+
* @param pipe One or more main handlers
|
|
471
486
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
472
487
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
473
488
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
474
489
|
* @returns This router instance.
|
|
475
490
|
*/
|
|
476
|
-
handleGet<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
491
|
+
handleGet<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, ExtendContext>;
|
|
477
492
|
/**
|
|
478
493
|
* Define handlers for Query http method and the specified paths.
|
|
479
494
|
*
|
|
480
495
|
* @param {Path} paths One or more valid route paths
|
|
481
|
-
* @param pipe One or more
|
|
496
|
+
* @param pipe One or more main handlers
|
|
482
497
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
483
498
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
484
499
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
485
500
|
* @returns This router instance.
|
|
486
501
|
*/
|
|
487
|
-
handleQuery<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
502
|
+
handleQuery<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, ExtendContext>;
|
|
488
503
|
/**
|
|
489
504
|
* Define handlers for Post http method and the specified paths.
|
|
490
505
|
*
|
|
491
506
|
* @param {Path} paths One or more valid route paths
|
|
492
|
-
* @param pipe One or more
|
|
507
|
+
* @param pipe One or more main handlers
|
|
493
508
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
494
509
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
495
510
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
496
511
|
* @returns This router instance.
|
|
497
512
|
*/
|
|
498
|
-
handlePost<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
513
|
+
handlePost<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, ExtendContext>;
|
|
499
514
|
/**
|
|
500
515
|
* Define handlers for Put http method and the specified paths.
|
|
501
516
|
*
|
|
502
517
|
* @param {Path} paths One or more valid route paths
|
|
503
|
-
* @param pipe One or more
|
|
518
|
+
* @param pipe One or more main handlers
|
|
504
519
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
505
520
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
506
521
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
507
522
|
* @returns This router instance.
|
|
508
523
|
*/
|
|
509
|
-
handlePut<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
524
|
+
handlePut<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, ExtendContext>;
|
|
510
525
|
/**
|
|
511
526
|
* Define handlers for Patch http method and the specified paths.
|
|
512
527
|
*
|
|
513
528
|
* @param {Path} paths One or more valid route paths
|
|
514
|
-
* @param pipe One or more
|
|
529
|
+
* @param pipe One or more main handlers
|
|
515
530
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
516
531
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
517
532
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
518
533
|
* @returns This router instance.
|
|
519
534
|
*/
|
|
520
|
-
handlePatch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
535
|
+
handlePatch<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, ExtendContext>;
|
|
521
536
|
/**
|
|
522
537
|
* Define handlers for Head Delete method and the specified paths.
|
|
523
538
|
*
|
|
524
539
|
* @param {Path} paths One or more valid route paths
|
|
525
|
-
* @param pipe One or more
|
|
540
|
+
* @param pipe One or more main handlers
|
|
526
541
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
527
542
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
528
543
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
529
544
|
* @returns This router instance.
|
|
530
545
|
*/
|
|
531
|
-
handleDelete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
546
|
+
handleDelete<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, ExtendContext>;
|
|
532
547
|
/**
|
|
533
548
|
* Define handlers for Options http method and the specified paths.
|
|
534
549
|
*
|
|
535
550
|
* @param {Path} paths One or more valid route paths
|
|
536
|
-
* @param pipe One or more
|
|
551
|
+
* @param pipe One or more main handlers
|
|
537
552
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
538
553
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
539
554
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
540
555
|
* @returns This router instance.
|
|
541
556
|
*/
|
|
542
|
-
handleOptions<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
557
|
+
handleOptions<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, ExtendContext>;
|
|
543
558
|
/**
|
|
544
559
|
* Define handlers for Trace http method and the specified paths.
|
|
545
560
|
*
|
|
546
561
|
* @param {Path} paths One or more valid route paths
|
|
547
|
-
* @param pipe One or more
|
|
562
|
+
* @param pipe One or more main handlers
|
|
548
563
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
549
564
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
550
565
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
551
566
|
* @returns This router instance.
|
|
552
567
|
*/
|
|
553
|
-
handleTrace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
568
|
+
handleTrace<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, ExtendContext>;
|
|
554
569
|
/**
|
|
555
570
|
* Define handlers for Connect http method and the specified paths.
|
|
556
571
|
*
|
|
557
572
|
* @param {Path} paths One or more valid route paths
|
|
558
|
-
* @param pipe One or more
|
|
573
|
+
* @param pipe One or more main handlers
|
|
559
574
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
560
575
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
561
576
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
562
577
|
* @returns This router instance.
|
|
563
578
|
*/
|
|
564
|
-
handleConnect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
579
|
+
handleConnect<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, ExtendContext>;
|
|
565
580
|
/**
|
|
566
581
|
* Define fallbacks for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
567
582
|
*
|
|
568
583
|
* @param {Path} paths One or more valid route paths
|
|
569
|
-
* @param pipe One or more
|
|
584
|
+
* @param pipe One or more fallback handlers
|
|
570
585
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
571
586
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
572
587
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
573
588
|
* @returns This router instance.
|
|
574
589
|
*/
|
|
575
|
-
fallbackAll<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
590
|
+
fallbackAll<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, ExtendContext>;
|
|
576
591
|
/**
|
|
577
592
|
* Define fallbacks for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
578
593
|
*
|
|
579
594
|
* @param {Path} paths One or more valid route paths
|
|
580
|
-
* @param pipe One or more
|
|
595
|
+
* @param pipe One or more fallback handlers
|
|
581
596
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
582
597
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
583
598
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
584
599
|
* @returns This router instance.
|
|
585
600
|
*/
|
|
586
|
-
fallbackCrud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
601
|
+
fallbackCrud<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, ExtendContext>;
|
|
587
602
|
/**
|
|
588
603
|
* Define fallbacks for Head http method and the specified paths.
|
|
589
604
|
*
|
|
590
605
|
* @param {Path} paths One or more valid route paths
|
|
591
|
-
* @param pipe One or more
|
|
606
|
+
* @param pipe One or more fallback handlers
|
|
592
607
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
593
608
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
594
609
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
595
610
|
* @returns This router instance.
|
|
596
611
|
*/
|
|
597
|
-
fallbackHead<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
612
|
+
fallbackHead<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, ExtendContext>;
|
|
598
613
|
/**
|
|
599
614
|
* Define fallbacks for Get http method and the specified paths.
|
|
600
615
|
*
|
|
601
616
|
* @param {Path} paths One or more valid route paths
|
|
602
|
-
* @param pipe One or more
|
|
617
|
+
* @param pipe One or more fallback handlers
|
|
603
618
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
604
619
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
605
620
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
606
621
|
* @returns This router instance.
|
|
607
622
|
*/
|
|
608
|
-
fallbackGet<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
623
|
+
fallbackGet<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, ExtendContext>;
|
|
609
624
|
/**
|
|
610
625
|
* Define fallbacks for Query http method and the specified paths.
|
|
611
626
|
*
|
|
612
627
|
* @param {Path} paths One or more valid route paths
|
|
613
|
-
* @param pipe One or more
|
|
628
|
+
* @param pipe One or more fallback handlers
|
|
614
629
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
615
630
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
616
631
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
617
632
|
* @returns This router instance.
|
|
618
633
|
*/
|
|
619
|
-
fallbackQuery<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
634
|
+
fallbackQuery<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, ExtendContext>;
|
|
620
635
|
/**
|
|
621
636
|
* Define fallbacks for Post http method and the specified paths.
|
|
622
637
|
*
|
|
623
638
|
* @param {Path} paths One or more valid route paths
|
|
624
|
-
* @param pipe One or more
|
|
639
|
+
* @param pipe One or more fallback handlers
|
|
625
640
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
626
641
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
627
642
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
628
643
|
* @returns This router instance.
|
|
629
644
|
*/
|
|
630
|
-
fallbackPost<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
645
|
+
fallbackPost<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, ExtendContext>;
|
|
631
646
|
/**
|
|
632
647
|
* Define fallbacks for Put http method and the specified paths.
|
|
633
648
|
*
|
|
634
649
|
* @param {Path} paths One or more valid route paths
|
|
635
|
-
* @param pipe One or more
|
|
650
|
+
* @param pipe One or more fallback handlers
|
|
636
651
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
637
652
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
638
653
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
639
654
|
* @returns This router instance.
|
|
640
655
|
*/
|
|
641
|
-
fallbackPut<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
656
|
+
fallbackPut<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, ExtendContext>;
|
|
642
657
|
/**
|
|
643
658
|
* Define fallbacks for Patch http method and the specified paths.
|
|
644
659
|
*
|
|
645
660
|
* @param {Path} paths One or more valid route paths
|
|
646
|
-
* @param pipe One or more
|
|
661
|
+
* @param pipe One or more fallback handlers
|
|
647
662
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
648
663
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
649
664
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
650
665
|
* @returns This router instance.
|
|
651
666
|
*/
|
|
652
|
-
fallbackPatch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
667
|
+
fallbackPatch<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, ExtendContext>;
|
|
653
668
|
/**
|
|
654
669
|
* Define fallbacks for Head Delete method and the specified paths.
|
|
655
670
|
*
|
|
656
671
|
* @param {Path} paths One or more valid route paths
|
|
657
|
-
* @param pipe One or more
|
|
672
|
+
* @param pipe One or more fallback handlers
|
|
658
673
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
659
674
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
660
675
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
661
676
|
* @returns This router instance.
|
|
662
677
|
*/
|
|
663
|
-
fallbackDelete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
678
|
+
fallbackDelete<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, ExtendContext>;
|
|
664
679
|
/**
|
|
665
680
|
* Define fallbacks for Options http method and the specified paths.
|
|
666
681
|
*
|
|
667
682
|
* @param {Path} paths One or more valid route paths
|
|
668
|
-
* @param pipe One or more
|
|
683
|
+
* @param pipe One or more fallback handlers
|
|
669
684
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
670
685
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
671
686
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
672
687
|
* @returns This router instance.
|
|
673
688
|
*/
|
|
674
|
-
fallbackOptions<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
689
|
+
fallbackOptions<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, ExtendContext>;
|
|
675
690
|
/**
|
|
676
691
|
* Define fallbacks for Trace http method and the specified paths.
|
|
677
692
|
*
|
|
678
693
|
* @param {Path} paths One or more valid route paths
|
|
679
|
-
* @param pipe One or more
|
|
694
|
+
* @param pipe One or more fallback handlers
|
|
680
695
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
681
696
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
682
697
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
683
698
|
* @returns This router instance.
|
|
684
699
|
*/
|
|
685
|
-
fallbackTrace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
700
|
+
fallbackTrace<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, ExtendContext>;
|
|
686
701
|
/**
|
|
687
702
|
* Define fallbacks for Connect http method and the specified paths.
|
|
688
703
|
*
|
|
689
704
|
* @param {Path} paths One or more valid route paths
|
|
690
|
-
* @param pipe One or more
|
|
705
|
+
* @param pipe One or more fallback handlers
|
|
691
706
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
692
707
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
693
708
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
694
709
|
* @returns This router instance.
|
|
695
710
|
*/
|
|
696
|
-
fallbackConnect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
711
|
+
fallbackConnect<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, ExtendContext>;
|
|
697
712
|
/**
|
|
698
713
|
* Define afters for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
699
714
|
*
|
|
700
715
|
* @param {Path} paths One or more valid route paths
|
|
701
|
-
* @param pipe One or more
|
|
716
|
+
* @param pipe One or more after handlers
|
|
702
717
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
703
718
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
704
719
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
705
720
|
* @returns This router instance.
|
|
706
721
|
*/
|
|
707
|
-
afterAll<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
722
|
+
afterAll<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
708
723
|
/**
|
|
709
724
|
* Define afters for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
710
725
|
*
|
|
711
726
|
* @param {Path} paths One or more valid route paths
|
|
712
|
-
* @param pipe One or more
|
|
727
|
+
* @param pipe One or more after handlers
|
|
713
728
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
714
729
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
715
730
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
716
731
|
* @returns This router instance.
|
|
717
732
|
*/
|
|
718
|
-
afterCrud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
733
|
+
afterCrud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
719
734
|
/**
|
|
720
735
|
* Define afters for Head http method and the specified paths.
|
|
721
736
|
*
|
|
722
737
|
* @param {Path} paths One or more valid route paths
|
|
723
|
-
* @param pipe One or more
|
|
738
|
+
* @param pipe One or more after handlers
|
|
724
739
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
725
740
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
726
741
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
727
742
|
* @returns This router instance.
|
|
728
743
|
*/
|
|
729
|
-
afterHead<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
744
|
+
afterHead<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
730
745
|
/**
|
|
731
746
|
* Define afters for Get http method and the specified paths.
|
|
732
747
|
*
|
|
733
748
|
* @param {Path} paths One or more valid route paths
|
|
734
|
-
* @param pipe One or more
|
|
749
|
+
* @param pipe One or more after handlers
|
|
735
750
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
736
751
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
737
752
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
738
753
|
* @returns This router instance.
|
|
739
754
|
*/
|
|
740
|
-
afterGet<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
755
|
+
afterGet<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
741
756
|
/**
|
|
742
757
|
* Define afters for Query http method and the specified paths.
|
|
743
758
|
*
|
|
744
759
|
* @param {Path} paths One or more valid route paths
|
|
745
|
-
* @param pipe One or more
|
|
760
|
+
* @param pipe One or more after handlers
|
|
746
761
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
747
762
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
748
763
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
749
764
|
* @returns This router instance.
|
|
750
765
|
*/
|
|
751
|
-
afterQuery<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
766
|
+
afterQuery<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
752
767
|
/**
|
|
753
768
|
* Define afters for Post http method and the specified paths.
|
|
754
769
|
*
|
|
755
770
|
* @param {Path} paths One or more valid route paths
|
|
756
|
-
* @param pipe One or more
|
|
771
|
+
* @param pipe One or more after handlers
|
|
757
772
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
758
773
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
759
774
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
760
775
|
* @returns This router instance.
|
|
761
776
|
*/
|
|
762
|
-
afterPost<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
777
|
+
afterPost<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
763
778
|
/**
|
|
764
779
|
* Define afters for Put http method and the specified paths.
|
|
765
780
|
*
|
|
766
781
|
* @param {Path} paths One or more valid route paths
|
|
767
|
-
* @param pipe One or more
|
|
782
|
+
* @param pipe One or more after handlers
|
|
768
783
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
769
784
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
770
785
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
771
786
|
* @returns This router instance.
|
|
772
787
|
*/
|
|
773
|
-
afterPut<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
788
|
+
afterPut<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
774
789
|
/**
|
|
775
790
|
* Define afters for Patch http method and the specified paths.
|
|
776
791
|
*
|
|
777
792
|
* @param {Path} paths One or more valid route paths
|
|
778
|
-
* @param pipe One or more
|
|
793
|
+
* @param pipe One or more after handlers
|
|
779
794
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
780
795
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
781
796
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
782
797
|
* @returns This router instance.
|
|
783
798
|
*/
|
|
784
|
-
afterPatch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
799
|
+
afterPatch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
785
800
|
/**
|
|
786
801
|
* Define afters for Head Delete method and the specified paths.
|
|
787
802
|
*
|
|
788
803
|
* @param {Path} paths One or more valid route paths
|
|
789
|
-
* @param pipe One or more
|
|
804
|
+
* @param pipe One or more after handlers
|
|
790
805
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
791
806
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
792
807
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
793
808
|
* @returns This router instance.
|
|
794
809
|
*/
|
|
795
|
-
afterDelete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
810
|
+
afterDelete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
796
811
|
/**
|
|
797
812
|
* Define afters for Options http method and the specified paths.
|
|
798
813
|
*
|
|
799
814
|
* @param {Path} paths One or more valid route paths
|
|
800
|
-
* @param pipe One or more
|
|
815
|
+
* @param pipe One or more after handlers
|
|
801
816
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
802
817
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
803
818
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
804
819
|
* @returns This router instance.
|
|
805
820
|
*/
|
|
806
|
-
afterOptions<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
821
|
+
afterOptions<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
807
822
|
/**
|
|
808
823
|
* Define afters for Trace http method and the specified paths.
|
|
809
824
|
*
|
|
810
825
|
* @param {Path} paths One or more valid route paths
|
|
811
|
-
* @param pipe One or more
|
|
826
|
+
* @param pipe One or more after handlers
|
|
812
827
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
813
828
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
814
829
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
815
830
|
* @returns This router instance.
|
|
816
831
|
*/
|
|
817
|
-
afterTrace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
832
|
+
afterTrace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
818
833
|
/**
|
|
819
834
|
* Define afters for Connect http method and the specified paths.
|
|
820
835
|
*
|
|
821
836
|
* @param {Path} paths One or more valid route paths
|
|
822
|
-
* @param pipe One or more
|
|
837
|
+
* @param pipe One or more after handlers
|
|
823
838
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
824
839
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
825
840
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
826
841
|
* @returns This router instance.
|
|
827
842
|
*/
|
|
828
|
-
afterConnect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
843
|
+
afterConnect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: EndHandler<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
829
844
|
/**
|
|
830
845
|
* Define catchers for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
831
846
|
*
|
|
832
847
|
* @param {Path} paths One or more valid route paths
|
|
833
|
-
* @param pipe One or more
|
|
848
|
+
* @param pipe One or more error handlers
|
|
834
849
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
835
850
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
836
851
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
837
852
|
* @returns This router instance.
|
|
838
853
|
*/
|
|
839
|
-
catchAll<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
854
|
+
catchAll<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
840
855
|
/**
|
|
841
856
|
* Define catchers for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
842
857
|
*
|
|
843
858
|
* @param {Path} paths One or more valid route paths
|
|
844
|
-
* @param pipe One or more
|
|
859
|
+
* @param pipe One or more error handlers
|
|
845
860
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
846
861
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
847
862
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
848
863
|
* @returns This router instance.
|
|
849
864
|
*/
|
|
850
|
-
catchCrud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
865
|
+
catchCrud<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
851
866
|
/**
|
|
852
867
|
* Define catchers for Head http method and the specified paths.
|
|
853
868
|
*
|
|
854
869
|
* @param {Path} paths One or more valid route paths
|
|
855
|
-
* @param pipe One or more
|
|
870
|
+
* @param pipe One or more error handlers
|
|
856
871
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
857
872
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
858
873
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
859
874
|
* @returns This router instance.
|
|
860
875
|
*/
|
|
861
|
-
catchHead<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
876
|
+
catchHead<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
862
877
|
/**
|
|
863
878
|
* Define catchers for Get http method and the specified paths.
|
|
864
879
|
*
|
|
865
880
|
* @param {Path} paths One or more valid route paths
|
|
866
|
-
* @param pipe One or more
|
|
881
|
+
* @param pipe One or more error handlers
|
|
867
882
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
868
883
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
869
884
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
870
885
|
* @returns This router instance.
|
|
871
886
|
*/
|
|
872
|
-
catchGet<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
887
|
+
catchGet<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
873
888
|
/**
|
|
874
889
|
* Define catchers for Query http method and the specified paths.
|
|
875
890
|
*
|
|
876
891
|
* @param {Path} paths One or more valid route paths
|
|
877
|
-
* @param pipe One or more
|
|
892
|
+
* @param pipe One or more error handlers
|
|
878
893
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
879
894
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
880
895
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
881
896
|
* @returns This router instance.
|
|
882
897
|
*/
|
|
883
|
-
catchQuery<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
898
|
+
catchQuery<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
884
899
|
/**
|
|
885
900
|
* Define catchers for Post http method and the specified paths.
|
|
886
901
|
*
|
|
887
902
|
* @param {Path} paths One or more valid route paths
|
|
888
|
-
* @param pipe One or more
|
|
903
|
+
* @param pipe One or more error handlers
|
|
889
904
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
890
905
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
891
906
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
892
907
|
* @returns This router instance.
|
|
893
908
|
*/
|
|
894
|
-
catchPost<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
909
|
+
catchPost<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
895
910
|
/**
|
|
896
911
|
* Define catchers for Put http method and the specified paths.
|
|
897
912
|
*
|
|
898
913
|
* @param {Path} paths One or more valid route paths
|
|
899
|
-
* @param pipe One or more
|
|
914
|
+
* @param pipe One or more error handlers
|
|
900
915
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
901
916
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
902
917
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
903
918
|
* @returns This router instance.
|
|
904
919
|
*/
|
|
905
|
-
catchPut<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
920
|
+
catchPut<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
906
921
|
/**
|
|
907
922
|
* Define catchers for Patch http method and the specified paths.
|
|
908
923
|
*
|
|
909
924
|
* @param {Path} paths One or more valid route paths
|
|
910
|
-
* @param pipe One or more
|
|
925
|
+
* @param pipe One or more error handlers
|
|
911
926
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
912
927
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
913
928
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
914
929
|
* @returns This router instance.
|
|
915
930
|
*/
|
|
916
|
-
catchPatch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
931
|
+
catchPatch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
917
932
|
/**
|
|
918
933
|
* Define catchers for Head Delete method and the specified paths.
|
|
919
934
|
*
|
|
920
935
|
* @param {Path} paths One or more valid route paths
|
|
921
|
-
* @param pipe One or more
|
|
936
|
+
* @param pipe One or more error handlers
|
|
922
937
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
923
938
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
924
939
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
925
940
|
* @returns This router instance.
|
|
926
941
|
*/
|
|
927
|
-
catchDelete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
942
|
+
catchDelete<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
928
943
|
/**
|
|
929
944
|
* Define catchers for Options http method and the specified paths.
|
|
930
945
|
*
|
|
931
946
|
* @param {Path} paths One or more valid route paths
|
|
932
|
-
* @param pipe One or more
|
|
947
|
+
* @param pipe One or more error handlers
|
|
933
948
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
934
949
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
935
950
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
936
951
|
* @returns This router instance.
|
|
937
952
|
*/
|
|
938
|
-
catchOptions<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
953
|
+
catchOptions<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
939
954
|
/**
|
|
940
955
|
* Define catchers for Trace http method and the specified paths.
|
|
941
956
|
*
|
|
942
957
|
* @param {Path} paths One or more valid route paths
|
|
943
|
-
* @param pipe One or more
|
|
958
|
+
* @param pipe One or more error handlers
|
|
944
959
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
945
960
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
946
961
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
947
962
|
* @returns This router instance.
|
|
948
963
|
*/
|
|
949
|
-
catchTrace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
964
|
+
catchTrace<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
950
965
|
/**
|
|
951
966
|
* Define catchers for Connect http method and the specified paths.
|
|
952
967
|
*
|
|
953
968
|
* @param {Path} paths One or more valid route paths
|
|
954
|
-
* @param pipe One or more
|
|
969
|
+
* @param pipe One or more error handlers
|
|
955
970
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
956
971
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
957
972
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
958
973
|
* @returns This router instance.
|
|
959
974
|
*/
|
|
960
|
-
catchConnect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths:
|
|
975
|
+
catchConnect<ExtendContextMore extends Record<string, unknown> = EmptyRecord, P extends Path = Path>(paths: P | Array<P>, pipe: ErrorHandler<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractParams<P>> & CTError & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
961
976
|
/**
|
|
962
977
|
* Define filters for the specified method paths.
|
|
963
978
|
*
|
|
964
979
|
* @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
|
|
980
|
+
* @param pipe One or more filtering handlers
|
|
966
981
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
967
982
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
968
983
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
969
984
|
* @returns This router instance.
|
|
970
985
|
*/
|
|
971
|
-
filter<ExtendContextMore extends Record<string, unknown> = EmptyRecord>(methodPaths:
|
|
986
|
+
filter<ExtendContextMore extends Record<string, unknown> = EmptyRecord, MP extends MethodPath = MethodPath, P extends Path = Path>(methodPaths: MP | Array<MP> | [Array<HttpMethod>, ...Array<P>], pipe: Handler<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
972
987
|
/**
|
|
973
988
|
* Define handlers for the specified method paths.
|
|
974
989
|
*
|
|
975
990
|
* @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
|
|
991
|
+
* @param pipe One or more main handlers
|
|
977
992
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
978
993
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
979
994
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
980
995
|
* @returns This router instance.
|
|
981
996
|
*/
|
|
982
|
-
handle<ExtendContextMore extends Record<string, unknown> = EmptyRecord>(methodPaths:
|
|
997
|
+
handle<ExtendContextMore extends Record<string, unknown> = EmptyRecord, MP extends MethodPath = MethodPath, P extends Path = Path>(methodPaths: MP | Array<MP> | [Array<HttpMethod>, ...Array<P>], pipe: Handler<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
983
998
|
/**
|
|
984
999
|
* Define fallbacks for the specified method paths.
|
|
985
1000
|
*
|
|
986
1001
|
* @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
|
|
1002
|
+
* @param pipe One or more fallback handlers
|
|
988
1003
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
989
1004
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
990
1005
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
991
1006
|
* @returns This router instance.
|
|
992
1007
|
*/
|
|
993
|
-
fallback<ExtendContextMore extends Record<string, unknown> = EmptyRecord>(methodPaths:
|
|
1008
|
+
fallback<ExtendContextMore extends Record<string, unknown> = EmptyRecord, MP extends MethodPath = MethodPath, P extends Path = Path>(methodPaths: MP | Array<MP> | [Array<HttpMethod>, ...Array<P>], pipe: Handler<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
994
1009
|
/**
|
|
995
1010
|
* Define afters for the specified method paths.
|
|
996
1011
|
*
|
|
997
1012
|
* @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
|
|
1013
|
+
* @param pipe One or more after handlers
|
|
999
1014
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1000
1015
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1001
1016
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
1002
1017
|
* @returns This router instance.
|
|
1003
1018
|
*/
|
|
1004
|
-
after<ExtendContextMore extends Record<string, unknown> = EmptyRecord>(methodPaths:
|
|
1019
|
+
after<ExtendContextMore extends Record<string, unknown> = EmptyRecord, MP extends MethodPath = MethodPath, P extends Path = Path>(methodPaths: MP | Array<MP> | [Array<HttpMethod>, ...Array<P>], pipe: EndHandler<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore> | EndPipe<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
1005
1020
|
/**
|
|
1006
1021
|
* Define catchers for the specified method paths.
|
|
1007
1022
|
*
|
|
1008
1023
|
* @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
|
|
1024
|
+
* @param pipe One or more error handlers
|
|
1010
1025
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1011
1026
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1012
1027
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
1013
1028
|
* @returns This router instance.
|
|
1014
1029
|
*/
|
|
1015
|
-
catch<ExtendContextMore extends Record<string, unknown> = EmptyRecord>(methodPaths:
|
|
1030
|
+
catch<ExtendContextMore extends Record<string, unknown> = EmptyRecord, MP extends MethodPath = MethodPath, P extends Path = Path>(methodPaths: MP | Array<MP> | [Array<HttpMethod>, ...Array<P>], pipe: ErrorHandler<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
1016
1031
|
/**
|
|
1017
1032
|
* Register route handlers for the specified handler type and method paths.
|
|
1018
1033
|
*
|
|
@@ -1024,7 +1039,7 @@ export declare class Router<_ExtendContext extends Record<string, unknown> = Emp
|
|
|
1024
1039
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
1025
1040
|
* @returns This router instance.
|
|
1026
1041
|
*/
|
|
1027
|
-
register(handlerType: HandlerType, methodPaths:
|
|
1042
|
+
register<ExtendContextMore extends Record<string, unknown> = EmptyRecord, MP extends MethodPath = MethodPath, P extends Path = Path>(handlerType: HandlerType, methodPaths: MP | Array<MP>, pipe: Handler<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore> | Pipe<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore> | ErrorHandler<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore> | ErrorPipe<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore> | EndHandler<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore> | EndPipe<CTParams<ExtractMethodPathsParams<MP> | ExtractParams<P>> & ExtendContext & ExtendContextMore>, options?: RegisterPipelineOptions | RegisterPipelineOptions): Router<_ExtendContext, ExtendContext>;
|
|
1028
1043
|
/**
|
|
1029
1044
|
*
|
|
1030
1045
|
* @param pathname Valid url pathname
|
|
@@ -1034,6 +1049,42 @@ export declare class Router<_ExtendContext extends Record<string, unknown> = Emp
|
|
|
1034
1049
|
* @returns -count if path parts are greater than maxPath.
|
|
1035
1050
|
*/
|
|
1036
1051
|
splitPath(pathname: string, parts: string[], maxPath: number): number;
|
|
1052
|
+
/**
|
|
1053
|
+
* Generates a routes object keyed by pathname then by method then by handler-type.
|
|
1054
|
+
*
|
|
1055
|
+
* @returns Routes object
|
|
1056
|
+
*/
|
|
1057
|
+
getRoutesByPathnameThenMethod(): Record<Path, Partial<Record<HttpMethodUpper, Partial<Record<HandlerType, Handler<ExtendContext> | Pipe<ExtendContext>>>>>>;
|
|
1058
|
+
/**
|
|
1059
|
+
* Generates a routes object keyed by pathname then by handler-type then by method.
|
|
1060
|
+
*
|
|
1061
|
+
* @returns Routes object
|
|
1062
|
+
*/
|
|
1063
|
+
getRoutesByPathnameThenHandlerType(): Record<Path, Partial<Record<HandlerType, Partial<Record<HttpMethodUpper, Handler<ExtendContext> | Pipe<ExtendContext>>>>>>;
|
|
1064
|
+
/**
|
|
1065
|
+
* Generates a routes object keyed by method then by pathname then by handler-type.
|
|
1066
|
+
*
|
|
1067
|
+
* @returns Routes object
|
|
1068
|
+
*/
|
|
1069
|
+
getRoutesByMethodThenPathname(): Partial<Record<HttpMethodUpper, Record<Path, Partial<Record<HandlerType, Handler<ExtendContext> | Pipe<ExtendContext>>>>>>;
|
|
1070
|
+
/**
|
|
1071
|
+
* Generates a routes object keyed by method then by handler-type then by pathname.
|
|
1072
|
+
*
|
|
1073
|
+
* @returns Routes object
|
|
1074
|
+
*/
|
|
1075
|
+
getRoutesByMethodThenHandlerType(): Partial<Record<HttpMethodUpper, Partial<Record<HandlerType, Record<Path, Handler<ExtendContext> | Pipe<ExtendContext>>>>>>;
|
|
1076
|
+
/**
|
|
1077
|
+
* Generates a routes object keyed by handler-type then by method then by pathname.
|
|
1078
|
+
*
|
|
1079
|
+
* @returns Routes object
|
|
1080
|
+
*/
|
|
1081
|
+
getRoutesByHandlerTypeThenMethod(): Partial<Record<HandlerType, Partial<Record<HttpMethodUpper, Record<Path, Handler<ExtendContext> | Pipe<ExtendContext>>>>>>;
|
|
1082
|
+
/**
|
|
1083
|
+
* Generates a routes object keyed by handler-type then by pathname then by method.
|
|
1084
|
+
*
|
|
1085
|
+
* @returns Routes object
|
|
1086
|
+
*/
|
|
1087
|
+
getRoutesByHandlerTypeThenPathname(): Partial<Record<HandlerType, Record<Path, Partial<Record<HttpMethodUpper, Handler<ExtendContext> | Pipe<ExtendContext>>>>>>;
|
|
1037
1088
|
}
|
|
1038
1089
|
/**
|
|
1039
1090
|
* Translate route definition file pathname into valid route pathname.
|