@elsikora/nestjs-crud-automator 1.1.0
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/dist/class/api/base-service.class.d.ts +8 -0
- package/dist/class/api/base-service.class.js +13 -0
- package/dist/class/api/base-service.class.js.map +1 -0
- package/dist/class/api/index.d.ts +1 -0
- package/dist/class/api/index.js +18 -0
- package/dist/class/api/index.js.map +1 -0
- package/dist/class/index.d.ts +1 -0
- package/dist/class/index.js +18 -0
- package/dist/class/index.js.map +1 -0
- package/dist/constant/date.constant.d.ts +4 -0
- package/dist/constant/date.constant.js +10 -0
- package/dist/constant/date.constant.js.map +1 -0
- package/dist/constant/decorator/api/function.constant.d.ts +4 -0
- package/dist/constant/decorator/api/function.constant.js +9 -0
- package/dist/constant/decorator/api/function.constant.js.map +1 -0
- package/dist/constant/decorator/api/index.d.ts +1 -0
- package/dist/constant/decorator/api/index.js +18 -0
- package/dist/constant/decorator/api/index.js.map +1 -0
- package/dist/constant/decorator/index.d.ts +1 -0
- package/dist/constant/decorator/index.js +18 -0
- package/dist/constant/decorator/index.js.map +1 -0
- package/dist/constant/dto/exception.constant.d.ts +6 -0
- package/dist/constant/dto/exception.constant.js +14 -0
- package/dist/constant/dto/exception.constant.js.map +1 -0
- package/dist/constant/dto/index.d.ts +1 -0
- package/dist/constant/dto/index.js +18 -0
- package/dist/constant/dto/index.js.map +1 -0
- package/dist/constant/index.d.ts +5 -0
- package/dist/constant/index.js +22 -0
- package/dist/constant/index.js.map +1 -0
- package/dist/constant/interface/api/filter.constant.d.ts +3 -0
- package/dist/constant/interface/api/filter.constant.js +12 -0
- package/dist/constant/interface/api/filter.constant.js.map +1 -0
- package/dist/constant/interface/api/index.d.ts +1 -0
- package/dist/constant/interface/api/index.js +18 -0
- package/dist/constant/interface/api/index.js.map +1 -0
- package/dist/constant/interface/api/property/index.d.ts +2 -0
- package/dist/constant/interface/api/property/index.js +19 -0
- package/dist/constant/interface/api/property/index.js.map +1 -0
- package/dist/constant/interface/api/property/string.constant.d.ts +6 -0
- package/dist/constant/interface/api/property/string.constant.js +12 -0
- package/dist/constant/interface/api/property/string.constant.js.map +1 -0
- package/dist/constant/interface/api/property/wallet.constant.d.ts +5 -0
- package/dist/constant/interface/api/property/wallet.constant.js +12 -0
- package/dist/constant/interface/api/property/wallet.constant.js.map +1 -0
- package/dist/constant/interface/index.d.ts +1 -0
- package/dist/constant/interface/index.js +18 -0
- package/dist/constant/interface/index.js.map +1 -0
- package/dist/constant/number.constant.d.ts +18 -0
- package/dist/constant/number.constant.js +38 -0
- package/dist/constant/number.constant.js.map +1 -0
- package/dist/decorator/api/function/decorator.d.ts +7 -0
- package/dist/decorator/api/function/decorator.js +27 -0
- package/dist/decorator/api/function/decorator.js.map +1 -0
- package/dist/decorator/api/function/get-list.decorator.d.ts +5 -0
- package/dist/decorator/api/function/get-list.decorator.js +129 -0
- package/dist/decorator/api/function/get-list.decorator.js.map +1 -0
- package/dist/decorator/api/function/get.decorator.d.ts +4 -0
- package/dist/decorator/api/function/get.decorator.js +58 -0
- package/dist/decorator/api/function/get.decorator.js.map +1 -0
- package/dist/decorator/api/function/index.d.ts +2 -0
- package/dist/decorator/api/function/index.js +19 -0
- package/dist/decorator/api/function/index.js.map +1 -0
- package/dist/decorator/api/index.d.ts +3 -0
- package/dist/decorator/api/index.js +20 -0
- package/dist/decorator/api/index.js.map +1 -0
- package/dist/decorator/api/method.decorator.d.ts +2 -0
- package/dist/decorator/api/method.decorator.js +203 -0
- package/dist/decorator/api/method.decorator.js.map +1 -0
- package/dist/decorator/api/property/boolean.decorator.d.ts +2 -0
- package/dist/decorator/api/property/boolean.decorator.js +77 -0
- package/dist/decorator/api/property/boolean.decorator.js.map +1 -0
- package/dist/decorator/api/property/date.decorator.d.ts +2 -0
- package/dist/decorator/api/property/date.decorator.js +87 -0
- package/dist/decorator/api/property/date.decorator.js.map +1 -0
- package/dist/decorator/api/property/index.d.ts +7 -0
- package/dist/decorator/api/property/index.js +24 -0
- package/dist/decorator/api/property/index.js.map +1 -0
- package/dist/decorator/api/property/number.decorator.d.ts +2 -0
- package/dist/decorator/api/property/number.decorator.js +146 -0
- package/dist/decorator/api/property/number.decorator.js.map +1 -0
- package/dist/decorator/api/property/object.decorator.d.ts +2 -0
- package/dist/decorator/api/property/object.decorator.js +124 -0
- package/dist/decorator/api/property/object.decorator.js.map +1 -0
- package/dist/decorator/api/property/string.decorator.d.ts +2 -0
- package/dist/decorator/api/property/string.decorator.js +282 -0
- package/dist/decorator/api/property/string.decorator.js.map +1 -0
- package/dist/decorator/api/property/uuid.decorator.d.ts +2 -0
- package/dist/decorator/api/property/uuid.decorator.js +63 -0
- package/dist/decorator/api/property/uuid.decorator.js.map +1 -0
- package/dist/decorator/api/property/wallet.decorator.d.ts +2 -0
- package/dist/decorator/api/property/wallet.decorator.js +25 -0
- package/dist/decorator/api/property/wallet.decorator.js.map +1 -0
- package/dist/decorator/api/service.decorator.d.ts +8 -0
- package/dist/decorator/api/service.decorator.js +71 -0
- package/dist/decorator/api/service.decorator.js.map +1 -0
- package/dist/decorator/index.d.ts +1 -0
- package/dist/decorator/index.js +18 -0
- package/dist/decorator/index.js.map +1 -0
- package/dist/dto/exception/bad-request.dto.d.ts +8 -0
- package/dist/dto/exception/bad-request.dto.js +84 -0
- package/dist/dto/exception/bad-request.dto.js.map +1 -0
- package/dist/dto/exception/conflict.dto.d.ts +8 -0
- package/dist/dto/exception/conflict.dto.js +84 -0
- package/dist/dto/exception/conflict.dto.js.map +1 -0
- package/dist/dto/exception/forbidden.dto.d.ts +8 -0
- package/dist/dto/exception/forbidden.dto.js +84 -0
- package/dist/dto/exception/forbidden.dto.js.map +1 -0
- package/dist/dto/exception/index.d.ts +7 -0
- package/dist/dto/exception/index.js +24 -0
- package/dist/dto/exception/index.js.map +1 -0
- package/dist/dto/exception/internal-server-error.dto.d.ts +8 -0
- package/dist/dto/exception/internal-server-error.dto.js +84 -0
- package/dist/dto/exception/internal-server-error.dto.js.map +1 -0
- package/dist/dto/exception/not-found.dto.d.ts +8 -0
- package/dist/dto/exception/not-found.dto.js +84 -0
- package/dist/dto/exception/not-found.dto.js.map +1 -0
- package/dist/dto/exception/too-many-requests.dto.d.ts +8 -0
- package/dist/dto/exception/too-many-requests.dto.js +84 -0
- package/dist/dto/exception/too-many-requests.dto.js.map +1 -0
- package/dist/dto/exception/unauthorized.dto.d.ts +8 -0
- package/dist/dto/exception/unauthorized.dto.js +84 -0
- package/dist/dto/exception/unauthorized.dto.js.map +1 -0
- package/dist/dto/index.d.ts +1 -0
- package/dist/dto/index.js +18 -0
- package/dist/dto/index.js.map +1 -0
- package/dist/enum/decorator/api/action.enum.d.ts +14 -0
- package/dist/enum/decorator/api/action.enum.js +19 -0
- package/dist/enum/decorator/api/action.enum.js.map +1 -0
- package/dist/enum/decorator/api/authentication-type.enum.d.ts +5 -0
- package/dist/enum/decorator/api/authentication-type.enum.js +10 -0
- package/dist/enum/decorator/api/authentication-type.enum.js.map +1 -0
- package/dist/enum/decorator/api/function/index.d.ts +1 -0
- package/dist/enum/decorator/api/function/index.js +18 -0
- package/dist/enum/decorator/api/function/index.js.map +1 -0
- package/dist/enum/decorator/api/function/type.enum.d.ts +10 -0
- package/dist/enum/decorator/api/function/type.enum.js +15 -0
- package/dist/enum/decorator/api/function/type.enum.js.map +1 -0
- package/dist/enum/decorator/api/index.d.ts +4 -0
- package/dist/enum/decorator/api/index.js +21 -0
- package/dist/enum/decorator/api/index.js.map +1 -0
- package/dist/enum/decorator/api/property/data-type.enum.d.ts +23 -0
- package/dist/enum/decorator/api/property/data-type.enum.js +42 -0
- package/dist/enum/decorator/api/property/data-type.enum.js.map +1 -0
- package/dist/enum/decorator/api/property/date-type.enum.d.ts +14 -0
- package/dist/enum/decorator/api/property/date-type.enum.js +19 -0
- package/dist/enum/decorator/api/property/date-type.enum.js.map +1 -0
- package/dist/enum/decorator/api/property/index.d.ts +2 -0
- package/dist/enum/decorator/api/property/index.js +19 -0
- package/dist/enum/decorator/api/property/index.js.map +1 -0
- package/dist/enum/decorator/index.d.ts +1 -0
- package/dist/enum/decorator/index.js +18 -0
- package/dist/enum/decorator/index.js.map +1 -0
- package/dist/enum/filter-order-direction.enum.d.ts +4 -0
- package/dist/enum/filter-order-direction.enum.js +9 -0
- package/dist/enum/filter-order-direction.enum.js.map +1 -0
- package/dist/enum/index.d.ts +3 -0
- package/dist/enum/index.js +20 -0
- package/dist/enum/index.js.map +1 -0
- package/dist/enum/utility/error-string-action.enum.d.ts +55 -0
- package/dist/enum/utility/error-string-action.enum.js +60 -0
- package/dist/enum/utility/error-string-action.enum.js.map +1 -0
- package/dist/enum/utility/index.d.ts +1 -0
- package/dist/enum/utility/index.js +18 -0
- package/dist/enum/utility/index.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/interceptor/correlation-id-response-body.interceptor.d.ts +5 -0
- package/dist/interceptor/correlation-id-response-body.interceptor.js +90 -0
- package/dist/interceptor/correlation-id-response-body.interceptor.js.map +1 -0
- package/dist/interceptor/index.d.ts +1 -0
- package/dist/interceptor/index.js +18 -0
- package/dist/interceptor/index.js.map +1 -0
- package/dist/interface/api-base-entity.interface.d.ts +3 -0
- package/dist/interface/api-base-entity.interface.js +3 -0
- package/dist/interface/api-base-entity.interface.js.map +1 -0
- package/dist/interface/decorator/api/function/index.d.ts +1 -0
- package/dist/interface/decorator/api/function/index.js +3 -0
- package/dist/interface/decorator/api/function/index.js.map +1 -0
- package/dist/interface/decorator/api/get-list-response-result.interface.d.ts +7 -0
- package/dist/interface/decorator/api/get-list-response-result.interface.js +3 -0
- package/dist/interface/decorator/api/get-list-response-result.interface.js.map +1 -0
- package/dist/interface/decorator/api/index.d.ts +5 -0
- package/dist/interface/decorator/api/index.js +22 -0
- package/dist/interface/decorator/api/index.js.map +1 -0
- package/dist/interface/decorator/api/method/index.d.ts +2 -0
- package/dist/interface/decorator/api/method/index.js +19 -0
- package/dist/interface/decorator/api/method/index.js.map +1 -0
- package/dist/interface/decorator/api/method/properties.interface.d.ts +16 -0
- package/dist/interface/decorator/api/method/properties.interface.js +3 -0
- package/dist/interface/decorator/api/method/properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/method/throttler-properties.interface.d.ts +4 -0
- package/dist/interface/decorator/api/method/throttler-properties.interface.js +3 -0
- package/dist/interface/decorator/api/method/throttler-properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/property/base-properties.interface.d.ts +13 -0
- package/dist/interface/decorator/api/property/base-properties.interface.js +3 -0
- package/dist/interface/decorator/api/property/base-properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/property/date-properties.interface.d.ts +5 -0
- package/dist/interface/decorator/api/property/date-properties.interface.js +3 -0
- package/dist/interface/decorator/api/property/date-properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/property/index.d.ts +6 -0
- package/dist/interface/decorator/api/property/index.js +23 -0
- package/dist/interface/decorator/api/property/index.js.map +1 -0
- package/dist/interface/decorator/api/property/number-properties.interface.d.ts +9 -0
- package/dist/interface/decorator/api/property/number-properties.interface.js +3 -0
- package/dist/interface/decorator/api/property/number-properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/property/object-properties.interface.d.ts +10 -0
- package/dist/interface/decorator/api/property/object-properties.interface.js +3 -0
- package/dist/interface/decorator/api/property/object-properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/property/string-properties.interface.d.ts +10 -0
- package/dist/interface/decorator/api/property/string-properties.interface.js +3 -0
- package/dist/interface/decorator/api/property/string-properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/property/uuid-properties.interface.d.ts +8 -0
- package/dist/interface/decorator/api/property/uuid-properties.interface.js +3 -0
- package/dist/interface/decorator/api/property/uuid-properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/response-type.interface.d.ts +9 -0
- package/dist/interface/decorator/api/response-type.interface.js +3 -0
- package/dist/interface/decorator/api/response-type.interface.js.map +1 -0
- package/dist/interface/decorator/index.d.ts +1 -0
- package/dist/interface/decorator/index.js +18 -0
- package/dist/interface/decorator/index.js.map +1 -0
- package/dist/interface/index.d.ts +4 -0
- package/dist/interface/index.js +21 -0
- package/dist/interface/index.js.map +1 -0
- package/dist/interface/service.interface.d.ts +1 -0
- package/dist/interface/service.interface.js +3 -0
- package/dist/interface/service.interface.js.map +1 -0
- package/dist/interface/utility/error-string-properties.interface.d.ts +5 -0
- package/dist/interface/utility/error-string-properties.interface.js +3 -0
- package/dist/interface/utility/error-string-properties.interface.js.map +1 -0
- package/dist/interface/utility/index.d.ts +1 -0
- package/dist/interface/utility/index.js +18 -0
- package/dist/interface/utility/index.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/type/api/filter/allowed-types.type.d.ts +1 -0
- package/dist/type/api/filter/allowed-types.type.js +3 -0
- package/dist/type/api/filter/allowed-types.type.js.map +1 -0
- package/dist/type/api/filter/extracted-allowed-types.type.d.ts +2 -0
- package/dist/type/api/filter/extracted-allowed-types.type.js +3 -0
- package/dist/type/api/filter/extracted-allowed-types.type.js.map +1 -0
- package/dist/type/api/filter/field-selector.type.d.ts +3 -0
- package/dist/type/api/filter/field-selector.type.js +3 -0
- package/dist/type/api/filter/field-selector.type.js.map +1 -0
- package/dist/type/api/filter/index.d.ts +4 -0
- package/dist/type/api/filter/index.js +21 -0
- package/dist/type/api/filter/index.js.map +1 -0
- package/dist/type/api/filter/order-by.type.d.ts +5 -0
- package/dist/type/api/filter/order-by.type.js +3 -0
- package/dist/type/api/filter/order-by.type.js.map +1 -0
- package/dist/type/api/function/get-list-properties.type.d.ts +23 -0
- package/dist/type/api/function/get-list-properties.type.js +3 -0
- package/dist/type/api/function/get-list-properties.type.js.map +1 -0
- package/dist/type/api/function/get-properties.type.d.ts +6 -0
- package/dist/type/api/function/get-properties.type.js +3 -0
- package/dist/type/api/function/get-properties.type.js.map +1 -0
- package/dist/type/api/function/index.d.ts +1 -0
- package/dist/type/api/function/index.js +18 -0
- package/dist/type/api/function/index.js.map +1 -0
- package/dist/type/api/index.d.ts +2 -0
- package/dist/type/api/index.js +19 -0
- package/dist/type/api/index.js.map +1 -0
- package/dist/type/index.d.ts +1 -0
- package/dist/type/index.js +18 -0
- package/dist/type/index.js.map +1 -0
- package/dist/utility/api/filter-order-by-from-entity.utility.d.ts +4 -0
- package/dist/utility/api/filter-order-by-from-entity.utility.js +34 -0
- package/dist/utility/api/filter-order-by-from-entity.utility.js.map +1 -0
- package/dist/utility/api/index.d.ts +1 -0
- package/dist/utility/api/index.js +18 -0
- package/dist/utility/api/index.js.map +1 -0
- package/dist/utility/create-rest-application.utility.d.ts +3 -0
- package/dist/utility/create-rest-application.utility.js +9 -0
- package/dist/utility/create-rest-application.utility.js.map +1 -0
- package/dist/utility/error-string.utility.d.ts +2 -0
- package/dist/utility/error-string.utility.js +7 -0
- package/dist/utility/error-string.utility.js.map +1 -0
- package/dist/utility/index.d.ts +3 -0
- package/dist/utility/index.js +20 -0
- package/dist/utility/index.js.map +1 -0
- package/dist/validator/index.d.ts +1 -0
- package/dist/validator/index.js +18 -0
- package/dist/validator/index.js.map +1 -0
- package/dist/validator/is-regular-expression.validator.d.ts +4 -0
- package/dist/validator/is-regular-expression.validator.js +31 -0
- package/dist/validator/is-regular-expression.validator.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ExceptionBadRequestDTO = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const decorator_1 = require("../../decorator");
|
|
15
|
+
const enum_1 = require("../../enum");
|
|
16
|
+
const constant_1 = require("../../constant");
|
|
17
|
+
class ExceptionBadRequestDTO {
|
|
18
|
+
correlationID;
|
|
19
|
+
error = "Bad Request";
|
|
20
|
+
message = "Error message";
|
|
21
|
+
statusCode = common_1.HttpStatus.BAD_REQUEST;
|
|
22
|
+
timestamp;
|
|
23
|
+
}
|
|
24
|
+
exports.ExceptionBadRequestDTO = ExceptionBadRequestDTO;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, decorator_1.ApiPropertyUUID)({ entity: { name: "Correlation" }, expose: true, response: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ExceptionBadRequestDTO.prototype, "correlationID", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, decorator_1.ApiPropertyString)({
|
|
31
|
+
description: "name",
|
|
32
|
+
entity: { name: "Error" },
|
|
33
|
+
example: "Bad Request",
|
|
34
|
+
expose: true,
|
|
35
|
+
format: enum_1.EApiPropertyDataType.TEXT,
|
|
36
|
+
maxLength: constant_1.EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_LENGTH,
|
|
37
|
+
minLength: constant_1.EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_LENGTH,
|
|
38
|
+
pattern: "/^[a-zA-Z ]{3,64}$/",
|
|
39
|
+
response: true,
|
|
40
|
+
type: enum_1.EApiPropertyDataType.STRING,
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ExceptionBadRequestDTO.prototype, "error", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, decorator_1.ApiPropertyString)({
|
|
46
|
+
description: "message",
|
|
47
|
+
entity: { name: "Error" },
|
|
48
|
+
example: "Error message",
|
|
49
|
+
expose: true,
|
|
50
|
+
format: enum_1.EApiPropertyDataType.TEXT,
|
|
51
|
+
maxLength: constant_1.EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_MESSAGE_LENGTH,
|
|
52
|
+
minLength: constant_1.EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_MESSAGE_LENGTH,
|
|
53
|
+
pattern: "/^[a-zA-Z ]{3,64}$/",
|
|
54
|
+
response: true,
|
|
55
|
+
type: enum_1.EApiPropertyDataType.STRING,
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], ExceptionBadRequestDTO.prototype, "message", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, decorator_1.ApiPropertyObject)({
|
|
61
|
+
default: common_1.HttpStatus.BAD_REQUEST,
|
|
62
|
+
description: "status code",
|
|
63
|
+
entity: { name: "Error" },
|
|
64
|
+
enum: common_1.HttpStatus,
|
|
65
|
+
expose: true,
|
|
66
|
+
response: true,
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], ExceptionBadRequestDTO.prototype, "statusCode", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, decorator_1.ApiPropertyNumber)({
|
|
72
|
+
description: "timestamp",
|
|
73
|
+
entity: { name: "Error" },
|
|
74
|
+
example: Date.now(),
|
|
75
|
+
expose: true,
|
|
76
|
+
maximum: constant_1.DATE_CONSTANT.MAXIMUM_UNIX_TIME,
|
|
77
|
+
minimum: constant_1.DATE_CONSTANT.MINIMUM_UNIX_TIME,
|
|
78
|
+
multipleOf: constant_1.NUMBER_CONSTANT.ONE,
|
|
79
|
+
response: true,
|
|
80
|
+
type: enum_1.EApiPropertyDataType.INTEGER,
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], ExceptionBadRequestDTO.prototype, "timestamp", void 0);
|
|
84
|
+
//# sourceMappingURL=bad-request.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bad-request.dto.js","sourceRoot":"/","sources":["dto/exception/bad-request.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA2G;AAC3G,qCAAkD;AAClD,6CAAwF;AAExF,MAAa,sBAAsB;IAElC,aAAa,CAAU;IAcvB,KAAK,GAAW,aAAa,CAAC;IAc9B,OAAO,GAAW,eAAe,CAAC;IAUlC,UAAU,GAAe,mBAAU,CAAC,WAAW,CAAC;IAahD,SAAS,CAAU;CACnB;AAtDD,wDAsDC;AApDA;IADC,IAAA,2BAAe,EAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6DAC5D;AAcvB;IAZC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,MAAM;QACnB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,aAAa;QACtB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,2BAAoB,CAAC,IAAI;QACjC,SAAS,EAAE,iCAAsB,CAAC,oBAAoB;QACtD,SAAS,EAAE,iCAAsB,CAAC,oBAAoB;QACtD,OAAO,EAAE,qBAAqB;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,MAAM;KACjC,CAAC;;qDAC4B;AAc9B;IAZC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,eAAe;QACxB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,2BAAoB,CAAC,IAAI;QACjC,SAAS,EAAE,iCAAsB,CAAC,4BAA4B;QAC9D,SAAS,EAAE,iCAAsB,CAAC,4BAA4B;QAC9D,OAAO,EAAE,qBAAqB;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,MAAM;KACjC,CAAC;;uDACgC;AAUlC;IARC,IAAA,6BAAiB,EAAC;QAClB,OAAO,EAAE,mBAAU,CAAC,WAAW;QAC/B,WAAW,EAAE,aAAa;QAC1B,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,IAAI,EAAE,mBAAU;QAChB,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;KACd,CAAC;;0DAC8C;AAahD;IAXC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,WAAW;QACxB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;QACnB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,wBAAa,CAAC,iBAAiB;QACxC,OAAO,EAAE,wBAAa,CAAC,iBAAiB;QACxC,UAAU,EAAE,0BAAe,CAAC,GAAG;QAC/B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,OAAO;KAClC,CAAC;;yDACiB","sourcesContent":["import { HttpStatus } from \"@nestjs/common\";\nimport { ApiPropertyNumber, ApiPropertyObject, ApiPropertyString, ApiPropertyUUID } from \"../../decorator\";\nimport { EApiPropertyDataType } from \"../../enum\";\nimport { DATE_CONSTANT, EXCEPTION_DTO_CONSTANT, NUMBER_CONSTANT } from \"../../constant\";\n\nexport class ExceptionBadRequestDTO {\n\t@ApiPropertyUUID({ entity: { name: \"Correlation\" }, expose: true, response: true })\n\tcorrelationID!: string;\n\n\t@ApiPropertyString({\n\t\tdescription: \"name\",\n\t\tentity: { name: \"Error\" },\n\t\texample: \"Bad Request\",\n\t\texpose: true,\n\t\tformat: EApiPropertyDataType.TEXT,\n\t\tmaxLength: EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_LENGTH,\n\t\tminLength: EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_LENGTH,\n\t\tpattern: \"/^[a-zA-Z ]{3,64}$/\",\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.STRING,\n\t})\n\terror: string = \"Bad Request\";\n\n\t@ApiPropertyString({\n\t\tdescription: \"message\",\n\t\tentity: { name: \"Error\" },\n\t\texample: \"Error message\",\n\t\texpose: true,\n\t\tformat: EApiPropertyDataType.TEXT,\n\t\tmaxLength: EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_MESSAGE_LENGTH,\n\t\tminLength: EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_MESSAGE_LENGTH,\n\t\tpattern: \"/^[a-zA-Z ]{3,64}$/\",\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.STRING,\n\t})\n\tmessage: string = \"Error message\";\n\n\t@ApiPropertyObject({\n\t\tdefault: HttpStatus.BAD_REQUEST,\n\t\tdescription: \"status code\",\n\t\tentity: { name: \"Error\" },\n\t\tenum: HttpStatus,\n\t\texpose: true,\n\t\tresponse: true,\n\t})\n\tstatusCode: HttpStatus = HttpStatus.BAD_REQUEST;\n\n\t@ApiPropertyNumber({\n\t\tdescription: \"timestamp\",\n\t\tentity: { name: \"Error\" },\n\t\texample: Date.now(),\n\t\texpose: true,\n\t\tmaximum: DATE_CONSTANT.MAXIMUM_UNIX_TIME,\n\t\tminimum: DATE_CONSTANT.MINIMUM_UNIX_TIME,\n\t\tmultipleOf: NUMBER_CONSTANT.ONE,\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.INTEGER,\n\t})\n\ttimestamp!: number;\n}\n"]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ConflictResponseDTO = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const decorator_1 = require("../../decorator");
|
|
15
|
+
const enum_1 = require("../../enum");
|
|
16
|
+
const constant_1 = require("../../constant");
|
|
17
|
+
class ConflictResponseDTO {
|
|
18
|
+
correlationID;
|
|
19
|
+
error = "Conflict";
|
|
20
|
+
message = "Error message";
|
|
21
|
+
statusCode = common_1.HttpStatus.CONFLICT;
|
|
22
|
+
timestamp;
|
|
23
|
+
}
|
|
24
|
+
exports.ConflictResponseDTO = ConflictResponseDTO;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, decorator_1.ApiPropertyUUID)({ entity: { name: "Correlation" }, expose: true, response: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ConflictResponseDTO.prototype, "correlationID", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, decorator_1.ApiPropertyString)({
|
|
31
|
+
description: "name",
|
|
32
|
+
entity: { name: "Error" },
|
|
33
|
+
example: "Conflict",
|
|
34
|
+
expose: true,
|
|
35
|
+
format: enum_1.EApiPropertyDataType.TEXT,
|
|
36
|
+
maxLength: constant_1.EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_LENGTH,
|
|
37
|
+
minLength: constant_1.EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_LENGTH,
|
|
38
|
+
pattern: "/^[a-zA-Z ]{3,64}$/",
|
|
39
|
+
response: true,
|
|
40
|
+
type: enum_1.EApiPropertyDataType.STRING,
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ConflictResponseDTO.prototype, "error", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, decorator_1.ApiPropertyString)({
|
|
46
|
+
description: "message",
|
|
47
|
+
entity: { name: "Error" },
|
|
48
|
+
example: "Error message",
|
|
49
|
+
expose: true,
|
|
50
|
+
format: enum_1.EApiPropertyDataType.TEXT,
|
|
51
|
+
maxLength: constant_1.EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_MESSAGE_LENGTH,
|
|
52
|
+
minLength: constant_1.EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_MESSAGE_LENGTH,
|
|
53
|
+
pattern: "/^[a-zA-Z ]{3,64}$/",
|
|
54
|
+
response: true,
|
|
55
|
+
type: enum_1.EApiPropertyDataType.STRING,
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], ConflictResponseDTO.prototype, "message", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, decorator_1.ApiPropertyObject)({
|
|
61
|
+
default: common_1.HttpStatus.CONFLICT,
|
|
62
|
+
description: "status code",
|
|
63
|
+
entity: { name: "Error" },
|
|
64
|
+
enum: common_1.HttpStatus,
|
|
65
|
+
expose: true,
|
|
66
|
+
response: true,
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], ConflictResponseDTO.prototype, "statusCode", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, decorator_1.ApiPropertyNumber)({
|
|
72
|
+
description: "timestamp",
|
|
73
|
+
entity: { name: "Error" },
|
|
74
|
+
example: Date.now(),
|
|
75
|
+
expose: true,
|
|
76
|
+
maximum: constant_1.DATE_CONSTANT.MAXIMUM_UNIX_TIME,
|
|
77
|
+
minimum: constant_1.DATE_CONSTANT.MINIMUM_UNIX_TIME,
|
|
78
|
+
multipleOf: constant_1.NUMBER_CONSTANT.ONE,
|
|
79
|
+
response: true,
|
|
80
|
+
type: enum_1.EApiPropertyDataType.INTEGER,
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], ConflictResponseDTO.prototype, "timestamp", void 0);
|
|
84
|
+
//# sourceMappingURL=conflict.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conflict.dto.js","sourceRoot":"/","sources":["dto/exception/conflict.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA2G;AAC3G,qCAAkD;AAClD,6CAAwF;AAExF,MAAa,mBAAmB;IAE/B,aAAa,CAAU;IAcvB,KAAK,GAAW,UAAU,CAAC;IAc3B,OAAO,GAAW,eAAe,CAAC;IAUlC,UAAU,GAAe,mBAAU,CAAC,QAAQ,CAAC;IAa7C,SAAS,CAAU;CACnB;AAtDD,kDAsDC;AApDA;IADC,IAAA,2BAAe,EAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DAC5D;AAcvB;IAZC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,MAAM;QACnB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,UAAU;QACnB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,2BAAoB,CAAC,IAAI;QACjC,SAAS,EAAE,iCAAsB,CAAC,oBAAoB;QACtD,SAAS,EAAE,iCAAsB,CAAC,oBAAoB;QACtD,OAAO,EAAE,qBAAqB;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,MAAM;KACjC,CAAC;;kDACyB;AAc3B;IAZC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,eAAe;QACxB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,2BAAoB,CAAC,IAAI;QACjC,SAAS,EAAE,iCAAsB,CAAC,4BAA4B;QAC9D,SAAS,EAAE,iCAAsB,CAAC,4BAA4B;QAC9D,OAAO,EAAE,qBAAqB;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,MAAM;KACjC,CAAC;;oDACgC;AAUlC;IARC,IAAA,6BAAiB,EAAC;QAClB,OAAO,EAAE,mBAAU,CAAC,QAAQ;QAC5B,WAAW,EAAE,aAAa;QAC1B,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,IAAI,EAAE,mBAAU;QAChB,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;KACd,CAAC;;uDAC2C;AAa7C;IAXC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,WAAW;QACxB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;QACnB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,wBAAa,CAAC,iBAAiB;QACxC,OAAO,EAAE,wBAAa,CAAC,iBAAiB;QACxC,UAAU,EAAE,0BAAe,CAAC,GAAG;QAC/B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,OAAO;KAClC,CAAC;;sDACiB","sourcesContent":["import { HttpStatus } from \"@nestjs/common\";\nimport { ApiPropertyNumber, ApiPropertyObject, ApiPropertyString, ApiPropertyUUID } from \"../../decorator\";\nimport { EApiPropertyDataType } from \"../../enum\";\nimport { DATE_CONSTANT, EXCEPTION_DTO_CONSTANT, NUMBER_CONSTANT } from \"../../constant\";\n\nexport class ConflictResponseDTO {\n\t@ApiPropertyUUID({ entity: { name: \"Correlation\" }, expose: true, response: true })\n\tcorrelationID!: string;\n\n\t@ApiPropertyString({\n\t\tdescription: \"name\",\n\t\tentity: { name: \"Error\" },\n\t\texample: \"Conflict\",\n\t\texpose: true,\n\t\tformat: EApiPropertyDataType.TEXT,\n\t\tmaxLength: EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_LENGTH,\n\t\tminLength: EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_LENGTH,\n\t\tpattern: \"/^[a-zA-Z ]{3,64}$/\",\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.STRING,\n\t})\n\terror: string = \"Conflict\";\n\n\t@ApiPropertyString({\n\t\tdescription: \"message\",\n\t\tentity: { name: \"Error\" },\n\t\texample: \"Error message\",\n\t\texpose: true,\n\t\tformat: EApiPropertyDataType.TEXT,\n\t\tmaxLength: EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_MESSAGE_LENGTH,\n\t\tminLength: EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_MESSAGE_LENGTH,\n\t\tpattern: \"/^[a-zA-Z ]{3,64}$/\",\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.STRING,\n\t})\n\tmessage: string = \"Error message\";\n\n\t@ApiPropertyObject({\n\t\tdefault: HttpStatus.CONFLICT,\n\t\tdescription: \"status code\",\n\t\tentity: { name: \"Error\" },\n\t\tenum: HttpStatus,\n\t\texpose: true,\n\t\tresponse: true,\n\t})\n\tstatusCode: HttpStatus = HttpStatus.CONFLICT;\n\n\t@ApiPropertyNumber({\n\t\tdescription: \"timestamp\",\n\t\tentity: { name: \"Error\" },\n\t\texample: Date.now(),\n\t\texpose: true,\n\t\tmaximum: DATE_CONSTANT.MAXIMUM_UNIX_TIME,\n\t\tminimum: DATE_CONSTANT.MINIMUM_UNIX_TIME,\n\t\tmultipleOf: NUMBER_CONSTANT.ONE,\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.INTEGER,\n\t})\n\ttimestamp!: number;\n}\n"]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ExceptionForbiddenDTO = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const decorator_1 = require("../../decorator");
|
|
15
|
+
const enum_1 = require("../../enum");
|
|
16
|
+
const constant_1 = require("../../constant");
|
|
17
|
+
class ExceptionForbiddenDTO {
|
|
18
|
+
correlationID;
|
|
19
|
+
error = "Forbidden";
|
|
20
|
+
message = "Error message";
|
|
21
|
+
statusCode = common_1.HttpStatus.FORBIDDEN;
|
|
22
|
+
timestamp;
|
|
23
|
+
}
|
|
24
|
+
exports.ExceptionForbiddenDTO = ExceptionForbiddenDTO;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, decorator_1.ApiPropertyUUID)({ entity: { name: "Correlation" }, expose: true, response: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ExceptionForbiddenDTO.prototype, "correlationID", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, decorator_1.ApiPropertyString)({
|
|
31
|
+
description: "name",
|
|
32
|
+
entity: { name: "Error" },
|
|
33
|
+
example: "Forbidden",
|
|
34
|
+
expose: true,
|
|
35
|
+
format: enum_1.EApiPropertyDataType.TEXT,
|
|
36
|
+
maxLength: constant_1.EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_LENGTH,
|
|
37
|
+
minLength: constant_1.EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_LENGTH,
|
|
38
|
+
pattern: "/^[a-zA-Z ]{3,64}$/",
|
|
39
|
+
response: true,
|
|
40
|
+
type: enum_1.EApiPropertyDataType.STRING,
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ExceptionForbiddenDTO.prototype, "error", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, decorator_1.ApiPropertyString)({
|
|
46
|
+
description: "message",
|
|
47
|
+
entity: { name: "Error" },
|
|
48
|
+
example: "Error message",
|
|
49
|
+
expose: true,
|
|
50
|
+
format: enum_1.EApiPropertyDataType.TEXT,
|
|
51
|
+
maxLength: constant_1.EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_MESSAGE_LENGTH,
|
|
52
|
+
minLength: constant_1.EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_MESSAGE_LENGTH,
|
|
53
|
+
pattern: "/^[a-zA-Z ]{3,64}$/",
|
|
54
|
+
response: true,
|
|
55
|
+
type: enum_1.EApiPropertyDataType.STRING,
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], ExceptionForbiddenDTO.prototype, "message", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, decorator_1.ApiPropertyObject)({
|
|
61
|
+
default: common_1.HttpStatus.FORBIDDEN,
|
|
62
|
+
description: "status code",
|
|
63
|
+
entity: { name: "Error" },
|
|
64
|
+
enum: common_1.HttpStatus,
|
|
65
|
+
expose: true,
|
|
66
|
+
response: true,
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], ExceptionForbiddenDTO.prototype, "statusCode", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, decorator_1.ApiPropertyNumber)({
|
|
72
|
+
description: "timestamp",
|
|
73
|
+
entity: { name: "Error" },
|
|
74
|
+
example: Date.now(),
|
|
75
|
+
expose: true,
|
|
76
|
+
maximum: constant_1.DATE_CONSTANT.MAXIMUM_UNIX_TIME,
|
|
77
|
+
minimum: constant_1.DATE_CONSTANT.MINIMUM_UNIX_TIME,
|
|
78
|
+
multipleOf: constant_1.NUMBER_CONSTANT.ONE,
|
|
79
|
+
response: true,
|
|
80
|
+
type: enum_1.EApiPropertyDataType.INTEGER,
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], ExceptionForbiddenDTO.prototype, "timestamp", void 0);
|
|
84
|
+
//# sourceMappingURL=forbidden.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forbidden.dto.js","sourceRoot":"/","sources":["dto/exception/forbidden.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA2G;AAC3G,qCAAkD;AAClD,6CAAwF;AAExF,MAAa,qBAAqB;IAEjC,aAAa,CAAU;IAcvB,KAAK,GAAW,WAAW,CAAC;IAc5B,OAAO,GAAW,eAAe,CAAC;IAUlC,UAAU,GAAe,mBAAU,CAAC,SAAS,CAAC;IAa9C,SAAS,CAAU;CACnB;AAtDD,sDAsDC;AApDA;IADC,IAAA,2BAAe,EAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DAC5D;AAcvB;IAZC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,MAAM;QACnB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,WAAW;QACpB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,2BAAoB,CAAC,IAAI;QACjC,SAAS,EAAE,iCAAsB,CAAC,oBAAoB;QACtD,SAAS,EAAE,iCAAsB,CAAC,oBAAoB;QACtD,OAAO,EAAE,qBAAqB;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,MAAM;KACjC,CAAC;;oDAC0B;AAc5B;IAZC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,eAAe;QACxB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,2BAAoB,CAAC,IAAI;QACjC,SAAS,EAAE,iCAAsB,CAAC,4BAA4B;QAC9D,SAAS,EAAE,iCAAsB,CAAC,4BAA4B;QAC9D,OAAO,EAAE,qBAAqB;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,MAAM;KACjC,CAAC;;sDACgC;AAUlC;IARC,IAAA,6BAAiB,EAAC;QAClB,OAAO,EAAE,mBAAU,CAAC,SAAS;QAC7B,WAAW,EAAE,aAAa;QAC1B,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,IAAI,EAAE,mBAAU;QAChB,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;KACd,CAAC;;yDAC4C;AAa9C;IAXC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,WAAW;QACxB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;QACnB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,wBAAa,CAAC,iBAAiB;QACxC,OAAO,EAAE,wBAAa,CAAC,iBAAiB;QACxC,UAAU,EAAE,0BAAe,CAAC,GAAG;QAC/B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,OAAO;KAClC,CAAC;;wDACiB","sourcesContent":["import { HttpStatus } from \"@nestjs/common\";\nimport { ApiPropertyNumber, ApiPropertyObject, ApiPropertyString, ApiPropertyUUID } from \"../../decorator\";\nimport { EApiPropertyDataType } from \"../../enum\";\nimport { DATE_CONSTANT, EXCEPTION_DTO_CONSTANT, NUMBER_CONSTANT } from \"../../constant\";\n\nexport class ExceptionForbiddenDTO {\n\t@ApiPropertyUUID({ entity: { name: \"Correlation\" }, expose: true, response: true })\n\tcorrelationID!: string;\n\n\t@ApiPropertyString({\n\t\tdescription: \"name\",\n\t\tentity: { name: \"Error\" },\n\t\texample: \"Forbidden\",\n\t\texpose: true,\n\t\tformat: EApiPropertyDataType.TEXT,\n\t\tmaxLength: EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_LENGTH,\n\t\tminLength: EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_LENGTH,\n\t\tpattern: \"/^[a-zA-Z ]{3,64}$/\",\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.STRING,\n\t})\n\terror: string = \"Forbidden\";\n\n\t@ApiPropertyString({\n\t\tdescription: \"message\",\n\t\tentity: { name: \"Error\" },\n\t\texample: \"Error message\",\n\t\texpose: true,\n\t\tformat: EApiPropertyDataType.TEXT,\n\t\tmaxLength: EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_MESSAGE_LENGTH,\n\t\tminLength: EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_MESSAGE_LENGTH,\n\t\tpattern: \"/^[a-zA-Z ]{3,64}$/\",\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.STRING,\n\t})\n\tmessage: string = \"Error message\";\n\n\t@ApiPropertyObject({\n\t\tdefault: HttpStatus.FORBIDDEN,\n\t\tdescription: \"status code\",\n\t\tentity: { name: \"Error\" },\n\t\tenum: HttpStatus,\n\t\texpose: true,\n\t\tresponse: true,\n\t})\n\tstatusCode: HttpStatus = HttpStatus.FORBIDDEN;\n\n\t@ApiPropertyNumber({\n\t\tdescription: \"timestamp\",\n\t\tentity: { name: \"Error\" },\n\t\texample: Date.now(),\n\t\texpose: true,\n\t\tmaximum: DATE_CONSTANT.MAXIMUM_UNIX_TIME,\n\t\tminimum: DATE_CONSTANT.MINIMUM_UNIX_TIME,\n\t\tmultipleOf: NUMBER_CONSTANT.ONE,\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.INTEGER,\n\t})\n\ttimestamp!: number;\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./bad-request.dto"), exports);
|
|
18
|
+
__exportStar(require("./forbidden.dto"), exports);
|
|
19
|
+
__exportStar(require("./not-found.dto"), exports);
|
|
20
|
+
__exportStar(require("./unauthorized.dto"), exports);
|
|
21
|
+
__exportStar(require("./too-many-requests.dto"), exports);
|
|
22
|
+
__exportStar(require("./internal-server-error.dto"), exports);
|
|
23
|
+
__exportStar(require("./conflict.dto"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["dto/exception/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,kDAAgC;AAChC,kDAAgC;AAChC,qDAAmC;AACnC,0DAAwC;AACxC,8DAA4C;AAC5C,iDAA+B","sourcesContent":["export * from \"./bad-request.dto\";\nexport * from \"./forbidden.dto\";\nexport * from \"./not-found.dto\";\nexport * from \"./unauthorized.dto\";\nexport * from \"./too-many-requests.dto\";\nexport * from \"./internal-server-error.dto\";\nexport * from \"./conflict.dto\";\n"]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ExceptionInternalServerErrorDTO = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const decorator_1 = require("../../decorator");
|
|
15
|
+
const enum_1 = require("../../enum");
|
|
16
|
+
const constant_1 = require("../../constant");
|
|
17
|
+
class ExceptionInternalServerErrorDTO {
|
|
18
|
+
correlationID;
|
|
19
|
+
error = "Internal Server Error";
|
|
20
|
+
message = "Error message";
|
|
21
|
+
statusCode = common_1.HttpStatus.INTERNAL_SERVER_ERROR;
|
|
22
|
+
timestamp;
|
|
23
|
+
}
|
|
24
|
+
exports.ExceptionInternalServerErrorDTO = ExceptionInternalServerErrorDTO;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, decorator_1.ApiPropertyUUID)({ entity: { name: "Correlation" }, expose: true, response: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ExceptionInternalServerErrorDTO.prototype, "correlationID", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, decorator_1.ApiPropertyString)({
|
|
31
|
+
description: "name",
|
|
32
|
+
entity: { name: "Error" },
|
|
33
|
+
example: "Internal Server Error",
|
|
34
|
+
expose: true,
|
|
35
|
+
format: enum_1.EApiPropertyDataType.TEXT,
|
|
36
|
+
maxLength: constant_1.EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_LENGTH,
|
|
37
|
+
minLength: constant_1.EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_LENGTH,
|
|
38
|
+
pattern: "/^[a-zA-Z ]{3,64}$/",
|
|
39
|
+
response: true,
|
|
40
|
+
type: enum_1.EApiPropertyDataType.STRING,
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ExceptionInternalServerErrorDTO.prototype, "error", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, decorator_1.ApiPropertyString)({
|
|
46
|
+
description: "message",
|
|
47
|
+
entity: { name: "Error" },
|
|
48
|
+
example: "Error message",
|
|
49
|
+
expose: true,
|
|
50
|
+
format: enum_1.EApiPropertyDataType.TEXT,
|
|
51
|
+
maxLength: constant_1.EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_MESSAGE_LENGTH,
|
|
52
|
+
minLength: constant_1.EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_MESSAGE_LENGTH,
|
|
53
|
+
pattern: "/^[a-zA-Z ]{3,64}$/",
|
|
54
|
+
response: true,
|
|
55
|
+
type: enum_1.EApiPropertyDataType.STRING,
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], ExceptionInternalServerErrorDTO.prototype, "message", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, decorator_1.ApiPropertyObject)({
|
|
61
|
+
default: common_1.HttpStatus.INTERNAL_SERVER_ERROR,
|
|
62
|
+
description: "status code",
|
|
63
|
+
entity: { name: "Error" },
|
|
64
|
+
enum: common_1.HttpStatus,
|
|
65
|
+
expose: true,
|
|
66
|
+
response: true,
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], ExceptionInternalServerErrorDTO.prototype, "statusCode", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, decorator_1.ApiPropertyNumber)({
|
|
72
|
+
description: "timestamp",
|
|
73
|
+
entity: { name: "Error" },
|
|
74
|
+
example: Date.now(),
|
|
75
|
+
expose: true,
|
|
76
|
+
maximum: constant_1.DATE_CONSTANT.MAXIMUM_UNIX_TIME,
|
|
77
|
+
minimum: constant_1.DATE_CONSTANT.MINIMUM_UNIX_TIME,
|
|
78
|
+
multipleOf: constant_1.NUMBER_CONSTANT.ONE,
|
|
79
|
+
response: true,
|
|
80
|
+
type: enum_1.EApiPropertyDataType.INTEGER,
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], ExceptionInternalServerErrorDTO.prototype, "timestamp", void 0);
|
|
84
|
+
//# sourceMappingURL=internal-server-error.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-server-error.dto.js","sourceRoot":"/","sources":["dto/exception/internal-server-error.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA2G;AAC3G,qCAAkD;AAClD,6CAAwF;AAExF,MAAa,+BAA+B;IAE3C,aAAa,CAAU;IAcvB,KAAK,GAAW,uBAAuB,CAAC;IAcxC,OAAO,GAAW,eAAe,CAAC;IAUlC,UAAU,GAAe,mBAAU,CAAC,qBAAqB,CAAC;IAa1D,SAAS,CAAU;CACnB;AAtDD,0EAsDC;AApDA;IADC,IAAA,2BAAe,EAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sEAC5D;AAcvB;IAZC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,MAAM;QACnB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,uBAAuB;QAChC,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,2BAAoB,CAAC,IAAI;QACjC,SAAS,EAAE,iCAAsB,CAAC,oBAAoB;QACtD,SAAS,EAAE,iCAAsB,CAAC,oBAAoB;QACtD,OAAO,EAAE,qBAAqB;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,MAAM;KACjC,CAAC;;8DACsC;AAcxC;IAZC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,eAAe;QACxB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,2BAAoB,CAAC,IAAI;QACjC,SAAS,EAAE,iCAAsB,CAAC,4BAA4B;QAC9D,SAAS,EAAE,iCAAsB,CAAC,4BAA4B;QAC9D,OAAO,EAAE,qBAAqB;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,MAAM;KACjC,CAAC;;gEACgC;AAUlC;IARC,IAAA,6BAAiB,EAAC;QAClB,OAAO,EAAE,mBAAU,CAAC,qBAAqB;QACzC,WAAW,EAAE,aAAa;QAC1B,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,IAAI,EAAE,mBAAU;QAChB,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;KACd,CAAC;;mEACwD;AAa1D;IAXC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,WAAW;QACxB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;QACnB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,wBAAa,CAAC,iBAAiB;QACxC,OAAO,EAAE,wBAAa,CAAC,iBAAiB;QACxC,UAAU,EAAE,0BAAe,CAAC,GAAG;QAC/B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,OAAO;KAClC,CAAC;;kEACiB","sourcesContent":["import { HttpStatus } from \"@nestjs/common\";\nimport { ApiPropertyNumber, ApiPropertyObject, ApiPropertyString, ApiPropertyUUID } from \"../../decorator\";\nimport { EApiPropertyDataType } from \"../../enum\";\nimport { DATE_CONSTANT, EXCEPTION_DTO_CONSTANT, NUMBER_CONSTANT } from \"../../constant\";\n\nexport class ExceptionInternalServerErrorDTO {\n\t@ApiPropertyUUID({ entity: { name: \"Correlation\" }, expose: true, response: true })\n\tcorrelationID!: string;\n\n\t@ApiPropertyString({\n\t\tdescription: \"name\",\n\t\tentity: { name: \"Error\" },\n\t\texample: \"Internal Server Error\",\n\t\texpose: true,\n\t\tformat: EApiPropertyDataType.TEXT,\n\t\tmaxLength: EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_LENGTH,\n\t\tminLength: EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_LENGTH,\n\t\tpattern: \"/^[a-zA-Z ]{3,64}$/\",\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.STRING,\n\t})\n\terror: string = \"Internal Server Error\";\n\n\t@ApiPropertyString({\n\t\tdescription: \"message\",\n\t\tentity: { name: \"Error\" },\n\t\texample: \"Error message\",\n\t\texpose: true,\n\t\tformat: EApiPropertyDataType.TEXT,\n\t\tmaxLength: EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_MESSAGE_LENGTH,\n\t\tminLength: EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_MESSAGE_LENGTH,\n\t\tpattern: \"/^[a-zA-Z ]{3,64}$/\",\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.STRING,\n\t})\n\tmessage: string = \"Error message\";\n\n\t@ApiPropertyObject({\n\t\tdefault: HttpStatus.INTERNAL_SERVER_ERROR,\n\t\tdescription: \"status code\",\n\t\tentity: { name: \"Error\" },\n\t\tenum: HttpStatus,\n\t\texpose: true,\n\t\tresponse: true,\n\t})\n\tstatusCode: HttpStatus = HttpStatus.INTERNAL_SERVER_ERROR;\n\n\t@ApiPropertyNumber({\n\t\tdescription: \"timestamp\",\n\t\tentity: { name: \"Error\" },\n\t\texample: Date.now(),\n\t\texpose: true,\n\t\tmaximum: DATE_CONSTANT.MAXIMUM_UNIX_TIME,\n\t\tminimum: DATE_CONSTANT.MINIMUM_UNIX_TIME,\n\t\tmultipleOf: NUMBER_CONSTANT.ONE,\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.INTEGER,\n\t})\n\ttimestamp!: number;\n}\n"]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ExceptionNotFoundDTO = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const decorator_1 = require("../../decorator");
|
|
15
|
+
const enum_1 = require("../../enum");
|
|
16
|
+
const constant_1 = require("../../constant");
|
|
17
|
+
class ExceptionNotFoundDTO {
|
|
18
|
+
correlationID;
|
|
19
|
+
error = "Not Found";
|
|
20
|
+
message = "Error message";
|
|
21
|
+
statusCode = common_1.HttpStatus.NOT_FOUND;
|
|
22
|
+
timestamp;
|
|
23
|
+
}
|
|
24
|
+
exports.ExceptionNotFoundDTO = ExceptionNotFoundDTO;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, decorator_1.ApiPropertyUUID)({ entity: { name: "Correlation" }, expose: true, response: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ExceptionNotFoundDTO.prototype, "correlationID", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, decorator_1.ApiPropertyString)({
|
|
31
|
+
description: "name",
|
|
32
|
+
entity: { name: "Error" },
|
|
33
|
+
example: "Not Found",
|
|
34
|
+
expose: true,
|
|
35
|
+
format: enum_1.EApiPropertyDataType.TEXT,
|
|
36
|
+
maxLength: constant_1.EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_LENGTH,
|
|
37
|
+
minLength: constant_1.EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_LENGTH,
|
|
38
|
+
pattern: "/^[a-zA-Z ]{3,64}$/",
|
|
39
|
+
response: true,
|
|
40
|
+
type: enum_1.EApiPropertyDataType.STRING,
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ExceptionNotFoundDTO.prototype, "error", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, decorator_1.ApiPropertyString)({
|
|
46
|
+
description: "message",
|
|
47
|
+
entity: { name: "Error" },
|
|
48
|
+
example: "Error message",
|
|
49
|
+
expose: true,
|
|
50
|
+
format: enum_1.EApiPropertyDataType.TEXT,
|
|
51
|
+
maxLength: constant_1.EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_MESSAGE_LENGTH,
|
|
52
|
+
minLength: constant_1.EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_MESSAGE_LENGTH,
|
|
53
|
+
pattern: "/^[a-zA-Z ]{3,64}$/",
|
|
54
|
+
response: true,
|
|
55
|
+
type: enum_1.EApiPropertyDataType.STRING,
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], ExceptionNotFoundDTO.prototype, "message", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, decorator_1.ApiPropertyObject)({
|
|
61
|
+
default: common_1.HttpStatus.NOT_FOUND,
|
|
62
|
+
description: "status code",
|
|
63
|
+
entity: { name: "Error" },
|
|
64
|
+
enum: common_1.HttpStatus,
|
|
65
|
+
expose: true,
|
|
66
|
+
response: true,
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], ExceptionNotFoundDTO.prototype, "statusCode", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, decorator_1.ApiPropertyNumber)({
|
|
72
|
+
description: "timestamp",
|
|
73
|
+
entity: { name: "Error" },
|
|
74
|
+
example: Date.now(),
|
|
75
|
+
expose: true,
|
|
76
|
+
maximum: constant_1.DATE_CONSTANT.MAXIMUM_UNIX_TIME,
|
|
77
|
+
minimum: constant_1.DATE_CONSTANT.MINIMUM_UNIX_TIME,
|
|
78
|
+
multipleOf: constant_1.NUMBER_CONSTANT.ONE,
|
|
79
|
+
response: true,
|
|
80
|
+
type: enum_1.EApiPropertyDataType.INTEGER,
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], ExceptionNotFoundDTO.prototype, "timestamp", void 0);
|
|
84
|
+
//# sourceMappingURL=not-found.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not-found.dto.js","sourceRoot":"/","sources":["dto/exception/not-found.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA2G;AAC3G,qCAAkD;AAClD,6CAAwF;AAExF,MAAa,oBAAoB;IAEhC,aAAa,CAAU;IAcvB,KAAK,GAAW,WAAW,CAAC;IAc5B,OAAO,GAAW,eAAe,CAAC;IAUlC,UAAU,GAAe,mBAAU,CAAC,SAAS,CAAC;IAa9C,SAAS,CAAU;CACnB;AAtDD,oDAsDC;AApDA;IADC,IAAA,2BAAe,EAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DAC5D;AAcvB;IAZC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,MAAM;QACnB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,WAAW;QACpB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,2BAAoB,CAAC,IAAI;QACjC,SAAS,EAAE,iCAAsB,CAAC,oBAAoB;QACtD,SAAS,EAAE,iCAAsB,CAAC,oBAAoB;QACtD,OAAO,EAAE,qBAAqB;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,MAAM;KACjC,CAAC;;mDAC0B;AAc5B;IAZC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,eAAe;QACxB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,2BAAoB,CAAC,IAAI;QACjC,SAAS,EAAE,iCAAsB,CAAC,4BAA4B;QAC9D,SAAS,EAAE,iCAAsB,CAAC,4BAA4B;QAC9D,OAAO,EAAE,qBAAqB;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,MAAM;KACjC,CAAC;;qDACgC;AAUlC;IARC,IAAA,6BAAiB,EAAC;QAClB,OAAO,EAAE,mBAAU,CAAC,SAAS;QAC7B,WAAW,EAAE,aAAa;QAC1B,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,IAAI,EAAE,mBAAU;QAChB,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;KACd,CAAC;;wDAC4C;AAa9C;IAXC,IAAA,6BAAiB,EAAC;QAClB,WAAW,EAAE,WAAW;QACxB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;QACnB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,wBAAa,CAAC,iBAAiB;QACxC,OAAO,EAAE,wBAAa,CAAC,iBAAiB;QACxC,UAAU,EAAE,0BAAe,CAAC,GAAG;QAC/B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAoB,CAAC,OAAO;KAClC,CAAC;;uDACiB","sourcesContent":["import { HttpStatus } from \"@nestjs/common\";\nimport { ApiPropertyNumber, ApiPropertyObject, ApiPropertyString, ApiPropertyUUID } from \"../../decorator\";\nimport { EApiPropertyDataType } from \"../../enum\";\nimport { DATE_CONSTANT, EXCEPTION_DTO_CONSTANT, NUMBER_CONSTANT } from \"../../constant\";\n\nexport class ExceptionNotFoundDTO {\n\t@ApiPropertyUUID({ entity: { name: \"Correlation\" }, expose: true, response: true })\n\tcorrelationID!: string;\n\n\t@ApiPropertyString({\n\t\tdescription: \"name\",\n\t\tentity: { name: \"Error\" },\n\t\texample: \"Not Found\",\n\t\texpose: true,\n\t\tformat: EApiPropertyDataType.TEXT,\n\t\tmaxLength: EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_LENGTH,\n\t\tminLength: EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_LENGTH,\n\t\tpattern: \"/^[a-zA-Z ]{3,64}$/\",\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.STRING,\n\t})\n\terror: string = \"Not Found\";\n\n\t@ApiPropertyString({\n\t\tdescription: \"message\",\n\t\tentity: { name: \"Error\" },\n\t\texample: \"Error message\",\n\t\texpose: true,\n\t\tformat: EApiPropertyDataType.TEXT,\n\t\tmaxLength: EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_MESSAGE_LENGTH,\n\t\tminLength: EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_MESSAGE_LENGTH,\n\t\tpattern: \"/^[a-zA-Z ]{3,64}$/\",\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.STRING,\n\t})\n\tmessage: string = \"Error message\";\n\n\t@ApiPropertyObject({\n\t\tdefault: HttpStatus.NOT_FOUND,\n\t\tdescription: \"status code\",\n\t\tentity: { name: \"Error\" },\n\t\tenum: HttpStatus,\n\t\texpose: true,\n\t\tresponse: true,\n\t})\n\tstatusCode: HttpStatus = HttpStatus.NOT_FOUND;\n\n\t@ApiPropertyNumber({\n\t\tdescription: \"timestamp\",\n\t\tentity: { name: \"Error\" },\n\t\texample: Date.now(),\n\t\texpose: true,\n\t\tmaximum: DATE_CONSTANT.MAXIMUM_UNIX_TIME,\n\t\tminimum: DATE_CONSTANT.MINIMUM_UNIX_TIME,\n\t\tmultipleOf: NUMBER_CONSTANT.ONE,\n\t\tresponse: true,\n\t\ttype: EApiPropertyDataType.INTEGER,\n\t})\n\ttimestamp!: number;\n}\n"]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ExceptionTooManyRequestsDTO = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const decorator_1 = require("../../decorator");
|
|
15
|
+
const enum_1 = require("../../enum");
|
|
16
|
+
const constant_1 = require("../../constant");
|
|
17
|
+
class ExceptionTooManyRequestsDTO {
|
|
18
|
+
correlationID;
|
|
19
|
+
error = "Too Many Requests";
|
|
20
|
+
message = "Error message";
|
|
21
|
+
statusCode = common_1.HttpStatus.TOO_MANY_REQUESTS;
|
|
22
|
+
timestamp;
|
|
23
|
+
}
|
|
24
|
+
exports.ExceptionTooManyRequestsDTO = ExceptionTooManyRequestsDTO;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, decorator_1.ApiPropertyUUID)({ entity: { name: "Correlation" }, expose: true, response: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ExceptionTooManyRequestsDTO.prototype, "correlationID", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, decorator_1.ApiPropertyString)({
|
|
31
|
+
description: "name",
|
|
32
|
+
entity: { name: "Error" },
|
|
33
|
+
example: "Too Many Requests",
|
|
34
|
+
expose: true,
|
|
35
|
+
format: enum_1.EApiPropertyDataType.TEXT,
|
|
36
|
+
maxLength: constant_1.EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_LENGTH,
|
|
37
|
+
minLength: constant_1.EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_LENGTH,
|
|
38
|
+
pattern: "/^[a-zA-Z ]{3,64}$/",
|
|
39
|
+
response: true,
|
|
40
|
+
type: enum_1.EApiPropertyDataType.STRING,
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ExceptionTooManyRequestsDTO.prototype, "error", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, decorator_1.ApiPropertyString)({
|
|
46
|
+
description: "message",
|
|
47
|
+
entity: { name: "Error" },
|
|
48
|
+
example: "Error message",
|
|
49
|
+
expose: true,
|
|
50
|
+
format: enum_1.EApiPropertyDataType.TEXT,
|
|
51
|
+
maxLength: constant_1.EXCEPTION_DTO_CONSTANT.MAXIMUM_ERROR_MESSAGE_LENGTH,
|
|
52
|
+
minLength: constant_1.EXCEPTION_DTO_CONSTANT.MINIMUM_ERROR_MESSAGE_LENGTH,
|
|
53
|
+
pattern: "/^[a-zA-Z ]{3,64}$/",
|
|
54
|
+
response: true,
|
|
55
|
+
type: enum_1.EApiPropertyDataType.STRING,
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], ExceptionTooManyRequestsDTO.prototype, "message", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, decorator_1.ApiPropertyObject)({
|
|
61
|
+
default: common_1.HttpStatus.TOO_MANY_REQUESTS,
|
|
62
|
+
description: "status code",
|
|
63
|
+
entity: { name: "Error" },
|
|
64
|
+
enum: common_1.HttpStatus,
|
|
65
|
+
expose: true,
|
|
66
|
+
response: true,
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], ExceptionTooManyRequestsDTO.prototype, "statusCode", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, decorator_1.ApiPropertyNumber)({
|
|
72
|
+
description: "timestamp",
|
|
73
|
+
entity: { name: "Error" },
|
|
74
|
+
example: Date.now(),
|
|
75
|
+
expose: true,
|
|
76
|
+
maximum: constant_1.DATE_CONSTANT.MAXIMUM_UNIX_TIME,
|
|
77
|
+
minimum: constant_1.DATE_CONSTANT.MINIMUM_UNIX_TIME,
|
|
78
|
+
multipleOf: constant_1.NUMBER_CONSTANT.ONE,
|
|
79
|
+
response: true,
|
|
80
|
+
type: enum_1.EApiPropertyDataType.INTEGER,
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], ExceptionTooManyRequestsDTO.prototype, "timestamp", void 0);
|
|
84
|
+
//# sourceMappingURL=too-many-requests.dto.js.map
|