@elsikora/nestjs-crud-automator 1.7.0-dev.1 → 1.8.0-dev.1
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/README.md +272 -226
- package/dist/cjs/class/api/service-base.class.d.ts +7 -6
- package/dist/cjs/class/api/service-base.class.js +7 -6
- package/dist/cjs/class/api/service-base.class.js.map +1 -1
- package/dist/cjs/class/metadata-storage.class.js +2 -0
- package/dist/cjs/class/metadata-storage.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/strategy/request.class.js +1 -0
- package/dist/cjs/class/utility/dto/strategy/request.class.js.map +1 -1
- package/dist/cjs/constant/number.constant.js +1 -0
- package/dist/cjs/constant/number.constant.js.map +1 -1
- package/dist/cjs/decorator/api/controller.decorator.js +2 -0
- package/dist/cjs/decorator/api/controller.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/create.decorator.js +8 -3
- package/dist/cjs/decorator/api/function/create.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/decorator.js +2 -0
- package/dist/cjs/decorator/api/function/decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/delete.decorator.js +8 -3
- package/dist/cjs/decorator/api/function/delete.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/get-list.decorator.js +16 -4
- package/dist/cjs/decorator/api/function/get-list.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/get-many.decorator.js +12 -4
- package/dist/cjs/decorator/api/function/get-many.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/get.decorator.js +12 -4
- package/dist/cjs/decorator/api/function/get.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/update.decorator.js +9 -4
- package/dist/cjs/decorator/api/function/update.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/method.decorator.js +2 -0
- package/dist/cjs/decorator/api/method.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/boolean.decorator.js +2 -0
- package/dist/cjs/decorator/api/property/boolean.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/date.decorator.js +2 -0
- package/dist/cjs/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/enum.decorator.js +2 -0
- package/dist/cjs/decorator/api/property/enum.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/number.decorator.js +4 -0
- package/dist/cjs/decorator/api/property/number.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/object.decorator.js +2 -0
- package/dist/cjs/decorator/api/property/object.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/string.decorator.js +21 -3
- package/dist/cjs/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/uuid.decorator.js +2 -0
- package/dist/cjs/decorator/api/property/uuid.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/service.decorator.js +55 -12
- package/dist/cjs/decorator/api/service.decorator.js.map +1 -1
- package/dist/cjs/factory/api/controller.factory.js +13 -0
- package/dist/cjs/factory/api/controller.factory.js.map +1 -1
- package/dist/cjs/interface/decorator/api/function/create-executor-properties.interface.d.ts +2 -1
- package/dist/cjs/interface/decorator/api/function/delete-executor-properties.interface.d.ts +3 -2
- package/dist/cjs/interface/decorator/api/function/get-executor-properties.interface.d.ts +2 -1
- package/dist/cjs/interface/decorator/api/function/get-list-executor-properties.interface.d.ts +2 -1
- package/dist/cjs/interface/decorator/api/function/get-many-executor-properties.interface.d.ts +2 -1
- package/dist/cjs/interface/decorator/api/function/update-executor-properties.interface.d.ts +3 -2
- package/dist/cjs/utility/api/controller/get-list/transform-filter.utility.js +5 -0
- package/dist/cjs/utility/api/controller/get-list/transform-filter.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/get-list/transform-operation.utility.js +2 -0
- package/dist/cjs/utility/api/controller/get-list/transform-operation.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/handle-request-relations.utility.js +2 -0
- package/dist/cjs/utility/api/controller/handle-request-relations.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/write-dto-swagger.utility.js +3 -0
- package/dist/cjs/utility/api/controller/write-dto-swagger.utility.js.map +1 -1
- package/dist/cjs/utility/api/filter-order-by-from-entity.utility.js +2 -0
- package/dist/cjs/utility/api/filter-order-by-from-entity.utility.js.map +1 -1
- package/dist/cjs/utility/dto/build-decorator.utility.js +1 -0
- package/dist/cjs/utility/dto/build-decorator.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate-filter-decorator.utility.js +2 -0
- package/dist/cjs/utility/dto/generate-filter-decorator.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate.utility.js +17 -0
- package/dist/cjs/utility/dto/generate.utility.js.map +1 -1
- package/dist/cjs/utility/dto/get-decorator-config.utility.js +1 -0
- package/dist/cjs/utility/dto/get-decorator-config.utility.js.map +1 -1
- package/dist/cjs/utility/dto/validate-property-config.utility.js +1 -0
- package/dist/cjs/utility/dto/validate-property-config.utility.js.map +1 -1
- package/dist/cjs/utility/generate-entity-information.utility.js +5 -0
- package/dist/cjs/utility/generate-entity-information.utility.js.map +1 -1
- package/dist/cjs/utility/get-entity-columns.utility.js +1 -0
- package/dist/cjs/utility/get-entity-columns.utility.js.map +1 -1
- package/dist/cjs/utility/is-error-of-type.utility.js +2 -0
- package/dist/cjs/utility/is-error-of-type.utility.js.map +1 -1
- package/dist/cjs/utility/logger.utility.d.ts +9 -0
- package/dist/cjs/utility/logger.utility.js +11 -0
- package/dist/cjs/utility/logger.utility.js.map +1 -1
- package/dist/cjs/validator/all-or-none-of-listed-properties.validator.js +1 -0
- package/dist/cjs/validator/all-or-none-of-listed-properties.validator.js.map +1 -1
- package/dist/cjs/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js +1 -0
- package/dist/cjs/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js.map +1 -1
- package/dist/cjs/validator/has-at-least-one-of-listed-properties.validator.js +1 -0
- package/dist/cjs/validator/has-at-least-one-of-listed-properties.validator.js.map +1 -1
- package/dist/cjs/validator/has-at-least-one-property.validator.js +1 -0
- package/dist/cjs/validator/has-at-least-one-property.validator.js.map +1 -1
- package/dist/cjs/validator/has-paired-custom-suffixes-fields.validator.js +6 -0
- package/dist/cjs/validator/has-paired-custom-suffixes-fields.validator.js.map +1 -1
- package/dist/cjs/validator/only-one-of-listed-properties.validator.js +1 -0
- package/dist/cjs/validator/only-one-of-listed-properties.validator.js.map +1 -1
- package/dist/esm/class/api/service-base.class.d.ts +7 -6
- package/dist/esm/interface/decorator/api/function/create-executor-properties.interface.d.ts +2 -1
- package/dist/esm/interface/decorator/api/function/delete-executor-properties.interface.d.ts +3 -2
- package/dist/esm/interface/decorator/api/function/get-executor-properties.interface.d.ts +2 -1
- package/dist/esm/interface/decorator/api/function/get-list-executor-properties.interface.d.ts +2 -1
- package/dist/esm/interface/decorator/api/function/get-many-executor-properties.interface.d.ts +2 -1
- package/dist/esm/interface/decorator/api/function/update-executor-properties.interface.d.ts +3 -2
- package/dist/esm/src/class/api/service-base.class.js +7 -6
- package/dist/esm/src/class/api/service-base.class.js.map +1 -1
- package/dist/esm/src/class/metadata-storage.class.js +2 -0
- package/dist/esm/src/class/metadata-storage.class.js.map +1 -1
- package/dist/esm/src/class/utility/dto/strategy/request.class.js +1 -0
- package/dist/esm/src/class/utility/dto/strategy/request.class.js.map +1 -1
- package/dist/esm/src/constant/number.constant.js +1 -0
- package/dist/esm/src/constant/number.constant.js.map +1 -1
- package/dist/esm/src/decorator/api/controller.decorator.js +2 -0
- package/dist/esm/src/decorator/api/controller.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/function/create.decorator.js +8 -3
- package/dist/esm/src/decorator/api/function/create.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/function/decorator.js +2 -0
- package/dist/esm/src/decorator/api/function/decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/function/delete.decorator.js +8 -3
- package/dist/esm/src/decorator/api/function/delete.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/function/get-list.decorator.js +16 -4
- package/dist/esm/src/decorator/api/function/get-list.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/function/get-many.decorator.js +12 -4
- package/dist/esm/src/decorator/api/function/get-many.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/function/get.decorator.js +12 -4
- package/dist/esm/src/decorator/api/function/get.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/function/update.decorator.js +9 -4
- package/dist/esm/src/decorator/api/function/update.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/method.decorator.js +2 -0
- package/dist/esm/src/decorator/api/method.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/property/boolean.decorator.js +2 -0
- package/dist/esm/src/decorator/api/property/boolean.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/property/date.decorator.js +2 -0
- package/dist/esm/src/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/property/enum.decorator.js +2 -0
- package/dist/esm/src/decorator/api/property/enum.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/property/number.decorator.js +4 -0
- package/dist/esm/src/decorator/api/property/number.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/property/object.decorator.js +2 -0
- package/dist/esm/src/decorator/api/property/object.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/property/string.decorator.js +21 -3
- package/dist/esm/src/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/property/uuid.decorator.js +2 -0
- package/dist/esm/src/decorator/api/property/uuid.decorator.js.map +1 -1
- package/dist/esm/src/decorator/api/service.decorator.js +55 -12
- package/dist/esm/src/decorator/api/service.decorator.js.map +1 -1
- package/dist/esm/src/factory/api/controller.factory.js +13 -0
- package/dist/esm/src/factory/api/controller.factory.js.map +1 -1
- package/dist/esm/src/utility/api/controller/get-list/transform-filter.utility.js +5 -0
- package/dist/esm/src/utility/api/controller/get-list/transform-filter.utility.js.map +1 -1
- package/dist/esm/src/utility/api/controller/get-list/transform-operation.utility.js +2 -0
- package/dist/esm/src/utility/api/controller/get-list/transform-operation.utility.js.map +1 -1
- package/dist/esm/src/utility/api/controller/handle-request-relations.utility.js +2 -0
- package/dist/esm/src/utility/api/controller/handle-request-relations.utility.js.map +1 -1
- package/dist/esm/src/utility/api/controller/write-dto-swagger.utility.js +3 -0
- package/dist/esm/src/utility/api/controller/write-dto-swagger.utility.js.map +1 -1
- package/dist/esm/src/utility/api/filter-order-by-from-entity.utility.js +2 -0
- package/dist/esm/src/utility/api/filter-order-by-from-entity.utility.js.map +1 -1
- package/dist/esm/src/utility/dto/build-decorator.utility.js +1 -0
- package/dist/esm/src/utility/dto/build-decorator.utility.js.map +1 -1
- package/dist/esm/src/utility/dto/generate-filter-decorator.utility.js +2 -0
- package/dist/esm/src/utility/dto/generate-filter-decorator.utility.js.map +1 -1
- package/dist/esm/src/utility/dto/generate.utility.js +17 -0
- package/dist/esm/src/utility/dto/generate.utility.js.map +1 -1
- package/dist/esm/src/utility/dto/get-decorator-config.utility.js +1 -0
- package/dist/esm/src/utility/dto/get-decorator-config.utility.js.map +1 -1
- package/dist/esm/src/utility/dto/validate-property-config.utility.js +1 -0
- package/dist/esm/src/utility/dto/validate-property-config.utility.js.map +1 -1
- package/dist/esm/src/utility/generate-entity-information.utility.js +5 -0
- package/dist/esm/src/utility/generate-entity-information.utility.js.map +1 -1
- package/dist/esm/src/utility/get-entity-columns.utility.js +1 -0
- package/dist/esm/src/utility/get-entity-columns.utility.js.map +1 -1
- package/dist/esm/src/utility/is-error-of-type.utility.js +2 -0
- package/dist/esm/src/utility/is-error-of-type.utility.js.map +1 -1
- package/dist/esm/src/utility/logger.utility.js +11 -0
- package/dist/esm/src/utility/logger.utility.js.map +1 -1
- package/dist/esm/src/validator/all-or-none-of-listed-properties.validator.js +1 -0
- package/dist/esm/src/validator/all-or-none-of-listed-properties.validator.js.map +1 -1
- package/dist/esm/src/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js +1 -0
- package/dist/esm/src/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js.map +1 -1
- package/dist/esm/src/validator/has-at-least-one-of-listed-properties.validator.js +1 -0
- package/dist/esm/src/validator/has-at-least-one-of-listed-properties.validator.js.map +1 -1
- package/dist/esm/src/validator/has-at-least-one-property.validator.js +1 -0
- package/dist/esm/src/validator/has-at-least-one-property.validator.js.map +1 -1
- package/dist/esm/src/validator/has-paired-custom-suffixes-fields.validator.js +6 -0
- package/dist/esm/src/validator/has-paired-custom-suffixes-fields.validator.js.map +1 -1
- package/dist/esm/src/validator/only-one-of-listed-properties.validator.js +1 -0
- package/dist/esm/src/validator/only-one-of-listed-properties.validator.js.map +1 -1
- package/dist/esm/utility/logger.utility.d.ts +9 -0
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.factory.js","sources":["../../../../../src/factory/api/controller.factory.ts"],"sourcesContent":[null],"names":["GenerateEntityInformation","analyzeEntityMetadata","ErrorException","Controller","ApiTags","CONTROLLER_API_DECORATOR_CONSTANT","ApiControllerWriteMethod","ApiControllerApplyMetadata","ApiControllerApplyDecorators","ApiControllerWriteDtoSwagger","EApiRouteType","ApiControllerGetPrimaryColumn","ApiControllerTransformData","ApiControllerValidateRequest","ApiControllerHandleRequestRelations","DtoGenerate","EApiDtoType","plainToInstance","ApiControllerGetListTransformFilter","FUNCTION_API_DECORATOR_CONSTANT"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqBa,oBAAoB,CAAA;AAQrB,IAAA,MAAA;AACO,IAAA,UAAA;AARlB,IAAA,IAAc,eAAe,GAAA;AAC5B,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,SAA6C;;AAGhD,IAAA,MAAM;IAEvB,WACW,CAAA,MAAqC,EAC9B,UAAuC,EAAA;QAD9C,IAAM,CAAA,MAAA,GAAN,MAAM;QACC,IAAU,CAAA,UAAA,GAAV,UAAU;QAE3B,IAAI,CAAC,MAAM,GAAGA,2DAAyB,CAAI,UAAU,CAAC,MAAM,CAAC;AAC7D,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CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,IAAI,CAAC;YAEpEF,gDAA0B,CAAmB,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,qBAAqB,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAEhK,YAAA,MAAM,GAAG,GAA8BG,4BAAW,CAAC,UAAU,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAEC,wBAAW,CAAC,QAAQ,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,GAAGA,wBAAW,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,cAAc,EAAE,KAAK,CAAC;AAEjO,YAAA,OAAOC,gCAAe,CAAC,GAA0B,EAAE,QAAQ,EAAE;AAE5D,gBAAA,uBAAuB,EAAE,IAAI;AAC7B,aAAA,CAAC;SACF,EACD,MAAM,EACN,EAAE,KAAK,EAAE,UAAU,EAAE,CACrB;;AAEF;;;;"}
|
|
1
|
+
{"version":3,"file":"controller.factory.js","sources":["../../../../../src/factory/api/controller.factory.ts"],"sourcesContent":[null],"names":["GenerateEntityInformation","analyzeEntityMetadata","ErrorException","Controller","ApiTags","CONTROLLER_API_DECORATOR_CONSTANT","ApiControllerWriteMethod","ApiControllerApplyMetadata","ApiControllerApplyDecorators","ApiControllerWriteDtoSwagger","EApiRouteType","ApiControllerGetPrimaryColumn","ApiControllerTransformData","ApiControllerValidateRequest","ApiControllerHandleRequestRelations","DtoGenerate","EApiDtoType","plainToInstance","ApiControllerGetListTransformFilter","FUNCTION_API_DECORATOR_CONSTANT"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqBa,oBAAoB,CAAA;AAQrB,IAAA,MAAA;AACO,IAAA,UAAA;AARlB,IAAA,IAAc,eAAe,GAAA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AE,UAAU,CAAC;AAC7G,YAAA,MAAMC,kEAAmC,CAAI,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;AAEzH,YAAA,MAAM,eAAe,GAAkC;AACtD,gBAAA,CAAC,UAAU,CAAC,GAAG,GAAG,UAAU,CAAC,KAAK;aACD;AAElC,YAAA,MAAM,QAAQ,GAAM,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,IAAI,CAAC;YAEpEF,gDAA0B,CAAmB,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,qBAAqB,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAEhK,YAAA,MAAM,GAAG,GAA8BG,4BAAW,CAAC,UAAU,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAEC,wBAAW,CAAC,QAAQ,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,GAAGA,wBAAW,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,cAAc,EAAE,KAAK,CAAC;AAEjO,YAAA,OAAOC,gCAAe,CAAC,GAA0B,EAAE,QAAQ,EAAE;;AAE5D,gBAAA,uBAAuB,EAAE,IAAI;AAC7B,aAAA,CAAC;SACF,EACD,MAAM,EACN,EAAE,KAAK,EAAE,UAAU,EAAE,CACrB;;AAEF;;;;"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { Repository } from "typeorm";
|
|
1
|
+
import type { EntityManager, Repository } from "typeorm";
|
|
2
2
|
import type { TApiFunctionCreateProperties } from "../../../../type";
|
|
3
3
|
import type { IApiBaseEntity } from "../../../api-base-entity.interface";
|
|
4
4
|
export interface IApiFunctionCreateExecutorProperties<E extends IApiBaseEntity> {
|
|
5
5
|
entity: IApiBaseEntity;
|
|
6
|
+
eventManager?: EntityManager;
|
|
6
7
|
properties: TApiFunctionCreateProperties<E>;
|
|
7
8
|
repository: Repository<E>;
|
|
8
9
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { FindOptionsWhere, Repository } from "typeorm";
|
|
1
|
+
import type { EntityManager, FindOptionsWhere, Repository } from "typeorm";
|
|
2
2
|
import type { TApiFunctionGetProperties } from "../../../../type";
|
|
3
3
|
import type { IApiBaseEntity } from "../../../api-base-entity.interface";
|
|
4
4
|
export interface IApiFunctionDeleteExecutorProperties<E extends IApiBaseEntity> {
|
|
5
5
|
criteria: FindOptionsWhere<E>;
|
|
6
6
|
entity: IApiBaseEntity;
|
|
7
|
-
|
|
7
|
+
eventManager?: EntityManager;
|
|
8
|
+
getFunction: (properties: TApiFunctionGetProperties<E>, eventManager?: EntityManager) => Promise<E>;
|
|
8
9
|
repository: Repository<E>;
|
|
9
10
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { Repository } from "typeorm";
|
|
1
|
+
import type { EntityManager, Repository } from "typeorm";
|
|
2
2
|
import type { TApiFunctionGetProperties } from "../../../../type";
|
|
3
3
|
import type { IApiBaseEntity } from "../../../api-base-entity.interface";
|
|
4
4
|
export interface IApiFunctionGetExecutorProperties<E extends IApiBaseEntity> {
|
|
5
5
|
entity: IApiBaseEntity;
|
|
6
|
+
eventManager?: EntityManager;
|
|
6
7
|
properties: TApiFunctionGetProperties<E>;
|
|
7
8
|
repository: Repository<E>;
|
|
8
9
|
}
|
package/dist/cjs/interface/decorator/api/function/get-list-executor-properties.interface.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { Repository } from "typeorm";
|
|
1
|
+
import type { EntityManager, Repository } from "typeorm";
|
|
2
2
|
import type { TApiFunctionGetListProperties } from "../../../../type";
|
|
3
3
|
import type { IApiBaseEntity } from "../../../api-base-entity.interface";
|
|
4
4
|
export interface IApiFunctionGetListExecutorProperties<E extends IApiBaseEntity> {
|
|
5
5
|
entity: IApiBaseEntity;
|
|
6
|
+
eventManager?: EntityManager;
|
|
6
7
|
properties: TApiFunctionGetListProperties<E>;
|
|
7
8
|
repository: Repository<E>;
|
|
8
9
|
}
|
package/dist/cjs/interface/decorator/api/function/get-many-executor-properties.interface.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { Repository } from "typeorm";
|
|
1
|
+
import type { EntityManager, Repository } from "typeorm";
|
|
2
2
|
import type { TApiFunctionGetManyProperties } from "../../../../type";
|
|
3
3
|
import type { IApiBaseEntity } from "../../../api-base-entity.interface";
|
|
4
4
|
export interface IApiFunctionGetManyExecutorProperties<E extends IApiBaseEntity> {
|
|
5
5
|
entity: IApiBaseEntity;
|
|
6
|
+
eventManager?: EntityManager;
|
|
6
7
|
properties: TApiFunctionGetManyProperties<E>;
|
|
7
8
|
repository: Repository<E>;
|
|
8
9
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { FindOptionsWhere, Repository } from "typeorm";
|
|
1
|
+
import type { EntityManager, FindOptionsWhere, Repository } from "typeorm";
|
|
2
2
|
import type { TApiFunctionGetProperties, TApiFunctionUpdateProperties } from "../../../../type";
|
|
3
3
|
import type { IApiBaseEntity } from "../../../api-base-entity.interface";
|
|
4
4
|
export interface IApiFunctionUpdateExecutorProperties<E extends IApiBaseEntity> {
|
|
5
5
|
criteria: FindOptionsWhere<E>;
|
|
6
6
|
entity: IApiBaseEntity;
|
|
7
|
-
|
|
7
|
+
eventManager?: EntityManager;
|
|
8
|
+
getFunction: (properties: TApiFunctionGetProperties<E>, eventManager?: EntityManager) => Promise<E>;
|
|
8
9
|
properties: TApiFunctionUpdateProperties<E>;
|
|
9
10
|
repository: Repository<E>;
|
|
10
11
|
}
|
|
@@ -31,14 +31,19 @@ function ApiControllerGetListTransformFilter(query, entityMetadata) {
|
|
|
31
31
|
const cleanField = field.replace("]", "");
|
|
32
32
|
if (cleanField === "value" || cleanField === "values") {
|
|
33
33
|
const operation = query[`${String(key)}[operator]`];
|
|
34
|
+
// eslint-disable-next-line @elsikora/typescript/no-unsafe-assignment
|
|
34
35
|
const value = query[fullKey];
|
|
35
36
|
if (!operation || !key || value === undefined || value === null)
|
|
36
37
|
continue;
|
|
37
38
|
const column = entityMetadata.columns.find((column) => column.name == key);
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
// eslint-disable-next-line @elsikora/typescript/no-unsafe-member-access
|
|
38
41
|
if (column && column.metadata[propertyDescribe_constant.PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT.METADATA_PROPERTY_NAME].type === desribeType_enum.EApiPropertyDescribeType.RELATION) {
|
|
42
|
+
// @ts-ignore
|
|
39
43
|
filter[key] = { id: transformOperation_utility.ApiControllerGetListTransformOperation(operation, value) };
|
|
40
44
|
}
|
|
41
45
|
else {
|
|
46
|
+
// @ts-ignore
|
|
42
47
|
filter[key] = transformOperation_utility.ApiControllerGetListTransformOperation(operation, value);
|
|
43
48
|
}
|
|
44
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-filter.utility.js","sources":["../../../../../../../src/utility/api/controller/get-list/transform-filter.utility.ts"],"sourcesContent":[null],"names":["PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT","EApiPropertyDescribeType","ApiControllerGetListTransformOperation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUgB,SAAA,mCAAmC,CAAI,KAA0B,EAAE,cAA6B,EAAA;IAC/G,MAAM,MAAM,GAAwB,EAAE;IAEtC,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;AACzC,QAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE;AAE5B,QAAA,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAkB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;AAEtD,QAAA,IAAI,CAAC,KAAK;YAAE;QAEZ,MAAM,UAAU,GAAW,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;QAEjD,IAAI,UAAU,KAAK,OAAO,IAAI,UAAU,KAAK,QAAQ,EAAE;YACtD,MAAM,SAAS,GAAqB,KAAK,CAAC,CAAA,EAAG,MAAM,CAAC,GAAG,CAAC,CAAY,UAAA,CAAA,CAAqB
|
|
1
|
+
{"version":3,"file":"transform-filter.utility.js","sources":["../../../../../../../src/utility/api/controller/get-list/transform-filter.utility.ts"],"sourcesContent":[null],"names":["PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT","EApiPropertyDescribeType","ApiControllerGetListTransformOperation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUgB,SAAA,mCAAmC,CAAI,KAA0B,EAAE,cAA6B,EAAA;IAC/G,MAAM,MAAM,GAAwB,EAAE;IAEtC,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;AACzC,QAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE;AAE5B,QAAA,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAkB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;AAEtD,QAAA,IAAI,CAAC,KAAK;YAAE;QAEZ,MAAM,UAAU,GAAW,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;QAEjD,IAAI,UAAU,KAAK,OAAO,IAAI,UAAU,KAAK,QAAQ,EAAE;YACtD,MAAM,SAAS,GAAqB,KAAK,CAAC,CAAA,EAAG,MAAM,CAAC,GAAG,CAAC,CAAY,UAAA,CAAA,CAAqB;;AAEzF,YAAA,MAAM,KAAK,GAAQ,KAAK,CAAC,OAAO,CAAC;AAEjC,YAAA,IAAI,CAAC,SAAS,IAAI,CAAC,GAAG,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;gBAAE;AAEjE,YAAA,MAAM,MAAM,GAAoC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAA2B,KAAK,MAAM,CAAC,IAAI,IAAI,GAAG,CAAC;;;AAIhI,YAAA,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,CAACA,kEAAwC,CAAC,sBAAsB,CAAC,CAAC,IAAI,KAAKC,yCAAwB,CAAC,QAAQ,EAAE;;AAE1I,gBAAA,MAAM,CAAC,GAAc,CAAC,GAAG,EAAE,EAAE,EAAEC,iEAAsC,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE;;iBACnF;;gBAEN,MAAM,CAAC,GAAc,CAAC,GAAGA,iEAAsC,CAAC,SAAS,EAAE,KAAK,CAAC;;;;AAKpF,IAAA,OAAO,MAAM;AACd;;;;"}
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
var index = require('typeorm/index');
|
|
4
4
|
var filterOperation_enum = require('../../../../enum/filter-operation.enum.js');
|
|
5
5
|
|
|
6
|
+
// eslint-disable-next-line @elsikora/typescript/explicit-module-boundary-types
|
|
6
7
|
function ApiControllerGetListTransformOperation(operation, value) {
|
|
7
8
|
switch (operation) {
|
|
8
9
|
case filterOperation_enum.EFilterOperation.BETWEEN: {
|
|
10
|
+
// eslint-disable-next-line @elsikora/typescript/no-unsafe-assignment
|
|
9
11
|
const [start, end] = Array.isArray(value) ? value : [null, null];
|
|
10
12
|
return index.Between(start, end);
|
|
11
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-operation.utility.js","sources":["../../../../../../../src/utility/api/controller/get-list/transform-operation.utility.ts"],"sourcesContent":[null],"names":["EFilterOperation","Between","Like","ILike","Equal","Not","MoreThan","MoreThanOrEqual","In","IsNull","LessThan","LessThanOrEqual"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"transform-operation.utility.js","sources":["../../../../../../../src/utility/api/controller/get-list/transform-operation.utility.ts"],"sourcesContent":[null],"names":["EFilterOperation","Between","Like","ILike","Equal","Not","MoreThan","Mo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,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;;AAG1B,QAAA,KAAKL,qCAAgB,CAAC,GAAG,EAAE;YAC1B,OAAOK,SAAG,CAACF,WAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;;AAGjC,QAAA,KAAKH,qCAAgB,CAAC,KAAK,EAAE;YAC5B,OAAOK,SAAG,CAACG,QAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;;AAGvD,QAAA,KAAKR,qCAAgB,CAAC,MAAM,EAAE;AAC7B,YAAA,OAAOK,SAAG,CAACG,QAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAM,KAAKL,WAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAACA,WAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;;AAGxF,QAAA,KAAKH,qCAAgB,CAAC,OAAO,EAAE;AAC9B,YAAA,OAAOK,SAAG,CAACI,YAAM,EAAE,CAAC;;AAGrB,QAAA,KAAKT,qCAAgB,CAAC,MAAM,EAAE;YAC7B,OAAOE,UAAI,CAAC,CAAG,EAAA,MAAM,CAAC,KAAK,CAAC,CAAG,CAAA,CAAA,CAAC;;AAGjC,QAAA,KAAKF,qCAAgB,CAAC,OAAO,EAAE;YAC9B,OAAOG,WAAK,CAAC,CAAG,EAAA,MAAM,CAAC,KAAK,CAAC,CAAG,CAAA,CAAA,CAAC;;;AAGpC;;;;"}
|
|
@@ -25,6 +25,7 @@ var getEntityColumns_utility = require('../../get-entity-columns.utility.js');
|
|
|
25
25
|
async function ApiControllerHandleRequestRelations(controllerMethod, properties, relationConfig, parameters) {
|
|
26
26
|
if (relationConfig?.shouldLoadRelations) {
|
|
27
27
|
for (const propertyName of getEntityColumns_utility.GetEntityColumns({ entity: properties.entity, shouldTakeRelationsOnly: true })) {
|
|
28
|
+
// @ts-expect-error
|
|
28
29
|
if (parameters[propertyName] !== undefined && typeof propertyName === "string") {
|
|
29
30
|
if (relationConfig.relationsLoadStrategy === loadRelationsStrategy_enum.EApiControllerLoadRelationsStrategy.MANUAL && !relationConfig.relationsToLoad.includes(propertyName)) {
|
|
30
31
|
continue;
|
|
@@ -62,6 +63,7 @@ async function ApiControllerHandleRequestRelations(controllerMethod, properties,
|
|
|
62
63
|
if (!entity) {
|
|
63
64
|
throw new common.BadRequestException(`Invalid ${String(propertyName)} ID`);
|
|
64
65
|
}
|
|
66
|
+
// @ts-expect-error
|
|
65
67
|
parameters[propertyName] = entity;
|
|
66
68
|
}
|
|
67
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-request-relations.utility.js","sources":["../../../../../../src/utility/api/controller/handle-request-relations.utility.ts"],"sourcesContent":[null],"names":["GetEntityColumns","EApiControllerLoadRelationsStrategy","ErrorException","ApiServiceBase","BadRequestException"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAYO,eAAe,mCAAmC,CAAI,gBAAyC,EAAE,UAAuC,EAAE,cAAgF,EAAE,UAAuE,EAAA;AACzS,IAAA,IAAI,cAAc,EAAE,mBAAmB,EAAE;AACxC,QAAA,KAAK,MAAM,YAAY,IAAIA,yCAAgB,CAAI,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,uBAAuB,EAAE,IAAI,EAAE,CAAC,EAAE
|
|
1
|
+
{"version":3,"file":"handle-request-relations.utility.js","sources":["../../../../../../src/utility/api/controller/handle-request-relations.utility.ts"],"sourcesContent":[null],"names":["GetEntityColumns","EApiControllerLoadRelationsStrategy","ErrorException","ApiServiceBase","BadRequestException"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAYO,eAAe,mCAAmC,CAAI,gBAAyC,EAAE,UAAuC,EAAE,cAAgF,EAAE,UAAuE,EAAA;AACzS,IAAA,IAAI,cAAc,EAAE,mBAAmB,EAAE;AACxC,QAAA,KAAK,MA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YC,gCAAc,CAAC,EAAE;AACzC,oBAAA,MAAMD,qCAAc,CAAC,CAAA,QAAA,EAAW,WAAqB,CAAA,qCAAA,CAAuC,CAAC;;AAG9F,gBAAA,MAAM,iBAAiB,GAAiC;AACvD,oBAAA,KAAK,EAAE;AACN,wBAAA,EAAE,EAAE,UAAU,CAAC,YAAY,CAAC;AACL,qBAAA;iBACxB;gBAED,MAAM,MAAM,IAAyB,MAAM,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAwB;gBAEjG,IAAI,CAAC,MAAM,EAAE;oBACZ,MAAM,IAAIE,0BAAmB,CAAC,CAAW,QAAA,EAAA,MAAM,CAAC,YAAY,CAAC,CAAK,GAAA,CAAA,CAAC;;;AAIpE,gBAAA,UAAU,CAAC,YAAY,CAAC,GAAG,MAAM;;;;AAIrC;;;;"}
|
|
@@ -57,9 +57,12 @@ function ApiControllerWriteDtoSwagger(target, entity, properties, method, routeC
|
|
|
57
57
|
const relationClass = class GeneratedDTO {
|
|
58
58
|
constructor() {
|
|
59
59
|
Object.defineProperty(this, "id", {
|
|
60
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
60
61
|
configurable: true,
|
|
62
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
61
63
|
enumerable: true,
|
|
62
64
|
value: undefined,
|
|
65
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
63
66
|
writable: true,
|
|
64
67
|
});
|
|
65
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-dto-swagger.utility.js","sources":["../../../../../../src/utility/api/controller/write-dto-swagger.utility.ts"],"sourcesContent":[null],"names":["DECORATORS","DtoGenerate","EApiDtoType","MetadataStorage","PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT","EApiPropertyDescribeType","CamelCaseString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcgB,SAAA,4BAA4B,CAAI,MAAc,EAAE,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AAE,OAAO,EAAE,WAAW,CAAC;AAE9F,IAAA,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;QAC1B,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACxC,YAAA,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC;AAEvB,YAAA,MAAM,OAAO,GAAoBC,qCAAe,CAAC,WAAW,EAAE;AAE9D,YAAA,MAAM,QAAQ,GAA0B,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,IAAI,IAAI,iBAAiB,CAAC;AAErG,YAAA,IAAI,QAAQ;gBACX,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;AACxC,oBAAA,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAGC,kEAAwC,CAAC,sBAAsB,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAGA,kEAAwC,CAAC,sBAAsB,CAAC,EAAE,IAAI,KAAKC,yCAAwB,CAAC,QAAQ,EAAE;wBACrN,MAAM,aAAa,GAAoC,MAAM,YAAY,CAAA;AACxE,4BAAA,WAAA,GAAA;AACC,gCAAA,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE
|
|
1
|
+
{"version":3,"file":"write-dto-swagger.utility.js","sources":["../../../../../../src/utility/api/controller/write-dto-swagger.utility.ts"],"sourcesContent":[null],"names":["DECORATORS","DtoGenerate","EApiDtoType","MetadataStorage","PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT","EApiPropertyDescribeType","CamelCaseString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcgB,SAAA,4BAA4B,CAAI,MAAc,EAAE,MAAqB,EAAE,UAAuC,EAAE,MAAqB,EAAE,WAA4D,EAAE,cAA6B,EAAA;AACjP,IAAA,MAAM,aAAa,IAAoB,OAAO,CAAC,WAAW,CAACA,oBAAU,CAAC,gBAAgB,EAAE,MAAM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FilterOrderByFromEntity(entity, entityMetadata, method, dtoType, fieldS
|
|
|
24
24
|
if (isAllowedType) {
|
|
25
25
|
for (const metadataColumn of entityMetadata.columns) {
|
|
26
26
|
const metadata = metadataColumn.metadata?.[propertyDescribe_constant.PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT.METADATA_PROPERTY_NAME];
|
|
27
|
+
// eslint-disable-next-line @elsikora/typescript/no-unsafe-member-access
|
|
27
28
|
const useAsFilter = metadata?.properties?.[method]?.[dtoType]?.useAsOrderByFilter ?? false;
|
|
28
29
|
if (metadataColumn.name == column.propertyName && metadata && (useAsFilter == undefined || useAsFilter)) {
|
|
29
30
|
const snakeUpperCase = column.propertyName
|
|
31
|
+
// eslint-disable-next-line @elsikora/unicorn/prefer-spread
|
|
30
32
|
.split("")
|
|
31
33
|
.map((char, index) => {
|
|
32
34
|
if (index > 0 && char === char.toUpperCase() && char !== char.toLowerCase()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-order-by-from-entity.utility.js","sources":["../../../../../src/utility/api/filter-order-by-from-entity.utility.ts"],"sourcesContent":[null],"names":["getMetadataArgsStorage","FILTER_API_INTERFACE_CONSTANT","PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT"],"mappings":";;;;;;;;AAeM,SAAU,uBAAuB,CAAI,MAAqB,EAAE,cAA6B,EAAE,MAAqB,EAAE,OAAoB,EAAE,aAAmD,EAAA;AAChM,IAAA,MAAM,QAAQ,GAAwBA,8BAAsB,EAAE;AAC9D,IAAA,MAAM,OAAO,GAA8B,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAA0B,KAAK,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC;IAE3H,IAAI,aAAa,EAAE;AAClB,QAAA,MAAM,YAAY,GAAgB,IAAI,GAAG,CAAS,OAAO,CAAC,GAAG,CAAC,CAAC,GAAuB,KAAK,GAAG,CAAC,YAAY,CAAC,CAAC;AAE7G,QAAA,KAAK,MAAM,KAAK,IAAI,aAAa,EAAE;YAClC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;AAC7B,gBAAA,MAAM,IAAI,KAAK,CAAC,UAAU,KAAK,CAAA,+BAAA,CAAiC,CAAC;;;;IAKpE,MAAM,WAAW,GAAqC,EAAE;AAExD,IAAA,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC7B,MAAM,UAAU,GAAmB,MAAM,CAAC,OAAO,EAAE,IAAsB,IAAK,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,CAAC,SAAmB,EAAE,MAAM,CAAC,YAAY,CAAmB;QAEnL,MAAM,aAAa,GAAY,CAAC,OAAO,UAAU,KAAK,UAAU,KAAK,UAAU,KAAK,MAAM,IAAI,UAAU,KAAK,MAAM,IAAI,UAAU,KAAK,IAAI,CAAC,MAAMC,6CAA6B,CAAC,gCAAgC,CAAC,QAAQ,CAAC,UAAoB,CAAC,KAAK,aAAa,KAAK,SAAS,IAAI,aAAa,CAAC,MAAM,CAAC,YAAmC,CAAC,KAAK,KAAK,CAAC,CAAC;QAEvV,IAAI,aAAa,EAAE;AAClB,YAAA,KAAK,MAAM,cAAc,IAAI,cAAc,CAAC,OAAO,EAAE;gBACpD,MAAM,QAAQ,GAAoC,cAAc,CAAC,QAAQ,GAAGC,kEAAwC,CAAC,sBAAsB,CAAoC
|
|
1
|
+
{"version":3,"file":"filter-order-by-from-entity.utility.js","sources":["../../../../../src/utility/api/filter-order-by-from-entity.utility.ts"],"sourcesContent":[null],"names":["getMetadataArgsStorage","FILTER_API_INTERFACE_CONSTANT","PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT"],"mappings":";;;;;;;;AAeM,SAAU,uBAAuB,CAAI,MAAqB,EAAE,cAA6B,EAAE,MAAqB,EAAE,OAAoB,EAAE,aAAmD,EAAA;AAChM,IAAA,MAAM,QAAQ,GAAwBA,8BAAsB,EAAE;AAC9D,IAAA,MAAM,OAAO,GAA8B,QAAQ,C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H,gBAAA,IAAI,cAAc,CAAC,IAAI,IAAI,MAAM,CAAC,YAAY,IAAI,QAAQ,KAAK,WAAW,IAAI,SAAS,IAAI,WAAW,CAAC,EAAE;AACxG,oBAAA,MAAM,cAAc,GAAW,MAAM,CAAC;;yBAEpC,KAAK,CAAC,EAAE;AACR,yBAAA,GAAG,CAAC,CAAC,IAAY,EAAE,KAAa,KAAY;AAC5C,wBAAA,IAAI,KAAK,GAAG,CAAC,IAAI,IAAI,KAAK,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,KAAK,IAAI,CAAC,WAAW,EAAE,EAAE;4BAC5E,OAAO,GAAG,GAAG,IAAI;;AAGlB,wBAAA,OAAO,IAAI;AACZ,qBAAC;yBACA,IAAI,CAAC,EAAE;AACP,yBAAA,WAAW,EAAE;AAEf,oBAAA,WAAW,CAAC,cAAwD,CAAC,GAAG,MAAM,CAAC,YAAY;;;;;AAM/F,IAAA,OAAO,WAAW;AACnB;;;;"}
|
|
@@ -21,6 +21,7 @@ var getDecoratorConfig_utility = require('./get-decorator-config.utility.js');
|
|
|
21
21
|
var handleDateProperty_utility = require('./handle-date-property.utility.js');
|
|
22
22
|
var isPropertyExposedForGuard_utility = require('./is-property-exposed-for-guard.utility.js');
|
|
23
23
|
|
|
24
|
+
// eslint-disable-next-line @elsikora/typescript/no-unnecessary-type-parameters
|
|
24
25
|
function DtoBuildDecorator(method, propertyMetadata, entity, dtoType, propertyName, currentGuard) {
|
|
25
26
|
const properties = propertyMetadata.properties?.[method];
|
|
26
27
|
if (properties?.[dtoType]?.isEnabled === false || (properties?.[dtoType]?.isResponse && properties?.[dtoType]?.isExpose === false)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-decorator.utility.js","sources":["../../../../../src/utility/dto/build-decorator.utility.ts"],"sourcesContent":[null],"names":["DtoIsPropertyExposedForGuard","EApiPropertyDescribeType","EApiRouteType","EApiDtoType","DtoHandleDateProperty","DtoGetDecoratorConfig","DtoGenerateDecorator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"build-decorator.utility.js","sources":["../../../../../src/utility/dto/build-decorator.utility.ts"],"sourcesContent":[null],"names":["DtoIsPropertyExposedForGuard","EApiPropertyDescribeType","EApiRouteType","EApiDtoType","DtoHandleDateProperty","DtoGetDecoratorConfig","DtoGenerateDecorator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAcA;AACgB,SAAA,iBAAiB,CAAoD,MAAS,EAAE,gBAAgD,EAAE,MAAqB,EAAE,OAAU,EAAE,YAAoB,EAAE,YAA+B,EAAA;IAKzO,MAAM,UAAU,GAA2C,gBAAgB,CAAC,UAAU,GAAG,MAAM,CAA2C;AAE1I,IAAA,IAAI,UAAU,GAAG,OAAO,CAAC,EAAE,SAAS,KAAK,KAAK,KAAK,UAAU,GAAG,OAAO,CAAC,EAAE,UAAU,IAAI,UAAU,GAAG,OAAO,CAAC,EAAE,QAAQ,KAAK,KAAK,CAAC,EAAE;AACnI,QAAA,OAAO,SAAS;;AAGjB,IAAA,IAAI,CAACA,8DAA4B,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE;AACnF,QAAA,OAAO,SAAS;;IAGjB,IAAI,gBAAgB,CAAC,IAAI,KAAKC,yCAAwB,CAAC,IAAI,EAAE;QAC5D,MAAM,YAAY,GAAuC,gBAAgB;QAEzE,IAAI,CAAC,MAAM,KAAKC,4BAAa,CAAC,MAAM,IAAI,MAAM,KAAKA,4BAAa,CAAC,cAAc,KAAK,OAAO,KAAKC,wBAAW,CAAC,IAAI,EAAE;AACjH,YAAA,OAAO,SAAS;;AAGjB,QAAA,IAAI,MAAM,KAAKD,4BAAa,CAAC,QAAQ,IAAI,OAAO,KAAKC,wBAAW,CAAC,KAAK,EAAE;YACvE,MAAM,cAAc,GAAoEC,gDAAqB,CAAC,YAAY,EAAE,YAAY,CAAC,UAAU,CAAC;AAEpJ,YAAA,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC,QAAkE,KAAI;AAChG,gBAAA,MAAM,WAAW,GAAmC,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,UAAU,EAAE;AACxG,gBAAA,MAAM,MAAM,GAAsCC,gDAAqB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC;AAEpH,gBAAA,OAAOC,8CAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC;AACxF,aAAC,CAAC;;;AAIJ,IAAA,MAAM,MAAM,GAAsCD,gDAAqB,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAqB,CAAC;AAExH,IAAA,OAAO,CAACC,8CAAoB,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;AAC/F;;;;"}
|
|
@@ -25,12 +25,14 @@ function DtoGenerateFilterDecorator(metadata, entity) {
|
|
|
25
25
|
return enum_decorator.ApiPropertyEnum({ description: metadata.description, entity, enum: filterOperation_enum.EFilterOperationBoolean, isRequired: false });
|
|
26
26
|
}
|
|
27
27
|
case desribeType_enum.EApiPropertyDescribeType.DATE: {
|
|
28
|
+
// @ts-ignore
|
|
28
29
|
return enum_decorator.ApiPropertyEnum({ entity, enum: filterOperation_enum.EFilterOperationDate, isRequired: false });
|
|
29
30
|
}
|
|
30
31
|
case desribeType_enum.EApiPropertyDescribeType.ENUM: {
|
|
31
32
|
return enum_decorator.ApiPropertyEnum({ description: metadata.description, entity, enum: filterOperation_enum.EFilterOperationEnum, isRequired: false });
|
|
32
33
|
}
|
|
33
34
|
case desribeType_enum.EApiPropertyDescribeType.NUMBER: {
|
|
35
|
+
// @ts-ignore
|
|
34
36
|
return enum_decorator.ApiPropertyEnum({ description: metadata.description, entity, enum: filterOperation_enum.EFilterOperationNumber, isRequired: false });
|
|
35
37
|
}
|
|
36
38
|
case desribeType_enum.EApiPropertyDescribeType.OBJECT: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-filter-decorator.utility.js","sources":["../../../../../src/utility/dto/generate-filter-decorator.utility.ts"],"sourcesContent":[null],"names":["EApiPropertyDescribeType","ApiPropertyEnum","EFilterOperationBoolean","EFilterOperationDate","EFilterOperationEnum","EFilterOperationNumber","EFilterOperationObject","EFilterOperationRelation","EFilterOperationString","EFilterOperationUuid"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOgB,SAAA,0BAA0B,CAAI,QAAwC,EAAE,MAAqB,EAAA;AAC5G,IAAA,QAAQ,QAAQ,CAAC,IAAI;AACpB,QAAA,KAAKA,yCAAwB,CAAC,OAAO,EAAE;YACtC,OAAOC,8BAAe,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAEC,4CAAuB,EAAuC,UAAU,EAAE,KAAK,EAAE,CAAC;;AAG7J,QAAA,KAAKF,yCAAwB,CAAC,IAAI,EAAE
|
|
1
|
+
{"version":3,"file":"generate-filter-decorator.utility.js","sources":["../../../../../src/utility/dto/generate-filter-decorator.utility.ts"],"sourcesContent":[null],"names":["EApiPropertyDescribeType","ApiPropertyEnum","EFilterOperationBoolean","EFilterOperationDate","EFilterOperationEnum","EFilterOperationNumber","EFilterOperationObject","EFilterOperationRelation","EFilterOperationString","EFilterOperationUuid"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOgB,SAAA,0BAA0B,CAAI,QAAwC,EAAE,MAAqB,EAAA;AAC5G,IAAA,QAAQ,QAAQ,CAAC,IAAI;AACpB,QAAA,KAAKA,yCAAwB,CAAC,OAAO,EAAE;YACtC,OAAOC,8BAAe,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAEC,4CAAuB,EAAuC,UAAU,EAAE,KAAK,EAAE,CAAC;;AAG7J,QAAA,KAAKF,yCAAw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oB,EAAoC,UAAU,EAAE,KAAK,EAAE,CAAC;;;AAGzJ;;;;"}
|
|
@@ -55,29 +55,41 @@ function DtoGenerate(entity, entityMetadata, method, dtoType, dtoConfig, current
|
|
|
55
55
|
for (const property of markedProperties) {
|
|
56
56
|
if (method === routeType_enum.EApiRouteType.GET_LIST && dtoType === dtoType_enum.EApiDtoType.QUERY) {
|
|
57
57
|
Object.defineProperty(this, `${property.name}[value]`, {
|
|
58
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
58
59
|
configurable: true,
|
|
60
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
59
61
|
enumerable: true,
|
|
60
62
|
value: undefined,
|
|
63
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
61
64
|
writable: true,
|
|
62
65
|
});
|
|
63
66
|
Object.defineProperty(this, `${property.name}[values]`, {
|
|
67
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
64
68
|
configurable: true,
|
|
69
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
65
70
|
enumerable: true,
|
|
66
71
|
value: undefined,
|
|
72
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
67
73
|
writable: true,
|
|
68
74
|
});
|
|
69
75
|
Object.defineProperty(this, `${property.name}[operator]`, {
|
|
76
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
70
77
|
configurable: true,
|
|
78
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
71
79
|
enumerable: true,
|
|
72
80
|
value: undefined,
|
|
81
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
73
82
|
writable: true,
|
|
74
83
|
});
|
|
75
84
|
}
|
|
76
85
|
else {
|
|
77
86
|
Object.defineProperty(this, property.name, {
|
|
87
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
78
88
|
configurable: true,
|
|
89
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
79
90
|
enumerable: true,
|
|
80
91
|
value: undefined,
|
|
92
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
81
93
|
writable: true,
|
|
82
94
|
});
|
|
83
95
|
}
|
|
@@ -98,6 +110,7 @@ function DtoGenerate(entity, entityMetadata, method, dtoType, dtoConfig, current
|
|
|
98
110
|
}
|
|
99
111
|
}
|
|
100
112
|
if (method === routeType_enum.EApiRouteType.GET_LIST && dtoType === dtoType_enum.EApiDtoType.QUERY) {
|
|
113
|
+
// @ts-ignore
|
|
101
114
|
const metadataArray = { ...property.metadata, isArray: true, isUniqueItems: false, maxItems: generate_constant.DTO_GENERATE_CONSTANT.MAXIMUM_FILTER_PROPERTIES, minItems: generate_constant.DTO_GENERATE_CONSTANT.MINIMUM_FILTER_PROPERTIES };
|
|
102
115
|
const decoratorsArray = buildDecorator_utility.DtoBuildDecorator(method, metadataArray, entityMetadata, dtoType, property.name, currentGuard);
|
|
103
116
|
if (decoratorsArray) {
|
|
@@ -114,11 +127,14 @@ function DtoGenerate(entity, entityMetadata, method, dtoType, dtoConfig, current
|
|
|
114
127
|
}
|
|
115
128
|
if (method === routeType_enum.EApiRouteType.GET_LIST && dtoType === dtoType_enum.EApiDtoType.QUERY) {
|
|
116
129
|
Object.defineProperty(GeneratedDTO.prototype, "object", {
|
|
130
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
117
131
|
configurable: true,
|
|
132
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
118
133
|
enumerable: true,
|
|
119
134
|
value: function () {
|
|
120
135
|
return this;
|
|
121
136
|
},
|
|
137
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
122
138
|
writable: true,
|
|
123
139
|
});
|
|
124
140
|
classValidator.Validate(hasPairedCustomSuffixesFields_validator.HasPairedCustomSuffixesFields, ["operator", ["value", "values"]])(GeneratedDTO.prototype, "object");
|
|
@@ -126,6 +142,7 @@ function DtoGenerate(entity, entityMetadata, method, dtoType, dtoConfig, current
|
|
|
126
142
|
Object.defineProperty(GeneratedDTO, "name", {
|
|
127
143
|
value: `${entityMetadata.name ?? "UnknownResource"}${camelCaseString_utility.CamelCaseString(method)}${camelCaseString_utility.CamelCaseString(dtoType)}ItemsDTO`,
|
|
128
144
|
});
|
|
145
|
+
// @ts-ignore
|
|
129
146
|
return method === routeType_enum.EApiRouteType.GET_LIST && dtoType === dtoType_enum.EApiDtoType.RESPONSE ? generateGetListResponse_utility.DtoGenerateGetListResponse(entity, GeneratedDTO, `${entityMetadata.name ?? "UnknownResource"}${camelCaseString_utility.CamelCaseString(method)}${camelCaseString_utility.CamelCaseString(dtoType)}DTO`) : GeneratedDTO;
|
|
130
147
|
}
|
|
131
148
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.utility.js","sources":["../../../../../src/utility/dto/generate.utility.ts"],"sourcesContent":[null],"names":["DtoIsShouldBeGenerated","PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT","ErrorException","DtoIsPropertyShouldBeMarked","EApiRouteType","EApiDtoType","DtoGetGetListQueryBaseClass","DtoBuildDecorator","DtoGenerateFilterDecorator","DTO_GENERATE_CONSTANT","Validate","HasPairedCustomSuffixesFields","CamelCaseString","DtoGenerateGetListResponse"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBgB,SAAA,WAAW,CAAI,MAAqB,EAAE,cAA6B,EAAE,MAAqB,EAAE,OAAoB,EAAE,SAAsD,EAAE,YAA+B,EAAA;IACxN,IAAI,CAACA,kDAAsB,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;AAC7C,QAAA,OAAO,SAAS;;AAGjB,IAAA,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,QAAQ,GAAGC,kEAAwC,CAAC,sBAAsB,CAAC,EAAE;QAC5G,MAAMC,qCAAc,CAAC,CAAA,uBAAA,EAA0B,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAgC,8BAAA,CAAA,CAAC;;IAG5G,MAAM,gBAAgB,GAIjB,EAAE;AAEP,IAAA,KAAK,MAAM,MAAM,IAAI,cAAc,CAAC,OAAO,EAAE;AAC5C,QAAA,IAAI,MAAM,CAAC,QAAQ,GAAGD,kEAAwC,CAAC,sBAAsB,CAAC,IAAIE,4DAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,IAAc,EAAE,MAAM,CAAC,QAAQ,CAACF,kEAAwC,CAAC,sBAAsB,CAAmC,EAAE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE;YAClT,gBAAgB,CAAC,IAAI,CAAC;gBACrB,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAACA,kEAAwC,CAAC,sBAAsB,CAAmC;gBAC5H,IAAI,EAAE,MAAM,CAAC,IAAI;AACjB,aAAA,CAAC;;;AAGJ,IAAA,MAAM,SAAS,GAAS,MAAM,KAAKG,4BAAa,CAAC,QAAQ,IAAI,OAAO,KAAKC,wBAAW,CAAC,KAAK,GAAGC,4DAA2B,CAAI,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,GAAG,MAAA;KAAQ;IAE/K,MAAM,YAAa,SAAQ,SAAS,CAAA;AACnC,QAAA,WAAA,GAAA;AACC,YAAA,KAAK,EAAE;AAEP,YAAA,KAAK,MAAM,QAAQ,IAAI,gBAAgB,EAAE;AACxC,gBAAA,IAAI,MAAM,KAAKF,4BAAa,CAAC,QAAQ,IAAI,OAAO,KAAKC,wBAAW,CAAC,KAAK,EAAE;oBACvE,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,QAAQ,CAAC,IAAc,CAAA,OAAA,CAAS,EAAE
|
|
1
|
+
{"version":3,"file":"generate.utility.js","sources":["../../../../../src/utility/dto/generate.utility.ts"],"sourcesContent":[null],"names":["DtoIsShouldBeGenerated","PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT","ErrorException","DtoIsPropertyShouldBeMarked","EApiRouteType","EApiDtoType","DtoGetGetListQueryBaseClass","DtoBuildDecorator","DtoGenerateFilterDecorator","DTO_GENERATE_CONSTANT","Validate","HasPairedCustomSuffixesFields","CamelCaseString","DtoGenerateGetListResponse"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBgB,SAAA,WAAW,CAAI,MAAqB,EAAE,cAA6B,EAAE,MAAqB,EAAE,OAAoB,EAAE,SAAsD,EAAE,YAA+B,EAAA;IACxN,IAAI,CAACA,kDAAsB,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;AAC7C,QAAA,OAAO,SAAS;;AAGjB,IAAA,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,QAAQ,GAAGC,kEAAwC,CAAC,sBAAsB,CAAC,EAAE;QAC5G,MAAMC,qCAAc,CAAC,CAAA,uBAAA,EAA0B,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAgC,8BAAA,CAAA,CAAC;;IAG5G,MAAM,gBAAgB,GAIjB,EAAE;AAEP,IAAA,KAAK,MAAM,MAAM,IAAI,cAAc,CAAC,OAAO,EAAE;AAC5C,QAAA,IAAI,MAAM,CAAC,QAAQ,GAAGD,kEAAwC,CAAC,sBAAsB,CAAC,IAAIE,4DAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,IAAc,EAAE,MAAM,CAAC,QAAQ,CAACF,kEAAwC,CAAC,sBAAsB,CAAmC,EAAE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE;YAClT,gBAAgB,CAAC,IAAI,CAAC;gBACrB,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAACA,kEAAwC,CAAC,sBAAsB,CAAmC;gBAC5H,IAAI,EAAE,MAAM,CAAC,IAAI;AACjB,aAAA,CAAC;;;AAGJ,IAAA,MAAM,SAAS,GAAS,MAAM,KAAKG,4BAAa,CAAC,QAAQ,IAAI,OAAO,KAAKC,wBAAW,CAA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GAAGQ,0DAA0B,CAAC,MAAM,EAAE,YAAY,EAAE,CAAA,EAAG,cAAc,CAAC,IAAI,IAAI,iBAAiB,GAAGD,uCAAe,CAAC,MAAM,CAAC,CAAA,EAAGA,uCAAe,CAAC,OAAO,CAAC,CAAK,GAAA,CAAA,CAAC,GAAG,YAAY;AACtP;;;;"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var constant = require('../../constant/utility/dto/constant.js');
|
|
4
4
|
|
|
5
|
+
// eslint-disable-next-line @elsikora/typescript/no-unnecessary-type-parameters
|
|
5
6
|
const DtoGetDecoratorConfig = (method, metadata, dtoType, propertyName) => {
|
|
6
7
|
const strategy = constant.DTO_UTILITY_CONSTANT.DTO_STRATEGIES[dtoType];
|
|
7
8
|
if (!strategy) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-decorator-config.utility.js","sources":["../../../../../src/utility/dto/get-decorator-config.utility.ts"],"sourcesContent":[null],"names":["DTO_UTILITY_CONSTANT"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"get-decorator-config.utility.js","sources":["../../../../../src/utility/dto/get-decorator-config.utility.ts"],"sourcesContent":[null],"names":["DTO_UTILITY_CONSTANT"],"mappings":";;;;AAQA;AACO,MAAM,qBAAqB,GAAG,CAAiD,MAAS,EAAE,QAAwC,EAAE,OAAU,EAAE,YAAoB,KAAuC;IACjN,MAAM,QAAQ,GAAyCA,6BAAoB,CAAC,cAAc,CAAC,OAAO,CAAC;IAEnG,IAAI,CAAC,QAAQ,EAAE;AACd,QAAA,MAAM,IAAI,KAAK,CAAC,oBAAoB,OAAO,CAAA,CAAE,CAAC;;IAG/C,IAAI,MAAM,GAAsC,QAAQ,CAAC,kBAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC;IAK7F,MAAM,UAAU,GAA2C,QAAQ,CAAC,UAAU,GAAG,MAAM,CAA2C;AAElI,IAAA,IAAI,UAAU,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE;AACtC,QAAA,MAAM,YAAY,GAAkC,UAAU,CAAC,OAAO,CAAC;QAGvE,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,YAAY,EAAE;;AAGxC,IAAA,OAAO,MAAM;AACd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-property-config.utility.js","sources":["../../../../../src/utility/dto/validate-property-config.utility.ts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"validate-property-config.utility.js","sources":["../../../../../src/utility/dto/validate-property-config.utility.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;AACO,MAAM,yBAAyB,GAAG,CAAC,OAA0C,EAAE,aAAqB,KAAY;;;;"}
|
|
@@ -28,6 +28,7 @@ function GenerateEntityInformation(entity) {
|
|
|
28
28
|
tableName: "",
|
|
29
29
|
};
|
|
30
30
|
generatedEntity.tableName = (() => {
|
|
31
|
+
// eslint-disable-next-line @elsikora/typescript/no-unsafe-function-type
|
|
31
32
|
const table = typeorm.getMetadataArgsStorage().tables.find(({ target }) => target.name === entity.name);
|
|
32
33
|
if (!table) {
|
|
33
34
|
throw errorException_utility.ErrorException(`Table for entity ${String(entity.name)} not found in metadata storage`);
|
|
@@ -42,6 +43,7 @@ function GenerateEntityInformation(entity) {
|
|
|
42
43
|
return namingStrategy(discriminatorValue.value);
|
|
43
44
|
}
|
|
44
45
|
else {
|
|
46
|
+
// eslint-disable-next-line @elsikora/typescript/no-unsafe-argument,@elsikora/typescript/no-unsafe-member-access
|
|
45
47
|
return namingStrategy(discriminatorValue.value?.name);
|
|
46
48
|
}
|
|
47
49
|
}
|
|
@@ -49,13 +51,16 @@ function GenerateEntityInformation(entity) {
|
|
|
49
51
|
})();
|
|
50
52
|
generatedEntity.name = entity.name;
|
|
51
53
|
const storage = metadataStorage_class.MetadataStorage.getInstance();
|
|
54
|
+
// eslint-disable-next-line @elsikora/typescript/no-unsafe-function-type
|
|
52
55
|
const columnList = typeorm.getMetadataArgsStorage().columns.filter(({ target }) => target.name === entity.name);
|
|
56
|
+
// eslint-disable-next-line @elsikora/typescript/no-unsafe-function-type
|
|
53
57
|
const relationList = typeorm.getMetadataArgsStorage().relations.filter(({ target }) => target.name === entity.name);
|
|
54
58
|
const entityColumns = [
|
|
55
59
|
...columnList.map(({ options, propertyName }) => ({
|
|
56
60
|
isPrimary: Boolean(options.primary),
|
|
57
61
|
metadata: storage.getMetadata(entity.name ?? "UnknownResource", propertyName) || undefined,
|
|
58
62
|
name: propertyName,
|
|
63
|
+
// eslint-disable-next-line @elsikora/typescript/no-non-null-assertion
|
|
59
64
|
type: options.type,
|
|
60
65
|
})),
|
|
61
66
|
...relationList.map(({ propertyName, relationType }) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-entity-information.utility.js","sources":["../../../../src/utility/generate-entity-information.utility.ts"],"sourcesContent":[null],"names":["getMetadataArgsStorage","ErrorException","DefaultNamingStrategy","MetadataStorage"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAcM,SAAU,yBAAyB,CAAI,MAAsB,EAAA;AAClE,IAAA,MAAM,eAAe,GAAkB;AACtC,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,UAAU,EAAE,SAAS;AACrB,QAAA,SAAS,EAAE,EAAE;KACb;AAED,IAAA,eAAe,CAAC,SAAS,GAAG,CAAC,MAAa
|
|
1
|
+
{"version":3,"file":"generate-entity-information.utility.js","sources":["../../../../src/utility/generate-entity-information.utility.ts"],"sourcesContent":[null],"names":["getMetadataArgsStorage","ErrorException","DefaultNamingStrategy","MetadataStorage"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAcM,SAAU,yBAAyB,CAAI,MAAsB,EAAA;AAClE,IAAA,MAAM,eAAe,GAAkB;AACtC,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,UAAU,EAAE,SAAS;AACrB,QAA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,eAAe;AACvB;;;;"}
|
|
@@ -11,6 +11,7 @@ function GetEntityColumns(properties) {
|
|
|
11
11
|
columnNames = relations.map((relation) => relation.propertyName);
|
|
12
12
|
}
|
|
13
13
|
else {
|
|
14
|
+
// eslint-disable-next-line @elsikora/typescript/prefer-nullish-coalescing
|
|
14
15
|
const columnPropertyNames = columns.filter((column) => !shouldTakeGeneratedOnly || column.options.generated || column.options.default !== undefined).map((column) => column.propertyName);
|
|
15
16
|
const relationNames = relations.map((relation) => relation.propertyName);
|
|
16
17
|
columnNames = [...columnPropertyNames, ...relationNames];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-entity-columns.utility.js","sources":["../../../../src/utility/get-entity-columns.utility.ts"],"sourcesContent":[null],"names":["getMetadataArgsStorage"],"mappings":";;;;AAOM,SAAU,gBAAgB,CAAI,UAAuC,EAAA;IAC1E,MAAM,EAAE,MAAM,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,GAAgC,UAAU;IAE5G,MAAM,OAAO,GAA8BA,8BAAsB,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAA0B,KAAK,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC;IAE3I,MAAM,SAAS,GAAgCA,8BAAsB,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,QAA8B,KAAK,QAAQ,CAAC,MAAM,IAAI,MAAM,CAAC;AAEvJ,IAAA,IAAI,WAA2B;IAE/B,IAAI,uBAAuB,EAAE;AAC5B,QAAA,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,QAA8B,KAAK,QAAQ,CAAC,YAAY,CAAmB;;SAClG
|
|
1
|
+
{"version":3,"file":"get-entity-columns.utility.js","sources":["../../../../src/utility/get-entity-columns.utility.ts"],"sourcesContent":[null],"names":["getMetadataArgsStorage"],"mappings":";;;;AAOM,SAAU,gBAAgB,CAAI,UAAuC,EAAA;IAC1E,MAAM,EAAE,MAAM,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,GAAgC,UAAU;IAE5G,MAAM,OAAO,GAA8BA,8BAAsB,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAA0B,KAAK,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC;IAE3I,MAAM,SAAS,GAAgCA,8BAAsB,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,QAA8B,KAAK,QAAQ,CAAC,MAAM,IAAI,MAAM,CAAC;AAEvJ,IAAA,IAAI,WAA2B;IAE/B,IAAI,uBAAuB,EAAE;AAC5B,QAAA,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,QAA8B,KAAK,QAAQ,CAAC,YAAY,CAAmB;;SAClG;;AAEN,QAAA,MAAM,mBAAmB,GAAmB,OAAO,CAAC,MAAM,CAAC,CAAC,MAA0B,KAAK,CAAC,uBAAuB,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,MAA0B,KAAK,MAAM,CAAC,YAAY,CAAmB;AAEnQ,QAAA,MAAM,aAAa,GAAmB,SAAS,CAAC,GAAG,CAAC,CAAC,QAA8B,KAAK,QAAQ,CAAC,YAAY,CAAmB;QAEhI,WAAW,GAAG,CAAC,GAAG,mBAAmB,EAAE,GAAG,aAAa,CAAC;;AAGzD,IAAA,OAAO,WAAW;AACnB;;;;"}
|
|
@@ -19,6 +19,7 @@ var exception_enum = require('../enum/exception.enum.js');
|
|
|
19
19
|
require('../enum/filter-order-direction.enum.js');
|
|
20
20
|
require('../enum/utility/error-string-action.enum.js');
|
|
21
21
|
|
|
22
|
+
/* eslint-disable @elsikora/sonar/todo-tag */
|
|
22
23
|
const ExceptionMap = {
|
|
23
24
|
[exception_enum.EException.BAD_REQUEST]: common.BadRequestException,
|
|
24
25
|
[exception_enum.EException.CONFLICT]: common.ConflictException,
|
|
@@ -57,6 +58,7 @@ function IsErrorOfType(error, type) {
|
|
|
57
58
|
if (!error || typeof error !== "object") {
|
|
58
59
|
return false;
|
|
59
60
|
}
|
|
61
|
+
// @ts-ignore
|
|
60
62
|
if (error instanceof ExceptionClass) {
|
|
61
63
|
return true;
|
|
62
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-error-of-type.utility.js","sources":["../../../../src/utility/is-error-of-type.utility.ts"],"sourcesContent":[null],"names":["EException","BadRequestException","ConflictException","ForbiddenException","GatewayTimeoutException","GoneException","HttpVersionNotSupportedException","ImATeapotException","InternalServerErrorException","MethodNotAllowedException","NotAcceptableException","NotFoundException","NotImplementedException","PayloadTooLargeException","PreconditionFailedException","RequestTimeoutException","ServiceUnavailableException","ThrottlerException","UnauthorizedException","UnprocessableEntityException","UnsupportedMediaTypeException"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,YAAY,GAA4B;AAC7C,IAAA,CAACA,yBAAU,CAAC,WAAW,GAAGC,0BAAmB;AAC7C,IAAA,CAACD,yBAAU,CAAC,QAAQ,GAAGE,wBAAiB;AACxC,IAAA,CAACF,yBAAU,CAAC,kBAAkB,GAAG,SAAS;AAC1C,IAAA,CAACA,yBAAU,CAAC,SAAS,GAAGG,yBAAkB;AAC1C,IAAA,CAACH,yBAAU,CAAC,eAAe,GAAGI,8BAAuB;AACrD,IAAA,CAACJ,yBAAU,CAAC,IAAI,GAAGK,oBAAa;AAChC,IAAA,CAACL,yBAAU,CAAC,0BAA0B,GAAGM,uCAAgC;AACzE,IAAA,CAACN,yBAAU,CAAC,WAAW,GAAGO,yBAAkB;AAC5C,IAAA,CAACP,yBAAU,CAAC,qBAAqB,GAAGQ,mCAA4B;AAChE,IAAA,CAACR,yBAAU,CAAC,eAAe,GAAG,SAAS;AACvC,IAAA,CAACA,yBAAU,CAAC,kBAAkB,GAAGS,gCAAyB;AAC1D,IAAA,CAACT,yBAAU,CAAC,+BAA+B,GAAG,SAAS;AACvD,IAAA,CAACA,yBAAU,CAAC,cAAc,GAAGU,6BAAsB;AACnD,IAAA,CAACV,yBAAU,CAAC,YAAY,GAAG,SAAS;AACpC,IAAA,CAACA,yBAAU,CAAC,SAAS,GAAGW,wBAAiB;AACzC,IAAA,CAACX,yBAAU,CAAC,eAAe,GAAGY,8BAAuB;AACrD,IAAA,CAACZ,yBAAU,CAAC,iBAAiB,GAAGa,+BAAwB;AACxD,IAAA,CAACb,yBAAU,CAAC,gBAAgB,GAAG,SAAS;AACxC,IAAA,CAACA,yBAAU,CAAC,mBAAmB,GAAGc,kCAA2B;AAC7D,IAAA,CAACd,yBAAU,CAAC,+BAA+B,GAAG,SAAS;AACvD,IAAA,CAACA,yBAAU,CAAC,eAAe,GAAGe,8BAAuB;AACrD,IAAA,CAACf,yBAAU,CAAC,oBAAoB,GAAG,SAAS;AAC5C,IAAA,CAACA,yBAAU,CAAC,mBAAmB,GAAGgB,kCAA2B;AAC7D,IAAA,CAAChB,yBAAU,CAAC,iBAAiB,GAAGiB,4BAAkB;AAClD,IAAA,CAACjB,yBAAU,CAAC,YAAY,GAAGkB,4BAAqB;AAChD,IAAA,CAAClB,yBAAU,CAAC,oBAAoB,GAAGmB,mCAA4B;AAC/D,IAAA,CAACnB,yBAAU,CAAC,sBAAsB,GAAGoB,oCAA6B;AAClE,IAAA,CAACpB,yBAAU,CAAC,gBAAgB,GAAG,SAAS;CACxC;AAEe,SAAA,aAAa,CAAC,KAAc,EAAE,IAAgB,EAAA;AAC7D,IAAA,MAAM,cAAc,GAAkB,YAAY,CAAC,IAAI,CAAkB;IAEzE,IAAI,CAAC,cAAc,EAAE;AACpB,QAAA,OAAO,KAAK;;IAGb,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACxC,QAAA,OAAO,KAAK
|
|
1
|
+
{"version":3,"file":"is-error-of-type.utility.js","sources":["../../../../src/utility/is-error-of-type.utility.ts"],"sourcesContent":[null],"names":["EException","BadRequestException","ConflictException","ForbiddenException","GatewayTimeoutException","GoneException","HttpVersionNotSupportedException","ImATeapotException","InternalServerErrorException","MethodNotAllowedException","NotAcceptableException","NotFoundException","NotImplementedException","PayloadTooLargeException","PreconditionFailedException","RequestTimeoutException","ServiceUnavailableException","ThrottlerException","UnauthorizedException","UnprocessableEntityException","UnsupportedMediaTypeException"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AA+BA,MAAM,YAAY,GAA4B;AAC7C,IAAA,CAACA,yBAAU,CAAC,WAAW,GAAGC,0BAAmB;AAC7C,IAAA,CAACD,yBAAU,CAAC,QAAQ,GAAGE,wBAAiB;AACxC,IAAA,CAACF,yBAAU,CAAC,kBAAkB,GAAG,SAAS;AAC1C,IAAA,CAACA,yBAAU,CAAC,SAAS,GAAGG,yBAAkB;AAC1C,IAAA,CAACH,yBAAU,CAAC,eAAe,GAAGI,8BAAuB;AACrD,IAAA,CAACJ,yBAAU,CAAC,IAAI,GAAGK,oBAAa;AAChC,IAAA,CAACL,yBAAU,CAAC,0BAA0B,GAAGM,uCAAgC;AACzE,IAAA,CAACN,yBAAU,CAAC,WAAW,GAAGO,yBAAkB;AAC5C,IAAA,CAACP,yBAAU,CAAC,qBAAqB,GAAGQ,mCAA4B;AAChE,IAAA,CAACR,yBAAU,CAAC,eAAe,GAAG,SAAS;AACvC,IAAA,CAACA,yBAAU,CAAC,kBAAkB,GAAGS,gCAAyB;AAC1D,IAAA,CAACT,yBAAU,CAAC,+BAA+B,GAAG,SAAS;AACvD,IAAA,CAACA,yBAAU,CAAC,cAAc,GAAGU,6BAAsB;AACnD,IAAA,CAACV,yBAAU,CAAC,YAAY,GAAG,SAAS;AACpC,IAAA,CAACA,yBAAU,CAAC,SAAS,GAAGW,wBAAiB;AACzC,IAAA,CAACX,yBAAU,CAAC,eAAe,GAAGY,8BAAuB;AACrD,IAAA,CAACZ,yBAAU,CAAC,iBAAiB,GAAGa,+BAAwB;AACxD,IAAA,CAACb,yBAAU,CAAC,gBAAgB,GAAG,SAAS;AACxC,IAAA,CAACA,yBAAU,CAAC,mBAAmB,GAAGc,kCAA2B;AAC7D,IAAA,CAACd,yBAAU,CAAC,+BAA+B,GAAG,SAAS;AACvD,IAAA,CAACA,yBAAU,CAAC,eAAe,GAAGe,8BAAuB;AACrD,IAAA,CAACf,yBAAU,CAAC,oBAAoB,GAAG,SAAS;AAC5C,IAAA,CAACA,yBAAU,CAAC,mBAAmB,GAAGgB,kCAA2B;AAC7D,IAAA,CAAChB,yBAAU,CAAC,iBAAiB,GAAGiB,4BAAkB;AAClD,IAAA,CAACjB,yBAAU,CAAC,YAAY,GAAGkB,4BAAqB;AAChD,IAAA,CAAClB,yBAAU,CAAC,oBAAoB,GAAGmB,mCAA4B;AAC/D,IAAA,CAACnB,yBAAU,CAAC,sBAAsB,GAAGoB,oCAA6B;AAClE,IAAA,CAACpB,yBAAU,CAAC,gBAAgB,GAAG,SAAS;CACxC;AAEe,SAAA,aAAa,CAAC,KAAc,EAAE,IAAgB,EAAA;AAC7D,IAAA,MAAM,cAAc,GAAkB,YAAY,CAAC,IAAI,CAAkB;IAEzE,IAAI,CAAC,cAAc,EAAE;AACpB,QAAA,OAAO,KAAK;;IAGb,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACxC,QAAA,OAAO,KAAK;;;AAIb,IAAA,IAAI,KAAK,YAAY,cAAc,EAAE;AACpC,QAAA,OAAO,IAAI;;IAGZ,MAAM,WAAW,GAAsB,KAA0B;AAEjE,IAAA,OAAO,CAAC,EAAE,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI,CAAC;AACxE;;;;"}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { ConsoleLogger } from "@nestjs/common";
|
|
2
|
+
/**
|
|
3
|
+
* Custom logger that extends NestJS's ConsoleLogger with environment-based log level filtering
|
|
4
|
+
*/
|
|
2
5
|
export declare class LoggerUtility extends ConsoleLogger {
|
|
3
6
|
private static readonly ENV_LOG_LEVEL_KEY;
|
|
4
7
|
constructor(context?: string);
|
|
8
|
+
/**
|
|
9
|
+
* Static method to create a logger with a specific context
|
|
10
|
+
*/
|
|
5
11
|
static getLogger(context?: string): LoggerUtility;
|
|
12
|
+
/**
|
|
13
|
+
* Get the current log level from environment variable
|
|
14
|
+
*/
|
|
6
15
|
private static getLogLevelsFromEnv;
|
|
7
16
|
}
|