Options
All
  • Public
  • Public/Protected
  • All
Menu

@nestjs/common

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

ClientProviderOptions

ClientProviderOptions: ClientOptions & object

CloseableClient

CloseableClient: Closeable & ClientProxy

Constructor

Constructor: object

Type declaration

CustomClass

CustomClass: CustomProvider & object

CustomFactory

CustomFactory: CustomProvider & object

CustomOrigin

CustomOrigin: function

Type declaration

    • (requestOrigin: string, callback: function): void
    • Parameters

      • requestOrigin: string
      • callback: function
          • (err: Error | null, allow?: boolean): void
          • Parameters

            • err: Error | null
            • Optional allow: boolean

            Returns void

      Returns void

CustomParamFactory

CustomParamFactory: function

Type declaration

    • (data: TData, req: TRequest): TResult
    • Parameters

      • data: TData
      • req: TRequest

      Returns TResult

CustomValue

CustomValue: CustomProvider & object

ErrorHandler

ErrorHandler: function

Type declaration

    • (error: any, req: TRequest, res: TResponse, next?: Function): any
    • Parameters

      • error: any
      • req: TRequest
      • res: TResponse
      • Optional next: Function

      Returns any

InjectorDependency

InjectorDependency: Type<any> | Function | string | symbol

The type of an injectable dependency

MicroserviceOptions

MicroserviceOptions: GrpcOptions | TcpOptions | RedisOptions | NatsOptions | MqttOptions | RmqOptions | CustomStrategy

MulterInstance

MulterInstance: any

OpaqueToken

OpaqueToken: string | symbol | Type<any> | Function | Abstract<any>

ParamData

ParamData: any | string | number

ParamDecoratorEnhancer

ParamDecoratorEnhancer: ParameterDecorator

Paramtype

Paramtype: "body" | "query" | "param" | "custom"

Provider

Provider: Type<any> | ClassProvider<T> | ValueProvider<T> | FactoryProvider<T>

ProviderMetatype

QoS

QoS: 0 | 1 | 2

RequestHandler

RequestHandler: function

Type declaration

    • (req: TRequest, res: TResponse, next?: Function): any
    • Parameters

      • req: TRequest
      • res: TResponse
      • Optional next: Function

      Returns any

RouterProxyCallback

RouterProxyCallback: function

Type declaration

    • <TRequest, TResponse>(req?: TRequest, res?: TResponse, next?: function): void
    • Type parameters

      • TRequest

      • TResponse

      Parameters

      • Optional req: TRequest
      • Optional res: TResponse
      • Optional next: function
          • (): void
          • Returns void

      Returns void

Transform

Transform: function

Type declaration

Variables

Const APP_FILTER

APP_FILTER: "APP_FILTER" = "APP_FILTER"

Const APP_GUARD

APP_GUARD: "APP_GUARD" = "APP_GUARD"

Const APP_INTERCEPTOR

APP_INTERCEPTOR: "APP_INTERCEPTOR" = "APP_INTERCEPTOR"

Const APP_PIPE

APP_PIPE: "APP_PIPE" = "APP_PIPE"

Const AXIOS_INSTANCE_TOKEN

AXIOS_INSTANCE_TOKEN: "AXIOS_INSTANCE_TOKEN" = "AXIOS_INSTANCE_TOKEN"

Const All

All: (Anonymous function) = createMappingDecorator(RequestMethod.ALL)

Routes all HTTP requests to the specified path.

Const CACHE_KEY_METADATA

CACHE_KEY_METADATA: "cache_module:cache_key" = "cache_module:cache_key"

Const CACHE_MANAGER

CACHE_MANAGER: "CACHE_MANAGER" = "CACHE_MANAGER"

Const CACHE_MODULE_OPTIONS

CACHE_MODULE_OPTIONS: "CACHE_MODULE_OPTIONS" = "CACHE_MODULE_OPTIONS"

Const CANCEL_EVENT

CANCEL_EVENT: "cancelled" = "cancelled"

Const CLASS_SERIALIZER_OPTIONS

CLASS_SERIALIZER_OPTIONS: "class_serializer:options" = "class_serializer:options"

Const CLIENT_CONFIGURATION_METADATA

CLIENT_CONFIGURATION_METADATA: "microservices:client" = "microservices:client"

Const CLIENT_METADATA

CLIENT_METADATA: "microservices:is_client_instance" = "microservices:is_client_instance"

Const CLOSE_EVENT

CLOSE_EVENT: "close" = "close"

Const CONNECTION_EVENT

CONNECTION_EVENT: "connection" = "connection"

Const CONNECT_EVENT

CONNECT_EVENT: "connect" = "connect"

Const CONN_ERR

CONN_ERR: "CONN_ERR" = "CONN_ERR"

Const CUSTOM_ROUTE_AGRS_METADATA

CUSTOM_ROUTE_AGRS_METADATA: "__customRouteArgs__" = "__customRouteArgs__"

Const DATA_EVENT

DATA_EVENT: "data" = "data"

Const DISCONNECTED_RMQ_MESSAGE

DISCONNECTED_RMQ_MESSAGE: "Disconnected from RMQ. Trying to reconnect." = `Disconnected from RMQ. Trying to reconnect.`

Const DISCONNECT_EVENT

DISCONNECT_EVENT: "disconnect" = "disconnect"

