@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.
Files changed (287) hide show
  1. package/dist/class/api/base-service.class.d.ts +8 -0
  2. package/dist/class/api/base-service.class.js +13 -0
  3. package/dist/class/api/base-service.class.js.map +1 -0
  4. package/dist/class/api/index.d.ts +1 -0
  5. package/dist/class/api/index.js +18 -0
  6. package/dist/class/api/index.js.map +1 -0
  7. package/dist/class/index.d.ts +1 -0
  8. package/dist/class/index.js +18 -0
  9. package/dist/class/index.js.map +1 -0
  10. package/dist/constant/date.constant.d.ts +4 -0
  11. package/dist/constant/date.constant.js +10 -0
  12. package/dist/constant/date.constant.js.map +1 -0
  13. package/dist/constant/decorator/api/function.constant.d.ts +4 -0
  14. package/dist/constant/decorator/api/function.constant.js +9 -0
  15. package/dist/constant/decorator/api/function.constant.js.map +1 -0
  16. package/dist/constant/decorator/api/index.d.ts +1 -0
  17. package/dist/constant/decorator/api/index.js +18 -0
  18. package/dist/constant/decorator/api/index.js.map +1 -0
  19. package/dist/constant/decorator/index.d.ts +1 -0
  20. package/dist/constant/decorator/index.js +18 -0
  21. package/dist/constant/decorator/index.js.map +1 -0
  22. package/dist/constant/dto/exception.constant.d.ts +6 -0
  23. package/dist/constant/dto/exception.constant.js +14 -0
  24. package/dist/constant/dto/exception.constant.js.map +1 -0
  25. package/dist/constant/dto/index.d.ts +1 -0
  26. package/dist/constant/dto/index.js +18 -0
  27. package/dist/constant/dto/index.js.map +1 -0
  28. package/dist/constant/index.d.ts +5 -0
  29. package/dist/constant/index.js +22 -0
  30. package/dist/constant/index.js.map +1 -0
  31. package/dist/constant/interface/api/filter.constant.d.ts +3 -0
  32. package/dist/constant/interface/api/filter.constant.js +12 -0
  33. package/dist/constant/interface/api/filter.constant.js.map +1 -0
  34. package/dist/constant/interface/api/index.d.ts +1 -0
  35. package/dist/constant/interface/api/index.js +18 -0
  36. package/dist/constant/interface/api/index.js.map +1 -0
  37. package/dist/constant/interface/api/property/index.d.ts +2 -0
  38. package/dist/constant/interface/api/property/index.js +19 -0
  39. package/dist/constant/interface/api/property/index.js.map +1 -0
  40. package/dist/constant/interface/api/property/string.constant.d.ts +6 -0
  41. package/dist/constant/interface/api/property/string.constant.js +12 -0
  42. package/dist/constant/interface/api/property/string.constant.js.map +1 -0
  43. package/dist/constant/interface/api/property/wallet.constant.d.ts +5 -0
  44. package/dist/constant/interface/api/property/wallet.constant.js +12 -0
  45. package/dist/constant/interface/api/property/wallet.constant.js.map +1 -0
  46. package/dist/constant/interface/index.d.ts +1 -0
  47. package/dist/constant/interface/index.js +18 -0
  48. package/dist/constant/interface/index.js.map +1 -0
  49. package/dist/constant/number.constant.d.ts +18 -0
  50. package/dist/constant/number.constant.js +38 -0
  51. package/dist/constant/number.constant.js.map +1 -0
  52. package/dist/decorator/api/function/decorator.d.ts +7 -0
  53. package/dist/decorator/api/function/decorator.js +27 -0
  54. package/dist/decorator/api/function/decorator.js.map +1 -0
  55. package/dist/decorator/api/function/get-list.decorator.d.ts +5 -0
  56. package/dist/decorator/api/function/get-list.decorator.js +129 -0
  57. package/dist/decorator/api/function/get-list.decorator.js.map +1 -0
  58. package/dist/decorator/api/function/get.decorator.d.ts +4 -0
  59. package/dist/decorator/api/function/get.decorator.js +58 -0
  60. package/dist/decorator/api/function/get.decorator.js.map +1 -0
  61. package/dist/decorator/api/function/index.d.ts +2 -0
  62. package/dist/decorator/api/function/index.js +19 -0
  63. package/dist/decorator/api/function/index.js.map +1 -0
  64. package/dist/decorator/api/index.d.ts +3 -0
  65. package/dist/decorator/api/index.js +20 -0
  66. package/dist/decorator/api/index.js.map +1 -0
  67. package/dist/decorator/api/method.decorator.d.ts +2 -0
  68. package/dist/decorator/api/method.decorator.js +203 -0
  69. package/dist/decorator/api/method.decorator.js.map +1 -0
  70. package/dist/decorator/api/property/boolean.decorator.d.ts +2 -0
  71. package/dist/decorator/api/property/boolean.decorator.js +77 -0
  72. package/dist/decorator/api/property/boolean.decorator.js.map +1 -0
  73. package/dist/decorator/api/property/date.decorator.d.ts +2 -0
  74. package/dist/decorator/api/property/date.decorator.js +87 -0
  75. package/dist/decorator/api/property/date.decorator.js.map +1 -0
  76. package/dist/decorator/api/property/index.d.ts +7 -0
  77. package/dist/decorator/api/property/index.js +24 -0
  78. package/dist/decorator/api/property/index.js.map +1 -0
  79. package/dist/decorator/api/property/number.decorator.d.ts +2 -0
  80. package/dist/decorator/api/property/number.decorator.js +146 -0
  81. package/dist/decorator/api/property/number.decorator.js.map +1 -0
  82. package/dist/decorator/api/property/object.decorator.d.ts +2 -0
  83. package/dist/decorator/api/property/object.decorator.js +124 -0
  84. package/dist/decorator/api/property/object.decorator.js.map +1 -0
  85. package/dist/decorator/api/property/string.decorator.d.ts +2 -0
  86. package/dist/decorator/api/property/string.decorator.js +282 -0
  87. package/dist/decorator/api/property/string.decorator.js.map +1 -0
  88. package/dist/decorator/api/property/uuid.decorator.d.ts +2 -0
  89. package/dist/decorator/api/property/uuid.decorator.js +63 -0
  90. package/dist/decorator/api/property/uuid.decorator.js.map +1 -0
  91. package/dist/decorator/api/property/wallet.decorator.d.ts +2 -0
  92. package/dist/decorator/api/property/wallet.decorator.js +25 -0
  93. package/dist/decorator/api/property/wallet.decorator.js.map +1 -0
  94. package/dist/decorator/api/service.decorator.d.ts +8 -0
  95. package/dist/decorator/api/service.decorator.js +71 -0
  96. package/dist/decorator/api/service.decorator.js.map +1 -0
  97. package/dist/decorator/index.d.ts +1 -0
  98. package/dist/decorator/index.js +18 -0
  99. package/dist/decorator/index.js.map +1 -0
  100. package/dist/dto/exception/bad-request.dto.d.ts +8 -0
  101. package/dist/dto/exception/bad-request.dto.js +84 -0
  102. package/dist/dto/exception/bad-request.dto.js.map +1 -0
  103. package/dist/dto/exception/conflict.dto.d.ts +8 -0
  104. package/dist/dto/exception/conflict.dto.js +84 -0
  105. package/dist/dto/exception/conflict.dto.js.map +1 -0
  106. package/dist/dto/exception/forbidden.dto.d.ts +8 -0
  107. package/dist/dto/exception/forbidden.dto.js +84 -0
  108. package/dist/dto/exception/forbidden.dto.js.map +1 -0
  109. package/dist/dto/exception/index.d.ts +7 -0
  110. package/dist/dto/exception/index.js +24 -0
  111. package/dist/dto/exception/index.js.map +1 -0
  112. package/dist/dto/exception/internal-server-error.dto.d.ts +8 -0
  113. package/dist/dto/exception/internal-server-error.dto.js +84 -0
  114. package/dist/dto/exception/internal-server-error.dto.js.map +1 -0
  115. package/dist/dto/exception/not-found.dto.d.ts +8 -0
  116. package/dist/dto/exception/not-found.dto.js +84 -0
  117. package/dist/dto/exception/not-found.dto.js.map +1 -0
  118. package/dist/dto/exception/too-many-requests.dto.d.ts +8 -0
  119. package/dist/dto/exception/too-many-requests.dto.js +84 -0
  120. package/dist/dto/exception/too-many-requests.dto.js.map +1 -0
  121. package/dist/dto/exception/unauthorized.dto.d.ts +8 -0
  122. package/dist/dto/exception/unauthorized.dto.js +84 -0
  123. package/dist/dto/exception/unauthorized.dto.js.map +1 -0
  124. package/dist/dto/index.d.ts +1 -0
  125. package/dist/dto/index.js +18 -0
  126. package/dist/dto/index.js.map +1 -0
  127. package/dist/enum/decorator/api/action.enum.d.ts +14 -0
  128. package/dist/enum/decorator/api/action.enum.js +19 -0
  129. package/dist/enum/decorator/api/action.enum.js.map +1 -0
  130. package/dist/enum/decorator/api/authentication-type.enum.d.ts +5 -0
  131. package/dist/enum/decorator/api/authentication-type.enum.js +10 -0
  132. package/dist/enum/decorator/api/authentication-type.enum.js.map +1 -0
  133. package/dist/enum/decorator/api/function/index.d.ts +1 -0
  134. package/dist/enum/decorator/api/function/index.js +18 -0
  135. package/dist/enum/decorator/api/function/index.js.map +1 -0
  136. package/dist/enum/decorator/api/function/type.enum.d.ts +10 -0
  137. package/dist/enum/decorator/api/function/type.enum.js +15 -0
  138. package/dist/enum/decorator/api/function/type.enum.js.map +1 -0
  139. package/dist/enum/decorator/api/index.d.ts +4 -0
  140. package/dist/enum/decorator/api/index.js +21 -0
  141. package/dist/enum/decorator/api/index.js.map +1 -0
  142. package/dist/enum/decorator/api/property/data-type.enum.d.ts +23 -0
  143. package/dist/enum/decorator/api/property/data-type.enum.js +42 -0
  144. package/dist/enum/decorator/api/property/data-type.enum.js.map +1 -0
  145. package/dist/enum/decorator/api/property/date-type.enum.d.ts +14 -0
  146. package/dist/enum/decorator/api/property/date-type.enum.js +19 -0
  147. package/dist/enum/decorator/api/property/date-type.enum.js.map +1 -0
  148. package/dist/enum/decorator/api/property/index.d.ts +2 -0
  149. package/dist/enum/decorator/api/property/index.js +19 -0
  150. package/dist/enum/decorator/api/property/index.js.map +1 -0
  151. package/dist/enum/decorator/index.d.ts +1 -0
  152. package/dist/enum/decorator/index.js +18 -0
  153. package/dist/enum/decorator/index.js.map +1 -0
  154. package/dist/enum/filter-order-direction.enum.d.ts +4 -0
  155. package/dist/enum/filter-order-direction.enum.js +9 -0
  156. package/dist/enum/filter-order-direction.enum.js.map +1 -0
  157. package/dist/enum/index.d.ts +3 -0
  158. package/dist/enum/index.js +20 -0
  159. package/dist/enum/index.js.map +1 -0
  160. package/dist/enum/utility/error-string-action.enum.d.ts +55 -0
  161. package/dist/enum/utility/error-string-action.enum.js +60 -0
  162. package/dist/enum/utility/error-string-action.enum.js.map +1 -0
  163. package/dist/enum/utility/index.d.ts +1 -0
  164. package/dist/enum/utility/index.js +18 -0
  165. package/dist/enum/utility/index.js.map +1 -0
  166. package/dist/index.d.ts +10 -0
  167. package/dist/index.js +27 -0
  168. package/dist/index.js.map +1 -0
  169. package/dist/interceptor/correlation-id-response-body.interceptor.d.ts +5 -0
  170. package/dist/interceptor/correlation-id-response-body.interceptor.js +90 -0
  171. package/dist/interceptor/correlation-id-response-body.interceptor.js.map +1 -0
  172. package/dist/interceptor/index.d.ts +1 -0
  173. package/dist/interceptor/index.js +18 -0
  174. package/dist/interceptor/index.js.map +1 -0
  175. package/dist/interface/api-base-entity.interface.d.ts +3 -0
  176. package/dist/interface/api-base-entity.interface.js +3 -0
  177. package/dist/interface/api-base-entity.interface.js.map +1 -0
  178. package/dist/interface/decorator/api/function/index.d.ts +1 -0
  179. package/dist/interface/decorator/api/function/index.js +3 -0
  180. package/dist/interface/decorator/api/function/index.js.map +1 -0
  181. package/dist/interface/decorator/api/get-list-response-result.interface.d.ts +7 -0
  182. package/dist/interface/decorator/api/get-list-response-result.interface.js +3 -0
  183. package/dist/interface/decorator/api/get-list-response-result.interface.js.map +1 -0
  184. package/dist/interface/decorator/api/index.d.ts +5 -0
  185. package/dist/interface/decorator/api/index.js +22 -0
  186. package/dist/interface/decorator/api/index.js.map +1 -0
  187. package/dist/interface/decorator/api/method/index.d.ts +2 -0
  188. package/dist/interface/decorator/api/method/index.js +19 -0
  189. package/dist/interface/decorator/api/method/index.js.map +1 -0
  190. package/dist/interface/decorator/api/method/properties.interface.d.ts +16 -0
  191. package/dist/interface/decorator/api/method/properties.interface.js +3 -0
  192. package/dist/interface/decorator/api/method/properties.interface.js.map +1 -0
  193. package/dist/interface/decorator/api/method/throttler-properties.interface.d.ts +4 -0
  194. package/dist/interface/decorator/api/method/throttler-properties.interface.js +3 -0
  195. package/dist/interface/decorator/api/method/throttler-properties.interface.js.map +1 -0
  196. package/dist/interface/decorator/api/property/base-properties.interface.d.ts +13 -0
  197. package/dist/interface/decorator/api/property/base-properties.interface.js +3 -0
  198. package/dist/interface/decorator/api/property/base-properties.interface.js.map +1 -0
  199. package/dist/interface/decorator/api/property/date-properties.interface.d.ts +5 -0
  200. package/dist/interface/decorator/api/property/date-properties.interface.js +3 -0
  201. package/dist/interface/decorator/api/property/date-properties.interface.js.map +1 -0
  202. package/dist/interface/decorator/api/property/index.d.ts +6 -0
  203. package/dist/interface/decorator/api/property/index.js +23 -0
  204. package/dist/interface/decorator/api/property/index.js.map +1 -0
  205. package/dist/interface/decorator/api/property/number-properties.interface.d.ts +9 -0
  206. package/dist/interface/decorator/api/property/number-properties.interface.js +3 -0
  207. package/dist/interface/decorator/api/property/number-properties.interface.js.map +1 -0
  208. package/dist/interface/decorator/api/property/object-properties.interface.d.ts +10 -0
  209. package/dist/interface/decorator/api/property/object-properties.interface.js +3 -0
  210. package/dist/interface/decorator/api/property/object-properties.interface.js.map +1 -0
  211. package/dist/interface/decorator/api/property/string-properties.interface.d.ts +10 -0
  212. package/dist/interface/decorator/api/property/string-properties.interface.js +3 -0
  213. package/dist/interface/decorator/api/property/string-properties.interface.js.map +1 -0
  214. package/dist/interface/decorator/api/property/uuid-properties.interface.d.ts +8 -0
  215. package/dist/interface/decorator/api/property/uuid-properties.interface.js +3 -0
  216. package/dist/interface/decorator/api/property/uuid-properties.interface.js.map +1 -0
  217. package/dist/interface/decorator/api/response-type.interface.d.ts +9 -0
  218. package/dist/interface/decorator/api/response-type.interface.js +3 -0
  219. package/dist/interface/decorator/api/response-type.interface.js.map +1 -0
  220. package/dist/interface/decorator/index.d.ts +1 -0
  221. package/dist/interface/decorator/index.js +18 -0
  222. package/dist/interface/decorator/index.js.map +1 -0
  223. package/dist/interface/index.d.ts +4 -0
  224. package/dist/interface/index.js +21 -0
  225. package/dist/interface/index.js.map +1 -0
  226. package/dist/interface/service.interface.d.ts +1 -0
  227. package/dist/interface/service.interface.js +3 -0
  228. package/dist/interface/service.interface.js.map +1 -0
  229. package/dist/interface/utility/error-string-properties.interface.d.ts +5 -0
  230. package/dist/interface/utility/error-string-properties.interface.js +3 -0
  231. package/dist/interface/utility/error-string-properties.interface.js.map +1 -0
  232. package/dist/interface/utility/index.d.ts +1 -0
  233. package/dist/interface/utility/index.js +18 -0
  234. package/dist/interface/utility/index.js.map +1 -0
  235. package/dist/tsconfig.build.tsbuildinfo +1 -0
  236. package/dist/type/api/filter/allowed-types.type.d.ts +1 -0
  237. package/dist/type/api/filter/allowed-types.type.js +3 -0
  238. package/dist/type/api/filter/allowed-types.type.js.map +1 -0
  239. package/dist/type/api/filter/extracted-allowed-types.type.d.ts +2 -0
  240. package/dist/type/api/filter/extracted-allowed-types.type.js +3 -0
  241. package/dist/type/api/filter/extracted-allowed-types.type.js.map +1 -0
  242. package/dist/type/api/filter/field-selector.type.d.ts +3 -0
  243. package/dist/type/api/filter/field-selector.type.js +3 -0
  244. package/dist/type/api/filter/field-selector.type.js.map +1 -0
  245. package/dist/type/api/filter/index.d.ts +4 -0
  246. package/dist/type/api/filter/index.js +21 -0
  247. package/dist/type/api/filter/index.js.map +1 -0
  248. package/dist/type/api/filter/order-by.type.d.ts +5 -0
  249. package/dist/type/api/filter/order-by.type.js +3 -0
  250. package/dist/type/api/filter/order-by.type.js.map +1 -0
  251. package/dist/type/api/function/get-list-properties.type.d.ts +23 -0
  252. package/dist/type/api/function/get-list-properties.type.js +3 -0
  253. package/dist/type/api/function/get-list-properties.type.js.map +1 -0
  254. package/dist/type/api/function/get-properties.type.d.ts +6 -0
  255. package/dist/type/api/function/get-properties.type.js +3 -0
  256. package/dist/type/api/function/get-properties.type.js.map +1 -0
  257. package/dist/type/api/function/index.d.ts +1 -0
  258. package/dist/type/api/function/index.js +18 -0
  259. package/dist/type/api/function/index.js.map +1 -0
  260. package/dist/type/api/index.d.ts +2 -0
  261. package/dist/type/api/index.js +19 -0
  262. package/dist/type/api/index.js.map +1 -0
  263. package/dist/type/index.d.ts +1 -0
  264. package/dist/type/index.js +18 -0
  265. package/dist/type/index.js.map +1 -0
  266. package/dist/utility/api/filter-order-by-from-entity.utility.d.ts +4 -0
  267. package/dist/utility/api/filter-order-by-from-entity.utility.js +34 -0
  268. package/dist/utility/api/filter-order-by-from-entity.utility.js.map +1 -0
  269. package/dist/utility/api/index.d.ts +1 -0
  270. package/dist/utility/api/index.js +18 -0
  271. package/dist/utility/api/index.js.map +1 -0
  272. package/dist/utility/create-rest-application.utility.d.ts +3 -0
  273. package/dist/utility/create-rest-application.utility.js +9 -0
  274. package/dist/utility/create-rest-application.utility.js.map +1 -0
  275. package/dist/utility/error-string.utility.d.ts +2 -0
  276. package/dist/utility/error-string.utility.js +7 -0
  277. package/dist/utility/error-string.utility.js.map +1 -0
  278. package/dist/utility/index.d.ts +3 -0
  279. package/dist/utility/index.js +20 -0
  280. package/dist/utility/index.js.map +1 -0
  281. package/dist/validator/index.d.ts +1 -0
  282. package/dist/validator/index.js +18 -0
  283. package/dist/validator/index.js.map +1 -0
  284. package/dist/validator/is-regular-expression.validator.d.ts +4 -0
  285. package/dist/validator/is-regular-expression.validator.js +31 -0
  286. package/dist/validator/is-regular-expression.validator.js.map +1 -0
  287. 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,8 @@
