@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,8 @@
|
|
|
1
|
+
import { IApiGetListResponseResult } from "../../interface";
|
|
2
|
+
import { BaseEntity } from "typeorm";
|
|
3
|
+
import { TApiFunctionGetListProperties } from "../../type";
|
|
4
|
+
import { TApiFunctionGetProperties } from "../../type/api/function/get-properties.type";
|
|
5
|
+
export declare class BaseApiService<E extends BaseEntity> {
|
|
6
|
+
getList(_properties: TApiFunctionGetListProperties<E>): Promise<IApiGetListResponseResult<E>>;
|
|
7
|
+
get(_id: string, _properties?: TApiFunctionGetProperties<E>): Promise<E>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseApiService = void 0;
|
|
4
|
+
class BaseApiService {
|
|
5
|
+
getList(_properties) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
get(_id, _properties) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.BaseApiService = BaseApiService;
|
|
13
|
+
//# sourceMappingURL=base-service.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-service.class.js","sourceRoot":"/","sources":["class/api/base-service.class.ts"],"names":[],"mappings":";;;AAKA,MAAa,cAAc;IACvB,OAAO,CAAC,WAA6C;QACjD,OAAO,IAAW,CAAC;IACvB,CAAC;IAED,GAAG,CAAC,GAAW,EAAE,WAA0C;QACvD,OAAO,IAAW,CAAC;IACvB,CAAC;CACJ;AARD,wCAQC","sourcesContent":["import { IApiGetListResponseResult } from \"../../interface\";\nimport { BaseEntity } from \"typeorm\";\nimport {TApiFunctionGetListProperties} from \"../../type\";\nimport {TApiFunctionGetProperties} from \"../../type/api/function/get-properties.type\";\n\nexport class BaseApiService<E extends BaseEntity> {\n getList(_properties: TApiFunctionGetListProperties<E>): Promise<IApiGetListResponseResult<E>> {\n return null as any;\n }\n\n get(_id: string, _properties?: TApiFunctionGetProperties<E>): Promise<E> {\n return null as any;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./base-service.class";
|
|
@@ -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("./base-service.class"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["class/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC","sourcesContent":["export * from \"./base-service.class\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./api";
|
|
@@ -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("./api"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["class/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB","sourcesContent":["export * from \"./api\";\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DATE_CONSTANT = void 0;
|
|
4
|
+
const MINIMUM_UNIX_TIME = 0;
|
|
5
|
+
const MAXIMUM_UNIX_TIME = 2_147_483_647_000;
|
|
6
|
+
exports.DATE_CONSTANT = {
|
|
7
|
+
MAXIMUM_UNIX_TIME,
|
|
8
|
+
MINIMUM_UNIX_TIME,
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=date.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.constant.js","sourceRoot":"/","sources":["constant/date.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,iBAAiB,GAAW,CAAC,CAAC;AACpC,MAAM,iBAAiB,GAAW,iBAAiB,CAAC;AAEvC,QAAA,aAAa,GAGtB;IACH,iBAAiB;IACjB,iBAAiB;CACR,CAAC","sourcesContent":["const MINIMUM_UNIX_TIME: number = 0;\nconst MAXIMUM_UNIX_TIME: number = 2_147_483_647_000;\n\nexport const DATE_CONSTANT: {\n\treadonly MAXIMUM_UNIX_TIME: number;\n\treadonly MINIMUM_UNIX_TIME: number;\n} = {\n\tMAXIMUM_UNIX_TIME,\n\tMINIMUM_UNIX_TIME,\n} as const;\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_FUNCTION_DECORATOR_CONSTANT = void 0;
|
|
4
|
+
const enum_1 = require("../../../enum");
|
|
5
|
+
const DEFAULT_FILTER_ORDER_BY_DIRECTION = enum_1.EFilterOrderDirection.ASC;
|
|
6
|
+
exports.API_FUNCTION_DECORATOR_CONSTANT = {
|
|
7
|
+
DEFAULT_FILTER_ORDER_BY_DIRECTION,
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=function.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function.constant.js","sourceRoot":"/","sources":["constant/decorator/api/function.constant.ts"],"names":[],"mappings":";;;AAAA,wCAAsD;AAEtD,MAAM,iCAAiC,GAA0B,4BAAqB,CAAC,GAAG,CAAC;AAE9E,QAAA,+BAA+B,GAExC;IACH,iCAAiC;CACxB,CAAC","sourcesContent":["import { EFilterOrderDirection } from \"../../../enum\";\n\nconst DEFAULT_FILTER_ORDER_BY_DIRECTION: EFilterOrderDirection = EFilterOrderDirection.ASC;\n\nexport const API_FUNCTION_DECORATOR_CONSTANT: {\n\treadonly DEFAULT_FILTER_ORDER_BY_DIRECTION: EFilterOrderDirection;\n} = {\n\tDEFAULT_FILTER_ORDER_BY_DIRECTION,\n} as const;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./function.constant";
|
|
@@ -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("./function.constant"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/decorator/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC","sourcesContent":["export * from \"./function.constant\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./api";
|
|
@@ -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("./api"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/decorator/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB","sourcesContent":["export * from \"./api\";\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXCEPTION_DTO_CONSTANT = void 0;
|
|
4
|
+
const MINIMUM_ERROR_LENGTH = 3;
|
|
5
|
+
const MAXIMUM_ERROR_LENGTH = 64;
|
|
6
|
+
const MINIMUM_ERROR_MESSAGE_LENGTH = 3;
|
|
7
|
+
const MAXIMUM_ERROR_MESSAGE_LENGTH = 64;
|
|
8
|
+
exports.EXCEPTION_DTO_CONSTANT = {
|
|
9
|
+
MAXIMUM_ERROR_LENGTH,
|
|
10
|
+
MAXIMUM_ERROR_MESSAGE_LENGTH,
|
|
11
|
+
MINIMUM_ERROR_LENGTH,
|
|
12
|
+
MINIMUM_ERROR_MESSAGE_LENGTH,
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=exception.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exception.constant.js","sourceRoot":"/","sources":["constant/dto/exception.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAW,CAAC,CAAC;AACvC,MAAM,oBAAoB,GAAW,EAAE,CAAC;AACxC,MAAM,4BAA4B,GAAW,CAAC,CAAC;AAC/C,MAAM,4BAA4B,GAAW,EAAE,CAAC;AAEnC,QAAA,sBAAsB,GAK/B;IACH,oBAAoB;IACpB,4BAA4B;IAC5B,oBAAoB;IACpB,4BAA4B;CACnB,CAAC","sourcesContent":["const MINIMUM_ERROR_LENGTH: number = 3;\nconst MAXIMUM_ERROR_LENGTH: number = 64;\nconst MINIMUM_ERROR_MESSAGE_LENGTH: number = 3;\nconst MAXIMUM_ERROR_MESSAGE_LENGTH: number = 64;\n\nexport const EXCEPTION_DTO_CONSTANT: {\n\treadonly MAXIMUM_ERROR_LENGTH: number;\n\treadonly MAXIMUM_ERROR_MESSAGE_LENGTH: number;\n\treadonly MINIMUM_ERROR_LENGTH: number;\n\treadonly MINIMUM_ERROR_MESSAGE_LENGTH: number;\n} = {\n\tMAXIMUM_ERROR_LENGTH,\n\tMAXIMUM_ERROR_MESSAGE_LENGTH,\n\tMINIMUM_ERROR_LENGTH,\n\tMINIMUM_ERROR_MESSAGE_LENGTH,\n} as const;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./exception.constant";
|
|
@@ -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("./exception.constant"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC","sourcesContent":["export * from \"./exception.constant\";\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("./decorator"), exports);
|
|
18
|
+
__exportStar(require("./dto"), exports);
|
|
19
|
+
__exportStar(require("./interface"), exports);
|
|
20
|
+
__exportStar(require("./date.constant"), exports);
|
|
21
|
+
__exportStar(require("./number.constant"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,wCAAsB;AACtB,8CAA4B;AAC5B,kDAAgC;AAChC,oDAAkC","sourcesContent":["export * from \"./decorator\";\nexport * from \"./dto\";\nexport * from \"./interface\";\nexport * from \"./date.constant\";\nexport * from \"./number.constant\";\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_FILTER_INTERFACE_CONSTANT = void 0;
|
|
4
|
+
const ALLOWED_ENTITY_TO_FILTER_COLUMNS = [
|
|
5
|
+
'string', 'text', 'varchar', 'char',
|
|
6
|
+
'number', 'int', 'integer', 'tinyint', 'smallint', 'mediumint', 'bigint', 'float', 'double', 'decimal',
|
|
7
|
+
'date', 'datetime', 'timestamp'
|
|
8
|
+
];
|
|
9
|
+
exports.API_FILTER_INTERFACE_CONSTANT = {
|
|
10
|
+
ALLOWED_ENTITY_TO_FILTER_COLUMNS,
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=filter.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.constant.js","sourceRoot":"/","sources":["constant/interface/api/filter.constant.ts"],"names":[],"mappings":";;;AACA,MAAM,gCAAgC,GAAa;IAC/C,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IACnC,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS;IACtG,MAAM,EAAE,UAAU,EAAE,WAAW;CAClC,CAAC;AAEW,QAAA,6BAA6B,GAEtC;IACA,gCAAgC;CAC1B,CAAC","sourcesContent":["\nconst ALLOWED_ENTITY_TO_FILTER_COLUMNS: string[] = [\n 'string', 'text', 'varchar', 'char',\n 'number', 'int', 'integer', 'tinyint', 'smallint', 'mediumint', 'bigint', 'float', 'double', 'decimal',\n 'date', 'datetime', 'timestamp'\n];\n\nexport const API_FILTER_INTERFACE_CONSTANT: {\n readonly ALLOWED_ENTITY_TO_FILTER_COLUMNS: string[];\n} = {\n ALLOWED_ENTITY_TO_FILTER_COLUMNS,\n} as const;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./property";
|
|
@@ -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("./property"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/interface/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B","sourcesContent":["export * from \"./property\";\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("./string.constant"), exports);
|
|
18
|
+
__exportStar(require("./wallet.constant"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/interface/api/property/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,oDAAkC","sourcesContent":["export * from \"./string.constant\";\nexport * from \"./wallet.constant\";\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_PROPERTY_STRING_INTERFACE_CONSTANT = void 0;
|
|
4
|
+
const REGEX_PATTERN_INDEX = 1;
|
|
5
|
+
const REGEX_FLAGS_INDEX = 2;
|
|
6
|
+
const IP_VERSION = 4;
|
|
7
|
+
exports.API_PROPERTY_STRING_INTERFACE_CONSTANT = {
|
|
8
|
+
IP_VERSION,
|
|
9
|
+
REGEX_FLAGS_INDEX,
|
|
10
|
+
REGEX_PATTERN_INDEX,
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=string.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.constant.js","sourceRoot":"/","sources":["constant/interface/api/property/string.constant.ts"],"names":[],"mappings":";;;AAEA,MAAM,mBAAmB,GAAW,CAAC,CAAC;AACtC,MAAM,iBAAiB,GAAW,CAAC,CAAC;AACpC,MAAM,UAAU,GAAgB,CAAC,CAAC;AAErB,QAAA,sCAAsC,GAI/C;IACH,UAAU;IACV,iBAAiB;IACjB,mBAAmB;CACV,CAAC","sourcesContent":["import type { IsIpVersion } from \"class-validator/types/decorator/string/IsIP\";\n\nconst REGEX_PATTERN_INDEX: number = 1;\nconst REGEX_FLAGS_INDEX: number = 2;\nconst IP_VERSION: IsIpVersion = 4;\n\nexport const API_PROPERTY_STRING_INTERFACE_CONSTANT: {\n\treadonly IP_VERSION: IsIpVersion;\n\treadonly REGEX_FLAGS_INDEX: number;\n\treadonly REGEX_PATTERN_INDEX: number;\n} = {\n\tIP_VERSION,\n\tREGEX_FLAGS_INDEX,\n\tREGEX_PATTERN_INDEX,\n} as const;\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_PROPERTY_WALLET_INTERFACE_CONSTANT = void 0;
|
|
4
|
+
const MINIMUM = 10_000_000_000;
|
|
5
|
+
const MAXIMUM = 999_999_999_999;
|
|
6
|
+
const EXAMPLE = 18_143_008_867;
|
|
7
|
+
exports.API_PROPERTY_WALLET_INTERFACE_CONSTANT = {
|
|
8
|
+
EXAMPLE,
|
|
9
|
+
MAXIMUM,
|
|
10
|
+
MINIMUM,
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=wallet.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet.constant.js","sourceRoot":"/","sources":["constant/interface/api/property/wallet.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAW,cAAc,CAAC;AACvC,MAAM,OAAO,GAAW,eAAe,CAAC;AACxC,MAAM,OAAO,GAAW,cAAc,CAAC;AAE1B,QAAA,sCAAsC,GAI/C;IACH,OAAO;IACP,OAAO;IACP,OAAO;CACE,CAAC","sourcesContent":["const MINIMUM: number = 10_000_000_000;\nconst MAXIMUM: number = 999_999_999_999;\nconst EXAMPLE: number = 18_143_008_867;\n\nexport const API_PROPERTY_WALLET_INTERFACE_CONSTANT: {\n\treadonly EXAMPLE: number;\n\treadonly MAXIMUM: number;\n\treadonly MINIMUM: number;\n} = {\n\tEXAMPLE,\n\tMAXIMUM,\n\tMINIMUM,\n} as const;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./api";
|
|
@@ -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("./api"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB","sourcesContent":["export * from \"./api\";\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const NUMBER_CONSTANT: {
|
|
2
|
+
readonly FIRST_ARRAY_ELEMENT_INDEX: number;
|
|
3
|
+
readonly MAX_BIGINT: number;
|
|
4
|
+
readonly MAX_CONVERSION_PERCENTAGE: number;
|
|
5
|
+
readonly MAX_INTEGER: number;
|
|
6
|
+
readonly MILLISECONDS_IN_SECOND: number;
|
|
7
|
+
readonly MIN_BIGINT: number;
|
|
8
|
+
readonly MIN_CONVERSION_PERCENTAGE: number;
|
|
9
|
+
readonly MIN_INTEGER: number;
|
|
10
|
+
readonly NEGATIVE_ONE: number;
|
|
11
|
+
readonly ONE: number;
|
|
12
|
+
readonly PERCENTAGE_MULTIPLIER: number;
|
|
13
|
+
readonly PERCENTAGE_PRECISION: number;
|
|
14
|
+
readonly SORT_ARGUMENT_LESS: number;
|
|
15
|
+
readonly SORT_ARGUMENT_MORE: number;
|
|
16
|
+
readonly ZERO: number;
|
|
17
|
+
readonly ZERO_LIST_LENGTH: number;
|
|
18
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NUMBER_CONSTANT = void 0;
|
|
4
|
+
const ZERO_LIST_LENGTH = 0;
|
|
5
|
+
const ZERO = 0;
|
|
6
|
+
const ONE = 1;
|
|
7
|
+
const NEGATIVE_ONE = -1;
|
|
8
|
+
const FIRST_ARRAY_ELEMENT_INDEX = 0;
|
|
9
|
+
const MAX_CONVERSION_PERCENTAGE = 100;
|
|
10
|
+
const MIN_CONVERSION_PERCENTAGE = 0;
|
|
11
|
+
const PERCENTAGE_MULTIPLIER = 100;
|
|
12
|
+
const PERCENTAGE_PRECISION = 2;
|
|
13
|
+
const SORT_ARGUMENT_LESS = -1;
|
|
14
|
+
const SORT_ARGUMENT_MORE = 1;
|
|
15
|
+
const MIN_INTEGER = -2_147_483_648;
|
|
16
|
+
const MAX_INTEGER = 2_147_483_647;
|
|
17
|
+
const MIN_BIGINT = -9_223_372_036_854_775_808;
|
|
18
|
+
const MAX_BIGINT = 9_223_372_036_854_775_807;
|
|
19
|
+
const MILLISECONDS_IN_SECOND = 1000;
|
|
20
|
+
exports.NUMBER_CONSTANT = {
|
|
21
|
+
FIRST_ARRAY_ELEMENT_INDEX,
|
|
22
|
+
MAX_BIGINT,
|
|
23
|
+
MAX_CONVERSION_PERCENTAGE,
|
|
24
|
+
MAX_INTEGER,
|
|
25
|
+
MILLISECONDS_IN_SECOND,
|
|
26
|
+
MIN_BIGINT,
|
|
27
|
+
MIN_CONVERSION_PERCENTAGE,
|
|
28
|
+
MIN_INTEGER,
|
|
29
|
+
NEGATIVE_ONE,
|
|
30
|
+
ONE,
|
|
31
|
+
PERCENTAGE_MULTIPLIER,
|
|
32
|
+
PERCENTAGE_PRECISION,
|
|
33
|
+
SORT_ARGUMENT_LESS,
|
|
34
|
+
SORT_ARGUMENT_MORE,
|
|
35
|
+
ZERO,
|
|
36
|
+
ZERO_LIST_LENGTH,
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=number.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.constant.js","sourceRoot":"/","sources":["constant/number.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,gBAAgB,GAAW,CAAC,CAAC;AACnC,MAAM,IAAI,GAAW,CAAC,CAAC;AACvB,MAAM,GAAG,GAAW,CAAC,CAAC;AACtB,MAAM,YAAY,GAAW,CAAC,CAAC,CAAC;AAChC,MAAM,yBAAyB,GAAW,CAAC,CAAC;AAC5C,MAAM,yBAAyB,GAAW,GAAG,CAAC;AAC9C,MAAM,yBAAyB,GAAW,CAAC,CAAC;AAC5C,MAAM,qBAAqB,GAAW,GAAG,CAAC;AAC1C,MAAM,oBAAoB,GAAW,CAAC,CAAC;AACvC,MAAM,kBAAkB,GAAW,CAAC,CAAC,CAAC;AACtC,MAAM,kBAAkB,GAAW,CAAC,CAAC;AACrC,MAAM,WAAW,GAAW,CAAC,aAAa,CAAC;AAC3C,MAAM,WAAW,GAAW,aAAa,CAAC;AAC1C,MAAM,UAAU,GAAW,CAAC,yBAAyB,CAAC;AAEtD,MAAM,UAAU,GAAW,yBAAyB,CAAC;AACrD,MAAM,sBAAsB,GAAW,IAAI,CAAC;AAE/B,QAAA,eAAe,GAiBxB;IACH,yBAAyB;IACzB,UAAU;IACV,yBAAyB;IACzB,WAAW;IACX,sBAAsB;IACtB,UAAU;IACV,yBAAyB;IACzB,WAAW;IACX,YAAY;IACZ,GAAG;IACH,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,IAAI;IACJ,gBAAgB;CACP,CAAC","sourcesContent":["const ZERO_LIST_LENGTH: number = 0;\nconst ZERO: number = 0;\nconst ONE: number = 1;\nconst NEGATIVE_ONE: number = -1;\nconst FIRST_ARRAY_ELEMENT_INDEX: number = 0;\nconst MAX_CONVERSION_PERCENTAGE: number = 100;\nconst MIN_CONVERSION_PERCENTAGE: number = 0;\nconst PERCENTAGE_MULTIPLIER: number = 100;\nconst PERCENTAGE_PRECISION: number = 2;\nconst SORT_ARGUMENT_LESS: number = -1;\nconst SORT_ARGUMENT_MORE: number = 1;\nconst MIN_INTEGER: number = -2_147_483_648;\nconst MAX_INTEGER: number = 2_147_483_647;\nconst MIN_BIGINT: number = -9_223_372_036_854_775_808;\n// eslint-disable-next-line @typescript-eslint/no-loss-of-precision\nconst MAX_BIGINT: number = 9_223_372_036_854_775_807;\nconst MILLISECONDS_IN_SECOND: number = 1000;\n\nexport const NUMBER_CONSTANT: {\n\treadonly FIRST_ARRAY_ELEMENT_INDEX: number;\n\treadonly MAX_BIGINT: number;\n\treadonly MAX_CONVERSION_PERCENTAGE: number;\n\treadonly MAX_INTEGER: number;\n\treadonly MILLISECONDS_IN_SECOND: number;\n\treadonly MIN_BIGINT: number;\n\treadonly MIN_CONVERSION_PERCENTAGE: number;\n\treadonly MIN_INTEGER: number;\n\treadonly NEGATIVE_ONE: number;\n\treadonly ONE: number;\n\treadonly PERCENTAGE_MULTIPLIER: number;\n\treadonly PERCENTAGE_PRECISION: number;\n\treadonly SORT_ARGUMENT_LESS: number;\n\treadonly SORT_ARGUMENT_MORE: number;\n\treadonly ZERO: number;\n\treadonly ZERO_LIST_LENGTH: number;\n} = {\n\tFIRST_ARRAY_ELEMENT_INDEX,\n\tMAX_BIGINT,\n\tMAX_CONVERSION_PERCENTAGE,\n\tMAX_INTEGER,\n\tMILLISECONDS_IN_SECOND,\n\tMIN_BIGINT,\n\tMIN_CONVERSION_PERCENTAGE,\n\tMIN_INTEGER,\n\tNEGATIVE_ONE,\n\tONE,\n\tPERCENTAGE_MULTIPLIER,\n\tPERCENTAGE_PRECISION,\n\tSORT_ARGUMENT_LESS,\n\tSORT_ARGUMENT_MORE,\n\tZERO,\n\tZERO_LIST_LENGTH,\n} as const;\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BaseEntity, FindOptionsRelations } from "typeorm";
|
|
2
|
+
import { EApiFunctionType } from "../../../enum";
|
|
3
|
+
export declare function ApiFunction<E extends BaseEntity>(options: {
|
|
4
|
+
model: new () => E;
|
|
5
|
+
type: EApiFunctionType;
|
|
6
|
+
relations?: FindOptionsRelations<E>;
|
|
7
|
+
}): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApiFunction = ApiFunction;
|
|
4
|
+
const get_list_decorator_1 = require("./get-list.decorator");
|
|
5
|
+
const enum_1 = require("../../../enum");
|
|
6
|
+
const get_decorator_1 = require("./get.decorator");
|
|
7
|
+
function ApiFunction(options) {
|
|
8
|
+
return function (_target, _propertyKey, descriptor) {
|
|
9
|
+
const originalMethod = descriptor.value;
|
|
10
|
+
descriptor.value = function (...args) {
|
|
11
|
+
switch (options.type) {
|
|
12
|
+
case enum_1.EApiFunctionType.GET_LIST: {
|
|
13
|
+
return (0, get_list_decorator_1.ApiFunctionGetList)({ model: options.model, relations: options.relations })(this, _propertyKey, { value: originalMethod }).value.apply(this, args);
|
|
14
|
+
}
|
|
15
|
+
case enum_1.EApiFunctionType.GET: {
|
|
16
|
+
return (0, get_decorator_1.ApiFunctionGet)({ model: options.model })(this, _propertyKey, { value: originalMethod }).value.apply(this, args);
|
|
17
|
+
}
|
|
18
|
+
default: {
|
|
19
|
+
throw new Error("Unsupported function");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return originalMethod.apply(this, args);
|
|
23
|
+
};
|
|
24
|
+
return descriptor;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorator.js","sourceRoot":"/","sources":["decorator/api/function/decorator.ts"],"names":[],"mappings":";;AAKA,kCAyBC;AA7BD,6DAAwD;AACxD,wCAA+C;AAC/C,mDAA+C;AAE/C,SAAgB,WAAW,CAAuB,OAA4F;IAC7I,OAAO,UAAU,OAAY,EAAE,YAAoB,EAAE,UAA8B;QAClF,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;QAExC,UAAU,CAAC,KAAK,GAAG,UAA+C,GAAG,IAAgB;YAEpF,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;gBACtB,KAAK,uBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAChC,OAAO,IAAA,uCAAkB,EAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBAC1J,CAAC;gBAED,KAAK,uBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;oBAC3B,OAAO,IAAA,8BAAc,EAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBACxH,CAAC;gBAED,OAAO,CAAC,CAAC,CAAC;oBACT,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;gBACzC,CAAC;YACF,CAAC;YAED,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACzC,CAAC,CAAC;QAEF,OAAO,UAAU,CAAC;IACnB,CAAC,CAAC;AACH,CAAC","sourcesContent":["import type {BaseEntity, FindOptionsRelations, Repository} from \"typeorm\";\nimport {ApiFunctionGetList} from \"./get-list.decorator\";\nimport {EApiFunctionType} from \"../../../enum\";\nimport {ApiFunctionGet} from \"./get.decorator\";\n\nexport function ApiFunction<E extends BaseEntity>(options: { model: new () => E; type: EApiFunctionType; relations?: FindOptionsRelations<E> }) {\n\treturn function (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) {\n\t\tconst originalMethod = descriptor.value;\n\n\t\tdescriptor.value = function (this: { repository: Repository<E> }, ...args: Array<any>) {\n\n\t\t\tswitch (options.type) {\n\t\t\t\tcase EApiFunctionType.GET_LIST: {\n\t\t\t\t\treturn ApiFunctionGetList({ model: options.model, relations: options.relations })(this, _propertyKey, { value: originalMethod }).value.apply(this, args);\n\t\t\t\t}\n\n\t\t\t\tcase EApiFunctionType.GET: {\n\t\t\t\t\treturn ApiFunctionGet({ model: options.model })(this, _propertyKey, { value: originalMethod }).value.apply(this, args);\n\t\t\t\t}\n\n\t\t\t\tdefault: {\n\t\t\t\t\tthrow new Error(\"Unsupported function\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn originalMethod.apply(this, args);\n\t\t};\n\n\t\treturn descriptor;\n\t};\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BaseEntity, FindOptionsRelations } from "typeorm";
|
|
2
|
+
export declare function ApiFunctionGetList<E extends BaseEntity>(options: {
|
|
3
|
+
model: new () => E;
|
|
4
|
+
relations?: FindOptionsRelations<E>;
|
|
5
|
+
}): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|