Const Delete

Delete: (Anonymous function) = createMappingDecorator(RequestMethod.DELETE)

Routes HTTP DELETE requests to the specified path.

Const ECONNREFUSED

ECONNREFUSED: "ECONNREFUSED" = "ECONNREFUSED"

Const ERROR_EVENT

ERROR_EVENT: "error" = "error"

Const EXCEPTION_FILTERS_METADATA

EXCEPTION_FILTERS_METADATA: "__exceptionFilters__" = "__exceptionFilters__"

Const FILTER_CATCH_EXCEPTIONS

FILTER_CATCH_EXCEPTIONS: "__filterCatchExceptions__" = "__filterCatchExceptions__"

Const FORBIDDEN_MESSAGE

FORBIDDEN_MESSAGE: "Forbidden resource" = "Forbidden resource"

Const GATEWAY_METADATA

GATEWAY_METADATA: "__isGateway" = "__isGateway"

Const GATEWAY_OPTIONS

GATEWAY_OPTIONS: "__gatewayOptions" = "__gatewayOptions"

Const GATEWAY_SERVER_METADATA

GATEWAY_SERVER_METADATA: "__isSocketServer" = "__isSocketServer"

Const GLOBAL_MODULE_METADATA

GLOBAL_MODULE_METADATA: "__module:global__" = "__module:global__"

Const GRPC_CANCELLED

GRPC_CANCELLED: "Cancelled" = "Cancelled"

Const GRPC_DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH

GRPC_DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH: number = 4 * 1024 * 1024

Const GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH

GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH: number = 4 * 1024 * 1024

Const GRPC_DEFAULT_PROTO_LOADER

GRPC_DEFAULT_PROTO_LOADER: "@grpc/proto-loader" = "@grpc/proto-loader"

Const GRPC_DEFAULT_URL

GRPC_DEFAULT_URL: "localhost:5000" = "localhost:5000"

Const GUARDS_METADATA

GUARDS_METADATA: "__guards__" = "__guards__"

Const Get

Get: (Anonymous function) = createMappingDecorator(RequestMethod.GET)

Routes HTTP GET requests to the specified path.

Const HANDLER_METADATA_SYMBOL

HANDLER_METADATA_SYMBOL: any = Symbol.for('handler_metadata:cache')

Const HEADERS_METADATA

HEADERS_METADATA: "__headers__" = "__headers__"

Const HTTP_ADAPTER_HOST

HTTP_ADAPTER_HOST: "HttpAdapterHost" = "HttpAdapterHost"

Const HTTP_CODE_METADATA

HTTP_CODE_METADATA: "__httpCode__" = "__httpCode__"

Const HTTP_MODULE_ID

HTTP_MODULE_ID: "HTTP_MODULE_ID" = "HTTP_MODULE_ID"

Const HTTP_MODULE_OPTIONS

HTTP_MODULE_OPTIONS: "HTTP_MODULE_OPTIONS" = "HTTP_MODULE_OPTIONS"

Const Head

Head: (Anonymous function) = createMappingDecorator(RequestMethod.HEAD)

Routes HTTP HEAD requests to the specified path.

Const Headers

Headers: function = createRouteParamDecorator(RouteParamtypes.HEADERS)

Type declaration

    • (property?: string): ParameterDecorator
    • Parameters

      • Optional property: string

      Returns ParameterDecorator

Const INSTANCE_ID_SYMBOL

INSTANCE_ID_SYMBOL: any = Symbol.for('instance_metadata:id')

Const INSTANCE_METADATA_SYMBOL

INSTANCE_METADATA_SYMBOL: any = Symbol.for('instance_metadata:cache')

Const INTERCEPTORS_METADATA

INTERCEPTORS_METADATA: "__interceptors__" = "__interceptors__"

Const INVALID_EXCEPTION_FILTER

INVALID_EXCEPTION_FILTER: "Invalid exception filters (@UseFilters())." = `Invalid exception filters (@UseFilters()).`

Const INVALID_MIDDLEWARE_CONFIGURATION

INVALID_MIDDLEWARE_CONFIGURATION: "An invalid middleware configuration has been passed inside the module 'configure()' method." = `An invalid middleware configuration has been passed inside the module 'configure()' method.`

Const MESSAGE_EVENT

MESSAGE_EVENT: "message" = "message"

Const MESSAGE_MAPPING_METADATA

MESSAGE_MAPPING_METADATA: "__isMessageMapping" = "__isMessageMapping"

Const MESSAGE_METADATA

MESSAGE_METADATA: "message" = "message"

Const METHOD_METADATA

METHOD_METADATA: "method" = "method"

Const MICROSERVICES_PACKAGE_NOT_FOUND_EXCEPTION

MICROSERVICES_PACKAGE_NOT_FOUND_EXCEPTION: "Unable to load @nestjs/microservices package. (Please make sure that it's already installed.)" = `Unable to load @nestjs/microservices package. (Please make sure that it's already installed.)`

Const MODULE_PATH

MODULE_PATH: "__module_path__" = "__module_path__"

Const MQTT_DEFAULT_URL

MQTT_DEFAULT_URL: "mqtt://localhost:1883" = "mqtt://localhost:1883"

Const MULTER_MODULE_OPTIONS

MULTER_MODULE_OPTIONS: "MULTER_MODULE_OPTIONS" = "MULTER_MODULE_OPTIONS"

