@depup/nestjs__common 11.1.16-depup.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/PACKAGE.md +1 -0
- package/Readme.md +31 -0
- package/changes.json +10 -0
- package/constants.d.ts +42 -0
- package/constants.js +44 -0
- package/decorators/core/apply-decorators.d.ts +10 -0
- package/decorators/core/apply-decorators.js +23 -0
- package/decorators/core/bind.decorator.d.ts +11 -0
- package/decorators/core/bind.decorator.js +19 -0
- package/decorators/core/catch.decorator.d.ts +19 -0
- package/decorators/core/catch.decorator.js +27 -0
- package/decorators/core/controller.decorator.d.ts +102 -0
- package/decorators/core/controller.decorator.js +61 -0
- package/decorators/core/dependencies.decorator.d.ts +7 -0
- package/decorators/core/dependencies.decorator.js +23 -0
- package/decorators/core/exception-filters.decorator.d.ts +23 -0
- package/decorators/core/exception-filters.decorator.js +43 -0
- package/decorators/core/index.d.ts +14 -0
- package/decorators/core/index.js +17 -0
- package/decorators/core/inject.decorator.d.ts +31 -0
- package/decorators/core/inject.decorator.js +53 -0
- package/decorators/core/injectable.decorator.d.ts +43 -0
- package/decorators/core/injectable.decorator.js +50 -0
- package/decorators/core/optional.decorator.d.ts +14 -0
- package/decorators/core/optional.decorator.js +29 -0
- package/decorators/core/set-metadata.decorator.d.ts +20 -0
- package/decorators/core/set-metadata.decorator.js +32 -0
- package/decorators/core/use-guards.decorator.d.ts +23 -0
- package/decorators/core/use-guards.decorator.js +41 -0
- package/decorators/core/use-interceptors.decorator.d.ts +23 -0
- package/decorators/core/use-interceptors.decorator.js +42 -0
- package/decorators/core/use-pipes.decorator.d.ts +23 -0
- package/decorators/core/use-pipes.decorator.js +40 -0
- package/decorators/core/version.decorator.d.ts +7 -0
- package/decorators/core/version.decorator.js +19 -0
- package/decorators/http/create-route-param-metadata.decorator.d.ts +13 -0
- package/decorators/http/create-route-param-metadata.decorator.js +32 -0
- package/decorators/http/header.decorator.d.ts +15 -0
- package/decorators/http/header.decorator.js +25 -0
- package/decorators/http/http-code.decorator.d.ts +11 -0
- package/decorators/http/http-code.decorator.js +20 -0
- package/decorators/http/index.d.ts +8 -0
- package/decorators/http/index.js +11 -0
- package/decorators/http/redirect.decorator.d.ts +6 -0
- package/decorators/http/redirect.decorator.js +15 -0
- package/decorators/http/render.decorator.d.ts +12 -0
- package/decorators/http/render.decorator.js +21 -0
- package/decorators/http/request-mapping.decorator.d.ts +134 -0
- package/decorators/http/request-mapping.decorator.js +154 -0
- package/decorators/http/route-params.decorator.d.ts +445 -0
- package/decorators/http/route-params.decorator.js +265 -0
- package/decorators/http/sse.decorator.d.ts +10 -0
- package/decorators/http/sse.decorator.js +21 -0
- package/decorators/index.d.ts +3 -0
- package/decorators/index.js +6 -0
- package/decorators/modules/global.decorator.d.ts +12 -0
- package/decorators/modules/global.decorator.js +20 -0
- package/decorators/modules/index.d.ts +2 -0
- package/decorators/modules/index.js +5 -0
- package/decorators/modules/module.decorator.d.ts +16 -0
- package/decorators/modules/module.decorator.js +29 -0
- package/enums/http-status.enum.d.ts +60 -0
- package/enums/http-status.enum.js +64 -0
- package/enums/index.d.ts +4 -0
- package/enums/index.js +7 -0
- package/enums/request-method.enum.d.ts +18 -0
- package/enums/request-method.enum.js +22 -0
- package/enums/route-paramtypes.enum.d.ts +16 -0
- package/enums/route-paramtypes.enum.js +20 -0
- package/enums/shutdown-signal.enum.d.ts +16 -0
- package/enums/shutdown-signal.enum.js +20 -0
- package/enums/version-type.enum.d.ts +9 -0
- package/enums/version-type.enum.js +13 -0
- package/exceptions/bad-gateway.exception.d.ts +35 -0
- package/exceptions/bad-gateway.exception.js +43 -0
- package/exceptions/bad-request.exception.d.ts +35 -0
- package/exceptions/bad-request.exception.js +43 -0
- package/exceptions/conflict.exception.d.ts +35 -0
- package/exceptions/conflict.exception.js +43 -0
- package/exceptions/forbidden.exception.d.ts +35 -0
- package/exceptions/forbidden.exception.js +43 -0
- package/exceptions/gateway-timeout.exception.d.ts +35 -0
- package/exceptions/gateway-timeout.exception.js +43 -0
- package/exceptions/gone.exception.d.ts +35 -0
- package/exceptions/gone.exception.js +43 -0
- package/exceptions/http-version-not-supported.exception.d.ts +35 -0
- package/exceptions/http-version-not-supported.exception.js +43 -0
- package/exceptions/http.exception.d.ts +85 -0
- package/exceptions/http.exception.js +133 -0
- package/exceptions/im-a-teapot.exception.d.ts +38 -0
- package/exceptions/im-a-teapot.exception.js +46 -0
- package/exceptions/index.d.ts +23 -0
- package/exceptions/index.js +26 -0
- package/exceptions/internal-server-error.exception.d.ts +35 -0
- package/exceptions/internal-server-error.exception.js +43 -0
- package/exceptions/intrinsic.exception.d.ts +8 -0
- package/exceptions/intrinsic.exception.js +12 -0
- package/exceptions/method-not-allowed.exception.d.ts +35 -0
- package/exceptions/method-not-allowed.exception.js +43 -0
- package/exceptions/misdirected.exception.d.ts +35 -0
- package/exceptions/misdirected.exception.js +43 -0
- package/exceptions/not-acceptable.exception.d.ts +35 -0
- package/exceptions/not-acceptable.exception.js +43 -0
- package/exceptions/not-found.exception.d.ts +35 -0
- package/exceptions/not-found.exception.js +43 -0
- package/exceptions/not-implemented.exception.d.ts +35 -0
- package/exceptions/not-implemented.exception.js +43 -0
- package/exceptions/payload-too-large.exception.d.ts +35 -0
- package/exceptions/payload-too-large.exception.js +43 -0
- package/exceptions/precondition-failed.exception.d.ts +35 -0
- package/exceptions/precondition-failed.exception.js +43 -0
- package/exceptions/request-timeout.exception.d.ts +35 -0
- package/exceptions/request-timeout.exception.js +43 -0
- package/exceptions/service-unavailable.exception.d.ts +35 -0
- package/exceptions/service-unavailable.exception.js +43 -0
- package/exceptions/unauthorized.exception.d.ts +35 -0
- package/exceptions/unauthorized.exception.js +43 -0
- package/exceptions/unprocessable-entity.exception.d.ts +35 -0
- package/exceptions/unprocessable-entity.exception.js +43 -0
- package/exceptions/unsupported-media-type.exception.d.ts +35 -0
- package/exceptions/unsupported-media-type.exception.js +43 -0
- package/file-stream/index.d.ts +1 -0
- package/file-stream/index.js +4 -0
- package/file-stream/interfaces/index.d.ts +2 -0
- package/file-stream/interfaces/index.js +5 -0
- package/file-stream/interfaces/streamable-handler-response.interface.d.ts +12 -0
- package/file-stream/interfaces/streamable-handler-response.interface.js +2 -0
- package/file-stream/interfaces/streamable-options.interface.d.ts +22 -0
- package/file-stream/interfaces/streamable-options.interface.js +2 -0
- package/file-stream/streamable-file.d.ts +27 -0
- package/file-stream/streamable-file.js +68 -0
- package/index.d.ts +11 -0
- package/index.js +23 -0
- package/interfaces/abstract.interface.d.ts +3 -0
- package/interfaces/abstract.interface.js +2 -0
- package/interfaces/controllers/controller-metadata.interface.d.ts +3 -0
- package/interfaces/controllers/controller-metadata.interface.js +2 -0
- package/interfaces/controllers/controller.interface.d.ts +1 -0
- package/interfaces/controllers/controller.interface.js +2 -0
- package/interfaces/controllers/index.d.ts +2 -0
- package/interfaces/controllers/index.js +5 -0
- package/interfaces/exceptions/exception-filter-metadata.interface.d.ts +6 -0
- package/interfaces/exceptions/exception-filter-metadata.interface.js +2 -0
- package/interfaces/exceptions/exception-filter.interface.d.ts +18 -0
- package/interfaces/exceptions/exception-filter.interface.js +2 -0
- package/interfaces/exceptions/index.d.ts +5 -0
- package/interfaces/exceptions/index.js +8 -0
- package/interfaces/exceptions/rpc-exception-filter-metadata.interface.d.ts +6 -0
- package/interfaces/exceptions/rpc-exception-filter-metadata.interface.js +2 -0
- package/interfaces/exceptions/rpc-exception-filter.interface.d.ts +19 -0
- package/interfaces/exceptions/rpc-exception-filter.interface.js +2 -0
- package/interfaces/exceptions/ws-exception-filter.interface.d.ts +18 -0
- package/interfaces/exceptions/ws-exception-filter.interface.js +2 -0
- package/interfaces/external/class-transform-options.interface.d.ts +65 -0
- package/interfaces/external/class-transform-options.interface.js +2 -0
- package/interfaces/external/cors-options.interface.d.ts +58 -0
- package/interfaces/external/cors-options.interface.js +2 -0
- package/interfaces/external/https-options.interface.d.ts +105 -0
- package/interfaces/external/https-options.interface.js +2 -0
- package/interfaces/external/transformer-package.interface.d.ts +6 -0
- package/interfaces/external/transformer-package.interface.js +2 -0
- package/interfaces/external/validation-error.interface.d.ts +42 -0
- package/interfaces/external/validation-error.interface.js +2 -0
- package/interfaces/external/validator-options.interface.d.ts +76 -0
- package/interfaces/external/validator-options.interface.js +2 -0
- package/interfaces/external/validator-package.interface.d.ts +5 -0
- package/interfaces/external/validator-package.interface.js +2 -0
- package/interfaces/features/arguments-host.interface.d.ts +88 -0
- package/interfaces/features/arguments-host.interface.js +2 -0
- package/interfaces/features/can-activate.interface.d.ts +22 -0
- package/interfaces/features/can-activate.interface.js +2 -0
- package/interfaces/features/custom-route-param-factory.interface.d.ts +5 -0
- package/interfaces/features/custom-route-param-factory.interface.js +2 -0
- package/interfaces/features/execution-context.interface.d.ts +20 -0
- package/interfaces/features/execution-context.interface.js +2 -0
- package/interfaces/features/nest-interceptor.interface.d.ts +34 -0
- package/interfaces/features/nest-interceptor.interface.js +2 -0
- package/interfaces/features/paramtype.interface.d.ts +4 -0
- package/interfaces/features/paramtype.interface.js +2 -0
- package/interfaces/features/pipe-transform.interface.d.ts +42 -0
- package/interfaces/features/pipe-transform.interface.js +2 -0
- package/interfaces/global-prefix-options.interface.d.ts +7 -0
- package/interfaces/global-prefix-options.interface.js +2 -0
- package/interfaces/hooks/before-application-shutdown.interface.d.ts +3 -0
- package/interfaces/hooks/before-application-shutdown.interface.js +2 -0
- package/interfaces/hooks/index.d.ts +5 -0
- package/interfaces/hooks/index.js +8 -0
- package/interfaces/hooks/on-application-bootstrap.interface.d.ts +11 -0
- package/interfaces/hooks/on-application-bootstrap.interface.js +2 -0
- package/interfaces/hooks/on-application-shutdown.interface.d.ts +11 -0
- package/interfaces/hooks/on-application-shutdown.interface.js +2 -0
- package/interfaces/hooks/on-destroy.interface.d.ts +12 -0
- package/interfaces/hooks/on-destroy.interface.js +2 -0
- package/interfaces/hooks/on-init.interface.d.ts +10 -0
- package/interfaces/hooks/on-init.interface.js +2 -0
- package/interfaces/http/http-exception-body.interface.d.ts +6 -0
- package/interfaces/http/http-exception-body.interface.js +2 -0
- package/interfaces/http/http-redirect-response.interface.d.ts +5 -0
- package/interfaces/http/http-redirect-response.interface.js +2 -0
- package/interfaces/http/http-server.interface.d.ts +70 -0
- package/interfaces/http/http-server.interface.js +2 -0
- package/interfaces/http/index.d.ts +5 -0
- package/interfaces/http/index.js +8 -0
- package/interfaces/http/message-event.interface.d.ts +6 -0
- package/interfaces/http/message-event.interface.js +2 -0
- package/interfaces/http/raw-body-request.interface.d.ts +6 -0
- package/interfaces/http/raw-body-request.interface.js +2 -0
- package/interfaces/index.d.ts +30 -0
- package/interfaces/index.js +33 -0
- package/interfaces/injectable.interface.d.ts +1 -0
- package/interfaces/injectable.interface.js +2 -0
- package/interfaces/microservices/nest-hybrid-application-options.interface.d.ts +7 -0
- package/interfaces/microservices/nest-hybrid-application-options.interface.js +2 -0
- package/interfaces/microservices/nest-microservice-options.interface.d.ts +5 -0
- package/interfaces/microservices/nest-microservice-options.interface.js +2 -0
- package/interfaces/middleware/index.d.ts +4 -0
- package/interfaces/middleware/index.js +7 -0
- package/interfaces/middleware/middleware-config-proxy.interface.d.ts +24 -0
- package/interfaces/middleware/middleware-config-proxy.interface.js +2 -0
- package/interfaces/middleware/middleware-configuration.interface.d.ts +12 -0
- package/interfaces/middleware/middleware-configuration.interface.js +2 -0
- package/interfaces/middleware/middleware-consumer.interface.d.ts +18 -0
- package/interfaces/middleware/middleware-consumer.interface.js +2 -0
- package/interfaces/middleware/nest-middleware.interface.d.ts +8 -0
- package/interfaces/middleware/nest-middleware.interface.js +2 -0
- package/interfaces/modules/dynamic-module.interface.d.ts +25 -0
- package/interfaces/modules/dynamic-module.interface.js +2 -0
- package/interfaces/modules/forward-reference.interface.d.ts +3 -0
- package/interfaces/modules/forward-reference.interface.js +2 -0
- package/interfaces/modules/index.d.ts +8 -0
- package/interfaces/modules/index.js +11 -0
- package/interfaces/modules/injection-token.interface.d.ts +6 -0
- package/interfaces/modules/injection-token.interface.js +2 -0
- package/interfaces/modules/introspection-result.interface.d.ts +10 -0
- package/interfaces/modules/introspection-result.interface.js +2 -0
- package/interfaces/modules/module-metadata.interface.d.ts +34 -0
- package/interfaces/modules/module-metadata.interface.js +2 -0
- package/interfaces/modules/nest-module.interface.d.ts +7 -0
- package/interfaces/modules/nest-module.interface.js +2 -0
- package/interfaces/modules/optional-factory-dependency.interface.d.ts +8 -0
- package/interfaces/modules/optional-factory-dependency.interface.js +2 -0
- package/interfaces/modules/provider.interface.d.ts +156 -0
- package/interfaces/modules/provider.interface.js +2 -0
- package/interfaces/nest-application-context-options.interface.d.ts +68 -0
- package/interfaces/nest-application-context-options.interface.js +9 -0
- package/interfaces/nest-application-context.interface.d.ts +139 -0
- package/interfaces/nest-application-context.interface.js +2 -0
- package/interfaces/nest-application-options.interface.d.ts +29 -0
- package/interfaces/nest-application-options.interface.js +2 -0
- package/interfaces/nest-application.interface.d.ts +135 -0
- package/interfaces/nest-application.interface.js +2 -0
- package/interfaces/nest-microservice.interface.d.ts +75 -0
- package/interfaces/nest-microservice.interface.js +2 -0
- package/interfaces/scope-options.interface.d.ts +37 -0
- package/interfaces/scope-options.interface.js +23 -0
- package/interfaces/shutdown-hooks-options.interface.d.ts +21 -0
- package/interfaces/shutdown-hooks-options.interface.js +2 -0
- package/interfaces/type.interface.d.ts +3 -0
- package/interfaces/type.interface.js +2 -0
- package/interfaces/version-options.interface.d.ts +92 -0
- package/interfaces/version-options.interface.js +9 -0
- package/interfaces/websockets/web-socket-adapter.interface.d.ts +19 -0
- package/interfaces/websockets/web-socket-adapter.interface.js +2 -0
- package/module-utils/configurable-module.builder.d.ts +93 -0
- package/module-utils/configurable-module.builder.js +219 -0
- package/module-utils/constants.d.ts +9 -0
- package/module-utils/constants.js +19 -0
- package/module-utils/index.d.ts +2 -0
- package/module-utils/index.js +5 -0
- package/module-utils/interfaces/configurable-module-async-options.interface.d.ts +42 -0
- package/module-utils/interfaces/configurable-module-async-options.interface.js +2 -0
- package/module-utils/interfaces/configurable-module-cls.interface.d.ts +13 -0
- package/module-utils/interfaces/configurable-module-cls.interface.js +2 -0
- package/module-utils/interfaces/configurable-module-host.interface.d.ts +62 -0
- package/module-utils/interfaces/configurable-module-host.interface.js +2 -0
- package/module-utils/interfaces/index.d.ts +3 -0
- package/module-utils/interfaces/index.js +6 -0
- package/module-utils/utils/generate-options-injection-token.util.d.ts +1 -0
- package/module-utils/utils/generate-options-injection-token.util.js +8 -0
- package/module-utils/utils/get-injection-providers.util.d.ts +8 -0
- package/module-utils/utils/get-injection-providers.util.js +35 -0
- package/module-utils/utils/index.d.ts +2 -0
- package/module-utils/utils/index.js +5 -0
- package/package.json +61 -0
- package/pipes/default-value.pipe.d.ts +13 -0
- package/pipes/default-value.pipe.js +30 -0
- package/pipes/file/file-type.validator.d.ts +62 -0
- package/pipes/file/file-type.validator.js +102 -0
- package/pipes/file/file-validator-context.interface.d.ts +5 -0
- package/pipes/file/file-validator-context.interface.js +2 -0
- package/pipes/file/file-validator.interface.d.ts +21 -0
- package/pipes/file/file-validator.interface.js +15 -0
- package/pipes/file/index.d.ts +6 -0
- package/pipes/file/index.js +9 -0
- package/pipes/file/interfaces/file.interface.d.ts +5 -0
- package/pipes/file/interfaces/file.interface.js +2 -0
- package/pipes/file/interfaces/index.d.ts +1 -0
- package/pipes/file/interfaces/index.js +4 -0
- package/pipes/file/max-file-size.validator.d.ts +44 -0
- package/pipes/file/max-file-size.validator.js +37 -0
- package/pipes/file/parse-file-options.interface.d.ts +15 -0
- package/pipes/file/parse-file-options.interface.js +2 -0
- package/pipes/file/parse-file-pipe.builder.d.ts +15 -0
- package/pipes/file/parse-file-pipe.builder.js +33 -0
- package/pipes/file/parse-file.pipe.d.ts +28 -0
- package/pipes/file/parse-file.pipe.js +76 -0
- package/pipes/index.d.ts +10 -0
- package/pipes/index.js +13 -0
- package/pipes/parse-array.pipe.d.ts +52 -0
- package/pipes/parse-array.pipe.js +148 -0
- package/pipes/parse-bool.pipe.d.ts +55 -0
- package/pipes/parse-bool.pipe.js +67 -0
- package/pipes/parse-date.pipe.d.ts +37 -0
- package/pipes/parse-date.pipe.js +42 -0
- package/pipes/parse-enum.pipe.d.ts +46 -0
- package/pipes/parse-enum.pipe.js +55 -0
- package/pipes/parse-float.pipe.d.ts +49 -0
- package/pipes/parse-float.pipe.js +56 -0
- package/pipes/parse-int.pipe.d.ts +48 -0
- package/pipes/parse-int.pipe.js +57 -0
- package/pipes/parse-uuid.pipe.d.ts +49 -0
- package/pipes/parse-uuid.pipe.js +57 -0
- package/pipes/validation.pipe.d.ts +51 -0
- package/pipes/validation.pipe.js +245 -0
- package/serializer/class-serializer.constants.d.ts +1 -0
- package/serializer/class-serializer.constants.js +4 -0
- package/serializer/class-serializer.interceptor.d.ts +29 -0
- package/serializer/class-serializer.interceptor.js +77 -0
- package/serializer/class-serializer.interfaces.d.ts +8 -0
- package/serializer/class-serializer.interfaces.js +2 -0
- package/serializer/decorators/index.d.ts +1 -0
- package/serializer/decorators/index.js +4 -0
- package/serializer/decorators/serialize-options.decorator.d.ts +5 -0
- package/serializer/decorators/serialize-options.decorator.js +10 -0
- package/serializer/index.d.ts +3 -0
- package/serializer/index.js +6 -0
- package/services/console-logger.service.d.ts +202 -0
- package/services/console-logger.service.js +379 -0
- package/services/index.d.ts +3 -0
- package/services/index.js +6 -0
- package/services/logger.service.d.ts +152 -0
- package/services/logger.service.js +251 -0
- package/services/utils/filter-log-levels.util.d.ts +5 -0
- package/services/utils/filter-log-levels.util.js +23 -0
- package/services/utils/index.d.ts +3 -0
- package/services/utils/index.js +6 -0
- package/services/utils/is-log-level-enabled.util.d.ts +7 -0
- package/services/utils/is-log-level-enabled.util.js +32 -0
- package/services/utils/is-log-level.util.d.ts +5 -0
- package/services/utils/is-log-level.util.js +10 -0
- package/tsconfig.build.json +10 -0
- package/utils/assign-custom-metadata.util.d.ts +4 -0
- package/utils/assign-custom-metadata.util.js +15 -0
- package/utils/cli-colors.util.d.ts +10 -0
- package/utils/cli-colors.util.js +15 -0
- package/utils/extend-metadata.util.d.ts +1 -0
- package/utils/extend-metadata.util.js +8 -0
- package/utils/forward-ref.util.d.ts +5 -0
- package/utils/forward-ref.util.js +10 -0
- package/utils/http-error-by-code.util.d.ts +4 -0
- package/utils/http-error-by-code.util.js +26 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +4 -0
- package/utils/load-package.util.d.ts +1 -0
- package/utils/load-package.util.js +16 -0
- package/utils/merge-with-values.util.d.ts +4 -0
- package/utils/merge-with-values.util.js +18 -0
- package/utils/random-string-generator.util.d.ts +1 -0
- package/utils/random-string-generator.util.js +6 -0
- package/utils/select-exception-filter-metadata.util.d.ts +2 -0
- package/utils/select-exception-filter-metadata.util.js +6 -0
- package/utils/shared.utils.d.ts +13 -0
- package/utils/shared.utils.js +51 -0
- package/utils/validate-each.util.d.ts +8 -0
- package/utils/validate-each.util.js +25 -0
- package/utils/validate-module-keys.util.d.ts +2 -0
- package/utils/validate-module-keys.util.js +22 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export type ContextType = 'http' | 'ws' | 'rpc';
|
|
2
|
+
/**
|
|
3
|
+
* Methods to obtain request and response objects.
|
|
4
|
+
*
|
|
5
|
+
* @publicApi
|
|
6
|
+
*/
|
|
7
|
+
export interface HttpArgumentsHost {
|
|
8
|
+
/**
|
|
9
|
+
* Returns the in-flight `request` object.
|
|
10
|
+
*/
|
|
11
|
+
getRequest<T = any>(): T;
|
|
12
|
+
/**
|
|
13
|
+
* Returns the in-flight `response` object.
|
|
14
|
+
*/
|
|
15
|
+
getResponse<T = any>(): T;
|
|
16
|
+
getNext<T = any>(): T;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Methods to obtain WebSocket data and client objects.
|
|
20
|
+
*
|
|
21
|
+
* @publicApi
|
|
22
|
+
*/
|
|
23
|
+
export interface WsArgumentsHost {
|
|
24
|
+
/**
|
|
25
|
+
* Returns the data object.
|
|
26
|
+
*/
|
|
27
|
+
getData<T = any>(): T;
|
|
28
|
+
/**
|
|
29
|
+
* Returns the client object.
|
|
30
|
+
*/
|
|
31
|
+
getClient<T = any>(): T;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the pattern for the event
|
|
34
|
+
*/
|
|
35
|
+
getPattern(): string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Methods to obtain RPC data object.
|
|
39
|
+
*
|
|
40
|
+
* @publicApi
|
|
41
|
+
*/
|
|
42
|
+
export interface RpcArgumentsHost {
|
|
43
|
+
/**
|
|
44
|
+
* Returns the data object.
|
|
45
|
+
*/
|
|
46
|
+
getData<T = any>(): T;
|
|
47
|
+
/**
|
|
48
|
+
* Returns the context object.
|
|
49
|
+
*/
|
|
50
|
+
getContext<T = any>(): T;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Provides methods for retrieving the arguments being passed to a handler.
|
|
54
|
+
* Allows choosing the appropriate execution context (e.g., Http, RPC, or
|
|
55
|
+
* WebSockets) to retrieve the arguments from.
|
|
56
|
+
*
|
|
57
|
+
* @publicApi
|
|
58
|
+
*/
|
|
59
|
+
export interface ArgumentsHost {
|
|
60
|
+
/**
|
|
61
|
+
* Returns the array of arguments being passed to the handler.
|
|
62
|
+
*/
|
|
63
|
+
getArgs<T extends Array<any> = any[]>(): T;
|
|
64
|
+
/**
|
|
65
|
+
* Returns a particular argument by index.
|
|
66
|
+
* @param index index of argument to retrieve
|
|
67
|
+
*/
|
|
68
|
+
getArgByIndex<T = any>(index: number): T;
|
|
69
|
+
/**
|
|
70
|
+
* Switch context to RPC.
|
|
71
|
+
* @returns interface with methods to retrieve RPC arguments
|
|
72
|
+
*/
|
|
73
|
+
switchToRpc(): RpcArgumentsHost;
|
|
74
|
+
/**
|
|
75
|
+
* Switch context to HTTP.
|
|
76
|
+
* @returns interface with methods to retrieve HTTP arguments
|
|
77
|
+
*/
|
|
78
|
+
switchToHttp(): HttpArgumentsHost;
|
|
79
|
+
/**
|
|
80
|
+
* Switch context to WebSockets.
|
|
81
|
+
* @returns interface with methods to retrieve WebSockets arguments
|
|
82
|
+
*/
|
|
83
|
+
switchToWs(): WsArgumentsHost;
|
|
84
|
+
/**
|
|
85
|
+
* Returns the current execution context type (string)
|
|
86
|
+
*/
|
|
87
|
+
getType<TContext extends string = ContextType>(): TContext;
|
|
88
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ExecutionContext } from './execution-context.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Interface defining the `canActivate()` function that must be implemented
|
|
5
|
+
* by a guard. Return value indicates whether or not the current request is
|
|
6
|
+
* allowed to proceed. Return can be either synchronous (`boolean`)
|
|
7
|
+
* or asynchronous (`Promise` or `Observable`).
|
|
8
|
+
*
|
|
9
|
+
* @see [Guards](https://docs.nestjs.com/guards)
|
|
10
|
+
*
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
export interface CanActivate {
|
|
14
|
+
/**
|
|
15
|
+
* @param context Current execution context. Provides access to details about
|
|
16
|
+
* the current request pipeline.
|
|
17
|
+
*
|
|
18
|
+
* @returns Value indicating whether or not the current request is allowed to
|
|
19
|
+
* proceed.
|
|
20
|
+
*/
|
|
21
|
+
canActivate(context: ExecutionContext): boolean | Promise<boolean> | Observable<boolean>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Type } from '../index';
|
|
2
|
+
import { ArgumentsHost } from './arguments-host.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Interface describing details about the current request pipeline.
|
|
5
|
+
*
|
|
6
|
+
* @see [Execution Context](https://docs.nestjs.com/guards#execution-context)
|
|
7
|
+
*
|
|
8
|
+
* @publicApi
|
|
9
|
+
*/
|
|
10
|
+
export interface ExecutionContext extends ArgumentsHost {
|
|
11
|
+
/**
|
|
12
|
+
* Returns the *type* of the controller class which the current handler belongs to.
|
|
13
|
+
*/
|
|
14
|
+
getClass<T = any>(): Type<T>;
|
|
15
|
+
/**
|
|
16
|
+
* Returns a reference to the handler (method) that will be invoked next in the
|
|
17
|
+
* request pipeline.
|
|
18
|
+
*/
|
|
19
|
+
getHandler(): Function;
|
|
20
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ExecutionContext } from './execution-context.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Interface providing access to the response stream.
|
|
5
|
+
*
|
|
6
|
+
* @see [Interceptors](https://docs.nestjs.com/interceptors)
|
|
7
|
+
*
|
|
8
|
+
* @publicApi
|
|
9
|
+
*/
|
|
10
|
+
export interface CallHandler<T = any> {
|
|
11
|
+
/**
|
|
12
|
+
* Returns an `Observable` representing the response stream from the route
|
|
13
|
+
* handler.
|
|
14
|
+
*/
|
|
15
|
+
handle(): Observable<T>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Interface describing implementation of an interceptor.
|
|
19
|
+
*
|
|
20
|
+
* @see [Interceptors](https://docs.nestjs.com/interceptors)
|
|
21
|
+
*
|
|
22
|
+
* @publicApi
|
|
23
|
+
*/
|
|
24
|
+
export interface NestInterceptor<T = any, R = any> {
|
|
25
|
+
/**
|
|
26
|
+
* Method to implement a custom interceptor.
|
|
27
|
+
*
|
|
28
|
+
* @param context an `ExecutionContext` object providing methods to access the
|
|
29
|
+
* route handler and class about to be invoked.
|
|
30
|
+
* @param next a reference to the `CallHandler`, which provides access to an
|
|
31
|
+
* `Observable` representing the response stream from the route handler.
|
|
32
|
+
*/
|
|
33
|
+
intercept(context: ExecutionContext, next: CallHandler<T>): Observable<R> | Promise<Observable<R>>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Type } from '../type.interface';
|
|
2
|
+
import { Paramtype } from './paramtype.interface';
|
|
3
|
+
export type Transform<T = any> = (value: T, metadata: ArgumentMetadata) => any;
|
|
4
|
+
/**
|
|
5
|
+
* Interface describing a pipe implementation's `transform()` method metadata argument.
|
|
6
|
+
*
|
|
7
|
+
* @see [Pipes](https://docs.nestjs.com/pipes)
|
|
8
|
+
*
|
|
9
|
+
* @publicApi
|
|
10
|
+
*/
|
|
11
|
+
export interface ArgumentMetadata {
|
|
12
|
+
/**
|
|
13
|
+
* Indicates whether argument is a body, query, param, or custom parameter
|
|
14
|
+
*/
|
|
15
|
+
readonly type: Paramtype;
|
|
16
|
+
/**
|
|
17
|
+
* Underlying base type (e.g., `String`) of the parameter, based on the type
|
|
18
|
+
* definition in the route handler.
|
|
19
|
+
*/
|
|
20
|
+
readonly metatype?: Type<any> | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* String passed as an argument to the decorator.
|
|
23
|
+
* Example: `@Body('userId')` would yield `userId`
|
|
24
|
+
*/
|
|
25
|
+
readonly data?: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Interface describing implementation of a pipe.
|
|
29
|
+
*
|
|
30
|
+
* @see [Pipes](https://docs.nestjs.com/pipes)
|
|
31
|
+
*
|
|
32
|
+
* @publicApi
|
|
33
|
+
*/
|
|
34
|
+
export interface PipeTransform<T = any, R = any> {
|
|
35
|
+
/**
|
|
36
|
+
* Method to implement a custom pipe. Called with two parameters
|
|
37
|
+
*
|
|
38
|
+
* @param value argument before it is received by route handler method
|
|
39
|
+
* @param metadata contains metadata about the value
|
|
40
|
+
*/
|
|
41
|
+
transform(value: T, metadata: ArgumentMetadata): R;
|
|
42
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./before-application-shutdown.interface"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./on-application-bootstrap.interface"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./on-application-shutdown.interface"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./on-destroy.interface"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./on-init.interface"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface defining method called once the application has fully started and
|
|
3
|
+
* is bootstrapped.
|
|
4
|
+
*
|
|
5
|
+
* @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)
|
|
6
|
+
*
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
export interface OnApplicationBootstrap {
|
|
10
|
+
onApplicationBootstrap(): any;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface defining method to respond to system signals (when application gets
|
|
3
|
+
* shutdown by, e.g., SIGTERM)
|
|
4
|
+
*
|
|
5
|
+
* @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)
|
|
6
|
+
*
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
export interface OnApplicationShutdown {
|
|
10
|
+
onApplicationShutdown(signal?: string): any;
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface defining method called just before Nest destroys the host module
|
|
3
|
+
* (`app.close()` method has been evaluated). Use to perform cleanup on
|
|
4
|
+
* resources (e.g., Database connections).
|
|
5
|
+
*
|
|
6
|
+
* @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)
|
|
7
|
+
*
|
|
8
|
+
* @publicApi
|
|
9
|
+
*/
|
|
10
|
+
export interface OnModuleDestroy {
|
|
11
|
+
onModuleDestroy(): any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { RequestMethod } from '../../enums';
|
|
2
|
+
import { NestApplicationOptions } from '../../interfaces/nest-application-options.interface';
|
|
3
|
+
import { VersionValue, VersioningOptions } from '../version-options.interface';
|
|
4
|
+
export type ErrorHandler<TRequest = any, TResponse = any> = (error: any, req: TRequest, res: TResponse, next?: Function) => any;
|
|
5
|
+
export type RequestHandler<TRequest = any, TResponse = any> = (req: TRequest, res: TResponse, next?: Function) => any;
|
|
6
|
+
export interface HttpServer<TRequest = any, TResponse = any, ServerInstance = any> {
|
|
7
|
+
use(handler: RequestHandler<TRequest, TResponse> | ErrorHandler<TRequest, TResponse>): any;
|
|
8
|
+
use(path: string, handler: RequestHandler<TRequest, TResponse> | ErrorHandler<TRequest, TResponse>): any;
|
|
9
|
+
useBodyParser?(...args: any[]): any;
|
|
10
|
+
get(handler: RequestHandler<TRequest, TResponse>): any;
|
|
11
|
+
get(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
12
|
+
post(handler: RequestHandler<TRequest, TResponse>): any;
|
|
13
|
+
post(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
14
|
+
head(handler: RequestHandler<TRequest, TResponse>): any;
|
|
15
|
+
head(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
16
|
+
delete(handler: RequestHandler<TRequest, TResponse>): any;
|
|
17
|
+
delete(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
18
|
+
put(handler: RequestHandler<TRequest, TResponse>): any;
|
|
19
|
+
put(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
20
|
+
patch(handler: RequestHandler<TRequest, TResponse>): any;
|
|
21
|
+
patch(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
22
|
+
propfind?(handler: RequestHandler<TRequest, TResponse>): any;
|
|
23
|
+
propfind?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
24
|
+
proppatch?(handler: RequestHandler<TRequest, TResponse>): any;
|
|
25
|
+
proppatch?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
26
|
+
mkcol?(handler: RequestHandler<TRequest, TResponse>): any;
|
|
27
|
+
mkcol?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
28
|
+
copy?(handler: RequestHandler<TRequest, TResponse>): any;
|
|
29
|
+
copy?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
30
|
+
move?(handler: RequestHandler<TRequest, TResponse>): any;
|
|
31
|
+
move?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
32
|
+
lock?(handler: RequestHandler<TRequest, TResponse>): any;
|
|
33
|
+
lock?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
34
|
+
unlock?(handler: RequestHandler<TRequest, TResponse>): any;
|
|
35
|
+
unlock?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
36
|
+
all(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
37
|
+
all(handler: RequestHandler<TRequest, TResponse>): any;
|
|
38
|
+
options(handler: RequestHandler<TRequest, TResponse>): any;
|
|
39
|
+
options(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
40
|
+
search?(handler: RequestHandler<TRequest, TResponse>): any;
|
|
41
|
+
search?(path: string, handler: RequestHandler<TRequest, TResponse>): any;
|
|
42
|
+
listen(port: number | string, callback?: () => void): any;
|
|
43
|
+
listen(port: number | string, hostname: string, callback?: () => void): any;
|
|
44
|
+
reply(response: any, body: any, statusCode?: number): any;
|
|
45
|
+
status(response: any, statusCode: number): any;
|
|
46
|
+
end(response: any, message?: string): any;
|
|
47
|
+
render(response: any, view: string, options: any): any;
|
|
48
|
+
redirect(response: any, statusCode: number, url: string): any;
|
|
49
|
+
isHeadersSent(response: any): boolean;
|
|
50
|
+
setHeader(response: any, name: string, value: string): any;
|
|
51
|
+
setErrorHandler?(handler: Function, prefix?: string): any;
|
|
52
|
+
setNotFoundHandler?(handler: Function, prefix?: string): any;
|
|
53
|
+
useStaticAssets?(...args: any[]): this;
|
|
54
|
+
setBaseViewsDir?(path: string | string[]): this;
|
|
55
|
+
setViewEngine?(engineOrOptions: any): this;
|
|
56
|
+
createMiddlewareFactory(method: RequestMethod): ((path: string, callback: Function) => any) | Promise<(path: string, callback: Function) => any>;
|
|
57
|
+
getRequestHostname?(request: TRequest): string;
|
|
58
|
+
getRequestMethod?(request: TRequest): string;
|
|
59
|
+
getRequestUrl?(request: TRequest): string;
|
|
60
|
+
getInstance(): ServerInstance;
|
|
61
|
+
registerParserMiddleware(...args: any[]): any;
|
|
62
|
+
enableCors(options: any): any;
|
|
63
|
+
getHttpServer(): any;
|
|
64
|
+
initHttpServer(options: NestApplicationOptions): void;
|
|
65
|
+
close(): any;
|
|
66
|
+
getType(): string;
|
|
67
|
+
init?(): Promise<void>;
|
|
68
|
+
applyVersionFilter(handler: Function, version: VersionValue, versioningOptions: VersioningOptions): (req: TRequest, res: TResponse, next: () => void) => Function;
|
|
69
|
+
normalizePath?(path: string): string;
|
|
70
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./http-exception-body.interface"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./http-redirect-response.interface"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./http-server.interface"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./message-event.interface"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./raw-body-request.interface"), exports);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export * from './abstract.interface';
|
|
2
|
+
export * from './controllers/controller-metadata.interface';
|
|
3
|
+
export * from './controllers/controller.interface';
|
|
4
|
+
export * from './exceptions/exception-filter.interface';
|
|
5
|
+
export * from './exceptions/rpc-exception-filter.interface';
|
|
6
|
+
export * from './exceptions/ws-exception-filter.interface';
|
|
7
|
+
export * from './external/validation-error.interface';
|
|
8
|
+
export * from './features/arguments-host.interface';
|
|
9
|
+
export * from './features/can-activate.interface';
|
|
10
|
+
export * from './features/custom-route-param-factory.interface';
|
|
11
|
+
export * from './features/execution-context.interface';
|
|
12
|
+
export * from './features/nest-interceptor.interface';
|
|
13
|
+
export * from './features/paramtype.interface';
|
|
14
|
+
export * from './features/pipe-transform.interface';
|
|
15
|
+
export * from './global-prefix-options.interface';
|
|
16
|
+
export * from './hooks';
|
|
17
|
+
export * from './http';
|
|
18
|
+
export * from './injectable.interface';
|
|
19
|
+
export * from './microservices/nest-hybrid-application-options.interface';
|
|
20
|
+
export * from './middleware';
|
|
21
|
+
export * from './modules';
|
|
22
|
+
export * from './nest-application-context.interface';
|
|
23
|
+
export * from './nest-application-options.interface';
|
|
24
|
+
export * from './nest-application.interface';
|
|
25
|
+
export * from './nest-microservice.interface';
|
|
26
|
+
export * from './scope-options.interface';
|
|
27
|
+
export * from './shutdown-hooks-options.interface';
|
|
28
|
+
export * from './type.interface';
|
|
29
|
+
export * from './version-options.interface';
|
|
30
|
+
export * from './websockets/web-socket-adapter.interface';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./abstract.interface"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./controllers/controller-metadata.interface"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./controllers/controller.interface"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./exceptions/exception-filter.interface"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./exceptions/rpc-exception-filter.interface"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./exceptions/ws-exception-filter.interface"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./external/validation-error.interface"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./features/arguments-host.interface"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./features/can-activate.interface"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./features/custom-route-param-factory.interface"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./features/execution-context.interface"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./features/nest-interceptor.interface"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./features/paramtype.interface"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./features/pipe-transform.interface"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./global-prefix-options.interface"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./hooks"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./http"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./injectable.interface"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./microservices/nest-hybrid-application-options.interface"), exports);
|
|
23
|
+
tslib_1.__exportStar(require("./middleware"), exports);
|
|
24
|
+
tslib_1.__exportStar(require("./modules"), exports);
|
|
25
|
+
tslib_1.__exportStar(require("./nest-application-context.interface"), exports);
|
|
26
|
+
tslib_1.__exportStar(require("./nest-application-options.interface"), exports);
|
|
27
|
+
tslib_1.__exportStar(require("./nest-application.interface"), exports);
|
|
28
|
+
tslib_1.__exportStar(require("./nest-microservice.interface"), exports);
|
|
29
|
+
tslib_1.__exportStar(require("./scope-options.interface"), exports);
|
|
30
|
+
tslib_1.__exportStar(require("./shutdown-hooks-options.interface"), exports);
|
|
31
|
+
tslib_1.__exportStar(require("./type.interface"), exports);
|
|
32
|
+
tslib_1.__exportStar(require("./version-options.interface"), exports);
|
|
33
|
+
tslib_1.__exportStar(require("./websockets/web-socket-adapter.interface"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Injectable = unknown;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./middleware-config-proxy.interface"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./middleware-configuration.interface"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./middleware-consumer.interface"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./nest-middleware.interface"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Type } from '../type.interface';
|
|
2
|
+
import { RouteInfo } from './middleware-configuration.interface';
|
|
3
|
+
import { MiddlewareConsumer } from './middleware-consumer.interface';
|
|
4
|
+
/**
|
|
5
|
+
* @publicApi
|
|
6
|
+
*/
|
|
7
|
+
export interface MiddlewareConfigProxy {
|
|
8
|
+
/**
|
|
9
|
+
* Routes to exclude from the current middleware.
|
|
10
|
+
*
|
|
11
|
+
* @param {(string | RouteInfo)[]} routes
|
|
12
|
+
* @returns {MiddlewareConfigProxy}
|
|
13
|
+
*/
|
|
14
|
+
exclude(...routes: (string | RouteInfo)[]): MiddlewareConfigProxy;
|
|
15
|
+
/**
|
|
16
|
+
* Attaches either routes or controllers to the current middleware.
|
|
17
|
+
* If you pass a controller class, Nest will attach the current middleware to every path
|
|
18
|
+
* defined within it.
|
|
19
|
+
*
|
|
20
|
+
* @param {(string | Type | RouteInfo)[]} routes
|
|
21
|
+
* @returns {MiddlewareConsumer}
|
|
22
|
+
*/
|
|
23
|
+
forRoutes(...routes: (string | Type<any> | RouteInfo)[]): MiddlewareConsumer;
|
|
24
|
+
}
|