@elsikora/nestjs-crud-automator 1.7.0 → 1.8.0-dev.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/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,11 +1,12 @@
|
|
|
1
|
+
import type { EntityManager } from "typeorm";
|
|
1
2
|
import type { IApiGetListResponseResult } from "../../interface";
|
|
2
3
|
import type { TApiFunctionGetManyProperties, TApiFunctionUpdateCriteria } from "../../type";
|
|
3
4
|
import type { TApiFunctionCreateProperties, TApiFunctionDeleteCriteria, TApiFunctionGetListProperties, TApiFunctionGetProperties, TApiFunctionUpdateProperties } from "../../type";
|
|
4
5
|
export declare class ApiServiceBase<E> {
|
|
5
|
-
create(properties: TApiFunctionCreateProperties<E
|
|
6
|
-
delete(criteria: TApiFunctionDeleteCriteria<E
|
|
7
|
-
get(properties: TApiFunctionGetProperties<E
|
|
8
|
-
getList(properties: TApiFunctionGetListProperties<E
|
|
9
|
-
getMany(properties: TApiFunctionGetManyProperties<E
|
|
10
|
-
update(criteria: TApiFunctionUpdateCriteria<E>, properties: TApiFunctionUpdateProperties<E
|
|
6
|
+
create(properties: TApiFunctionCreateProperties<E>, eventManager?: EntityManager): Promise<E>;
|
|
7
|
+
delete(criteria: TApiFunctionDeleteCriteria<E>, eventManager?: EntityManager): Promise<void>;
|
|
8
|
+
get(properties: TApiFunctionGetProperties<E>, eventManager?: EntityManager): Promise<E>;
|
|
9
|
+
getList(properties: TApiFunctionGetListProperties<E>, eventManager?: EntityManager): Promise<IApiGetListResponseResult<E>>;
|
|
10
|
+
getMany(properties: TApiFunctionGetManyProperties<E>, eventManager?: EntityManager): Promise<Array<E>>;
|
|
11
|
+
update(criteria: TApiFunctionUpdateCriteria<E>, properties: TApiFunctionUpdateProperties<E>, eventManager?: EntityManager): Promise<E>;
|
|
11
12
|
}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
class ApiServiceBase {
|
|
4
|
-
create(properties) {
|
|
4
|
+
create(properties, eventManager) {
|
|
5
5
|
return Promise.resolve({});
|
|
6
6
|
}
|
|
7
|
-
delete(criteria) {
|
|
7
|
+
delete(criteria, eventManager) {
|
|
8
8
|
return Promise.resolve();
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
// eslint-disable-next-line @elsikora/sonar/no-identical-functions
|
|
11
|
+
get(properties, eventManager) {
|
|
11
12
|
return Promise.resolve({});
|
|
12
13
|
}
|
|
13
|
-
getList(properties) {
|
|
14
|
+
getList(properties, eventManager) {
|
|
14
15
|
return Promise.resolve({ items: [], total: 0 });
|
|
15
16
|
}
|
|
16
|
-
getMany(properties) {
|
|
17
|
+
getMany(properties, eventManager) {
|
|
17
18
|
return Promise.resolve([]);
|
|
18
19
|
}
|
|
19
|
-
update(criteria, properties) {
|
|
20
|
+
update(criteria, properties, eventManager) {
|
|
20
21
|
return Promise.resolve({});
|
|
21
22
|
}
|
|
22
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-base.class.js","sources":["../../../../../src/class/api/service-base.class.ts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"service-base.class.js","sources":["../../../../../src/class/api/service-base.class.ts"],"sourcesContent":[null],"names":[],"mappings":";;MAOa,cAAc,CAAA;IAC1B,MAAM,CAAC,UAA2C,EAAE,YAA4B,EAAA;AAI/E,QAAA,OAAO,OAAO,CAAC,OAAO,CAAC,EAAO,CAAC;;IAGhC,MAAM,CAAC,QAAuC,EAAE,YAA4B,EAAA;AAI3E,QAAA,OAAO,OAAO,CAAC,OAAO,EAAE;;;IAIzB,GAAG,CAAC,UAAwC,EAAE,YAA4B,EAAA;AAIzE,QAAA,OAAO,OAAO,CAAC,OAAO,CAAC,EAAO,CAAC;;IAGhC,OAAO,CAAC,UAA4C,EAAE,YAA4B,EAAA;AAIjF,QAAA,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAA6C,CAAC;;IAG3F,OAAO,CAAC,UAA4C,EAAE,YAA4B,EAAA;AAIjF,QAAA,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;;AAG3B,IAAA,MAAM,CAAC,QAAuC,EAAE,UAA2C,EAAE,YAA4B,EAAA;AAKxH,QAAA,OAAO,OAAO,CAAC,OAAO,CAAC,EAAO,CAAC;;AAEhC;;;;"}
|
|
@@ -36,10 +36,12 @@ class MetadataStorage {
|
|
|
36
36
|
if (!this.STORAGE.has(entityName)) {
|
|
37
37
|
this.STORAGE.set(entityName, new Map());
|
|
38
38
|
}
|
|
39
|
+
// eslint-disable-next-line @elsikora/typescript/no-non-null-assertion
|
|
39
40
|
const entityMetadata = this.STORAGE.get(entityName);
|
|
40
41
|
if (!entityMetadata.has(propertyName)) {
|
|
41
42
|
entityMetadata.set(propertyName, { [propertyDescribe_constant.PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT.METADATA_PROPERTY_NAME]: {} });
|
|
42
43
|
}
|
|
44
|
+
// eslint-disable-next-line @elsikora/typescript/no-non-null-assertion
|
|
43
45
|
const propertyMetadata = entityMetadata.get(propertyName);
|
|
44
46
|
propertyMetadata[key] = value;
|
|
45
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata-storage.class.js","sources":["../../../../src/class/metadata-storage.class.ts"],"sourcesContent":[null],"names":["PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT"],"mappings":";;;;;MAMa,eAAe,CAAA;IACnB,O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"version":3,"file":"metadata-storage.class.js","sources":["../../../../src/class/metadata-storage.class.ts"],"sourcesContent":[null],"names":["PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT"],"mappings":";;;;;MAMa,eAAe,CAAA;IACnB,OAAO,QAAQ;AAEN,IAAA,OAAO,GAA6C,IAAI,GAAG,EAAuC;AAE5G,IAAA,OAAO,WAAW,GAAA;AACxB,QAAA,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE;AAC9B,YAAA,eAAe,CAAC,QAAQ,GAAG,IAAI,eAAe,EAAE;;QAGjD,OAAO,eAAe,CAAC,QAAQ;;IAGzB,sBAAsB,GAAA;QAC5B,MAAM,MAAM,GAA8B,EAAE;AAE5C,QAAA,KAAK,MAAM,CAAC,UAAU,EAAE,cAAc,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YAClE,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC;;AAGxD,QAAA,OAAO,MAAM;;AAMP,IAAA,WAAW,CAAC,UAAkB,EAAE,YAAqB,EAAE,GAA0B,EAAA;QACvF,MAAM,cAAc,GAA4C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;AAE5F,QAAA,IAAI,CAAC,cAAc;AAAE,YAAA,OAAO,SAAS;AAErC,QAAA,IAAI,CAAC,YAAY;AAAE,YAAA,OAAO,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC;QAC5D,MAAM,gBAAgB,GAA+B,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC;AAErF,QAAA,IAAI,CAAC,gBAAgB;AAAE,YAAA,OAAO,SAAS;AAEvC,QAAA,IAAI,CAAC,GAAG;AAAE,YAAA,OAAO,gBAAgB;AAEjC,QAAA,OAAO,gBAAgB,CAAC,GAAG,CAAC;;AAGtB,IAAA,WAAW,CAAiC,UAAkB,EAAE,YAAoB,EAAE,GAAM,EAAE,KAAwB,EAAA;QAC5H,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;YAClC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,GAAG,EAAE,CAAC;;;QAGxC,MAAM,cAAc,GAAgC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAE;QAEjF,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE;AACtC,YAAA,cAAc,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAACA,kEAAwC,CAAC,sBAAsB,GAAG,EAAE,EAAE,CAAC;;;QAI5G,MAAM,gBAAgB,GAAmB,cAAc,CAAC,GAAG,CAAC,YAAY,CAAE;AAC1E,QAAA,gBAAgB,CAAC,GAAG,CAAC,GAAG,KAAK;;AAE9B;;;;"}
|
|
@@ -19,6 +19,7 @@ require('../../../../enum/utility/error-string-action.enum.js');
|
|
|
19
19
|
|
|
20
20
|
class DtoStrategyRequest {
|
|
21
21
|
getDecoratorConfig(method, _metadata) {
|
|
22
|
+
// eslint-disable-next-line @elsikora/sonar/no-all-duplicated-branches
|
|
22
23
|
switch (method) {
|
|
23
24
|
case routeType_enum.EApiRouteType.CREATE: {
|
|
24
25
|
return { isRequired: true };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.class.js","sources":["../../../../../../../src/class/utility/dto/strategy/request.class.ts"],"sourcesContent":[null],"names":["EApiRouteType"],"mappings":";;;;;;;;;;;;;;;;;;;MAKa,kBAAkB,CAAA;IAC9B,kBAAkB,CAAC,MAAqB,EAAE,SAAyC,EAAA
|
|
1
|
+
{"version":3,"file":"request.class.js","sources":["../../../../../../../src/class/utility/dto/strategy/request.class.ts"],"sourcesContent":[null],"names":["EApiRouteType"],"mappings":";;;;;;;;;;;;;;;;;;;MAKa,kBAAkB,CAAA;IAC9B,kBAAkB,CAAC,MAAqB,EAAE,SAAyC,EAAA;;QAElF,QAAQ,MAAM;AACb,YAAA,KAAKA,4BAAa,CAAC,MAAM,EAAE;AAC1B,gBAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;;AAG5B,YAAA,KAAKA,4BAAa,CAAC,MAAM,EAAE;AAC1B,gBAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;;AAG5B,YAAA,KAAKA,4BAAa,CAAC,GAAG,EAAE;AACvB,gBAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;;AAG5B,YAAA,KAAKA,4BAAa,CAAC,QAAQ,EAAE;AAC5B,gBAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;;AAG5B,YAAA,KAAKA,4BAAa,CAAC,cAAc,EAAE;AAClC,gBAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;;AAG5B,YAAA,KAAKA,4BAAa,CAAC,MAAM,EAAE;AAC1B,gBAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;;YAG5B,SAAS;AACR,gBAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;;;;AAI9B;;;;"}
|
|
@@ -14,6 +14,7 @@ const SORT_ARGUMENT_MORE = 1;
|
|
|
14
14
|
const MIN_INTEGER = -2147483648;
|
|
15
15
|
const MAX_INTEGER = 2_147_483_647;
|
|
16
16
|
const MIN_BIGINT = -9223372036854776e3;
|
|
17
|
+
// eslint-disable-next-line @elsikora/javascript/no-loss-of-precision
|
|
17
18
|
const MAX_BIGINT = 9_223_372_036_854_775_807;
|
|
18
19
|
const MILLISECONDS_IN_SECOND = 1000;
|
|
19
20
|
const NUMBER_CONSTANT = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number.constant.js","sources":["../../../../src/constant/number.constant.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA,MAAM,gBAAgB,GAAW,CAAC;AAClC,MAAM,IAAI,GAAW,CAAC;AACtB,MAAM,GAAG,GAAW,CAAC;AACrB,MAAM,YAAY,GAAW,EAAE;AAC/B,MAAM,yBAAyB,GAAW,CAAC;AAC3C,MAAM,yBAAyB,GAAW,GAAG;AAC7C,MAAM,yBAAyB,GAAW,CAAC;AAC3C,MAAM,qBAAqB,GAAW,GAAG;AACzC,MAAM,oBAAoB,GAAW,CAAC;AACtC,MAAM,kBAAkB,GAAW,EAAE;AACrC,MAAM,kBAAkB,GAAW,CAAC;AACpC,MAAM,WAAW,GAAW,WAAc;AAC1C,MAAM,WAAW,GAAW,aAAa;AACzC,MAAM,UAAU,GAAW,mBAA0B;
|
|
1
|
+
{"version":3,"file":"number.constant.js","sources":["../../../../src/constant/number.constant.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA,MAAM,gBAAgB,GAAW,CAAC;AAClC,MAAM,IAAI,GAAW,CAAC;AACtB,MAAM,GAAG,GAAW,CAAC;AACrB,MAAM,YAAY,GAAW,EAAE;AAC/B,MAAM,yBAAyB,GAAW,CAAC;AAC3C,MAAM,yBAAyB,GAAW,GAAG;AAC7C,MAAM,yBAAyB,GAAW,CAAC;AAC3C,MAAM,qBAAqB,GAAW,GAAG;AACzC,MAAM,oBAAoB,GAAW,CAAC;AACtC,MAAM,kBAAkB,GAAW,EAAE;AACrC,MAAM,kBAAkB,GAAW,CAAC;AACpC,MAAM,WAAW,GAAW,WAAc;AAC1C,MAAM,WAAW,GAAW,aAAa;AACzC,MAAM,UAAU,GAAW,mBAA0B;AACrD;AACA,MAAM,UAAU,GAAW,yBAAyB;AACpD,MAAM,sBAAsB,GAAW,IAAI;AAE9B,MAAA,eAAe,GAiBxB;IACH,yBAAyB;IACzB,UAAU;IACV,yBAAyB;IACzB,WAAW;IACX,sBAAsB;IACtB,UAAU;IACV,yBAAyB;IACzB,WAAW;IACX,YAAY;IACZ,GAAG;IACH,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,IAAI;IACJ,gBAAgB;;;;;"}
|
|
@@ -6,7 +6,9 @@ const ApiController = (options) => (target) => {
|
|
|
6
6
|
const factory = new controller_factory.ApiControllerFactory(target, options);
|
|
7
7
|
factory.init();
|
|
8
8
|
const ValidatedController = class extends target {
|
|
9
|
+
// eslint-disable-next-line @elsikora/typescript/no-useless-constructor
|
|
9
10
|
constructor(..._arguments) {
|
|
11
|
+
// eslint-disable-next-line @elsikora/typescript/no-unsafe-argument
|
|
10
12
|
super(..._arguments);
|
|
11
13
|
}
|
|
12
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.decorator.js","sources":["../../../../../src/decorator/api/controller.decorator.ts"],"sourcesContent":[null],"names":["ApiControllerFactory"],"mappings":";;;;AAKO,MAAM,aAAa,GACzB,CAA2B,OAAoC,KAC/D,CAAsC,MAAS,KAAO;IACrD,MAAM,OAAO,GAA4B,IAAIA,uCAAoB,CAAI,MAAM,EAAE,OAAO,CAAC;IACrF,OAAO,CAAC,IAAI,EAAE;AAEd,IAAA,MAAM,mBAAmB,GAA2D,cAAc,MAAM,CAAA
|
|
1
|
+
{"version":3,"file":"controller.decorator.js","sources":["../../../../../src/decorator/api/controller.decorator.ts"],"sourcesContent":[null],"names":["ApiControllerFactory"],"mappings":";;;;AAKO,MAAM,aAAa,GACzB,CAA2B,OAAoC,KAC/D,CAAsC,MAAS,KAAO;IACrD,MAAM,OAAO,GAA4B,IAAIA,uCAAoB,CAAI,MAAM,EAAE,OAAO,CAAC;IACrF,OAAO,CAAC,IAAI,EAAE;AAEd,IAAA,MAAM,mBAAmB,GAA2D,cAAc,MAAM,CAAA;;AAEvG,QAAA,WAAA,CAAY,GAAG,UAAe,EAAA;;AAE7B,YAAA,KAAK,CAAC,GAAG,UAAU,CAAC;;KAErB;AACD,IAAA,MAAM,CAAC,cAAc,CAAC,mBAAmB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;AAE1E,IAAA,OAAO,mBAAwB;AAChC;;;;"}
|
|
@@ -21,22 +21,27 @@ var errorException_utility = require('../../../utility/error-exception.utility.j
|
|
|
21
21
|
var errorString_utility = require('../../../utility/error-string.utility.js');
|
|
22
22
|
var logger_utility = require('../../../utility/logger.utility.js');
|
|
23
23
|
|
|
24
|
+
// eslint-disable-next-line @elsikora/typescript/no-unnecessary-type-parameters
|
|
24
25
|
function ApiFunctionCreate(properties) {
|
|
25
26
|
const { entity } = properties;
|
|
26
27
|
return function (target, propertyKey, descriptor) {
|
|
27
|
-
descriptor.value = async function (properties) {
|
|
28
|
+
descriptor.value = async function (properties, eventManager) {
|
|
28
29
|
const repository = this.repository;
|
|
29
30
|
if (!repository) {
|
|
30
31
|
throw errorException_utility.ErrorException("Repository is not available in this context");
|
|
31
32
|
}
|
|
32
|
-
return executor({ entity, properties, repository });
|
|
33
|
+
return executor({ entity, eventManager, properties, repository });
|
|
33
34
|
};
|
|
34
35
|
return descriptor;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
async function executor(options) {
|
|
38
|
-
const { entity, properties, repository } = options;
|
|
39
|
+
const { entity, eventManager, properties, repository } = options;
|
|
39
40
|
try {
|
|
41
|
+
if (eventManager) {
|
|
42
|
+
const eventRepository = eventManager.getRepository(entity);
|
|
43
|
+
return await eventRepository.save(properties);
|
|
44
|
+
}
|
|
40
45
|
return await repository.save(properties);
|
|
41
46
|
}
|
|
42
47
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.decorator.js","sources":["../../../../../../src/decorator/api/function/create.decorator.ts"],"sourcesContent":[null],"names":["ErrorException","HttpException","LoggerUtility","InternalServerErrorException","ErrorString","EErrorStringAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"create.decorator.js","sources":["../../../../../../src/decorator/api/function/create.decorator.ts"],"sourcesContent":[null],"names":["ErrorException","HttpException","LoggerUtility","InternalServerErrorException","ErrorString","EErrorStringAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAaA;AACM,SAAU,iBAAiB,CAA2B,UAAkC,EAAA;AAC7F,IAAA,MAAM,EAAE,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many.decorator.js');
|
|
|
24
24
|
var get_decorator = require('./get.decorator.js');
|
|
25
25
|
var update_decorator = require('./update.decorator.js');
|
|
26
26
|
|
|
27
|
+
// eslint-disable-next-line @elsikora/typescript/no-unnecessary-type-parameters
|
|
27
28
|
function ApiFunction(properties) {
|
|
28
29
|
const { entity, type } = properties;
|
|
29
30
|
return function (_target, propertyKey, descriptor) {
|
|
30
31
|
const originalMethod = descriptor.value;
|
|
32
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
31
33
|
descriptor.value = function (...arguments_) {
|
|
32
34
|
let decoratorFunction;
|
|
33
35
|
switch (type) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorator.js","sources":["../../../../../../src/decorator/api/function/decorator.ts"],"sourcesContent":[null],"names":["EApiFunctionType","ApiFunctionCreate","ApiFunctionDelete","ApiFunctionGet","ApiFunctionGetList","ApiFunctionGetMany","ApiFunctionUpdate","ErrorException"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"decorator.js","sources":["../../../../../../src/decorator/api/function/decorator.ts"],"sourcesContent":[null],"names":["EApiFunctionType","ApiFunctionCreate","ApiFunctionDelete","ApiFunctionGet","ApiFunctionGetList","ApiFunctionGetMany","ApiFunctionUpdate","ErrorException"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA;AACM,SAAU,WAAW,CAA8B,UAAqC,EAAA;AAC7F,IAAA,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAA8B,UAAU;AAE9D,IAAA,OAAO,UAAU,OAAgB,EAAE,WAAmB,EAAE,UAA8B,EAAA;AACrF,QAAA,MAAM,cAAc,GAAY,UAAU,CAAC,KAAK;;AAGhD,QAAA,UAAU,CAAC,KAAK,GAAG,UAA+C,GAAG,UAAsB,EAAA;AAC1F,YAAA,IAAI,iBAAqC;YAEzC,QAAQ,IAAI;AACX,gBAAA,KAAKA,0BAAgB,CAAC,MAAM,EAAE;AAC7B,oBAAA,iBAAiB,GAAGC,kCAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;oBAEjD;;AAGD,gBAAA,KAAKD,0BAAgB,CAAC,MAAM,EAAE;AAC7B,oBAAA,iBAAiB,GAAGE,kCAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;oBAEjD;;AAGD,gBAAA,KAAKF,0BAAgB,CAAC,GAAG,EAAE;AAC1B,oBAAA,iBAAiB,GAAGG,4BAAc,CAAC,EAAE,MAAM,EAAE,CAAC;oBAE9C;;AAGD,gBAAA,KAAKH,0BAAgB,CAAC,QAAQ,EAAE;AAC/B,oBAAA,iBAAiB,GAAGI,oCAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;oBAElD;;AAGD,gBAAA,KAAKJ,0BAAgB,CAAC,QAAQ,EAAE;AAC/B,oBAAA,iBAAiB,GAAGK,oCAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;oBAElD;;AAGD,gBAAA,KAAKL,0BAAgB,CAAC,MAAM,EAAE;AAC7B,oBAAA,iBAAiB,GAAGM,kCAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;oBAEjD;;gBAGD,SAAS;AACR,oBAAA,MAAMC,qCAAc,CAAC,sBAAsB,CAAC;;;AAI9C,YAAA,MAAM,kBAAkB,GAAuB,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;AAC9G,YAAA,MAAM,cAAc,GAAsC,kBAAkB,CAAC,KAA0C;YAEvH,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC;AAC9C,SAAC;AAED,QAAA,OAAO,UAAU;AAClB,KAAC;AACF;;;;"}
|
|
@@ -22,12 +22,13 @@ var errorString_utility = require('../../../utility/error-string.utility.js');
|
|
|
22
22
|
var logger_utility = require('../../../utility/logger.utility.js');
|
|
23
23
|
var get_decorator = require('./get.decorator.js');
|
|
24
24
|
|
|
25
|
+
// eslint-disable-next-line @elsikora/typescript/no-unnecessary-type-parameters
|
|
25
26
|
function ApiFunctionDelete(properties) {
|
|
26
27
|
const { entity } = properties;
|
|
27
28
|
const getDecorator = get_decorator.ApiFunctionGet({ entity });
|
|
28
29
|
let getFunction;
|
|
29
30
|
return function (target, propertyKey, descriptor) {
|
|
30
|
-
descriptor.value = async function (criteria) {
|
|
31
|
+
descriptor.value = async function (criteria, eventManager) {
|
|
31
32
|
const repository = this.repository;
|
|
32
33
|
if (!repository) {
|
|
33
34
|
throw errorException_utility.ErrorException("Repository is not available in this context");
|
|
@@ -46,15 +47,19 @@ function ApiFunctionDelete(properties) {
|
|
|
46
47
|
throw errorException_utility.ErrorException("Get function is not properly decorated");
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
|
-
return executor({ criteria, entity, getFunction, repository });
|
|
50
|
+
return executor({ criteria, entity, eventManager, getFunction, repository });
|
|
50
51
|
};
|
|
51
52
|
return descriptor;
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
async function executor(options) {
|
|
55
|
-
const { criteria, entity, getFunction, repository } = options;
|
|
56
|
+
const { criteria, entity, eventManager, getFunction, repository } = options;
|
|
56
57
|
try {
|
|
57
58
|
const existingEntity = await getFunction({ where: criteria });
|
|
59
|
+
if (eventManager) {
|
|
60
|
+
const eventRepository = eventManager.getRepository(entity);
|
|
61
|
+
return await eventRepository.remove(existingEntity);
|
|
62
|
+
}
|
|
58
63
|
return await repository.remove(existingEntity);
|
|
59
64
|
}
|
|
60
65
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.decorator.js","sources":["../../../../../../src/decorator/api/function/delete.decorator.ts"],"sourcesContent":[null],"names":["ApiFunctionGet","ErrorException","HttpException","LoggerUtility","InternalServerErrorException","ErrorString","EErrorStringAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"delete.decorator.js","sources":["../../../../../../src/decorator/api/function/delete.decorator.ts"],"sourcesContent":[null],"names":["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UAAU,EAAE,GAA4C,OAAO;AAEpH,IAAA,IAAI;QACH,MAAM,cAAc,GAAM,MAAM,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;QAEhE,IAAI,YAAY,EAAE;YACjB,MAAM,eAAe,GAAkB,YAAY,CAAC,aAAa,CAAI,MAAsB,CAAC;AAE5F,YAAA,OAAO,MAAM,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC;;AAGpD,QAAA,OAAO,MAAM,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC;;IAC7C,OAAO,KAAK,EAAE;AACf,QAAA,IAAI,KAAK,YAAYC,oBAAa,EAAE;AACnC,YAAA,MAAM,KAAK;;AAGZ,QAAAC,4BAAa,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,CAAA,sBAAA,EAAyB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC;AAE5G,QAAA,MAAM,IAAIC,mCAA4B,CACrCC,+BAAW,CAAC;AACX,YAAA,MAAM,EAAE,MAAM;YACd,IAAI,EAAEC,yCAAkB,CAAC,cAAc;AACvC,SAAA,CAAC,CACF;;AAEH;;;;"}
|
|
@@ -21,28 +21,40 @@ var errorException_utility = require('../../../utility/error-exception.utility.j
|
|
|
21
21
|
var errorString_utility = require('../../../utility/error-string.utility.js');
|
|
22
22
|
var logger_utility = require('../../../utility/logger.utility.js');
|
|
23
23
|
|
|
24
|
+
// eslint-disable-next-line @elsikora/typescript/no-unnecessary-type-parameters
|
|
24
25
|
function ApiFunctionGetList(properties) {
|
|
25
26
|
const { entity } = properties;
|
|
26
27
|
return function (_target, _propertyKey, descriptor) {
|
|
27
|
-
descriptor.value = async function (properties) {
|
|
28
|
+
descriptor.value = async function (properties, eventManager) {
|
|
28
29
|
const repository = this.repository;
|
|
29
30
|
if (!repository) {
|
|
30
31
|
throw errorException_utility.ErrorException("Repository is not available in this context");
|
|
31
32
|
}
|
|
32
|
-
return executor({ entity, properties, repository });
|
|
33
|
+
return executor({ entity, eventManager, properties, repository });
|
|
33
34
|
};
|
|
34
35
|
return descriptor;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
async function executor(options) {
|
|
38
|
-
const { entity, properties, repository } = options;
|
|
39
|
+
const { entity, eventManager, properties, repository } = options;
|
|
39
40
|
try {
|
|
40
|
-
|
|
41
|
+
let items;
|
|
42
|
+
let totalCount;
|
|
43
|
+
if (eventManager) {
|
|
44
|
+
const eventRepository = eventManager.getRepository(entity);
|
|
45
|
+
[items, totalCount] = await eventRepository.findAndCount(properties);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
[items, totalCount] = await repository.findAndCount(properties);
|
|
49
|
+
}
|
|
41
50
|
return {
|
|
42
51
|
count: items.length,
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
// eslint-disable-next-line @elsikora/sonar/no-nested-conditional,@elsikora/unicorn/no-nested-ternary
|
|
43
54
|
currentPage: items.length === 0 ? 0 : properties.skip ? Math.ceil(properties.skip / properties?.take) + 1 : 1,
|
|
44
55
|
items,
|
|
45
56
|
totalCount,
|
|
57
|
+
// @ts-ignore
|
|
46
58
|
totalPages: Math.ceil(totalCount / properties.take),
|
|
47
59
|
};
|
|
48
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-list.decorator.js","sources":["../../../../../../src/decorator/api/function/get-list.decorator.ts"],"sourcesContent":[null],"names":["ErrorException","HttpException","LoggerUtility","InternalServerErrorException","ErrorString","EErrorStringAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-list.decorator.js","sources":["../../../../../../src/decorator/api/function/get-list.decorator.ts"],"sourcesContent":[null],"names":["ErrorException","HttpException","LoggerUtility","InternalServerErrorException","ErrorString","EErrorStringAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAaA;AACM,SAAU,kBAAkB,CAA2B,UAAkC,EAAA;AAC9F,IAAA,MAA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,UAAU,CAAC,IAAI,CAAC;SACnD;;IACA,OAAO,KAAK,EAAE;AACf,QAAA,IAAI,KAAK,YAAYC,oBAAa,EAAE;AACnC,YAAA,MAAM,KAAK;;AAGZ,QAAAC,4BAAa,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,CAAA,+BAAA,EAAkC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC;AAEtH,QAAA,MAAM,IAAIC,mCAA4B,CACrCC,+BAAW,CAAC;AACX,YAAA,MAAM,EAAE,MAAM;YACd,IAAI,EAAEC,yCAAkB,CAAC,mBAAmB;AAC5C,SAAA,CAAC,CACF;;AAEH;;;;"}
|
|
@@ -21,23 +21,31 @@ var errorException_utility = require('../../../utility/error-exception.utility.j
|
|
|
21
21
|
var errorString_utility = require('../../../utility/error-string.utility.js');
|
|
22
22
|
var logger_utility = require('../../../utility/logger.utility.js');
|
|
23
23
|
|
|
24
|
+
// eslint-disable-next-line @elsikora/typescript/no-unnecessary-type-parameters
|
|
24
25
|
function ApiFunctionGetMany(properties) {
|
|
25
26
|
const { entity } = properties;
|
|
26
27
|
return function (target, propertyKey, descriptor) {
|
|
27
|
-
descriptor.value = async function (properties) {
|
|
28
|
+
descriptor.value = async function (properties, eventManager) {
|
|
28
29
|
const repository = this.repository;
|
|
29
30
|
if (!repository) {
|
|
30
31
|
throw errorException_utility.ErrorException("Repository is not available in this context");
|
|
31
32
|
}
|
|
32
|
-
return executor({ entity, properties, repository });
|
|
33
|
+
return executor({ entity, eventManager, properties, repository });
|
|
33
34
|
};
|
|
34
35
|
return descriptor;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
async function executor(options) {
|
|
38
|
-
const { entity, properties, repository } = options;
|
|
39
|
+
const { entity, eventManager, properties, repository } = options;
|
|
39
40
|
try {
|
|
40
|
-
|
|
41
|
+
let items;
|
|
42
|
+
if (eventManager) {
|
|
43
|
+
const eventRepository = eventManager.getRepository(entity);
|
|
44
|
+
items = await eventRepository.find(properties);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
items = await repository.find(properties);
|
|
48
|
+
}
|
|
41
49
|
if (items.length === 0) {
|
|
42
50
|
throw new common.NotFoundException(errorString_utility.ErrorString({ entity, type: errorStringAction_enum.EErrorStringAction.NOT_FOUND }));
|
|
43
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-many.decorator.js","sources":["../../../../../../src/decorator/api/function/get-many.decorator.ts"],"sourcesContent":[null],"names":["ErrorException","NotFoundException","ErrorString","EErrorStringAction","HttpException","LoggerUtility","InternalServerErrorException"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-many.decorator.js","sources":["../../../../../../src/decorator/api/function/get-many.decorator.ts"],"sourcesContent":[null],"names":["ErrorException","NotFoundException","ErrorString","EErrorStringAction","HttpException","LoggerUtility","InternalServerErrorException"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAcA;AACM,SAAU,kBAAkB,CAA2B,UAAkC,EAAA;AAC9F,IAAA,MAAM,EAAE,MAAM,EAAE,GAA2B,UAAU;AAErD,IAAA,OAAO,UAAU,MAAe,EAAE,WAAmB,EAAE,UAA8B,EAAA;AAMpF,QAAA,UAAU,CAAC,KAAK,GAAG,gBAIlB,UAA4C,EAC5C,YAA4B,EAAA;AAE5B,YAAA,MAAM,UAAU,GAAkB,IAAI,CAAC,UAAU;YAEjD,IAAI,CAAC,UAAU,EAAE;AAChB,gBAAA,MAAMA,qCAAc,CAAC,6CAA6C,CAAC;;AAGpE,YAAA,OAAO,QAAQ,CAAI,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AACrE,SAAC;AAED,QAAA,OAAO,UAAU;AAClB,KAAC;AACF;AAEA,eAAe,QAAQ,CAA2B,OAAiD,EAAA;IAClG,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,GAA6C,OAAO;AAE1G,IAAA,IAAI;AACH,QAAA,IAAI,KAAe;QAEnB,IAAI,YAAY,EAAE;YACjB,MAAM,eAAe,GAAkB,YAAY,CAAC,aAAa,CAAI,MAAsB,CAAC;YAC5F,KAAK,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC;;aACxC;YACN,KAAK,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC;;AAG1C,QAAA,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AACvB,YAAA,MAAM,IAAIC,wBAAiB,CAACC,+BAAW,CAAC,EAAE,MAAM,EAAE,IAAI,EAAEC,yCAAkB,CAAC,SAAS,EAAE,CAAC,CAAC;;AAGzF,QAAA,OAAO,KAAK;;IACX,OAAO,KAAK,EAAE;AACf,QAAA,IAAI,KAAK,YAAYC,oBAAa,EAAE;AACnC,YAAA,MAAM,KAAK;;AAGZ,QAAAC,4BAAa,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,CAAA,+BAAA,EAAkC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC;AAEtH,QAAA,MAAM,IAAIC,mCAA4B,CACrCJ,+BAAW,CAAC;YACX,MAAM;YACN,IAAI,EAAEC,yCAAkB,CAAC,cAAc;AACvC,SAAA,CAAC,CACF;;AAEH;;;;"}
|
|
@@ -21,23 +21,31 @@ var errorException_utility = require('../../../utility/error-exception.utility.j
|
|
|
21
21
|
var errorString_utility = require('../../../utility/error-string.utility.js');
|
|
22
22
|
var logger_utility = require('../../../utility/logger.utility.js');
|
|
23
23
|
|
|
24
|
+
// eslint-disable-next-line @elsikora/typescript/no-unnecessary-type-parameters
|
|
24
25
|
function ApiFunctionGet(properties) {
|
|
25
26
|
const { entity } = properties;
|
|
26
27
|
return function (target, propertyKey, descriptor) {
|
|
27
|
-
descriptor.value = async function (properties) {
|
|
28
|
+
descriptor.value = async function (properties, eventManager) {
|
|
28
29
|
const repository = this.repository;
|
|
29
30
|
if (!repository) {
|
|
30
31
|
throw errorException_utility.ErrorException("Repository is not available in this context");
|
|
31
32
|
}
|
|
32
|
-
return executor({ entity, properties, repository });
|
|
33
|
+
return executor({ entity, eventManager, properties, repository });
|
|
33
34
|
};
|
|
34
35
|
return descriptor;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
async function executor(options) {
|
|
38
|
-
const { entity, properties, repository } = options;
|
|
39
|
+
const { entity, eventManager, properties, repository } = options;
|
|
39
40
|
try {
|
|
40
|
-
|
|
41
|
+
let item;
|
|
42
|
+
if (eventManager) {
|
|
43
|
+
const eventRepository = eventManager.getRepository(entity);
|
|
44
|
+
item = await eventRepository.findOne(properties);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
item = await repository.findOne(properties);
|
|
48
|
+
}
|
|
41
49
|
if (!item) {
|
|
42
50
|
throw new common.NotFoundException(errorString_utility.ErrorString({ entity, type: errorStringAction_enum.EErrorStringAction.NOT_FOUND }));
|
|
43
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.decorator.js","sources":["../../../../../../src/decorator/api/function/get.decorator.ts"],"sourcesContent":[null],"names":["ErrorException","NotFoundException","ErrorString","EErrorStringAction","HttpException","LoggerUtility","InternalServerErrorException"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get.decorator.js","sources":["../../../../../../src/decorator/api/function/get.decorator.ts"],"sourcesContent":[null],"names":["ErrorException","NotFoundException","ErrorString","EErrorStringAction","HttpException","LoggerUtility","InternalServerErrorException"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAYA;AACM,SAAU,cAAc,CAA2B,UAAkC,EAAA;AAC1F,IAAA,MAAM,EAAE,MAAM,EAAE,GAA2B,UAAU;AAErD,IAAA,OAAO,UAAU,MAAe,EAAE,WAAmB,EAAE,UAA8B,EAAA;AAMpF,QAAA,UAAU,CAAC,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AACvC,SAAA,CAAC,CACF;;AAEH;;;;"}
|
|
@@ -22,12 +22,13 @@ var errorString_utility = require('../../../utility/error-string.utility.js');
|
|
|
22
22
|
var logger_utility = require('../../../utility/logger.utility.js');
|
|
23
23
|
var get_decorator = require('./get.decorator.js');
|
|
24
24
|
|
|
25
|
+
// eslint-disable-next-line @elsikora/typescript/no-unnecessary-type-parameters
|
|
25
26
|
function ApiFunctionUpdate(properties) {
|
|
26
27
|
const { entity } = properties;
|
|
27
28
|
const getDecorator = get_decorator.ApiFunctionGet({ entity });
|
|
28
29
|
let getFunction;
|
|
29
30
|
return function (target, propertyKey, descriptor) {
|
|
30
|
-
descriptor.value = async function (criteria, properties) {
|
|
31
|
+
descriptor.value = async function (criteria, properties, eventManager) {
|
|
31
32
|
const repository = this.repository;
|
|
32
33
|
if (!repository) {
|
|
33
34
|
throw errorException_utility.ErrorException("Repository is not available in this context");
|
|
@@ -46,15 +47,15 @@ function ApiFunctionUpdate(properties) {
|
|
|
46
47
|
throw errorException_utility.ErrorException("Get function is not properly decorated");
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
|
-
return executor({ criteria, entity, getFunction, properties, repository });
|
|
50
|
+
return executor({ criteria, entity, eventManager, getFunction, properties, repository });
|
|
50
51
|
};
|
|
51
52
|
return descriptor;
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
async function executor(options) {
|
|
55
|
-
const { criteria, entity, getFunction, properties, repository } = options;
|
|
56
|
+
const { criteria, entity, eventManager, getFunction, properties, repository } = options;
|
|
56
57
|
try {
|
|
57
|
-
const existingEntity = await getFunction({ where: criteria });
|
|
58
|
+
const existingEntity = await getFunction({ where: criteria }, eventManager);
|
|
58
59
|
const updatedProperties = {};
|
|
59
60
|
const typedEntries = Object.entries(properties);
|
|
60
61
|
for (const [key, value] of typedEntries) {
|
|
@@ -66,6 +67,10 @@ async function executor(options) {
|
|
|
66
67
|
...existingEntity,
|
|
67
68
|
...updatedProperties,
|
|
68
69
|
};
|
|
70
|
+
if (eventManager) {
|
|
71
|
+
const eventRepository = eventManager.getRepository(entity);
|
|
72
|
+
return await eventRepository.save(mergedEntity);
|
|
73
|
+
}
|
|
69
74
|
return await repository.save(mergedEntity);
|
|
70
75
|
}
|
|
71
76
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.decorator.js","sources":["../../../../../../src/decorator/api/function/update.decorator.ts"],"sourcesContent":[null],"names":["ApiFunctionGet","ErrorException","HttpException","LoggerUtility","InternalServerErrorException","ErrorString","EErrorStringAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"update.decorator.js","sources":["../../../../../../src/decorator/api/function/update.decorator.ts"],"sourcesContent":[null],"names":["ApiFunctionGet","ErrorException","HttpException","LoggerUtility","InternalServerErrorException","ErrorString","EErrorStringAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAgBA;AACM,SAAU,iBAAiB,CAA2B,UAAkC,EAAA;AAC7F,IAAA,MAAM,EAAE,MAAM,EAAE,GAA2B,UAAU;IACrD,MAAM,YAAY,GAA6FA,4BAAc,CAAI,EAAE,MAAM,EAAE,CAAC;AAC5I,IAAA,IAAI,WAAmG;AAEvG,IAAA,OAAO,UAAU,MAAe,EAAE,WAAmB,EAAE,UAA8B,EAAA;QAMpF,UAAU,CAAC,KAAK,GAAG,gBAIlB,QAAuC,EACvC,UAA2C,EAC3C,YAA4B,EAAA;AAE5B,YAAA,MAAM,UAAU,GAAkB,IAAI,CAAC,UAAU;YAEjD,IAAI,CAAC,UAAU,EAAE;AAChB,gBAAA,MAAMC,qCAAc,CAAC,6CAA6C,CAAC;;YAGpE,IAAI,CAAC,WAAW,EAAE;AACjB,gBAAA,MAAM,aAAa,GAAoH;AACtI,oBAAA,KAAK,EAAE,YAAA;wBACN,OAAO,OAAO,CAAC,MAAM,CAACA,qCAAc,CAAC,iBAAiB,CAAC,CAAC;qBACxD;iBACD;AACD,gBAAA,YAAY,CAA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,QAAA,IAAI,KAAK,YAAYC,oBAAa,EAAE;AACnC,YAAA,MAAM,KAAK;;AAGZ,QAAAC,4BAAa,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,CAAA,sBAAA,EAAyB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC;AAE5G,QAAA,MAAM,IAAIC,mCAA4B,CACrCC,+BAAW,CAAC;AACX,YAAA,MAAM,EAAE,MAAM;YACd,IAAI,EAAEC,yCAAkB,CAAC,cAAc;AACvC,SAAA,CAAC,CACF;;AAEH;;;;"}
|
|
@@ -22,6 +22,7 @@ require('../../enum/filter-order-direction.enum.js');
|
|
|
22
22
|
require('../../enum/utility/error-string-action.enum.js');
|
|
23
23
|
var generateException_utility = require('../../utility/dto/generate-exception.utility.js');
|
|
24
24
|
|
|
25
|
+
// eslint-disable-next-line @elsikora/typescript/no-unnecessary-type-parameters,@elsikora/typescript/no-unsafe-function-type
|
|
25
26
|
function ApiMethod(options) {
|
|
26
27
|
let summary = "";
|
|
27
28
|
if (options.action) {
|
|
@@ -314,6 +315,7 @@ function ApiMethod(options) {
|
|
|
314
315
|
}));
|
|
315
316
|
}
|
|
316
317
|
}
|
|
318
|
+
// eslint-disable-next-line @elsikora/typescript/switch-exhaustiveness-check
|
|
317
319
|
switch (options.method) {
|
|
318
320
|
case common.RequestMethod.DELETE: {
|
|
319
321
|
decorators.push(common.Delete(options.path));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method.decorator.js","sources":["../../../../../src/decorator/api/method.decorator.ts"],"sourcesContent":[null],"names":["EApiAction","pluralizer","ApiOperation","ApiResponse","HttpCode","Throttle","ApiUnauthorizedResponse","DtoGenerateException","HttpStatus","ApiForbiddenResponse","ApiInternalServerErrorResponse","ApiNotFoundResponse","ApiBadRequestResponse","ApiTooManyRequestsResponse","RequestMethod","Delete","Get","Patch","Post","Put","ApiBearerAuth","ApiSecurity","UseGuards","applyDecor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,oBAAa,CAAC,GAAG,EAAE;YACvB,UAAU,CAAC,IAAI,CAACK,UAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAElC;;QAGD,SAAS;AACR,YAAA,MAAM,IAAI,KAAK,CAAC,CAAA,wBAAA,EAA2B,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAmB,iBAAA,CAAA,CAAC;;;AAIvF,IAAA,IAAI,OAAO,CAAC,cAAc,EAAE;QAC3B,IAAI,OAAO,CAAC,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAAE;YACrD,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,cAAc,EAAE,gBAAgB,IAAI,EAAE,EAAE;gBACtE,UAAU,CAAC,IAAI,CAACC,qBAAa,CAAC,QAAQ,CAAC,CAAC;;;QAI1C,IAAI,OAAO,CAAC,cAAc,EAAE,kBAAkB,EAAE,MAAM,EAAE;YACvD,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC,kBAAkB,EAAE;gBACjE,UAAU,CAAC,IAAI,CAACC,mBAAW,CAAC,QAAQ,CAAC,CAAC;;;AAIxC,QAAA,UAAU,CAAC,IAAI,CAACC,gBAAS,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;;AAGzD,IAAA,OAAOC,sBAAe,CAAC,GAAG,UAAU,CAAC;AACtC;;;;"}
|
|
1
|
+
{"version":3,"file":"method.decorator.js","sources":["../../../../../src/decorator/api/method.decorator.ts"],"sourcesContent":[null],"names":["EApiAction","pluralizer","ApiOperation","ApiResponse","HttpCode","Throttle","ApiUnauthorizedResponse","DtoGenerateException","HttpStatus","ApiForbiddenResponse","ApiInternalServerErrorResponse","ApiNotFoundResponse","ApiBadRequestResponse","ApiTooManyRequestsResponse","RequestMethod","Delete","Get","Patch","Post","Put","ApiBearerAuth","ApiSecurity","UseGuards","applyDecorators"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAUA;AACM,SAAU,SAAS,CAA2B,OA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AAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAElC;;QAGD,SAAS;AACR,YAAA,MAAM,IAAI,KAAK,CAAC,CAAA,wBAAA,EAA2B,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAmB,iBAAA,CAAA,CAAC;;;AAIvF,IAAA,IAAI,OAAO,CAAC,cAAc,EAAE;QAC3B,IAAI,OAAO,CAAC,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAAE;YACrD,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,cAAc,EAAE,gBAAgB,IAAI,EAAE,EAAE;gBACtE,UAAU,CAAC,IAAI,CAACC,qBAAa,CAAC,QAAQ,CAAC,CAAC;;;QAI1C,IAAI,OAAO,CAAC,cAAc,EAAE,kBAAkB,EAAE,MAAM,EAAE;YACvD,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC,kBAAkB,EAAE;gBACjE,UAAU,CAAC,IAAI,CAACC,mBAAW,CAAC,QAAQ,CAAC,CAAC;;;AAIxC,QAAA,UAAU,CAAC,IAAI,CAACC,gBAAS,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;;AAGzD,IAAA,OAAOC,sBAAe,CAAC,GAAG,UAAU,CAAC;AACtC;;;;"}
|
|
@@ -30,6 +30,7 @@ function ApiPropertyBoolean(properties) {
|
|
|
30
30
|
function buildApiPropertyOptions(properties) {
|
|
31
31
|
const apiPropertyOptions = {
|
|
32
32
|
description: `${String(properties.entity.name)} ${properties.description ?? ""}`,
|
|
33
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
33
34
|
nullable: properties.isNullable,
|
|
34
35
|
type: dataType_enum.EApiPropertyDataType.BOOLEAN,
|
|
35
36
|
};
|
|
@@ -55,6 +56,7 @@ function buildFormatDecorators(properties) {
|
|
|
55
56
|
const decorators = [];
|
|
56
57
|
const isArray = properties.isArray ?? false;
|
|
57
58
|
if (properties.isResponse === undefined || !properties.isResponse) {
|
|
59
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
58
60
|
decorators.push(classValidator.IsBoolean({ each: isArray }));
|
|
59
61
|
}
|
|
60
62
|
return decorators;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.decorator.js","sources":["../../../../../../src/decorator/api/property/boolean.decorator.ts"],"sourcesContent":[null],"names":["applyDecorators","EApiPropertyDataType","ApiProperty","IsBoolean","IsOptional","IsArray","ArrayMinSize","ArrayMaxSize","ArrayNotEmpty","ApiResponseProperty","Expose","Exclude","Transform"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAWM,SAAU,kBAAkB,CAAC,UAAsC,EAAA;IACxE,eAAe,CAAC,UAAU,CAAC;AAE3B,IAAA,MAAM,kBAAkB,GAAuB,uBAAuB,CAAC,UAAU,CAAC;IAClF,MAAM,UAAU,GAA6B,eAAe,CAAC,UAAU,EAAE,kBAAkB,CAAC;AAE5F,IAAA,OAAOA,sBAAe,CAAC,GAAG,UAAU,CAAC;AACtC;AAEA,SAAS,uBAAuB,CAAC,UAAsC,EAAA;AACtE,IAAA,MAAM,kBAAkB,GAAuB;AAC9C,QAAA,WAAW,EAAE,CAAG,EAAA,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,WAAW,IAAI,EAAE,CAAE,CAAA
|
|
1
|
+
{"version":3,"file":"boolean.decorator.js","sources":["../../../../../../src/decorator/api/property/boolean.decorator.ts"],"sourcesContent":[null],"names":["applyDecorators","EApiPropertyDataType","ApiProperty","IsBoolean","IsOptional","IsArray","ArrayMinSize","ArrayMaxSize","ArrayNotEmpty","ApiResponseProperty","Expose","Exclude","Transform"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAWM,SAAU,kBAAkB,CAAC,UAAsC,EAAA;IACxE,eAAe,CAAC,UAAU,CAAC;AAE3B,IAAA,MAAM,kBAAkB,GAAuB,uBAAuB,CAAC,UAAU,CAAC;IAClF,MAAM,UAAU,GAA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KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,GAAG;AAAE,wBAAA,OAAO,KAAK;AAEpD,oBAAA,OAAO,OAAO,CAAC,KAAK,CAAC;;AAGtB,gBAAA,OAAO,KAAK;aACZ,EACD,EAAE,WAAW,EAAE,IAAI,EAAE,CACrB,CACD;;;AAIH,IAAA,OAAO,UAAU;AAClB;AAEA,SAAS,eAAe,CAAC,UAAsC,EAAA;IAC9D,MAAM,MAAM,GAAkB,EAAE;AAEhC,IAAA,IAAI,UAAU,CAAC,OAAO,KAAK,IAAI,EAAE;QAChC,IAAI,UAAU,CAAC,QAAQ,GAAG,UAAU,CAAC,QAAQ,EAAE;AAC9C,YAAA,MAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC;;AAGrD,QAAA,IAAI,UAAU,CAAC,QAAQ,GAAG,CAAC,EAAE;AAC5B,YAAA,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC;;AAGzC,QAAA,IAAI,UAAU,CAAC,QAAQ,GAAG,CAAC,EAAE;AAC5B,YAAA,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC;;QAGzC,IAAI,UAAU,CAAC,aAAa,IAAI,UAAU,CAAC,QAAQ,IAAI,CAAC,EAAE;AACzD,YAAA,MAAM,CAAC,IAAI,CAAC,iEAAiE,CAAC;;;AAIhF,IAAA,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;AACtB,QAAA,MAAM,IAAI,KAAK,CAAC,CAAA,0BAAA,EAA6B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAE,CAAA,CAAC;;AAEnE;;;;"}
|
|
@@ -31,6 +31,7 @@ function buildApiPropertyOptions(properties) {
|
|
|
31
31
|
const example = getExample(properties.format);
|
|
32
32
|
const apiPropertyOptions = {
|
|
33
33
|
description: `${String(properties.entity.name)} ${getDescription(properties.identifier)}`,
|
|
34
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
34
35
|
nullable: properties.isNullable,
|
|
35
36
|
type: dataType_enum.EApiPropertyDataType.STRING,
|
|
36
37
|
};
|
|
@@ -64,6 +65,7 @@ function buildFormatDecorators(properties) {
|
|
|
64
65
|
const decorators = [];
|
|
65
66
|
const isArray = properties.isArray ?? false;
|
|
66
67
|
if (!properties.isResponse) {
|
|
68
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
67
69
|
decorators.push(classValidator.IsDate({ each: isArray }));
|
|
68
70
|
}
|
|
69
71
|
return decorators;
|