1
+ import { HttpStatus } from "@nestjs/common";
2
+ export declare class ConflictResponseDTO {
3
+ correlationID: string;
4
+ error: string;
5
+ message: string;
6
+ statusCode: HttpStatus;
7
+ timestamp: number;
8
+ }
@@ -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":";;;;;;;;;;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AAC,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,8 @@
1
+ import { HttpStatus } from "@nestjs/common";
2
+ export declare class ExceptionForbiddenDTO {
3
+ correlationID: string;
4
+ error: string;
5
+ message: string;
6
+ statusCode: HttpStatus;
7
+ timestamp: number;
8
+ }
@@ -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,I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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,7 @@
1
+ export * from "./bad-request.dto";
2
+ export * from "./forbidden.dto";
3
+ export * from "./not-found.dto";
4
+ export * from "./unauthorized.dto";
5
+ export * from "./too-many-requests.dto";
6
+ export * from "./internal-server-error.dto";
7
+ export * from "./conflict.dto";
@@ -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,8 @@
1
+ import { HttpStatus } from "@nestjs/common";
2
+ export declare class ExceptionInternalServerErrorDTO {
3
+ correlationID: string;
4
+ error: string;
5
+ message: string;
6
+ statusCode: HttpStatus;
7
+ timestamp: number;
8
+ }
@@ -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,CAA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AAiB;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,8 @@
1
+ import { HttpStatus } from "@nestjs/common";
2
+ export declare class ExceptionNotFoundDTO {
3
+ correlationID: string;
4
+ error: string;
5
+ message: string;
6
+ statusCode: HttpStatus;
7
+ timestamp: number;
8
+ }
@@ -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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ject, 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,8 @@
1
+ import { HttpStatus } from "@nestjs/common";
2
+ export declare class ExceptionTooManyRequestsDTO {
3
+ correlationID: string;
4
+ error: string;
5
+ message: string;
6
+ statusCode: HttpStatus;
7
+ timestamp: number;
8
+ }
@@ -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