Const NAMESPACE_METADATA

NAMESPACE_METADATA: "namespace" = "namespace"

Const NATS_DEFAULT_URL

NATS_DEFAULT_URL: "nats://localhost:4222" = "nats://localhost:4222"

Const NO_EVENT_HANDLER

NO_EVENT_HANDLER: "There is no matching event handler defined in the remote service." = `There is no matching event handler defined in the remote service.`

Const NO_MESSAGE_HANDLER

NO_MESSAGE_HANDLER: "There is no matching message handler defined in the remote service." = `There is no matching message handler defined in the remote service.`

Const NestFactory

NestFactory: NestFactoryStatic = new NestFactoryStatic()

Const Next

Next: function = createRouteParamDecorator(RouteParamtypes.NEXT,)

Type declaration

    • (): ParameterDecorator
    • Returns ParameterDecorator

Const OPTIONAL_DEPS_METADATA

OPTIONAL_DEPS_METADATA: "optional:paramtypes" = "optional:paramtypes"

Const OPTIONAL_PROPERTY_DEPS_METADATA

OPTIONAL_PROPERTY_DEPS_METADATA: "optional:properties_metadata" = "optional:properties_metadata"

Const Options

Options: (Anonymous function) = createMappingDecorator(RequestMethod.OPTIONS)

Routes HTTP OPTIONS requests to the specified path.

Const PARAMTYPES_METADATA

PARAMTYPES_METADATA: "design:paramtypes" = "design:paramtypes"

Const PATH_METADATA

PATH_METADATA: "path" = "path"

Const PATTERN_HANDLER_METADATA

PATTERN_HANDLER_METADATA: "microservices:handler_type" = "microservices:handler_type"

Const PATTERN_METADATA

PATTERN_METADATA: "microservices:pattern" = "microservices:pattern"

Const PIPES_METADATA

PIPES_METADATA: "__pipes__" = "__pipes__"

Const PORT_METADATA

PORT_METADATA: "port" = "port"

Const PROPERTY_DEPS_METADATA

PROPERTY_DEPS_METADATA: "self:properties_metadata" = "self:properties_metadata"

Const Patch

Patch: (Anonymous function) = createMappingDecorator(RequestMethod.PATCH)

Routes HTTP PATCH requests to the specified path.

Const Post

Post: (Anonymous function) = createMappingDecorator(RequestMethod.POST)

Routes HTTP POST requests to the specified path.

Const Put

Put: (Anonymous function) = createMappingDecorator(RequestMethod.PUT)

Routes HTTP PUT requests to the specified path.

Const RABBITMQ_REPLY_QUEUE

RABBITMQ_REPLY_QUEUE: "amq.rabbitmq.reply-to" = "amq.rabbitmq.reply-to"

Const REDIRECT_METADATA

REDIRECT_METADATA: "__redirect__" = "__redirect__"

Const REDIS_DEFAULT_URL

REDIS_DEFAULT_URL: "redis://localhost:6379" = "redis://localhost:6379"

Const REFLECTOR

REFLECTOR: "Reflector" = "Reflector"

Const RENDER_METADATA

RENDER_METADATA: "__renderTemplate__" = "__renderTemplate__"

Const REPLY_QUEUE

REPLY_QUEUE: "amq.rabbitmq.reply-to" = "amq.rabbitmq.reply-to"

Const REQUEST

REQUEST: any = Symbol('REQUEST')

Const ROUTE_ARGS_METADATA

ROUTE_ARGS_METADATA: "__routeArguments__" = "__routeArguments__"

Const RQM_DEFAULT_IS_GLOBAL_PREFETCH_COUNT

RQM_DEFAULT_IS_GLOBAL_PREFETCH_COUNT: false = false

Const RQM_DEFAULT_PREFETCH_COUNT

RQM_DEFAULT_PREFETCH_COUNT: 0 = 0

Const RQM_DEFAULT_QUEUE

RQM_DEFAULT_QUEUE: "default" = "default"

Const RQM_DEFAULT_QUEUE_OPTIONS

RQM_DEFAULT_QUEUE_OPTIONS: object

Type declaration

Const RQM_DEFAULT_URL

RQM_DEFAULT_URL: "amqp://localhost" = "amqp://localhost"

Const Req

Req: function = Request

Type declaration

    • (): ParameterDecorator
    • Returns ParameterDecorator

Const Request

Request: function = createRouteParamDecorator(RouteParamtypes.REQUEST,)

Type declaration

    • (): ParameterDecorator
    • Returns ParameterDecorator

Const Res

Res: function = Response

Type declaration

    • (): ParameterDecorator
    • Returns ParameterDecorator

Const Response

Response: function = createRouteParamDecorator(RouteParamtypes.RESPONSE,)

Type declaration

    • (): ParameterDecorator
    • Returns ParameterDecorator

Const SCOPE_OPTIONS_METADATA

SCOPE_OPTIONS_METADATA: "scope:options" = "scope:options"

Const SELF_DECLARED_DEPS_METADATA

SELF_DECLARED_DEPS_METADATA: "self:paramtypes" = "self:paramtypes"

Const SHARED_MODULE_METADATA

SHARED_MODULE_METADATA: "__module:shared__" = "__module:shared__"

Const STATIC_CONTEXT

