@elsikora/nestjs-crud-automator 1.2.1 → 1.2.2
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/index.d.ts +1 -0
- package/dist/class/index.js +1 -0
- package/dist/class/index.js.map +1 -1
- package/dist/class/utility/dto/index.d.ts +2 -0
- package/dist/{decorator/api/route → class/utility/dto}/index.js +2 -2
- package/dist/class/utility/dto/index.js.map +1 -0
- package/dist/class/utility/dto/property/factory/boolean.class.d.ts +5 -0
- package/dist/class/utility/dto/property/factory/boolean.class.js +15 -0
- package/dist/class/utility/dto/property/factory/boolean.class.js.map +1 -0
- package/dist/class/utility/dto/property/factory/date.class.d.ts +5 -0
- package/dist/class/utility/dto/property/factory/date.class.js +15 -0
- package/dist/class/utility/dto/property/factory/date.class.js.map +1 -0
- package/dist/class/utility/dto/property/factory/index.d.ts +6 -0
- package/dist/{dto/exception → class/utility/dto/property/factory}/index.js +6 -7
- package/dist/class/utility/dto/property/factory/index.js.map +1 -0
- package/dist/class/utility/dto/property/factory/number.class.d.ts +5 -0
- package/dist/class/utility/dto/property/factory/number.class.js +19 -0
- package/dist/class/utility/dto/property/factory/number.class.js.map +1 -0
- package/dist/class/utility/dto/property/factory/object.class.d.ts +5 -0
- package/dist/class/utility/dto/property/factory/object.class.js +17 -0
- package/dist/class/utility/dto/property/factory/object.class.js.map +1 -0
- package/dist/class/utility/dto/property/factory/relation.class.d.ts +5 -0
- package/dist/class/utility/dto/property/factory/relation.class.js +11 -0
- package/dist/class/utility/dto/property/factory/relation.class.js.map +1 -0
- package/dist/class/utility/dto/property/factory/string.class.d.ts +5 -0
- package/dist/class/utility/dto/property/factory/string.class.js +15 -0
- package/dist/class/utility/dto/property/factory/string.class.js.map +1 -0
- package/dist/class/utility/dto/property/factory/uuid.class.d.ts +5 -0
- package/dist/class/utility/dto/property/factory/uuid.class.js +11 -0
- package/dist/class/utility/dto/property/factory/uuid.class.js.map +1 -0
- package/dist/class/utility/dto/property/index.d.ts +1 -0
- package/dist/{dto → class/utility/dto/property}/index.js +1 -1
- package/dist/class/utility/dto/property/index.js.map +1 -0
- package/dist/class/utility/dto/strategy/body.class.d.ts +6 -0
- package/dist/class/utility/dto/strategy/body.class.js +21 -0
- package/dist/class/utility/dto/strategy/body.class.js.map +1 -0
- package/dist/class/utility/dto/strategy/index.d.ts +4 -0
- package/dist/class/utility/dto/strategy/index.js +21 -0
- package/dist/class/utility/dto/strategy/index.js.map +1 -0
- package/dist/class/utility/dto/strategy/query.class.d.ts +6 -0
- package/dist/class/utility/dto/strategy/query.class.js +18 -0
- package/dist/class/utility/dto/strategy/query.class.js.map +1 -0
- package/dist/class/utility/dto/strategy/request.class.d.ts +6 -0
- package/dist/class/utility/dto/strategy/request.class.js +26 -0
- package/dist/class/utility/dto/strategy/request.class.js.map +1 -0
- package/dist/class/utility/dto/strategy/response.class.d.ts +6 -0
- package/dist/class/utility/dto/strategy/response.class.js +18 -0
- package/dist/class/utility/dto/strategy/response.class.js.map +1 -0
- package/dist/class/utility/index.d.ts +1 -0
- package/dist/class/utility/index.js +18 -0
- package/dist/class/utility/index.js.map +1 -0
- package/dist/constant/utility/dto/constant.d.ts +6 -0
- package/dist/constant/utility/dto/constant.js +27 -0
- package/dist/constant/utility/dto/constant.js.map +1 -0
- package/dist/decorator/api/controller.decorator.d.ts +3 -7
- package/dist/decorator/api/controller.decorator.js +2 -2
- package/dist/decorator/api/controller.decorator.js.map +1 -1
- package/dist/decorator/api/function/create.decorator.js +14 -8
- package/dist/decorator/api/function/create.decorator.js.map +1 -1
- package/dist/decorator/api/function/decorator.d.ts +2 -7
- package/dist/decorator/api/function/decorator.js +8 -7
- package/dist/decorator/api/function/decorator.js.map +1 -1
- package/dist/decorator/api/function/delete.decorator.js +4 -4
- package/dist/decorator/api/function/delete.decorator.js.map +1 -1
- package/dist/decorator/api/function/get-list.decorator.js +5 -4
- package/dist/decorator/api/function/get-list.decorator.js.map +1 -1
- package/dist/decorator/api/function/get.decorator.js +5 -5
- package/dist/decorator/api/function/get.decorator.js.map +1 -1
- package/dist/decorator/api/function/index.d.ts +0 -1
- package/dist/decorator/api/function/index.js +0 -1
- package/dist/decorator/api/function/index.js.map +1 -1
- package/dist/decorator/api/function/update.decorator.js +6 -5
- package/dist/decorator/api/function/update.decorator.js.map +1 -1
- package/dist/decorator/api/index.d.ts +0 -1
- package/dist/decorator/api/index.js +0 -1
- package/dist/decorator/api/index.js.map +1 -1
- package/dist/decorator/api/method.decorator.js +58 -0
- package/dist/decorator/api/method.decorator.js.map +1 -1
- package/dist/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/decorator/api/property/string.decorator.js +9 -2
- package/dist/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/decorator/api/service.decorator.d.ts +2 -5
- package/dist/decorator/api/service.decorator.js +16 -17
- package/dist/decorator/api/service.decorator.js.map +1 -1
- package/dist/enum/decorator/api/authentication-type.enum.d.ts +1 -0
- package/dist/enum/decorator/api/authentication-type.enum.js +1 -0
- package/dist/enum/decorator/api/authentication-type.enum.js.map +1 -1
- package/dist/enum/decorator/api/property/desribe-type.enum.d.ts +2 -1
- package/dist/enum/decorator/api/property/desribe-type.enum.js +1 -0
- package/dist/enum/decorator/api/property/desribe-type.enum.js.map +1 -1
- package/dist/factory/api/controller.factory.d.ts +8 -8
- package/dist/factory/api/controller.factory.js +81 -47
- package/dist/factory/api/controller.factory.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/interceptor/correlation-id-response-body.interceptor.js +0 -8
- package/dist/interceptor/correlation-id-response-body.interceptor.js.map +1 -1
- package/dist/interface/class/dto/index.d.ts +1 -0
- package/dist/interface/class/dto/index.js +18 -0
- package/dist/interface/class/dto/index.js.map +1 -0
- package/dist/interface/class/dto/strategy.interface.d.ts +5 -0
- package/dist/{type/decorator/api/function/get-properties.type.js → interface/class/dto/strategy.interface.js} +1 -1
- package/dist/interface/class/dto/strategy.interface.js.map +1 -0
- package/dist/interface/class/index.d.ts +1 -0
- package/dist/interface/class/index.js +18 -0
- package/dist/interface/class/index.js.map +1 -0
- package/dist/interface/decorator/api/controller-properties.interface.d.ts +12 -7
- package/dist/interface/decorator/api/controller-properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/index.d.ts +1 -0
- package/dist/interface/decorator/api/index.js +1 -0
- package/dist/interface/decorator/api/index.js.map +1 -1
- package/dist/interface/decorator/api/method/properties.interface.d.ts +3 -2
- package/dist/interface/decorator/api/method/properties.interface.js.map +1 -1
- package/dist/interface/dto-generate-factory.interface.d.ts +5 -0
- package/dist/interface/dto-generate-factory.interface.js +3 -0
- package/dist/interface/dto-generate-factory.interface.js.map +1 -0
- package/dist/interface/index.d.ts +2 -0
- package/dist/interface/index.js +2 -0
- package/dist/interface/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/type/decorator/api/controller/constructor.type.d.ts +4 -0
- package/dist/type/decorator/api/{function/create-properties.type.js → controller/constructor.type.js} +1 -1
- package/dist/type/decorator/api/controller/constructor.type.js.map +1 -0
- package/dist/type/decorator/api/controller/index.d.ts +1 -0
- package/dist/type/decorator/api/controller/index.js +18 -0
- package/dist/type/decorator/api/controller/index.js.map +1 -0
- package/dist/{decorator → type/decorator}/api/function/create/executor-properties.type.d.ts +2 -2
- package/dist/type/decorator/api/function/create/executor-properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/create/index.d.ts +2 -0
- package/dist/type/decorator/api/function/create/index.js +19 -0
- package/dist/type/decorator/api/function/create/index.js.map +1 -0
- package/dist/type/decorator/api/function/{update-properties.type.js → create/properties.type.js} +1 -1
- package/dist/type/decorator/api/function/create/properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/delete/executor-properties.type.d.ts +9 -0
- package/dist/type/decorator/api/function/{get-list-properties.type.js → delete/executor-properties.type.js} +1 -1
- package/dist/type/decorator/api/function/delete/executor-properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/delete/index.js.map +1 -0
- package/dist/type/decorator/api/function/get/executor-properties.type.d.ts +7 -0
- package/dist/type/decorator/api/function/get/executor-properties.type.js +3 -0
- package/dist/type/decorator/api/function/get/executor-properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/get/index.d.ts +2 -0
- package/dist/type/decorator/api/function/get/index.js +19 -0
- package/dist/type/decorator/api/function/get/index.js.map +1 -0
- package/dist/type/decorator/api/function/get/properties.type.js +3 -0
- package/dist/type/decorator/api/function/get/properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/get-list/base-properties.type.d.ts +16 -0
- package/dist/type/decorator/api/function/get-list/base-properties.type.js +3 -0
- package/dist/type/decorator/api/function/get-list/base-properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/get-list/executor-properties.type.d.ts +9 -0
- package/dist/type/decorator/api/function/get-list/executor-properties.type.js +3 -0
- package/dist/type/decorator/api/function/get-list/executor-properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/get-list/index.d.ts +3 -0
- package/dist/type/decorator/api/function/get-list/index.js +20 -0
- package/dist/type/decorator/api/function/get-list/index.js.map +1 -0
- package/dist/type/decorator/api/function/get-list/properties.type.d.ts +9 -0
- package/dist/type/decorator/api/function/get-list/properties.type.js +3 -0
- package/dist/type/decorator/api/function/get-list/properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/index.d.ts +5 -4
- package/dist/type/decorator/api/function/index.js +5 -4
- package/dist/type/decorator/api/function/index.js.map +1 -1
- package/dist/type/decorator/api/function/properties.type.d.ts +7 -0
- package/dist/type/decorator/api/function/properties.type.js +3 -0
- package/dist/type/decorator/api/function/properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/update/executor-properties.type.d.ts +11 -0
- package/dist/type/decorator/api/function/update/executor-properties.type.js +3 -0
- package/dist/type/decorator/api/function/update/executor-properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/update/index.d.ts +2 -0
- package/dist/type/decorator/api/function/update/index.js +19 -0
- package/dist/type/decorator/api/function/update/index.js.map +1 -0
- package/dist/type/decorator/api/function/update/properties.type.js +3 -0
- package/dist/type/decorator/api/function/update/properties.type.js.map +1 -0
- package/dist/type/decorator/api/index.d.ts +1 -0
- package/dist/type/decorator/api/index.js +1 -0
- package/dist/type/decorator/api/index.js.map +1 -1
- package/dist/type/decorator/api/property/describe/object-properties.type.d.ts +2 -0
- package/dist/type/decorator/api/property/describe/object-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/properties.type.d.ts +2 -1
- package/dist/type/decorator/api/property/describe/properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/relation-properties.type.d.ts +6 -0
- package/dist/type/decorator/api/property/describe/relation-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/relation-properties.type.js.map +1 -0
- package/dist/type/decorator/api/service-properties.type.d.ts +3 -0
- package/dist/type/decorator/api/service-properties.type.js +3 -0
- package/dist/type/decorator/api/service-properties.type.js.map +1 -0
- package/dist/type/index.d.ts +1 -0
- package/dist/type/index.js +1 -0
- package/dist/type/index.js.map +1 -1
- package/dist/type/utility/dto/generate-allowed-combination.type.d.ts +9 -0
- package/dist/type/utility/dto/generate-allowed-combination.type.js +3 -0
- package/dist/type/utility/dto/generate-allowed-combination.type.js.map +1 -0
- package/dist/type/utility/dto/generate-is-allowed-combination.type.d.ts +3 -0
- package/dist/type/utility/dto/generate-is-allowed-combination.type.js +3 -0
- package/dist/type/utility/dto/generate-is-allowed-combination.type.js.map +1 -0
- package/dist/type/utility/dto/index.d.ts +2 -0
- package/dist/type/utility/dto/index.js +19 -0
- package/dist/type/utility/dto/index.js.map +1 -0
- package/dist/type/utility/index.d.ts +1 -0
- package/dist/type/utility/index.js +18 -0
- package/dist/type/utility/index.js.map +1 -0
- package/dist/utility/api/controller/write-method.utility.d.ts +2 -2
- package/dist/utility/api/controller/write-method.utility.js +2 -2
- package/dist/utility/api/controller/write-method.utility.js.map +1 -1
- package/dist/utility/api/filter-order-by-from-entity.utility.js +0 -1
- package/dist/utility/api/filter-order-by-from-entity.utility.js.map +1 -1
- package/dist/utility/dto/analize.utility.js.map +1 -1
- package/dist/utility/dto/build-decorator.utility.d.ts +4 -0
- package/dist/utility/dto/build-decorator.utility.js +31 -0
- package/dist/utility/dto/build-decorator.utility.js.map +1 -0
- package/dist/utility/dto/generate-decorator.utility.d.ts +3 -0
- package/dist/utility/dto/generate-decorator.utility.js +15 -0
- package/dist/utility/dto/generate-decorator.utility.js.map +1 -0
- package/dist/utility/dto/generate-exception.utility.d.ts +2 -0
- package/dist/utility/dto/generate-exception.utility.js +88 -0
- package/dist/utility/dto/generate-exception.utility.js.map +1 -0
- package/dist/utility/dto/generate.utility.d.ts +2 -2
- package/dist/utility/dto/generate.utility.js +32 -295
- package/dist/utility/dto/generate.utility.js.map +1 -1
- package/dist/utility/dto/get-base-class.utility.d.ts +3 -0
- package/dist/utility/dto/get-base-class.utility.js +65 -0
- package/dist/utility/dto/get-base-class.utility.js.map +1 -0
- package/dist/utility/dto/get-decorator-config.utility.d.ts +3 -0
- package/dist/utility/dto/get-decorator-config.utility.js +21 -0
- package/dist/utility/dto/get-decorator-config.utility.js.map +1 -0
- package/dist/utility/dto/handle-date-property.utility.d.ts +5 -0
- package/dist/utility/dto/handle-date-property.utility.js +18 -0
- package/dist/utility/dto/handle-date-property.utility.js.map +1 -0
- package/dist/utility/dto/index.d.ts +8 -0
- package/dist/utility/dto/index.js +8 -0
- package/dist/utility/dto/index.js.map +1 -1
- package/dist/utility/dto/is-property-should-be-enabled.utility.d.ts +3 -0
- package/dist/utility/dto/is-property-should-be-enabled.utility.js +26 -0
- package/dist/utility/dto/is-property-should-be-enabled.utility.js.map +1 -0
- package/dist/utility/dto/is-should-be-generated.utility.d.ts +2 -0
- package/dist/utility/dto/is-should-be-generated.utility.js +25 -0
- package/dist/utility/dto/is-should-be-generated.utility.js.map +1 -0
- package/dist/utility/dto/validate-property-config.utility.d.ts +2 -0
- package/dist/utility/dto/validate-property-config.utility.js +14 -0
- package/dist/utility/dto/validate-property-config.utility.js.map +1 -0
- package/dist/utility/generate-entity-information.utility.js +15 -6
- package/dist/utility/generate-entity-information.utility.js.map +1 -1
- package/package.json +4 -1
- package/dist/decorator/api/function/create/executor-properties.type.js.map +0 -1
- package/dist/decorator/api/function/create/index.js.map +0 -1
- package/dist/decorator/api/route/decorator.d.ts +0 -18
- package/dist/decorator/api/route/decorator.js +0 -43
- package/dist/decorator/api/route/decorator.js.map +0 -1
- package/dist/decorator/api/route/get.decorator.d.ts +0 -9
- package/dist/decorator/api/route/get.decorator.js +0 -53
- package/dist/decorator/api/route/get.decorator.js.map +0 -1
- package/dist/decorator/api/route/index.d.ts +0 -2
- package/dist/decorator/api/route/index.js.map +0 -1
- package/dist/dto/exception/bad-request.dto.d.ts +0 -8
- package/dist/dto/exception/bad-request.dto.js +0 -84
- package/dist/dto/exception/bad-request.dto.js.map +0 -1
- package/dist/dto/exception/conflict.dto.d.ts +0 -8
- package/dist/dto/exception/conflict.dto.js +0 -84
- package/dist/dto/exception/conflict.dto.js.map +0 -1
- package/dist/dto/exception/forbidden.dto.d.ts +0 -8
- package/dist/dto/exception/forbidden.dto.js +0 -84
- package/dist/dto/exception/forbidden.dto.js.map +0 -1
- package/dist/dto/exception/index.d.ts +0 -7
- package/dist/dto/exception/index.js.map +0 -1
- package/dist/dto/exception/internal-server-error.dto.d.ts +0 -8
- package/dist/dto/exception/internal-server-error.dto.js +0 -84
- package/dist/dto/exception/internal-server-error.dto.js.map +0 -1
- package/dist/dto/exception/not-found.dto.d.ts +0 -8
- package/dist/dto/exception/not-found.dto.js +0 -84
- package/dist/dto/exception/not-found.dto.js.map +0 -1
- package/dist/dto/exception/too-many-requests.dto.d.ts +0 -8
- package/dist/dto/exception/too-many-requests.dto.js +0 -84
- package/dist/dto/exception/too-many-requests.dto.js.map +0 -1
- package/dist/dto/exception/unauthorized.dto.d.ts +0 -8
- package/dist/dto/exception/unauthorized.dto.js +0 -84
- package/dist/dto/exception/unauthorized.dto.js.map +0 -1
- package/dist/dto/index.d.ts +0 -1
- package/dist/dto/index.js.map +0 -1
- package/dist/type/decorator/api/function/create-properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/get-list-properties.type.d.ts +0 -23
- package/dist/type/decorator/api/function/get-list-properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/get-properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/update-properties.type.js.map +0 -1
- /package/dist/{decorator → type/decorator}/api/function/create/executor-properties.type.js +0 -0
- /package/dist/type/decorator/api/function/{create-properties.type.d.ts → create/properties.type.d.ts} +0 -0
- /package/dist/{decorator/api/function/create → type/decorator/api/function/delete}/index.d.ts +0 -0
- /package/dist/{decorator/api/function/create → type/decorator/api/function/delete}/index.js +0 -0
- /package/dist/type/decorator/api/function/{get-properties.type.d.ts → get/properties.type.d.ts} +0 -0
- /package/dist/type/decorator/api/function/{update-properties.type.d.ts → update/properties.type.d.ts} +0 -0
package/dist/class/index.d.ts
CHANGED
package/dist/class/index.js
CHANGED
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./api"), exports);
|
|
18
18
|
__exportStar(require("./metadata-storage.class"), exports);
|
|
19
|
+
__exportStar(require("./utility"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
package/dist/class/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["class/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,2DAAyC","sourcesContent":["export * from \"./api\";\nexport * from \"./metadata-storage.class\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["class/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,2DAAyC;AACzC,4CAA0B","sourcesContent":["export * from \"./api\";\nexport * from \"./metadata-storage.class\";\nexport * from \"./utility\";\n"]}
|
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./strategy"), exports);
|
|
18
|
+
__exportStar(require("./property"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["class/utility/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,6CAA2B","sourcesContent":["export * from \"./strategy\";\nexport * from \"./property\";\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IApiEntity, IDtoGenerateFactory } from "../../../../../interface";
|
|
2
|
+
import type { TApiPropertyDescribeBooleanProperties, TApiPropertyDescribeDtoProperties } from "../../../../../type";
|
|
3
|
+
export declare class DtoPropertyFactoryBoolean implements IDtoGenerateFactory {
|
|
4
|
+
create(metadata: TApiPropertyDescribeBooleanProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator;
|
|
5
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DtoPropertyFactoryBoolean = void 0;
|
|
4
|
+
const decorator_1 = require("../../../../../decorator");
|
|
5
|
+
class DtoPropertyFactoryBoolean {
|
|
6
|
+
create(metadata, entity, config) {
|
|
7
|
+
return (0, decorator_1.ApiPropertyBoolean)({
|
|
8
|
+
description: metadata.description,
|
|
9
|
+
entity,
|
|
10
|
+
...config,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.DtoPropertyFactoryBoolean = DtoPropertyFactoryBoolean;
|
|
15
|
+
//# sourceMappingURL=boolean.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean.class.js","sourceRoot":"/","sources":["class/utility/dto/property/factory/boolean.class.ts"],"names":[],"mappings":";;;AAAA,wDAA8D;AAK9D,MAAa,yBAAyB;IACrC,MAAM,CAAC,QAA+C,EAAE,MAAkB,EAAE,MAAyC;QACpH,OAAO,IAAA,8BAAkB,EAAC;YACzB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,MAAM;YACN,GAAG,MAAM;SACT,CAAC,CAAC;IACJ,CAAC;CACD;AARD,8DAQC","sourcesContent":["import { ApiPropertyBoolean } from \"../../../../../decorator\";\n\nimport type { IApiEntity, IDtoGenerateFactory } from \"../../../../../interface\";\nimport type { TApiPropertyDescribeBooleanProperties, TApiPropertyDescribeDtoProperties } from \"../../../../../type\";\n\nexport class DtoPropertyFactoryBoolean implements IDtoGenerateFactory {\n\tcreate(metadata: TApiPropertyDescribeBooleanProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator {\n\t\treturn ApiPropertyBoolean({\n\t\t\tdescription: metadata.description,\n\t\t\tentity,\n\t\t\t...config,\n\t\t});\n\t}\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IApiEntity, IDtoGenerateFactory } from "../../../../../interface";
|
|
2
|
+
import type { TApiPropertyDescribeDateProperties, TApiPropertyDescribeDtoProperties } from "../../../../../type";
|
|
3
|
+
export declare class DtoPropertyFactoryDate implements IDtoGenerateFactory {
|
|
4
|
+
create(metadata: TApiPropertyDescribeDateProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator;
|
|
5
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DtoPropertyFactoryDate = void 0;
|
|
4
|
+
const decorator_1 = require("../../../../../decorator");
|
|
5
|
+
class DtoPropertyFactoryDate {
|
|
6
|
+
create(metadata, entity, config) {
|
|
7
|
+
return (0, decorator_1.ApiPropertyDate)({
|
|
8
|
+
entity,
|
|
9
|
+
...config,
|
|
10
|
+
type: metadata.dataType,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.DtoPropertyFactoryDate = DtoPropertyFactoryDate;
|
|
15
|
+
//# sourceMappingURL=date.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.class.js","sourceRoot":"/","sources":["class/utility/dto/property/factory/date.class.ts"],"names":[],"mappings":";;;AAAA,wDAA2D;AAK3D,MAAa,sBAAsB;IAClC,MAAM,CAAC,QAA4C,EAAE,MAAkB,EAAE,MAAyC;QACjH,OAAO,IAAA,2BAAe,EAAC;YACtB,MAAM;YACN,GAAG,MAAM;YACT,IAAI,EAAE,QAAQ,CAAC,QAAQ;SACvB,CAAC,CAAC;IACJ,CAAC;CACD;AARD,wDAQC","sourcesContent":["import { ApiPropertyDate } from \"../../../../../decorator\";\n\nimport type { IApiEntity, IDtoGenerateFactory } from \"../../../../../interface\";\nimport type { TApiPropertyDescribeDateProperties, TApiPropertyDescribeDtoProperties } from \"../../../../../type\";\n\nexport class DtoPropertyFactoryDate implements IDtoGenerateFactory {\n\tcreate(metadata: TApiPropertyDescribeDateProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator {\n\t\treturn ApiPropertyDate({\n\t\t\tentity,\n\t\t\t...config,\n\t\t\ttype: metadata.dataType,\n\t\t});\n\t}\n}\n"]}
|
|
@@ -14,11 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./
|
|
23
|
-
__exportStar(require("./conflict.dto"), exports);
|
|
17
|
+
__exportStar(require("./uuid.class"), exports);
|
|
18
|
+
__exportStar(require("./string.class"), exports);
|
|
19
|
+
__exportStar(require("./object.class"), exports);
|
|
20
|
+
__exportStar(require("./number.class"), exports);
|
|
21
|
+
__exportStar(require("./boolean.class"), exports);
|
|
22
|
+
__exportStar(require("./date.class"), exports);
|
|
24
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["class/utility/dto/property/factory/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,iDAA+B;AAC/B,iDAA+B;AAC/B,kDAAgC;AAChC,+CAA6B","sourcesContent":["export * from \"./uuid.class\";\nexport * from \"./string.class\";\nexport * from \"./object.class\";\nexport * from \"./number.class\";\nexport * from \"./boolean.class\";\nexport * from \"./date.class\";\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IApiEntity, IDtoGenerateFactory } from "src/interface";
|
|
2
|
+
import type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeNumberProperties } from "src/type";
|
|
3
|
+
export declare class DtoPropertyFactoryNumber implements IDtoGenerateFactory {
|
|
4
|
+
create(metadata: TApiPropertyDescribeNumberProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator;
|
|
5
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DtoPropertyFactoryNumber = void 0;
|
|
4
|
+
const decorator_1 = require("../../../../../decorator");
|
|
5
|
+
class DtoPropertyFactoryNumber {
|
|
6
|
+
create(metadata, entity, config) {
|
|
7
|
+
return (0, decorator_1.ApiPropertyNumber)({
|
|
8
|
+
description: metadata.description,
|
|
9
|
+
entity,
|
|
10
|
+
...config,
|
|
11
|
+
maximum: metadata.maximum,
|
|
12
|
+
minimum: metadata.minimum,
|
|
13
|
+
multipleOf: metadata.multipleOf,
|
|
14
|
+
type: metadata.dataType,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.DtoPropertyFactoryNumber = DtoPropertyFactoryNumber;
|
|
19
|
+
//# sourceMappingURL=number.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.class.js","sourceRoot":"/","sources":["class/utility/dto/property/factory/number.class.ts"],"names":[],"mappings":";;;AAAA,wDAA6D;AAK7D,MAAa,wBAAwB;IACpC,MAAM,CAAC,QAA8C,EAAE,MAAkB,EAAE,MAAyC;QACnH,OAAO,IAAA,6BAAiB,EAAC;YACxB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,MAAM;YACN,GAAG,MAAM;YACT,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,IAAI,EAAE,QAAQ,CAAC,QAAQ;SACvB,CAAC,CAAC;IACJ,CAAC;CACD;AAZD,4DAYC","sourcesContent":["import { ApiPropertyNumber } from \"../../../../../decorator\";\n\nimport type { IApiEntity, IDtoGenerateFactory } from \"src/interface\";\nimport type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeNumberProperties } from \"src/type\";\n\nexport class DtoPropertyFactoryNumber implements IDtoGenerateFactory {\n\tcreate(metadata: TApiPropertyDescribeNumberProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator {\n\t\treturn ApiPropertyNumber({\n\t\t\tdescription: metadata.description,\n\t\t\tentity,\n\t\t\t...config,\n\t\t\tmaximum: metadata.maximum,\n\t\t\tminimum: metadata.minimum,\n\t\t\tmultipleOf: metadata.multipleOf,\n\t\t\ttype: metadata.dataType,\n\t\t});\n\t}\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IApiEntity, IDtoGenerateFactory } from "../../../../../interface";
|
|
2
|
+
import type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeObjectProperties } from "../../../../../type";
|
|
3
|
+
export declare class DtoPropertyFactoryObject implements IDtoGenerateFactory {
|
|
4
|
+
create(metadata: TApiPropertyDescribeObjectProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator;
|
|
5
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DtoPropertyFactoryObject = void 0;
|
|
4
|
+
const decorator_1 = require("../../../../../decorator");
|
|
5
|
+
class DtoPropertyFactoryObject {
|
|
6
|
+
create(metadata, entity, config) {
|
|
7
|
+
return (0, decorator_1.ApiPropertyObject)({
|
|
8
|
+
entity,
|
|
9
|
+
...config,
|
|
10
|
+
enum: metadata.enum,
|
|
11
|
+
...metadata,
|
|
12
|
+
type: metadata.dataType,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.DtoPropertyFactoryObject = DtoPropertyFactoryObject;
|
|
17
|
+
//# sourceMappingURL=object.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.class.js","sourceRoot":"/","sources":["class/utility/dto/property/factory/object.class.ts"],"names":[],"mappings":";;;AAAA,wDAA6D;AAK7D,MAAa,wBAAwB;IACpC,MAAM,CAAC,QAA8C,EAAE,MAAkB,EAAE,MAAyC;QACnH,OAAO,IAAA,6BAAiB,EAAC;YACxB,MAAM;YACN,GAAG,MAAM;YACT,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,GAAG,QAAQ;YACX,IAAI,EAAE,QAAQ,CAAC,QAAQ;SACvB,CAAC,CAAC;IACJ,CAAC;CACD;AAVD,4DAUC","sourcesContent":["import { ApiPropertyObject } from \"../../../../../decorator\";\n\nimport type { IApiEntity, IDtoGenerateFactory } from \"../../../../../interface\";\nimport type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeObjectProperties } from \"../../../../../type\";\n\nexport class DtoPropertyFactoryObject implements IDtoGenerateFactory {\n\tcreate(metadata: TApiPropertyDescribeObjectProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator {\n\t\treturn ApiPropertyObject({\n\t\t\tentity,\n\t\t\t...config,\n\t\t\tenum: metadata.enum,\n\t\t\t...metadata,\n\t\t\ttype: metadata.dataType,\n\t\t});\n\t}\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IApiEntity, IDtoGenerateFactory } from "../../../../../interface";
|
|
2
|
+
import type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeUuidProperties } from "../../../../../type";
|
|
3
|
+
export declare class DtoPropertyFactoryRelation implements IDtoGenerateFactory {
|
|
4
|
+
create(metadata: TApiPropertyDescribeUuidProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator;
|
|
5
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DtoPropertyFactoryRelation = void 0;
|
|
4
|
+
const decorator_1 = require("../../../../../decorator");
|
|
5
|
+
class DtoPropertyFactoryRelation {
|
|
6
|
+
create(metadata, entity, config) {
|
|
7
|
+
return (0, decorator_1.ApiPropertyUUID)({ description: metadata.description, entity, ...config });
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.DtoPropertyFactoryRelation = DtoPropertyFactoryRelation;
|
|
11
|
+
//# sourceMappingURL=relation.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relation.class.js","sourceRoot":"/","sources":["class/utility/dto/property/factory/relation.class.ts"],"names":[],"mappings":";;;AAAA,wDAA2D;AAK3D,MAAa,0BAA0B;IACtC,MAAM,CAAC,QAA4C,EAAE,MAAkB,EAAE,MAAyC;QACjH,OAAO,IAAA,2BAAe,EAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IAClF,CAAC;CACD;AAJD,gEAIC","sourcesContent":["import { ApiPropertyUUID } from \"../../../../../decorator\";\n\nimport type { IApiEntity, IDtoGenerateFactory } from \"../../../../../interface\";\nimport type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeUuidProperties } from \"../../../../../type\";\n\nexport class DtoPropertyFactoryRelation implements IDtoGenerateFactory {\n\tcreate(metadata: TApiPropertyDescribeUuidProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator {\n\t\treturn ApiPropertyUUID({ description: metadata.description, entity, ...config });\n\t}\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IApiEntity, IDtoGenerateFactory } from "../../../../../interface";
|
|
2
|
+
import type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeStringProperties } from "../../../../../type";
|
|
3
|
+
export declare class DtoPropertyFactoryString implements IDtoGenerateFactory {
|
|
4
|
+
create(metadata: TApiPropertyDescribeStringProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator;
|
|
5
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DtoPropertyFactoryString = void 0;
|
|
4
|
+
const decorator_1 = require("../../../../../decorator");
|
|
5
|
+
class DtoPropertyFactoryString {
|
|
6
|
+
create(metadata, entity, config) {
|
|
7
|
+
return (0, decorator_1.ApiPropertyString)({
|
|
8
|
+
entity,
|
|
9
|
+
...config,
|
|
10
|
+
...metadata,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.DtoPropertyFactoryString = DtoPropertyFactoryString;
|
|
15
|
+
//# sourceMappingURL=string.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.class.js","sourceRoot":"/","sources":["class/utility/dto/property/factory/string.class.ts"],"names":[],"mappings":";;;AAAA,wDAA6D;AAK7D,MAAa,wBAAwB;IACpC,MAAM,CAAC,QAA8C,EAAE,MAAkB,EAAE,MAAyC;QACnH,OAAO,IAAA,6BAAiB,EAAC;YACxB,MAAM;YACN,GAAG,MAAM;YACT,GAAG,QAAQ;SAC+C,CAAC,CAAC;IAC9D,CAAC;CACD;AARD,4DAQC","sourcesContent":["import { ApiPropertyString } from \"../../../../../decorator\";\n\nimport type { IApiEntity, IApiPropertyStringProperties, IDtoGenerateFactory } from \"../../../../../interface\";\nimport type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeStringProperties } from \"../../../../../type\";\n\nexport class DtoPropertyFactoryString implements IDtoGenerateFactory {\n\tcreate(metadata: TApiPropertyDescribeStringProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator {\n\t\treturn ApiPropertyString({\n\t\t\tentity,\n\t\t\t...config,\n\t\t\t...metadata,\n\t\t} as unknown as IApiPropertyStringProperties<typeof entity>);\n\t}\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IApiEntity, IDtoGenerateFactory } from "../../../../../interface";
|
|
2
|
+
import type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeUuidProperties } from "../../../../../type";
|
|
3
|
+
export declare class DtoPropertyFactoryUuid implements IDtoGenerateFactory {
|
|
4
|
+
create(metadata: TApiPropertyDescribeUuidProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator;
|
|
5
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DtoPropertyFactoryUuid = void 0;
|
|
4
|
+
const decorator_1 = require("../../../../../decorator");
|
|
5
|
+
class DtoPropertyFactoryUuid {
|
|
6
|
+
create(metadata, entity, config) {
|
|
7
|
+
return (0, decorator_1.ApiPropertyUUID)({ description: metadata.description, entity, ...config });
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.DtoPropertyFactoryUuid = DtoPropertyFactoryUuid;
|
|
11
|
+
//# sourceMappingURL=uuid.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.class.js","sourceRoot":"/","sources":["class/utility/dto/property/factory/uuid.class.ts"],"names":[],"mappings":";;;AAAA,wDAA2D;AAK3D,MAAa,sBAAsB;IAClC,MAAM,CAAC,QAA4C,EAAE,MAAkB,EAAE,MAAyC;QACjH,OAAO,IAAA,2BAAe,EAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IAClF,CAAC;CACD;AAJD,wDAIC","sourcesContent":["import { ApiPropertyUUID } from \"../../../../../decorator\";\n\nimport type { IApiEntity, IDtoGenerateFactory } from \"../../../../../interface\";\nimport type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeUuidProperties } from \"../../../../../type\";\n\nexport class DtoPropertyFactoryUuid implements IDtoGenerateFactory {\n\tcreate(metadata: TApiPropertyDescribeUuidProperties, entity: IApiEntity, config: TApiPropertyDescribeDtoProperties): PropertyDecorator {\n\t\treturn ApiPropertyUUID({ description: metadata.description, entity, ...config });\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./factory";
|
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./factory"), exports);
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["class/utility/dto/property/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B","sourcesContent":["export * from \"./factory\";\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EApiRouteType } from "../../../../enum";
|
|
2
|
+
import type { IDtoStrategy } from "../../../../interface";
|
|
3
|
+
import type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeProperties } from "../../../../type";
|
|
4
|
+
export declare class DtoStrategyBody implements IDtoStrategy {
|
|
5
|
+
getDecoratorConfig(method: EApiRouteType, _metadata: TApiPropertyDescribeProperties): TApiPropertyDescribeDtoProperties;
|
|
6
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DtoStrategyBody = void 0;
|
|
4
|
+
const enum_1 = require("../../../../enum");
|
|
5
|
+
class DtoStrategyBody {
|
|
6
|
+
getDecoratorConfig(method, _metadata) {
|
|
7
|
+
switch (method) {
|
|
8
|
+
case enum_1.EApiRouteType.UPDATE: {
|
|
9
|
+
return { expose: false, required: true, response: false };
|
|
10
|
+
}
|
|
11
|
+
case enum_1.EApiRouteType.PARTIAL_UPDATE: {
|
|
12
|
+
return { expose: false, required: false, response: false };
|
|
13
|
+
}
|
|
14
|
+
default: {
|
|
15
|
+
return { expose: false, required: false, response: false };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.DtoStrategyBody = DtoStrategyBody;
|
|
21
|
+
//# sourceMappingURL=body.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"body.class.js","sourceRoot":"/","sources":["class/utility/dto/strategy/body.class.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;AAKjD,MAAa,eAAe;IAC3B,kBAAkB,CAAC,MAAqB,EAAE,SAAyC;QAClF,QAAQ,MAAM,EAAE,CAAC;YAChB,KAAK,oBAAa,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC3B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC3D,CAAC;YAED,KAAK,oBAAa,CAAC,cAAc,CAAC,CAAC,CAAC;gBACnC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC5D,CAAC;YAED,OAAO,CAAC,CAAC,CAAC;gBACT,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC5D,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAhBD,0CAgBC","sourcesContent":["import { EApiRouteType } from \"../../../../enum\";\n\nimport type { IDtoStrategy } from \"../../../../interface\";\nimport type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeProperties } from \"../../../../type\";\n\nexport class DtoStrategyBody implements IDtoStrategy {\n\tgetDecoratorConfig(method: EApiRouteType, _metadata: TApiPropertyDescribeProperties): TApiPropertyDescribeDtoProperties {\n\t\tswitch (method) {\n\t\t\tcase EApiRouteType.UPDATE: {\n\t\t\t\treturn { expose: false, required: true, response: false };\n\t\t\t}\n\n\t\t\tcase EApiRouteType.PARTIAL_UPDATE: {\n\t\t\t\treturn { expose: false, required: false, response: false };\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\treturn { expose: false, required: false, response: false };\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./body.class"), exports);
|
|
18
|
+
__exportStar(require("./response.class"), exports);
|
|
19
|
+
__exportStar(require("./query.class"), exports);
|
|
20
|
+
__exportStar(require("./request.class"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["class/utility/dto/strategy/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,mDAAiC;AACjC,gDAA8B;AAC9B,kDAAgC","sourcesContent":["export * from \"./body.class\";\nexport * from \"./response.class\";\nexport * from \"./query.class\";\nexport * from \"./request.class\";\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EApiRouteType } from "../../../../enum";
|
|
2
|
+
import type { IDtoStrategy } from "../../../../interface";
|
|
3
|
+
import type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeProperties } from "../../../../type";
|
|
4
|
+
export declare class DtoStrategyQuery implements IDtoStrategy {
|
|
5
|
+
getDecoratorConfig(method: EApiRouteType, _metadata: TApiPropertyDescribeProperties): TApiPropertyDescribeDtoProperties;
|
|
6
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DtoStrategyQuery = void 0;
|
|
4
|
+
const enum_1 = require("../../../../enum");
|
|
5
|
+
class DtoStrategyQuery {
|
|
6
|
+
getDecoratorConfig(method, _metadata) {
|
|
7
|
+
switch (method) {
|
|
8
|
+
case enum_1.EApiRouteType.GET_LIST: {
|
|
9
|
+
return { expose: false, required: false, response: false };
|
|
10
|
+
}
|
|
11
|
+
default: {
|
|
12
|
+
return { expose: true, required: false, response: false };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.DtoStrategyQuery = DtoStrategyQuery;
|
|
18
|
+
//# sourceMappingURL=query.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.class.js","sourceRoot":"/","sources":["class/utility/dto/strategy/query.class.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;AAKjD,MAAa,gBAAgB;IAC5B,kBAAkB,CAAC,MAAqB,EAAE,SAAyC;QAClF,QAAQ,MAAM,EAAE,CAAC;YAChB,KAAK,oBAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC7B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC5D,CAAC;YAED,OAAO,CAAC,CAAC,CAAC;gBACT,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC3D,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAZD,4CAYC","sourcesContent":["import { EApiRouteType } from \"../../../../enum\";\n\nimport type { IDtoStrategy } from \"../../../../interface\";\nimport type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeProperties } from \"../../../../type\";\n\nexport class DtoStrategyQuery implements IDtoStrategy {\n\tgetDecoratorConfig(method: EApiRouteType, _metadata: TApiPropertyDescribeProperties): TApiPropertyDescribeDtoProperties {\n\t\tswitch (method) {\n\t\t\tcase EApiRouteType.GET_LIST: {\n\t\t\t\treturn { expose: false, required: false, response: false };\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\treturn { expose: true, required: false, response: false };\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EApiRouteType } from "../../../../enum";
|
|
2
|
+
import type { IDtoStrategy } from "../../../../interface";
|
|
3
|
+
import type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeProperties } from "../../../../type";
|
|
4
|
+
export declare class DtoStrategyRequest implements IDtoStrategy {
|
|
5
|
+
getDecoratorConfig(method: EApiRouteType, _metadata: TApiPropertyDescribeProperties): TApiPropertyDescribeDtoProperties;
|
|
6
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DtoStrategyRequest = void 0;
|
|
4
|
+
const enum_1 = require("../../../../enum");
|
|
5
|
+
class DtoStrategyRequest {
|
|
6
|
+
getDecoratorConfig(method, _metadata) {
|
|
7
|
+
switch (method) {
|
|
8
|
+
case enum_1.EApiRouteType.GET:
|
|
9
|
+
case enum_1.EApiRouteType.DELETE: {
|
|
10
|
+
return { expose: false, required: true, response: false };
|
|
11
|
+
}
|
|
12
|
+
case enum_1.EApiRouteType.CREATE:
|
|
13
|
+
case enum_1.EApiRouteType.UPDATE: {
|
|
14
|
+
return { expose: false, required: true, response: false };
|
|
15
|
+
}
|
|
16
|
+
case enum_1.EApiRouteType.PARTIAL_UPDATE: {
|
|
17
|
+
return { expose: false, required: true, response: false };
|
|
18
|
+
}
|
|
19
|
+
default: {
|
|
20
|
+
return { expose: false, required: true, response: false };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.DtoStrategyRequest = DtoStrategyRequest;
|
|
26
|
+
//# sourceMappingURL=request.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.class.js","sourceRoot":"/","sources":["class/utility/dto/strategy/request.class.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;AAKjD,MAAa,kBAAkB;IAC9B,kBAAkB,CAAC,MAAqB,EAAE,SAAyC;QAClF,QAAQ,MAAM,EAAE,CAAC;YAChB,KAAK,oBAAa,CAAC,GAAG,CAAC;YAEvB,KAAK,oBAAa,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC3B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC3D,CAAC;YAED,KAAK,oBAAa,CAAC,MAAM,CAAC;YAE1B,KAAK,oBAAa,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC3B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC3D,CAAC;YAED,KAAK,oBAAa,CAAC,cAAc,CAAC,CAAC,CAAC;gBACnC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC3D,CAAC;YAED,OAAO,CAAC,CAAC,CAAC;gBACT,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC3D,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAxBD,gDAwBC","sourcesContent":["import { EApiRouteType } from \"../../../../enum\";\n\nimport type { IDtoStrategy } from \"../../../../interface\";\nimport type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeProperties } from \"../../../../type\";\n\nexport class DtoStrategyRequest implements IDtoStrategy {\n\tgetDecoratorConfig(method: EApiRouteType, _metadata: TApiPropertyDescribeProperties): TApiPropertyDescribeDtoProperties {\n\t\tswitch (method) {\n\t\t\tcase EApiRouteType.GET:\n\n\t\t\tcase EApiRouteType.DELETE: {\n\t\t\t\treturn { expose: false, required: true, response: false };\n\t\t\t}\n\n\t\t\tcase EApiRouteType.CREATE:\n\n\t\t\tcase EApiRouteType.UPDATE: {\n\t\t\t\treturn { expose: false, required: true, response: false };\n\t\t\t}\n\n\t\t\tcase EApiRouteType.PARTIAL_UPDATE: {\n\t\t\t\treturn { expose: false, required: true, response: false };\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\treturn { expose: false, required: true, response: false };\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EApiRouteType } from "../../../../enum";
|
|
2
|
+
import type { IDtoStrategy } from "../../../../interface";
|
|
3
|
+
import type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeProperties } from "../../../../type";
|
|
4
|
+
export declare class DtoStrategyResponse implements IDtoStrategy {
|
|
5
|
+
getDecoratorConfig(method: EApiRouteType, _metadata: TApiPropertyDescribeProperties): TApiPropertyDescribeDtoProperties;
|
|
6
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DtoStrategyResponse = void 0;
|
|
4
|
+
const enum_1 = require("../../../../enum");
|
|
5
|
+
class DtoStrategyResponse {
|
|
6
|
+
getDecoratorConfig(method, _metadata) {
|
|
7
|
+
switch (method) {
|
|
8
|
+
case enum_1.EApiRouteType.DELETE: {
|
|
9
|
+
return { expose: true, required: false, response: true };
|
|
10
|
+
}
|
|
11
|
+
default: {
|
|
12
|
+
return { expose: true, required: false, response: true };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.DtoStrategyResponse = DtoStrategyResponse;
|
|
18
|
+
//# sourceMappingURL=response.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.class.js","sourceRoot":"/","sources":["class/utility/dto/strategy/response.class.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;AAKjD,MAAa,mBAAmB;IAC/B,kBAAkB,CAAC,MAAqB,EAAE,SAAyC;QAClF,QAAQ,MAAM,EAAE,CAAC;YAChB,KAAK,oBAAa,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC3B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC1D,CAAC;YAED,OAAO,CAAC,CAAC,CAAC;gBACT,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC1D,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAZD,kDAYC","sourcesContent":["import { EApiRouteType } from \"../../../../enum\";\n\nimport type { IDtoStrategy } from \"../../../../interface\";\nimport type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeProperties } from \"../../../../type\";\n\nexport class DtoStrategyResponse implements IDtoStrategy {\n\tgetDecoratorConfig(method: EApiRouteType, _metadata: TApiPropertyDescribeProperties): TApiPropertyDescribeDtoProperties {\n\t\tswitch (method) {\n\t\t\tcase EApiRouteType.DELETE: {\n\t\t\t\treturn { expose: true, required: false, response: true };\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\treturn { expose: true, required: false, response: true };\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dto/strategy";
|
|
@@ -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("./dto/strategy"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["class/utility/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B","sourcesContent":["export * from \"./dto/strategy\";\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EApiDtoType, EApiPropertyDescribeType } from "../../../enum";
|
|
2
|
+
import type { IDtoGenerateFactory, IDtoStrategy } from "../../../interface";
|
|
3
|
+
export declare const DTO_UTILITY_CONSTANT: {
|
|
4
|
+
readonly DTO_STRATEGIES: Record<EApiDtoType, IDtoStrategy>;
|
|
5
|
+
readonly PROPERTY_DECORATOR_FACTORIES: Record<EApiPropertyDescribeType, IDtoGenerateFactory>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DTO_UTILITY_CONSTANT = void 0;
|
|
4
|
+
const class_1 = require("../../../class");
|
|
5
|
+
const dto_1 = require("../../../class/utility/dto");
|
|
6
|
+
const enum_1 = require("../../../enum");
|
|
7
|
+
const relation_class_1 = require("../../../class/utility/dto/property/factory/relation.class");
|
|
8
|
+
const DTO_STRATEGIES = {
|
|
9
|
+
[enum_1.EApiDtoType.BODY]: new class_1.DtoStrategyBody(),
|
|
10
|
+
[enum_1.EApiDtoType.QUERY]: new class_1.DtoStrategyQuery(),
|
|
11
|
+
[enum_1.EApiDtoType.REQUEST]: new class_1.DtoStrategyRequest(),
|
|
12
|
+
[enum_1.EApiDtoType.RESPONSE]: new class_1.DtoStrategyResponse(),
|
|
13
|
+
};
|
|
14
|
+
const PROPERTY_DECORATOR_FACTORIES = {
|
|
15
|
+
[enum_1.EApiPropertyDescribeType.BOOLEAN]: new dto_1.DtoPropertyFactoryBoolean(),
|
|
16
|
+
[enum_1.EApiPropertyDescribeType.DATE]: new dto_1.DtoPropertyFactoryDate(),
|
|
17
|
+
[enum_1.EApiPropertyDescribeType.NUMBER]: new dto_1.DtoPropertyFactoryNumber(),
|
|
18
|
+
[enum_1.EApiPropertyDescribeType.OBJECT]: new dto_1.DtoPropertyFactoryObject(),
|
|
19
|
+
[enum_1.EApiPropertyDescribeType.STRING]: new dto_1.DtoPropertyFactoryString(),
|
|
20
|
+
[enum_1.EApiPropertyDescribeType.UUID]: new dto_1.DtoPropertyFactoryUuid(),
|
|
21
|
+
[enum_1.EApiPropertyDescribeType.RELATION]: new relation_class_1.DtoPropertyFactoryRelation(),
|
|
22
|
+
};
|
|
23
|
+
exports.DTO_UTILITY_CONSTANT = {
|
|
24
|
+
DTO_STRATEGIES,
|
|
25
|
+
PROPERTY_DECORATOR_FACTORIES,
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constant.js","sourceRoot":"/","sources":["constant/utility/dto/constant.ts"],"names":[],"mappings":";;;AAAA,0CAA4G;AAC5G,oDAAqM;AAErM,wCAAsE;AAGtE,+FAAsG;AAEtG,MAAM,cAAc,GAAsC;IACzD,CAAC,kBAAW,CAAC,IAAI,CAAC,EAAE,IAAI,uBAAe,EAAE;IACzC,CAAC,kBAAW,CAAC,KAAK,CAAC,EAAE,IAAI,wBAAgB,EAAE;IAC3C,CAAC,kBAAW,CAAC,OAAO,CAAC,EAAE,IAAI,0BAAkB,EAAE;IAC/C,CAAC,kBAAW,CAAC,QAAQ,CAAC,EAAE,IAAI,2BAAmB,EAAE;CACjD,CAAC;AAEF,MAAM,4BAA4B,GAA0D;IAC3F,CAAC,+BAAwB,CAAC,OAAO,CAAC,EAAE,IAAI,+BAAyB,EAAE;IACnE,CAAC,+BAAwB,CAAC,IAAI,CAAC,EAAE,IAAI,4BAAsB,EAAE;IAC7D,CAAC,+BAAwB,CAAC,MAAM,CAAC,EAAE,IAAI,8BAAwB,EAAE;IACjE,CAAC,+BAAwB,CAAC,MAAM,CAAC,EAAE,IAAI,8BAAwB,EAAE;IACjE,CAAC,+BAAwB,CAAC,MAAM,CAAC,EAAE,IAAI,8BAAwB,EAAE;IACjE,CAAC,+BAAwB,CAAC,IAAI,CAAC,EAAE,IAAI,4BAAsB,EAAE;IAC7D,CAAC,+BAAwB,CAAC,QAAQ,CAAC,EAAE,IAAI,2CAA0B,EAAE;CACrE,CAAC;AAEW,QAAA,oBAAoB,GAG7B;IACH,cAAc;IACd,4BAA4B;CACnB,CAAC","sourcesContent":["import { DtoStrategyBody, DtoStrategyQuery, DtoStrategyRequest, DtoStrategyResponse } from \"../../../class\";\nimport { DtoPropertyFactoryBoolean, DtoPropertyFactoryDate, DtoPropertyFactoryNumber, DtoPropertyFactoryObject, DtoPropertyFactoryString, DtoPropertyFactoryUuid } from \"../../../class/utility/dto\";\n\nimport { EApiDtoType, EApiPropertyDescribeType } from \"../../../enum\";\n\nimport type { IDtoGenerateFactory, IDtoStrategy } from \"../../../interface\";\nimport {DtoPropertyFactoryRelation} from \"../../../class/utility/dto/property/factory/relation.class\";\n\nconst DTO_STRATEGIES: Record<EApiDtoType, IDtoStrategy> = {\n\t[EApiDtoType.BODY]: new DtoStrategyBody(),\n\t[EApiDtoType.QUERY]: new DtoStrategyQuery(),\n\t[EApiDtoType.REQUEST]: new DtoStrategyRequest(),\n\t[EApiDtoType.RESPONSE]: new DtoStrategyResponse(),\n};\n\nconst PROPERTY_DECORATOR_FACTORIES: Record<EApiPropertyDescribeType, IDtoGenerateFactory> = {\n\t[EApiPropertyDescribeType.BOOLEAN]: new DtoPropertyFactoryBoolean(),\n\t[EApiPropertyDescribeType.DATE]: new DtoPropertyFactoryDate(),\n\t[EApiPropertyDescribeType.NUMBER]: new DtoPropertyFactoryNumber(),\n\t[EApiPropertyDescribeType.OBJECT]: new DtoPropertyFactoryObject(),\n\t[EApiPropertyDescribeType.STRING]: new DtoPropertyFactoryString(),\n\t[EApiPropertyDescribeType.UUID]: new DtoPropertyFactoryUuid(),\n\t[EApiPropertyDescribeType.RELATION]: new DtoPropertyFactoryRelation(),\n};\n\nexport const DTO_UTILITY_CONSTANT: {\n\treadonly DTO_STRATEGIES: Record<EApiDtoType, IDtoStrategy>;\n\treadonly PROPERTY_DECORATOR_FACTORIES: Record<EApiPropertyDescribeType, IDtoGenerateFactory>;\n} = {\n\tDTO_STRATEGIES,\n\tPROPERTY_DECORATOR_FACTORIES,\n} as const;\n"]}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IApiBaseEntity } from "../../interface";
|
|
2
2
|
import type { IApiControllerProperties } from "../../interface/decorator/api/controller-properties.interface";
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
service: BaseApiService<any>;
|
|
6
|
-
};
|
|
7
|
-
export declare const ApiController: <E extends BaseEntity>(options: IApiControllerProperties<E>) => <T extends TConstructor>(target: T) => T;
|
|
8
|
-
export {};
|
|
3
|
+
import type { TApiControllerConstructor } from "../../type";
|
|
4
|
+
export declare const ApiController: <E extends IApiBaseEntity>(options: IApiControllerProperties<E>) => <T extends TApiControllerConstructor>(target: T) => T;
|
|
@@ -6,8 +6,8 @@ const ApiController = (options) => (target) => {
|
|
|
6
6
|
const factory = new factory_1.ApiControllerFactory(target, options);
|
|
7
7
|
factory.init();
|
|
8
8
|
const ValidatedController = class extends target {
|
|
9
|
-
constructor(...
|
|
10
|
-
super(...
|
|
9
|
+
constructor(..._arguments) {
|
|
10
|
+
super(..._arguments);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(ValidatedController, "name", { value: target.name });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.decorator.js","sourceRoot":"/","sources":["decorator/api/controller.decorator.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"controller.decorator.js","sourceRoot":"/","sources":["decorator/api/controller.decorator.ts"],"names":[],"mappings":";;;AACA,2CAAqD;AAK9C,MAAM,aAAa,GACzB,CAA2B,OAAoC,EAAE,EAAE,CACnE,CAAsC,MAAS,EAAK,EAAE;IACrD,MAAM,OAAO,GAA4B,IAAI,8BAAoB,CAAI,MAAM,EAAE,OAAO,CAAC,CAAC;IACtF,OAAO,CAAC,IAAI,EAAE,CAAC;IAEf,MAAM,mBAAmB,GAA2D,KAAM,SAAQ,MAAM;QAEvG,YAAY,GAAG,UAAe;YAE7B,KAAK,CAAC,GAAG,UAAU,CAAC,CAAC;QACtB,CAAC;KACD,CAAC;IACF,MAAM,CAAC,cAAc,CAAC,mBAAmB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IAE3E,OAAO,mBAAwB,CAAC;AACjC,CAAC,CAAC;AAhBU,QAAA,aAAa,iBAgBvB","sourcesContent":["import { IApiBaseEntity } from \"../../interface\";\nimport { ApiControllerFactory } from \"../../factory\";\n\nimport type { IApiControllerProperties } from \"../../interface/decorator/api/controller-properties.interface\";\nimport type { TApiControllerConstructor } from \"../../type\";\n\nexport const ApiController =\n\t<E extends IApiBaseEntity>(options: IApiControllerProperties<E>) =>\n\t<T extends TApiControllerConstructor>(target: T): T => {\n\t\tconst factory: ApiControllerFactory<E> = new ApiControllerFactory<E>(target, options);\n\t\tfactory.init();\n\n\t\tconst ValidatedController: { new (...arguments_: Array<any>): {}; prototype: {} } = class extends target {\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\t\t\tconstructor(..._arguments: any) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n\t\t\t\tsuper(..._arguments);\n\t\t\t}\n\t\t};\n\t\tObject.defineProperty(ValidatedController, \"name\", { value: target.name });\n\n\t\treturn ValidatedController as T;\n\t};\n"]}
|