@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,10 @@
|
|
|
1
|
+
import { METHOD_METADATA } from '../../constants';
|
|
2
|
+
import { RequestMethod } from '../../enums/request-method.enum';
|
|
3
|
+
/**
|
|
4
|
+
* Declares this route as a Server-Sent-Events endpoint
|
|
5
|
+
*
|
|
6
|
+
* @publicApi
|
|
7
|
+
*/
|
|
8
|
+
export declare function Sse(path?: string, options?: {
|
|
9
|
+
[METHOD_METADATA]?: RequestMethod;
|
|
10
|
+
}): MethodDecorator;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Sse = Sse;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
const request_method_enum_1 = require("../../enums/request-method.enum");
|
|
6
|
+
/**
|
|
7
|
+
* Declares this route as a Server-Sent-Events endpoint
|
|
8
|
+
*
|
|
9
|
+
* @publicApi
|
|
10
|
+
*/
|
|
11
|
+
function Sse(path, options = {
|
|
12
|
+
[constants_1.METHOD_METADATA]: request_method_enum_1.RequestMethod.GET,
|
|
13
|
+
}) {
|
|
14
|
+
return (target, key, descriptor) => {
|
|
15
|
+
path = path && path.length ? path : '/';
|
|
16
|
+
Reflect.defineMetadata(constants_1.PATH_METADATA, path, descriptor.value);
|
|
17
|
+
Reflect.defineMetadata(constants_1.METHOD_METADATA, options[constants_1.METHOD_METADATA], descriptor.value);
|
|
18
|
+
Reflect.defineMetadata(constants_1.SSE_METADATA, true, descriptor.value);
|
|
19
|
+
return descriptor;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./core"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./modules"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./http"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decorator that makes a module global-scoped.
|
|
3
|
+
*
|
|
4
|
+
* Once imported into any module, a global-scoped module will be visible
|
|
5
|
+
* in all modules. Thereafter, modules that wish to inject a service exported
|
|
6
|
+
* from a global module do not need to import the provider module.
|
|
7
|
+
*
|
|
8
|
+
* @see [Global modules](https://docs.nestjs.com/modules#global-modules)
|
|
9
|
+
*
|
|
10
|
+
* @publicApi
|
|
11
|
+
*/
|
|
12
|
+
export declare function Global(): ClassDecorator;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Global = Global;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
/**
|
|
6
|
+
* Decorator that makes a module global-scoped.
|
|
7
|
+
*
|
|
8
|
+
* Once imported into any module, a global-scoped module will be visible
|
|
9
|
+
* in all modules. Thereafter, modules that wish to inject a service exported
|
|
10
|
+
* from a global module do not need to import the provider module.
|
|
11
|
+
*
|
|
12
|
+
* @see [Global modules](https://docs.nestjs.com/modules#global-modules)
|
|
13
|
+
*
|
|
14
|
+
* @publicApi
|
|
15
|
+
*/
|
|
16
|
+
function Global() {
|
|
17
|
+
return (target) => {
|
|
18
|
+
Reflect.defineMetadata(constants_1.GLOBAL_MODULE_METADATA, true, target);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ModuleMetadata } from '../../interfaces/modules/module-metadata.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Decorator that marks a class as a [module](https://docs.nestjs.com/modules).
|
|
4
|
+
*
|
|
5
|
+
* Modules are used by Nest to organize the application structure into scopes. Controllers
|
|
6
|
+
* and Providers are scoped by the module they are declared in. Modules and their
|
|
7
|
+
* classes (Controllers and Providers) form a graph that determines how Nest
|
|
8
|
+
* performs [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection).
|
|
9
|
+
*
|
|
10
|
+
* @param metadata module configuration metadata
|
|
11
|
+
*
|
|
12
|
+
* @see [Modules](https://docs.nestjs.com/modules)
|
|
13
|
+
*
|
|
14
|
+
* @publicApi
|
|
15
|
+
*/
|
|
16
|
+
export declare function Module(metadata: ModuleMetadata): ClassDecorator;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Module = Module;
|
|
4
|
+
const validate_module_keys_util_1 = require("../../utils/validate-module-keys.util");
|
|
5
|
+
/**
|
|
6
|
+
* Decorator that marks a class as a [module](https://docs.nestjs.com/modules).
|
|
7
|
+
*
|
|
8
|
+
* Modules are used by Nest to organize the application structure into scopes. Controllers
|
|
9
|
+
* and Providers are scoped by the module they are declared in. Modules and their
|
|
10
|
+
* classes (Controllers and Providers) form a graph that determines how Nest
|
|
11
|
+
* performs [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection).
|
|
12
|
+
*
|
|
13
|
+
* @param metadata module configuration metadata
|
|
14
|
+
*
|
|
15
|
+
* @see [Modules](https://docs.nestjs.com/modules)
|
|
16
|
+
*
|
|
17
|
+
* @publicApi
|
|
18
|
+
*/
|
|
19
|
+
function Module(metadata) {
|
|
20
|
+
const propsKeys = Object.keys(metadata);
|
|
21
|
+
(0, validate_module_keys_util_1.validateModuleKeys)(propsKeys);
|
|
22
|
+
return (target) => {
|
|
23
|
+
for (const property in metadata) {
|
|
24
|
+
if (Object.hasOwnProperty.call(metadata, property)) {
|
|
25
|
+
Reflect.defineMetadata(property, metadata[property], target);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @publicApi
|
|
3
|
+
*/
|
|
4
|
+
export declare enum HttpStatus {
|
|
5
|
+
CONTINUE = 100,
|
|
6
|
+
SWITCHING_PROTOCOLS = 101,
|
|
7
|
+
PROCESSING = 102,
|
|
8
|
+
EARLYHINTS = 103,
|
|
9
|
+
OK = 200,
|
|
10
|
+
CREATED = 201,
|
|
11
|
+
ACCEPTED = 202,
|
|
12
|
+
NON_AUTHORITATIVE_INFORMATION = 203,
|
|
13
|
+
NO_CONTENT = 204,
|
|
14
|
+
RESET_CONTENT = 205,
|
|
15
|
+
PARTIAL_CONTENT = 206,
|
|
16
|
+
MULTI_STATUS = 207,
|
|
17
|
+
ALREADY_REPORTED = 208,
|
|
18
|
+
CONTENT_DIFFERENT = 210,
|
|
19
|
+
AMBIGUOUS = 300,
|
|
20
|
+
MOVED_PERMANENTLY = 301,
|
|
21
|
+
FOUND = 302,
|
|
22
|
+
SEE_OTHER = 303,
|
|
23
|
+
NOT_MODIFIED = 304,
|
|
24
|
+
TEMPORARY_REDIRECT = 307,
|
|
25
|
+
PERMANENT_REDIRECT = 308,
|
|
26
|
+
BAD_REQUEST = 400,
|
|
27
|
+
UNAUTHORIZED = 401,
|
|
28
|
+
PAYMENT_REQUIRED = 402,
|
|
29
|
+
FORBIDDEN = 403,
|
|
30
|
+
NOT_FOUND = 404,
|
|
31
|
+
METHOD_NOT_ALLOWED = 405,
|
|
32
|
+
NOT_ACCEPTABLE = 406,
|
|
33
|
+
PROXY_AUTHENTICATION_REQUIRED = 407,
|
|
34
|
+
REQUEST_TIMEOUT = 408,
|
|
35
|
+
CONFLICT = 409,
|
|
36
|
+
GONE = 410,
|
|
37
|
+
LENGTH_REQUIRED = 411,
|
|
38
|
+
PRECONDITION_FAILED = 412,
|
|
39
|
+
PAYLOAD_TOO_LARGE = 413,
|
|
40
|
+
URI_TOO_LONG = 414,
|
|
41
|
+
UNSUPPORTED_MEDIA_TYPE = 415,
|
|
42
|
+
REQUESTED_RANGE_NOT_SATISFIABLE = 416,
|
|
43
|
+
EXPECTATION_FAILED = 417,
|
|
44
|
+
I_AM_A_TEAPOT = 418,
|
|
45
|
+
MISDIRECTED = 421,
|
|
46
|
+
UNPROCESSABLE_ENTITY = 422,
|
|
47
|
+
LOCKED = 423,
|
|
48
|
+
FAILED_DEPENDENCY = 424,
|
|
49
|
+
PRECONDITION_REQUIRED = 428,
|
|
50
|
+
TOO_MANY_REQUESTS = 429,
|
|
51
|
+
UNRECOVERABLE_ERROR = 456,
|
|
52
|
+
INTERNAL_SERVER_ERROR = 500,
|
|
53
|
+
NOT_IMPLEMENTED = 501,
|
|
54
|
+
BAD_GATEWAY = 502,
|
|
55
|
+
SERVICE_UNAVAILABLE = 503,
|
|
56
|
+
GATEWAY_TIMEOUT = 504,
|
|
57
|
+
HTTP_VERSION_NOT_SUPPORTED = 505,
|
|
58
|
+
INSUFFICIENT_STORAGE = 507,
|
|
59
|
+
LOOP_DETECTED = 508
|
|
60
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HttpStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @publicApi
|
|
6
|
+
*/
|
|
7
|
+
var HttpStatus;
|
|
8
|
+
(function (HttpStatus) {
|
|
9
|
+
HttpStatus[HttpStatus["CONTINUE"] = 100] = "CONTINUE";
|
|
10
|
+
HttpStatus[HttpStatus["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS";
|
|
11
|
+
HttpStatus[HttpStatus["PROCESSING"] = 102] = "PROCESSING";
|
|
12
|
+
HttpStatus[HttpStatus["EARLYHINTS"] = 103] = "EARLYHINTS";
|
|
13
|
+
HttpStatus[HttpStatus["OK"] = 200] = "OK";
|
|
14
|
+
HttpStatus[HttpStatus["CREATED"] = 201] = "CREATED";
|
|
15
|
+
HttpStatus[HttpStatus["ACCEPTED"] = 202] = "ACCEPTED";
|
|
16
|
+
HttpStatus[HttpStatus["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION";
|
|
17
|
+
HttpStatus[HttpStatus["NO_CONTENT"] = 204] = "NO_CONTENT";
|
|
18
|
+
HttpStatus[HttpStatus["RESET_CONTENT"] = 205] = "RESET_CONTENT";
|
|
19
|
+
HttpStatus[HttpStatus["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
|
|
20
|
+
HttpStatus[HttpStatus["MULTI_STATUS"] = 207] = "MULTI_STATUS";
|
|
21
|
+
HttpStatus[HttpStatus["ALREADY_REPORTED"] = 208] = "ALREADY_REPORTED";
|
|
22
|
+
HttpStatus[HttpStatus["CONTENT_DIFFERENT"] = 210] = "CONTENT_DIFFERENT";
|
|
23
|
+
HttpStatus[HttpStatus["AMBIGUOUS"] = 300] = "AMBIGUOUS";
|
|
24
|
+
HttpStatus[HttpStatus["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
|
|
25
|
+
HttpStatus[HttpStatus["FOUND"] = 302] = "FOUND";
|
|
26
|
+
HttpStatus[HttpStatus["SEE_OTHER"] = 303] = "SEE_OTHER";
|
|
27
|
+
HttpStatus[HttpStatus["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
|
|
28
|
+
HttpStatus[HttpStatus["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT";
|
|
29
|
+
HttpStatus[HttpStatus["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT";
|
|
30
|
+
HttpStatus[HttpStatus["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
|
31
|
+
HttpStatus[HttpStatus["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
|
|
32
|
+
HttpStatus[HttpStatus["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
|
|
33
|
+
HttpStatus[HttpStatus["FORBIDDEN"] = 403] = "FORBIDDEN";
|
|
34
|
+
HttpStatus[HttpStatus["NOT_FOUND"] = 404] = "NOT_FOUND";
|
|
35
|
+
HttpStatus[HttpStatus["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
|
|
36
|
+
HttpStatus[HttpStatus["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
|
|
37
|
+
HttpStatus[HttpStatus["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
|
|
38
|
+
HttpStatus[HttpStatus["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
|
|
39
|
+
HttpStatus[HttpStatus["CONFLICT"] = 409] = "CONFLICT";
|
|
40
|
+
HttpStatus[HttpStatus["GONE"] = 410] = "GONE";
|
|
41
|
+
HttpStatus[HttpStatus["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
|
|
42
|
+
HttpStatus[HttpStatus["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
|
|
43
|
+
HttpStatus[HttpStatus["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
|
|
44
|
+
HttpStatus[HttpStatus["URI_TOO_LONG"] = 414] = "URI_TOO_LONG";
|
|
45
|
+
HttpStatus[HttpStatus["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
|
|
46
|
+
HttpStatus[HttpStatus["REQUESTED_RANGE_NOT_SATISFIABLE"] = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE";
|
|
47
|
+
HttpStatus[HttpStatus["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
|
|
48
|
+
HttpStatus[HttpStatus["I_AM_A_TEAPOT"] = 418] = "I_AM_A_TEAPOT";
|
|
49
|
+
HttpStatus[HttpStatus["MISDIRECTED"] = 421] = "MISDIRECTED";
|
|
50
|
+
HttpStatus[HttpStatus["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY";
|
|
51
|
+
HttpStatus[HttpStatus["LOCKED"] = 423] = "LOCKED";
|
|
52
|
+
HttpStatus[HttpStatus["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY";
|
|
53
|
+
HttpStatus[HttpStatus["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED";
|
|
54
|
+
HttpStatus[HttpStatus["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
|
55
|
+
HttpStatus[HttpStatus["UNRECOVERABLE_ERROR"] = 456] = "UNRECOVERABLE_ERROR";
|
|
56
|
+
HttpStatus[HttpStatus["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
|
57
|
+
HttpStatus[HttpStatus["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
|
|
58
|
+
HttpStatus[HttpStatus["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
|
|
59
|
+
HttpStatus[HttpStatus["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
|
|
60
|
+
HttpStatus[HttpStatus["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
|
|
61
|
+
HttpStatus[HttpStatus["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
|
|
62
|
+
HttpStatus[HttpStatus["INSUFFICIENT_STORAGE"] = 507] = "INSUFFICIENT_STORAGE";
|
|
63
|
+
HttpStatus[HttpStatus["LOOP_DETECTED"] = 508] = "LOOP_DETECTED";
|
|
64
|
+
})(HttpStatus || (exports.HttpStatus = HttpStatus = {}));
|
package/enums/index.d.ts
ADDED
package/enums/index.js
ADDED
|
@@ -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("./request-method.enum"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./http-status.enum"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./shutdown-signal.enum"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./version-type.enum"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum RequestMethod {
|
|
2
|
+
GET = 0,
|
|
3
|
+
POST = 1,
|
|
4
|
+
PUT = 2,
|
|
5
|
+
DELETE = 3,
|
|
6
|
+
PATCH = 4,
|
|
7
|
+
ALL = 5,
|
|
8
|
+
OPTIONS = 6,
|
|
9
|
+
HEAD = 7,
|
|
10
|
+
SEARCH = 8,
|
|
11
|
+
PROPFIND = 9,
|
|
12
|
+
PROPPATCH = 10,
|
|
13
|
+
MKCOL = 11,
|
|
14
|
+
COPY = 12,
|
|
15
|
+
MOVE = 13,
|
|
16
|
+
LOCK = 14,
|
|
17
|
+
UNLOCK = 15
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RequestMethod = void 0;
|
|
4
|
+
var RequestMethod;
|
|
5
|
+
(function (RequestMethod) {
|
|
6
|
+
RequestMethod[RequestMethod["GET"] = 0] = "GET";
|
|
7
|
+
RequestMethod[RequestMethod["POST"] = 1] = "POST";
|
|
8
|
+
RequestMethod[RequestMethod["PUT"] = 2] = "PUT";
|
|
9
|
+
RequestMethod[RequestMethod["DELETE"] = 3] = "DELETE";
|
|
10
|
+
RequestMethod[RequestMethod["PATCH"] = 4] = "PATCH";
|
|
11
|
+
RequestMethod[RequestMethod["ALL"] = 5] = "ALL";
|
|
12
|
+
RequestMethod[RequestMethod["OPTIONS"] = 6] = "OPTIONS";
|
|
13
|
+
RequestMethod[RequestMethod["HEAD"] = 7] = "HEAD";
|
|
14
|
+
RequestMethod[RequestMethod["SEARCH"] = 8] = "SEARCH";
|
|
15
|
+
RequestMethod[RequestMethod["PROPFIND"] = 9] = "PROPFIND";
|
|
16
|
+
RequestMethod[RequestMethod["PROPPATCH"] = 10] = "PROPPATCH";
|
|
17
|
+
RequestMethod[RequestMethod["MKCOL"] = 11] = "MKCOL";
|
|
18
|
+
RequestMethod[RequestMethod["COPY"] = 12] = "COPY";
|
|
19
|
+
RequestMethod[RequestMethod["MOVE"] = 13] = "MOVE";
|
|
20
|
+
RequestMethod[RequestMethod["LOCK"] = 14] = "LOCK";
|
|
21
|
+
RequestMethod[RequestMethod["UNLOCK"] = 15] = "UNLOCK";
|
|
22
|
+
})(RequestMethod || (exports.RequestMethod = RequestMethod = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RouteParamtypes = void 0;
|
|
4
|
+
var RouteParamtypes;
|
|
5
|
+
(function (RouteParamtypes) {
|
|
6
|
+
RouteParamtypes[RouteParamtypes["REQUEST"] = 0] = "REQUEST";
|
|
7
|
+
RouteParamtypes[RouteParamtypes["RESPONSE"] = 1] = "RESPONSE";
|
|
8
|
+
RouteParamtypes[RouteParamtypes["NEXT"] = 2] = "NEXT";
|
|
9
|
+
RouteParamtypes[RouteParamtypes["BODY"] = 3] = "BODY";
|
|
10
|
+
RouteParamtypes[RouteParamtypes["QUERY"] = 4] = "QUERY";
|
|
11
|
+
RouteParamtypes[RouteParamtypes["PARAM"] = 5] = "PARAM";
|
|
12
|
+
RouteParamtypes[RouteParamtypes["HEADERS"] = 6] = "HEADERS";
|
|
13
|
+
RouteParamtypes[RouteParamtypes["SESSION"] = 7] = "SESSION";
|
|
14
|
+
RouteParamtypes[RouteParamtypes["FILE"] = 8] = "FILE";
|
|
15
|
+
RouteParamtypes[RouteParamtypes["FILES"] = 9] = "FILES";
|
|
16
|
+
RouteParamtypes[RouteParamtypes["HOST"] = 10] = "HOST";
|
|
17
|
+
RouteParamtypes[RouteParamtypes["IP"] = 11] = "IP";
|
|
18
|
+
RouteParamtypes[RouteParamtypes["RAW_BODY"] = 12] = "RAW_BODY";
|
|
19
|
+
RouteParamtypes[RouteParamtypes["ACK"] = 13] = "ACK";
|
|
20
|
+
})(RouteParamtypes || (exports.RouteParamtypes = RouteParamtypes = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System signals which shut down a process
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ShutdownSignal {
|
|
5
|
+
SIGHUP = "SIGHUP",
|
|
6
|
+
SIGINT = "SIGINT",
|
|
7
|
+
SIGQUIT = "SIGQUIT",
|
|
8
|
+
SIGILL = "SIGILL",
|
|
9
|
+
SIGTRAP = "SIGTRAP",
|
|
10
|
+
SIGABRT = "SIGABRT",
|
|
11
|
+
SIGBUS = "SIGBUS",
|
|
12
|
+
SIGFPE = "SIGFPE",
|
|
13
|
+
SIGSEGV = "SIGSEGV",
|
|
14
|
+
SIGUSR2 = "SIGUSR2",
|
|
15
|
+
SIGTERM = "SIGTERM"
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShutdownSignal = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* System signals which shut down a process
|
|
6
|
+
*/
|
|
7
|
+
var ShutdownSignal;
|
|
8
|
+
(function (ShutdownSignal) {
|
|
9
|
+
ShutdownSignal["SIGHUP"] = "SIGHUP";
|
|
10
|
+
ShutdownSignal["SIGINT"] = "SIGINT";
|
|
11
|
+
ShutdownSignal["SIGQUIT"] = "SIGQUIT";
|
|
12
|
+
ShutdownSignal["SIGILL"] = "SIGILL";
|
|
13
|
+
ShutdownSignal["SIGTRAP"] = "SIGTRAP";
|
|
14
|
+
ShutdownSignal["SIGABRT"] = "SIGABRT";
|
|
15
|
+
ShutdownSignal["SIGBUS"] = "SIGBUS";
|
|
16
|
+
ShutdownSignal["SIGFPE"] = "SIGFPE";
|
|
17
|
+
ShutdownSignal["SIGSEGV"] = "SIGSEGV";
|
|
18
|
+
ShutdownSignal["SIGUSR2"] = "SIGUSR2";
|
|
19
|
+
ShutdownSignal["SIGTERM"] = "SIGTERM";
|
|
20
|
+
})(ShutdownSignal || (exports.ShutdownSignal = ShutdownSignal = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VersioningType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @publicApi
|
|
6
|
+
*/
|
|
7
|
+
var VersioningType;
|
|
8
|
+
(function (VersioningType) {
|
|
9
|
+
VersioningType[VersioningType["URI"] = 0] = "URI";
|
|
10
|
+
VersioningType[VersioningType["HEADER"] = 1] = "HEADER";
|
|
11
|
+
VersioningType[VersioningType["MEDIA_TYPE"] = 2] = "MEDIA_TYPE";
|
|
12
|
+
VersioningType[VersioningType["CUSTOM"] = 3] = "CUSTOM";
|
|
13
|
+
})(VersioningType || (exports.VersioningType = VersioningType = {}));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HttpException, HttpExceptionOptions } from './http.exception';
|
|
2
|
+
/**
|
|
3
|
+
* Defines an HTTP exception for *Bad Gateway* type errors.
|
|
4
|
+
*
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
|
+
*
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
export declare class BadGatewayException extends HttpException {
|
|
10
|
+
/**
|
|
11
|
+
* Instantiate a `BadGatewayException` Exception.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* `throw new BadGatewayException()`
|
|
15
|
+
*
|
|
16
|
+
* @usageNotes
|
|
17
|
+
* The HTTP response status code will be 502.
|
|
18
|
+
* - The `objectOrError` argument defines the JSON response body or the message string.
|
|
19
|
+
* - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.
|
|
20
|
+
*
|
|
21
|
+
* By default, the JSON response body contains two properties:
|
|
22
|
+
* - `statusCode`: this will be the value 502.
|
|
23
|
+
* - `message`: the string `'Bad Gateway'` by default; override this by supplying
|
|
24
|
+
* a string in the `objectOrError` parameter.
|
|
25
|
+
*
|
|
26
|
+
* If the parameter `objectOrError` is a string, the response body will contain an
|
|
27
|
+
* additional property, `error`, with a short description of the HTTP error. To override the
|
|
28
|
+
* entire JSON response body, pass an object instead. Nest will serialize the object
|
|
29
|
+
* and return it as the JSON response body.
|
|
30
|
+
*
|
|
31
|
+
* @param objectOrError string or object describing the error condition.
|
|
32
|
+
* @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause
|
|
33
|
+
*/
|
|
34
|
+
constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions);
|
|
35
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BadGatewayException = void 0;
|
|
4
|
+
const http_status_enum_1 = require("../enums/http-status.enum");
|
|
5
|
+
const http_exception_1 = require("./http.exception");
|
|
6
|
+
/**
|
|
7
|
+
* Defines an HTTP exception for *Bad Gateway* type errors.
|
|
8
|
+
*
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
|
+
*
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
class BadGatewayException extends http_exception_1.HttpException {
|
|
14
|
+
/**
|
|
15
|
+
* Instantiate a `BadGatewayException` Exception.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* `throw new BadGatewayException()`
|
|
19
|
+
*
|
|
20
|
+
* @usageNotes
|
|
21
|
+
* The HTTP response status code will be 502.
|
|
22
|
+
* - The `objectOrError` argument defines the JSON response body or the message string.
|
|
23
|
+
* - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.
|
|
24
|
+
*
|
|
25
|
+
* By default, the JSON response body contains two properties:
|
|
26
|
+
* - `statusCode`: this will be the value 502.
|
|
27
|
+
* - `message`: the string `'Bad Gateway'` by default; override this by supplying
|
|
28
|
+
* a string in the `objectOrError` parameter.
|
|
29
|
+
*
|
|
30
|
+
* If the parameter `objectOrError` is a string, the response body will contain an
|
|
31
|
+
* additional property, `error`, with a short description of the HTTP error. To override the
|
|
32
|
+
* entire JSON response body, pass an object instead. Nest will serialize the object
|
|
33
|
+
* and return it as the JSON response body.
|
|
34
|
+
*
|
|
35
|
+
* @param objectOrError string or object describing the error condition.
|
|
36
|
+
* @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause
|
|
37
|
+
*/
|
|
38
|
+
constructor(objectOrError, descriptionOrOptions = 'Bad Gateway') {
|
|
39
|
+
const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions);
|
|
40
|
+
super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.BAD_GATEWAY), http_status_enum_1.HttpStatus.BAD_GATEWAY, httpExceptionOptions);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.BadGatewayException = BadGatewayException;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HttpException, HttpExceptionOptions } from './http.exception';
|
|
2
|
+
/**
|
|
3
|
+
* Defines an HTTP exception for *Bad Request* type errors.
|
|
4
|
+
*
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
|
+
*
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
export declare class BadRequestException extends HttpException {
|
|
10
|
+
/**
|
|
11
|
+
* Instantiate a `BadRequestException` Exception.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* `throw new BadRequestException()`
|
|
15
|
+
*
|
|
16
|
+
* @usageNotes
|
|
17
|
+
* The HTTP response status code will be 400.
|
|
18
|
+
* - The `objectOrError` argument defines the JSON response body or the message string.
|
|
19
|
+
* - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.
|
|
20
|
+
*
|
|
21
|
+
* By default, the JSON response body contains two properties:
|
|
22
|
+
* - `statusCode`: this will be the value 400.
|
|
23
|
+
* - `message`: the string `'Bad Request'` by default; override this by supplying
|
|
24
|
+
* a string in the `objectOrError` parameter.
|
|
25
|
+
*
|
|
26
|
+
* If the parameter `objectOrError` is a string, the response body will contain an
|
|
27
|
+
* additional property, `error`, with a short description of the HTTP error. To override the
|
|
28
|
+
* entire JSON response body, pass an object instead. Nest will serialize the object
|
|
29
|
+
* and return it as the JSON response body.
|
|
30
|
+
*
|
|
31
|
+
* @param objectOrError string or object describing the error condition.
|
|
32
|
+
* @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause
|
|
33
|
+
*/
|
|
34
|
+
constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions);
|
|
35
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BadRequestException = void 0;
|
|
4
|
+
const http_status_enum_1 = require("../enums/http-status.enum");
|
|
5
|
+
const http_exception_1 = require("./http.exception");
|
|
6
|
+
/**
|
|
7
|
+
* Defines an HTTP exception for *Bad Request* type errors.
|
|
8
|
+
*
|
|
9
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
10
|
+
*
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
class BadRequestException extends http_exception_1.HttpException {
|
|
14
|
+
/**
|
|
15
|
+
* Instantiate a `BadRequestException` Exception.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* `throw new BadRequestException()`
|
|
19
|
+
*
|
|
20
|
+
* @usageNotes
|
|
21
|
+
* The HTTP response status code will be 400.
|
|
22
|
+
* - The `objectOrError` argument defines the JSON response body or the message string.
|
|
23
|
+
* - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.
|
|
24
|
+
*
|
|
25
|
+
* By default, the JSON response body contains two properties:
|
|
26
|
+
* - `statusCode`: this will be the value 400.
|
|
27
|
+
* - `message`: the string `'Bad Request'` by default; override this by supplying
|
|
28
|
+
* a string in the `objectOrError` parameter.
|
|
29
|
+
*
|
|
30
|
+
* If the parameter `objectOrError` is a string, the response body will contain an
|
|
31
|
+
* additional property, `error`, with a short description of the HTTP error. To override the
|
|
32
|
+
* entire JSON response body, pass an object instead. Nest will serialize the object
|
|
33
|
+
* and return it as the JSON response body.
|
|
34
|
+
*
|
|
35
|
+
* @param objectOrError string or object describing the error condition.
|
|
36
|
+
* @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause
|
|
37
|
+
*/
|
|
38
|
+
constructor(objectOrError, descriptionOrOptions = 'Bad Request') {
|
|
39
|
+
const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions);
|
|
40
|
+
super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.BAD_REQUEST), http_status_enum_1.HttpStatus.BAD_REQUEST, httpExceptionOptions);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.BadRequestException = BadRequestException;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HttpException, HttpExceptionOptions } from './http.exception';
|
|
2
|
+
/**
|
|
3
|
+
* Defines an HTTP exception for *Conflict* type errors.
|
|
4
|
+
*
|
|
5
|
+
* @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)
|
|
6
|
+
*
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
export declare class ConflictException extends HttpException {
|
|
10
|
+
/**
|
|
11
|
+
* Instantiate a `ConflictException` Exception.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* `throw new ConflictException()`
|
|
15
|
+
*
|
|
16
|
+
* @usageNotes
|
|
17
|
+
* The HTTP response status code will be 409.
|
|
18
|
+
* - The `objectOrError` argument defines the JSON response body or the message string.
|
|
19
|
+
* - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause.
|
|
20
|
+
*
|
|
21
|
+
* By default, the JSON response body contains two properties:
|
|
22
|
+
* - `statusCode`: this will be the value 409.
|
|
23
|
+
* - `message`: the string `'Conflict'` by default; override this by supplying
|
|
24
|
+
* a string in the `objectOrError` parameter.
|
|
25
|
+
*
|
|
26
|
+
* If the parameter `objectOrError` is a string, the response body will contain an
|
|
27
|
+
* additional property, `error`, with a short description of the HTTP error. To override the
|
|
28
|
+
* entire JSON response body, pass an object instead. Nest will serialize the object
|
|
29
|
+
* and return it as the JSON response body.
|
|
30
|
+
*
|
|
31
|
+
* @param objectOrError string or object describing the error condition.
|
|
32
|
+
* @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause
|
|
33
|
+
*/
|
|
34
|
+
constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions);
|
|
35
|
+
}
|