STATIC_CONTEXT: ContextId = Object.freeze({id: STATIC_CONTEXT_ID,})

Const STATIC_CONTEXT_ID

STATIC_CONTEXT_ID: 1 = 1

Const SUBSCRIBE

SUBSCRIBE: "subscribe" = "subscribe"

Const Session

Session: function = createRouteParamDecorator(RouteParamtypes.SESSION,)

Type declaration

    • (): ParameterDecorator
    • Returns ParameterDecorator

Const TCP_DEFAULT_HOST

TCP_DEFAULT_HOST: "localhost" = "localhost"

Const TCP_DEFAULT_PORT

TCP_DEFAULT_PORT: 3000 = 3000

Const UNHANDLED_RUNTIME_EXCEPTION

UNHANDLED_RUNTIME_EXCEPTION: "Unhandled Runtime Exception." = `Unhandled Runtime Exception.`

Const UNKNOWN_REQUEST_MAPPING

UNKNOWN_REQUEST_MAPPING: "An invalid controller has been detected. Perhaps, one of your controllers is missing @Controller() decorator." = `An invalid controller has been detected. Perhaps, one of your controllers is missing @Controller() decorator.`

Const UploadedFile

UploadedFile: function = createRouteParamDecorator(RouteParamtypes.FILE)

Type declaration

    • (fileKey?: string): ParameterDecorator
    • Parameters

      • Optional fileKey: string

      Returns ParameterDecorator

Const UploadedFiles

UploadedFiles: function = createRouteParamDecorator(RouteParamtypes.FILES,)

Type declaration

    • (): ParameterDecorator
    • Returns ParameterDecorator

Let classTransformer

classTransformer: any

Let classValidator

classValidator: any

Let grpcPackage

grpcPackage: any

Let grpcProtoLoaderPackage

grpcProtoLoaderPackage: any

Const ip

ip: "127.0.0.1" = "127.0.0.1"

Const logger

logger: any = new Logger('PackageLoader')

Const longPayload

