UNPKG

2.27 kBTypeScriptView Raw
1import { RequestMethod } from '../../enums/request-method.enum';
2export interface RequestMappingMetadata {
3 path?: string | string[];
4 method?: RequestMethod;
5}
6export declare const RequestMapping: (metadata?: RequestMappingMetadata) => MethodDecorator;
7/**
8 * Route handler (method) Decorator. Routes HTTP POST requests to the specified path.
9 *
10 * @see [Routing](https://docs.nestjs.com/controllers#routing)
11 *
12 * @publicApi
13 */
14export declare const Post: (path?: string | string[]) => MethodDecorator;
15/**
16 * Route handler (method) Decorator. Routes HTTP GET requests to the specified path.
17 *
18 * @see [Routing](https://docs.nestjs.com/controllers#routing)
19 *
20 * @publicApi
21 */
22export declare const Get: (path?: string | string[]) => MethodDecorator;
23/**
24 * Route handler (method) Decorator. Routes HTTP DELETE requests to the specified path.
25 *
26 * @see [Routing](https://docs.nestjs.com/controllers#routing)
27 *
28 * @publicApi
29 */
30export declare const Delete: (path?: string | string[]) => MethodDecorator;
31/**
32 * Route handler (method) Decorator. Routes HTTP PUT requests to the specified path.
33 *
34 * @see [Routing](https://docs.nestjs.com/controllers#routing)
35 *
36 * @publicApi
37 */
38export declare const Put: (path?: string | string[]) => MethodDecorator;
39/**
40 * Route handler (method) Decorator. Routes HTTP PATCH requests to the specified path.
41 *
42 * @see [Routing](https://docs.nestjs.com/controllers#routing)
43 *
44 * @publicApi
45 */
46export declare const Patch: (path?: string | string[]) => MethodDecorator;
47/**
48 * Route handler (method) Decorator. Routes HTTP OPTIONS requests to the specified path.
49 *
50 * @see [Routing](https://docs.nestjs.com/controllers#routing)
51 *
52 * @publicApi
53 */
54export declare const Options: (path?: string | string[]) => MethodDecorator;
55/**
56 * Route handler (method) Decorator. Routes HTTP HEAD requests to the specified path.
57 *
58 * @see [Routing](https://docs.nestjs.com/controllers#routing)
59 *
60 * @publicApi
61 */
62export declare const Head: (path?: string | string[]) => MethodDecorator;
63/**
64 * Route handler (method) Decorator. Routes all HTTP requests to the specified path.
65 *
66 * @see [Routing](https://docs.nestjs.com/controllers#routing)
67 *
68 * @publicApi
69 */
70export declare const All: (path?: string | string[]) => MethodDecorator;