@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,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EErrorStringAction = void 0;
|
|
4
|
+
var EErrorStringAction;
|
|
5
|
+
(function (EErrorStringAction) {
|
|
6
|
+
EErrorStringAction["ADDRESS_NOT_MATCH_PATTERN"] = "{entity}_ADDRESS_NOT_MATCH_PATTERN";
|
|
7
|
+
EErrorStringAction["ALREADY_EXISTS"] = "{entity}_ALREADY_EXISTS";
|
|
8
|
+
EErrorStringAction["ALREADY_PAID"] = "{entity}_ALREADY_PAID";
|
|
9
|
+
EErrorStringAction["AUTHENTICATION_ERROR"] = "{entity}_AUTHENTICATION_ERROR";
|
|
10
|
+
EErrorStringAction["BLOCKED"] = "{entity}_BLOCKED";
|
|
11
|
+
EErrorStringAction["CONFIRMATION_ERROR"] = "{entity}_CONFIRMATION_ERROR";
|
|
12
|
+
EErrorStringAction["COUNT_ERROR"] = "{entity}_COUNT_ERROR";
|
|
13
|
+
EErrorStringAction["CREATING_ERROR"] = "{entity}_CREATING_ERROR";
|
|
14
|
+
EErrorStringAction["CREATING_MANY_ERROR"] = "{entity}_CREATING_MANY_ERROR";
|
|
15
|
+
EErrorStringAction["DELETING_ERROR"] = "{entity}_DELETING_ERROR";
|
|
16
|
+
EErrorStringAction["DISABLED_FOR_MERCHANT"] = "{entity}_DISABLED_FOR_MERCHANT";
|
|
17
|
+
EErrorStringAction["DISABLED_FOR_USER"] = "{entity}_DISABLED_FOR_USER";
|
|
18
|
+
EErrorStringAction["DISABLED_GLOBALLY"] = "{entity}_DISABLED_GLOBALLY";
|
|
19
|
+
EErrorStringAction["EXISTS_CHECKING_ERROR"] = "{entity}_EXISTS_CHECKING_ERROR";
|
|
20
|
+
EErrorStringAction["FETCHING_ALL_ERROR"] = "{entity}_FETCHING_ALL_ERROR";
|
|
21
|
+
EErrorStringAction["FETCHING_ERROR"] = "{entity}_FETCHING_ERROR";
|
|
22
|
+
EErrorStringAction["FETCHING_LIST_ERROR"] = "{entity}_FETCHING_LIST_ERROR";
|
|
23
|
+
EErrorStringAction["FETCHING_SIMPLE_LIST_ERROR"] = "{entity}_FETCHING_SIMPLE_LIST_ERROR";
|
|
24
|
+
EErrorStringAction["INSUFFICENT_FUNDS"] = "{entity}_INSUFFICENT_FUNDS";
|
|
25
|
+
EErrorStringAction["INVALID_AMOUNT"] = "{entity}_INVALID_AMOUNT";
|
|
26
|
+
EErrorStringAction["INVALID_CODE"] = "{entity}_INVALID_CODE";
|
|
27
|
+
EErrorStringAction["INVALID_DATA_SPECIFIED"] = "{entity}_INVALID_DATA_SPECIFIED";
|
|
28
|
+
EErrorStringAction["INVALID_HASHING_ALGORITM_CONFIGURED"] = "INVALID_HASHING_ALGORITHM_CONFIGURED";
|
|
29
|
+
EErrorStringAction["INVALID_MESSAGE"] = "{entity}_INVALID_MESSAGE";
|
|
30
|
+
EErrorStringAction["INVALID_SENDER"] = "{entity}_INVALID_SENDER";
|
|
31
|
+
EErrorStringAction["INVALID_SIGNATURE"] = "INVALID_SIGNATURE";
|
|
32
|
+
EErrorStringAction["INVALID_TYPE"] = "{entity}_INVALID_TYPE";
|
|
33
|
+
EErrorStringAction["INVALIDATING_ERROR"] = "{entity}_INVALIDATING_ERROR";
|
|
34
|
+
EErrorStringAction["LIST_PAGE_NOT_FOUND"] = "{entity}_LIST_PAGE_NOT_FOUND";
|
|
35
|
+
EErrorStringAction["NOT_ACTIVE"] = "{entity}_NOT_ACTIVE";
|
|
36
|
+
EErrorStringAction["NOT_CONFIGURED"] = "{entity}_NOT_CONFIGURED";
|
|
37
|
+
EErrorStringAction["NOT_CONNECTED"] = "{entity}_NOT_CONNECTED";
|
|
38
|
+
EErrorStringAction["NOT_FINAL_STATUS"] = "{entity}_NOT_FINAL_STATUS";
|
|
39
|
+
EErrorStringAction["NOT_FOUND"] = "{entity}_NOT_FOUND";
|
|
40
|
+
EErrorStringAction["NOT_SPECIFIED_ID_FOR_UNIQUE"] = "{entity}_NOT_SPECIFIED_ID_FOR_UNIQUE";
|
|
41
|
+
EErrorStringAction["NOT_SUPPORTS_THIS_DIRECTION_FOR_MERCHANT"] = "{entity}_NOT_SUPPORTS_THIS_DIRECTION_FOR_MERCHANT";
|
|
42
|
+
EErrorStringAction["NOT_SUPPORTS_THIS_DIRECTION_FOR_USER"] = "{entity}_NOT_SUPPORTS_THIS_DIRECTION_FOR_USER";
|
|
43
|
+
EErrorStringAction["NOT_SUPPORTS_THIS_DIRECTION_GLOBALLY"] = "{entity}_NOT_SUPPORTS_THIS_DIRECTION_GLOBALLY";
|
|
44
|
+
EErrorStringAction["OUT_OF_GLOBAL_LIMITS"] = "{entity}_OUT_OF_GLOBAL_LIMITS";
|
|
45
|
+
EErrorStringAction["OUT_OF_GLOBAL_LIMITS_WITH_FEE"] = "{entity}_OUT_OF_GLOBAL_LIMITS_WITH_FEE";
|
|
46
|
+
EErrorStringAction["OUT_OF_MERCHANT_LIMITS"] = "{entity}_OUT_OF_MERCHANT_LIMITS";
|
|
47
|
+
EErrorStringAction["OUT_OF_MERCHANT_LIMITS_WITH_FEE"] = "{entity}_OUT_OF_MERCHANT_LIMITS_WITH_FEE";
|
|
48
|
+
EErrorStringAction["OUT_OF_USER_LIMITS"] = "{entity}_OUT_OF_USER_LIMITS";
|
|
49
|
+
EErrorStringAction["OUT_OF_USER_LIMITS_WITH_FEE"] = "{entity}_OUT_OF_USER_LIMITS_WITH_FEE";
|
|
50
|
+
EErrorStringAction["PROPERTY_ALREADY_SET"] = "{entity}_PROPERTY_ALREADY_SET";
|
|
51
|
+
EErrorStringAction["REDEEMING_ERROR"] = "{entity}_REDEEMING_ERROR";
|
|
52
|
+
EErrorStringAction["REGISTRATION_ERROR"] = "{entity}_REGISTRATION_ERROR";
|
|
53
|
+
EErrorStringAction["SENDING_ERROR"] = "{entity}_SENDING_ERROR";
|
|
54
|
+
EErrorStringAction["SIMPLE_LIST_NOT_FOUND"] = "{entity}_SIMPLE_LIST_NOT_FOUND";
|
|
55
|
+
EErrorStringAction["TIMESTAMP_EXPIRED"] = "TIMESTAMP_EXPIRED";
|
|
56
|
+
EErrorStringAction["TIMESTAMP_IN_FUTURE"] = "{entity}_IN_FUTURE";
|
|
57
|
+
EErrorStringAction["TOO_MANY_REQUESTS"] = "{entity}_TOO_MANY_REQUESTS";
|
|
58
|
+
EErrorStringAction["UPDATING_ERROR"] = "{entity}_UPDATING_ERROR";
|
|
59
|
+
})(EErrorStringAction || (exports.EErrorStringAction = EErrorStringAction = {}));
|
|
60
|
+
//# sourceMappingURL=error-string-action.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-string-action.enum.js","sourceRoot":"/","sources":["enum/utility/error-string-action.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAsDX;AAtDD,WAAY,kBAAkB;IAC7B,sFAAgE,CAAA;IAChE,gEAA0C,CAAA;IAC1C,4DAAsC,CAAA;IACtC,4EAAsD,CAAA;IACtD,kDAA4B,CAAA;IAC5B,wEAAkD,CAAA;IAClD,0DAAoC,CAAA;IACpC,gEAA0C,CAAA;IAC1C,0EAAoD,CAAA;IACpD,gEAA0C,CAAA;IAC1C,8EAAwD,CAAA;IACxD,sEAAgD,CAAA;IAChD,sEAAgD,CAAA;IAChD,8EAAwD,CAAA;IACxD,wEAAkD,CAAA;IAClD,gEAA0C,CAAA;IAC1C,0EAAoD,CAAA;IACpD,wFAAkE,CAAA;IAClE,sEAAgD,CAAA;IAChD,gEAA0C,CAAA;IAC1C,4DAAsC,CAAA;IACtC,gFAA0D,CAAA;IAC1D,kGAA4E,CAAA;IAC5E,kEAA4C,CAAA;IAC5C,gEAA0C,CAAA;IAC1C,6DAAuC,CAAA;IACvC,4DAAsC,CAAA;IACtC,wEAAkD,CAAA;IAClD,0EAAoD,CAAA;IACpD,wDAAkC,CAAA;IAClC,gEAA0C,CAAA;IAC1C,8DAAwC,CAAA;IACxC,oEAA8C,CAAA;IAC9C,sDAAgC,CAAA;IAChC,0FAAoE,CAAA;IACpE,oHAA8F,CAAA;IAC9F,4GAAsF,CAAA;IACtF,4GAAsF,CAAA;IACtF,4EAAsD,CAAA;IACtD,8FAAwE,CAAA;IACxE,gFAA0D,CAAA;IAC1D,kGAA4E,CAAA;IAC5E,wEAAkD,CAAA;IAClD,0FAAoE,CAAA;IACpE,4EAAsD,CAAA;IACtD,kEAA4C,CAAA;IAC5C,wEAAkD,CAAA;IAClD,8DAAwC,CAAA;IACxC,8EAAwD,CAAA;IACxD,6DAAuC,CAAA;IACvC,gEAA0C,CAAA;IAC1C,sEAAgD,CAAA;IAChD,gEAA0C,CAAA;AAC3C,CAAC,EAtDW,kBAAkB,kCAAlB,kBAAkB,QAsD7B","sourcesContent":["export enum EErrorStringAction {\n\tADDRESS_NOT_MATCH_PATTERN = \"{entity}_ADDRESS_NOT_MATCH_PATTERN\",\n\tALREADY_EXISTS = \"{entity}_ALREADY_EXISTS\",\n\tALREADY_PAID = \"{entity}_ALREADY_PAID\",\n\tAUTHENTICATION_ERROR = \"{entity}_AUTHENTICATION_ERROR\",\n\tBLOCKED = \"{entity}_BLOCKED\",\n\tCONFIRMATION_ERROR = \"{entity}_CONFIRMATION_ERROR\",\n\tCOUNT_ERROR = \"{entity}_COUNT_ERROR\",\n\tCREATING_ERROR = \"{entity}_CREATING_ERROR\",\n\tCREATING_MANY_ERROR = \"{entity}_CREATING_MANY_ERROR\",\n\tDELETING_ERROR = \"{entity}_DELETING_ERROR\",\n\tDISABLED_FOR_MERCHANT = \"{entity}_DISABLED_FOR_MERCHANT\",\n\tDISABLED_FOR_USER = \"{entity}_DISABLED_FOR_USER\",\n\tDISABLED_GLOBALLY = \"{entity}_DISABLED_GLOBALLY\",\n\tEXISTS_CHECKING_ERROR = \"{entity}_EXISTS_CHECKING_ERROR\",\n\tFETCHING_ALL_ERROR = \"{entity}_FETCHING_ALL_ERROR\",\n\tFETCHING_ERROR = \"{entity}_FETCHING_ERROR\",\n\tFETCHING_LIST_ERROR = \"{entity}_FETCHING_LIST_ERROR\",\n\tFETCHING_SIMPLE_LIST_ERROR = \"{entity}_FETCHING_SIMPLE_LIST_ERROR\",\n\tINSUFFICENT_FUNDS = \"{entity}_INSUFFICENT_FUNDS\",\n\tINVALID_AMOUNT = \"{entity}_INVALID_AMOUNT\",\n\tINVALID_CODE = \"{entity}_INVALID_CODE\",\n\tINVALID_DATA_SPECIFIED = \"{entity}_INVALID_DATA_SPECIFIED\",\n\tINVALID_HASHING_ALGORITM_CONFIGURED = \"INVALID_HASHING_ALGORITHM_CONFIGURED\",\n\tINVALID_MESSAGE = \"{entity}_INVALID_MESSAGE\",\n\tINVALID_SENDER = \"{entity}_INVALID_SENDER\",\n\tINVALID_SIGNATURE = \"INVALID_SIGNATURE\",\n\tINVALID_TYPE = \"{entity}_INVALID_TYPE\",\n\tINVALIDATING_ERROR = \"{entity}_INVALIDATING_ERROR\",\n\tLIST_PAGE_NOT_FOUND = \"{entity}_LIST_PAGE_NOT_FOUND\",\n\tNOT_ACTIVE = \"{entity}_NOT_ACTIVE\",\n\tNOT_CONFIGURED = \"{entity}_NOT_CONFIGURED\",\n\tNOT_CONNECTED = \"{entity}_NOT_CONNECTED\",\n\tNOT_FINAL_STATUS = \"{entity}_NOT_FINAL_STATUS\",\n\tNOT_FOUND = \"{entity}_NOT_FOUND\",\n\tNOT_SPECIFIED_ID_FOR_UNIQUE = \"{entity}_NOT_SPECIFIED_ID_FOR_UNIQUE\",\n\tNOT_SUPPORTS_THIS_DIRECTION_FOR_MERCHANT = \"{entity}_NOT_SUPPORTS_THIS_DIRECTION_FOR_MERCHANT\",\n\tNOT_SUPPORTS_THIS_DIRECTION_FOR_USER = \"{entity}_NOT_SUPPORTS_THIS_DIRECTION_FOR_USER\",\n\tNOT_SUPPORTS_THIS_DIRECTION_GLOBALLY = \"{entity}_NOT_SUPPORTS_THIS_DIRECTION_GLOBALLY\",\n\tOUT_OF_GLOBAL_LIMITS = \"{entity}_OUT_OF_GLOBAL_LIMITS\",\n\tOUT_OF_GLOBAL_LIMITS_WITH_FEE = \"{entity}_OUT_OF_GLOBAL_LIMITS_WITH_FEE\",\n\tOUT_OF_MERCHANT_LIMITS = \"{entity}_OUT_OF_MERCHANT_LIMITS\",\n\tOUT_OF_MERCHANT_LIMITS_WITH_FEE = \"{entity}_OUT_OF_MERCHANT_LIMITS_WITH_FEE\",\n\tOUT_OF_USER_LIMITS = \"{entity}_OUT_OF_USER_LIMITS\",\n\tOUT_OF_USER_LIMITS_WITH_FEE = \"{entity}_OUT_OF_USER_LIMITS_WITH_FEE\",\n\tPROPERTY_ALREADY_SET = \"{entity}_PROPERTY_ALREADY_SET\",\n\tREDEEMING_ERROR = \"{entity}_REDEEMING_ERROR\",\n\tREGISTRATION_ERROR = \"{entity}_REGISTRATION_ERROR\",\n\tSENDING_ERROR = \"{entity}_SENDING_ERROR\",\n\tSIMPLE_LIST_NOT_FOUND = \"{entity}_SIMPLE_LIST_NOT_FOUND\",\n\tTIMESTAMP_EXPIRED = \"TIMESTAMP_EXPIRED\",\n\tTIMESTAMP_IN_FUTURE = \"{entity}_IN_FUTURE\",\n\tTOO_MANY_REQUESTS = \"{entity}_TOO_MANY_REQUESTS\",\n\tUPDATING_ERROR = \"{entity}_UPDATING_ERROR\",\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./error-string-action.enum";
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./error-string-action.enum"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["enum/utility/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C","sourcesContent":["export * from \"./error-string-action.enum\";\n"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./decorator";
|
|
2
|
+
export * from "./utility";
|
|
3
|
+
export * from "./enum";
|
|
4
|
+
export * from "./interface";
|
|
5
|
+
export * from "./constant";
|
|
6
|
+
export * from "./dto";
|
|
7
|
+
export * from "./decorator/api/method.decorator";
|
|
8
|
+
export * from "./class";
|
|
9
|
+
export * from "./type";
|
|
10
|
+
export * from "./interceptor";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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("./decorator"), exports);
|
|
18
|
+
__exportStar(require("./utility"), exports);
|
|
19
|
+
__exportStar(require("./enum"), exports);
|
|
20
|
+
__exportStar(require("./interface"), exports);
|
|
21
|
+
__exportStar(require("./constant"), exports);
|
|
22
|
+
__exportStar(require("./dto"), exports);
|
|
23
|
+
__exportStar(require("./decorator/api/method.decorator"), exports);
|
|
24
|
+
__exportStar(require("./class"), exports);
|
|
25
|
+
__exportStar(require("./type"), exports);
|
|
26
|
+
__exportStar(require("./interceptor"), exports);
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,4CAA0B;AAC1B,yCAAuB;AACvB,8CAA4B;AAC5B,6CAA2B;AAC3B,wCAAsB;AACtB,mEAAiD;AACjD,0CAAwB;AACxB,yCAAuB;AACvB,gDAA8B","sourcesContent":["export * from \"./decorator\";\nexport * from \"./utility\";\nexport * from \"./enum\";\nexport * from \"./interface\";\nexport * from \"./constant\";\nexport * from \"./dto\";\nexport * from \"./decorator/api/method.decorator\";\nexport * from \"./class\";\nexport * from \"./type\";\nexport * from \"./interceptor\";\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CallHandler, ExecutionContext, NestInterceptor } from "@nestjs/common";
|
|
2
|
+
import type { Observable } from "rxjs";
|
|
3
|
+
export declare class CorrelationIDResponseBodyInterceptor implements NestInterceptor {
|
|
4
|
+
intercept(context: ExecutionContext, next: CallHandler): Observable<any>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.CorrelationIDResponseBodyInterceptor = void 0;
|
|
10
|
+
const node_crypto_1 = require("node:crypto");
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const throttler_1 = require("@nestjs/throttler");
|
|
13
|
+
const operators_1 = require("rxjs/operators");
|
|
14
|
+
let CorrelationIDResponseBodyInterceptor = class CorrelationIDResponseBodyInterceptor {
|
|
15
|
+
intercept(context, next) {
|
|
16
|
+
return next.handle().pipe((0, operators_1.catchError)((error) => {
|
|
17
|
+
console.log("FOUND ERROR", error, error instanceof common_1.HttpException);
|
|
18
|
+
console.log("Error constructor:", error.constructor.name);
|
|
19
|
+
console.log("Error instanceof Error:", error instanceof Error);
|
|
20
|
+
console.log("Error instanceof HttpException:", error instanceof common_1.HttpException);
|
|
21
|
+
console.log("Error instanceof NotFoundException:", error instanceof common_1.NotFoundException);
|
|
22
|
+
console.log("Error properties:", Object.keys(error));
|
|
23
|
+
if (error instanceof throttler_1.ThrottlerException) {
|
|
24
|
+
const request = context.switchToHttp().getRequest();
|
|
25
|
+
let correlationId = request.headers["x-correlation-id"];
|
|
26
|
+
const errorResponse = error.getResponse();
|
|
27
|
+
if (correlationId === undefined) {
|
|
28
|
+
correlationId = (0, node_crypto_1.randomUUID)();
|
|
29
|
+
}
|
|
30
|
+
let customErrorResponse = {};
|
|
31
|
+
customErrorResponse.statusCode = common_1.HttpStatus.TOO_MANY_REQUESTS;
|
|
32
|
+
if (typeof errorResponse === "object" && errorResponse !== null) {
|
|
33
|
+
customErrorResponse = { ...errorResponse };
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
customErrorResponse.message = errorResponse;
|
|
37
|
+
}
|
|
38
|
+
customErrorResponse.error = "Too Many Requests";
|
|
39
|
+
customErrorResponse.timestamp = Date.now();
|
|
40
|
+
customErrorResponse.correlationID = correlationId;
|
|
41
|
+
throw new common_1.HttpException(customErrorResponse, error.getStatus());
|
|
42
|
+
}
|
|
43
|
+
else if (error instanceof common_1.HttpException) {
|
|
44
|
+
const request = context.switchToHttp().getRequest();
|
|
45
|
+
let correlationId = request.headers["x-correlation-id"];
|
|
46
|
+
const errorResponse = error.getResponse();
|
|
47
|
+
if (correlationId === undefined) {
|
|
48
|
+
correlationId = (0, node_crypto_1.randomUUID)();
|
|
49
|
+
}
|
|
50
|
+
let customErrorResponse = {};
|
|
51
|
+
if (typeof errorResponse === "object" && errorResponse !== null) {
|
|
52
|
+
customErrorResponse = { ...errorResponse };
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
customErrorResponse.message = errorResponse;
|
|
56
|
+
}
|
|
57
|
+
customErrorResponse.correlationID = correlationId;
|
|
58
|
+
customErrorResponse.timestamp = Date.now();
|
|
59
|
+
console.log("CUSTOM ERROR", customErrorResponse);
|
|
60
|
+
throw new common_1.HttpException(customErrorResponse, error.getStatus());
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
console.log("TYT BLYA?");
|
|
64
|
+
const request = context.switchToHttp().getRequest();
|
|
65
|
+
let correlationId = request.headers["x-correlation-id"];
|
|
66
|
+
if (correlationId === undefined) {
|
|
67
|
+
correlationId = (0, node_crypto_1.randomUUID)();
|
|
68
|
+
}
|
|
69
|
+
if (!(error instanceof Error)) {
|
|
70
|
+
error = new common_1.InternalServerErrorException("Unknown error");
|
|
71
|
+
}
|
|
72
|
+
const internalError = error;
|
|
73
|
+
const errorResponse = "Internal server error";
|
|
74
|
+
const customErrorResponse = {};
|
|
75
|
+
customErrorResponse.statusCode = common_1.HttpStatus.INTERNAL_SERVER_ERROR;
|
|
76
|
+
customErrorResponse.message = errorResponse;
|
|
77
|
+
customErrorResponse.error = "Internal server error";
|
|
78
|
+
customErrorResponse.timestamp = Date.now();
|
|
79
|
+
customErrorResponse.correlationID = correlationId;
|
|
80
|
+
const status = "getStatus" in internalError && typeof internalError.getStatus === "function" ? internalError.getStatus() : common_1.HttpStatus.INTERNAL_SERVER_ERROR;
|
|
81
|
+
throw new common_1.HttpException(customErrorResponse, status);
|
|
82
|
+
}
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
exports.CorrelationIDResponseBodyInterceptor = CorrelationIDResponseBodyInterceptor;
|
|
87
|
+
exports.CorrelationIDResponseBodyInterceptor = CorrelationIDResponseBodyInterceptor = __decorate([
|
|
88
|
+
(0, common_1.Injectable)()
|
|
89
|
+
], CorrelationIDResponseBodyInterceptor);
|
|
90
|
+
//# sourceMappingURL=correlation-id-response-body.interceptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"correlation-id-response-body.interceptor.js","sourceRoot":"/","sources":["interceptor/correlation-id-response-body.interceptor.ts"],"names":[],"mappings":"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","sourcesContent":["import { randomUUID } from \"node:crypto\";\n\nimport {HttpException, HttpStatus, Injectable, InternalServerErrorException, NotFoundException} from \"@nestjs/common\";\nimport { ThrottlerException } from \"@nestjs/throttler\";\n\n\nimport { catchError } from \"rxjs/operators\";\n\nimport type { CallHandler, ExecutionContext, NestInterceptor } from \"@nestjs/common\";\nimport type { FastifyRequest } from \"fastify\";\nimport type { Observable } from \"rxjs\";\n\n@Injectable()\nexport class CorrelationIDResponseBodyInterceptor implements NestInterceptor {\n\tintercept(context: ExecutionContext, next: CallHandler): Observable<any> {\n\t\treturn next.handle().pipe(\n\t\t\tcatchError((error: unknown) => {\n\t\t\t\tconsole.log(\"FOUND ERROR\", error, error instanceof HttpException);\n\t\t\t\tconsole.log(\"Error constructor:\", (error as any).constructor.name);\n\t\t\t\tconsole.log(\"Error instanceof Error:\", error instanceof Error);\n\t\t\t\tconsole.log(\"Error instanceof HttpException:\", error instanceof HttpException);\n\t\t\t\tconsole.log(\"Error instanceof NotFoundException:\", error instanceof NotFoundException);\n\t\t\t\tconsole.log(\"Error properties:\", Object.keys(error as any));\n\t\t\t\tif (error instanceof ThrottlerException) {\n\t\t\t\t\tconst request: FastifyRequest = context.switchToHttp().getRequest<FastifyRequest>();\n\t\t\t\t\tlet correlationId: string = request.headers[\"x-correlation-id\"] as string;\n\t\t\t\t\tconst errorResponse: object | string = error.getResponse();\n\n\t\t\t\t\tif (correlationId === undefined) {\n\t\t\t\t\t\tcorrelationId = randomUUID();\n\t\t\t\t\t}\n\n\t\t\t\t\tlet customErrorResponse: Record<string, any> = {};\n\t\t\t\t\tcustomErrorResponse.statusCode = HttpStatus.TOO_MANY_REQUESTS;\n\n\t\t\t\t\tif (typeof errorResponse === \"object\" && errorResponse !== null) {\n\t\t\t\t\t\tcustomErrorResponse = { ...errorResponse };\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcustomErrorResponse.message = errorResponse;\n\t\t\t\t\t}\n\t\t\t\t\tcustomErrorResponse.error = \"Too Many Requests\";\n\t\t\t\t\tcustomErrorResponse.timestamp = Date.now();\n\t\t\t\t\tcustomErrorResponse.correlationID = correlationId;\n\n\t\t\t\t\tthrow new HttpException(customErrorResponse, error.getStatus());\n\t\t\t\t} else if (error instanceof HttpException) {\n\t\t\t\t\tconst request: FastifyRequest = context.switchToHttp().getRequest<FastifyRequest>();\n\t\t\t\t\tlet correlationId: string = request.headers[\"x-correlation-id\"] as string;\n\t\t\t\t\tconst errorResponse: object | string = error.getResponse();\n\n\t\t\t\t\tif (correlationId === undefined) {\n\t\t\t\t\t\tcorrelationId = randomUUID();\n\t\t\t\t\t}\n\n\t\t\t\t\tlet customErrorResponse: Record<string, any> = {};\n\n\t\t\t\t\tif (typeof errorResponse === \"object\" && errorResponse !== null) {\n\t\t\t\t\t\tcustomErrorResponse = { ...errorResponse };\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcustomErrorResponse.message = errorResponse;\n\t\t\t\t\t}\n\t\t\t\t\tcustomErrorResponse.correlationID = correlationId;\n\t\t\t\t\tcustomErrorResponse.timestamp = Date.now();\n\n\t\t\t\t\tconsole.log(\"CUSTOM ERROR\", customErrorResponse);\n\t\t\t\t\tthrow new HttpException(customErrorResponse, error.getStatus());\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(\"TYT BLYA?\");\n\t\t\t\t\tconst request: FastifyRequest = context.switchToHttp().getRequest<FastifyRequest>();\n\t\t\t\t\tlet correlationId: string = request.headers[\"x-correlation-id\"] as string;\n\n\t\t\t\t\tif (correlationId === undefined) {\n\t\t\t\t\t\tcorrelationId = randomUUID();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!(error instanceof Error)) {\n\t\t\t\t\t\terror = new InternalServerErrorException(\"Unknown error\");\n\t\t\t\t\t}\n\n\t\t\t\t\tconst internalError: HttpException | InternalServerErrorException = error as HttpException | InternalServerErrorException;\n\t\t\t\t\tconst errorResponse: string = \"Internal server error\";\n\t\t\t\t\tconst customErrorResponse: Record<string, any> = {};\n\t\t\t\t\tcustomErrorResponse.statusCode = HttpStatus.INTERNAL_SERVER_ERROR;\n\t\t\t\t\tcustomErrorResponse.message = errorResponse;\n\t\t\t\t\tcustomErrorResponse.error = \"Internal server error\";\n\t\t\t\t\tcustomErrorResponse.timestamp = Date.now();\n\t\t\t\t\tcustomErrorResponse.correlationID = correlationId;\n\n\t\t\t\t\tconst status: number = \"getStatus\" in internalError && typeof internalError.getStatus === \"function\" ? internalError.getStatus() : HttpStatus.INTERNAL_SERVER_ERROR;\n\n\t\t\t\t\tthrow new HttpException(customErrorResponse, status);\n\t\t\t\t}\n\t\t\t}),\n\t\t);\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./correlation-id-response-body.interceptor";
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./correlation-id-response-body.interceptor"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["interceptor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6EAA2D","sourcesContent":["export * from \"./correlation-id-response-body.interceptor\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-base-entity.interface.js","sourceRoot":"/","sources":["interface/api-base-entity.interface.ts"],"names":[],"mappings":"","sourcesContent":["export interface IApiBaseEntity {\n\tname: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["interface/decorator/api/function/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-list-response-result.interface.js","sourceRoot":"/","sources":["interface/decorator/api/get-list-response-result.interface.ts"],"names":[],"mappings":"","sourcesContent":["export interface IApiGetListResponseResult<T> {\n\tcount: number;\n\tcurrentPage: number;\n\titems: Array<T>;\n\ttotalCount: number;\n\ttotalPages: number;\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
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("./property"), exports);
|
|
18
|
+
__exportStar(require("./function"), exports);
|
|
19
|
+
__exportStar(require("./method"), exports);
|
|
20
|
+
__exportStar(require("./get-list-response-result.interface"), exports);
|
|
21
|
+
__exportStar(require("./response-type.interface"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["interface/decorator/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,6CAA2B;AAC3B,2CAAyB;AACzB,uEAAqD;AACrD,4DAA0C","sourcesContent":["export * from \"./property\";\nexport * from \"./function\";\nexport * from \"./method\";\nexport * from \"./get-list-response-result.interface\";\nexport * from \"./response-type.interface\";\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./properties.interface"), exports);
|
|
18
|
+
__exportStar(require("./throttler-properties.interface"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["interface/decorator/api/method/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,mEAAiD","sourcesContent":["export * from \"./properties.interface\";\nexport * from \"./throttler-properties.interface\";\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HttpStatus, RequestMethod, Type } from "@nestjs/common";
|
|
2
|
+
import type { EApiAction, EApiAuthenticationType } from "../../../../enum";
|
|
3
|
+
import type { IApiResponseType } from "../response-type.interface";
|
|
4
|
+
import type { IApiMethodThrottlerProperties } from "./throttler-properties.interface";
|
|
5
|
+
export interface IApiMethodProperties<T> {
|
|
6
|
+
action?: EApiAction;
|
|
7
|
+
authentication?: EApiAuthenticationType;
|
|
8
|
+
description?: string;
|
|
9
|
+
entity: T;
|
|
10
|
+
httpCode: HttpStatus;
|
|
11
|
+
method: RequestMethod;
|
|
12
|
+
path: string;
|
|
13
|
+
responses?: IApiResponseType;
|
|
14
|
+
responseType: string | Type<unknown>;
|
|
15
|
+
throttler?: IApiMethodThrottlerProperties;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties.interface.js","sourceRoot":"/","sources":["interface/decorator/api/method/properties.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { HttpStatus, RequestMethod, Type } from \"@nestjs/common\";\nimport type { EApiAction, EApiAuthenticationType } from \"../../../../enum\";\nimport type { IApiResponseType } from \"../response-type.interface\";\nimport type { IApiMethodThrottlerProperties } from \"./throttler-properties.interface\";\n\nexport interface IApiMethodProperties<T> {\n\taction?: EApiAction;\n\tauthentication?: EApiAuthenticationType;\n\tdescription?: string;\n\tentity: T;\n\thttpCode: HttpStatus;\n\tmethod: RequestMethod;\n\tpath: string;\n\tresponses?: IApiResponseType;\n\tresponseType: string | Type<unknown>;\n\tthrottler?: IApiMethodThrottlerProperties;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"throttler-properties.interface.js","sourceRoot":"/","sources":["interface/decorator/api/method/throttler-properties.interface.ts"],"names":[],"mappings":"","sourcesContent":["export interface IApiMethodThrottlerProperties {\n\tlimit: number;\n\tttl: number;\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IApiPropertyBaseProperties<T> {
|
|
2
|
+
description?: string;
|
|
3
|
+
entity: T;
|
|
4
|
+
enum?: Record<string, number | string>;
|
|
5
|
+
expose?: boolean;
|
|
6
|
+
isArray?: true;
|
|
7
|
+
maxItems?: number;
|
|
8
|
+
minItems?: number;
|
|
9
|
+
nullable?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
response?: boolean;
|
|
12
|
+
uniqueItems?: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-properties.interface.js","sourceRoot":"/","sources":["interface/decorator/api/property/base-properties.interface.ts"],"names":[],"mappings":"","sourcesContent":["export interface IApiPropertyBaseProperties<T> {\n\tdescription?: string;\n\tentity: T;\n\tenum?: Record<string, number | string>;\n\texpose?: boolean;\n\tisArray?: true;\n\tmaxItems?: number;\n\tminItems?: number;\n\tnullable?: boolean;\n\trequired?: boolean;\n\tresponse?: boolean;\n\tuniqueItems?: boolean;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-properties.interface.js","sourceRoot":"/","sources":["interface/decorator/api/property/date-properties.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { EApiPropertyDateType } from \"../../../../enum\";\nimport type { IApiPropertyBaseProperties } from \"./base-properties.interface\";\n\nexport interface IApiPropertyDateProperties<T> extends IApiPropertyBaseProperties<T> {\n\ttype: EApiPropertyDateType;\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./base-properties.interface";
|
|
2
|
+
export * from "./date-properties.interface";
|
|
3
|
+
export * from "./number-properties.interface";
|
|
4
|
+
export * from "./object-properties.interface";
|
|
5
|
+
export * from "./string-properties.interface";
|
|
6
|
+
export * from "./uuid-properties.interface";
|
|
@@ -0,0 +1,23 @@
|
|
|
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("./base-properties.interface"), exports);
|
|
18
|
+
__exportStar(require("./date-properties.interface"), exports);
|
|
19
|
+
__exportStar(require("./number-properties.interface"), exports);
|
|
20
|
+
__exportStar(require("./object-properties.interface"), exports);
|
|
21
|
+
__exportStar(require("./string-properties.interface"), exports);
|
|
22
|
+
__exportStar(require("./uuid-properties.interface"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["interface/decorator/api/property/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,8DAA4C;AAC5C,gEAA8C;AAC9C,gEAA8C;AAC9C,gEAA8C;AAC9C,8DAA4C","sourcesContent":["export * from \"./base-properties.interface\";\nexport * from \"./date-properties.interface\";\nexport * from \"./number-properties.interface\";\nexport * from \"./object-properties.interface\";\nexport * from \"./string-properties.interface\";\nexport * from \"./uuid-properties.interface\";\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IApiPropertyBaseProperties } from "./base-properties.interface";
|
|
2
|
+
import type { EApiPropertyDataType } from "../../../../enum";
|
|
3
|
+
export interface IApiPropertyNumberProperties<T> extends IApiPropertyBaseProperties<T> {
|
|
4
|
+
example?: number;
|
|
5
|
+
maximum: number;
|
|
6
|
+
minimum: number;
|
|
7
|
+
multipleOf: number;
|
|
8
|
+
type: EApiPropertyDataType;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-properties.interface.js","sourceRoot":"/","sources":["interface/decorator/api/property/number-properties.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { IApiPropertyBaseProperties } from \"./base-properties.interface\";\nimport type { EApiPropertyDataType } from \"../../../../enum\";\n\nexport interface IApiPropertyNumberProperties<T> extends IApiPropertyBaseProperties<T> {\n\texample?: number;\n\tmaximum: number;\n\tminimum: number;\n\tmultipleOf: number;\n\ttype: EApiPropertyDataType;\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Type } from "@nestjs/common";
|
|
2
|
+
import type { ReferenceObject, SchemaObject } from "@nestjs/swagger/dist/interfaces/open-api-spec.interface";
|
|
3
|
+
import type { IApiPropertyBaseProperties } from "./base-properties.interface";
|
|
4
|
+
export interface IApiPropertyObjectProperties<T> extends IApiPropertyBaseProperties<T> {
|
|
5
|
+
additionalProperties?: boolean | ReferenceObject | SchemaObject;
|
|
6
|
+
default?: number | string;
|
|
7
|
+
nested?: boolean;
|
|
8
|
+
nullable?: boolean;
|
|
9
|
+
type?: [Function] | Function | Record<string, any> | string | Type<unknown>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-properties.interface.js","sourceRoot":"/","sources":["interface/decorator/api/property/object-properties.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { Type } from \"@nestjs/common\";\nimport type { ReferenceObject, SchemaObject } from \"@nestjs/swagger/dist/interfaces/open-api-spec.interface\";\nimport type { IApiPropertyBaseProperties } from \"./base-properties.interface\";\n\nexport interface IApiPropertyObjectProperties<T> extends IApiPropertyBaseProperties<T> {\n\tadditionalProperties?: boolean | ReferenceObject | SchemaObject;\n\tdefault?: number | string;\n\tnested?: boolean;\n\tnullable?: boolean;\n\ttype?: [Function] | Function | Record<string, any> | string | Type<unknown>;\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EApiPropertyDataType } from "../../../../enum";
|
|
2
|
+
import type { IApiPropertyBaseProperties } from "./base-properties.interface";
|
|
3
|
+
export interface IApiPropertyStringProperties<T> extends IApiPropertyBaseProperties<T> {
|
|
4
|
+
example: Array<string> | string;
|
|
5
|
+
format: EApiPropertyDataType;
|
|
6
|
+
maxLength?: number;
|
|
7
|
+
minLength?: number;
|
|
8
|
+
pattern: string;
|
|
9
|
+
type: EApiPropertyDataType;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-properties.interface.js","sourceRoot":"/","sources":["interface/decorator/api/property/string-properties.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { EApiPropertyDataType } from \"../../../../enum\";\nimport type { IApiPropertyBaseProperties } from \"./base-properties.interface\";\n\nexport interface IApiPropertyStringProperties<T> extends IApiPropertyBaseProperties<T> {\n\texample: Array<string> | string;\n\tformat: EApiPropertyDataType;\n\tmaxLength?: number;\n\tminLength?: number;\n\tpattern: string;\n\ttype: EApiPropertyDataType;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid-properties.interface.js","sourceRoot":"/","sources":["interface/decorator/api/property/uuid-properties.interface.ts"],"names":[],"mappings":"","sourcesContent":["export interface IApiPropertyUuidProperties<T> {\n\tdescription?: string;\n\tentity: T;\n\texpose?: boolean;\n\tnullable?: boolean;\n\trequired?: boolean;\n\tresponse?: boolean;\n}\n"]}
|