longPayload: object[] = [{_id: '584f17147fce7ca0a8bacfd2',index: 0,guid: '1d127572-0369-45fb-aa2f-e3bb083ac2b2',isActive: true,balance: '$2,926.06',picture: 'http://placehold.it/32x32',age: 26,eyeColor: 'green',name:'Wçêtson Aguilar [special characters in name that used to fail on long payloads]',gender: 'male',company: 'PROWASTE',email: 'watsonaguilar@prowaste.com',phone: '+1 (821) 517-2430',address: '910 Robert Street, Bangor, Delaware, 4159',about:'Aliqua et irure id do id id non dolore ipsum sit in proident ipsum. Id elit incididunt occaecat do laboris sunt officia fugiat aliquip. Incididunt aute ad minim Lorem cupidatat aute labore enim elit nostrud amet. Tempor sint irure incididunt aliquip amet sunt mollit aliqua Lorem officia pariatur.\r\n',registered: '2014-02-11T08:45:28 +05:00',latitude: 73.891198,longitude: 90.23414,tags: ['veniam', 'nulla', 'cillum', 'tempor', 'sint', 'magna', 'nostrud'],friends: [{id: 0,name: 'Cecelia James'},{id: 1,name: 'Hilary Young'},{id: 2,name: 'Sharron Goodwin'}],greeting: 'Hello, Watson Aguilar! You have 3 unread messages.',favoriteFruit: 'banana'},{_id: '584f1714b2e945fb30f73892',index: 1,guid: '3ffce1ee-a442-4dae-804f-40c59f19e7ee',isActive: false,balance: '$2,507.49',picture: 'http://placehold.it/32x32',age: 34,eyeColor: 'brown',name: 'Aguirre Salazar',gender: 'male',company: 'EZENTIA',email: 'aguirresalazar@ezentia.com',phone: '+1 (910) 443-3647',address: '629 Burnett Street, Tyhee, West Virginia, 2905',about:'Labore laboris et deserunt aliquip. Occaecat esse officia est eiusmod. Officia tempor cupidatat commodo minim deserunt mollit qui ut culpa. Est occaecat laborum occaecat non mollit ad reprehenderit magna ad. Consequat culpa excepteur qui aliqua dolore occaecat aliqua sunt elit ea nisi. Officia consectetur dolor labore voluptate. Esse ad esse qui id incididunt.\r\n',registered: '2015-01-28T06:47:34 +05:00',latitude: -64.632254,longitude: -116.659127,tags: ['sit','anim','quis','officia','minim','cupidatat','adipisicing'],friends: [{id: 0,name: 'Olson Mccall'},{id: 1,name: 'Carolina Conway'},{id: 2,name: 'Carlson Pacheco'}],greeting: 'Hello, Aguirre Salazar! You have 9 unread messages.',favoriteFruit: 'apple'},{_id: '584f17148282bb876fc4e9a2',index: 2,guid: '892ba80c-7149-4904-bd36-22f619d4df0a',isActive: true,balance: '$2,132.56',picture: 'http://placehold.it/32x32',age: 26,eyeColor: 'green',name: 'Hardin Grant',gender: 'male',company: 'CINASTER',email: 'hardingrant@cinaster.com',phone: '+1 (900) 437-2390',address: '180 Ide Court, Gibsonia, Washington, 3027',about:'Ut aliquip officia adipisicing voluptate aliquip aute fugiat ad quis ad eu non consectetur. Laboris labore veniam officia qui eiusmod. Duis aliqua est quis do dolor excepteur ea dolore non. Nisi mollit laboris nostrud nostrud pariatur culpa laboris anim est irure id aute.\r\n',registered: '2016-09-13T10:54:27 +04:00',latitude: 8.651031,longitude: -136.777747,tags: ['consequat', 'deserunt', 'magna', 'enim', 'esse', 'minim', 'ipsum'],friends: [{id: 0,name: 'Lesley Velasquez'},{id: 1,name: 'Natasha Simmons'},{id: 2,name: 'Isabel Avery'}],greeting: 'Hello, Hardin Grant! You have 7 unread messages.',favoriteFruit: 'strawberry'},{_id: '584f1714d90ff4b8914a69e7',index: 3,guid: '76f37726-1f73-4cf7-aabe-8dadf37d3ddd',isActive: true,balance: '$2,493.04',picture: 'http://placehold.it/32x32',age: 32,eyeColor: 'blue',name: 'Randall Roy',gender: 'male',company: 'ZAJ',email: 'randallroy@zaj.com',phone: '+1 (938) 562-2214',address: '872 Rugby Road, Hoehne, Indiana, 9792',about:'Non laboris id et cupidatat velit ea ipsum ea mollit quis qui dolore nisi laboris. Enim sit irure enim dolor velit proident sunt pariatur proident consequat mollit enim minim. Laboris deserunt cupidatat nisi enim adipisicing officia dolore ex cupidatat anim. Cupidatat labore voluptate non magna est dolor. Occaecat occaecat magna anim laborum adipisicing esse excepteur cillum aute qui eu do excepteur eu. Nostrud consectetur consectetur aliquip deserunt velit culpa sint excepteur mollit nostrud sit ex. Est ex ut laboris pariatur.\r\n',registered: '2016-05-05T05:24:56 +04:00',latitude: 18.943281,longitude: -110.942673,tags: ['eu','aliqua','reprehenderit','amet','nulla','consequat','nisi'],friends: [{id: 0,name: 'Barron Maynard'},{id: 1,name: 'Lynn Shepard'},{id: 2,name: 'Robin Whitehead'}],greeting: 'Hello, Randall Roy! You have 3 unread messages.',favoriteFruit: 'strawberry'},{_id: '584f17142a8f47cef0f5401a',index: 4,guid: '9b50ec22-3fbe-40ce-a5b8-b956f1340a77',isActive: false,balance: '$3,234.48',picture: 'http://placehold.it/32x32',age: 33,eyeColor: 'green',name: 'Chandler Vasquez',gender: 'male',company: 'ZILLACTIC',email: 'chandlervasquez@zillactic.com',phone: '+1 (830) 550-3428',address: '610 Hunts Lane, Cazadero, Michigan, 3584',about:'Fugiat in anim adipisicing sint aliquip ea velit do proident eu ad amet. Nulla velit duis ullamco labore ea Lorem velit elit Lorem. Id laboris do mollit exercitation veniam do amet culpa est excepteur reprehenderit consectetur laborum.\r\n',registered: '2014-04-20T05:23:32 +04:00',latitude: -88.088841,longitude: -163.602482,tags: ['sunt','excepteur','enim','incididunt','officia','amet','irure'],friends: [{id: 0,name: 'Mckee Norton'},{id: 1,name: 'Durham Parrish'},{id: 2,name: 'Stewart Kramer'}],greeting: 'Hello, Chandler Vasquez! You have 3 unread messages.',favoriteFruit: 'strawberry'},{_id: '584f171450a4e9dda687adc5',index: 5,guid: '68eeea45-ba6e-4740-b89b-10d690c37a02',isActive: false,balance: '$3,771.46',picture: 'http://placehold.it/32x32',age: 25,eyeColor: 'blue',name: 'Fernandez Caldwell',gender: 'male',company: 'SNIPS',email: 'fernandezcaldwell@snips.com',phone: '+1 (911) 544-3684',address: '786 Newel Street, Elliston, Massachusetts, 6683',about:'Voluptate commodo labore aliqua excepteur irure aliquip officia. Incididunt excepteur elit quis reprehenderit voluptate aliqua ad voluptate duis nisi dolor dolor id dolor. Irure sit consequat amet ea magna laborum velit eu in. Sunt occaecat quis consectetur laboris. Duis est do eu consectetur dolore id incididunt incididunt ut esse magna est. Nostrud irure magna nulla fugiat deserunt deserunt enim mollit proident qui sint dolore incididunt. Incididunt incididunt do quis culpa sint ut aliqua id.\r\n',registered: '2015-08-09T09:02:36 +04:00',latitude: -46.941347,longitude: -171.796168,tags: ['sit','irure','reprehenderit','ut','proident','aliquip','labore'],friends: [{id: 0,name: 'Adela Preston'},{id: 1,name: 'Phillips Moses'},{id: 2,name: 'Neva Wise'}],greeting: 'Hello, Fernandez Caldwell! You have 10 unread messages.',favoriteFruit: 'apple'}]

Const metadataKeys

metadataKeys: string[] = [metadataConstants.IMPORTS,metadataConstants.EXPORTS,metadataConstants.CONTROLLERS,metadataConstants.PROVIDERS,]

