@nestjs/common

  • Version 12.1.2
  • Published
  • 543 kB
  • 6 dependencies
  • MIT license

Install

npm i @nestjs/common
yarn add @nestjs/common
pnpm add @nestjs/common

Overview

Nest - modern, fast, powerful node.js web framework (@common)

Index

Variables

Functions

Classes

Interfaces

Enums

Type Aliases

Variables

variable LOG_LEVELS

const LOG_LEVELS: ['verbose', 'debug', 'log', 'warn', 'error', 'fatal'];

    variable SSE_ABORT_CONTROLLER

    const SSE_ABORT_CONTROLLER: Symbol;
    • Symbol used to carry the per-request SSE AbortController on the request object.

      The controller is attached by the framework before the route handler runs and is aborted when the client disconnects. Its signal is exposed to route handlers through the @SseSignal() parameter decorator.

    variable VERSION_NEUTRAL

    const VERSION_NEUTRAL: Symbol;
    • Indicates that this will work for any version passed in the request, or no version.

    Functions

    function All

    All: (path?: string | string[]) => MethodDecorator;
    • Route handler (method) Decorator. Routes all HTTP requests to the specified path.

      See Also

      • [Routing](https://docs.nestjs.com/controllers#routing)

    function applyDecorators

    applyDecorators: (
    ...decorators: Array<ClassDecorator | MethodDecorator | PropertyDecorator>
    ) => <TFunction extends Function, Y>(
    target: object | TFunction,
    propertyKey?: string | symbol,
    descriptor?: TypedPropertyDescriptor<Y>
    ) => void;
    • Function that returns a new decorator that applies all decorators provided by param

      Useful to build new decorators (or a decorator factory) encapsulating multiple decorators related with the same feature

      Parameter decorators

      one or more decorators (e.g., ApplyGuard(...))

    function assignMetadata

    assignMetadata: <TParamtype = any, TArgs = any>(
    args: TArgs,
    paramtype: TParamtype,
    index: number,
    options?: ({ data?: ParamData } & ParameterDecoratorOptions) | ParamData,
    ...legacyPipes: (Type<PipeTransform> | PipeTransform)[]
    ) => TArgs & {
    [x: string]: {
    schema?: StandardSchemaV1<unknown, unknown> | undefined;
    index: number;
    data: ParamData | undefined;
    pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[];
    };
    };

      function Bind

      Bind: (...decorators: any[]) => MethodDecorator;
      • Decorator that binds *parameter decorators* to the method that follows.

        Useful when the language doesn't provide a 'Parameter Decorator' feature (i.e., vanilla JavaScript).

        Parameter decorators

        one or more parameter decorators (e.g., Req())

      function Body

      Body: {
      (): ParameterDecorator;
      (
      ...pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[]
      ): ParameterDecorator;
      (options: ParameterDecoratorOptions): ParameterDecorator;
      (
      property: string,
      ...pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[]
      ): ParameterDecorator;
      (property: string, options: ParameterDecoratorOptions): ParameterDecorator;
      };
      • Route handler parameter decorator. Extracts the entire body object from the req object and populates the decorated parameter with the value of body.

        For example:

        async create(@Body() createDto: CreateCatDto)

        See Also

        • [Request object](https://docs.nestjs.com/controllers#request-object)

      • Route handler parameter decorator. Extracts the entire body object from the req object and populates the decorated parameter with the value of body. Also applies the specified pipes to that parameter.

        For example:

        async create(@Body(new ValidationPipe()) createDto: CreateCatDto)

        Parameter pipes

        one or more pipes - either instances or classes - to apply to the bound body parameter.

        See Also

        • [Request object](https://docs.nestjs.com/controllers#request-object)

        • [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes)

      • Route handler parameter decorator. Extracts the entire body object property, or optionally a named property of the body object, from the req object and populates the decorated parameter with that value.

        For example:

        async create(@Body('role') role: string)

        Parameter options

        options to apply to the bound body parameter.

        See Also

        • [Request object](https://docs.nestjs.com/controllers#request-object)

      • Route handler parameter decorator. Extracts a single property from the body object property of the req object and populates the decorated parameter with the value of that property. Also applies pipes to the bound body parameter.

        For example:

        async create(@Body('role', new ValidationPipe()) role: string)

        Parameter property

        name of single property to extract from the body object

        Parameter pipes

        one or more pipes - either instances or classes - to apply to the bound body parameter.

        See Also

        • [Request object](https://docs.nestjs.com/controllers#request-object)

        • [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes)

      • Route handler parameter decorator. Extracts the entire body object property, or optionally a named property of the body object, from the req object and populates the decorated parameter with that value. Also applies pipes to the bound body parameter.

        For example:

        async create(@Body('role', new ValidationPipe()) role: string)

        Parameter property

        name of single property to extract from the body object

        Parameter options

        options to apply to the bound body parameter.

        See Also

        • [Request object](https://docs.nestjs.com/controllers#request-object)

        • [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes)

      function Catch

      Catch: (...exceptions: Array<Type<any> | Abstract<any>>) => ClassDecorator;
      • Decorator that marks a class as a Nest exception filter. An exception filter handles exceptions thrown by or not handled by your application code.

        The decorated class must implement the ExceptionFilter interface.

        Parameter exceptions

        one or more exception *types* specifying the exceptions to be caught and handled by this filter.

        See Also

        • [Exception Filters](https://docs.nestjs.com/exception-filters)

          Exception filters are applied using the @UseFilters() decorator, or (globally) with app.useGlobalFilters().

      function Controller

      Controller: {
      (): ClassDecorator;
      (prefix: string | string[]): ClassDecorator;
      (options: ControllerOptions): ClassDecorator;
      };
      • Decorator that marks a class as a Nest controller that can receive inbound requests and produce responses.

        An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses. It defines a class that provides the context for one or more related route handlers that correspond to HTTP request methods and associated routes for example GET /api/profile, POST /users/resume.

        A Microservice Controller responds to requests as well as events, running over a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics). It defines a class that provides a context for one or more message or event handlers.

        See Also

        • [Controllers](https://docs.nestjs.com/controllers)

        • [Microservices](https://docs.nestjs.com/microservices/basics#request-response)

      • Decorator that marks a class as a Nest controller that can receive inbound requests and produce responses.

        An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses. It defines a class that provides the context for one or more related route handlers that correspond to HTTP request methods and associated routes for example GET /api/profile, POST /users/resume.

        A Microservice Controller responds to requests as well as events, running over a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics). It defines a class that provides a context for one or more message or event handlers.

        Parameter prefix

        string that defines a route path prefix. The prefix is pre-pended to the path specified in any request decorator in the class.

        See Also

        • [Routing](https://docs.nestjs.com/controllers#routing)

        • [Controllers](https://docs.nestjs.com/controllers)

        • [Microservices](https://docs.nestjs.com/microservices/basics#request-response)

      • Decorator that marks a class as a Nest controller that can receive inbound requests and produce responses.

        An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses. It defines a class that provides the context for one or more related route handlers that correspond to HTTP request methods and associated routes for example GET /api/profile, POST /users/resume.

        A Microservice Controller responds to requests as well as events, running over a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics). It defines a class that provides a context for one or more message or event handlers.

        Parameter options

        configuration object specifying:

        - scope - symbol that determines the lifetime of a Controller instance. [See Scope](https://docs.nestjs.com/fundamentals/injection-scopes#usage) for more details. - prefix - string that defines a route path prefix. The prefix is pre-pended to the path specified in any request decorator in the class. - version - string, array of strings, or Symbol that defines the version of all routes in the class. [See Versioning](https://docs.nestjs.com/techniques/versioning) for more details.

        See Also

        • [Routing](https://docs.nestjs.com/controllers#routing)

        • [Controllers](https://docs.nestjs.com/controllers)

        • [Microservices](https://docs.nestjs.com/microservices/basics#request-response)

        • [Versioning](https://docs.nestjs.com/techniques/versioning)

      function Cookies

      Cookies: (
      property?: string | (Type<PipeTransform> | PipeTransform),
      ...pipes: (Type<PipeTransform> | PipeTransform)[]
      ) => ParameterDecorator;
      • Route handler parameter decorator. Extracts the cookies sent with the request (all of them, or a single one by name) and populates the decorated parameter with that value. May also apply pipes to the bound parameter.

        Works the same on every HTTP adapter, with no extra package: the Cookie header is parsed once per request. When a cookie middleware (such as cookie-parser or @fastify/cookie) already populated req.cookies, that object is used instead. Signatures are not verified here; read signed cookies with @SignedCookies().

        For example:

        findAll(@Cookies('theme') theme?: string)

        Parameter property

        name of a single cookie to extract

        Parameter pipes

        one or more pipes to apply to the bound parameter

        See Also

        • [Cookies](https://docs.nestjs.com/techniques/cookies)

      function Copy

      Copy: (path?: string | string[]) => MethodDecorator;
      • Route handler (method) Decorator. Routes Webdav COPY requests to the specified path.

        See Also

        • [Routing](https://docs.nestjs.com/controllers#routing)

      function createParamDecorator

      createParamDecorator: <FactoryData = any, FactoryOutput = any>(
      factory: CustomParamFactory<FactoryData, FactoryOutput>,
      enhancers?: ParamDecoratorEnhancer[]
      ) => (
      ...dataOrPipes: (
      | Type<PipeTransform>
      | PipeTransform
      | FactoryData
      | ParameterDecoratorOptions
      )[]
      ) => ParameterDecorator;
      • Defines route param decorator

        Parameter factory

        Parameter enhancers

      function Delete

      Delete: (path?: string | string[]) => MethodDecorator;
      • Route handler (method) Decorator. Routes HTTP DELETE requests to the specified path.

        See Also

        • [Routing](https://docs.nestjs.com/controllers#routing)

      function Dependencies

      Dependencies: (...dependencies: Array<unknown>) => ClassDecorator;
      • Decorator that sets required dependencies (required with a vanilla JavaScript objects)

      function filterLogLevels

      filterLogLevels: (parseableString?: string) => LogLevel[];

      function flatten

      flatten: <T extends unknown[] = any>(
      arr: T
      ) => T extends (infer R)[] ? R : never;

        function forwardRef

        forwardRef: (fn: () => any) => ForwardReference;

        function Get

        Get: (path?: string | string[]) => MethodDecorator;
        • Route handler (method) Decorator. Routes HTTP GET requests to the specified path.

          See Also

          • [Routing](https://docs.nestjs.com/controllers#routing)

        function Global

        Global: () => ClassDecorator;
        • Decorator that makes a module global-scoped.

          Once imported into any module, a global-scoped module will be visible in all modules. Thereafter, modules that wish to inject a service exported from a global module do not need to import the provider module.

          See Also

          • [Global modules](https://docs.nestjs.com/modules#global-modules)

        Head: (path?: string | string[]) => MethodDecorator;
        • Route handler (method) Decorator. Routes HTTP HEAD requests to the specified path.

          See Also

          • [Routing](https://docs.nestjs.com/controllers#routing)

        Header: (name: string, value: string | (() => string)) => MethodDecorator;
        • Request method Decorator. Sets a response header.

          For example: @Header('Cache-Control', 'none') @Header('Cache-Control', () => 'none')

          Parameter name

          string to be used for header name

          Parameter value

          string to be used for header value

          See Also

          • [Headers](https://docs.nestjs.com/controllers#headers)

        function Headers

        Headers: (property?: string) => ParameterDecorator;
        • Route handler parameter decorator. Extracts the headers property from the req object and populates the decorated parameter with the value of headers.

          For example: async update(@Headers('Cache-Control') cacheControl: string)

          Parameter property

          name of single header property to extract.

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

        function HostParam

        HostParam: { (): ParameterDecorator; (property: string): ParameterDecorator };
        • Route handler parameter decorator. Extracts the hosts property from the req object and populates the decorated parameter with the value of hosts. May also apply pipes to the bound parameter.

          For example, extracting all params:

          findOne(@HostParam() params: string[])

          For example, extracting a single param:

          findOne(@HostParam('id') id: string)

          Parameter property

          name of single property to extract from the req object

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

        function HttpCode

        HttpCode: (statusCode: number) => MethodDecorator;
        • Request method Decorator. Defines the HTTP response status code. Overrides default status code for the decorated request method.

          Parameter statusCode

          HTTP response code to be returned by route handler.

          See Also

          • [Http Status Codes](https://docs.nestjs.com/controllers#status-code)

        function Inject

        Inject: (
        token?: InjectionToken | ForwardReference
        ) => PropertyDecorator & ParameterDecorator;
        • Decorator that marks a constructor parameter as a target for [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection).

          Any injected provider must be visible within the module scope (loosely speaking, the containing module) of the class it is being injected into. This can be done by:

          - defining the provider in the same module scope - exporting the provider from one module scope and importing that module into the module scope of the class being injected into - exporting the provider from a module that is marked as global using the @Global() decorator

          #### Injection tokens Can be *types* (class names), *strings* or *symbols*. This depends on how the provider with which it is associated was defined. Providers defined with the @Injectable() decorator use the class name. Custom Providers may use strings or symbols as the injection token.

          Parameter token

          lookup key for the provider to be injected (assigned to the constructor parameter).

          See Also

          • [Providers](https://docs.nestjs.com/providers)

          • [Custom Providers](https://docs.nestjs.com/fundamentals/custom-providers)

          • [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes)

        function Injectable

        Injectable: (options?: InjectableOptions) => ClassDecorator;
        • Decorator that marks a class as a [provider](https://docs.nestjs.com/providers). Providers can be injected into other classes via constructor parameter injection using Nest's built-in [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection) system.

          When injecting a provider, it must be visible within the module scope (loosely speaking, the containing module) of the class it is being injected into. This can be done by:

          - defining the provider in the same module scope - exporting the provider from one module scope and importing that module into the module scope of the class being injected into - exporting the provider from a module that is marked as global using the @Global() decorator

          Providers can also be defined in a more explicit and imperative form using various [custom provider](https://docs.nestjs.com/fundamentals/custom-providers) techniques that expose more capabilities of the DI system.

          Parameter options

          options specifying scope of injectable

          See Also

          • [Providers](https://docs.nestjs.com/providers)

          • [Custom Providers](https://docs.nestjs.com/fundamentals/custom-providers)

          • [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes)

        function Ip

        Ip: () => ParameterDecorator;
        • Route handler parameter decorator. Extracts the Ip property from the req object and populates the decorated parameter with the value of ip.

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

        function Lock

        Lock: (path?: string | string[]) => MethodDecorator;
        • Route handler (method) Decorator. Routes Webdav LOCK requests to the specified path.

          See Also

          • [Routing](https://docs.nestjs.com/controllers#routing)

        function mixin

        mixin: <T>(mixinClass: Type<T>) => Type<T>;

        function Mkcol

        Mkcol: (path?: string | string[]) => MethodDecorator;
        • Route handler (method) Decorator. Routes Webdav MKCOL requests to the specified path.

          See Also

          • [Routing](https://docs.nestjs.com/controllers#routing)

        function Module

        Module: (metadata: ModuleMetadata) => ClassDecorator;
        • Decorator that marks a class as a [module](https://docs.nestjs.com/modules).

          Modules are used by Nest to organize the application structure into scopes. Controllers and Providers are scoped by the module they are declared in. Modules and their classes (Controllers and Providers) form a graph that determines how Nest performs [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection).

          Parameter metadata

          module configuration metadata

          See Also

          • [Modules](https://docs.nestjs.com/modules)

        function Move

        Move: (path?: string | string[]) => MethodDecorator;
        • Route handler (method) Decorator. Routes Webdav MOVE requests to the specified path.

          See Also

          • [Routing](https://docs.nestjs.com/controllers#routing)

        function Next

        Next: () => ParameterDecorator;
        • Route handler parameter decorator. Extracts reference to the Next function from the underlying platform and populates the decorated parameter with the value of Next.

        function Optional

        Optional: () => PropertyDecorator & ParameterDecorator;
        • Parameter decorator for an injected dependency marking the dependency as optional.

          For example:

          constructor(@Optional() @Inject('HTTP_OPTIONS')private readonly httpClient: T) {}

          See Also

          • [Optional providers](https://docs.nestjs.com/providers#optional-providers)

        function Options

        Options: (path?: string | string[]) => MethodDecorator;
        • Route handler (method) Decorator. Routes HTTP OPTIONS requests to the specified path.

          See Also

          • [Routing](https://docs.nestjs.com/controllers#routing)

        function Param

        Param: {
        (): ParameterDecorator;
        (
        ...pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[]
        ): ParameterDecorator;
        (
        property: string,
        ...pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[]
        ): ParameterDecorator;
        (property: string, options: ParameterDecoratorOptions): ParameterDecorator;
        (options: ParameterDecoratorOptions): ParameterDecorator;
        };
        • Route handler parameter decorator. Extracts the params property from the req object and populates the decorated parameter with the value of params. May also apply pipes to the bound parameter.

          For example, extracting all params:

          findOne(@Param() params: string[])

          For example, extracting a single param:

          findOne(@Param('id') id: string)

          Parameter property

          name of single property to extract from the req object

          Parameter pipes

          one or more pipes - either instances or classes - to apply to the bound parameter.

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

          • [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes)

        • Route handler parameter decorator. Extracts the params property from the req object and populates the decorated parameter with the value of params. May also apply pipes to the bound parameter.

          For example, extracting a single param:

          findOne(@Param('id', { schema: z.string().uuid() }) id: string)

          Parameter property

          name of single property to extract from the req object

          Parameter options

          options object containing additional configuration for the decorator, such as pipes and schema

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

          • [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes)

        • Route handler parameter decorator. Extracts the params property from the req object and populates the decorated parameter with the value of params. May also apply pipes to the bound parameter.

          For example:

          findOne(@Param({ schema: z.object({ id: z.string().uuid() }) }) params)

          Parameter options

          options object containing additional configuration for the decorator, such as pipes and schema

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

          • [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes)

        function Patch

        Patch: (path?: string | string[]) => MethodDecorator;
        • Route handler (method) Decorator. Routes HTTP PATCH requests to the specified path.

          See Also

          • [Routing](https://docs.nestjs.com/controllers#routing)

        function Post

        Post: (path?: string | string[]) => MethodDecorator;
        • Route handler (method) Decorator. Routes HTTP POST requests to the specified path.

          See Also

          • [Routing](https://docs.nestjs.com/controllers#routing)

        function Propfind

        Propfind: (path?: string | string[]) => MethodDecorator;
        • Route handler (method) Decorator. Routes Webdav PROPFIND requests to the specified path.

          See Also

          • [Routing](https://docs.nestjs.com/controllers#routing)

        function Proppatch

        Proppatch: (path?: string | string[]) => MethodDecorator;
        • Route handler (method) Decorator. Routes Webdav PROPPATCH requests to the specified path.

          See Also

          • [Routing](https://docs.nestjs.com/controllers#routing)

        function Put

        Put: (path?: string | string[]) => MethodDecorator;
        • Route handler (method) Decorator. Routes HTTP PUT requests to the specified path.

          See Also

          • [Routing](https://docs.nestjs.com/controllers#routing)

        function Query

        Query: {
        (): ParameterDecorator;
        (
        ...pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[]
        ): ParameterDecorator;
        (
        property: string,
        ...pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[]
        ): ParameterDecorator;
        (property: string, options: ParameterDecoratorOptions): ParameterDecorator;
        (options: ParameterDecoratorOptions): ParameterDecorator;
        };
        • Route handler parameter decorator. Extracts the query property from the req object and populates the decorated parameter with the value of query. May also apply pipes to the bound query parameter.

          For example:

          async find(@Query('user') user: string)

          Parameter property

          name of single property to extract from the query object

          Parameter pipes

          one or more pipes to apply to the bound query parameter

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

        • Route handler parameter decorator. Extracts the query property from the req object and populates the decorated parameter with the value of query. May also apply pipes to the bound query parameter.

          For example:

          async find(@Query('user') user: string)

          Parameter property

          name of single property to extract from the query object

          Parameter options

          options object containing additional configuration for the decorator, such as pipes and schema

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

        • Route handler parameter decorator. Extracts the query property from the req object and populates the decorated parameter with the value of query. May also apply pipes to the bound query parameter.

          For example:

          async find(@Query({ schema: z.object({ user: z.string() }) }) query)

          Parameter options

          options object containing additional configuration for the decorator, such as pipes and schema

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

        function QueryMethod

        QueryMethod: (path?: string | string[]) => MethodDecorator;
        • Route handler (method) Decorator. Routes HTTP QUERY requests to the specified path.

          **Note**: this is named QueryMethod (rather than Query) to avoid a name clash with the @Query() parameter decorator used to extract query-string params.

          See Also

          • [Routing](https://docs.nestjs.com/controllers#routing)

        function RawBody

        RawBody: {
        (): ParameterDecorator;
        (
        ...pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[]
        ): ParameterDecorator;
        (options: ParameterDecoratorOptions): ParameterDecorator;
        };
        • Route handler parameter decorator. Extracts the rawBody Buffer property from the req object and populates the decorated parameter with that value.

          For example:

          async create(@RawBody() rawBody: Buffer | undefined)

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

          • [Raw body](https://docs.nestjs.com/faq/raw-body)

        • Route handler parameter decorator. Extracts the rawBody Buffer property from the req object and populates the decorated parameter with that value. Also applies pipes to the bound rawBody parameter.

          For example:

          async create(@RawBody(new ValidationPipe()) rawBody: Buffer)

          Parameter pipes

          one or more pipes - either instances or classes - to apply to the bound body parameter.

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

          • [Raw body](https://docs.nestjs.com/faq/raw-body)

          • [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes)

        • Route handler parameter decorator. Extracts the rawBody Buffer property from the req object and populates the decorated parameter with that value. Also applies pipes to the bound rawBody parameter.

          For example:

          async create(@RawBody({ schema: z.instanceof(Buffer) }) rawBody: Buffer)

          Parameter options

          options object containing additional configuration for the decorator, such as pipes and schema

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

          • [Raw body](https://docs.nestjs.com/faq/raw-body)

          • [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes)

        function Redirect

        Redirect: (url?: string, statusCode?: number) => MethodDecorator;
        • Redirects request to the specified URL.

        function Render

        Render: (template: string) => MethodDecorator;
        • Route handler method Decorator. Defines a template to be rendered by the controller.

          For example: @Render('index')

          Parameter template

          name of the render engine template file

          See Also

          • [Model-View-Controller](https://docs.nestjs.com/techniques/mvc)

        function Req

        Req: () => ParameterDecorator;
        • Route handler parameter decorator. Extracts the Request object from the underlying platform and populates the decorated parameter with the value of Request.

          Alias for @Request().

          Example: logout(@Req() req)

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

        function Request

        Request: () => ParameterDecorator;
        • Route handler parameter decorator. Extracts the Request object from the underlying platform and populates the decorated parameter with the value of Request.

          Example: logout(@Request() req)

          See Also

          • [Request object](https://docs.nestjs.com/controllers#request-object)

        function RequestMapping

        RequestMapping: (metadata?: RequestMappingMetadata) => MethodDecorator;

          function Res

          Res: (options?: ResponseDecoratorOptions) => ParameterDecorator;
          • Route handler parameter decorator. Extracts the Response object from the underlying platform and populates the decorated parameter with the value of Response.

            Alias for @Response().

            Example: logout(@Res() res)

            See Also

            • [Response object](https://docs.nestjs.com/controllers#response-object)

          function Response

          Response: (options?: ResponseDecoratorOptions) => ParameterDecorator;
          • Route handler parameter decorator. Extracts the Response object from the underlying platform and populates the decorated parameter with the value of Response.

            Example: logout(@Response() res)

          Search: (path?: string | string[]) => MethodDecorator;
          • Route handler (method) Decorator. Routes HTTP SEARCH requests to the specified path.

            See Also

            • [Routing](https://docs.nestjs.com/controllers#routing)

          function SerializeOptions

          SerializeOptions: (
          options: ClassSerializerContextOptions | StandardSchemaSerializerContextOptions
          ) => import('../../decorators/index.js').CustomDecorator<string>;

          function Session

          Session: () => ParameterDecorator;
          • Route handler parameter decorator. Extracts the Session object from the underlying platform and populates the decorated parameter with the value of Session.

            See Also

            • [Request object](https://docs.nestjs.com/controllers#request-object)

          function SetMetadata

          SetMetadata: <K = string, V = any>(
          metadataKey: K,
          metadataValue: V
          ) => CustomDecorator<K>;
          • Decorator that assigns metadata to the class/function using the specified key.

            Requires two parameters: - key - a value defining the key under which the metadata is stored - value - metadata to be associated with key

            This metadata can be reflected using the Reflector class.

            Example: @SetMetadata('roles', ['admin'])

            See Also

            • [Reflection](https://docs.nestjs.com/fundamentals/execution-context#reflection-and-metadata)

          function SignedCookies

          SignedCookies: (
          property?: string | (Type<PipeTransform> | PipeTransform),
          ...pipes: (Type<PipeTransform> | PipeTransform)[]
          ) => ParameterDecorator;
          • Route handler parameter decorator. Extracts the signed cookies sent with the request (all of them, or a single one by name), verified against the cookies.secret application option, and populates the decorated parameter with the unsigned value. A cookie whose signature does not verify resolves to undefined (and is left out when reading all signed cookies).

            Without a cookies.secret, falls back to req.signedCookies as populated by cookie-parser; when neither is available, resolving the parameter throws.

            For example:

            profile(@SignedCookies('uid') userId?: string)

            Parameter property

            name of a single signed cookie to extract

            Parameter pipes

            one or more pipes to apply to the bound parameter

            See Also

            • [Cookies](https://docs.nestjs.com/techniques/cookies)

          function Sse

          Sse: (
          path?: string,
          options?: { [METHOD_METADATA]?: RequestMethod }
          ) => MethodDecorator;
          • Declares this route as a Server-Sent-Events endpoint

          function SseSignal

          SseSignal: () => ParameterDecorator;
          • Route handler parameter decorator that injects the AbortSignal associated with a Server-Sent-Events (SSE) request.

            The signal represents the lifetime of the SSE response: it is aborted once the stream terminates, whether because the client disconnected, the Observable completed, or it errored. Tying setup-phase resources to the signal therefore releases them exactly once on every exit path, including resources allocated before the returned Observable exists — which would otherwise leak, since the producer is never subscribed once the client has disconnected.

            Because the signal also aborts on normal completion, signal.aborted is only meaningful as a "did the client go away?" check *during setup*, before the Observable is returned; at that point the stream cannot have completed yet. Cleanup wired to the abort event should be idempotent, as it may run alongside the Observable's own teardown.

            Example 1

            @Sse('stream')
            async stream(@SseSignal() signal: AbortSignal): Promise<Observable<MessageEvent>> {
            const session = await createSession();
            if (signal.aborted) {
            await session.close();
            return EMPTY;
            }
            return new Observable(subscriber => {
            const stream = startGeneration(session);
            signal.addEventListener('abort', () => stream.stop(), { once: true });
            return () => stream.stop();
            });
            }

          function stripProtoKeys

          stripProtoKeys: (value: any) => void;
          • Strips dangerous prototype pollution keys (__proto__, prototype, constructor) from an object recursively.

          function Unlock

          Unlock: (path?: string | string[]) => MethodDecorator;
          • Route handler (method) Decorator. Routes Webdav UNLOCK requests to the specified path.

            See Also

            • [Routing](https://docs.nestjs.com/controllers#routing)

          function UploadedFile

          UploadedFile: {
          (): ParameterDecorator;
          (
          ...pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[]
          ): ParameterDecorator;
          (
          fileKey?: string,
          ...pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[]
          ): ParameterDecorator;
          };
          • Route handler parameter decorator. Extracts the file object and populates the decorated parameter with the value of file. Used in conjunction with [multer middleware](https://github.com/expressjs/multer) for Express-based applications.

            For example:

            uploadFile(@UploadedFile() file) {
            console.log(file);
            }

            See Also

            • [Request object](https://docs.nestjs.com/techniques/file-upload)

          function UploadedFiles

          UploadedFiles: {
          (): ParameterDecorator;
          (
          ...pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[]
          ): ParameterDecorator;
          };
          • Route handler parameter decorator. Extracts the files object and populates the decorated parameter with the value of files. Used in conjunction with [multer middleware](https://github.com/expressjs/multer) for Express-based applications.

            For example:

            uploadFile(@UploadedFiles() files) {
            console.log(files);
            }

            See Also

            • [Request object](https://docs.nestjs.com/techniques/file-upload)

          function UseFilters

          UseFilters: (
          ...filters: (ExceptionFilter | Function)[]
          ) => MethodDecorator & ClassDecorator;
          • Decorator that binds exception filters to the scope of the controller or method, depending on its context.

            When @UseFilters is used at the controller level, the filter will be applied to every handler (method) in the controller.

            When @UseFilters is used at the individual handler level, the filter will apply only to that specific method.

            Parameter filters

            exception filter instance or class, or a list of exception filter instances or classes.

            See Also

            • [Exception filters](https://docs.nestjs.com/exception-filters)

              Exception filters can also be set up globally for all controllers and routes using app.useGlobalFilters(). [See here for details](https://docs.nestjs.com/exception-filters#binding-filters)

          function UseGuards

          UseGuards: (
          ...guards: (CanActivate | Function)[]
          ) => MethodDecorator & ClassDecorator;
          • Decorator that binds guards to the scope of the controller or method, depending on its context.

            When @UseGuards is used at the controller level, the guard will be applied to every handler (method) in the controller.

            When @UseGuards is used at the individual handler level, the guard will apply only to that specific method.

            Parameter guards

            a single guard instance or class, or a list of guard instances or classes.

            See Also

            • [Guards](https://docs.nestjs.com/guards)

              Guards can also be set up globally for all controllers and routes using app.useGlobalGuards(). [See here for details](https://docs.nestjs.com/guards#binding-guards)

          function UseInterceptors

          UseInterceptors: (
          ...interceptors: (NestInterceptor | Function)[]
          ) => MethodDecorator & ClassDecorator;
          • Decorator that binds interceptors to the scope of the controller or method, depending on its context.

            When @UseInterceptors is used at the controller level, the interceptor will be applied to every handler (method) in the controller.

            When @UseInterceptors is used at the individual handler level, the interceptor will apply only to that specific method.

            Parameter interceptors

            a single interceptor instance or class, or a list of interceptor instances or classes.

            See Also

            • [Interceptors](https://docs.nestjs.com/interceptors)

              Interceptors can also be set up globally for all controllers and routes using app.useGlobalInterceptors(). [See here for details](https://docs.nestjs.com/interceptors#binding-interceptors)

          function UsePipes

          UsePipes: (
          ...pipes: (PipeTransform | Function)[]
          ) => ClassDecorator & MethodDecorator;
          • Decorator that binds pipes to the scope of the controller or method, depending on its context.

            When @UsePipes is used at the controller level, the pipe will be applied to every handler (method) in the controller.

            When @UsePipes is used at the individual handler level, the pipe will apply only to that specific method.

            Parameter pipes

            a single pipe instance or class, or a list of pipe instances or classes.

            See Also

            • [Pipes](https://docs.nestjs.com/pipes)

              Pipes can also be set up globally for all controllers and routes using app.useGlobalPipes(). [See here for details](https://docs.nestjs.com/pipes#class-validator)

          function Version

          Version: (version: VersionValue) => MethodDecorator;
          • Sets the version of the endpoint to the passed version

          Classes

          class BadGatewayException

          class BadGatewayException extends HttpException {}
          • Defines an HTTP exception for *Bad Gateway* type errors.

            See Also

            • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

          constructor

          constructor(
          objectOrError?: any,
          descriptionOrOptions?: string | HttpExceptionOptions
          );
          • Instantiate a BadGatewayException Exception.

            Parameter objectOrError

            string or object describing the error condition.

            Parameter descriptionOrOptions

            either a short description of the HTTP error or an options object used to provide an underlying error cause

            Example 1

            throw new BadGatewayException()

            The HTTP response status code will be 502. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

            By default, the JSON response body contains two properties: - statusCode: this will be the value 502. - message: the string 'Bad Gateway' by default; override this by supplying a string in the objectOrError parameter.

            If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

          class BadRequestException

          class BadRequestException extends HttpException {}
          • Defines an HTTP exception for *Bad Request* type errors.

            See Also

            • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

          constructor

          constructor(
          objectOrError?: any,
          descriptionOrOptions?: string | HttpExceptionOptions
          );
          • Instantiate a BadRequestException Exception.

            Parameter objectOrError

            string or object describing the error condition.

            Parameter descriptionOrOptions

            either a short description of the HTTP error or an options object used to provide an underlying error cause

            Example 1

            throw new BadRequestException()

            The HTTP response status code will be 400. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

            By default, the JSON response body contains two properties: - statusCode: this will be the value 400. - message: the string 'Bad Request' by default; override this by supplying a string in the objectOrError parameter.

            If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

          class ClassSerializerInterceptor

          class ClassSerializerInterceptor implements NestInterceptor {}

          constructor

          constructor(reflector: any, defaultOptions?: ClassSerializerInterceptorOptions);

            property defaultOptions

            protected readonly defaultOptions: ClassSerializerInterceptorOptions;

              property reflector

              protected readonly reflector: any;

                method getContextOptions

                protected getContextOptions: (
                context: ExecutionContext
                ) => ClassSerializerContextOptions | undefined;

                  method intercept

                  intercept: (
                  context: ExecutionContext,
                  next: CallHandler
                  ) => Promise<Observable<any>>;

                    method serialize

                    serialize: (
                    response: PlainLiteralObject | Array<PlainLiteralObject>,
                    options: ClassSerializerContextOptions
                    ) => PlainLiteralObject | Array<PlainLiteralObject>;
                    • Serializes responses that are non-null objects nor streamable files.

                    method transformToPlain

                    transformToPlain: (
                    plainOrClass: any,
                    options: ClassSerializerContextOptions
                    ) => PlainLiteralObject;

                      class ConfigurableModuleBuilder

                      class ConfigurableModuleBuilder<
                      ModuleOptions,
                      StaticMethodKey extends string = typeof DEFAULT_METHOD_KEY,
                      FactoryClassMethodKey extends string = typeof DEFAULT_FACTORY_CLASS_METHOD_KEY,
                      ExtraModuleDefinitionOptions = {}
                      > {}
                      • Factory that lets you create configurable modules and provides a way to reduce the majority of dynamic module boilerplate.

                      constructor

                      constructor(
                      options?: ConfigurableModuleBuilderOptions,
                      parentBuilder?: ConfigurableModuleBuilder<
                      ModuleOptions,
                      'register',
                      'create',
                      {}
                      >
                      );

                        property extras

                        protected extras: {};

                          property factoryClassMethodKey

                          protected factoryClassMethodKey: string;

                            property logger

                            protected readonly logger: Logger;

                              property options

                              protected readonly options: ConfigurableModuleBuilderOptions;

                                property staticMethodKey

                                protected staticMethodKey: string;

                                  property transformModuleDefinition

                                  protected transformModuleDefinition: (
                                  definition: DynamicModule,
                                  extraOptions: ExtraModuleDefinitionOptions
                                  ) => DynamicModule;

                                    method build

                                    build: () => ConfigurableModuleHost<
                                    ModuleOptions,
                                    StaticMethodKey,
                                    FactoryClassMethodKey,
                                    ExtraModuleDefinitionOptions
                                    >;
                                    • Returns an object consisting of multiple properties that lets you easily construct dynamic configurable modules. See "ConfigurableModuleHost" interface for more details.

                                    method setClassMethodName

                                    setClassMethodName: <StaticMethodKey extends string>(
                                    key: StaticMethodKey
                                    ) => ConfigurableModuleBuilder<
                                    ModuleOptions,
                                    StaticMethodKey,
                                    FactoryClassMethodKey,
                                    ExtraModuleDefinitionOptions
                                    >;
                                    • Dynamic modules must expose public static methods that let you pass in configuration parameters (control the module's behavior from the outside). Some frequently used names that you may have seen in other modules are: "forRoot", "forFeature", "register", "configure".

                                      This method "setClassMethodName" lets you specify the name of the method that will be auto-generated.

                                      Parameter key

                                      name of the method

                                    method setExtras

                                    setExtras: <ExtraModuleDefinitionOptions>(
                                    extras: ExtraModuleDefinitionOptions,
                                    transformDefinition?: (
                                    definition: DynamicModule,
                                    extras: ExtraModuleDefinitionOptions
                                    ) => DynamicModule
                                    ) => ConfigurableModuleBuilder<
                                    ModuleOptions,
                                    StaticMethodKey,
                                    FactoryClassMethodKey,
                                    ExtraModuleDefinitionOptions
                                    >;
                                    • Registers the "extras" object (a set of extra options that can be used to modify the dynamic module definition). Values you specify within the "extras" object will be used as default values (that can be overridden by module consumers).

                                      This method also applies the so-called "module definition transform function" that takes the auto-generated dynamic module object ("DynamicModule") and the actual consumer "extras" object as input parameters. The "extras" object consists of values explicitly specified by module consumers and default values.

                                      Example 1

                                      .setExtras<{ isGlobal?: boolean }>({ isGlobal: false }, (definition, extras) =>
                                      ({ ...definition, global: extras.isGlobal })
                                      )

                                    method setFactoryMethodName

                                    setFactoryMethodName: <FactoryClassMethodKey extends string>(
                                    key: FactoryClassMethodKey
                                    ) => ConfigurableModuleBuilder<
                                    ModuleOptions,
                                    StaticMethodKey,
                                    FactoryClassMethodKey,
                                    ExtraModuleDefinitionOptions
                                    >;
                                    • Asynchronously configured modules (that rely on other modules, i.e. "ConfigModule") let you pass the configuration factory class that will be registered and instantiated as a provider. This provider then will be used to retrieve the module's configuration. To provide the configuration, the corresponding factory method must be implemented.

                                      This method ("setFactoryMethodName") lets you control what method name will have to be implemented by the config factory (default is "create").

                                      Parameter key

                                      name of the method

                                    class ConflictException

                                    class ConflictException extends HttpException {}
                                    • Defines an HTTP exception for *Conflict* type errors.

                                      See Also

                                      • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                    constructor

                                    constructor(
                                    objectOrError?: any,
                                    descriptionOrOptions?: string | HttpExceptionOptions
                                    );
                                    • Instantiate a ConflictException Exception.

                                      Parameter objectOrError

                                      string or object describing the error condition.

                                      Parameter descriptionOrOptions

                                      either a short description of the HTTP error or an options object used to provide an underlying error cause

                                      Example 1

                                      throw new ConflictException()

                                      The HTTP response status code will be 409. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                      By default, the JSON response body contains two properties: - statusCode: this will be the value 409. - message: the string 'Conflict' by default; override this by supplying a string in the objectOrError parameter.

                                      If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                    class ConsoleLogger

                                    class ConsoleLogger implements LoggerService {}

                                    constructor

                                    constructor();

                                      constructor

                                      constructor(context: string);

                                        constructor

                                        constructor(options: ConsoleLoggerOptions);

                                          constructor

                                          constructor(context: string, options: ConsoleLoggerOptions);

                                            property context

                                            protected context?: string;
                                            • The context of the logger (can be set manually or automatically inferred).

                                            property inspectOptions

                                            protected inspectOptions: InspectOptions;
                                            • The options used for the "inspect" method.

                                            property lastTimestampAt

                                            protected static lastTimestampAt?: number;
                                            • The last timestamp at which the log message was printed.

                                            property options

                                            protected options: ConsoleLoggerOptions;
                                            • The options of the logger.

                                            property originalContext

                                            protected originalContext?: string;
                                            • The original context of the logger (set in the constructor).

                                            method colorize

                                            protected colorize: (message: string, logLevel: LogLevel) => string;

                                              method debug

                                              debug: {
                                              (message: any, context?: string): void;
                                              (message: any, ...optionalParams: any[]): void;
                                              };
                                              • Write a 'debug' level log, if the configured level allows for it. Prints to stdout with newline.

                                              method error

                                              error: {
                                              (message: any, stackOrContext?: string): void;
                                              (message: any, stack?: string, context?: string): void;
                                              (message: any, ...optionalParams: any[]): void;
                                              };
                                              • Write an 'error' level log, if the configured level allows for it. Prints to stderr with newline.

                                              method extractJsonError

                                              protected extractJsonError: (messages: unknown[]) => {
                                              messages: unknown[];
                                              error?: Error;
                                              };
                                              • Pulls the first Error out of the messages so that it can be attached to the log record as a structured error field instead of being printed as a separate record. When the error is the message itself, the record's message becomes the error's message.

                                              method fatal

                                              fatal: {
                                              (message: any, stackOrContext?: string): void;
                                              (message: any, stack?: string, context?: string): void;
                                              (message: any, ...optionalParams: any[]): void;
                                              };
                                              • Write a 'fatal' level log, if the configured level allows for it. Prints to stderr with newline.

                                              method formatContext

                                              protected formatContext: (context: string) => string;

                                                method formatMessage

                                                protected formatMessage: (
                                                logLevel: LogLevel,
                                                message: unknown,
                                                pidMessage: string,
                                                formattedLogLevel: string,
                                                contextMessage: string,
                                                timestampDiff: string,
                                                params?: Record<string, any>
                                                ) => string;

                                                  method formatPid

                                                  protected formatPid: (pid: number) => string;

                                                    method formatTimestampDiff

                                                    protected formatTimestampDiff: (timestampDiff: number) => string;

                                                      method getColorByLogLevel

                                                      protected getColorByLogLevel: (level: LogLevel) => (text: string) => string;

                                                        method getContextAndMessagesToPrint

                                                        protected getContextAndMessagesToPrint: (
                                                        args: unknown[]
                                                        ) =>
                                                        | { messages: unknown[]; context: string | undefined; params?: undefined }
                                                        | { messages: unknown[]; context: string | undefined; params: any };

                                                          method getContextAndStackAndMessagesToPrint

                                                          protected getContextAndStackAndMessagesToPrint: (
                                                          args: unknown[]
                                                          ) =>
                                                          | {
                                                          messages: unknown[];
                                                          stack: string;
                                                          context: string | undefined;
                                                          params?: undefined;
                                                          }
                                                          | {
                                                          messages: unknown[];
                                                          context: string | undefined;
                                                          params?: undefined;
                                                          stack?: undefined;
                                                          }
                                                          | {
                                                          messages: unknown[];
                                                          context: string | undefined;
                                                          params: any;
                                                          stack?: undefined;
                                                          }
                                                          | {
                                                          stack: string | undefined;
                                                          messages: unknown[];
                                                          context: string | undefined;
                                                          params: any;
                                                          };

                                                            method getDefaultLogLevels

                                                            protected getDefaultLogLevels: () => LogLevel[];
                                                            • Returns the levels used when none were passed to the constructor: the NEST_LOG_LEVEL environment variable if it is set, every level otherwise. Called on the first level check rather than in the constructor, so that the default logger also sees variables loaded after "@nestjs/common" was imported (for example, from a .env file).

                                                            method getInspectOptions

                                                            protected getInspectOptions: () => InspectOptions;

                                                              method getJsonLogObject

                                                              protected getJsonLogObject: (
                                                              message: unknown,
                                                              options: {
                                                              context: string;
                                                              logLevel: LogLevel;
                                                              writeStreamType?: 'stdout' | 'stderr';
                                                              errorStack?: unknown;
                                                              params?: Record<string, any>;
                                                              error?: Error;
                                                              }
                                                              ) => {
                                                              [key: string]: unknown;
                                                              level: LogLevel;
                                                              pid: number;
                                                              timestamp: number;
                                                              message: unknown;
                                                              context?: string;
                                                              stack?: unknown;
                                                              error?: Record<string, unknown>;
                                                              params?: Record<string, any>;
                                                              };

                                                                method getTimestamp

                                                                protected getTimestamp: () => string;

                                                                  method isLevelEnabled

                                                                  isLevelEnabled: (level: LogLevel) => boolean;

                                                                    method isStackFormat

                                                                    protected isStackFormat: (stack: unknown) => boolean;

                                                                      method log

                                                                      log: {
                                                                      (message: any, context?: string): void;
                                                                      (message: any, ...optionalParams: any[]): void;
                                                                      };
                                                                      • Write a 'log' level log, if the configured level allows for it. Prints to stdout with newline.

                                                                      method printAsJson

                                                                      protected printAsJson: (
                                                                      message: unknown,
                                                                      options: {
                                                                      context: string;
                                                                      logLevel: LogLevel;
                                                                      writeStreamType?: 'stdout' | 'stderr';
                                                                      errorStack?: unknown;
                                                                      params?: Record<string, any>;
                                                                      error?: Error;
                                                                      }
                                                                      ) => void;

                                                                        method printMessages

                                                                        protected printMessages: (
                                                                        messages: unknown[],
                                                                        context?: string,
                                                                        logLevel?: LogLevel,
                                                                        writeStreamType?: 'stdout' | 'stderr',
                                                                        errorStack?: unknown,
                                                                        params?: Record<string, any>
                                                                        ) => void;

                                                                          method printStackTrace

                                                                          protected printStackTrace: (stack: string) => void;

                                                                            method redact

                                                                            protected redact: (value: unknown) => unknown;
                                                                            • Masks the properties set in the redact option. Returns the value itself when the option isn't set or nothing matched.

                                                                            method resetContext

                                                                            resetContext: () => void;
                                                                            • Resets the logger context to the value that was passed in the constructor.

                                                                            method resolveMessage

                                                                            protected resolveMessage: (message: unknown) => unknown;
                                                                            • Resolves a message passed as a function: a class resolves to its name, any other function is called (lazy message) and its result re-resolved.

                                                                            method serializeError

                                                                            protected serializeError: (
                                                                            error: Error,
                                                                            depth?: number,
                                                                            ancestors?: Set<Error>
                                                                            ) => Record<string, unknown>;
                                                                            • Converts an error into a plain object: name, message, stack, own primitive properties (e.g. code), and, recursively, cause and the errors of an AggregateError, up to a fixed depth.

                                                                            method setContext

                                                                            setContext: (context: string) => void;
                                                                            • Set logger context

                                                                              Parameter context

                                                                              context

                                                                            method setLogLevels

                                                                            setLogLevels: (levels: LogLevel[]) => void;
                                                                            • Set log levels

                                                                              Parameter levels

                                                                              log levels

                                                                            method stringifyJsonLogObject

                                                                            protected stringifyJsonLogObject: (logObject: Record<string, unknown>) => string;
                                                                            • Serializes a JSON log object without ever throwing: circular references are replaced with "[Circular]", and a value that cannot be serialized (e.g. a throwing toJSON()) makes the whole record fall back to inspect.

                                                                            method stringifyMessage

                                                                            protected stringifyMessage: (message: unknown, logLevel: LogLevel) => string;

                                                                              method stringifyParams

                                                                              protected stringifyParams: (params: Record<string, any>) => string;

                                                                                method stringifyReplacer

                                                                                protected stringifyReplacer: (key: string, value: unknown) => unknown;

                                                                                  method updateAndGetTimestampDiff

                                                                                  protected updateAndGetTimestampDiff: () => string;

                                                                                    method verbose

                                                                                    verbose: {
                                                                                    (message: any, context?: string): void;
                                                                                    (message: any, ...optionalParams: any[]): void;
                                                                                    };
                                                                                    • Write a 'verbose' level log, if the configured level allows for it. Prints to stdout with newline.

                                                                                    method warn

                                                                                    warn: {
                                                                                    (message: any, context?: string): void;
                                                                                    (message: any, ...optionalParams: any[]): void;
                                                                                    };
                                                                                    • Write a 'warn' level log, if the configured level allows for it. Prints to stdout with newline.

                                                                                    class DefaultValuePipe

                                                                                    class DefaultValuePipe<T = any, R = any> implements PipeTransform<T, T | R> {}
                                                                                    • Defines the built-in DefaultValue Pipe

                                                                                      See Also

                                                                                      • [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes)

                                                                                    constructor

                                                                                    constructor(defaultValue: {});

                                                                                      property defaultValue

                                                                                      protected readonly defaultValue: {};

                                                                                        method transform

                                                                                        transform: (value?: T, _metadata?: ArgumentMetadata) => T | R;

                                                                                          class FileTypeValidator

                                                                                          class FileTypeValidator extends FileValidator<FileTypeValidatorOptions, IFile> {}
                                                                                          • Defines the built-in FileTypeValidator. It validates incoming files by examining their magic numbers using the file-type package, providing more reliable file type validation than just checking the mimetype string.

                                                                                            See Also

                                                                                            • [File Validators](https://docs.nestjs.com/techniques/file-upload#validators)

                                                                                          method buildErrorMessage

                                                                                          buildErrorMessage: (file?: IFile) => string;

                                                                                            method isValid

                                                                                            isValid: (file?: IFile) => Promise<boolean>;

                                                                                              class FileValidator

                                                                                              abstract class FileValidator<
                                                                                              TValidationOptions = Record<string, any>,
                                                                                              TFile extends IFile = IFile
                                                                                              > {}
                                                                                              • Interface describing FileValidators, which can be added to a ParseFilePipe

                                                                                                See Also

                                                                                                • {ParseFilePipe}

                                                                                              constructor

                                                                                              constructor(validationOptions: {});

                                                                                                property validationOptions

                                                                                                protected readonly validationOptions: {};

                                                                                                  method buildErrorMessage

                                                                                                  abstract buildErrorMessage: (file: any) => string;
                                                                                                  • Builds an error message in case the validation fails.

                                                                                                    Parameter file

                                                                                                    the file from the request object

                                                                                                  method isValid

                                                                                                  abstract isValid: (
                                                                                                  file?: TFile | TFile[] | Record<string, TFile[]>
                                                                                                  ) => boolean | Promise<boolean>;
                                                                                                  • Indicates if this file should be considered valid, according to the options passed in the constructor.

                                                                                                    Parameter file

                                                                                                    the file from the request object

                                                                                                  class ForbiddenException

                                                                                                  class ForbiddenException extends HttpException {}
                                                                                                  • Defines an HTTP exception for *Forbidden* type errors.

                                                                                                    See Also

                                                                                                    • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                  constructor

                                                                                                  constructor(
                                                                                                  objectOrError?: any,
                                                                                                  descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                  );
                                                                                                  • Instantiate a ForbiddenException Exception.

                                                                                                    Parameter objectOrError

                                                                                                    string or object describing the error condition.

                                                                                                    Parameter descriptionOrOptions

                                                                                                    either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                    Example 1

                                                                                                    throw new ForbiddenException()

                                                                                                    The HTTP response status code will be 403. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                    By default, the JSON response body contains two properties: - statusCode: this will be the value 403. - message: the string 'Forbidden' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                    If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                  class GatewayTimeoutException

                                                                                                  class GatewayTimeoutException extends HttpException {}
                                                                                                  • Defines an HTTP exception for *Gateway Timeout* type errors.

                                                                                                    See Also

                                                                                                    • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                  constructor

                                                                                                  constructor(
                                                                                                  objectOrError?: any,
                                                                                                  descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                  );
                                                                                                  • Instantiate a GatewayTimeoutException Exception.

                                                                                                    Parameter objectOrError

                                                                                                    string or object describing the error condition.

                                                                                                    Parameter descriptionOrOptions

                                                                                                    either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                    Example 1

                                                                                                    throw new GatewayTimeoutException()

                                                                                                    The HTTP response status code will be 504. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                    By default, the JSON response body contains two properties: - statusCode: this will be the value 504. - message: the string 'Gateway Timeout' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                    If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                  class GoneException

                                                                                                  class GoneException extends HttpException {}
                                                                                                  • Defines an HTTP exception for *Gone* type errors.

                                                                                                    See Also

                                                                                                    • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                  constructor

                                                                                                  constructor(
                                                                                                  objectOrError?: any,
                                                                                                  descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                  );
                                                                                                  • Instantiate a GoneException Exception.

                                                                                                    Parameter objectOrError

                                                                                                    string or object describing the error condition.

                                                                                                    Parameter descriptionOrOptions

                                                                                                    either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                    Example 1

                                                                                                    throw new GoneException()

                                                                                                    The HTTP response status code will be 410. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                    By default, the JSON response body contains two properties: - statusCode: this will be the value 410. - message: the string 'Gone' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                    If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                  class HttpException

                                                                                                  class HttpException extends IntrinsicException {}
                                                                                                  • Defines the base Nest HTTP exception, which is handled by the default Exceptions Handler.

                                                                                                    See Also

                                                                                                    • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                  constructor

                                                                                                  constructor(
                                                                                                  response: string | Record<string, any>,
                                                                                                  status: number,
                                                                                                  options?: HttpExceptionOptions
                                                                                                  );
                                                                                                  • Instantiate a plain HTTP Exception.

                                                                                                    Parameter response

                                                                                                    string, object describing the error condition or the error cause.

                                                                                                    Parameter status

                                                                                                    HTTP response status code.

                                                                                                    Parameter options

                                                                                                    An object used to add an error cause.

                                                                                                    Example 1

                                                                                                    throw new HttpException('message', HttpStatus.BAD_REQUEST) throw new HttpException('custom message', HttpStatus.BAD_REQUEST, { cause: new Error('Cause Error'), })

                                                                                                    The constructor arguments define the response and the HTTP response status code. - The response argument (required) defines the JSON response body. alternatively, it can also be an error object that is used to define an error [cause](https://nodejs.org/en/blog/release/v16.9.0/#error-cause). - The status argument (required) defines the HTTP Status Code. - The options argument (optional) defines additional error options. Currently, it supports the cause attribute, and can be used as an alternative way to specify the error cause: const error = new HttpException('description', 400, { cause: new Error() });

                                                                                                    By default, the JSON response body contains two properties: - statusCode: the Http Status Code. - message: a short description of the HTTP error by default; override this by supplying a string in the response parameter.

                                                                                                    To override the entire JSON response body, pass an object to the createBody method. Nest will serialize the object and return it as the JSON response body.

                                                                                                    The status argument is required, and should be a valid HTTP status code. Best practice is to use the HttpStatus enum imported from nestjs/common.

                                                                                                  property cause

                                                                                                  cause: {};
                                                                                                  • Exception cause. Indicates the specific original cause of the error. It is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.

                                                                                                  property errorCode

                                                                                                  errorCode?: string;

                                                                                                    method createBody

                                                                                                    static createBody: {
                                                                                                    (
                                                                                                    nil: null | '',
                                                                                                    message: HttpExceptionBodyMessage,
                                                                                                    statusCode: number
                                                                                                    ): HttpExceptionBody;
                                                                                                    (
                                                                                                    message: HttpExceptionBodyMessage,
                                                                                                    error: string,
                                                                                                    statusCode: number
                                                                                                    ): HttpExceptionBody;
                                                                                                    (
                                                                                                    message: HttpExceptionBodyMessage,
                                                                                                    error: string,
                                                                                                    statusCode: number,
                                                                                                    errorCode?: string
                                                                                                    ): HttpExceptionBody;
                                                                                                    <Body extends Record<string, unknown>>(custom: Body): Body;
                                                                                                    };

                                                                                                      method extractDescriptionAndOptionsFrom

                                                                                                      static extractDescriptionAndOptionsFrom: (
                                                                                                      descriptionOrOptions: string | HttpExceptionOptions
                                                                                                      ) => DescriptionAndOptions;
                                                                                                      • Utility method used to extract the error description and httpExceptionOptions from the given argument. This is used by inheriting classes to correctly parse both options.

                                                                                                        Returns

                                                                                                        the error description and the httpExceptionOptions as an object.

                                                                                                      method getDescriptionFrom

                                                                                                      static getDescriptionFrom: (
                                                                                                      descriptionOrOptions: string | HttpExceptionOptions
                                                                                                      ) => string;

                                                                                                        method getHttpExceptionOptionsFrom

                                                                                                        static getHttpExceptionOptionsFrom: (
                                                                                                        descriptionOrOptions: string | HttpExceptionOptions
                                                                                                        ) => HttpExceptionOptions;

                                                                                                          method getResponse

                                                                                                          getResponse: () => string | object;

                                                                                                            method getStatus

                                                                                                            getStatus: () => number;

                                                                                                              method initCause

                                                                                                              initCause: () => void;
                                                                                                              • Configures error chaining support

                                                                                                                See Also

                                                                                                                • https://nodejs.org/en/blog/release/v16.9.0/#error-cause

                                                                                                                • https://github.com/microsoft/TypeScript/issues/45167

                                                                                                              method initErrorCode

                                                                                                              initErrorCode: () => void;

                                                                                                                method initMessage

                                                                                                                initMessage: () => void;

                                                                                                                  method initName

                                                                                                                  initName: () => void;

                                                                                                                    class HttpVersionNotSupportedException

                                                                                                                    class HttpVersionNotSupportedException extends HttpException {}
                                                                                                                    • Defines an HTTP exception for *Http Version Not Supported* type errors.

                                                                                                                      See Also

                                                                                                                      • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                    constructor

                                                                                                                    constructor(
                                                                                                                    objectOrError?: any,
                                                                                                                    descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                    );
                                                                                                                    • Instantiate a HttpVersionNotSupportedException Exception.

                                                                                                                      Parameter objectOrError

                                                                                                                      string or object describing the error condition.

                                                                                                                      Parameter descriptionOrOptions

                                                                                                                      either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                      Example 1

                                                                                                                      throw new HttpVersionNotSupportedException()

                                                                                                                      The HTTP response status code will be 505. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                      By default, the JSON response body contains two properties: - statusCode: this will be the value 505. - message: the string 'HTTP Version Not Supported' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                      If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                    class ImATeapotException

                                                                                                                    class ImATeapotException extends HttpException {}
                                                                                                                    • Defines an HTTP exception for *ImATeapotException* type errors.

                                                                                                                      Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.

                                                                                                                      See Also

                                                                                                                      • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                    constructor

                                                                                                                    constructor(
                                                                                                                    objectOrError?: any,
                                                                                                                    descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                    );
                                                                                                                    • Instantiate an ImATeapotException Exception.

                                                                                                                      Parameter objectOrError

                                                                                                                      string or object describing the error condition.

                                                                                                                      Parameter descriptionOrOptions

                                                                                                                      either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                      Example 1

                                                                                                                      throw new ImATeapotException()

                                                                                                                      The HTTP response status code will be 418. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                      By default, the JSON response body contains two properties: - statusCode: this will be the value 418. - message: the string "I'm a Teapot" by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                      If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                    class InternalServerErrorException

                                                                                                                    class InternalServerErrorException extends HttpException {}
                                                                                                                    • Defines an HTTP exception for *Internal Server Error* type errors.

                                                                                                                      See Also

                                                                                                                      • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                    constructor

                                                                                                                    constructor(
                                                                                                                    objectOrError?: any,
                                                                                                                    descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                    );
                                                                                                                    • Instantiate an InternalServerErrorException Exception.

                                                                                                                      Parameter objectOrError

                                                                                                                      string or object describing the error condition.

                                                                                                                      Parameter descriptionOrOptions

                                                                                                                      either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                      Example 1

                                                                                                                      throw new InternalServerErrorException()

                                                                                                                      The HTTP response status code will be 500. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                      By default, the JSON response body contains two properties: - statusCode: this will be the value 500. - message: the string 'Internal Server Error' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                      If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                    class IntrinsicException

                                                                                                                    class IntrinsicException extends Error {}
                                                                                                                    • Exception that represents an intrinsic error in the application. When thrown, the default exception filter will not log the error message.

                                                                                                                    class Logger

                                                                                                                    class Logger implements LoggerService {}

                                                                                                                    constructor

                                                                                                                    constructor();

                                                                                                                      constructor

                                                                                                                      constructor(context: string);

                                                                                                                        constructor

                                                                                                                        constructor(context: string, options?: { timestamp?: boolean });

                                                                                                                          property context

                                                                                                                          protected context?: string;

                                                                                                                            property localInstance

                                                                                                                            readonly localInstance: LoggerService;

                                                                                                                              property localInstanceRef

                                                                                                                              protected localInstanceRef?: LoggerService;

                                                                                                                                property logBuffer

                                                                                                                                protected static logBuffer: LogBufferRecord[];

                                                                                                                                  property logLevels

                                                                                                                                  protected static logLevels?: (
                                                                                                                                  | 'verbose'
                                                                                                                                  | 'debug'
                                                                                                                                  | 'log'
                                                                                                                                  | 'warn'
                                                                                                                                  | 'error'
                                                                                                                                  | 'fatal'
                                                                                                                                  )[];

                                                                                                                                    property options

                                                                                                                                    protected options: { timestamp?: boolean };

                                                                                                                                      property staticInstanceRef

                                                                                                                                      protected static staticInstanceRef?: LoggerService;

                                                                                                                                        method attachBuffer

                                                                                                                                        static attachBuffer: () => void;
                                                                                                                                        • Attach buffer. Turns on initialization logs buffering.

                                                                                                                                        method debug

                                                                                                                                        static debug: {
                                                                                                                                        (message: any, context?: string): void;
                                                                                                                                        (message: any, ...optionalParams: any[]): void;
                                                                                                                                        };
                                                                                                                                        • Write a 'debug' level log.

                                                                                                                                        • Write a 'debug' level log, if the configured level allows for it. Prints to stdout with newline.

                                                                                                                                        method detachBuffer

                                                                                                                                        static detachBuffer: () => void;
                                                                                                                                        • Detach buffer. Turns off initialization logs buffering.

                                                                                                                                        method error

                                                                                                                                        static error: {
                                                                                                                                        (message: any, stackOrContext?: string): void;
                                                                                                                                        (message: any, context?: string): void;
                                                                                                                                        (message: any, stack?: string, context?: string): void;
                                                                                                                                        (message: any, ...optionalParams: any[]): void;
                                                                                                                                        };
                                                                                                                                        • Write an 'error' level log.

                                                                                                                                        method fatal

                                                                                                                                        static fatal: {
                                                                                                                                        (message: any, context?: string): void;
                                                                                                                                        (message: any, ...optionalParams: any[]): void;
                                                                                                                                        };
                                                                                                                                        • Write a 'fatal' level log.

                                                                                                                                        method flush

                                                                                                                                        static flush: () => void;
                                                                                                                                        • Print buffered logs and detach buffer.

                                                                                                                                        method getTimestamp

                                                                                                                                        static getTimestamp: () => string;

                                                                                                                                          method isLevelEnabled

                                                                                                                                          static isLevelEnabled: (level: LogLevel) => boolean;

                                                                                                                                            method log

                                                                                                                                            static log: {
                                                                                                                                            (message: any, context?: string): void;
                                                                                                                                            (message: any, ...optionalParams: any[]): void;
                                                                                                                                            };
                                                                                                                                            • Write a 'log' level log.

                                                                                                                                            method overrideLogger

                                                                                                                                            static overrideLogger: (logger: LoggerService | LogLevel[] | boolean) => any;

                                                                                                                                              method verbose

                                                                                                                                              static verbose: {
                                                                                                                                              (message: any, context?: string): void;
                                                                                                                                              (message: any, ...optionalParams: any[]): void;
                                                                                                                                              };
                                                                                                                                              • Write a 'verbose' level log.

                                                                                                                                              method warn

                                                                                                                                              static warn: {
                                                                                                                                              (message: any, context?: string): void;
                                                                                                                                              (message: any, ...optionalParams: any[]): void;
                                                                                                                                              };
                                                                                                                                              • Write a 'warn' level log.

                                                                                                                                              class MaxFileSizeValidator

                                                                                                                                              class MaxFileSizeValidator extends FileValidator<
                                                                                                                                              MaxFileSizeValidatorOptions,
                                                                                                                                              IFile
                                                                                                                                              > {}
                                                                                                                                              • Defines the built-in MaxSize File Validator

                                                                                                                                                See Also

                                                                                                                                                • [File Validators](https://docs.nestjs.com/techniques/file-upload#file-validation)

                                                                                                                                              method buildErrorMessage

                                                                                                                                              buildErrorMessage: (file?: IFile) => string;

                                                                                                                                                method isValid

                                                                                                                                                isValid: (file?: IFile) => boolean;

                                                                                                                                                  class MethodNotAllowedException

                                                                                                                                                  class MethodNotAllowedException extends HttpException {}
                                                                                                                                                  • Defines an HTTP exception for *Method Not Allowed* type errors.

                                                                                                                                                    See Also

                                                                                                                                                    • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                                                  constructor

                                                                                                                                                  constructor(
                                                                                                                                                  objectOrError?: any,
                                                                                                                                                  descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                                                  );
                                                                                                                                                  • Instantiate a MethodNotAllowedException Exception.

                                                                                                                                                    Parameter objectOrError

                                                                                                                                                    string or object describing the error condition.

                                                                                                                                                    Parameter descriptionOrOptions

                                                                                                                                                    either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                                                    Example 1

                                                                                                                                                    throw new MethodNotAllowedException()

                                                                                                                                                    The HTTP response status code will be 405. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                                                    By default, the JSON response body contains two properties: - statusCode: this will be the value 405. - message: the string 'Method Not Allowed' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                                                    If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                                                  class MisdirectedException

                                                                                                                                                  class MisdirectedException extends HttpException {}
                                                                                                                                                  • Defines an HTTP exception for *Misdirected* type errors.

                                                                                                                                                    See Also

                                                                                                                                                    • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                                                  constructor

                                                                                                                                                  constructor(
                                                                                                                                                  objectOrError?: any,
                                                                                                                                                  descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                                                  );
                                                                                                                                                  • Instantiate a MisdirectedException Exception.

                                                                                                                                                    Parameter objectOrError

                                                                                                                                                    string or object describing the error condition.

                                                                                                                                                    Parameter descriptionOrOptions

                                                                                                                                                    either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                                                    Example 1

                                                                                                                                                    throw new MisdirectedException()

                                                                                                                                                    The HTTP response status code will be 421. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                                                    By default, the JSON response body contains two properties: - statusCode: this will be the value 421. - message: the string 'Misdirected' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                                                    If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                                                  class NotAcceptableException

                                                                                                                                                  class NotAcceptableException extends HttpException {}
                                                                                                                                                  • Defines an HTTP exception for *Not Acceptable* type errors.

                                                                                                                                                    See Also

                                                                                                                                                    • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                                                  constructor

                                                                                                                                                  constructor(
                                                                                                                                                  objectOrError?: any,
                                                                                                                                                  descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                                                  );
                                                                                                                                                  • Instantiate a NotAcceptableException Exception.

                                                                                                                                                    Parameter objectOrError

                                                                                                                                                    string or object describing the error condition.

                                                                                                                                                    Parameter descriptionOrOptions

                                                                                                                                                    either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                                                    Example 1

                                                                                                                                                    throw new NotAcceptableException()

                                                                                                                                                    The HTTP response status code will be 406. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                                                    By default, the JSON response body contains two properties: - statusCode: this will be the value 406. - message: the string 'Not Acceptable' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                                                    If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                                                  class NotFoundException

                                                                                                                                                  class NotFoundException extends HttpException {}
                                                                                                                                                  • Defines an HTTP exception for *Not Found* type errors.

                                                                                                                                                    See Also

                                                                                                                                                    • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                                                  constructor

                                                                                                                                                  constructor(
                                                                                                                                                  objectOrError?: any,
                                                                                                                                                  descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                                                  );
                                                                                                                                                  • Instantiate a NotFoundException Exception.

                                                                                                                                                    Parameter objectOrError

                                                                                                                                                    string or object describing the error condition.

                                                                                                                                                    Parameter descriptionOrOptions

                                                                                                                                                    either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                                                    Example 1

                                                                                                                                                    throw new NotFoundException()

                                                                                                                                                    The HTTP response status code will be 404. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                                                    By default, the JSON response body contains two properties: - statusCode: this will be the value 404. - message: the string 'Not Found' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                                                    If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                                                  class NotImplementedException

                                                                                                                                                  class NotImplementedException extends HttpException {}
                                                                                                                                                  • Defines an HTTP exception for *Not Implemented* type errors.

                                                                                                                                                    See Also

                                                                                                                                                    • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                                                  constructor

                                                                                                                                                  constructor(
                                                                                                                                                  objectOrError?: any,
                                                                                                                                                  descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                                                  );
                                                                                                                                                  • Instantiate a NotImplementedException Exception.

                                                                                                                                                    Parameter descriptionOrOptions

                                                                                                                                                    either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                                                    Parameter error

                                                                                                                                                    a short description of the HTTP error.

                                                                                                                                                    Example 1

                                                                                                                                                    throw new NotImplementedException()

                                                                                                                                                    The HTTP response status code will be 501. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                                                    By default, the JSON response body contains two properties: - statusCode: this will be the value 501. - message: the string 'Not Implemented' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                                                    If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                                                  class ParseArrayPipe

                                                                                                                                                  class ParseArrayPipe implements PipeTransform {}
                                                                                                                                                  • Defines the built-in ParseArray Pipe

                                                                                                                                                    See Also

                                                                                                                                                    • [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes)

                                                                                                                                                  constructor

                                                                                                                                                  constructor(options?: ParseArrayPipeOptions);

                                                                                                                                                    property exceptionFactory

                                                                                                                                                    protected exceptionFactory: (error: string) => any;

                                                                                                                                                      property options

                                                                                                                                                      protected readonly options: ParseArrayPipeOptions;

                                                                                                                                                        property validationPipe

                                                                                                                                                        protected readonly validationPipe: ValidationPipe;

                                                                                                                                                          method isExpectedTypePrimitive

                                                                                                                                                          protected isExpectedTypePrimitive: () => boolean;

                                                                                                                                                            method isNumeric

                                                                                                                                                            protected isNumeric: (value: unknown) => boolean;

                                                                                                                                                              method transform

                                                                                                                                                              transform: (value: unknown, metadata: ArgumentMetadata) => Promise<any>;
                                                                                                                                                              • Method that accesses and performs optional transformation on argument for in-flight requests.

                                                                                                                                                                Parameter value

                                                                                                                                                                currently processed route argument

                                                                                                                                                                Parameter metadata

                                                                                                                                                                contains metadata about the currently processed route argument

                                                                                                                                                              method validatePrimitive

                                                                                                                                                              protected validatePrimitive: (originalValue: any, index?: number) => any;

                                                                                                                                                                class ParseBoolPipe

                                                                                                                                                                class ParseBoolPipe implements PipeTransform {}
                                                                                                                                                                • Defines the built-in ParseBool Pipe

                                                                                                                                                                  See Also

                                                                                                                                                                  • [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes)

                                                                                                                                                                constructor

                                                                                                                                                                constructor(options?: ParseBoolPipeOptions);

                                                                                                                                                                  property exceptionFactory

                                                                                                                                                                  protected exceptionFactory: (error: string) => any;

                                                                                                                                                                    property options

                                                                                                                                                                    protected readonly options?: ParseBoolPipeOptions;

                                                                                                                                                                      method isFalse

                                                                                                                                                                      protected isFalse: (value: unknown) => boolean;
                                                                                                                                                                      • Parameter value

                                                                                                                                                                        currently processed route argument

                                                                                                                                                                        Returns

                                                                                                                                                                        true if value is said 'false', ie., if it is equal to the boolean false or the string "false"

                                                                                                                                                                      method isTrue

                                                                                                                                                                      protected isTrue: (value: unknown) => boolean;
                                                                                                                                                                      • Parameter value

                                                                                                                                                                        currently processed route argument

                                                                                                                                                                        Returns

                                                                                                                                                                        true if value is said 'true', ie., if it is equal to the boolean true or the string "true"

                                                                                                                                                                      method transform

                                                                                                                                                                      transform: (
                                                                                                                                                                      value: unknown,
                                                                                                                                                                      metadata: ArgumentMetadata
                                                                                                                                                                      ) => Promise<boolean | undefined | null>;
                                                                                                                                                                      • Method that accesses and performs optional transformation on argument for in-flight requests.

                                                                                                                                                                        Parameter value

                                                                                                                                                                        currently processed route argument

                                                                                                                                                                        Parameter metadata

                                                                                                                                                                        contains metadata about the currently processed route argument

                                                                                                                                                                      class ParseDatePipe

                                                                                                                                                                      class ParseDatePipe implements PipeTransform {}

                                                                                                                                                                      constructor

                                                                                                                                                                      constructor(options?: ParseDatePipeOptions);

                                                                                                                                                                        property exceptionFactory

                                                                                                                                                                        protected exceptionFactory: (error: string) => any;

                                                                                                                                                                          property options

                                                                                                                                                                          protected readonly options: ParseDatePipeOptions;

                                                                                                                                                                            method transform

                                                                                                                                                                            transform: (value: unknown) => Date | null | undefined;
                                                                                                                                                                            • Method that accesses and performs optional transformation on argument for in-flight requests.

                                                                                                                                                                              Parameter value

                                                                                                                                                                              currently processed route argument

                                                                                                                                                                              Parameter metadata

                                                                                                                                                                              contains metadata about the currently processed route argument

                                                                                                                                                                            class ParseEnumPipe

                                                                                                                                                                            class ParseEnumPipe<T = any> implements PipeTransform<T> {}
                                                                                                                                                                            • Defines the built-in ParseEnum Pipe

                                                                                                                                                                              See Also

                                                                                                                                                                              • [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes)

                                                                                                                                                                            constructor

                                                                                                                                                                            constructor(enumType: {}, options?: ParseEnumPipeOptions);

                                                                                                                                                                              property enumType

                                                                                                                                                                              protected readonly enumType: {};

                                                                                                                                                                                property exceptionFactory

                                                                                                                                                                                protected exceptionFactory: (error: string) => any;

                                                                                                                                                                                  property options

                                                                                                                                                                                  protected readonly options?: ParseEnumPipeOptions;

                                                                                                                                                                                    method getEnumValues

                                                                                                                                                                                    protected getEnumValues: () => (string | number)[];

                                                                                                                                                                                      method isEnum

                                                                                                                                                                                      protected isEnum: (value: unknown) => boolean;

                                                                                                                                                                                        method toEnumValue

                                                                                                                                                                                        protected toEnumValue: (value: unknown) => string | number | undefined;
                                                                                                                                                                                        • Returns the enum member that value refers to, or undefined if there is none. Numeric members also match their string representation (e.g. '1' for 1), since HTTP route and query params always arrive as strings.

                                                                                                                                                                                        method transform

                                                                                                                                                                                        transform: (
                                                                                                                                                                                        value: unknown,
                                                                                                                                                                                        metadata: ArgumentMetadata
                                                                                                                                                                                        ) => Promise<T | undefined | null>;
                                                                                                                                                                                        • Method that accesses and performs optional transformation on argument for in-flight requests.

                                                                                                                                                                                          Parameter value

                                                                                                                                                                                          currently processed route argument

                                                                                                                                                                                          Parameter metadata

                                                                                                                                                                                          contains metadata about the currently processed route argument

                                                                                                                                                                                        class ParseFilePipe

                                                                                                                                                                                        class ParseFilePipe implements PipeTransform {}
                                                                                                                                                                                        • Defines the built-in ParseFile Pipe. This pipe can be used to validate incoming files with @UploadedFile() decorator. You can use either other specific built-in validators or provide one of your own, simply implementing it through FileValidator interface and adding it to ParseFilePipe's constructor.

                                                                                                                                                                                          See Also

                                                                                                                                                                                          • [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes)

                                                                                                                                                                                        constructor

                                                                                                                                                                                        constructor(options?: ParseFileOptions);

                                                                                                                                                                                          property exceptionFactory

                                                                                                                                                                                          protected exceptionFactory: (error: string) => any;

                                                                                                                                                                                            method getValidators

                                                                                                                                                                                            getValidators: () => FileValidator<
                                                                                                                                                                                            Record<string, any>,
                                                                                                                                                                                            import('./interfaces/file.interface.js').IFile
                                                                                                                                                                                            >[];
                                                                                                                                                                                            • Returns

                                                                                                                                                                                              list of validators used in this pipe.

                                                                                                                                                                                            method transform

                                                                                                                                                                                            transform: (value: unknown) => Promise<any>;

                                                                                                                                                                                              method validate

                                                                                                                                                                                              protected validate: (file: unknown) => Promise<any>;

                                                                                                                                                                                                class ParseFilePipeBuilder

                                                                                                                                                                                                class ParseFilePipeBuilder {}

                                                                                                                                                                                                method addFileTypeValidator

                                                                                                                                                                                                addFileTypeValidator: (options: FileTypeValidatorOptions) => this;

                                                                                                                                                                                                  method addMaxSizeValidator

                                                                                                                                                                                                  addMaxSizeValidator: (options: MaxFileSizeValidatorOptions) => this;

                                                                                                                                                                                                    method addValidator

                                                                                                                                                                                                    addValidator: (validator: FileValidator) => this;

                                                                                                                                                                                                      method build

                                                                                                                                                                                                      build: (
                                                                                                                                                                                                      additionalOptions?: Omit<ParseFileOptions, 'validators'>
                                                                                                                                                                                                      ) => ParseFilePipe;

                                                                                                                                                                                                        class ParseFloatPipe

                                                                                                                                                                                                        class ParseFloatPipe implements PipeTransform {}
                                                                                                                                                                                                        • Defines the built-in ParseFloat Pipe

                                                                                                                                                                                                          See Also

                                                                                                                                                                                                          • [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes)

                                                                                                                                                                                                        constructor

                                                                                                                                                                                                        constructor(options?: ParseFloatPipeOptions);

                                                                                                                                                                                                          property exceptionFactory

                                                                                                                                                                                                          protected exceptionFactory: (error: string) => any;

                                                                                                                                                                                                            property options

                                                                                                                                                                                                            protected readonly options?: ParseFloatPipeOptions;

                                                                                                                                                                                                              method isNumeric

                                                                                                                                                                                                              protected isNumeric: (value: unknown) => boolean;
                                                                                                                                                                                                              • Parameter value

                                                                                                                                                                                                                currently processed route argument

                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                true if value is a valid float number

                                                                                                                                                                                                              method transform

                                                                                                                                                                                                              transform: (
                                                                                                                                                                                                              value: unknown,
                                                                                                                                                                                                              metadata: ArgumentMetadata
                                                                                                                                                                                                              ) => Promise<number | undefined | null>;
                                                                                                                                                                                                              • Method that accesses and performs optional transformation on argument for in-flight requests.

                                                                                                                                                                                                                Parameter value

                                                                                                                                                                                                                currently processed route argument

                                                                                                                                                                                                                Parameter metadata

                                                                                                                                                                                                                contains metadata about the currently processed route argument

                                                                                                                                                                                                              class ParseIntPipe

                                                                                                                                                                                                              class ParseIntPipe implements PipeTransform {}
                                                                                                                                                                                                              • Defines the built-in ParseInt Pipe

                                                                                                                                                                                                                See Also

                                                                                                                                                                                                                • [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes)

                                                                                                                                                                                                              constructor

                                                                                                                                                                                                              constructor(options?: ParseIntPipeOptions);

                                                                                                                                                                                                                property exceptionFactory

                                                                                                                                                                                                                protected exceptionFactory: (error: string) => any;

                                                                                                                                                                                                                  property options

                                                                                                                                                                                                                  protected readonly options?: ParseIntPipeOptions;

                                                                                                                                                                                                                    method isNumeric

                                                                                                                                                                                                                    protected isNumeric: (value: unknown) => boolean;
                                                                                                                                                                                                                    • Parameter value

                                                                                                                                                                                                                      currently processed route argument

                                                                                                                                                                                                                      Returns

                                                                                                                                                                                                                      true if value is a valid integer number

                                                                                                                                                                                                                    method transform

                                                                                                                                                                                                                    transform: (
                                                                                                                                                                                                                    value: unknown,
                                                                                                                                                                                                                    metadata: ArgumentMetadata
                                                                                                                                                                                                                    ) => Promise<number | undefined | null>;
                                                                                                                                                                                                                    • Method that accesses and performs optional transformation on argument for in-flight requests.

                                                                                                                                                                                                                      Parameter value

                                                                                                                                                                                                                      currently processed route argument

                                                                                                                                                                                                                      Parameter metadata

                                                                                                                                                                                                                      contains metadata about the currently processed route argument

                                                                                                                                                                                                                    class ParseUUIDPipe

                                                                                                                                                                                                                    class ParseUUIDPipe implements PipeTransform {}
                                                                                                                                                                                                                    • Defines the built-in ParseUUID Pipe

                                                                                                                                                                                                                      See Also

                                                                                                                                                                                                                      • [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes)

                                                                                                                                                                                                                    constructor

                                                                                                                                                                                                                    constructor(options?: ParseUUIDPipeOptions);

                                                                                                                                                                                                                      property exceptionFactory

                                                                                                                                                                                                                      protected exceptionFactory: (errors: string) => any;

                                                                                                                                                                                                                        property options

                                                                                                                                                                                                                        protected readonly options?: ParseUUIDPipeOptions;

                                                                                                                                                                                                                          property uuidRegExps

                                                                                                                                                                                                                          protected static uuidRegExps: Record<UUIDVersion, RegExp>;

                                                                                                                                                                                                                            method isUUID

                                                                                                                                                                                                                            protected isUUID: (str: unknown, version?: UUIDVersion) => boolean;

                                                                                                                                                                                                                              method transform

                                                                                                                                                                                                                              transform: (
                                                                                                                                                                                                                              value: unknown,
                                                                                                                                                                                                                              metadata: ArgumentMetadata
                                                                                                                                                                                                                              ) => Promise<string | undefined | null>;

                                                                                                                                                                                                                                class PayloadTooLargeException

                                                                                                                                                                                                                                class PayloadTooLargeException extends HttpException {}
                                                                                                                                                                                                                                • Defines an HTTP exception for *Payload Too Large* type errors.

                                                                                                                                                                                                                                  See Also

                                                                                                                                                                                                                                  • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                                                                                                                                constructor

                                                                                                                                                                                                                                constructor(
                                                                                                                                                                                                                                objectOrError?: any,
                                                                                                                                                                                                                                descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                                                                                                                                );
                                                                                                                                                                                                                                • Instantiate a PayloadTooLargeException Exception.

                                                                                                                                                                                                                                  Parameter objectOrError

                                                                                                                                                                                                                                  string or object describing the error condition.

                                                                                                                                                                                                                                  Parameter descriptionOrOptions

                                                                                                                                                                                                                                  either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                                                                                                                                  Example 1

                                                                                                                                                                                                                                  throw new PayloadTooLargeException()

                                                                                                                                                                                                                                  The HTTP response status code will be 413. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                                                                                                                                  By default, the JSON response body contains two properties: - statusCode: this will be the value 413. - message: the string 'Payload Too Large' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                                                                                                                                  If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                                                                                                                                class PreconditionFailedException

                                                                                                                                                                                                                                class PreconditionFailedException extends HttpException {}
                                                                                                                                                                                                                                • Defines an HTTP exception for *Precondition Failed* type errors.

                                                                                                                                                                                                                                  See Also

                                                                                                                                                                                                                                  • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                                                                                                                                constructor

                                                                                                                                                                                                                                constructor(
                                                                                                                                                                                                                                objectOrError?: any,
                                                                                                                                                                                                                                descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                                                                                                                                );
                                                                                                                                                                                                                                • Instantiate a PreconditionFailedException Exception.

                                                                                                                                                                                                                                  Parameter objectOrError

                                                                                                                                                                                                                                  string or object describing the error condition.

                                                                                                                                                                                                                                  Parameter descriptionOrOptions

                                                                                                                                                                                                                                  either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                                                                                                                                  Example 1

                                                                                                                                                                                                                                  throw new PreconditionFailedException()

                                                                                                                                                                                                                                  The HTTP response status code will be 412. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                                                                                                                                  By default, the JSON response body contains two properties: - statusCode: this will be the value 412. - message: the string 'Precondition Failed' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                                                                                                                                  If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                                                                                                                                class RequestTimeoutException

                                                                                                                                                                                                                                class RequestTimeoutException extends HttpException {}
                                                                                                                                                                                                                                • Defines an HTTP exception for *Request Timeout* type errors.

                                                                                                                                                                                                                                  See Also

                                                                                                                                                                                                                                  • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                                                                                                                                constructor

                                                                                                                                                                                                                                constructor(
                                                                                                                                                                                                                                objectOrError?: any,
                                                                                                                                                                                                                                descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                                                                                                                                );
                                                                                                                                                                                                                                • Instantiate a RequestTimeoutException Exception.

                                                                                                                                                                                                                                  Parameter objectOrError

                                                                                                                                                                                                                                  string or object describing the error condition.

                                                                                                                                                                                                                                  Parameter descriptionOrOptions

                                                                                                                                                                                                                                  either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                                                                                                                                  Example 1

                                                                                                                                                                                                                                  throw new RequestTimeoutException()

                                                                                                                                                                                                                                  The HTTP response status code will be 408. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                                                                                                                                  By default, the JSON response body contains two properties: - statusCode: this will be the value 408. - message: the string 'Request Timeout' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                                                                                                                                  If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                                                                                                                                class ServiceUnavailableException

                                                                                                                                                                                                                                class ServiceUnavailableException extends HttpException {}
                                                                                                                                                                                                                                • Defines an HTTP exception for *Service Unavailable* type errors.

                                                                                                                                                                                                                                  See Also

                                                                                                                                                                                                                                  • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                                                                                                                                constructor

                                                                                                                                                                                                                                constructor(
                                                                                                                                                                                                                                objectOrError?: any,
                                                                                                                                                                                                                                descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                                                                                                                                );
                                                                                                                                                                                                                                • Instantiate a ServiceUnavailableException Exception.

                                                                                                                                                                                                                                  Parameter objectOrError

                                                                                                                                                                                                                                  string or object describing the error condition.

                                                                                                                                                                                                                                  Parameter descriptionOrOptions

                                                                                                                                                                                                                                  either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                                                                                                                                  Example 1

                                                                                                                                                                                                                                  throw new ServiceUnavailableException()

                                                                                                                                                                                                                                  The HTTP response status code will be 503. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                                                                                                                                  By default, the JSON response body contains two properties: - statusCode: this will be the value 503. - message: the string 'Service Unavailable' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                                                                                                                                  If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                                                                                                                                class StandardSchemaSerializerInterceptor

                                                                                                                                                                                                                                class StandardSchemaSerializerInterceptor implements NestInterceptor {}
                                                                                                                                                                                                                                • An interceptor that serializes outgoing responses using a Standard Schema.

                                                                                                                                                                                                                                  The schema can be provided either: - As a default option in the interceptor constructor - Per-handler or per-class via @SerializeOptions({ schema }) decorator

                                                                                                                                                                                                                                  When a schema is present, the interceptor validates/transforms the response through the schema's ~standard.validate() method. If validation fails, the issues are thrown as an error.

                                                                                                                                                                                                                                  See Also

                                                                                                                                                                                                                                  • [Standard Schema](https://github.com/standard-schema/standard-schema)

                                                                                                                                                                                                                                constructor

                                                                                                                                                                                                                                constructor(
                                                                                                                                                                                                                                reflector: any,
                                                                                                                                                                                                                                defaultOptions?: StandardSchemaSerializerInterceptorOptions
                                                                                                                                                                                                                                );

                                                                                                                                                                                                                                  property defaultOptions

                                                                                                                                                                                                                                  protected readonly defaultOptions: StandardSchemaSerializerInterceptorOptions;

                                                                                                                                                                                                                                    property reflector

                                                                                                                                                                                                                                    protected readonly reflector: any;

                                                                                                                                                                                                                                      method getContextOptions

                                                                                                                                                                                                                                      protected getContextOptions: (
                                                                                                                                                                                                                                      context: ExecutionContext
                                                                                                                                                                                                                                      ) => StandardSchemaSerializerContextOptions | undefined;

                                                                                                                                                                                                                                        method intercept

                                                                                                                                                                                                                                        intercept: (context: ExecutionContext, next: CallHandler) => Observable<any>;

                                                                                                                                                                                                                                          method serialize

                                                                                                                                                                                                                                          serialize: (
                                                                                                                                                                                                                                          response: PlainLiteralObject | Array<PlainLiteralObject>,
                                                                                                                                                                                                                                          schema: StandardSchemaV1 | undefined,
                                                                                                                                                                                                                                          validateOptions?: StandardSchemaV1.Options
                                                                                                                                                                                                                                          ) =>
                                                                                                                                                                                                                                          | PlainLiteralObject
                                                                                                                                                                                                                                          | Array<PlainLiteralObject>
                                                                                                                                                                                                                                          | Promise<PlainLiteralObject | Array<PlainLiteralObject>>;
                                                                                                                                                                                                                                          • Serializes responses that are non-null objects nor streamable files.

                                                                                                                                                                                                                                          method transformToPlain

                                                                                                                                                                                                                                          transformToPlain: (
                                                                                                                                                                                                                                          plainOrClass: any,
                                                                                                                                                                                                                                          schema: StandardSchemaV1,
                                                                                                                                                                                                                                          validateOptions?: StandardSchemaV1.Options
                                                                                                                                                                                                                                          ) => Promise<PlainLiteralObject>;

                                                                                                                                                                                                                                            class StandardSchemaValidationPipe

                                                                                                                                                                                                                                            class StandardSchemaValidationPipe implements PipeTransform {}
                                                                                                                                                                                                                                            • Defines the built-in StandardSchemaValidation Pipe.

                                                                                                                                                                                                                                              Uses a standard schema object (conforming to the Standard Schema spec) attached to the parameter metadata to validate incoming values.

                                                                                                                                                                                                                                              See Also

                                                                                                                                                                                                                                              • [Standard Schema](https://github.com/standard-schema/standard-schema)

                                                                                                                                                                                                                                            constructor

                                                                                                                                                                                                                                            constructor(options?: StandardSchemaValidationPipeOptions);

                                                                                                                                                                                                                                              property exceptionFactory

                                                                                                                                                                                                                                              protected exceptionFactory: (issues: readonly StandardSchemaV1.Issue[]) => any;

                                                                                                                                                                                                                                                property isTransformEnabled

                                                                                                                                                                                                                                                protected isTransformEnabled: boolean;

                                                                                                                                                                                                                                                  property options

                                                                                                                                                                                                                                                  protected readonly options?: StandardSchemaValidationPipeOptions;

                                                                                                                                                                                                                                                    property validateCustomDecorators

                                                                                                                                                                                                                                                    protected validateCustomDecorators: boolean;

                                                                                                                                                                                                                                                      property validateOptions

                                                                                                                                                                                                                                                      protected validateOptions: Record<string, unknown>;

                                                                                                                                                                                                                                                        method formatIssueMessages

                                                                                                                                                                                                                                                        protected formatIssueMessages: (
                                                                                                                                                                                                                                                        issues: readonly StandardSchemaV1.Issue[]
                                                                                                                                                                                                                                                        ) => string[];
                                                                                                                                                                                                                                                        • Formats Standard Schema validation issues into a flat list of error messages. When an issue includes a path, the path is prefixed to the message.

                                                                                                                                                                                                                                                        method stripProtoKeys

                                                                                                                                                                                                                                                        protected stripProtoKeys: (value: any) => void;

                                                                                                                                                                                                                                                          method toValidate

                                                                                                                                                                                                                                                          protected toValidate: (metadata: ArgumentMetadata) => boolean;
                                                                                                                                                                                                                                                          • Determines whether validation should be performed for the given metadata. Skips validation for custom decorators unless validateCustomDecorators is enabled.

                                                                                                                                                                                                                                                            Parameter metadata

                                                                                                                                                                                                                                                            contains metadata about the currently processed route argument

                                                                                                                                                                                                                                                            Returns

                                                                                                                                                                                                                                                            true if validation should be performed

                                                                                                                                                                                                                                                          method transform

                                                                                                                                                                                                                                                          transform: <T = any>(value: T, metadata: ArgumentMetadata) => Promise<T>;
                                                                                                                                                                                                                                                          • Method that validates the incoming value against the standard schema provided in the parameter metadata.

                                                                                                                                                                                                                                                            Parameter value

                                                                                                                                                                                                                                                            currently processed route argument

                                                                                                                                                                                                                                                            Parameter metadata

                                                                                                                                                                                                                                                            contains metadata about the currently processed route argument

                                                                                                                                                                                                                                                          method validate

                                                                                                                                                                                                                                                          protected validate: <T = unknown>(
                                                                                                                                                                                                                                                          value: unknown,
                                                                                                                                                                                                                                                          schema: StandardSchemaV1,
                                                                                                                                                                                                                                                          options?: Record<string, unknown>
                                                                                                                                                                                                                                                          ) => Promise<StandardSchemaV1.Result<T>> | StandardSchemaV1.Result<T>;
                                                                                                                                                                                                                                                          • Validates a value against a standard schema. Can be overridden to customize validation behavior.

                                                                                                                                                                                                                                                            Parameter value

                                                                                                                                                                                                                                                            The value to validate

                                                                                                                                                                                                                                                            Parameter schema

                                                                                                                                                                                                                                                            The standard schema to validate against

                                                                                                                                                                                                                                                            Parameter options

                                                                                                                                                                                                                                                            Optional options forwarded to the schema's validate method

                                                                                                                                                                                                                                                            Returns

                                                                                                                                                                                                                                                            The validation result

                                                                                                                                                                                                                                                          class StreamableFile

                                                                                                                                                                                                                                                          class StreamableFile {}
                                                                                                                                                                                                                                                          • See Also

                                                                                                                                                                                                                                                            • [Streaming files](https://docs.nestjs.com/techniques/streaming-files)

                                                                                                                                                                                                                                                          constructor

                                                                                                                                                                                                                                                          constructor(buffer: Uint8Array, options?: StreamableFileOptions);

                                                                                                                                                                                                                                                            constructor

                                                                                                                                                                                                                                                            constructor(readable: Readable, options?: StreamableFileOptions);

                                                                                                                                                                                                                                                              property errorHandler

                                                                                                                                                                                                                                                              readonly errorHandler: (err: Error, response: StreamableHandlerResponse) => void;

                                                                                                                                                                                                                                                                property errorLogger

                                                                                                                                                                                                                                                                readonly errorLogger: (err: Error) => void;

                                                                                                                                                                                                                                                                  property handleError

                                                                                                                                                                                                                                                                  protected handleError: (err: Error, response: StreamableHandlerResponse) => void;

                                                                                                                                                                                                                                                                    property logError

                                                                                                                                                                                                                                                                    protected logError: (err: Error) => void;

                                                                                                                                                                                                                                                                      property logger

                                                                                                                                                                                                                                                                      protected logger: Logger;

                                                                                                                                                                                                                                                                        property options

                                                                                                                                                                                                                                                                        readonly options: StreamableFileOptions;

                                                                                                                                                                                                                                                                          method getHeaders

                                                                                                                                                                                                                                                                          getHeaders: () => {
                                                                                                                                                                                                                                                                          type: string;
                                                                                                                                                                                                                                                                          disposition: string | string[] | undefined;
                                                                                                                                                                                                                                                                          length: number | undefined;
                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                            method getStream

                                                                                                                                                                                                                                                                            getStream: () => Readable;

                                                                                                                                                                                                                                                                              method setErrorHandler

                                                                                                                                                                                                                                                                              setErrorHandler: (
                                                                                                                                                                                                                                                                              handler: (err: Error, response: StreamableHandlerResponse) => void
                                                                                                                                                                                                                                                                              ) => this;

                                                                                                                                                                                                                                                                                method setErrorLogger

                                                                                                                                                                                                                                                                                setErrorLogger: (handler: (err: Error) => void) => this;

                                                                                                                                                                                                                                                                                  class UnauthorizedException

                                                                                                                                                                                                                                                                                  class UnauthorizedException extends HttpException {}
                                                                                                                                                                                                                                                                                  • Defines an HTTP exception for *Unauthorized* type errors.

                                                                                                                                                                                                                                                                                    See Also

                                                                                                                                                                                                                                                                                    • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                                                                                                                                                                                  constructor

                                                                                                                                                                                                                                                                                  constructor(
                                                                                                                                                                                                                                                                                  objectOrError?: any,
                                                                                                                                                                                                                                                                                  descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                                                                                                                                                                                  );
                                                                                                                                                                                                                                                                                  • Instantiate an UnauthorizedException Exception.

                                                                                                                                                                                                                                                                                    Parameter objectOrError

                                                                                                                                                                                                                                                                                    string or object describing the error condition.

                                                                                                                                                                                                                                                                                    Parameter descriptionOrOptions

                                                                                                                                                                                                                                                                                    either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                                                                                                                                                                                    Example 1

                                                                                                                                                                                                                                                                                    throw new UnauthorizedException()

                                                                                                                                                                                                                                                                                    The HTTP response status code will be 401. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                                                                                                                                                                                    By default, the JSON response body contains two properties: - statusCode: this will be the value 401. - message: the string 'Unauthorized' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                                                                                                                                                                                    If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                                                                                                                                                                                  class UnprocessableEntityException

                                                                                                                                                                                                                                                                                  class UnprocessableEntityException extends HttpException {}
                                                                                                                                                                                                                                                                                  • Defines an HTTP exception for *Unprocessable Entity* type errors.

                                                                                                                                                                                                                                                                                    See Also

                                                                                                                                                                                                                                                                                    • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                                                                                                                                                                                  constructor

                                                                                                                                                                                                                                                                                  constructor(
                                                                                                                                                                                                                                                                                  objectOrError?: any,
                                                                                                                                                                                                                                                                                  descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                                                                                                                                                                                  );
                                                                                                                                                                                                                                                                                  • Instantiate an UnprocessableEntityException Exception.

                                                                                                                                                                                                                                                                                    Parameter objectOrError

                                                                                                                                                                                                                                                                                    string or object describing the error condition.

                                                                                                                                                                                                                                                                                    Parameter descriptionOrOptions

                                                                                                                                                                                                                                                                                    either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                                                                                                                                                                                    Example 1

                                                                                                                                                                                                                                                                                    throw new UnprocessableEntityException()

                                                                                                                                                                                                                                                                                    The HTTP response status code will be 422. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                                                                                                                                                                                    By default, the JSON response body contains two properties: - statusCode: this will be the value 422. - message: the string 'Unprocessable Entity' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                                                                                                                                                                                    If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                                                                                                                                                                                  class UnsupportedMediaTypeException

                                                                                                                                                                                                                                                                                  class UnsupportedMediaTypeException extends HttpException {}
                                                                                                                                                                                                                                                                                  • Defines an HTTP exception for *Unsupported Media Type* type errors.

                                                                                                                                                                                                                                                                                    See Also

                                                                                                                                                                                                                                                                                    • [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)

                                                                                                                                                                                                                                                                                  constructor

                                                                                                                                                                                                                                                                                  constructor(
                                                                                                                                                                                                                                                                                  objectOrError?: any,
                                                                                                                                                                                                                                                                                  descriptionOrOptions?: string | HttpExceptionOptions
                                                                                                                                                                                                                                                                                  );
                                                                                                                                                                                                                                                                                  • Instantiate an UnsupportedMediaTypeException Exception.

                                                                                                                                                                                                                                                                                    Parameter objectOrError

                                                                                                                                                                                                                                                                                    string or object describing the error condition.

                                                                                                                                                                                                                                                                                    Parameter descriptionOrOptions

                                                                                                                                                                                                                                                                                    either a short description of the HTTP error or an options object used to provide an underlying error cause

                                                                                                                                                                                                                                                                                    Example 1

                                                                                                                                                                                                                                                                                    throw new UnsupportedMediaTypeException()

                                                                                                                                                                                                                                                                                    The HTTP response status code will be 415. - The objectOrError argument defines the JSON response body or the message string. - The descriptionOrOptions argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.

                                                                                                                                                                                                                                                                                    By default, the JSON response body contains two properties: - statusCode: this will be the value 415. - message: the string 'Unsupported Media Type' by default; override this by supplying a string in the objectOrError parameter.

                                                                                                                                                                                                                                                                                    If the parameter objectOrError is a string, the response body will contain an additional property, error, with a short description of the HTTP error. To override the entire JSON response body, pass an object instead. Nest will serialize the object and return it as the JSON response body.

                                                                                                                                                                                                                                                                                  class ValidationPipe

                                                                                                                                                                                                                                                                                  class ValidationPipe implements PipeTransform {}
                                                                                                                                                                                                                                                                                  • See Also

                                                                                                                                                                                                                                                                                    • [Validation](https://docs.nestjs.com/techniques/validation)

                                                                                                                                                                                                                                                                                  constructor

                                                                                                                                                                                                                                                                                  constructor(options?: ValidationPipeOptions);

                                                                                                                                                                                                                                                                                    property errorFormat

                                                                                                                                                                                                                                                                                    protected errorFormat: ValidationErrorFormat;

                                                                                                                                                                                                                                                                                      property errorHttpStatusCode

                                                                                                                                                                                                                                                                                      protected errorHttpStatusCode: ErrorHttpStatusCode;

                                                                                                                                                                                                                                                                                        property exceptionFactory

                                                                                                                                                                                                                                                                                        protected exceptionFactory: (errors: ValidationError[]) => any;

                                                                                                                                                                                                                                                                                          property expectedType

                                                                                                                                                                                                                                                                                          protected expectedType: Type<any>;

                                                                                                                                                                                                                                                                                            property isDetailedOutputDisabled

                                                                                                                                                                                                                                                                                            protected isDetailedOutputDisabled?: boolean;

                                                                                                                                                                                                                                                                                              property isTransformEnabled

                                                                                                                                                                                                                                                                                              protected isTransformEnabled: boolean;

                                                                                                                                                                                                                                                                                                property transformOptions

                                                                                                                                                                                                                                                                                                protected transformOptions: ClassTransformOptions;

                                                                                                                                                                                                                                                                                                  property validateCustomDecorators

                                                                                                                                                                                                                                                                                                  protected validateCustomDecorators: boolean;

                                                                                                                                                                                                                                                                                                    property validatorOptions

                                                                                                                                                                                                                                                                                                    protected validatorOptions: ValidatorOptions;

                                                                                                                                                                                                                                                                                                      method createExceptionFactory

                                                                                                                                                                                                                                                                                                      createExceptionFactory: () => (validationErrors?: ValidationError[]) => unknown;

                                                                                                                                                                                                                                                                                                        method flattenValidationErrors

                                                                                                                                                                                                                                                                                                        protected flattenValidationErrors: (
                                                                                                                                                                                                                                                                                                        validationErrors: ValidationError[]
                                                                                                                                                                                                                                                                                                        ) => string[];

                                                                                                                                                                                                                                                                                                          method groupValidationErrors

                                                                                                                                                                                                                                                                                                          protected groupValidationErrors: (
                                                                                                                                                                                                                                                                                                          validationErrors: ValidationError[],
                                                                                                                                                                                                                                                                                                          parentPath?: string
                                                                                                                                                                                                                                                                                                          ) => Record<string, string[]>;

                                                                                                                                                                                                                                                                                                            method isPrimitive

                                                                                                                                                                                                                                                                                                            protected isPrimitive: (value: unknown) => boolean;

                                                                                                                                                                                                                                                                                                              method loadTransformer

                                                                                                                                                                                                                                                                                                              protected loadTransformer: (
                                                                                                                                                                                                                                                                                                              transformerPackage?: TransformerPackage
                                                                                                                                                                                                                                                                                                              ) => TransformerPackage | Promise<TransformerPackage>;

                                                                                                                                                                                                                                                                                                                method loadValidator

                                                                                                                                                                                                                                                                                                                protected loadValidator: (
                                                                                                                                                                                                                                                                                                                validatorPackage?: ValidatorPackage
                                                                                                                                                                                                                                                                                                                ) => ValidatorPackage | Promise<ValidatorPackage>;

                                                                                                                                                                                                                                                                                                                  method mapChildrenToValidationErrors

                                                                                                                                                                                                                                                                                                                  protected mapChildrenToValidationErrors: (
                                                                                                                                                                                                                                                                                                                  error: ValidationError,
                                                                                                                                                                                                                                                                                                                  parentPath?: string
                                                                                                                                                                                                                                                                                                                  ) => ValidationError[];

                                                                                                                                                                                                                                                                                                                    method prependConstraintsWithParentProp

                                                                                                                                                                                                                                                                                                                    protected prependConstraintsWithParentProp: (
                                                                                                                                                                                                                                                                                                                    parentPath: string,
                                                                                                                                                                                                                                                                                                                    error: ValidationError
                                                                                                                                                                                                                                                                                                                    ) => ValidationError;

                                                                                                                                                                                                                                                                                                                      method stripProtoKeys

                                                                                                                                                                                                                                                                                                                      protected stripProtoKeys: (value: any) => void;

                                                                                                                                                                                                                                                                                                                        method toEmptyIfNil

                                                                                                                                                                                                                                                                                                                        protected toEmptyIfNil: <T = any, R = T>(
                                                                                                                                                                                                                                                                                                                        value: unknown,
                                                                                                                                                                                                                                                                                                                        metatype: Type<unknown> | object
                                                                                                                                                                                                                                                                                                                        ) => R | object | string;

                                                                                                                                                                                                                                                                                                                          method toValidate

                                                                                                                                                                                                                                                                                                                          protected toValidate: (metadata: ArgumentMetadata) => boolean;

                                                                                                                                                                                                                                                                                                                            method transform

                                                                                                                                                                                                                                                                                                                            transform: (value: unknown, metadata: ArgumentMetadata) => Promise<any>;

                                                                                                                                                                                                                                                                                                                              method transformPrimitive

                                                                                                                                                                                                                                                                                                                              protected transformPrimitive: (
                                                                                                                                                                                                                                                                                                                              value: unknown,
                                                                                                                                                                                                                                                                                                                              metadata: ArgumentMetadata
                                                                                                                                                                                                                                                                                                                              ) => unknown;

                                                                                                                                                                                                                                                                                                                                method validate

                                                                                                                                                                                                                                                                                                                                protected validate: (
                                                                                                                                                                                                                                                                                                                                object: object,
                                                                                                                                                                                                                                                                                                                                validatorOptions?: ValidatorOptions
                                                                                                                                                                                                                                                                                                                                ) => Promise<ValidationError[]> | ValidationError[];

                                                                                                                                                                                                                                                                                                                                  Interfaces

                                                                                                                                                                                                                                                                                                                                  interface Abstract

                                                                                                                                                                                                                                                                                                                                  interface Abstract<T> extends Function {}

                                                                                                                                                                                                                                                                                                                                    property prototype

                                                                                                                                                                                                                                                                                                                                    prototype: T;

                                                                                                                                                                                                                                                                                                                                      interface ArgumentMetadata

                                                                                                                                                                                                                                                                                                                                      interface ArgumentMetadata<Metatype = any> {}
                                                                                                                                                                                                                                                                                                                                      • Interface describing a pipe implementation's transform() method metadata argument.

                                                                                                                                                                                                                                                                                                                                        See Also

                                                                                                                                                                                                                                                                                                                                        • [Pipes](https://docs.nestjs.com/pipes)

                                                                                                                                                                                                                                                                                                                                      property data

                                                                                                                                                                                                                                                                                                                                      readonly data?: string | undefined;
                                                                                                                                                                                                                                                                                                                                      • String passed as an argument to the decorator. Example: @Body('userId') would yield userId

                                                                                                                                                                                                                                                                                                                                      property metatype

                                                                                                                                                                                                                                                                                                                                      readonly metatype?: Type<Metatype> | undefined;
                                                                                                                                                                                                                                                                                                                                      • Underlying base type (e.g., String) of the parameter, based on the type definition in the route handler.

                                                                                                                                                                                                                                                                                                                                      property schema

                                                                                                                                                                                                                                                                                                                                      readonly schema?: StandardSchemaV1;
                                                                                                                                                                                                                                                                                                                                      • A standard schema object. Can be used to validate the parameter's value against the schema, or to generate API.

                                                                                                                                                                                                                                                                                                                                      property type

                                                                                                                                                                                                                                                                                                                                      readonly type: Paramtype;
                                                                                                                                                                                                                                                                                                                                      • Indicates whether argument is a body, query, param, or custom parameter

                                                                                                                                                                                                                                                                                                                                      interface ArgumentsHost

                                                                                                                                                                                                                                                                                                                                      interface ArgumentsHost {}
                                                                                                                                                                                                                                                                                                                                      • Provides methods for retrieving the arguments being passed to a handler. Allows choosing the appropriate execution context (e.g., Http, RPC, or WebSockets) to retrieve the arguments from.

                                                                                                                                                                                                                                                                                                                                      method getArgByIndex

                                                                                                                                                                                                                                                                                                                                      getArgByIndex: <T = any>(index: number) => T;
                                                                                                                                                                                                                                                                                                                                      • Returns a particular argument by index.

                                                                                                                                                                                                                                                                                                                                        Parameter index

                                                                                                                                                                                                                                                                                                                                        index of argument to retrieve

                                                                                                                                                                                                                                                                                                                                      method getArgs

                                                                                                                                                                                                                                                                                                                                      getArgs: <T extends any[] = any[]>() => T;
                                                                                                                                                                                                                                                                                                                                      • Returns the array of arguments being passed to the handler.

                                                                                                                                                                                                                                                                                                                                      method getType

                                                                                                                                                                                                                                                                                                                                      getType: <TContext extends string = ContextType>() => TContext;
                                                                                                                                                                                                                                                                                                                                      • Returns the current execution context type (string)

                                                                                                                                                                                                                                                                                                                                      method switchToHttp

                                                                                                                                                                                                                                                                                                                                      switchToHttp: () => HttpArgumentsHost;
                                                                                                                                                                                                                                                                                                                                      • Switch context to HTTP.

                                                                                                                                                                                                                                                                                                                                        Returns

                                                                                                                                                                                                                                                                                                                                        interface with methods to retrieve HTTP arguments

                                                                                                                                                                                                                                                                                                                                      method switchToRpc

                                                                                                                                                                                                                                                                                                                                      switchToRpc: () => RpcArgumentsHost;
                                                                                                                                                                                                                                                                                                                                      • Switch context to RPC.

                                                                                                                                                                                                                                                                                                                                        Returns

                                                                                                                                                                                                                                                                                                                                        interface with methods to retrieve RPC arguments

                                                                                                                                                                                                                                                                                                                                      method switchToWs

                                                                                                                                                                                                                                                                                                                                      switchToWs: () => WsArgumentsHost;
                                                                                                                                                                                                                                                                                                                                      • Switch context to WebSockets.

                                                                                                                                                                                                                                                                                                                                        Returns

                                                                                                                                                                                                                                                                                                                                        interface with methods to retrieve WebSockets arguments

                                                                                                                                                                                                                                                                                                                                      interface BeforeApplicationShutdown

                                                                                                                                                                                                                                                                                                                                      interface BeforeApplicationShutdown {}

                                                                                                                                                                                                                                                                                                                                        method beforeApplicationShutdown

                                                                                                                                                                                                                                                                                                                                        beforeApplicationShutdown: (signal?: string) => any;

                                                                                                                                                                                                                                                                                                                                          interface CallHandler

                                                                                                                                                                                                                                                                                                                                          interface CallHandler<T = any> {}
                                                                                                                                                                                                                                                                                                                                          • Interface providing access to the response stream.

                                                                                                                                                                                                                                                                                                                                            See Also

                                                                                                                                                                                                                                                                                                                                            • [Interceptors](https://docs.nestjs.com/interceptors)

                                                                                                                                                                                                                                                                                                                                          method handle

                                                                                                                                                                                                                                                                                                                                          handle: () => Observable<T>;
                                                                                                                                                                                                                                                                                                                                          • Returns an Observable representing the response stream from the route handler.

                                                                                                                                                                                                                                                                                                                                          interface CanActivate

                                                                                                                                                                                                                                                                                                                                          interface CanActivate {}
                                                                                                                                                                                                                                                                                                                                          • Interface defining the canActivate() function that must be implemented by a guard. Return value indicates whether or not the current request is allowed to proceed. Return can be either synchronous (boolean) or asynchronous (Promise or Observable).

                                                                                                                                                                                                                                                                                                                                            See Also

                                                                                                                                                                                                                                                                                                                                            • [Guards](https://docs.nestjs.com/guards)

                                                                                                                                                                                                                                                                                                                                          method canActivate

                                                                                                                                                                                                                                                                                                                                          canActivate: (
                                                                                                                                                                                                                                                                                                                                          context: ExecutionContext
                                                                                                                                                                                                                                                                                                                                          ) => boolean | Promise<boolean> | Observable<boolean>;
                                                                                                                                                                                                                                                                                                                                          • Parameter context

                                                                                                                                                                                                                                                                                                                                            Current execution context. Provides access to details about the current request pipeline.

                                                                                                                                                                                                                                                                                                                                            Returns

                                                                                                                                                                                                                                                                                                                                            Value indicating whether or not the current request is allowed to proceed.

                                                                                                                                                                                                                                                                                                                                          interface ClassProvider

                                                                                                                                                                                                                                                                                                                                          interface ClassProvider<T = any> {}
                                                                                                                                                                                                                                                                                                                                          • Interface defining a *Class* type provider.

                                                                                                                                                                                                                                                                                                                                            For example:

                                                                                                                                                                                                                                                                                                                                            const configServiceProvider = {
                                                                                                                                                                                                                                                                                                                                            provide: ConfigService,
                                                                                                                                                                                                                                                                                                                                            useClass:
                                                                                                                                                                                                                                                                                                                                            process.env.NODE_ENV === 'development'
                                                                                                                                                                                                                                                                                                                                            ? DevelopmentConfigService
                                                                                                                                                                                                                                                                                                                                            : ProductionConfigService,
                                                                                                                                                                                                                                                                                                                                            };

                                                                                                                                                                                                                                                                                                                                            See Also

                                                                                                                                                                                                                                                                                                                                            • [Class providers](https://docs.nestjs.com/fundamentals/custom-providers#class-providers-useclass)

                                                                                                                                                                                                                                                                                                                                            • [Injection scopes](https://docs.nestjs.com/fundamentals/injection-scopes)

                                                                                                                                                                                                                                                                                                                                          property durable

                                                                                                                                                                                                                                                                                                                                          durable?: boolean;
                                                                                                                                                                                                                                                                                                                                          • Flags provider as durable. This flag can be used in combination with custom context id factory strategy to construct lazy DI subtrees.

                                                                                                                                                                                                                                                                                                                                            This flag can be used only in conjunction with scope = Scope.REQUEST.

                                                                                                                                                                                                                                                                                                                                          property inject

                                                                                                                                                                                                                                                                                                                                          inject?: never;
                                                                                                                                                                                                                                                                                                                                          • This option is only available on factory providers!

                                                                                                                                                                                                                                                                                                                                            See Also

                                                                                                                                                                                                                                                                                                                                            • [Use factory](https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory)

                                                                                                                                                                                                                                                                                                                                          property provide

                                                                                                                                                                                                                                                                                                                                          provide: InjectionToken;
                                                                                                                                                                                                                                                                                                                                          • Injection token

                                                                                                                                                                                                                                                                                                                                          property scope

                                                                                                                                                                                                                                                                                                                                          scope?: Scope;
                                                                                                                                                                                                                                                                                                                                          • Optional enum defining lifetime of the provider that is injected.

                                                                                                                                                                                                                                                                                                                                          property useClass

                                                                                                                                                                                                                                                                                                                                          useClass: Type<T>;
                                                                                                                                                                                                                                                                                                                                          • Type (class name) of provider (instance to be injected).

                                                                                                                                                                                                                                                                                                                                          interface ClassSerializerContextOptions

                                                                                                                                                                                                                                                                                                                                          interface ClassSerializerContextOptions extends ClassTransformOptions {}

                                                                                                                                                                                                                                                                                                                                          property type

                                                                                                                                                                                                                                                                                                                                          type?: Type<any>;

                                                                                                                                                                                                                                                                                                                                            interface ClassSerializerInterceptorOptions

                                                                                                                                                                                                                                                                                                                                            interface ClassSerializerInterceptorOptions extends ClassTransformOptions {}

                                                                                                                                                                                                                                                                                                                                            property transformerPackage

                                                                                                                                                                                                                                                                                                                                            transformerPackage?: TransformerPackage;

                                                                                                                                                                                                                                                                                                                                              interface ConfigurableModuleAsyncOptions

                                                                                                                                                                                                                                                                                                                                              interface ConfigurableModuleAsyncOptions<
                                                                                                                                                                                                                                                                                                                                              ModuleOptions,
                                                                                                                                                                                                                                                                                                                                              FactoryClassMethodKey extends string = typeof DEFAULT_FACTORY_CLASS_METHOD_KEY
                                                                                                                                                                                                                                                                                                                                              > extends Pick<ModuleMetadata, 'imports'> {}
                                                                                                                                                                                                                                                                                                                                              • Interface that represents the module async options object Factory method name varies depending on the "FactoryClassMethodKey" type argument.

                                                                                                                                                                                                                                                                                                                                              property inject

                                                                                                                                                                                                                                                                                                                                              inject?: FactoryProvider['inject'];
                                                                                                                                                                                                                                                                                                                                              • Dependencies that a Factory may inject.

                                                                                                                                                                                                                                                                                                                                              property provideInjectionTokensFrom

                                                                                                                                                                                                                                                                                                                                              provideInjectionTokensFrom?: Provider[];
                                                                                                                                                                                                                                                                                                                                              • List of parent module's providers that will be filtered to only provide necessary providers for the 'inject' array useful to pass options to nested async modules

                                                                                                                                                                                                                                                                                                                                              property useClass

                                                                                                                                                                                                                                                                                                                                              useClass?: Type<
                                                                                                                                                                                                                                                                                                                                              ConfigurableModuleOptionsFactory<ModuleOptions, FactoryClassMethodKey>
                                                                                                                                                                                                                                                                                                                                              >;
                                                                                                                                                                                                                                                                                                                                              • Injection token resolving to a class that will be instantiated as a provider. The class must implement the corresponding interface.

                                                                                                                                                                                                                                                                                                                                              property useExisting

                                                                                                                                                                                                                                                                                                                                              useExisting?: Type<
                                                                                                                                                                                                                                                                                                                                              ConfigurableModuleOptionsFactory<ModuleOptions, FactoryClassMethodKey>
                                                                                                                                                                                                                                                                                                                                              >;
                                                                                                                                                                                                                                                                                                                                              • Injection token resolving to an existing provider. The provider must implement the corresponding interface.

                                                                                                                                                                                                                                                                                                                                              property useFactory

                                                                                                                                                                                                                                                                                                                                              useFactory?: (...args: any[]) => Promise<ModuleOptions> | ModuleOptions;
                                                                                                                                                                                                                                                                                                                                              • Function returning options (or a Promise resolving to options) to configure the module.

                                                                                                                                                                                                                                                                                                                                              interface ConfigurableModuleBuilderOptions

                                                                                                                                                                                                                                                                                                                                              interface ConfigurableModuleBuilderOptions {}

                                                                                                                                                                                                                                                                                                                                              property alwaysTransient

                                                                                                                                                                                                                                                                                                                                              alwaysTransient?: boolean;
                                                                                                                                                                                                                                                                                                                                              • Indicates whether module should always be "transient" - meaning, every time you call the static method to construct a dynamic module, regardless of what arguments you pass in, a new "unique" module will be created.

                                                                                                                                                                                                                                                                                                                                                false

                                                                                                                                                                                                                                                                                                                                              property moduleName

                                                                                                                                                                                                                                                                                                                                              moduleName?: string;
                                                                                                                                                                                                                                                                                                                                              • By default, an UUID will be used as a module options provider token. Explicitly specifying the "moduleName" will instruct the "ConfigurableModuleBuilder" to use a more descriptive provider token.

                                                                                                                                                                                                                                                                                                                                                For example, moduleName: "Cache" will auto-generate the provider token: "CACHE_MODULE_OPTIONS".

                                                                                                                                                                                                                                                                                                                                              property optionsInjectionToken

                                                                                                                                                                                                                                                                                                                                              optionsInjectionToken?: string | symbol;
                                                                                                                                                                                                                                                                                                                                              • Specifies what injection token should be used for the module options provider. By default, an auto-generated UUID will be used.

                                                                                                                                                                                                                                                                                                                                              interface ConfigurableModuleHost

                                                                                                                                                                                                                                                                                                                                              interface ConfigurableModuleHost<
                                                                                                                                                                                                                                                                                                                                              ModuleOptions = Record<string, unknown>,
                                                                                                                                                                                                                                                                                                                                              MethodKey extends string = string,
                                                                                                                                                                                                                                                                                                                                              FactoryClassMethodKey extends string = string,
                                                                                                                                                                                                                                                                                                                                              ExtraModuleDefinitionOptions = {}
                                                                                                                                                                                                                                                                                                                                              > {}
                                                                                                                                                                                                                                                                                                                                              • Configurable module host. See properties for more details

                                                                                                                                                                                                                                                                                                                                              property ASYNC_OPTIONS_TYPE

                                                                                                                                                                                                                                                                                                                                              ASYNC_OPTIONS_TYPE: ConfigurableModuleAsyncOptions<
                                                                                                                                                                                                                                                                                                                                              ModuleOptions,
                                                                                                                                                                                                                                                                                                                                              FactoryClassMethodKey
                                                                                                                                                                                                                                                                                                                                              > &
                                                                                                                                                                                                                                                                                                                                              Partial<ExtraModuleDefinitionOptions>;
                                                                                                                                                                                                                                                                                                                                              • Can be used to auto-infer the compound "async module options" type. Note: this property is not supposed to be used as a value.

                                                                                                                                                                                                                                                                                                                                                Example 1

                                                                                                                                                                                                                                                                                                                                                @Module({})
                                                                                                                                                                                                                                                                                                                                                class IntegrationModule extends ConfigurableModuleCls {
                                                                                                                                                                                                                                                                                                                                                static module = initializer(IntegrationModule);
                                                                                                                                                                                                                                                                                                                                                static registerAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule {
                                                                                                                                                                                                                                                                                                                                                return super.registerAsync(options);
                                                                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                                                                              property ConfigurableModuleClass

                                                                                                                                                                                                                                                                                                                                              ConfigurableModuleClass: ConfigurableModuleCls<
                                                                                                                                                                                                                                                                                                                                              ModuleOptions,
                                                                                                                                                                                                                                                                                                                                              MethodKey,
                                                                                                                                                                                                                                                                                                                                              FactoryClassMethodKey,
                                                                                                                                                                                                                                                                                                                                              ExtraModuleDefinitionOptions
                                                                                                                                                                                                                                                                                                                                              >;
                                                                                                                                                                                                                                                                                                                                              • Class that represents a blueprint/prototype for a configurable Nest module. This class provides static methods for constructing dynamic modules. Their names can be controlled through the "MethodKey" type argument.

                                                                                                                                                                                                                                                                                                                                                Your module class should inherit from this class to make the static methods available.

                                                                                                                                                                                                                                                                                                                                                Example 1

                                                                                                                                                                                                                                                                                                                                                @Module({})
                                                                                                                                                                                                                                                                                                                                                class IntegrationModule extends ConfigurableModuleCls {
                                                                                                                                                                                                                                                                                                                                                // ...
                                                                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                                                                              property MODULE_OPTIONS_TOKEN

                                                                                                                                                                                                                                                                                                                                              MODULE_OPTIONS_TOKEN: string | symbol;
                                                                                                                                                                                                                                                                                                                                              • Module options provider token. Can be used to inject the "options object" to providers registered within the host module.

                                                                                                                                                                                                                                                                                                                                              property OPTIONS_TYPE

                                                                                                                                                                                                                                                                                                                                              OPTIONS_TYPE: ModuleOptions & Partial<ExtraModuleDefinitionOptions>;
                                                                                                                                                                                                                                                                                                                                              • Can be used to auto-infer the compound "module options" type (options interface + extra module definition options). Note: this property is not supposed to be used as a value.

                                                                                                                                                                                                                                                                                                                                                Example 1

                                                                                                                                                                                                                                                                                                                                                @Module({})
                                                                                                                                                                                                                                                                                                                                                class IntegrationModule extends ConfigurableModuleCls {
                                                                                                                                                                                                                                                                                                                                                static module = initializer(IntegrationModule);
                                                                                                                                                                                                                                                                                                                                                static register(options: typeof OPTIONS_TYPE): DynamicModule {
                                                                                                                                                                                                                                                                                                                                                return super.register(options);
                                                                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                                                                              interface ConsoleLoggerOptions

                                                                                                                                                                                                                                                                                                                                              interface ConsoleLoggerOptions {}

                                                                                                                                                                                                                                                                                                                                              property breakLength

                                                                                                                                                                                                                                                                                                                                              breakLength?: number;
                                                                                                                                                                                                                                                                                                                                              • The length at which input values are split across multiple lines. Set to Infinity to format the input as a single line (in combination with "compact" set to true). Default Infinity when "compact" is true, 80 otherwise. Ignored when json is enabled, colors are disabled, and compact is set to true as it produces a parseable JSON output.

                                                                                                                                                                                                                                                                                                                                              property colors

                                                                                                                                                                                                                                                                                                                                              colors?: boolean;
                                                                                                                                                                                                                                                                                                                                              • If enabled, will print the log message in color. Default true if json is disabled, false otherwise

                                                                                                                                                                                                                                                                                                                                              property compact

                                                                                                                                                                                                                                                                                                                                              compact?: boolean | number;
                                                                                                                                                                                                                                                                                                                                              • If enabled, will print the log message in a single line, even if it is an object with multiple properties. If set to a number, the most n inner elements are united on a single line as long as all properties fit into breakLength. Short array elements are also grouped together. Default true when json is enabled, false otherwise.

                                                                                                                                                                                                                                                                                                                                              property context

                                                                                                                                                                                                                                                                                                                                              context?: string;
                                                                                                                                                                                                                                                                                                                                              • The context of the logger.

                                                                                                                                                                                                                                                                                                                                              property depth

                                                                                                                                                                                                                                                                                                                                              depth?: number;
                                                                                                                                                                                                                                                                                                                                              • Specifies the number of times to recurse while formatting object. This is useful for inspecting large objects. To recurse up to the maximum call stack size pass Infinity or null. Ignored when json is enabled, colors are disabled, and compact is set to true as it produces a parseable JSON output. 5

                                                                                                                                                                                                                                                                                                                                              property flattenParams

                                                                                                                                                                                                                                                                                                                                              flattenParams?: boolean;
                                                                                                                                                                                                                                                                                                                                              • When true and json mode is enabled, structured params are spread into the root JSON object instead of being nested under a params key. Requires structuredParams to be enabled. false

                                                                                                                                                                                                                                                                                                                                              property forceConsole

                                                                                                                                                                                                                                                                                                                                              forceConsole?: boolean;
                                                                                                                                                                                                                                                                                                                                              • If enabled, will force the use of console.log/console.error instead of process.stdout/stderr.write. This is useful for test environments like Jest that can buffer console calls. false

                                                                                                                                                                                                                                                                                                                                              property json

                                                                                                                                                                                                                                                                                                                                              json?: boolean;
                                                                                                                                                                                                                                                                                                                                              • If enabled, will print the log message in JSON format.

                                                                                                                                                                                                                                                                                                                                              property logLevels

                                                                                                                                                                                                                                                                                                                                              logLevels?: LogLevel[];
                                                                                                                                                                                                                                                                                                                                              • Enabled log levels. When not set, the levels are read from the NEST_LOG_LEVEL environment variable (e.g. warn, >=debug or warn,error) the first time the logger checks a level. Without it, every level is enabled.

                                                                                                                                                                                                                                                                                                                                              property maxArrayLength

                                                                                                                                                                                                                                                                                                                                              maxArrayLength?: number;
                                                                                                                                                                                                                                                                                                                                              • Specifies the maximum number of Array, TypedArray, Map, Set, WeakMap, and WeakSet elements to include when formatting. Set to null or Infinity to show all elements. Set to 0 or negative to show no elements. Ignored when json is enabled, colors are disabled, and compact is set to true as it produces a parseable JSON output. 100

                                                                                                                                                                                                                                                                                                                                              property maxStringLength

                                                                                                                                                                                                                                                                                                                                              maxStringLength?: number;
                                                                                                                                                                                                                                                                                                                                              • Specifies the maximum number of characters to include when formatting. Set to null or Infinity to show all elements. Set to 0 or negative to show no characters. Ignored when json is enabled, colors are disabled, and compact is set to true as it produces a parseable JSON output. 10000.

                                                                                                                                                                                                                                                                                                                                              property prefix

                                                                                                                                                                                                                                                                                                                                              prefix?: string;
                                                                                                                                                                                                                                                                                                                                              • A prefix to be used for each log message. Note: This option is not used when json is enabled.

                                                                                                                                                                                                                                                                                                                                              property redact

                                                                                                                                                                                                                                                                                                                                              redact?:
                                                                                                                                                                                                                                                                                                                                              | string[]
                                                                                                                                                                                                                                                                                                                                              | {
                                                                                                                                                                                                                                                                                                                                              paths: string[];
                                                                                                                                                                                                                                                                                                                                              censor?: string;
                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                              • Properties to mask in logged values, as key names ('password', matched at any depth) or dotted paths ('user.password', matched by the last keys leading to the property, at any depth). Keys are compared case-insensitively, and array indices are skipped. Applies to structured params and to messages that are not strings (objects, arrays, errors), in text and JSON mode. String messages, the error message and the stack trace are printed as is. The logged values are not mutated: only the objects that contain a matching property are copied. Pass an object to replace the default censor ("[REDACTED]").

                                                                                                                                                                                                                                                                                                                                              property showHidden

                                                                                                                                                                                                                                                                                                                                              showHidden?: boolean;
                                                                                                                                                                                                                                                                                                                                              • If true, object's non-enumerable symbols and properties are included in the formatted result. WeakMap and WeakSet entries are also included as well as user defined prototype properties false

                                                                                                                                                                                                                                                                                                                                              property sorted

                                                                                                                                                                                                                                                                                                                                              sorted?: boolean | ((a: string, b: string) => number);
                                                                                                                                                                                                                                                                                                                                              • If enabled, will sort keys while formatting objects. Can also be a custom sorting function. Ignored when json is enabled, colors are disabled, and compact is set to true as it produces a parseable JSON output. false

                                                                                                                                                                                                                                                                                                                                              property structuredParams

                                                                                                                                                                                                                                                                                                                                              structuredParams?: boolean;
                                                                                                                                                                                                                                                                                                                                              • If enabled, plain objects passed after the message are treated as structured metadata (params) attached to the log entry, instead of being logged as separate messages. true

                                                                                                                                                                                                                                                                                                                                              property timestamp

                                                                                                                                                                                                                                                                                                                                              timestamp?: boolean;
                                                                                                                                                                                                                                                                                                                                              • If enabled, will print timestamp (time difference) between current and previous log message. Note: This option is not used when json is enabled.

                                                                                                                                                                                                                                                                                                                                              interface ContentSecurityPolicyOptions

                                                                                                                                                                                                                                                                                                                                              interface ContentSecurityPolicyOptions {}

                                                                                                                                                                                                                                                                                                                                              property directives

                                                                                                                                                                                                                                                                                                                                              directives?: Record<string, ContentSecurityPolicyDirectiveValue>;
                                                                                                                                                                                                                                                                                                                                              • Directives keyed by name, in camelCase (scriptSrc) or kebab-case ('script-src'). A directive given here replaces the default directive of the same name.

                                                                                                                                                                                                                                                                                                                                              property reportOnly

                                                                                                                                                                                                                                                                                                                                              reportOnly?: boolean;
                                                                                                                                                                                                                                                                                                                                              • Sends Content-Security-Policy-Report-Only instead, so violations are reported (see the report-to directive) but not blocked.

                                                                                                                                                                                                                                                                                                                                                false

                                                                                                                                                                                                                                                                                                                                              property useDefaults

                                                                                                                                                                                                                                                                                                                                              useDefaults?: boolean;
                                                                                                                                                                                                                                                                                                                                              • Whether directives are merged into the default directives. When false, only directives are sent, and they must include default-src (or remove it explicitly with defaultSrc: null).

                                                                                                                                                                                                                                                                                                                                                true

                                                                                                                                                                                                                                                                                                                                              interface ControllerOptions

                                                                                                                                                                                                                                                                                                                                              interface ControllerOptions extends ScopeOptions, VersionOptions {}
                                                                                                                                                                                                                                                                                                                                              • Interface defining options that can be passed to @Controller() decorator

                                                                                                                                                                                                                                                                                                                                              property host

                                                                                                                                                                                                                                                                                                                                              host?: string | RegExp | Array<string | RegExp>;
                                                                                                                                                                                                                                                                                                                                              • Specifies an optional HTTP Request host filter. When configured, methods within the controller will only be routed if the request host matches the specified value.

                                                                                                                                                                                                                                                                                                                                                See Also

                                                                                                                                                                                                                                                                                                                                                • [Routing](https://docs.nestjs.com/controllers#routing)

                                                                                                                                                                                                                                                                                                                                              property path

                                                                                                                                                                                                                                                                                                                                              path?: string | string[];
                                                                                                                                                                                                                                                                                                                                              • Specifies an optional route path prefix. The prefix is pre-pended to the path specified in any request decorator in the class.

                                                                                                                                                                                                                                                                                                                                                Supported only by HTTP-based applications (does not apply to non-HTTP microservices).

                                                                                                                                                                                                                                                                                                                                                See Also

                                                                                                                                                                                                                                                                                                                                                • [Routing](https://docs.nestjs.com/controllers#routing)

                                                                                                                                                                                                                                                                                                                                              interface CookieSerializeOptions

                                                                                                                                                                                                                                                                                                                                              interface CookieSerializeOptions {}
                                                                                                                                                                                                                                                                                                                                              • Attributes of a Set-Cookie header written by HttpServer.setCookie() and HttpServer.clearCookie().

                                                                                                                                                                                                                                                                                                                                                See Also

                                                                                                                                                                                                                                                                                                                                                • [RFC 6265, section 4.1](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1)

                                                                                                                                                                                                                                                                                                                                              property domain

                                                                                                                                                                                                                                                                                                                                              domain?: string;
                                                                                                                                                                                                                                                                                                                                              • Domain attribute. Omitted by default, which makes the cookie host-only.

                                                                                                                                                                                                                                                                                                                                              property expires

                                                                                                                                                                                                                                                                                                                                              expires?: Date;
                                                                                                                                                                                                                                                                                                                                              • Expires attribute. Browsers give precedence to maxAge when both are set.

                                                                                                                                                                                                                                                                                                                                              property httpOnly

                                                                                                                                                                                                                                                                                                                                              httpOnly?: boolean;
                                                                                                                                                                                                                                                                                                                                              • HttpOnly attribute.

                                                                                                                                                                                                                                                                                                                                              property maxAge

                                                                                                                                                                                                                                                                                                                                              maxAge?: number;
                                                                                                                                                                                                                                                                                                                                              • Max-Age attribute, in **seconds**, as in RFC 6265 and @fastify/cookie. Must be an integer.

                                                                                                                                                                                                                                                                                                                                                **Not milliseconds**: Express' res.cookie() takes maxAge in milliseconds, so a value carried over from it would make the cookie live 1000 times longer. For one day, pass 60 * 60 * 24.

                                                                                                                                                                                                                                                                                                                                              property partitioned

                                                                                                                                                                                                                                                                                                                                              partitioned?: boolean;
                                                                                                                                                                                                                                                                                                                                              • Partitioned attribute (CHIPS). Requires secure: true, since browsers reject partitioned cookies that are not Secure.

                                                                                                                                                                                                                                                                                                                                              property path

                                                                                                                                                                                                                                                                                                                                              path?: string;
                                                                                                                                                                                                                                                                                                                                              • Path attribute.

                                                                                                                                                                                                                                                                                                                                                '/'

                                                                                                                                                                                                                                                                                                                                              property priority

                                                                                                                                                                                                                                                                                                                                              priority?: 'low' | 'medium' | 'high';
                                                                                                                                                                                                                                                                                                                                              • Priority attribute (non-standard, honored by Chromium).

                                                                                                                                                                                                                                                                                                                                              property sameSite

                                                                                                                                                                                                                                                                                                                                              sameSite?: 'strict' | 'lax' | 'none';
                                                                                                                                                                                                                                                                                                                                              • SameSite attribute. 'none' requires secure: true, since browsers reject SameSite=None cookies that are not Secure.

                                                                                                                                                                                                                                                                                                                                              property secure

                                                                                                                                                                                                                                                                                                                                              secure?: boolean;
                                                                                                                                                                                                                                                                                                                                              • Secure attribute.

                                                                                                                                                                                                                                                                                                                                              property signed

                                                                                                                                                                                                                                                                                                                                              signed?: boolean;
                                                                                                                                                                                                                                                                                                                                              • Whether to sign the value with the first secret configured through the cookies.secret application option. Signed cookies are read with the @SignedCookies() decorator.

                                                                                                                                                                                                                                                                                                                                                false

                                                                                                                                                                                                                                                                                                                                              interface CookiesOptions

                                                                                                                                                                                                                                                                                                                                              interface CookiesOptions {}
                                                                                                                                                                                                                                                                                                                                              • The cookies option of NestFactory.create().

                                                                                                                                                                                                                                                                                                                                              property secret

                                                                                                                                                                                                                                                                                                                                              secret?: string | string[];
                                                                                                                                                                                                                                                                                                                                              • Secret (or secrets) used to sign and verify cookies. When an array is given, cookies are signed with the first secret and verified against all of them, which allows rotating secrets without invalidating cookies signed with a previous one. An empty string, an empty array or an empty entry throws when the application is created.

                                                                                                                                                                                                                                                                                                                                              interface CsrfProtectionOptions

                                                                                                                                                                                                                                                                                                                                              interface CsrfProtectionOptions<TRequest = any> {}
                                                                                                                                                                                                                                                                                                                                              • Options for app.enableCsrfProtection().

                                                                                                                                                                                                                                                                                                                                                The protection is based on Fetch Metadata (Sec-Fetch-Site) with an Origin/Host fallback, following the algorithm of Go's net/http.CrossOriginProtection. It is not a token scheme: it relies on the browser telling the server where a request comes from, which every evergreen browser does since 2023.

                                                                                                                                                                                                                                                                                                                                                Browsers only send Sec-Fetch-Site to secure origins (HTTPS or localhost). Otherwise the Origin header is compared with the Host header the server receives (X-Forwarded-Host is ignored). Behind a proxy that rewrites Host, preserve it, or list the public origin in trustedOrigins.

                                                                                                                                                                                                                                                                                                                                              property exclude

                                                                                                                                                                                                                                                                                                                                              exclude?: (string | RouteInfo)[] | ((request: TRequest) => boolean);
                                                                                                                                                                                                                                                                                                                                              • Requests that skip the protection altogether (for example webhook endpoints called by third-party servers that send a foreign Origin).

                                                                                                                                                                                                                                                                                                                                                Either a list of routes, or a predicate receiving the platform request object. Only consulted for requests that would otherwise be rejected.

                                                                                                                                                                                                                                                                                                                                                Routes are declared like MiddlewareConsumer.exclude(): a path, or { path, method, version? } to narrow by method (and URI version), without the global prefix, which is added unless the route is excluded from it. Unlike exclude(), the match is exact: case-sensitive, without an optional trailing slash, and never for non-canonical request paths (//, dot segments, ;, encoded / or .), which a router could resolve to a route that is not excluded.

                                                                                                                                                                                                                                                                                                                                              property trustedOrigins

                                                                                                                                                                                                                                                                                                                                              trustedOrigins?: string[];
                                                                                                                                                                                                                                                                                                                                              • Origins that may send cross-origin, state-changing requests, e.g. https://admin.example.com. Each entry must be a serialized origin: scheme://host[:port], without a path, query string, fragment or wildcard. Entries are normalized the way browsers serialize Origin (lower-case, without the default port), and a request is exempt when its Origin header equals one of them.

                                                                                                                                                                                                                                                                                                                                                Origins allowed by CORS are not trusted implicitly: list them here too.

                                                                                                                                                                                                                                                                                                                                              interface DescriptionAndOptions

                                                                                                                                                                                                                                                                                                                                              interface DescriptionAndOptions {}

                                                                                                                                                                                                                                                                                                                                                property description

                                                                                                                                                                                                                                                                                                                                                description?: string;

                                                                                                                                                                                                                                                                                                                                                  property httpExceptionOptions

                                                                                                                                                                                                                                                                                                                                                  httpExceptionOptions?: HttpExceptionOptions;

                                                                                                                                                                                                                                                                                                                                                    interface DynamicModule

                                                                                                                                                                                                                                                                                                                                                    interface DynamicModule extends ModuleMetadata {}
                                                                                                                                                                                                                                                                                                                                                    • Interface defining a Dynamic Module.

                                                                                                                                                                                                                                                                                                                                                      See Also

                                                                                                                                                                                                                                                                                                                                                      • [Dynamic Modules](https://docs.nestjs.com/modules#dynamic-modules)

                                                                                                                                                                                                                                                                                                                                                    property global

                                                                                                                                                                                                                                                                                                                                                    global?: boolean;
                                                                                                                                                                                                                                                                                                                                                    • When "true", makes a module global-scoped.

                                                                                                                                                                                                                                                                                                                                                      Once imported into any module, a global-scoped module will be visible in all modules. Thereafter, modules that wish to inject a service exported from a global module do not need to import the provider module.

                                                                                                                                                                                                                                                                                                                                                      false

                                                                                                                                                                                                                                                                                                                                                    property module

                                                                                                                                                                                                                                                                                                                                                    module: Type<any>;
                                                                                                                                                                                                                                                                                                                                                    • A module reference

                                                                                                                                                                                                                                                                                                                                                    interface ExceptionFilter

                                                                                                                                                                                                                                                                                                                                                    interface ExceptionFilter<T = any> {}
                                                                                                                                                                                                                                                                                                                                                    • Interface describing implementation of an exception filter.

                                                                                                                                                                                                                                                                                                                                                      See Also

                                                                                                                                                                                                                                                                                                                                                      • [Exception Filters](https://docs.nestjs.com/exception-filters)

                                                                                                                                                                                                                                                                                                                                                    method catch

                                                                                                                                                                                                                                                                                                                                                    catch: (exception: T, host: ArgumentsHost) => any;
                                                                                                                                                                                                                                                                                                                                                    • Method to implement a custom exception filter.

                                                                                                                                                                                                                                                                                                                                                      Parameter exception

                                                                                                                                                                                                                                                                                                                                                      the class of the exception being handled

                                                                                                                                                                                                                                                                                                                                                      Parameter host

                                                                                                                                                                                                                                                                                                                                                      used to access an array of arguments for the in-flight request

                                                                                                                                                                                                                                                                                                                                                    interface ExecutionContext

                                                                                                                                                                                                                                                                                                                                                    interface ExecutionContext extends ArgumentsHost {}
                                                                                                                                                                                                                                                                                                                                                    • Interface describing details about the current request pipeline.

                                                                                                                                                                                                                                                                                                                                                      See Also

                                                                                                                                                                                                                                                                                                                                                      • [Execution Context](https://docs.nestjs.com/guards#execution-context)

                                                                                                                                                                                                                                                                                                                                                    method getClass

                                                                                                                                                                                                                                                                                                                                                    getClass: <T = any>() => Type<T>;
                                                                                                                                                                                                                                                                                                                                                    • Returns the *type* of the controller class which the current handler belongs to.

                                                                                                                                                                                                                                                                                                                                                    method getHandler

                                                                                                                                                                                                                                                                                                                                                    getHandler: () => Function;
                                                                                                                                                                                                                                                                                                                                                    • Returns a reference to the handler (method) that will be invoked next in the request pipeline.

                                                                                                                                                                                                                                                                                                                                                    interface ExistingProvider

                                                                                                                                                                                                                                                                                                                                                    interface ExistingProvider<T = any> {}
                                                                                                                                                                                                                                                                                                                                                    • Interface defining an *Existing* (aliased) type provider.

                                                                                                                                                                                                                                                                                                                                                      For example:

                                                                                                                                                                                                                                                                                                                                                      const loggerAliasProvider = {
                                                                                                                                                                                                                                                                                                                                                      provide: 'AliasedLoggerService',
                                                                                                                                                                                                                                                                                                                                                      useExisting: LoggerService
                                                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                                                      See Also

                                                                                                                                                                                                                                                                                                                                                      • [Alias providers](https://docs.nestjs.com/fundamentals/custom-providers#alias-providers-useexisting)

                                                                                                                                                                                                                                                                                                                                                    property provide

                                                                                                                                                                                                                                                                                                                                                    provide: InjectionToken;
                                                                                                                                                                                                                                                                                                                                                    • Injection token

                                                                                                                                                                                                                                                                                                                                                    property useExisting

                                                                                                                                                                                                                                                                                                                                                    useExisting: any;
                                                                                                                                                                                                                                                                                                                                                    • Provider to be aliased by the Injection token.

                                                                                                                                                                                                                                                                                                                                                    interface FactoryProvider

                                                                                                                                                                                                                                                                                                                                                    interface FactoryProvider<T = any> {}
                                                                                                                                                                                                                                                                                                                                                    • Interface defining a *Factory* type provider.

                                                                                                                                                                                                                                                                                                                                                      For example:

                                                                                                                                                                                                                                                                                                                                                      const connectionFactory = {
                                                                                                                                                                                                                                                                                                                                                      provide: 'CONNECTION',
                                                                                                                                                                                                                                                                                                                                                      useFactory: (optionsProvider: OptionsProvider) => {
                                                                                                                                                                                                                                                                                                                                                      const options = optionsProvider.get();
                                                                                                                                                                                                                                                                                                                                                      return new DatabaseConnection(options);
                                                                                                                                                                                                                                                                                                                                                      },
                                                                                                                                                                                                                                                                                                                                                      inject: [OptionsProvider],
                                                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                                                      See Also

                                                                                                                                                                                                                                                                                                                                                      • [Factory providers](https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory)

                                                                                                                                                                                                                                                                                                                                                      • [Injection scopes](https://docs.nestjs.com/fundamentals/injection-scopes)

                                                                                                                                                                                                                                                                                                                                                    property durable

                                                                                                                                                                                                                                                                                                                                                    durable?: boolean;
                                                                                                                                                                                                                                                                                                                                                    • Flags provider as durable. This flag can be used in combination with custom context id factory strategy to construct lazy DI subtrees.

                                                                                                                                                                                                                                                                                                                                                      This flag can be used only in conjunction with scope = Scope.REQUEST.

                                                                                                                                                                                                                                                                                                                                                    property inject

                                                                                                                                                                                                                                                                                                                                                    inject?: Array<InjectionToken | OptionalFactoryDependency>;
                                                                                                                                                                                                                                                                                                                                                    • Optional list of providers to be injected into the context of the Factory function.

                                                                                                                                                                                                                                                                                                                                                    property provide

                                                                                                                                                                                                                                                                                                                                                    provide: InjectionToken;
                                                                                                                                                                                                                                                                                                                                                    • Injection token

                                                                                                                                                                                                                                                                                                                                                    property scope

                                                                                                                                                                                                                                                                                                                                                    scope?: Scope;
                                                                                                                                                                                                                                                                                                                                                    • Optional enum defining lifetime of the provider that is returned by the Factory function.

                                                                                                                                                                                                                                                                                                                                                    property useFactory

                                                                                                                                                                                                                                                                                                                                                    useFactory: (...args: any[]) => T | Promise<T>;
                                                                                                                                                                                                                                                                                                                                                    • Factory function that returns an instance of the provider to be injected.

                                                                                                                                                                                                                                                                                                                                                    interface ForwardReference

                                                                                                                                                                                                                                                                                                                                                    interface ForwardReference<T = any> {}

                                                                                                                                                                                                                                                                                                                                                      property forwardRef

                                                                                                                                                                                                                                                                                                                                                      forwardRef: T;

                                                                                                                                                                                                                                                                                                                                                        interface HttpExceptionBody

                                                                                                                                                                                                                                                                                                                                                        interface HttpExceptionBody {}

                                                                                                                                                                                                                                                                                                                                                          property error

                                                                                                                                                                                                                                                                                                                                                          error?: string;

                                                                                                                                                                                                                                                                                                                                                            property errorCode

                                                                                                                                                                                                                                                                                                                                                            errorCode?: string;

                                                                                                                                                                                                                                                                                                                                                              property message

                                                                                                                                                                                                                                                                                                                                                              message: HttpExceptionBodyMessage;

                                                                                                                                                                                                                                                                                                                                                                property statusCode

                                                                                                                                                                                                                                                                                                                                                                statusCode: number;

                                                                                                                                                                                                                                                                                                                                                                  interface HttpExceptionOptions

                                                                                                                                                                                                                                                                                                                                                                  interface HttpExceptionOptions {}

                                                                                                                                                                                                                                                                                                                                                                    property cause

                                                                                                                                                                                                                                                                                                                                                                    cause?: unknown;
                                                                                                                                                                                                                                                                                                                                                                    • original cause of the error

                                                                                                                                                                                                                                                                                                                                                                    property description

                                                                                                                                                                                                                                                                                                                                                                    description?: string;

                                                                                                                                                                                                                                                                                                                                                                      property errorCode

                                                                                                                                                                                                                                                                                                                                                                      errorCode?: string;

                                                                                                                                                                                                                                                                                                                                                                        interface HttpRedirectResponse

                                                                                                                                                                                                                                                                                                                                                                        interface HttpRedirectResponse {}

                                                                                                                                                                                                                                                                                                                                                                          property statusCode

                                                                                                                                                                                                                                                                                                                                                                          statusCode: HttpStatus;

                                                                                                                                                                                                                                                                                                                                                                            property url

                                                                                                                                                                                                                                                                                                                                                                            url: string;

                                                                                                                                                                                                                                                                                                                                                                              interface HttpServer

                                                                                                                                                                                                                                                                                                                                                                              interface HttpServer<TRequest = any, TResponse = any, ServerInstance = any> {}
                                                                                                                                                                                                                                                                                                                                                                              • Contract between the Nest core (NestApplication, the router, the middleware module and the exception layer) and an HTTP platform such as Express or Fastify.

                                                                                                                                                                                                                                                                                                                                                                                Implementations normally extend AbstractHttpAdapter from @nestjs/core, which supplies defaults for the methods that can simply delegate to the underlying framework instance. This interface is the source of truth for *when* the core calls each method and *what* it expects back; the class documents only what it adds on top.

                                                                                                                                                                                                                                                                                                                                                                                ### Lifecycle

                                                                                                                                                                                                                                                                                                                                                                                1. NestFactory.create() awaits HttpServer.init before scanning the module graph, then constructs the application, which calls HttpServer.initHttpServer so that HttpServer.getHttpServer returns a native server before app.init() runs. TestingModule.createNestApplication() only constructs the application, so it skips that first init() call. 2. app.init() applies the cors option through HttpServer.enableCors, awaits HttpServer.init again and calls HttpServer.registerParserMiddleware (unless bodyParser: false). It then connects the WebSocket gateways (which share the native server unless they set their own port), registers middleware through HttpServer.createMiddlewareFactory and routes through the verb methods, and runs the OnModuleInit hooks. Only then does it call HttpServer.setNotFoundHandler and HttpServer.setErrorHandler, before the OnApplicationBootstrap hooks run. 3. app.listen() runs app.init() if that has not happened yet, then calls HttpServer.listen. 4. app.close() awaits HttpServer.beforeClose, runs the OnModuleDestroy and BeforeApplicationShutdown hooks, closes the WebSocket gateways and the microservice clients, awaits HttpServer.close, closes the connected microservices, and finally runs the OnApplicationShutdown hooks.

                                                                                                                                                                                                                                                                                                                                                                                ### Requirements on the request, response and server objects

                                                                                                                                                                                                                                                                                                                                                                                Responses are written through the adapter, but the core also accesses the framework objects directly:

                                                                                                                                                                                                                                                                                                                                                                                - The route parameter decorators read properties of TRequest, so the adapter must make sure they are set by the time a route handler runs when the framework does not provide them: body (@Body()), params (@Param()), query (@Query()), headers keyed by lower-case name (@Headers()), ip (@Ip()) and, with the rawBody option, rawBody (@RawBody()). session, file and files (@Session(), @UploadedFile(), @UploadedFiles()) are usually set by third-party middleware. - The core attaches its own properties to TRequest: hosts for @HostParam(), the context id of request-scoped providers, and the abort controller of @Sse() routes, so the request has to be an extensible object. Request-scoped providers share one context between middleware and the route handler only if both receive the same request object, or if the handler's request exposes the middleware's one as raw. - Server-Sent Events (@Sse()) write straight to the Node.js response as a writable stream (writeHead, write, end, writableEnded) and watch request.socket to detect client disconnects. The core uses res.raw and req.raw when present, and the objects themselves otherwise, so they must be or expose a Node.js ServerResponse and IncomingMessage. - The value returned by HttpServer.getHttpServer must behave like a Node.js net.Server: app.listen() subscribes to its 'error' event and reads address(), and the WebSocket adapters attach to it.

                                                                                                                                                                                                                                                                                                                                                                                ### Optional members

                                                                                                                                                                                                                                                                                                                                                                                Most members marked optional are checked for presence before being called, and the fallback behavior is described on each one. The exceptions are HttpServer.getRequestHostname, HttpServer.getRequestMethod and HttpServer.getRequestUrl, which the core calls unconditionally in some code paths, so treat them as required. Note that AbstractHttpAdapter declares several optional members abstract, so a class-based adapter has to implement them anyway.

                                                                                                                                                                                                                                                                                                                                                                                ### Synchronous and asynchronous members

                                                                                                                                                                                                                                                                                                                                                                                The core awaits only HttpServer.init, HttpServer.createMiddlewareFactory, HttpServer.beforeClose and HttpServer.close, as well as HttpServer.reply and HttpServer.render when the router calls them. Every other member is called synchronously and a returned promise is ignored. In particular, the registration methods (use(), the verb methods, the parser and CORS methods, ...) must take effect before they return, or the registration order the core relies on is lost.

                                                                                                                                                                                                                                                                                                                                                                                See Also

                                                                                                                                                                                                                                                                                                                                                                                • [HTTP adapter](https://docs.nestjs.com/faq/http-adapter)

                                                                                                                                                                                                                                                                                                                                                                              method all

                                                                                                                                                                                                                                                                                                                                                                              all: {
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers a route for every HTTP method (@All()). See HttpServer.get for the handler contract.

                                                                                                                                                                                                                                                                                                                                                                              method applyVersionFilter

                                                                                                                                                                                                                                                                                                                                                                              applyVersionFilter: (
                                                                                                                                                                                                                                                                                                                                                                              handler: Function,
                                                                                                                                                                                                                                                                                                                                                                              version: VersionValue,
                                                                                                                                                                                                                                                                                                                                                                              versioningOptions: VersioningOptions
                                                                                                                                                                                                                                                                                                                                                                              ) => (req: TRequest, res: TResponse, next: () => void) => Function;
                                                                                                                                                                                                                                                                                                                                                                              • Wraps a route handler so that it only runs for requests carrying a matching version. Called once per versioned route for the HEADER, MEDIA_TYPE and CUSTOM versioning types; URI versioning is expressed in the path and never reaches this method.

                                                                                                                                                                                                                                                                                                                                                                                Two strategies are valid: - return a (req, res, next) function that extracts the requested version, invokes handler when it matches and calls next() otherwise (Express), or - return handler itself, annotated so the framework's own routing can apply the constraint (Fastify).

                                                                                                                                                                                                                                                                                                                                                                                Parameter handler

                                                                                                                                                                                                                                                                                                                                                                                The route handler to guard.

                                                                                                                                                                                                                                                                                                                                                                                Parameter version

                                                                                                                                                                                                                                                                                                                                                                                Version(s) the route serves: a string, an array of strings, or VERSION_NEUTRAL. An array may include VERSION_NEUTRAL, meaning the route also serves requests that carry no version.

                                                                                                                                                                                                                                                                                                                                                                                Parameter versioningOptions

                                                                                                                                                                                                                                                                                                                                                                                The options passed to app.enableVersioning().

                                                                                                                                                                                                                                                                                                                                                                              method beforeClose

                                                                                                                                                                                                                                                                                                                                                                              beforeClose: () => any;
                                                                                                                                                                                                                                                                                                                                                                              • Called by app.close() **before** any shutdown hook (OnModuleDestroy, BeforeApplicationShutdown, OnApplicationShutdown) runs, so the adapter can flip into a "shutting down" state, e.g. start answering 503 when return503OnClosing is enabled. May return a promise; the core awaits it.

                                                                                                                                                                                                                                                                                                                                                                              method clearCookie

                                                                                                                                                                                                                                                                                                                                                                              clearCookie: (
                                                                                                                                                                                                                                                                                                                                                                              response: TResponse,
                                                                                                                                                                                                                                                                                                                                                                              name: string,
                                                                                                                                                                                                                                                                                                                                                                              options?: CookieSerializeOptions
                                                                                                                                                                                                                                                                                                                                                                              ) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Appends a Set-Cookie header that expires the cookie. path and domain must match the ones the cookie was set with. Not called by the core; AbstractHttpAdapter implements it.

                                                                                                                                                                                                                                                                                                                                                                              method close

                                                                                                                                                                                                                                                                                                                                                                              close: () => any;
                                                                                                                                                                                                                                                                                                                                                                              • Stops the server and releases its resources. Called by app.close() after the OnModuleDestroy and BeforeApplicationShutdown hooks and after the WebSocket gateways and microservice clients have been closed, but before connected microservices are closed and the OnApplicationShutdown hooks run. May return a promise; the core awaits it.

                                                                                                                                                                                                                                                                                                                                                                              method copy

                                                                                                                                                                                                                                                                                                                                                                              copy: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers a WebDAV COPY route. Optional: when not implemented the core falls back to HttpServer.use, which matches every method.

                                                                                                                                                                                                                                                                                                                                                                              method createMiddlewareFactory

                                                                                                                                                                                                                                                                                                                                                                              createMiddlewareFactory: (
                                                                                                                                                                                                                                                                                                                                                                              method: RequestMethod
                                                                                                                                                                                                                                                                                                                                                                              ) =>
                                                                                                                                                                                                                                                                                                                                                                              | ((path: string, callback: Function) => any)
                                                                                                                                                                                                                                                                                                                                                                              | Promise<(path: string, callback: Function) => any>;
                                                                                                                                                                                                                                                                                                                                                                              • Returns a function the middleware module uses to mount Nest middleware (MiddlewareConsumer) for one HTTP method.

                                                                                                                                                                                                                                                                                                                                                                                The returned function is called as (path, callback) once per route path the middleware applies to, where callback is a RequestHandler that calls next() to continue the chain. The core passes / for empty or root paths. When method is not RequestMethod.ALL, the core already wraps callback to skip requests whose HttpServer.getRequestMethod does not match (treating HEAD as GET), so a framework that cannot register method-specific middleware may mount it for every method. Without HttpServer.getRequestMethod, that check never matches and such middleware silently never runs.

                                                                                                                                                                                                                                                                                                                                                                                May return a promise (e.g. when a middleware plugin has to be loaded first); the core awaits it.

                                                                                                                                                                                                                                                                                                                                                                              method delete

                                                                                                                                                                                                                                                                                                                                                                              delete: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers a DELETE route. See HttpServer.get for the handler contract.

                                                                                                                                                                                                                                                                                                                                                                              method enableCors

                                                                                                                                                                                                                                                                                                                                                                              enableCors: (options: any) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Enables CORS. Called by app.enableCors(options) and during app.init() when the cors application option is set; options is then either the CorsOptions/delegate the user provided, or undefined for cors: true.

                                                                                                                                                                                                                                                                                                                                                                              method end

                                                                                                                                                                                                                                                                                                                                                                              end: (response: any, message?: string) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Terminates the response, optionally writing message first. The exception layer uses it when HttpServer.isHeadersSent reports that a reply already started, so the adapter must not attempt to set headers or a status here.

                                                                                                                                                                                                                                                                                                                                                                              method get

                                                                                                                                                                                                                                                                                                                                                                              get: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                              method getHttpServer

                                                                                                                                                                                                                                                                                                                                                                              getHttpServer: () => any;
                                                                                                                                                                                                                                                                                                                                                                              • Returns the native HTTP server created by HttpServer.initHttpServer. It must behave like a Node.js net.Server (listen, close, address, on('error')), since app.listen() and the WebSocket adapters use it directly.

                                                                                                                                                                                                                                                                                                                                                                              method getInstance

                                                                                                                                                                                                                                                                                                                                                                              getInstance: () => ServerInstance;
                                                                                                                                                                                                                                                                                                                                                                              • Returns the framework application instance (e.g. the Express Application) that the adapter delegates to. Exposed to users through app.getHttpAdapter().getInstance().

                                                                                                                                                                                                                                                                                                                                                                              method getRequestHostname

                                                                                                                                                                                                                                                                                                                                                                              getRequestHostname: (request: TRequest) => string;
                                                                                                                                                                                                                                                                                                                                                                              • Returns the request host name (without port), used to match @Controller({ host }). The core calls it without checking for its presence, so it is required whenever host filtering is used.

                                                                                                                                                                                                                                                                                                                                                                              method getRequestMethod

                                                                                                                                                                                                                                                                                                                                                                              getRequestMethod: (request: TRequest) => string;
                                                                                                                                                                                                                                                                                                                                                                              • Returns the request method as the upper-case verb ('GET', 'HEAD', ...), i.e. a key of the RequestMethod enum. Effectively required: the not-found handler and MiddlewareConsumer.exclude() call it without checking for its presence, and without it middleware bound to a specific method silently never runs.

                                                                                                                                                                                                                                                                                                                                                                              method getRequestUrl

                                                                                                                                                                                                                                                                                                                                                                              getRequestUrl: (request: TRequest) => string;
                                                                                                                                                                                                                                                                                                                                                                              • Returns the original request URL, including the query string and independent of any router mount point (Express req.originalUrl, not req.url). The core strips the query string itself when it needs the pathname, e.g. to evaluate MiddlewareConsumer.exclude(). Effectively required: the not-found handler and exclude() call it without checking for its presence.

                                                                                                                                                                                                                                                                                                                                                                              method getType

                                                                                                                                                                                                                                                                                                                                                                              getType: () => string;
                                                                                                                                                                                                                                                                                                                                                                              • Returns a stable identifier for the platform ('express', 'fastify'). The core does not read it, but ecosystem packages (e.g. @nestjs/swagger, @nestjs/serve-static) branch on it to pick platform-specific code paths, so custom adapters wrapping one of the built-in frameworks should return the matching value.

                                                                                                                                                                                                                                                                                                                                                                              method head

                                                                                                                                                                                                                                                                                                                                                                              head: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                              method init

                                                                                                                                                                                                                                                                                                                                                                              init: () => Promise<void>;
                                                                                                                                                                                                                                                                                                                                                                              • Asynchronous setup hook for work that cannot happen in the constructor, such as loading a plugin. It can run twice: NestFactory.create() awaits it before the module graph is scanned (and before HttpServer.initHttpServer), and app.init() awaits it again after the cors option has been applied and before the parsers, middleware and routes are registered. TestingModule.createNestApplication() only triggers the second call. Implementations must therefore be idempotent, e.g. by guarding the work with a flag as FastifyAdapter does.

                                                                                                                                                                                                                                                                                                                                                                              method initHttpServer

                                                                                                                                                                                                                                                                                                                                                                              initHttpServer: (options: NestApplicationOptions) => void;
                                                                                                                                                                                                                                                                                                                                                                              • Creates the native HTTP(S) server so that HttpServer.getHttpServer can return it. Called once, synchronously, when the application is constructed (by NestFactory.create() or TestingModule.createNestApplication()), before app.init().

                                                                                                                                                                                                                                                                                                                                                                                The adapter is responsible for honoring the relevant application options: httpsOptions (create an HTTPS server), forceCloseConnections (track sockets so HttpServer.close can destroy them) and return503OnClosing (reject requests once HttpServer.beforeClose ran).

                                                                                                                                                                                                                                                                                                                                                                              method isHeadersSent

                                                                                                                                                                                                                                                                                                                                                                              isHeadersSent: (response: any) => boolean;
                                                                                                                                                                                                                                                                                                                                                                              • Reports whether the response headers have already been flushed. The exception layer checks it to decide between HttpServer.reply and HttpServer.end. It must return a boolean synchronously: the result is not awaited, and a promise is truthy, so every error response would be cut short through HttpServer.end.

                                                                                                                                                                                                                                                                                                                                                                              method isRouteOrderSensitive

                                                                                                                                                                                                                                                                                                                                                                              isRouteOrderSensitive: () => boolean;
                                                                                                                                                                                                                                                                                                                                                                              • Tells the core whether the underlying router picks the **first** registered route that matches (true, e.g. Express) or the most specific one regardless of order (false, e.g. Fastify). Defaults to true when not implemented.

                                                                                                                                                                                                                                                                                                                                                                                When true and the specificity route resolution strategy is enabled, the core sorts routes before registering them. A false value is currently also taken to mean that the router rejects duplicate (method, path) registrations itself.

                                                                                                                                                                                                                                                                                                                                                                              method listen

                                                                                                                                                                                                                                                                                                                                                                              listen: {
                                                                                                                                                                                                                                                                                                                                                                              (port: number | string, callback?: () => void): any;
                                                                                                                                                                                                                                                                                                                                                                              (port: string | number, hostname: string, callback?: () => void): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Starts accepting connections; called by app.listen() once the application has been initialized.

                                                                                                                                                                                                                                                                                                                                                                                The core always appends its own callback as the **last** argument, and strips any callback the user passed to app.listen(). The adapter must invoke that callback once the server is listening, or with an Error as first argument when it failed to bind; the core rejects the listen() promise in that case. The core additionally subscribes to the 'error' event of HttpServer.getHttpServer while binding.

                                                                                                                                                                                                                                                                                                                                                                                On success, the app.listen() promise only resolves if getHttpServer().address() returns a non-null value when the callback runs; otherwise it stays pending.

                                                                                                                                                                                                                                                                                                                                                                                Parameter port

                                                                                                                                                                                                                                                                                                                                                                                Port number, or a string such as a pipe/socket path.

                                                                                                                                                                                                                                                                                                                                                                                Parameter hostname

                                                                                                                                                                                                                                                                                                                                                                                Optional host to bind to.

                                                                                                                                                                                                                                                                                                                                                                                Parameter callback

                                                                                                                                                                                                                                                                                                                                                                                Invoked as (err?) once listening or on failure.

                                                                                                                                                                                                                                                                                                                                                                              method lock

                                                                                                                                                                                                                                                                                                                                                                              lock: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers a WebDAV LOCK route. Optional: when not implemented the core falls back to HttpServer.use, which matches every method.

                                                                                                                                                                                                                                                                                                                                                                              method mkcol

                                                                                                                                                                                                                                                                                                                                                                              mkcol: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers a WebDAV MKCOL route. Optional: when not implemented the core falls back to HttpServer.use, which matches every method.

                                                                                                                                                                                                                                                                                                                                                                              method move

                                                                                                                                                                                                                                                                                                                                                                              move: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers a WebDAV MOVE route. Optional: when not implemented the core falls back to HttpServer.use, which matches every method.

                                                                                                                                                                                                                                                                                                                                                                              method normalizePath

                                                                                                                                                                                                                                                                                                                                                                              normalizePath: (path: string) => string;
                                                                                                                                                                                                                                                                                                                                                                              • Converts a Nest route path into the syntax the underlying router expects, and validates it. Called once per route path (already prefixed and versioned) before it is handed to a verb method; should throw when the path is invalid so misconfigured routes fail at startup. When not implemented the path is used verbatim.

                                                                                                                                                                                                                                                                                                                                                                              method options

                                                                                                                                                                                                                                                                                                                                                                              options: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers an OPTIONS route. See HttpServer.get for the handler contract.

                                                                                                                                                                                                                                                                                                                                                                              method patch

                                                                                                                                                                                                                                                                                                                                                                              patch: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                              method post

                                                                                                                                                                                                                                                                                                                                                                              post: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                              method propfind

                                                                                                                                                                                                                                                                                                                                                                              propfind: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers a WebDAV PROPFIND route. Optional: when not implemented the core falls back to HttpServer.use, which matches every method.

                                                                                                                                                                                                                                                                                                                                                                              method proppatch

                                                                                                                                                                                                                                                                                                                                                                              proppatch: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers a WebDAV PROPPATCH route. Optional: when not implemented the core falls back to HttpServer.use, which matches every method.

                                                                                                                                                                                                                                                                                                                                                                              method put

                                                                                                                                                                                                                                                                                                                                                                              put: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                              method query

                                                                                                                                                                                                                                                                                                                                                                              query: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers a QUERY route. Optional: when not implemented the core falls back to HttpServer.use, which matches every method.

                                                                                                                                                                                                                                                                                                                                                                              method redirect

                                                                                                                                                                                                                                                                                                                                                                              redirect: (response: any, statusCode: number, url: string) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Issues a redirect; called for handlers decorated with @Redirect(). statusCode is always provided (defaults to 302), and url may come from the handler result { url, statusCode } overriding the decorator.

                                                                                                                                                                                                                                                                                                                                                                              method registerParserMiddleware

                                                                                                                                                                                                                                                                                                                                                                              registerParserMiddleware: (...args: any[]) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Registers the default body parsers. Called once during app.init() unless the application was created with bodyParser: false, as registerParserMiddleware(globalPrefix, rawBody).

                                                                                                                                                                                                                                                                                                                                                                                Implementations should register JSON and URL-encoded parsers, and, when rawBody is true, expose the unparsed payload as req.rawBody (see RawBodyRequest). Because users may register the same parsers beforehand, this should be idempotent.

                                                                                                                                                                                                                                                                                                                                                                              method registerSecurityHook

                                                                                                                                                                                                                                                                                                                                                                              registerSecurityHook: (hook: SecurityRequestHook<TRequest>) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Installs the request hook of the built-in HTTP security features (app.enableCsrfProtection(), app.useSecurityHeaders()). The core composes the features into this one hook and owns their logic; the adapter only decides where the hook runs.

                                                                                                                                                                                                                                                                                                                                                                                Called at most once, before app.init(), the first time one of the features is enabled. The hook must run for every request (matched routes, unmatched requests, routes outside the global prefix) before Nest middleware, guards and route handlers, and before body parsing when the platform allows it; registering a framework-level middleware or request hook at call time satisfies that on Express and Fastify. It receives the request and the Node.js ServerResponse (reply.raw on Fastify), on which it may set headers that route handlers, @Header() and exception filters can still override.

                                                                                                                                                                                                                                                                                                                                                                                When the hook returns an error, the adapter must not continue to the route: it hands the error to the exception layer installed through HttpServer.setErrorHandler (next(error) on Express, done(error) in a Fastify hook), so exception filters shape the response. Optional: when absent, enabling a feature throws.

                                                                                                                                                                                                                                                                                                                                                                              method render

                                                                                                                                                                                                                                                                                                                                                                              render: (response: any, view: string, options: any) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Renders a view template; called for handlers decorated with @Render() with the (awaited) handler result as options.

                                                                                                                                                                                                                                                                                                                                                                              method reply

                                                                                                                                                                                                                                                                                                                                                                              reply: (response: any, body: any, statusCode?: number) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Sends the final response body. The router calls it for every handler that does not take over the response with @Res() (without passthrough: true) or @Next(), except for @Render(), @Redirect() and @Sse() handlers, which go through HttpServer.render, HttpServer.redirect and the raw response respectively. The built-in exception filter uses it as well, so it has to cover the following cases:

                                                                                                                                                                                                                                                                                                                                                                                - statusCode provided: apply it before sending. - body is null/undefined: end the response with an empty body. - body is a StreamableFile: set Content-Type, Content-Disposition and Content-Length from body.getHeaders() unless already present, pipe body.getStream() into the response, route stream errors to body.errorHandler(err, response) and log write errors through body.errorLogger(err). - body is an object or array: serialize as JSON. - anything else: send String(body).

                                                                                                                                                                                                                                                                                                                                                                                The router awaits a returned promise, but the exception filter does not, so an asynchronous implementation must handle its own errors.

                                                                                                                                                                                                                                                                                                                                                                                Parameter response

                                                                                                                                                                                                                                                                                                                                                                                Framework response object.

                                                                                                                                                                                                                                                                                                                                                                                Parameter body

                                                                                                                                                                                                                                                                                                                                                                                Value returned by the route handler (after interceptors).

                                                                                                                                                                                                                                                                                                                                                                                Parameter statusCode

                                                                                                                                                                                                                                                                                                                                                                                Status to apply, when the router determined one.

                                                                                                                                                                                                                                                                                                                                                                              method search

                                                                                                                                                                                                                                                                                                                                                                              search: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers a SEARCH route. Optional: when not implemented the core falls back to HttpServer.use, which matches every method.

                                                                                                                                                                                                                                                                                                                                                                              method setBaseViewsDir

                                                                                                                                                                                                                                                                                                                                                                              setBaseViewsDir: (path: string | string[]) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Sets the directory (or directories) where view templates live; pass-through for app.setBaseViewsDir(). When not implemented, app.setBaseViewsDir() silently does nothing.

                                                                                                                                                                                                                                                                                                                                                                              method setCookie

                                                                                                                                                                                                                                                                                                                                                                              setCookie: (
                                                                                                                                                                                                                                                                                                                                                                              response: TResponse,
                                                                                                                                                                                                                                                                                                                                                                              name: string,
                                                                                                                                                                                                                                                                                                                                                                              value: string,
                                                                                                                                                                                                                                                                                                                                                                              options?: CookieSerializeOptions
                                                                                                                                                                                                                                                                                                                                                                              ) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Appends a Set-Cookie header to the response, so several cookies set during the same request accumulate. Not called by the core; AbstractHttpAdapter implements it on top of its appendHeader(). Throws a TypeError when the name, the value or an attribute is not valid per RFC 6265. Note that options.maxAge is in seconds.

                                                                                                                                                                                                                                                                                                                                                                              method setErrorHandler

                                                                                                                                                                                                                                                                                                                                                                              setErrorHandler: (handler: Function, prefix?: string) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Installs the global exception layer: an ErrorHandler that forwards errors to the registered exception filters. The core calls it once, after every route has been registered, and skips it when not implemented.

                                                                                                                                                                                                                                                                                                                                                                                Errors thrown by the route handlers and middleware that Nest registers normally don't reach it, because the core already runs them through the exception filters. The adapter must route every other error to it: failures of middleware registered directly on the framework (e.g. with app.use()), body-parser errors, and values passed to next(err). The handler first passes the error to the adapter's mapException() so framework-native errors can be translated to HttpExceptions; that method is defined by AbstractHttpAdapter, so an adapter implementing this interface directly must provide it too.

                                                                                                                                                                                                                                                                                                                                                                                Parameter handler

                                                                                                                                                                                                                                                                                                                                                                                The (err, req, res, next) callback.

                                                                                                                                                                                                                                                                                                                                                                                Parameter prefix

                                                                                                                                                                                                                                                                                                                                                                                The global prefix (app.setGlobalPrefix()), when set. Routes excluded from the prefix still live at the root, so an adapter that scopes error handlers by path must cover both.

                                                                                                                                                                                                                                                                                                                                                                              method setHeader

                                                                                                                                                                                                                                                                                                                                                                              setHeader: (response: any, name: string, value: string) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Sets (replaces) a response header; called once per @Header() decorator, right after HttpServer.status. Not awaited.

                                                                                                                                                                                                                                                                                                                                                                              method setNotFoundHandler

                                                                                                                                                                                                                                                                                                                                                                              setNotFoundHandler: (handler: Function, prefix?: string) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Installs the catch-all handler for unmatched requests. The core calls it once, after every route has been registered, and skips it when not implemented.

                                                                                                                                                                                                                                                                                                                                                                                The handler is a RequestHandler that throws NotFoundException through the exception filters, so the adapter only has to make sure it runs after all routes and middleware, and only for requests no route matched. It builds its message with HttpServer.getRequestMethod and HttpServer.getRequestUrl, so both must be implemented.

                                                                                                                                                                                                                                                                                                                                                                                Parameter handler

                                                                                                                                                                                                                                                                                                                                                                                The (req, res, next) callback.

                                                                                                                                                                                                                                                                                                                                                                                Parameter prefix

                                                                                                                                                                                                                                                                                                                                                                                The global prefix (app.setGlobalPrefix()), when set.

                                                                                                                                                                                                                                                                                                                                                                              method setViewEngine

                                                                                                                                                                                                                                                                                                                                                                              setViewEngine: (engineOrOptions: any) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Configures the template engine used by HttpServer.render; pass-through for app.setViewEngine(). The argument is platform-specific (an engine name for Express, an options object for Fastify). When not implemented, app.setViewEngine() silently does nothing.

                                                                                                                                                                                                                                                                                                                                                                              method status

                                                                                                                                                                                                                                                                                                                                                                              status: (response: any, statusCode: number) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Sets the status code without sending the response. Called for every route once the guards have passed, before the interceptors and the handler run, with the status derived from @HttpCode() or the method default (201 for POST, 200 otherwise). Not awaited.

                                                                                                                                                                                                                                                                                                                                                                              method unlock

                                                                                                                                                                                                                                                                                                                                                                              unlock: {
                                                                                                                                                                                                                                                                                                                                                                              (handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              (path: string, handler: RequestHandler<TRequest, TResponse>): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers a WebDAV UNLOCK route. Optional: when not implemented the core falls back to HttpServer.use, which matches every method.

                                                                                                                                                                                                                                                                                                                                                                              method use

                                                                                                                                                                                                                                                                                                                                                                              use: {
                                                                                                                                                                                                                                                                                                                                                                              (
                                                                                                                                                                                                                                                                                                                                                                              handler:
                                                                                                                                                                                                                                                                                                                                                                              | RequestHandler<TRequest, TResponse>
                                                                                                                                                                                                                                                                                                                                                                              | ErrorHandler<TRequest, TResponse>
                                                                                                                                                                                                                                                                                                                                                                              ): any;
                                                                                                                                                                                                                                                                                                                                                                              (
                                                                                                                                                                                                                                                                                                                                                                              path: string,
                                                                                                                                                                                                                                                                                                                                                                              handler:
                                                                                                                                                                                                                                                                                                                                                                              | RequestHandler<TRequest, TResponse>
                                                                                                                                                                                                                                                                                                                                                                              | ErrorHandler<TRequest, TResponse>
                                                                                                                                                                                                                                                                                                                                                                              ): any;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Registers a global middleware, optionally mounted under path.

                                                                                                                                                                                                                                                                                                                                                                                Called by app.use(), by the core when registering the parser and exception layers, and as the fallback route registrar when an optional HTTP-verb method (e.g. propfind) is not implemented, in which case the route matches every method.

                                                                                                                                                                                                                                                                                                                                                                                The handler may be a RequestHandler or an ErrorHandler; Express-style adapters distinguish them by arity.

                                                                                                                                                                                                                                                                                                                                                                              method useBodyParser

                                                                                                                                                                                                                                                                                                                                                                              useBodyParser: (...args: any[]) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Registers an additional body parser, called by app.useBodyParser().

                                                                                                                                                                                                                                                                                                                                                                                The core inserts the application's rawBody option as the **second** argument, so the effective call is useBodyParser(type, rawBody, ...userArgs). When rawBody is true the parser must expose the unparsed payload as req.rawBody (see RawBodyRequest).

                                                                                                                                                                                                                                                                                                                                                                                When not implemented, app.useBodyParser() logs a warning and does nothing.

                                                                                                                                                                                                                                                                                                                                                                              method useStaticAssets

                                                                                                                                                                                                                                                                                                                                                                              useStaticAssets: (...args: any[]) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Serves static files; pass-through for app.useStaticAssets(). The arguments are platform-specific. When not implemented, app.useStaticAssets() silently does nothing.

                                                                                                                                                                                                                                                                                                                                                                              interface INestApplication

                                                                                                                                                                                                                                                                                                                                                                              interface INestApplication<TServer = any> extends INestApplicationContext {}
                                                                                                                                                                                                                                                                                                                                                                              • Interface defining the core NestApplication object.

                                                                                                                                                                                                                                                                                                                                                                              method close

                                                                                                                                                                                                                                                                                                                                                                              close: () => Promise<void>;
                                                                                                                                                                                                                                                                                                                                                                              • Terminates the application (including NestApplication, Gateways, and each connected microservice)

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {Promise}

                                                                                                                                                                                                                                                                                                                                                                              method connectMicroservice

                                                                                                                                                                                                                                                                                                                                                                              connectMicroservice: <T extends object = any>(
                                                                                                                                                                                                                                                                                                                                                                              options: T,
                                                                                                                                                                                                                                                                                                                                                                              hybridOptions?: NestHybridApplicationOptions
                                                                                                                                                                                                                                                                                                                                                                              ) => INestMicroservice;
                                                                                                                                                                                                                                                                                                                                                                              • Connects microservice to the NestApplication instance. Transforms application to a hybrid instance.

                                                                                                                                                                                                                                                                                                                                                                                {object} T

                                                                                                                                                                                                                                                                                                                                                                                Parameter options

                                                                                                                                                                                                                                                                                                                                                                                Microservice options object

                                                                                                                                                                                                                                                                                                                                                                                Parameter hybridOptions

                                                                                                                                                                                                                                                                                                                                                                                Hybrid options object

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {INestMicroservice}

                                                                                                                                                                                                                                                                                                                                                                              method enableCors

                                                                                                                                                                                                                                                                                                                                                                              enableCors: (options?: any) => void;
                                                                                                                                                                                                                                                                                                                                                                              • Enables CORS (Cross-Origin Resource Sharing)

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {void}

                                                                                                                                                                                                                                                                                                                                                                              method enableCsrfProtection

                                                                                                                                                                                                                                                                                                                                                                              enableCsrfProtection: (options?: CsrfProtectionOptions) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Enables protection against cross-site request forgery (CSRF) for every route, based on Fetch Metadata (Sec-Fetch-Site) with an Origin/Host fallback (the algorithm of Go's net/http.CrossOriginProtection).

                                                                                                                                                                                                                                                                                                                                                                                GET, HEAD and OPTIONS requests are always allowed. Other requests are rejected with a ForbiddenException, which goes through the exception filters, when the browser reports them as cross-origin. Requests carrying neither Sec-Fetch-Site nor Origin (non-browser clients) are allowed.

                                                                                                                                                                                                                                                                                                                                                                                Must be called once, before app.init() / app.listen(). The check runs before Nest middleware, body parsing, guards and handlers. It shares one request hook with app.useSecurityHeaders(), registered where the first of the two is called: middleware registered with app.use() before that runs before the check.

                                                                                                                                                                                                                                                                                                                                                                                Parameter options

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {this}

                                                                                                                                                                                                                                                                                                                                                                              method enableVersioning

                                                                                                                                                                                                                                                                                                                                                                              enableVersioning: (options?: VersioningOptions) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Enables Versioning for the application. By default, URI-based versioning is used.

                                                                                                                                                                                                                                                                                                                                                                                Parameter options

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {this}

                                                                                                                                                                                                                                                                                                                                                                              method getHttpAdapter

                                                                                                                                                                                                                                                                                                                                                                              getHttpAdapter: () => HttpServer;
                                                                                                                                                                                                                                                                                                                                                                              • Returns the underlying HTTP adapter.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {HttpServer}

                                                                                                                                                                                                                                                                                                                                                                              method getHttpServer

                                                                                                                                                                                                                                                                                                                                                                              getHttpServer: () => TServer;
                                                                                                                                                                                                                                                                                                                                                                              • Returns the underlying native HTTP server.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {TServer}

                                                                                                                                                                                                                                                                                                                                                                              method getMicroservices

                                                                                                                                                                                                                                                                                                                                                                              getMicroservices: () => INestMicroservice[];
                                                                                                                                                                                                                                                                                                                                                                              • Returns array of the microservices connected to the NestApplication.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {INestMicroservice[]}

                                                                                                                                                                                                                                                                                                                                                                              method getUrl

                                                                                                                                                                                                                                                                                                                                                                              getUrl: () => Promise<string>;
                                                                                                                                                                                                                                                                                                                                                                              • Returns the url the application is listening at, based on OS and IP version. Returns as an IP value either in IPv6 or IPv4

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {Promise} The IP where the server is listening

                                                                                                                                                                                                                                                                                                                                                                              method listen

                                                                                                                                                                                                                                                                                                                                                                              listen: {
                                                                                                                                                                                                                                                                                                                                                                              (port: number | string, callback?: () => void): Promise<any>;
                                                                                                                                                                                                                                                                                                                                                                              (
                                                                                                                                                                                                                                                                                                                                                                              port: string | number,
                                                                                                                                                                                                                                                                                                                                                                              hostname: string,
                                                                                                                                                                                                                                                                                                                                                                              callback?: () => void
                                                                                                                                                                                                                                                                                                                                                                              ): Promise<any>;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Starts the application.

                                                                                                                                                                                                                                                                                                                                                                                Parameter port

                                                                                                                                                                                                                                                                                                                                                                                Parameter hostname

                                                                                                                                                                                                                                                                                                                                                                                Parameter callback

                                                                                                                                                                                                                                                                                                                                                                                Optional callback

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {Promise} A Promise that, when resolved, is a reference to the underlying HttpServer.

                                                                                                                                                                                                                                                                                                                                                                              method setGlobalPrefix

                                                                                                                                                                                                                                                                                                                                                                              setGlobalPrefix: (prefix: string, options?: GlobalPrefixOptions) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Registers a prefix for every HTTP route path.

                                                                                                                                                                                                                                                                                                                                                                                Parameter prefix

                                                                                                                                                                                                                                                                                                                                                                                The prefix for every HTTP route path (for example /v1/api)

                                                                                                                                                                                                                                                                                                                                                                                Parameter options

                                                                                                                                                                                                                                                                                                                                                                                Global prefix options object

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {this}

                                                                                                                                                                                                                                                                                                                                                                              method startAllMicroservices

                                                                                                                                                                                                                                                                                                                                                                              startAllMicroservices: () => Promise<this>;
                                                                                                                                                                                                                                                                                                                                                                              • Starts all connected microservices asynchronously.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {Promise}

                                                                                                                                                                                                                                                                                                                                                                              method use

                                                                                                                                                                                                                                                                                                                                                                              use: (...args: any[]) => this;
                                                                                                                                                                                                                                                                                                                                                                              • A wrapper function around HTTP adapter method: adapter.use(). Example app.use(cors())

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {this}

                                                                                                                                                                                                                                                                                                                                                                              method useGlobalFilters

                                                                                                                                                                                                                                                                                                                                                                              useGlobalFilters: (...filters: ExceptionFilter[]) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Registers exception filters as global filters (will be used within every HTTP route handler)

                                                                                                                                                                                                                                                                                                                                                                                Parameter filters

                                                                                                                                                                                                                                                                                                                                                                              method useGlobalGuards

                                                                                                                                                                                                                                                                                                                                                                              useGlobalGuards: (...guards: CanActivate[]) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Registers guards as global guards (will be used within every HTTP route handler)

                                                                                                                                                                                                                                                                                                                                                                                Parameter guards

                                                                                                                                                                                                                                                                                                                                                                              method useGlobalInterceptors

                                                                                                                                                                                                                                                                                                                                                                              useGlobalInterceptors: (...interceptors: NestInterceptor[]) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Registers interceptors as global interceptors (will be used within every HTTP route handler)

                                                                                                                                                                                                                                                                                                                                                                                Parameter interceptors

                                                                                                                                                                                                                                                                                                                                                                              method useGlobalPipes

                                                                                                                                                                                                                                                                                                                                                                              useGlobalPipes: (...pipes: PipeTransform<any>[]) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Registers pipes as global pipes (will be used within every HTTP route handler)

                                                                                                                                                                                                                                                                                                                                                                                Parameter pipes

                                                                                                                                                                                                                                                                                                                                                                              method useSecurityHeaders

                                                                                                                                                                                                                                                                                                                                                                              useSecurityHeaders: (options?: SecurityHeadersOptions) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Sets security-related response headers on every response (routes, 404s and errors, including rejections of enableCsrfProtection()): the same headers and defaults as helmet 8, including a default Content-Security-Policy, and removes X-Powered-By.

                                                                                                                                                                                                                                                                                                                                                                                Pass false for a header to leave it out, true for its default, or an object to configure it. Options are validated when this method is called. Route handlers and @Header() can still override a header per route.

                                                                                                                                                                                                                                                                                                                                                                                Must be called once, before app.init() / app.listen(). It shares one request hook with app.enableCsrfProtection(), registered where the first of the two is called: middleware registered with app.use() before that runs first, so responses it ends itself do not carry the headers.

                                                                                                                                                                                                                                                                                                                                                                                Parameter options

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {this}

                                                                                                                                                                                                                                                                                                                                                                              method useWebSocketAdapter

                                                                                                                                                                                                                                                                                                                                                                              useWebSocketAdapter: (adapter: WebSocketAdapter) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Register Ws Adapter which will be used inside Gateways. Use when you want to override default socket.io library.

                                                                                                                                                                                                                                                                                                                                                                                Parameter adapter

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {this}

                                                                                                                                                                                                                                                                                                                                                                              interface INestApplicationContext

                                                                                                                                                                                                                                                                                                                                                                              interface INestApplicationContext {}
                                                                                                                                                                                                                                                                                                                                                                              • Interface defining NestApplicationContext.

                                                                                                                                                                                                                                                                                                                                                                              method close

                                                                                                                                                                                                                                                                                                                                                                              close: () => Promise<void>;
                                                                                                                                                                                                                                                                                                                                                                              • Terminates the application

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {Promise}

                                                                                                                                                                                                                                                                                                                                                                              method enableShutdownHooks

                                                                                                                                                                                                                                                                                                                                                                              enableShutdownHooks: (
                                                                                                                                                                                                                                                                                                                                                                              signals?: ShutdownSignal[] | string[],
                                                                                                                                                                                                                                                                                                                                                                              options?: ShutdownHooksOptions
                                                                                                                                                                                                                                                                                                                                                                              ) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Enables the usage of shutdown hooks. Will call the onApplicationShutdown function of a provider if the process receives a shutdown signal.

                                                                                                                                                                                                                                                                                                                                                                                Parameter signals

                                                                                                                                                                                                                                                                                                                                                                                The system signals to listen to

                                                                                                                                                                                                                                                                                                                                                                                Parameter options

                                                                                                                                                                                                                                                                                                                                                                                Options for configuring shutdown hooks behavior

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {this} The Nest application context instance

                                                                                                                                                                                                                                                                                                                                                                              method flushLogs

                                                                                                                                                                                                                                                                                                                                                                              flushLogs: () => void;
                                                                                                                                                                                                                                                                                                                                                                              • Prints buffered logs and detaches buffer.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {void}

                                                                                                                                                                                                                                                                                                                                                                              method get

                                                                                                                                                                                                                                                                                                                                                                              get: {
                                                                                                                                                                                                                                                                                                                                                                              <TInput = any, TResult = TInput>(
                                                                                                                                                                                                                                                                                                                                                                              typeOrToken: Type<TInput> | Function | string | symbol
                                                                                                                                                                                                                                                                                                                                                                              ): TResult;
                                                                                                                                                                                                                                                                                                                                                                              <TInput = any, TResult = TInput>(
                                                                                                                                                                                                                                                                                                                                                                              typeOrToken: string | symbol | Function | Type<TInput>,
                                                                                                                                                                                                                                                                                                                                                                              options: { strict?: boolean; each?: false }
                                                                                                                                                                                                                                                                                                                                                                              ): TResult;
                                                                                                                                                                                                                                                                                                                                                                              <TInput = any, TResult = TInput>(
                                                                                                                                                                                                                                                                                                                                                                              typeOrToken: string | symbol | Function | Type<TInput>,
                                                                                                                                                                                                                                                                                                                                                                              options: { strict?: boolean; each: true }
                                                                                                                                                                                                                                                                                                                                                                              ): TResult[];
                                                                                                                                                                                                                                                                                                                                                                              <TInput = any, TResult = TInput>(
                                                                                                                                                                                                                                                                                                                                                                              typeOrToken: string | symbol | Function | Type<TInput>,
                                                                                                                                                                                                                                                                                                                                                                              options?: GetOrResolveOptions
                                                                                                                                                                                                                                                                                                                                                                              ): TResult | TResult[];
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Retrieves an instance of either injectable or controller, otherwise, throws exception.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {TResult}

                                                                                                                                                                                                                                                                                                                                                                              • Retrieves a list of instances of either injectables or controllers, otherwise, throws exception.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {Array}

                                                                                                                                                                                                                                                                                                                                                                              • Retrieves an instance (or a list of instances) of either injectable or controller, otherwise, throws exception.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {TResult | Array}

                                                                                                                                                                                                                                                                                                                                                                              method init

                                                                                                                                                                                                                                                                                                                                                                              init: () => Promise<this>;
                                                                                                                                                                                                                                                                                                                                                                              • Initializes the Nest application. Calls the Nest lifecycle events. It isn't mandatory to call this method directly.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {Promise} The NestApplicationContext instance as Promise

                                                                                                                                                                                                                                                                                                                                                                              method registerRequestByContextId

                                                                                                                                                                                                                                                                                                                                                                              registerRequestByContextId: <T = any>(
                                                                                                                                                                                                                                                                                                                                                                              request: T,
                                                                                                                                                                                                                                                                                                                                                                              contextId: { id: number }
                                                                                                                                                                                                                                                                                                                                                                              ) => void;
                                                                                                                                                                                                                                                                                                                                                                              • Registers the request/context object for a given context ID (DI container sub-tree).

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {void}

                                                                                                                                                                                                                                                                                                                                                                              method resolve

                                                                                                                                                                                                                                                                                                                                                                              resolve: {
                                                                                                                                                                                                                                                                                                                                                                              <TInput = any, TResult = TInput>(
                                                                                                                                                                                                                                                                                                                                                                              typeOrToken: Type<TInput> | Function | string | symbol
                                                                                                                                                                                                                                                                                                                                                                              ): Promise<TResult>;
                                                                                                                                                                                                                                                                                                                                                                              <TInput = any, TResult = TInput>(
                                                                                                                                                                                                                                                                                                                                                                              typeOrToken: string | symbol | Function | Type<TInput>,
                                                                                                                                                                                                                                                                                                                                                                              contextId?: { id: number }
                                                                                                                                                                                                                                                                                                                                                                              ): Promise<TResult>;
                                                                                                                                                                                                                                                                                                                                                                              <TInput = any, TResult = TInput>(
                                                                                                                                                                                                                                                                                                                                                                              typeOrToken: string | symbol | Function | Type<TInput>,
                                                                                                                                                                                                                                                                                                                                                                              contextId?: { id: number },
                                                                                                                                                                                                                                                                                                                                                                              options?: { strict?: boolean; each?: false }
                                                                                                                                                                                                                                                                                                                                                                              ): Promise<TResult>;
                                                                                                                                                                                                                                                                                                                                                                              <TInput = any, TResult = TInput>(
                                                                                                                                                                                                                                                                                                                                                                              typeOrToken: string | symbol | Function | Type<TInput>,
                                                                                                                                                                                                                                                                                                                                                                              contextId?: { id: number },
                                                                                                                                                                                                                                                                                                                                                                              options?: { strict?: boolean; each: true }
                                                                                                                                                                                                                                                                                                                                                                              ): Promise<TResult[]>;
                                                                                                                                                                                                                                                                                                                                                                              <TInput = any, TResult = TInput>(
                                                                                                                                                                                                                                                                                                                                                                              typeOrToken: string | symbol | Function | Type<TInput>,
                                                                                                                                                                                                                                                                                                                                                                              contextId?: { id: number },
                                                                                                                                                                                                                                                                                                                                                                              options?: GetOrResolveOptions
                                                                                                                                                                                                                                                                                                                                                                              ): Promise<TResult | TResult[]>;
                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                              • Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {Promise}

                                                                                                                                                                                                                                                                                                                                                                              • Resolves transient or request-scoped instances of either injectables or controllers, otherwise, throws exception.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {Promise<Array>}

                                                                                                                                                                                                                                                                                                                                                                              • Resolves transient or request-scoped instance (or a list of instances) of either injectable or controller, otherwise, throws exception.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {Promise<TResult | Array>}

                                                                                                                                                                                                                                                                                                                                                                              method select

                                                                                                                                                                                                                                                                                                                                                                              select: <T>(
                                                                                                                                                                                                                                                                                                                                                                              module: Type<T> | DynamicModule,
                                                                                                                                                                                                                                                                                                                                                                              options?: SelectOptions
                                                                                                                                                                                                                                                                                                                                                                              ) => INestApplicationContext;
                                                                                                                                                                                                                                                                                                                                                                              • Allows navigating through the modules tree, for example, to pull out a specific instance from the selected module.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {INestApplicationContext}

                                                                                                                                                                                                                                                                                                                                                                              method useLogger

                                                                                                                                                                                                                                                                                                                                                                              useLogger: (logger: LoggerService | LogLevel[] | false) => void;
                                                                                                                                                                                                                                                                                                                                                                              • Sets custom logger service. Flushes buffered logs if auto flush is on.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {void}

                                                                                                                                                                                                                                                                                                                                                                              interface INestMicroservice

                                                                                                                                                                                                                                                                                                                                                                              interface INestMicroservice extends INestApplicationContext {}
                                                                                                                                                                                                                                                                                                                                                                              • Interface describing Microservice Context.

                                                                                                                                                                                                                                                                                                                                                                              property status

                                                                                                                                                                                                                                                                                                                                                                              status: Observable<string>;
                                                                                                                                                                                                                                                                                                                                                                              • Returns an observable that emits status changes.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {Observable}

                                                                                                                                                                                                                                                                                                                                                                              method close

                                                                                                                                                                                                                                                                                                                                                                              close: () => Promise<void>;
                                                                                                                                                                                                                                                                                                                                                                              • Terminates the application.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {Promise}

                                                                                                                                                                                                                                                                                                                                                                              method getTransportServer

                                                                                                                                                                                                                                                                                                                                                                              getTransportServer: () => ITransportServer;
                                                                                                                                                                                                                                                                                                                                                                              • Returns the underlying transport server instance. Use this to close only the transport (port/connection) without triggering the full application shutdown lifecycle.

                                                                                                                                                                                                                                                                                                                                                                              method listen

                                                                                                                                                                                                                                                                                                                                                                              listen: () => Promise<any>;
                                                                                                                                                                                                                                                                                                                                                                              • Starts the microservice.

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {void}

                                                                                                                                                                                                                                                                                                                                                                              method on

                                                                                                                                                                                                                                                                                                                                                                              on: <
                                                                                                                                                                                                                                                                                                                                                                              EventsMap extends Record<string, Function> = Record<string, Function>,
                                                                                                                                                                                                                                                                                                                                                                              EventKey extends keyof EventsMap = keyof EventsMap,
                                                                                                                                                                                                                                                                                                                                                                              EventCallback extends EventsMap[EventKey] = EventsMap[EventKey]
                                                                                                                                                                                                                                                                                                                                                                              >(
                                                                                                                                                                                                                                                                                                                                                                              event: EventKey,
                                                                                                                                                                                                                                                                                                                                                                              callback: EventCallback
                                                                                                                                                                                                                                                                                                                                                                              ) => void;
                                                                                                                                                                                                                                                                                                                                                                              • Registers an event listener for the given event.

                                                                                                                                                                                                                                                                                                                                                                                Parameter event

                                                                                                                                                                                                                                                                                                                                                                                Event name

                                                                                                                                                                                                                                                                                                                                                                                Parameter callback

                                                                                                                                                                                                                                                                                                                                                                                Callback to be executed when the event is emitted

                                                                                                                                                                                                                                                                                                                                                                              method registerPreRequestHook

                                                                                                                                                                                                                                                                                                                                                                              registerPreRequestHook: (...hooks: PreRequestHook[]) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Registers a global preRequest hook (executed before all enhancers for every pattern handler). Hooks receive an ExecutionContext and a next function that executes the rest of the pipeline. Useful for setting up AsyncLocalStorage context, tracing, or correlation IDs.

                                                                                                                                                                                                                                                                                                                                                                                Parameter hooks

                                                                                                                                                                                                                                                                                                                                                                              method unwrap

                                                                                                                                                                                                                                                                                                                                                                              unwrap: <T>() => T;
                                                                                                                                                                                                                                                                                                                                                                              • Returns an instance of the underlying server/broker instance, or a group of servers if there are more than one.

                                                                                                                                                                                                                                                                                                                                                                              method useGlobalFilters

                                                                                                                                                                                                                                                                                                                                                                              useGlobalFilters: (...filters: ExceptionFilter[]) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Registers global exception filters (will be used for every pattern handler).

                                                                                                                                                                                                                                                                                                                                                                                Parameter filters

                                                                                                                                                                                                                                                                                                                                                                              method useGlobalGuards

                                                                                                                                                                                                                                                                                                                                                                              useGlobalGuards: (...guards: CanActivate[]) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Registers global guards (will be used for every pattern handler).

                                                                                                                                                                                                                                                                                                                                                                                Parameter guards

                                                                                                                                                                                                                                                                                                                                                                              method useGlobalInterceptors

                                                                                                                                                                                                                                                                                                                                                                              useGlobalInterceptors: (...interceptors: NestInterceptor[]) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Registers global interceptors (will be used for every pattern handler).

                                                                                                                                                                                                                                                                                                                                                                                Parameter interceptors

                                                                                                                                                                                                                                                                                                                                                                              method useGlobalPipes

                                                                                                                                                                                                                                                                                                                                                                              useGlobalPipes: (...pipes: PipeTransform<any>[]) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Registers global pipes (will be used for every pattern handler).

                                                                                                                                                                                                                                                                                                                                                                                Parameter pipes

                                                                                                                                                                                                                                                                                                                                                                              method useWebSocketAdapter

                                                                                                                                                                                                                                                                                                                                                                              useWebSocketAdapter: (adapter: WebSocketAdapter) => this;
                                                                                                                                                                                                                                                                                                                                                                              • Registers a web socket adapter that will be used for Gateways. Use to override the default socket.io library.

                                                                                                                                                                                                                                                                                                                                                                                Parameter adapter

                                                                                                                                                                                                                                                                                                                                                                                Returns

                                                                                                                                                                                                                                                                                                                                                                                {this}

                                                                                                                                                                                                                                                                                                                                                                              interface IntrospectionResult

                                                                                                                                                                                                                                                                                                                                                                              interface IntrospectionResult {}

                                                                                                                                                                                                                                                                                                                                                                              property scope

                                                                                                                                                                                                                                                                                                                                                                              scope: Scope;
                                                                                                                                                                                                                                                                                                                                                                              • Enum defining lifetime of host class or factory.

                                                                                                                                                                                                                                                                                                                                                                              interface ITransportServer

                                                                                                                                                                                                                                                                                                                                                                              interface ITransportServer {}
                                                                                                                                                                                                                                                                                                                                                                              • Interface describing the shape of a transport server. Used as the return type of getTransportServer() to provide autocomplete without creating circular dependencies.

                                                                                                                                                                                                                                                                                                                                                                              method close

                                                                                                                                                                                                                                                                                                                                                                              close: () => any;
                                                                                                                                                                                                                                                                                                                                                                              • Closes the transport server (stops listening on port/connection).

                                                                                                                                                                                                                                                                                                                                                                              method listen

                                                                                                                                                                                                                                                                                                                                                                              listen: (callback: (...optionalParams: unknown[]) => any) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Starts the transport server.

                                                                                                                                                                                                                                                                                                                                                                                Parameter callback

                                                                                                                                                                                                                                                                                                                                                                                Function to be called upon initialization

                                                                                                                                                                                                                                                                                                                                                                              interface LoggerService

                                                                                                                                                                                                                                                                                                                                                                              interface LoggerService {}

                                                                                                                                                                                                                                                                                                                                                                              method debug

                                                                                                                                                                                                                                                                                                                                                                              debug: (message: any, ...optionalParams: any[]) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Write a 'debug' level log.

                                                                                                                                                                                                                                                                                                                                                                              method error

                                                                                                                                                                                                                                                                                                                                                                              error: (message: any, ...optionalParams: any[]) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Write an 'error' level log.

                                                                                                                                                                                                                                                                                                                                                                              method fatal

                                                                                                                                                                                                                                                                                                                                                                              fatal: (message: any, ...optionalParams: any[]) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Write a 'fatal' level log.

                                                                                                                                                                                                                                                                                                                                                                              method log

                                                                                                                                                                                                                                                                                                                                                                              log: (message: any, ...optionalParams: any[]) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Write a 'log' level log.

                                                                                                                                                                                                                                                                                                                                                                              method setLogLevels

                                                                                                                                                                                                                                                                                                                                                                              setLogLevels: (levels: LogLevel[]) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Set log levels.

                                                                                                                                                                                                                                                                                                                                                                                Parameter levels

                                                                                                                                                                                                                                                                                                                                                                                log levels

                                                                                                                                                                                                                                                                                                                                                                              method verbose

                                                                                                                                                                                                                                                                                                                                                                              verbose: (message: any, ...optionalParams: any[]) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Write a 'verbose' level log.

                                                                                                                                                                                                                                                                                                                                                                              method warn

                                                                                                                                                                                                                                                                                                                                                                              warn: (message: any, ...optionalParams: any[]) => any;
                                                                                                                                                                                                                                                                                                                                                                              • Write a 'warn' level log.

                                                                                                                                                                                                                                                                                                                                                                              interface MessageEvent

                                                                                                                                                                                                                                                                                                                                                                              interface MessageEvent {}

                                                                                                                                                                                                                                                                                                                                                                                property comment

                                                                                                                                                                                                                                                                                                                                                                                comment?: string;

                                                                                                                                                                                                                                                                                                                                                                                  property data

                                                                                                                                                                                                                                                                                                                                                                                  data?: string | object;

                                                                                                                                                                                                                                                                                                                                                                                    property id

                                                                                                                                                                                                                                                                                                                                                                                    id?: string;

                                                                                                                                                                                                                                                                                                                                                                                      property retry

                                                                                                                                                                                                                                                                                                                                                                                      retry?: number;

                                                                                                                                                                                                                                                                                                                                                                                        property type

                                                                                                                                                                                                                                                                                                                                                                                        type?: string;

                                                                                                                                                                                                                                                                                                                                                                                          interface MiddlewareConsumer

                                                                                                                                                                                                                                                                                                                                                                                          interface MiddlewareConsumer {}
                                                                                                                                                                                                                                                                                                                                                                                          • Interface defining method for applying user defined middleware to routes.

                                                                                                                                                                                                                                                                                                                                                                                            See Also

                                                                                                                                                                                                                                                                                                                                                                                            • [MiddlewareConsumer](https://docs.nestjs.com/middleware#middleware-consumer)

                                                                                                                                                                                                                                                                                                                                                                                          method apply

                                                                                                                                                                                                                                                                                                                                                                                          apply: (...middleware: (Type<any> | Function)[]) => MiddlewareConfigProxy;
                                                                                                                                                                                                                                                                                                                                                                                          • Parameter middleware

                                                                                                                                                                                                                                                                                                                                                                                            middleware class/function or array of classes/functions to be attached to the passed routes.

                                                                                                                                                                                                                                                                                                                                                                                            Returns

                                                                                                                                                                                                                                                                                                                                                                                            {MiddlewareConfigProxy}

                                                                                                                                                                                                                                                                                                                                                                                          interface ModuleMetadata

                                                                                                                                                                                                                                                                                                                                                                                          interface ModuleMetadata {}
                                                                                                                                                                                                                                                                                                                                                                                          • Interface defining the property object that describes the module.

                                                                                                                                                                                                                                                                                                                                                                                            See Also

                                                                                                                                                                                                                                                                                                                                                                                            • [Modules](https://docs.nestjs.com/modules)

                                                                                                                                                                                                                                                                                                                                                                                          property controllers

                                                                                                                                                                                                                                                                                                                                                                                          controllers?: Type<any>[];
                                                                                                                                                                                                                                                                                                                                                                                          • Optional list of controllers defined in this module which have to be instantiated.

                                                                                                                                                                                                                                                                                                                                                                                          property exports

                                                                                                                                                                                                                                                                                                                                                                                          exports?: Array<
                                                                                                                                                                                                                                                                                                                                                                                          | DynamicModule
                                                                                                                                                                                                                                                                                                                                                                                          | string
                                                                                                                                                                                                                                                                                                                                                                                          | symbol
                                                                                                                                                                                                                                                                                                                                                                                          | Provider
                                                                                                                                                                                                                                                                                                                                                                                          | ForwardReference
                                                                                                                                                                                                                                                                                                                                                                                          | Abstract<any>
                                                                                                                                                                                                                                                                                                                                                                                          | Function
                                                                                                                                                                                                                                                                                                                                                                                          >;
                                                                                                                                                                                                                                                                                                                                                                                          • Optional list of the subset of providers that are provided by this module and should be available in other modules which import this module.

                                                                                                                                                                                                                                                                                                                                                                                          property imports

                                                                                                                                                                                                                                                                                                                                                                                          imports?: Array<
                                                                                                                                                                                                                                                                                                                                                                                          Type<any> | DynamicModule | Promise<DynamicModule> | ForwardReference
                                                                                                                                                                                                                                                                                                                                                                                          >;
                                                                                                                                                                                                                                                                                                                                                                                          • Optional list of imported modules that export the providers which are required in this module.

                                                                                                                                                                                                                                                                                                                                                                                          property providers

                                                                                                                                                                                                                                                                                                                                                                                          providers?: Provider[];
                                                                                                                                                                                                                                                                                                                                                                                          • Optional list of providers that will be instantiated by the Nest injector and that may be shared at least across this module.

                                                                                                                                                                                                                                                                                                                                                                                          interface NestApplicationOptions

                                                                                                                                                                                                                                                                                                                                                                                          interface NestApplicationOptions extends NestApplicationContextOptions {}

                                                                                                                                                                                                                                                                                                                                                                                          property bodyParser

                                                                                                                                                                                                                                                                                                                                                                                          bodyParser?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                          • Whether to use underlying platform body parser.

                                                                                                                                                                                                                                                                                                                                                                                          property cookies

                                                                                                                                                                                                                                                                                                                                                                                          cookies?: CookiesOptions;
                                                                                                                                                                                                                                                                                                                                                                                          • Built-in cookie support. secret enables signing cookies with setCookie(..., { signed: true }) and reading them with @SignedCookies().

                                                                                                                                                                                                                                                                                                                                                                                          property cors

                                                                                                                                                                                                                                                                                                                                                                                          cors?: boolean | CorsOptions | CorsOptionsDelegate<any>;
                                                                                                                                                                                                                                                                                                                                                                                          • CORS options from [CORS package](https://github.com/expressjs/cors#configuration-options)

                                                                                                                                                                                                                                                                                                                                                                                          property forceCloseConnections

                                                                                                                                                                                                                                                                                                                                                                                          forceCloseConnections?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                          • Force close open HTTP connections. Useful if restarting your application hangs due to keep-alive connections in the HTTP adapter.

                                                                                                                                                                                                                                                                                                                                                                                          property httpsOptions

                                                                                                                                                                                                                                                                                                                                                                                          httpsOptions?: HttpsOptions;
                                                                                                                                                                                                                                                                                                                                                                                          • Set of configurable HTTPS options

                                                                                                                                                                                                                                                                                                                                                                                          property rawBody

                                                                                                                                                                                                                                                                                                                                                                                          rawBody?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                          • Whether to register the raw request body on the request. Use req.rawBody.

                                                                                                                                                                                                                                                                                                                                                                                          property return503OnClosing

                                                                                                                                                                                                                                                                                                                                                                                          return503OnClosing?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                          • Whether to return 503 Service Unavailable for new requests during the shutdown process, while allowing existing in-flight requests to complete. false

                                                                                                                                                                                                                                                                                                                                                                                          property routeConflictPolicy

                                                                                                                                                                                                                                                                                                                                                                                          routeConflictPolicy?: RouteConflictPolicy;
                                                                                                                                                                                                                                                                                                                                                                                          • Per-kind policy for overlapping HTTP routes detected at bootstrap. Distinguishes duplicate (identical method+path+host+version) from shadow (patterns that can match the same request, e.g. /users/me vs /users/:id). Each kind defaults to 'off'.

                                                                                                                                                                                                                                                                                                                                                                                          property routeResolutionStrategy

                                                                                                                                                                                                                                                                                                                                                                                          routeResolutionStrategy?: RouteResolutionStrategy;
                                                                                                                                                                                                                                                                                                                                                                                          • Order in which HTTP routes are registered on the underlying adapter. 'specificity' registers literal segments before parametric and wildcard ones on order-sensitive adapters (such as Express). Defaults to 'declaration'.

                                                                                                                                                                                                                                                                                                                                                                                          interface NestHybridApplicationOptions

                                                                                                                                                                                                                                                                                                                                                                                          interface NestHybridApplicationOptions {}

                                                                                                                                                                                                                                                                                                                                                                                          property deferInitialization

                                                                                                                                                                                                                                                                                                                                                                                          deferInitialization?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                            property inheritAppConfig

                                                                                                                                                                                                                                                                                                                                                                                            inheritAppConfig?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                              interface NestInterceptor

                                                                                                                                                                                                                                                                                                                                                                                              interface NestInterceptor<T = any, R = any> {}
                                                                                                                                                                                                                                                                                                                                                                                              • Interface describing implementation of an interceptor.

                                                                                                                                                                                                                                                                                                                                                                                                See Also

                                                                                                                                                                                                                                                                                                                                                                                                • [Interceptors](https://docs.nestjs.com/interceptors)

                                                                                                                                                                                                                                                                                                                                                                                              method intercept

                                                                                                                                                                                                                                                                                                                                                                                              intercept: (
                                                                                                                                                                                                                                                                                                                                                                                              context: ExecutionContext,
                                                                                                                                                                                                                                                                                                                                                                                              next: CallHandler<T>
                                                                                                                                                                                                                                                                                                                                                                                              ) => Observable<R> | Promise<Observable<R>>;
                                                                                                                                                                                                                                                                                                                                                                                              • Method to implement a custom interceptor.

                                                                                                                                                                                                                                                                                                                                                                                                Parameter context

                                                                                                                                                                                                                                                                                                                                                                                                an ExecutionContext object providing methods to access the route handler and class about to be invoked.

                                                                                                                                                                                                                                                                                                                                                                                                Parameter next

                                                                                                                                                                                                                                                                                                                                                                                                a reference to the CallHandler, which provides access to an Observable representing the response stream from the route handler.

                                                                                                                                                                                                                                                                                                                                                                                              interface NestMiddleware

                                                                                                                                                                                                                                                                                                                                                                                              interface NestMiddleware<TRequest = any, TResponse = any> {}
                                                                                                                                                                                                                                                                                                                                                                                              • See Also

                                                                                                                                                                                                                                                                                                                                                                                                • [Middleware](https://docs.nestjs.com/middleware)

                                                                                                                                                                                                                                                                                                                                                                                              method use

                                                                                                                                                                                                                                                                                                                                                                                              use: (req: TRequest, res: TResponse, next: (error?: any) => void) => any;

                                                                                                                                                                                                                                                                                                                                                                                                interface NestModule

                                                                                                                                                                                                                                                                                                                                                                                                interface NestModule {}

                                                                                                                                                                                                                                                                                                                                                                                                method configure

                                                                                                                                                                                                                                                                                                                                                                                                configure: (consumer: MiddlewareConsumer) => any;

                                                                                                                                                                                                                                                                                                                                                                                                  interface OnApplicationBootstrap

                                                                                                                                                                                                                                                                                                                                                                                                  interface OnApplicationBootstrap {}
                                                                                                                                                                                                                                                                                                                                                                                                  • Interface defining method called once the application has fully started and is bootstrapped.

                                                                                                                                                                                                                                                                                                                                                                                                    See Also

                                                                                                                                                                                                                                                                                                                                                                                                    • [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)

                                                                                                                                                                                                                                                                                                                                                                                                  method onApplicationBootstrap

                                                                                                                                                                                                                                                                                                                                                                                                  onApplicationBootstrap: () => any;

                                                                                                                                                                                                                                                                                                                                                                                                    interface OnApplicationShutdown

                                                                                                                                                                                                                                                                                                                                                                                                    interface OnApplicationShutdown {}
                                                                                                                                                                                                                                                                                                                                                                                                    • Interface defining method to respond to system signals (when application gets shutdown by, e.g., SIGTERM)

                                                                                                                                                                                                                                                                                                                                                                                                      See Also

                                                                                                                                                                                                                                                                                                                                                                                                      • [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)

                                                                                                                                                                                                                                                                                                                                                                                                    method onApplicationShutdown

                                                                                                                                                                                                                                                                                                                                                                                                    onApplicationShutdown: (signal?: string) => any;

                                                                                                                                                                                                                                                                                                                                                                                                      interface OnModuleDestroy

                                                                                                                                                                                                                                                                                                                                                                                                      interface OnModuleDestroy {}
                                                                                                                                                                                                                                                                                                                                                                                                      • Interface defining method called just before Nest destroys the host module (app.close() method has been evaluated). Use to perform cleanup on resources (e.g., Database connections).

                                                                                                                                                                                                                                                                                                                                                                                                        See Also

                                                                                                                                                                                                                                                                                                                                                                                                        • [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)

                                                                                                                                                                                                                                                                                                                                                                                                      method onModuleDestroy

                                                                                                                                                                                                                                                                                                                                                                                                      onModuleDestroy: () => any;

                                                                                                                                                                                                                                                                                                                                                                                                        interface OnModuleInit

                                                                                                                                                                                                                                                                                                                                                                                                        interface OnModuleInit {}
                                                                                                                                                                                                                                                                                                                                                                                                        • Interface defining method called once the host module has been initialized.

                                                                                                                                                                                                                                                                                                                                                                                                          See Also

                                                                                                                                                                                                                                                                                                                                                                                                          • [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)

                                                                                                                                                                                                                                                                                                                                                                                                        method onModuleInit

                                                                                                                                                                                                                                                                                                                                                                                                        onModuleInit: () => any;

                                                                                                                                                                                                                                                                                                                                                                                                          interface ParameterDecoratorOptions

                                                                                                                                                                                                                                                                                                                                                                                                          interface ParameterDecoratorOptions {}
                                                                                                                                                                                                                                                                                                                                                                                                          • The options that can be passed to a handler's parameter decorator, such as @Query(), @Body(), and others. These options allow you to specify a schema for validation and transformation, as well as any pipes to apply to the parameter.

                                                                                                                                                                                                                                                                                                                                                                                                          property pipes

                                                                                                                                                                                                                                                                                                                                                                                                          pipes?: (Type<PipeTransform> | PipeTransform)[];
                                                                                                                                                                                                                                                                                                                                                                                                          • The list of pipes to apply to the parameter.

                                                                                                                                                                                                                                                                                                                                                                                                          property schema

                                                                                                                                                                                                                                                                                                                                                                                                          schema?: StandardSchemaV1;
                                                                                                                                                                                                                                                                                                                                                                                                          • The schema to use to retrieve within the pipes, to, for example, validate the parameter against the schema or to apply transformations based on the schema.

                                                                                                                                                                                                                                                                                                                                                                                                          interface ParseArrayPipeOptions

                                                                                                                                                                                                                                                                                                                                                                                                          interface ParseArrayPipeOptions
                                                                                                                                                                                                                                                                                                                                                                                                          extends Omit<
                                                                                                                                                                                                                                                                                                                                                                                                          ValidationPipeOptions,
                                                                                                                                                                                                                                                                                                                                                                                                          'transform' | 'validateCustomDecorators' | 'exceptionFactory'
                                                                                                                                                                                                                                                                                                                                                                                                          > {}

                                                                                                                                                                                                                                                                                                                                                                                                          property exceptionFactory

                                                                                                                                                                                                                                                                                                                                                                                                          exceptionFactory?: (error: any) => any;
                                                                                                                                                                                                                                                                                                                                                                                                          • A factory function that returns an exception object to be thrown if validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                            Parameter error

                                                                                                                                                                                                                                                                                                                                                                                                            Error message or object

                                                                                                                                                                                                                                                                                                                                                                                                            Returns

                                                                                                                                                                                                                                                                                                                                                                                                            The exception object

                                                                                                                                                                                                                                                                                                                                                                                                          property items

                                                                                                                                                                                                                                                                                                                                                                                                          items?: Type<unknown>;
                                                                                                                                                                                                                                                                                                                                                                                                          • Type for items to be converted into

                                                                                                                                                                                                                                                                                                                                                                                                          property optional

                                                                                                                                                                                                                                                                                                                                                                                                          optional?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                          • If true, the pipe will return null or undefined if the value is not provided false

                                                                                                                                                                                                                                                                                                                                                                                                          property separator

                                                                                                                                                                                                                                                                                                                                                                                                          separator?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          • Items separator to split string by ','

                                                                                                                                                                                                                                                                                                                                                                                                          interface ParseBoolPipeOptions

                                                                                                                                                                                                                                                                                                                                                                                                          interface ParseBoolPipeOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                          property errorHttpStatusCode

                                                                                                                                                                                                                                                                                                                                                                                                          errorHttpStatusCode?: ErrorHttpStatusCode;
                                                                                                                                                                                                                                                                                                                                                                                                          • The HTTP status code to be used in the response when the validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                          property exceptionFactory

                                                                                                                                                                                                                                                                                                                                                                                                          exceptionFactory?: (error: string) => any;
                                                                                                                                                                                                                                                                                                                                                                                                          • A factory function that returns an exception object to be thrown if validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                            Parameter error

                                                                                                                                                                                                                                                                                                                                                                                                            Error message

                                                                                                                                                                                                                                                                                                                                                                                                            Returns

                                                                                                                                                                                                                                                                                                                                                                                                            The exception object

                                                                                                                                                                                                                                                                                                                                                                                                          property optional

                                                                                                                                                                                                                                                                                                                                                                                                          optional?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                          • If true, the pipe will return null or undefined if the value is not provided false

                                                                                                                                                                                                                                                                                                                                                                                                          interface ParseDatePipeOptions

                                                                                                                                                                                                                                                                                                                                                                                                          interface ParseDatePipeOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                          property default

                                                                                                                                                                                                                                                                                                                                                                                                          default?: () => Date;
                                                                                                                                                                                                                                                                                                                                                                                                          • A factory whose result is returned when the value is null or undefined, regardless of optional

                                                                                                                                                                                                                                                                                                                                                                                                          property errorHttpStatusCode

                                                                                                                                                                                                                                                                                                                                                                                                          errorHttpStatusCode?: ErrorHttpStatusCode;
                                                                                                                                                                                                                                                                                                                                                                                                          • The HTTP status code to be used in the response when the validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                          property exceptionFactory

                                                                                                                                                                                                                                                                                                                                                                                                          exceptionFactory?: (error: string) => any;
                                                                                                                                                                                                                                                                                                                                                                                                          • A factory function that returns an exception object to be thrown if validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                            Parameter error

                                                                                                                                                                                                                                                                                                                                                                                                            Error message

                                                                                                                                                                                                                                                                                                                                                                                                            Returns

                                                                                                                                                                                                                                                                                                                                                                                                            The exception object

                                                                                                                                                                                                                                                                                                                                                                                                          property optional

                                                                                                                                                                                                                                                                                                                                                                                                          optional?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                          • If true, the pipe will return null or undefined if the value is not provided false

                                                                                                                                                                                                                                                                                                                                                                                                          interface ParseEnumPipeOptions

                                                                                                                                                                                                                                                                                                                                                                                                          interface ParseEnumPipeOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                          property errorHttpStatusCode

                                                                                                                                                                                                                                                                                                                                                                                                          errorHttpStatusCode?: ErrorHttpStatusCode;
                                                                                                                                                                                                                                                                                                                                                                                                          • The HTTP status code to be used in the response when the validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                          property exceptionFactory

                                                                                                                                                                                                                                                                                                                                                                                                          exceptionFactory?: (error: string) => any;
                                                                                                                                                                                                                                                                                                                                                                                                          • A factory function that returns an exception object to be thrown if validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                            Parameter error

                                                                                                                                                                                                                                                                                                                                                                                                            Error message

                                                                                                                                                                                                                                                                                                                                                                                                            Returns

                                                                                                                                                                                                                                                                                                                                                                                                            The exception object

                                                                                                                                                                                                                                                                                                                                                                                                          property optional

                                                                                                                                                                                                                                                                                                                                                                                                          optional?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                          • If true, the pipe will return null or undefined if the value is not provided false

                                                                                                                                                                                                                                                                                                                                                                                                          interface ParseFileOptions

                                                                                                                                                                                                                                                                                                                                                                                                          interface ParseFileOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                          property errorHttpStatusCode

                                                                                                                                                                                                                                                                                                                                                                                                          errorHttpStatusCode?: ErrorHttpStatusCode;

                                                                                                                                                                                                                                                                                                                                                                                                            property exceptionFactory

                                                                                                                                                                                                                                                                                                                                                                                                            exceptionFactory?: (error: string) => any;

                                                                                                                                                                                                                                                                                                                                                                                                              property fileIsRequired

                                                                                                                                                                                                                                                                                                                                                                                                              fileIsRequired?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                              • Defines if file parameter is required. true

                                                                                                                                                                                                                                                                                                                                                                                                              property validators

                                                                                                                                                                                                                                                                                                                                                                                                              validators?: FileValidator[];

                                                                                                                                                                                                                                                                                                                                                                                                                interface ParseFloatPipeOptions

                                                                                                                                                                                                                                                                                                                                                                                                                interface ParseFloatPipeOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                                property errorHttpStatusCode

                                                                                                                                                                                                                                                                                                                                                                                                                errorHttpStatusCode?: ErrorHttpStatusCode;
                                                                                                                                                                                                                                                                                                                                                                                                                • The HTTP status code to be used in the response when the validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                                property exceptionFactory

                                                                                                                                                                                                                                                                                                                                                                                                                exceptionFactory?: (error: string) => any;
                                                                                                                                                                                                                                                                                                                                                                                                                • A factory function that returns an exception object to be thrown if validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter error

                                                                                                                                                                                                                                                                                                                                                                                                                  Error message

                                                                                                                                                                                                                                                                                                                                                                                                                  Returns

                                                                                                                                                                                                                                                                                                                                                                                                                  The exception object

                                                                                                                                                                                                                                                                                                                                                                                                                property optional

                                                                                                                                                                                                                                                                                                                                                                                                                optional?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                • If true, the pipe will return null or undefined if the value is not provided false

                                                                                                                                                                                                                                                                                                                                                                                                                interface ParseIntPipeOptions

                                                                                                                                                                                                                                                                                                                                                                                                                interface ParseIntPipeOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                                property errorHttpStatusCode

                                                                                                                                                                                                                                                                                                                                                                                                                errorHttpStatusCode?: ErrorHttpStatusCode;
                                                                                                                                                                                                                                                                                                                                                                                                                • The HTTP status code to be used in the response when the validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                                property exceptionFactory

                                                                                                                                                                                                                                                                                                                                                                                                                exceptionFactory?: (error: string) => any;
                                                                                                                                                                                                                                                                                                                                                                                                                • A factory function that returns an exception object to be thrown if validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter error

                                                                                                                                                                                                                                                                                                                                                                                                                  Error message

                                                                                                                                                                                                                                                                                                                                                                                                                  Returns

                                                                                                                                                                                                                                                                                                                                                                                                                  The exception object

                                                                                                                                                                                                                                                                                                                                                                                                                property optional

                                                                                                                                                                                                                                                                                                                                                                                                                optional?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                • If true, the pipe will return null or undefined if the value is not provided false

                                                                                                                                                                                                                                                                                                                                                                                                                interface ParseUUIDPipeOptions

                                                                                                                                                                                                                                                                                                                                                                                                                interface ParseUUIDPipeOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                                property errorHttpStatusCode

                                                                                                                                                                                                                                                                                                                                                                                                                errorHttpStatusCode?: ErrorHttpStatusCode;
                                                                                                                                                                                                                                                                                                                                                                                                                • The HTTP status code to be used in the response when the validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                                property exceptionFactory

                                                                                                                                                                                                                                                                                                                                                                                                                exceptionFactory?: (errors: string) => any;
                                                                                                                                                                                                                                                                                                                                                                                                                • A factory function that returns an exception object to be thrown if validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter error

                                                                                                                                                                                                                                                                                                                                                                                                                  Error message

                                                                                                                                                                                                                                                                                                                                                                                                                  Returns

                                                                                                                                                                                                                                                                                                                                                                                                                  The exception object

                                                                                                                                                                                                                                                                                                                                                                                                                property optional

                                                                                                                                                                                                                                                                                                                                                                                                                optional?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                • If true, the pipe will return null or undefined if the value is not provided false

                                                                                                                                                                                                                                                                                                                                                                                                                property version

                                                                                                                                                                                                                                                                                                                                                                                                                version?: UUIDVersion;
                                                                                                                                                                                                                                                                                                                                                                                                                • UUID version to validate

                                                                                                                                                                                                                                                                                                                                                                                                                interface PipeTransform

                                                                                                                                                                                                                                                                                                                                                                                                                interface PipeTransform<T = any, R = any> {}
                                                                                                                                                                                                                                                                                                                                                                                                                • Interface describing implementation of a pipe.

                                                                                                                                                                                                                                                                                                                                                                                                                  See Also

                                                                                                                                                                                                                                                                                                                                                                                                                  • [Pipes](https://docs.nestjs.com/pipes)

                                                                                                                                                                                                                                                                                                                                                                                                                method transform

                                                                                                                                                                                                                                                                                                                                                                                                                transform: (value: T, metadata: ArgumentMetadata) => R;
                                                                                                                                                                                                                                                                                                                                                                                                                • Method to implement a custom pipe. Called with two parameters

                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter value

                                                                                                                                                                                                                                                                                                                                                                                                                  argument before it is received by route handler method

                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter metadata

                                                                                                                                                                                                                                                                                                                                                                                                                  contains metadata about the value

                                                                                                                                                                                                                                                                                                                                                                                                                interface PlainLiteralObject

                                                                                                                                                                                                                                                                                                                                                                                                                interface PlainLiteralObject {}

                                                                                                                                                                                                                                                                                                                                                                                                                  index signature

                                                                                                                                                                                                                                                                                                                                                                                                                  [key: string]: any;

                                                                                                                                                                                                                                                                                                                                                                                                                    interface PreRequestHook

                                                                                                                                                                                                                                                                                                                                                                                                                    interface PreRequestHook {}
                                                                                                                                                                                                                                                                                                                                                                                                                    • Interface describing a global preRequest hook for microservices.

                                                                                                                                                                                                                                                                                                                                                                                                                      Hooks are executed before guards, allowing setup of context (e.g. AsyncLocalStorage) that is available to all downstream enhancers.

                                                                                                                                                                                                                                                                                                                                                                                                                      Example 1

                                                                                                                                                                                                                                                                                                                                                                                                                      const als = new AsyncLocalStorage();
                                                                                                                                                                                                                                                                                                                                                                                                                      app.registerPreRequestHook((context, next) => {
                                                                                                                                                                                                                                                                                                                                                                                                                      als.enterWith({ correlationId: uuid() });
                                                                                                                                                                                                                                                                                                                                                                                                                      return next();
                                                                                                                                                                                                                                                                                                                                                                                                                      });

                                                                                                                                                                                                                                                                                                                                                                                                                    call signature

                                                                                                                                                                                                                                                                                                                                                                                                                    (
                                                                                                                                                                                                                                                                                                                                                                                                                    context: ExecutionContext,
                                                                                                                                                                                                                                                                                                                                                                                                                    next: () => Observable<unknown>
                                                                                                                                                                                                                                                                                                                                                                                                                    ): Observable<unknown>;

                                                                                                                                                                                                                                                                                                                                                                                                                      interface RequestMappingMetadata

                                                                                                                                                                                                                                                                                                                                                                                                                      interface RequestMappingMetadata {}

                                                                                                                                                                                                                                                                                                                                                                                                                        property method

                                                                                                                                                                                                                                                                                                                                                                                                                        method?: RequestMethod;

                                                                                                                                                                                                                                                                                                                                                                                                                          property path

                                                                                                                                                                                                                                                                                                                                                                                                                          path?: string | string[];

                                                                                                                                                                                                                                                                                                                                                                                                                            interface ResponseDecoratorOptions

                                                                                                                                                                                                                                                                                                                                                                                                                            interface ResponseDecoratorOptions {}
                                                                                                                                                                                                                                                                                                                                                                                                                            • The @Response()/@Res parameter decorator options.

                                                                                                                                                                                                                                                                                                                                                                                                                            property passthrough

                                                                                                                                                                                                                                                                                                                                                                                                                            passthrough: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                            • Determines whether the response will be sent manually within the route handler, with the use of native response handling methods exposed by the platform-specific response object, or if it should passthrough Nest response processing pipeline.

                                                                                                                                                                                                                                                                                                                                                                                                                              false

                                                                                                                                                                                                                                                                                                                                                                                                                            interface RouteConflictPolicy

                                                                                                                                                                                                                                                                                                                                                                                                                            interface RouteConflictPolicy {}
                                                                                                                                                                                                                                                                                                                                                                                                                            • Per-kind policy for overlapping routes detected at bootstrap. duplicate covers identical (method, path, host, version) registrations. shadow covers patterns that can match the same request (for example /users/me vs /users/:id). Each kind defaults to 'off'.

                                                                                                                                                                                                                                                                                                                                                                                                                            property duplicate

                                                                                                                                                                                                                                                                                                                                                                                                                            duplicate?: RouteConflictPolicyLevel;

                                                                                                                                                                                                                                                                                                                                                                                                                              property shadow

                                                                                                                                                                                                                                                                                                                                                                                                                              shadow?: RouteConflictPolicyLevel;

                                                                                                                                                                                                                                                                                                                                                                                                                                interface RouteParamMetadata

                                                                                                                                                                                                                                                                                                                                                                                                                                interface RouteParamMetadata {}

                                                                                                                                                                                                                                                                                                                                                                                                                                  property data

                                                                                                                                                                                                                                                                                                                                                                                                                                  data?: ParamData;

                                                                                                                                                                                                                                                                                                                                                                                                                                    property index

                                                                                                                                                                                                                                                                                                                                                                                                                                    index: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface RpcExceptionFilter

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface RpcExceptionFilter<T = any, R = any> {}
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Interface describing implementation of an RPC exception filter.

                                                                                                                                                                                                                                                                                                                                                                                                                                        See Also

                                                                                                                                                                                                                                                                                                                                                                                                                                        • [Exception Filters](https://docs.nestjs.com/microservices/exception-filters)

                                                                                                                                                                                                                                                                                                                                                                                                                                      method catch

                                                                                                                                                                                                                                                                                                                                                                                                                                      catch: (exception: T, host: ArgumentsHost) => Observable<R>;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Method to implement a custom (microservice) exception filter.

                                                                                                                                                                                                                                                                                                                                                                                                                                        Parameter exception

                                                                                                                                                                                                                                                                                                                                                                                                                                        the type (class) of the exception being handled

                                                                                                                                                                                                                                                                                                                                                                                                                                        Parameter host

                                                                                                                                                                                                                                                                                                                                                                                                                                        used to access an array of arguments for the in-flight message

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface ScopeOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface ScopeOptions {}
                                                                                                                                                                                                                                                                                                                                                                                                                                      • See Also

                                                                                                                                                                                                                                                                                                                                                                                                                                        • [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes)

                                                                                                                                                                                                                                                                                                                                                                                                                                      property durable

                                                                                                                                                                                                                                                                                                                                                                                                                                      durable?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Flags provider as durable. This flag can be used in combination with custom context id factory strategy to construct lazy DI subtrees.

                                                                                                                                                                                                                                                                                                                                                                                                                                        This flag can be used only in conjunction with scope = Scope.REQUEST.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property scope

                                                                                                                                                                                                                                                                                                                                                                                                                                      scope?: Scope;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Specifies the lifetime of an injected Provider or Controller.

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface SecurityHeadersOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface SecurityHeadersOptions {}
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Options for app.useSecurityHeaders().

                                                                                                                                                                                                                                                                                                                                                                                                                                        Each key controls one header and accepts false to leave that header out, true for its default value (the same defaults as helmet 8), or an object to configure it. Option names match helmet's, so existing helmet configurations carry over, except for helmet's legacy aliases (hsts, frameguard, ...). Unknown options are rejected.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property contentSecurityPolicy

                                                                                                                                                                                                                                                                                                                                                                                                                                      contentSecurityPolicy?: boolean | ContentSecurityPolicyOptions;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Content-Security-Policy. Default: `default-src 'self'; base-uri 'self'; font-src 'self' https: data:; form-action 'self'; frame-ancestors 'self'; img-src 'self' data:; object-src 'none'; script-src 'self'; script-src-attr 'none'; style-src 'self' https: 'unsafe-inline'; upgrade-insecure-requests (serialized without spaces after ;`).

                                                                                                                                                                                                                                                                                                                                                                                                                                      property crossOriginEmbedderPolicy

                                                                                                                                                                                                                                                                                                                                                                                                                                      crossOriginEmbedderPolicy?:
                                                                                                                                                                                                                                                                                                                                                                                                                                      | boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                      | {
                                                                                                                                                                                                                                                                                                                                                                                                                                      policy?: 'require-corp' | 'credentialless' | 'unsafe-none';
                                                                                                                                                                                                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Cross-Origin-Embedder-Policy. Not sent by default; true sends require-corp.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property crossOriginOpenerPolicy

                                                                                                                                                                                                                                                                                                                                                                                                                                      crossOriginOpenerPolicy?:
                                                                                                                                                                                                                                                                                                                                                                                                                                      | boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                      | {
                                                                                                                                                                                                                                                                                                                                                                                                                                      policy?:
                                                                                                                                                                                                                                                                                                                                                                                                                                      | 'same-origin'
                                                                                                                                                                                                                                                                                                                                                                                                                                      | 'same-origin-allow-popups'
                                                                                                                                                                                                                                                                                                                                                                                                                                      | 'noopener-allow-popups'
                                                                                                                                                                                                                                                                                                                                                                                                                                      | 'unsafe-none';
                                                                                                                                                                                                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Cross-Origin-Opener-Policy. Default: same-origin.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property crossOriginResourcePolicy

                                                                                                                                                                                                                                                                                                                                                                                                                                      crossOriginResourcePolicy?:
                                                                                                                                                                                                                                                                                                                                                                                                                                      | boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                      | {
                                                                                                                                                                                                                                                                                                                                                                                                                                      policy?: 'same-origin' | 'same-site' | 'cross-origin';
                                                                                                                                                                                                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Cross-Origin-Resource-Policy. Default: same-origin.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property originAgentCluster

                                                                                                                                                                                                                                                                                                                                                                                                                                      originAgentCluster?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Origin-Agent-Cluster: ?1.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property referrerPolicy

                                                                                                                                                                                                                                                                                                                                                                                                                                      referrerPolicy?:
                                                                                                                                                                                                                                                                                                                                                                                                                                      | boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                      | {
                                                                                                                                                                                                                                                                                                                                                                                                                                      policy?: ReferrerPolicyToken | readonly ReferrerPolicyToken[];
                                                                                                                                                                                                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Referrer-Policy. Default: no-referrer. A list is sent as a fallback chain (the browser uses the last one it supports).

                                                                                                                                                                                                                                                                                                                                                                                                                                      property strictTransportSecurity

                                                                                                                                                                                                                                                                                                                                                                                                                                      strictTransportSecurity?:
                                                                                                                                                                                                                                                                                                                                                                                                                                      | boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                      | {
                                                                                                                                                                                                                                                                                                                                                                                                                                      /** In seconds. @default 31536000 (365 days) */
                                                                                                                                                                                                                                                                                                                                                                                                                                      maxAge?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                      /** @default true */
                                                                                                                                                                                                                                                                                                                                                                                                                                      includeSubDomains?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                      /** @default false */
                                                                                                                                                                                                                                                                                                                                                                                                                                      preload?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Strict-Transport-Security. Default: `max-age=31536000; includeSubDomains`. Browsers ignore it over plain HTTP.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property xContentTypeOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                      xContentTypeOptions?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • X-Content-Type-Options: nosniff.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property xDnsPrefetchControl

                                                                                                                                                                                                                                                                                                                                                                                                                                      xDnsPrefetchControl?:
                                                                                                                                                                                                                                                                                                                                                                                                                                      | boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                      | {
                                                                                                                                                                                                                                                                                                                                                                                                                                      allow?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                                                                                                                                                                                                      • X-DNS-Prefetch-Control. Default: off; { allow: true } sends on.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property xDownloadOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                      xDownloadOptions?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • X-Download-Options: noopen.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property xFrameOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                      xFrameOptions?:
                                                                                                                                                                                                                                                                                                                                                                                                                                      | boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                      | {
                                                                                                                                                                                                                                                                                                                                                                                                                                      action?: 'deny' | 'sameorigin';
                                                                                                                                                                                                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                                                                                                                                                                                                      • X-Frame-Options. Default: SAMEORIGIN. Superseded by the CSP frame-ancestors directive, kept for older browsers.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property xPermittedCrossDomainPolicies

                                                                                                                                                                                                                                                                                                                                                                                                                                      xPermittedCrossDomainPolicies?:
                                                                                                                                                                                                                                                                                                                                                                                                                                      | boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                      | {
                                                                                                                                                                                                                                                                                                                                                                                                                                      permittedPolicies?: 'none' | 'master-only' | 'by-content-type' | 'all';
                                                                                                                                                                                                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                                                                                                                                                                                                      • X-Permitted-Cross-Domain-Policies. Default: none.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property xPoweredBy

                                                                                                                                                                                                                                                                                                                                                                                                                                      xPoweredBy?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Removes the X-Powered-By header (on Express, also disables the x-powered-by setting). false leaves it untouched.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property xXssProtection

                                                                                                                                                                                                                                                                                                                                                                                                                                      xXssProtection?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • X-XSS-Protection: 0, which disables the legacy XSS auditor of old browsers (a source of vulnerabilities itself).

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface StandardSchemaSerializerContextOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface StandardSchemaSerializerContextOptions {}
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Options for the StandardSchemaSerializerInterceptor, passed via @SerializeOptions({ schema }).

                                                                                                                                                                                                                                                                                                                                                                                                                                      property schema

                                                                                                                                                                                                                                                                                                                                                                                                                                      schema?: StandardSchemaV1;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • A standard schema to use for serialization. Used by StandardSchemaSerializerInterceptor to validate/transform the response.

                                                                                                                                                                                                                                                                                                                                                                                                                                      property validateOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                      validateOptions?: StandardSchemaV1.Options;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Optional options forwarded to the schema's ~standard.validate() call.

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface StandardSchemaSerializerInterceptorOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface StandardSchemaSerializerInterceptorOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                                                      property schema

                                                                                                                                                                                                                                                                                                                                                                                                                                      schema?: StandardSchemaV1;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • A default standard schema to use for serialization when no schema is provided via @SerializeOptions().

                                                                                                                                                                                                                                                                                                                                                                                                                                      property validateOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                      validateOptions?: StandardSchemaV1.Options;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Default options forwarded to the schema's ~standard.validate() call. Can be overridden per-handler via @SerializeOptions({ validateOptions }).

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface StandardSchemaValidationPipeOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface StandardSchemaValidationPipeOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                                                      property errorHttpStatusCode

                                                                                                                                                                                                                                                                                                                                                                                                                                      errorHttpStatusCode?: ErrorHttpStatusCode;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • The HTTP status code to be used in the response when the validation fails. HttpStatus.BAD_REQUEST

                                                                                                                                                                                                                                                                                                                                                                                                                                      property exceptionFactory

                                                                                                                                                                                                                                                                                                                                                                                                                                      exceptionFactory?: (issues: readonly StandardSchemaV1.Issue[]) => any;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • A factory function that returns an exception object to be thrown if validation fails.

                                                                                                                                                                                                                                                                                                                                                                                                                                        Parameter issues

                                                                                                                                                                                                                                                                                                                                                                                                                                        The issues returned by the standard schema validation

                                                                                                                                                                                                                                                                                                                                                                                                                                        Returns

                                                                                                                                                                                                                                                                                                                                                                                                                                        The exception object

                                                                                                                                                                                                                                                                                                                                                                                                                                      property transform

                                                                                                                                                                                                                                                                                                                                                                                                                                      transform?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • If true, the pipe will return the value produced by the schema (which may differ from the input if the schema coerces/transforms values). If false, the original input value is returned after successful validation. true

                                                                                                                                                                                                                                                                                                                                                                                                                                      property validateCustomDecorators

                                                                                                                                                                                                                                                                                                                                                                                                                                      validateCustomDecorators?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • If true, the pipe will also validate parameters decorated with custom decorators (created with createParamDecorator). When false, custom parameters are skipped. false

                                                                                                                                                                                                                                                                                                                                                                                                                                      property validateOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                      validateOptions?: Record<string, unknown>;
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Options to pass to the standard schema validate function. These options are forwarded as the second argument to the schema's ~standard.validate method.

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface Type

                                                                                                                                                                                                                                                                                                                                                                                                                                      interface Type<T = any> extends Function {}

                                                                                                                                                                                                                                                                                                                                                                                                                                        construct signature

                                                                                                                                                                                                                                                                                                                                                                                                                                        new (...args: any[]): T;

                                                                                                                                                                                                                                                                                                                                                                                                                                          interface ValidationError

                                                                                                                                                                                                                                                                                                                                                                                                                                          interface ValidationError {}
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Validation error description.

                                                                                                                                                                                                                                                                                                                                                                                                                                            See Also

                                                                                                                                                                                                                                                                                                                                                                                                                                            • https://github.com/typestack/class-validator

                                                                                                                                                                                                                                                                                                                                                                                                                                              class-validator@0.13.0

                                                                                                                                                                                                                                                                                                                                                                                                                                          property children

                                                                                                                                                                                                                                                                                                                                                                                                                                          children?: ValidationError[];
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Contains all nested validation errors of the property.

                                                                                                                                                                                                                                                                                                                                                                                                                                          property constraints

                                                                                                                                                                                                                                                                                                                                                                                                                                          constraints?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                          [type: string]: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                          };
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Constraints that failed validation with error messages.

                                                                                                                                                                                                                                                                                                                                                                                                                                          property contexts

                                                                                                                                                                                                                                                                                                                                                                                                                                          contexts?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                          [type: string]: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                          };
                                                                                                                                                                                                                                                                                                                                                                                                                                          • A transient set of data passed through to the validation result for response mapping

                                                                                                                                                                                                                                                                                                                                                                                                                                          property property

                                                                                                                                                                                                                                                                                                                                                                                                                                          property: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Object's property that hasn't passed validation.

                                                                                                                                                                                                                                                                                                                                                                                                                                          property target

                                                                                                                                                                                                                                                                                                                                                                                                                                          target?: Record<string, any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Object that was validated.

                                                                                                                                                                                                                                                                                                                                                                                                                                            OPTIONAL - configurable via the ValidatorOptions.validationError.target option

                                                                                                                                                                                                                                                                                                                                                                                                                                          property value

                                                                                                                                                                                                                                                                                                                                                                                                                                          value?: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Value that haven't pass a validation.

                                                                                                                                                                                                                                                                                                                                                                                                                                            OPTIONAL - configurable via the ValidatorOptions.validationError.value option

                                                                                                                                                                                                                                                                                                                                                                                                                                          interface ValidationPipeOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                          interface ValidationPipeOptions extends ValidatorOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                                                          property disableErrorMessages

                                                                                                                                                                                                                                                                                                                                                                                                                                          disableErrorMessages?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                            property errorFormat

                                                                                                                                                                                                                                                                                                                                                                                                                                            errorFormat?: ValidationErrorFormat;
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Specifies the format of validation error messages. - 'list': Returns an array of error message strings (default). The response message is string[]. - 'grouped': Returns an object with property paths as keys and arrays of unmodified error messages as values. The response message is Record<string, string[]>. Custom messages defined in validation decorators (e.g., @IsNotEmpty({ message: 'Name is required' })) are preserved without parent path prefixes.

                                                                                                                                                                                                                                                                                                                                                                                                                                              Remarks

                                                                                                                                                                                                                                                                                                                                                                                                                                              When using 'grouped', the message property in the error response changes from string[] to Record<string, string[]>. If you have exception filters or interceptors that assume message is always an array, they will need to be updated.

                                                                                                                                                                                                                                                                                                                                                                                                                                            property errorHttpStatusCode

                                                                                                                                                                                                                                                                                                                                                                                                                                            errorHttpStatusCode?: ErrorHttpStatusCode;

                                                                                                                                                                                                                                                                                                                                                                                                                                              property exceptionFactory

                                                                                                                                                                                                                                                                                                                                                                                                                                              exceptionFactory?: (errors: ValidationError[]) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                property expectedType

                                                                                                                                                                                                                                                                                                                                                                                                                                                expectedType?: Type<any>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                  property transform

                                                                                                                                                                                                                                                                                                                                                                                                                                                  transform?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                    property transformerPackage

                                                                                                                                                                                                                                                                                                                                                                                                                                                    transformerPackage?: TransformerPackage;

                                                                                                                                                                                                                                                                                                                                                                                                                                                      property transformOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                      transformOptions?: ClassTransformOptions;

                                                                                                                                                                                                                                                                                                                                                                                                                                                        property validateCustomDecorators

                                                                                                                                                                                                                                                                                                                                                                                                                                                        validateCustomDecorators?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                          property validatorPackage

                                                                                                                                                                                                                                                                                                                                                                                                                                                          validatorPackage?: ValidatorPackage;

                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface ValueProvider

                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface ValueProvider<T = any> {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Interface defining a *Value* type provider.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              For example:

                                                                                                                                                                                                                                                                                                                                                                                                                                                              const connectionProvider = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                              provide: 'CONNECTION',
                                                                                                                                                                                                                                                                                                                                                                                                                                                              useValue: connection,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                                                                                                              See Also

                                                                                                                                                                                                                                                                                                                                                                                                                                                              • [Value providers](https://docs.nestjs.com/fundamentals/custom-providers#value-providers-usevalue)

                                                                                                                                                                                                                                                                                                                                                                                                                                                            property inject

                                                                                                                                                                                                                                                                                                                                                                                                                                                            inject?: never;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • This option is only available on factory providers!

                                                                                                                                                                                                                                                                                                                                                                                                                                                              See Also

                                                                                                                                                                                                                                                                                                                                                                                                                                                              • [Use factory](https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory)

                                                                                                                                                                                                                                                                                                                                                                                                                                                            property provide

                                                                                                                                                                                                                                                                                                                                                                                                                                                            provide: InjectionToken;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Injection token

                                                                                                                                                                                                                                                                                                                                                                                                                                                            property useValue

                                                                                                                                                                                                                                                                                                                                                                                                                                                            useValue: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Instance of a provider to be injected.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface WebSocketAdapter

                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface WebSocketAdapter<TServer = any, TClient = any, TOptions = any> {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                            method bindClientConnect

                                                                                                                                                                                                                                                                                                                                                                                                                                                            bindClientConnect: (server: TServer, callback: Function) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                              method bindClientDisconnect

                                                                                                                                                                                                                                                                                                                                                                                                                                                              bindClientDisconnect: (client: TClient, callback: Function) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                method bindMessageHandlers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                bindMessageHandlers: (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                client: TClient,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                handlers: WsMessageHandler[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                transform: (data: any) => Observable<any>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                ) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  method close

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  close: (server: TServer) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    method create

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    create: (port: number, options?: TOptions) => TServer;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface WsExceptionFilter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface WsExceptionFilter<T = any> {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Interface describing implementation of a Web Sockets exception filter.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        See Also

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • [Exception Filters](https://docs.nestjs.com/websockets/exception-filters)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      method catch

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      catch: (exception: T, host: ArgumentsHost) => any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Method to implement a custom (web sockets) exception filter.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Parameter exception

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        the type (class) of the exception being handled

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Parameter host

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        used to access an array of arguments for the in-flight message catch(exception: T, host: ArgumentsHost): any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface WsMessageHandler

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface WsMessageHandler<T = string> {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property callback

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      callback: (...args: any[]) => Observable<any> | Promise<any>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property isAckHandledManually

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        isAckHandledManually: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property message

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          message: T;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Enums

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            enum HttpStatus

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            enum HttpStatus {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            CONTINUE = 100,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            SWITCHING_PROTOCOLS = 101,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            PROCESSING = 102,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            EARLYHINTS = 103,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            OK = 200,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            CREATED = 201,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ACCEPTED = 202,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NON_AUTHORITATIVE_INFORMATION = 203,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NO_CONTENT = 204,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RESET_CONTENT = 205,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            PARTIAL_CONTENT = 206,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            MULTI_STATUS = 207,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ALREADY_REPORTED = 208,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            CONTENT_DIFFERENT = 210,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            AMBIGUOUS = 300,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            MOVED_PERMANENTLY = 301,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FOUND = 302,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            SEE_OTHER = 303,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NOT_MODIFIED = 304,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TEMPORARY_REDIRECT = 307,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            PERMANENT_REDIRECT = 308,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            BAD_REQUEST = 400,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            UNAUTHORIZED = 401,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            PAYMENT_REQUIRED = 402,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FORBIDDEN = 403,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NOT_FOUND = 404,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            METHOD_NOT_ALLOWED = 405,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NOT_ACCEPTABLE = 406,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            PROXY_AUTHENTICATION_REQUIRED = 407,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            REQUEST_TIMEOUT = 408,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            CONFLICT = 409,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            GONE = 410,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            LENGTH_REQUIRED = 411,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            PRECONDITION_FAILED = 412,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            PAYLOAD_TOO_LARGE = 413,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            URI_TOO_LONG = 414,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            UNSUPPORTED_MEDIA_TYPE = 415,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            REQUESTED_RANGE_NOT_SATISFIABLE = 416,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            EXPECTATION_FAILED = 417,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            I_AM_A_TEAPOT = 418,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            MISDIRECTED = 421,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            UNPROCESSABLE_ENTITY = 422,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            LOCKED = 423,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FAILED_DEPENDENCY = 424,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            PRECONDITION_REQUIRED = 428,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TOO_MANY_REQUESTS = 429,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            UNRECOVERABLE_ERROR = 456,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            INTERNAL_SERVER_ERROR = 500,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NOT_IMPLEMENTED = 501,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            BAD_GATEWAY = 502,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            SERVICE_UNAVAILABLE = 503,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            GATEWAY_TIMEOUT = 504,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            HTTP_VERSION_NOT_SUPPORTED = 505,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            INSUFFICIENT_STORAGE = 507,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            LOOP_DETECTED = 508,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member ACCEPTED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ACCEPTED = 202

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member ALREADY_REPORTED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ALREADY_REPORTED = 208

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member AMBIGUOUS

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                AMBIGUOUS = 300

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  member BAD_GATEWAY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  BAD_GATEWAY = 502

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member BAD_REQUEST

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    BAD_REQUEST = 400

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member CONFLICT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CONFLICT = 409

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member CONTENT_DIFFERENT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        CONTENT_DIFFERENT = 210

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          member CONTINUE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          CONTINUE = 100

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member CREATED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            CREATED = 201

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member EARLYHINTS

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              EARLYHINTS = 103

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member EXPECTATION_FAILED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                EXPECTATION_FAILED = 417

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  member FAILED_DEPENDENCY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FAILED_DEPENDENCY = 424

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member FORBIDDEN

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FORBIDDEN = 403

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member FOUND

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      FOUND = 302

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member GATEWAY_TIMEOUT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        GATEWAY_TIMEOUT = 504

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          member GONE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          GONE = 410

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member HTTP_VERSION_NOT_SUPPORTED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            HTTP_VERSION_NOT_SUPPORTED = 505

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member I_AM_A_TEAPOT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              I_AM_A_TEAPOT = 418

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member INSUFFICIENT_STORAGE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                INSUFFICIENT_STORAGE = 507

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  member INTERNAL_SERVER_ERROR

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  INTERNAL_SERVER_ERROR = 500

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member LENGTH_REQUIRED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    LENGTH_REQUIRED = 411

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member LOCKED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      LOCKED = 423

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member LOOP_DETECTED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LOOP_DETECTED = 508

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          member METHOD_NOT_ALLOWED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          METHOD_NOT_ALLOWED = 405

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member MISDIRECTED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            MISDIRECTED = 421

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member MOVED_PERMANENTLY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              MOVED_PERMANENTLY = 301

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member MULTI_STATUS

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                MULTI_STATUS = 207

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  member NO_CONTENT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NO_CONTENT = 204

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member NON_AUTHORITATIVE_INFORMATION

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NON_AUTHORITATIVE_INFORMATION = 203

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member NOT_ACCEPTABLE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NOT_ACCEPTABLE = 406

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member NOT_FOUND

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NOT_FOUND = 404

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          member NOT_IMPLEMENTED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NOT_IMPLEMENTED = 501

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member NOT_MODIFIED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NOT_MODIFIED = 304

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member OK

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              OK = 200

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member PARTIAL_CONTENT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                PARTIAL_CONTENT = 206

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  member PAYLOAD_TOO_LARGE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  PAYLOAD_TOO_LARGE = 413

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member PAYMENT_REQUIRED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    PAYMENT_REQUIRED = 402

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member PERMANENT_REDIRECT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      PERMANENT_REDIRECT = 308

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member PRECONDITION_FAILED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        PRECONDITION_FAILED = 412

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          member PRECONDITION_REQUIRED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          PRECONDITION_REQUIRED = 428

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member PROCESSING

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            PROCESSING = 102

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member PROXY_AUTHENTICATION_REQUIRED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              PROXY_AUTHENTICATION_REQUIRED = 407

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member REQUEST_TIMEOUT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                REQUEST_TIMEOUT = 408

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  member REQUESTED_RANGE_NOT_SATISFIABLE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  REQUESTED_RANGE_NOT_SATISFIABLE = 416

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member RESET_CONTENT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RESET_CONTENT = 205

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member SEE_OTHER

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      SEE_OTHER = 303

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member SERVICE_UNAVAILABLE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        SERVICE_UNAVAILABLE = 503

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          member SWITCHING_PROTOCOLS

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          SWITCHING_PROTOCOLS = 101

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member TEMPORARY_REDIRECT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TEMPORARY_REDIRECT = 307

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member TOO_MANY_REQUESTS

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              TOO_MANY_REQUESTS = 429

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member UNAUTHORIZED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                UNAUTHORIZED = 401

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  member UNPROCESSABLE_ENTITY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  UNPROCESSABLE_ENTITY = 422

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member UNRECOVERABLE_ERROR

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    UNRECOVERABLE_ERROR = 456

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member UNSUPPORTED_MEDIA_TYPE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      UNSUPPORTED_MEDIA_TYPE = 415

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member URI_TOO_LONG

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        URI_TOO_LONG = 414

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          enum RequestMethod

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          enum RequestMethod {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          GET = 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          POST = 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          PUT = 2,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          DELETE = 3,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          PATCH = 4,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ALL = 5,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          OPTIONS = 6,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          HEAD = 7,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          SEARCH = 8,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          PROPFIND = 9,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          PROPPATCH = 10,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          MKCOL = 11,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          COPY = 12,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          MOVE = 13,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          LOCK = 14,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          UNLOCK = 15,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          QUERY = 16,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member ALL

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ALL = 5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member COPY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              COPY = 12

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member DELETE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                DELETE = 3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  member GET

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  GET = 0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member HEAD

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    HEAD = 7

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member LOCK

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      LOCK = 14

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member MKCOL

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        MKCOL = 11

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          member MOVE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          MOVE = 13

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member OPTIONS

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            OPTIONS = 6

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member PATCH

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              PATCH = 4

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member POST

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                POST = 1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  member PROPFIND

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  PROPFIND = 9

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member PROPPATCH

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    PROPPATCH = 10

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member PUT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      PUT = 2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member QUERY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        QUERY = 16

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          member SEARCH

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          SEARCH = 8

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member UNLOCK

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            UNLOCK = 15

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              enum Scope

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              enum Scope {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              DEFAULT = 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              TRANSIENT = 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              REQUEST = 2,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member DEFAULT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              DEFAULT = 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • The provider can be shared across multiple classes. The provider lifetime is strictly tied to the application lifecycle. Once the application has bootstrapped, all providers have been instantiated.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member REQUEST

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              REQUEST = 2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • A new instance is instantiated for each request processing pipeline

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member TRANSIENT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              TRANSIENT = 1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • A new private instance of the provider is instantiated for every use

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              enum ShutdownSignal

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              enum ShutdownSignal {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGHUP = 'SIGHUP',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGINT = 'SIGINT',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGQUIT = 'SIGQUIT',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGILL = 'SIGILL',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGTRAP = 'SIGTRAP',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGABRT = 'SIGABRT',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGBUS = 'SIGBUS',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGFPE = 'SIGFPE',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGSEGV = 'SIGSEGV',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGUSR2 = 'SIGUSR2',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGTERM = 'SIGTERM',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • System signals which shut down a process

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member SIGABRT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGABRT = 'SIGABRT'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member SIGBUS

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                SIGBUS = 'SIGBUS'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  member SIGFPE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  SIGFPE = 'SIGFPE'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member SIGHUP

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    SIGHUP = 'SIGHUP'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member SIGILL

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      SIGILL = 'SIGILL'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member SIGINT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        SIGINT = 'SIGINT'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          member SIGQUIT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          SIGQUIT = 'SIGQUIT'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member SIGSEGV

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            SIGSEGV = 'SIGSEGV'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member SIGTERM

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SIGTERM = 'SIGTERM'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member SIGTRAP

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                SIGTRAP = 'SIGTRAP'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  member SIGUSR2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  SIGUSR2 = 'SIGUSR2'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    enum VersioningType

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    enum VersioningType {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    URI = 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    HEADER = 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    MEDIA_TYPE = 2,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    CUSTOM = 3,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member CUSTOM

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    CUSTOM = 3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member HEADER

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      HEADER = 1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member MEDIA_TYPE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        MEDIA_TYPE = 2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          member URI

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          URI = 0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Type Aliases

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigurableModuleCls

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigurableModuleCls<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ModuleOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            MethodKey extends string = typeof DEFAULT_METHOD_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FactoryClassMethodKey extends string = typeof DEFAULT_FACTORY_CLASS_METHOD_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ExtraModuleDefinitionOptions = {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            new (): any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            } & Record<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            `${MethodKey}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (options: ModuleOptions & Partial<ExtraModuleDefinitionOptions>) => DynamicModule
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > &
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Record<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            `${MethodKey}Async`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            options: ConfigurableModuleAsyncOptions<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ModuleOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FactoryClassMethodKey
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > &
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Partial<ExtraModuleDefinitionOptions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ) => DynamicModule
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Class that represents a blueprint/prototype for a configurable Nest module. This class provides static methods for constructing dynamic modules. Their names can be controlled through the "MethodKey" type argument.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigurableModuleOptionsFactory

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigurableModuleOptionsFactory<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ModuleOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            FactoryClassMethodKey extends string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > = Record<`${FactoryClassMethodKey}`, () => Promise<ModuleOptions> | ModuleOptions>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Interface that must be implemented by the module options factory class. Method key varies depending on the "FactoryClassMethodKey" type argument.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type ContentSecurityPolicyDirectiveValue

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type ContentSecurityPolicyDirectiveValue =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | readonly string[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Value of a Content-Security-Policy directive:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              - a string or a list of strings: the directive's source expressions (keywords must be quoted, e.g. "'self'"); - true or an empty list: a directive without value (e.g. upgrade-insecure-requests); - null or false: removes the directive, including a default one.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type ContextType

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type ContextType = 'http' | 'ws' | 'rpc';

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type CustomDecorator

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type CustomDecorator<TKey = string> = MethodDecorator &
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ClassDecorator & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              KEY: TKey;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type FileTypeValidatorOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type FileTypeValidatorOptions = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * Expected file type(s) for validation. Can be a string (MIME type)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * or a regular expression to match multiple types.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * @example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * // Match a single MIME type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * fileType: 'image/png'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * @example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * // Match multiple types using RegExp
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * fileType: /^image\/(png|jpeg)$/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                fileType: string | RegExp;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * Custom error message displayed when file type validation fails
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * Can be provided as a static string, or as a factory function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * that receives the validation context (file and validator configuration)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * and returns a dynamic error message.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * @example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * // Static message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * new FileTypeValidator({ fileType: 'image/png', errorMessage: 'Only PNG allowed' })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * @example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * // Dynamic message based on file object and validator configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * new FileTypeValidator({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * fileType: 'image/png',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * errorMessage: ctx => `Received file type '${ctx.file?.mimetype}', but expected '${ctx.config.fileType}'`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                errorMessage?: string | ((ctx: FileTypeValidatorContext) => string);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * If `true`, the validator will skip the magic numbers validation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * This can be useful when you can't identify some files as there are no common magic numbers available for some file types.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * @default false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                skipMagicNumbersValidation?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * If `true`, and magic number check fails, fallback to mimetype comparison.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * @default false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                fallbackToMimetype?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * If `true`, replaces the client-provided mimetype with the mimetype
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * detected from the file content using magic number validation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * @default false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                overrideMimeType?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type HttpExceptionBodyMessage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type HttpExceptionBodyMessage = string | string[] | number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type InjectableOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type InjectableOptions = ScopeOptions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Defines the injection scope.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      See Also

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type InjectionToken

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type InjectionToken<T = any> = string | symbol | Type<T> | Abstract<T> | Function;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type LogLevel

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type LogLevel = (typeof LOG_LEVELS)[number];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type MaxFileSizeValidatorOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type MaxFileSizeValidatorOptions = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * Maximum allowed file size in bytes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    maxSize: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * @deprecated Use `errorMessage` instead.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    message?: string | ((maxSize: number) => string);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * Custom error message returned when file size validation fails.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * Can be provided as a static string, or as a factory function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * that receives the validation context (file and validator configuration)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * and returns a dynamic error message.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * @example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * // Static message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * new MaxFileSizeValidator({ maxSize: 1000, errorMessage: 'File size exceeds the limit' })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * @example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * // Dynamic message based on file object and validator configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * new MaxFileSizeValidator({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * maxSize: 1000,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * errorMessage: ctx => `Received file size is ${ctx.file?.size}, but it must be smaller than ${ctx.config.maxSize}.`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    errorMessage?: string | ((ctx: MaxFileSizeValidatorContext) => string);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type OptionalFactoryDependency

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type OptionalFactoryDependency = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      token: InjectionToken;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      optional: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type ParamData

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type ParamData = object | string | number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type ParamDecoratorEnhancer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type ParamDecoratorEnhancer = ParameterDecorator;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type Paramtype

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type Paramtype = 'body' | 'query' | 'param' | 'custom';

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type ParseArrayOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type ParseArrayOptions = ParseArrayPipeOptions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Use ParseArrayPipeOptions instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type Provider

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type Provider<T = any> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Type<any>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | ClassProvider<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | ValueProvider<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | FactoryProvider<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | ExistingProvider<T>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type RawBodyRequest

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type RawBodyRequest<T> = T & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          rawBody?: Buffer;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type ReferrerPolicyToken

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type ReferrerPolicyToken =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | ''
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 'no-referrer'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 'no-referrer-when-downgrade'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 'same-origin'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 'origin'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 'strict-origin'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 'origin-when-cross-origin'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 'strict-origin-when-cross-origin'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 'unsafe-url';

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type RouteConflictPolicyLevel

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type RouteConflictPolicyLevel = 'off' | 'warn' | 'error';
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Severity level applied to a single kind of route conflict detected at bootstrap.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type RouteResolutionStrategy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type RouteResolutionStrategy = 'declaration' | 'specificity';
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Order in which routes are registered on the underlying HTTP adapter. 'specificity' registers literal segments before parametric and wildcard ones on order-sensitive adapters (such as Express). Defaults to 'declaration'.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type UUIDVersion

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type UUIDVersion =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | '1'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | '2'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | '3'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | '4'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | '5'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | '6'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | '7'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | '8'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 4
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 7
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | 'all';

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type ValidationErrorFormat

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type ValidationErrorFormat = 'list' | 'grouped';

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type VersioningOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type VersioningOptions = VersioningCommonOptions &
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | HeaderVersioningOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | UriVersioningOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | MediaTypeVersioningOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | CustomVersioningOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          );

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Package Files (131)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Dependencies (6)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Dev Dependencies (0)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No dev dependencies.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Peer Dependencies (4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Badge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@nestjs/common.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Markdown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@nestjs/common)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTML
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <a href="https://www.jsdocs.io/package/@nestjs/common"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>