Let mqttPackage

mqttPackage: any

Let natsPackage

natsPackage: any

Const process

process: any

Let redisPackage

redisPackage: any

Let rqmPackage

rqmPackage: any

Let wsPackage

wsPackage: any

Const yellow

yellow: any = clc.xterm(3)

Functions

Bind

  • Bind(...decorators: any[]): MethodDecorator
  • Binds parameter decorators to the method Useful when the language doesn't provide a 'Parameter Decorators' feature (vanilla JavaScript)

    Parameters

    • Rest ...decorators: any[]

    Returns MethodDecorator

Body

  • Body(): ParameterDecorator
  • Body(...pipes: any[]): ParameterDecorator
  • Body(property: string, ...pipes: any[]): ParameterDecorator

Const CONTROLLER_MAPPING_MESSAGE

  • CONTROLLER_MAPPING_MESSAGE(name: string, path: string): string

Const CacheKey

  • CacheKey(key: string): any

Catch

  • Catch(...exceptions: Type<any>[]): ClassDecorator
  • Defines an exception filter. Takes set of exception types as arguments which have to be caught by this filter. The class should implement the ExceptionFilter interface.

    Parameters

    • Rest ...exceptions: Type<any>[]

    Returns ClassDecorator

Const Client

close

  • close(): void

createInbox

  • createInbox(): string

flush

  • flush(callback?: Function): void

numSubscriptions

  • numSubscriptions(): number

publish

  • publish(callback: Function): void
  • publish(subject: string, callback: Function): void
  • publish(subject: string, msg: string | Buffer, callback: Function): void
  • publish(subject: string, msg?: string | Buffer, reply?: string, callback?: Function): void

request

  • request(subject: string, callback: Function): number
  • request(subject: string, msg: string | Buffer, callback: Function): number
  • request(subject: string, msg?: string, options?: any, callback?: Function): number
  • Publish a message with an implicit inbox listener as the reply. Message is optional. This should be treated as a subscription. You can optionally indicate how many messages you only want to receive using opt_options = {max:N}. Otherwise you will need to unsubscribe to stop the message stream. The Subscriber Id is returned.

    Parameters

    • subject: string
    • callback: Function

    Returns number

  • Parameters

    • subject: string
    • msg: string | Buffer
    • callback: Function

    Returns number

  • Parameters

    • subject: string
    • Optional msg: string
    • Optional options: any
    • Optional callback: Function

    Returns number

requestOne

  • requestOne(subject: string, msg: string | Buffer, options?: any, timeout?: number, callback?: Function): number
  • Publish a message with an implicit inbox listener as the reply. Message is optional. This should be treated as a subscription. Request one, will terminate the subscription after the first response is received or the timeout is reached. The callback can be called with either a message payload or a NatsError to indicate a timeout has been reached. The Subscriber Id is returned.

    Parameters

    • subject: string
    • msg: string | Buffer
    • Optional options: any
    • Optional timeout: number
    • Optional callback: Function

    Returns number

subscribe

  • subscribe(subject: string, callback: Function): number
  • subscribe(subject: string, opts: any, callback: Function): number

timeout

  • timeout(sid: number, timeout: number, expected: number, callback: function): void

unsubscribe

  • unsubscribe(sid: number, max?: number): void

Controller

  • Controller(): ClassDecorator
  • Controller(prefix: string): ClassDecorator
  • Controller(options: ControllerOptions): ClassDecorator

Const Dependencies

  • Dependencies(...dependencies: any[]): ClassDecorator

Const EventPattern

  • EventPattern<T>(metadata?: T): MethodDecorator

FileFieldsInterceptor

FileInterceptor

FilesInterceptor

Global

  • Global(): ClassDecorator

GrpcMethod

  • GrpcMethod(service?: string): MethodDecorator
  • GrpcMethod(service: string, method?: string): MethodDecorator

Header

  • Header(name: string, value: string): MethodDecorator

HttpCode

  • HttpCode(statusCode: number): MethodDecorator

Const INVALID_CLASS_MESSAGE

  • INVALID_CLASS_MESSAGE(text: TemplateStringsArray, value: any): string

Const INVALID_MIDDLEWARE_MESSAGE

  • INVALID_MIDDLEWARE_MESSAGE(text: TemplateStringsArray, name: string): string

Const INVALID_MODULE_CONFIG_MESSAGE

  • INVALID_MODULE_CONFIG_MESSAGE(text: TemplateStringsArray, property: string): string

Const INVALID_MODULE_MESSAGE

  • INVALID_MODULE_MESSAGE(text: TemplateStringsArray, scope: string): string

Inject

  • Inject<T>(token?: T): (Anonymous function)
  • Injects provider which has to be available in the current injector (module) scope. Providers are recognized by either types or tokens.

    Type parameters

    • T

    Parameters

    • Optional token: T

    Returns (Anonymous function)

Injectable

Const MISSING_REQUIRED_DEPENDENCY

  • MISSING_REQUIRED_DEPENDENCY(name: string, reason: string): string
  • MISSING_REQUIRED_DEPENDENCY(defaultPlatform: string, transport: string): string

Const MODULE_INIT_MESSAGE

  • MODULE_INIT_MESSAGE(text: TemplateStringsArray, module: string): string

Const MergeWithValues

  • MergeWithValues<T>(data: object): (Anonymous function)

Const MessagePattern

  • MessagePattern<T>(metadata?: T): MethodDecorator

Optional

  • Optional(): (Anonymous function)

Param

  • Param(): ParameterDecorator
  • Param(...pipes: any[]): ParameterDecorator
  • Param(property: string, ...pipes: any[]): ParameterDecorator

Query

  • Query(): ParameterDecorator
  • Query(...pipes: any[]): ParameterDecorator
  • Query(property: string, ...pipes: any[]): ParameterDecorator

Const ROUTE_MAPPED_MESSAGE

  • ROUTE_MAPPED_MESSAGE(path: string, method: string | number): string

Redirect

  • Redirect(url: string): MethodDecorator

Const ReflectMetadata

  • ReflectMetadata<K, V>(metadataKey: K, metadataValue: V): (Anonymous function)

Render

  • Render(template: string): MethodDecorator

Const RequestMapping

Const SerializeOptions

Const SetMetadata

  • SetMetadata<K, V>(metadataKey: K, metadataValue: V): (Anonymous function)
  • Assigns the metadata to the class/function under specified key. This metadata can be reflected using Reflector class.

    Type parameters

    • K

    • V

    Parameters

    • metadataKey: K
    • metadataValue: V

    Returns (Anonymous function)

SingleScope

  • SingleScope(): ClassDecorator

Const SubscribeMessage

  • SubscribeMessage<T>(message: T): MethodDecorator

Const UNKNOWN_DEPENDENCIES_MESSAGE

  • UNKNOWN_DEPENDENCIES_MESSAGE(type: string | symbol, unknownDependencyContext: InjectorDependencyContext, module: Module): string

Const UNKNOWN_EXPORT_MESSAGE

  • UNKNOWN_EXPORT_MESSAGE(text: TemplateStringsArray, module: string): string

Const UseFilters

  • UseFilters(...filters: any[]): (Anonymous function)
  • Bounds exception filters to the chosen context. When the @UseFilters() is used on the controller level:

    • Exception Filter will be set up to every handler (every method)

    When the @UseFilters() is used on the handle level:

    • Exception Filter will be set up only to the specified method

    Parameters

    • Rest ...filters: any[]

    Returns (Anonymous function)

UseGuards

  • UseGuards(...guards: any[]): (Anonymous function)
  • Binds guards to the particular context. When the @UseGuards() is used on the controller level:

    • Guard will be register to each handler (every method)

    When the @UseGuards() is used on the handler level:

    • Guard will be registered only to the specified method

    Parameters

    • Rest ...guards: any[]

    Returns (Anonymous function)

UseInterceptors

  • UseInterceptors(...interceptors: any[]): (Anonymous function)
  • Binds interceptors to the particular context. When the @UseInterceptors() is used on the controller level:

    • Interceptor will be register to each handler (every method)

    When the @UseInterceptors() is used on the handle level:

    • Interceptor will be registered only to the specified method

    Parameters

    • Rest ...interceptors: any[]

    Returns (Anonymous function)

UsePipes

  • UsePipes(...pipes: (Function | PipeTransform<any, any>)[]): (Anonymous function)
  • Binds pipes to the particular context. When the @UsePipes() is used on the controller level:

    • Pipe will be register to each handler (every method)

    When the @UsePipes() is used on the handle level:

    • Pipe will be registered only to the specified method

    Parameters

    Returns (Anonymous function)

WebSocketGateway

  • WebSocketGateway(port?: number): ClassDecorator
  • WebSocketGateway(options?: GatewayMetadata): ClassDecorator
  • WebSocketGateway(port?: number, options?: GatewayMetadata): ClassDecorator

Const WebSocketServer

  • WebSocketServer(): PropertyDecorator

Const assignCustomMetadata

Const assignMetadata

assignToken

  • assignToken(metatype: Type<any>): Type<any>

callAppShutdownHook

  • callAppShutdownHook(module: Module, signal?: string): Promise<any>
  • Calls the onApplicationShutdown function on the module and its children (providers / controllers).

    Parameters

    • module: Module

      The module which will be initialized

    • Optional signal: string

    Returns Promise<any>

callModuleBootstrapHook

  • callModuleBootstrapHook(module: Module): Promise<any>
  • Calls the onApplicationBootstrap function on the module and its children (providers / controllers).

    Parameters

    • module: Module

      The module which will be initialized

    Returns Promise<any>

callModuleDestroyHook

  • callModuleDestroyHook(module: Module): Promise<any>
  • Calls the onModuleDestroy function on the module and its children (providers / controllers).

    Parameters

    • module: Module

      The module which will be initialized

    Returns Promise<any>

callModuleInitHook

  • callModuleInitHook(module: Module): Promise<void>
  • Calls the onModuleInit function on the module and its children (providers / controllers).

    Parameters

    • module: Module

      The module which will be initialized

    Returns Promise<void>

callOperator

createCacheManager

createClient

  • createClient(server: Server, callback: function): void

createContextId

Const createHttpExceptionBody

  • createHttpExceptionBody(message: any | string, error?: string, statusCode?: number): object

Const createMappingDecorator

  • createMappingDecorator(method: RequestMethod): (Anonymous function)

createMethodMetadata

  • createMethodMetadata(target: any, key: string | symbol, service: string | undefined, method: string | undefined): object

createParamDecorator

Const createPipesRouteParamDecorator

  • createPipesRouteParamDecorator(paramtype: RouteParamtypes): (Anonymous function)

Const createRouteParamDecorator

  • createRouteParamDecorator(paramtype: RouteParamtypes): (Anonymous function)

createServer

  • createServer(callback: function): void

createServerAndClient

  • createServerAndClient(callback: function): void

Const defineFiltersMetadata

  • defineFiltersMetadata(...filters: any[]): (Anonymous function)

extendArrayMetadata

  • extendArrayMetadata<T>(key: string, metadata: T, target: any): void

Const filterMiddleware

  • filterMiddleware<T>(middleware: T[]): any[]

flatten

  • flatten<T, R>(arr: T): R

Const forwardRef

Const getDependencyName

  • Returns the name of the dependency Tries to get the class name, otherwise the string value (= injection token). As fallback it returns '+'

    Parameters

    Returns any

Const getInstanceName

  • getInstanceName(instance: unknown): any
  • Returns the name of an instance

    Parameters

    • instance: unknown

      The instance which should get the name from

    Returns any

Const getModuleName

  • getModuleName(module: Module): any
  • Returns the name of the module Tries to get the class name. As fallback it returns 'current'.

    Parameters

    • module: Module

      The module which should get displayed

    Returns any

getNonTransientInstances

getTransientInstances

hasOnAppBootstrapHook

  • hasOnAppBootstrapHook(instance: unknown): boolean
  • Checks if the given instance has the onApplicationBootstrap function

    Parameters

    • instance: unknown

      The instance which should be checked

    Returns boolean

hasOnModuleDestroyHook

  • hasOnModuleDestroyHook(instance: unknown): boolean
  • Returns true or false if the given instance has a onModuleDestroy function

    Parameters

    • instance: unknown

      The instance which should be checked

    Returns boolean

hasOnModuleInitHook

  • hasOnModuleInitHook(instance: unknown): boolean
  • Returns true or false if the given instance has a onModuleInit function

    Parameters

    • instance: unknown

      The instance which should be checked

    Returns boolean

isClass

  • isClass(middleware: any): boolean

Const isConstructor

  • isConstructor(fn: any): boolean

Const isEmpty

  • isEmpty(array: any): boolean

Const isFunction

  • isFunction(fn: any): boolean

Const isNil

  • isNil(obj: any): boolean

Const isObject

  • isObject(fn: any): boolean

Const isString

  • isString(fn: any): boolean

Const isSymbol

  • isSymbol(fn: any): boolean

Const isUndefined

  • isUndefined(obj: any): boolean

loadAdapter

  • loadAdapter(defaultPlatform: string, transport: string, loaderFn?: Function): any

loadPackage

  • loadPackage(packageName: string, context: string, loaderFn?: Function): any

Const mapToClass

  • mapToClass<T>(middleware: T): any

mixin

  • mixin(mixinClass: Type<any>): Type<any>

Const noop

  • noop(): void

Const randomStringGenerator

  • randomStringGenerator(): any

range

  • range(start: number, end: number): any[]

transformException

  • transformException(error: Error | undefined): any

validateEach

  • validateEach(context: object, arr: any[], predicate: Function, decorator: string, item: string): boolean

Const validateKeys

  • validateKeys(keys: string[]): void

Const validatePath

  • validatePath(path?: string): string

Object literals

Const MESSAGES

MESSAGES: object

APPLICATION_READY

APPLICATION_READY: string = `Nest application successfully started`

APPLICATION_START

APPLICATION_START: string = `Starting Nest application...`

MICROSERVICE_READY

MICROSERVICE_READY: string = `Nest microservice successfully started`

UNKNOWN_EXCEPTION_MESSAGE

UNKNOWN_EXCEPTION_MESSAGE: string = "Internal server error"

Const METADATA

METADATA: object

CONTROLLERS

CONTROLLERS: string = "controllers"

EXPORTS

EXPORTS: string = "exports"

IMPORTS

IMPORTS: string = "imports"

PROVIDERS

PROVIDERS: string = "providers"

Const defaultCacheOptions

defaultCacheOptions: object

max

max: number = 100

store

store: string = "memory"

ttl

ttl: number = 5

Const defaultMetadata

defaultMetadata: object

__computed

__computed: RequestMethod = RequestMethod.GET

Const multerExceptions

multerExceptions: object

LIMIT_FIELD_COUNT

LIMIT_FIELD_COUNT: string = "Too many fields"

LIMIT_FIELD_KEY

LIMIT_FIELD_KEY: string = "Field name too long"

LIMIT_FIELD_VALUE

LIMIT_FIELD_VALUE: string = "Field value too long"

LIMIT_FILE_COUNT

LIMIT_FILE_COUNT: string = "Too many files"

LIMIT_FILE_SIZE

LIMIT_FILE_SIZE: string = "File too large"

LIMIT_PART_COUNT

LIMIT_PART_COUNT: string = "Too many parts"

LIMIT_UNEXPECTED_FILE

LIMIT_UNEXPECTED_FILE: string = "Unexpected field"

Const requestProvider

requestProvider: object

provide

provide: any = REQUEST

scope

scope: any = Scope.REQUEST

useFactory

useFactory: noop = noop

Generated using TypeDoc