@elsikora/nestjs-crud-automator 1.2.2 → 1.4.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 +322 -0
- package/dist/class/api/index.d.ts +1 -1
- package/dist/class/api/index.js +1 -17
- package/dist/class/api/index.js.map +1 -1
- package/dist/class/api/service-base.class.d.ts +11 -0
- package/dist/class/api/service-base.class.js +28 -0
- package/dist/class/api/service-base.class.js.map +1 -0
- package/dist/class/index.js +3 -19
- package/dist/class/index.js.map +1 -1
- package/dist/class/metadata-storage.class.d.ts +7 -3
- package/dist/class/metadata-storage.class.js +5 -7
- package/dist/class/metadata-storage.class.js.map +1 -1
- package/dist/class/utility/dto/index.js +2 -18
- package/dist/class/utility/dto/index.js.map +1 -1
- package/dist/class/utility/dto/property/factory/boolean.class.d.ts +2 -2
- package/dist/class/utility/dto/property/factory/boolean.class.js +3 -7
- package/dist/class/utility/dto/property/factory/boolean.class.js.map +1 -1
- package/dist/class/utility/dto/property/factory/date.class.d.ts +2 -2
- package/dist/class/utility/dto/property/factory/date.class.js +3 -7
- package/dist/class/utility/dto/property/factory/date.class.js.map +1 -1
- package/dist/class/utility/dto/property/factory/index.js +6 -22
- package/dist/class/utility/dto/property/factory/index.js.map +1 -1
- package/dist/class/utility/dto/property/factory/number.class.d.ts +2 -2
- package/dist/class/utility/dto/property/factory/number.class.js +3 -7
- package/dist/class/utility/dto/property/factory/number.class.js.map +1 -1
- package/dist/class/utility/dto/property/factory/object.class.d.ts +2 -2
- package/dist/class/utility/dto/property/factory/object.class.js +3 -7
- package/dist/class/utility/dto/property/factory/object.class.js.map +1 -1
- package/dist/class/utility/dto/property/factory/relation.class.d.ts +4 -2
- package/dist/class/utility/dto/property/factory/relation.class.js +12 -8
- package/dist/class/utility/dto/property/factory/relation.class.js.map +1 -1
- package/dist/class/utility/dto/property/factory/string.class.d.ts +2 -2
- package/dist/class/utility/dto/property/factory/string.class.js +3 -7
- package/dist/class/utility/dto/property/factory/string.class.js.map +1 -1
- package/dist/class/utility/dto/property/factory/uuid.class.d.ts +2 -2
- package/dist/class/utility/dto/property/factory/uuid.class.js +3 -7
- package/dist/class/utility/dto/property/factory/uuid.class.js.map +1 -1
- package/dist/class/utility/dto/property/index.js +1 -17
- package/dist/class/utility/dto/property/index.js.map +1 -1
- package/dist/class/utility/dto/strategy/body.class.js +4 -8
- package/dist/class/utility/dto/strategy/body.class.js.map +1 -1
- package/dist/class/utility/dto/strategy/index.js +4 -20
- package/dist/class/utility/dto/strategy/index.js.map +1 -1
- package/dist/class/utility/dto/strategy/query.class.js +3 -7
- package/dist/class/utility/dto/strategy/query.class.js.map +1 -1
- package/dist/class/utility/dto/strategy/request.class.js +7 -11
- package/dist/class/utility/dto/strategy/request.class.js.map +1 -1
- package/dist/class/utility/dto/strategy/response.class.js +3 -7
- package/dist/class/utility/dto/strategy/response.class.js.map +1 -1
- package/dist/class/utility/index.js +1 -17
- package/dist/class/utility/index.js.map +1 -1
- package/dist/constant/date.constant.js +1 -4
- package/dist/constant/date.constant.js.map +1 -1
- package/dist/constant/decorator/api/controller.constant.js +1 -4
- package/dist/constant/decorator/api/controller.constant.js.map +1 -1
- package/dist/constant/decorator/api/function.constant.js +3 -6
- package/dist/constant/decorator/api/function.constant.js.map +1 -1
- package/dist/constant/decorator/api/index.js +3 -19
- package/dist/constant/decorator/api/index.js.map +1 -1
- package/dist/constant/decorator/api/property-describe.constant.d.ts +1 -1
- package/dist/constant/decorator/api/property-describe.constant.js +1 -4
- package/dist/constant/decorator/api/property-describe.constant.js.map +1 -1
- package/dist/constant/decorator/index.js +1 -17
- package/dist/constant/decorator/index.js.map +1 -1
- package/dist/constant/dto/exception.constant.js +1 -4
- package/dist/constant/dto/exception.constant.js.map +1 -1
- package/dist/constant/dto/index.js +1 -17
- package/dist/constant/dto/index.js.map +1 -1
- package/dist/constant/dto/transformer-value.constant.d.ts +7 -0
- package/dist/constant/dto/transformer-value.constant.js +13 -0
- package/dist/constant/dto/transformer-value.constant.js.map +1 -0
- package/dist/constant/factory/dto/get-list-query.constant.js +1 -4
- package/dist/constant/factory/dto/get-list-query.constant.js.map +1 -1
- package/dist/constant/factory/dto/index.js +1 -17
- package/dist/constant/factory/dto/index.js.map +1 -1
- package/dist/constant/factory/index.js +1 -17
- package/dist/constant/factory/index.js.map +1 -1
- package/dist/constant/index.js +6 -22
- package/dist/constant/index.js.map +1 -1
- package/dist/constant/interface/api/filter.constant.js +1 -4
- package/dist/constant/interface/api/filter.constant.js.map +1 -1
- package/dist/constant/interface/api/index.js +2 -18
- package/dist/constant/interface/api/index.js.map +1 -1
- package/dist/constant/interface/api/property/index.js +2 -18
- package/dist/constant/interface/api/property/index.js.map +1 -1
- package/dist/constant/interface/api/property/string.constant.js +1 -4
- package/dist/constant/interface/api/property/string.constant.js.map +1 -1
- package/dist/constant/interface/api/property/wallet.constant.js +1 -4
- package/dist/constant/interface/api/property/wallet.constant.js.map +1 -1
- package/dist/constant/interface/index.js +1 -17
- package/dist/constant/interface/index.js.map +1 -1
- package/dist/constant/number.constant.js +1 -4
- package/dist/constant/number.constant.js.map +1 -1
- package/dist/constant/utility/dto/constant.d.ts +1 -1
- package/dist/constant/utility/dto/constant.js +16 -19
- package/dist/constant/utility/dto/constant.js.map +1 -1
- package/dist/decorator/api/controller.decorator.d.ts +1 -2
- package/dist/decorator/api/controller.decorator.js +3 -7
- package/dist/decorator/api/controller.decorator.js.map +1 -1
- package/dist/decorator/api/function/create.decorator.d.ts +2 -2
- package/dist/decorator/api/function/create.decorator.js +10 -27
- package/dist/decorator/api/function/create.decorator.js.map +1 -1
- package/dist/decorator/api/function/decorator.d.ts +1 -1
- package/dist/decorator/api/function/decorator.js +24 -22
- package/dist/decorator/api/function/decorator.js.map +1 -1
- package/dist/decorator/api/function/delete.decorator.d.ts +2 -4
- package/dist/decorator/api/function/delete.decorator.js +24 -22
- package/dist/decorator/api/function/delete.decorator.js.map +1 -1
- package/dist/decorator/api/function/get-list.decorator.d.ts +2 -4
- package/dist/decorator/api/function/get-list.decorator.js +16 -100
- package/dist/decorator/api/function/get-list.decorator.js.map +1 -1
- package/dist/decorator/api/function/get-many.decorator.d.ts +2 -0
- package/dist/decorator/api/function/get-many.decorator.js +39 -0
- package/dist/decorator/api/function/get-many.decorator.js.map +1 -0
- package/dist/decorator/api/function/get.decorator.d.ts +2 -4
- package/dist/decorator/api/function/get.decorator.js +19 -35
- package/dist/decorator/api/function/get.decorator.js.map +1 -1
- package/dist/decorator/api/function/index.d.ts +5 -0
- package/dist/decorator/api/function/index.js +7 -18
- package/dist/decorator/api/function/index.js.map +1 -1
- package/dist/decorator/api/function/update.decorator.d.ts +2 -4
- package/dist/decorator/api/function/update.decorator.js +34 -26
- package/dist/decorator/api/function/update.decorator.js.map +1 -1
- package/dist/decorator/api/index.d.ts +1 -0
- package/dist/decorator/api/index.js +5 -20
- package/dist/decorator/api/index.js.map +1 -1
- package/dist/decorator/api/method.decorator.js +62 -69
- package/dist/decorator/api/method.decorator.js.map +1 -1
- package/dist/decorator/api/property/boolean.decorator.js +18 -24
- package/dist/decorator/api/property/boolean.decorator.js.map +1 -1
- package/dist/decorator/api/property/date.decorator.js +24 -27
- package/dist/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/decorator/api/property/describe.decorator.js +4 -7
- package/dist/decorator/api/property/describe.decorator.js.map +1 -1
- package/dist/decorator/api/property/index.js +8 -24
- package/dist/decorator/api/property/index.js.map +1 -1
- package/dist/decorator/api/property/number.decorator.js +35 -44
- package/dist/decorator/api/property/number.decorator.js.map +1 -1
- package/dist/decorator/api/property/object.decorator.js +21 -23
- package/dist/decorator/api/property/object.decorator.js.map +1 -1
- package/dist/decorator/api/property/string.decorator.js +65 -71
- package/dist/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/decorator/api/property/uuid.decorator.js +13 -16
- package/dist/decorator/api/property/uuid.decorator.js.map +1 -1
- package/dist/decorator/api/property/wallet.decorator.js +11 -14
- package/dist/decorator/api/property/wallet.decorator.js.map +1 -1
- package/dist/decorator/api/service.decorator.d.ts +1 -1
- package/dist/decorator/api/service.decorator.js +55 -38
- package/dist/decorator/api/service.decorator.js.map +1 -1
- package/dist/decorator/index.js +1 -17
- package/dist/decorator/index.js.map +1 -1
- package/dist/enum/decorator/api/action.enum.js +2 -5
- package/dist/enum/decorator/api/action.enum.js.map +1 -1
- package/dist/enum/decorator/api/authentication-type.enum.js +2 -5
- package/dist/enum/decorator/api/authentication-type.enum.js.map +1 -1
- package/dist/enum/decorator/api/controller/index.d.ts +2 -1
- package/dist/enum/decorator/api/controller/index.js +2 -2
- package/dist/enum/decorator/api/controller/index.js.map +1 -1
- package/dist/enum/decorator/api/controller/load-relations-strategy.enum.d.ts +4 -0
- package/dist/enum/decorator/api/controller/load-relations-strategy.enum.js +6 -0
- package/dist/enum/decorator/api/controller/load-relations-strategy.enum.js.map +1 -0
- package/dist/enum/decorator/api/controller/request-transformer-type.enum.d.ts +4 -0
- package/dist/enum/decorator/api/controller/request-transformer-type.enum.js +6 -0
- package/dist/enum/decorator/api/controller/request-transformer-type.enum.js.map +1 -0
- package/dist/enum/decorator/api/dto-type.enum.js +2 -5
- package/dist/enum/decorator/api/dto-type.enum.js.map +1 -1
- package/dist/enum/decorator/api/function/index.js +1 -17
- package/dist/enum/decorator/api/function/index.js.map +1 -1
- package/dist/enum/decorator/api/function/type.enum.d.ts +1 -3
- package/dist/enum/decorator/api/function/type.enum.js +3 -8
- package/dist/enum/decorator/api/function/type.enum.js.map +1 -1
- package/dist/enum/decorator/api/index.js +7 -23
- package/dist/enum/decorator/api/index.js.map +1 -1
- package/dist/enum/decorator/api/property/data-type.enum.js +5 -8
- package/dist/enum/decorator/api/property/data-type.enum.js.map +1 -1
- package/dist/enum/decorator/api/property/date-type.enum.d.ts +2 -2
- package/dist/enum/decorator/api/property/date-type.enum.js +4 -7
- package/dist/enum/decorator/api/property/date-type.enum.js.map +1 -1
- package/dist/enum/decorator/api/property/desribe-type.enum.d.ts +2 -2
- package/dist/enum/decorator/api/property/desribe-type.enum.js +3 -6
- package/dist/enum/decorator/api/property/desribe-type.enum.js.map +1 -1
- package/dist/enum/decorator/api/property/index.js +3 -19
- package/dist/enum/decorator/api/property/index.js.map +1 -1
- package/dist/enum/decorator/api/route-type.enum.js +2 -5
- package/dist/enum/decorator/api/route-type.enum.js.map +1 -1
- package/dist/enum/decorator/index.js +1 -17
- package/dist/enum/decorator/index.js.map +1 -1
- package/dist/enum/filter-order-direction.enum.js +2 -5
- package/dist/enum/filter-order-direction.enum.js.map +1 -1
- package/dist/enum/index.js +3 -19
- package/dist/enum/index.js.map +1 -1
- package/dist/enum/utility/error-string-action.enum.d.ts +4 -0
- package/dist/enum/utility/error-string-action.enum.js +6 -5
- package/dist/enum/utility/error-string-action.enum.js.map +1 -1
- package/dist/enum/utility/index.js +1 -17
- package/dist/enum/utility/index.js.map +1 -1
- package/dist/factory/api/controller.factory.d.ts +10 -20
- package/dist/factory/api/controller.factory.js +126 -195
- package/dist/factory/api/controller.factory.js.map +1 -1
- package/dist/factory/api/index.js +1 -17
- package/dist/factory/api/index.js.map +1 -1
- package/dist/factory/index.js +1 -17
- package/dist/factory/index.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +10 -27
- package/dist/index.js.map +1 -1
- package/dist/interceptor/correlation-id-response-body.interceptor.js +20 -23
- package/dist/interceptor/correlation-id-response-body.interceptor.js.map +1 -1
- package/dist/interceptor/index.js +1 -17
- package/dist/interceptor/index.js.map +1 -1
- package/dist/interface/api-authentication-request.interface.d.ts +4 -0
- package/dist/interface/api-authentication-request.interface.js +2 -0
- package/dist/interface/api-authentication-request.interface.js.map +1 -0
- package/dist/interface/api-base-entity.interface.js +1 -2
- package/dist/interface/api-base-entity.interface.js.map +1 -1
- package/dist/interface/api-dto-validator.interface.d.ts +4 -0
- package/dist/interface/api-dto-validator.interface.js +2 -0
- package/dist/interface/api-dto-validator.interface.js.map +1 -0
- package/dist/interface/api-request-validator.interface.d.ts +7 -0
- package/dist/interface/api-request-validator.interface.js +2 -0
- package/dist/interface/api-request-validator.interface.js.map +1 -0
- package/dist/interface/class/dto/index.js +1 -17
- package/dist/interface/class/dto/index.js.map +1 -1
- package/dist/interface/class/dto/strategy.interface.js +1 -2
- package/dist/interface/class/dto/strategy.interface.js.map +1 -1
- package/dist/interface/class/index.d.ts +1 -0
- package/dist/interface/class/index.js +2 -17
- package/dist/interface/class/index.js.map +1 -1
- package/dist/interface/class/metadata-entry.interface.d.ts +5 -0
- package/dist/interface/class/metadata-entry.interface.js +2 -0
- package/dist/interface/class/metadata-entry.interface.js.map +1 -0
- package/dist/interface/decorator/api/controller/base.interface.d.ts +4 -0
- package/dist/interface/decorator/api/controller/base.interface.js +2 -0
- package/dist/interface/decorator/api/controller/base.interface.js.map +1 -0
- package/dist/interface/decorator/api/controller/index.d.ts +3 -0
- package/dist/interface/decorator/api/controller/index.js +4 -0
- package/dist/interface/decorator/api/controller/index.js.map +1 -0
- package/dist/interface/decorator/api/controller/properties/index.d.ts +1 -0
- package/dist/interface/decorator/api/controller/properties/index.js +2 -0
- package/dist/interface/decorator/api/controller/properties/index.js.map +1 -0
- package/dist/interface/decorator/api/controller/properties/route/authentication.interface.d.ts +9 -0
- package/dist/interface/decorator/api/controller/properties/route/authentication.interface.js +2 -0
- package/dist/interface/decorator/api/controller/properties/route/authentication.interface.js.map +1 -0
- package/dist/interface/decorator/api/controller/properties/route/auto-dto-config.interface.d.ts +4 -0
- package/dist/interface/decorator/api/controller/properties/route/auto-dto-config.interface.js +2 -0
- package/dist/interface/decorator/api/controller/properties/route/auto-dto-config.interface.js.map +1 -0
- package/dist/interface/decorator/api/controller/properties/route/base-request.interface.d.ts +8 -0
- package/dist/interface/decorator/api/controller/properties/route/base-request.interface.js +2 -0
- package/dist/interface/decorator/api/controller/properties/route/base-request.interface.js.map +1 -0
- package/dist/interface/decorator/api/controller/properties/route/base-response.interface.d.ts +7 -0
- package/dist/interface/decorator/api/controller/properties/route/base-response.interface.js +2 -0
- package/dist/interface/decorator/api/controller/properties/route/base-response.interface.js.map +1 -0
- package/dist/interface/decorator/api/controller/properties/route/base.interface.d.ts +11 -0
- package/dist/interface/decorator/api/controller/properties/route/base.interface.js +2 -0
- package/dist/interface/decorator/api/controller/properties/route/base.interface.js.map +1 -0
- package/dist/interface/decorator/api/controller/properties/route/index.d.ts +7 -0
- package/dist/interface/decorator/api/controller/properties/route/index.js +8 -0
- package/dist/interface/decorator/api/controller/properties/route/index.js.map +1 -0
- package/dist/interface/decorator/api/controller/properties/route/with-auto-dto.interface.d.ts +9 -0
- package/dist/interface/decorator/api/controller/properties/route/with-auto-dto.interface.js +2 -0
- package/dist/interface/decorator/api/controller/properties/route/with-auto-dto.interface.js.map +1 -0
- package/dist/interface/decorator/api/controller/properties/route/with-dto.interface.d.ts +9 -0
- package/dist/interface/decorator/api/controller/properties/route/with-dto.interface.js +2 -0
- package/dist/interface/decorator/api/controller/properties/route/with-dto.interface.js.map +1 -0
- package/dist/interface/decorator/api/controller/properties.interface.d.ts +11 -0
- package/dist/interface/decorator/api/controller/properties.interface.js +2 -0
- package/dist/interface/decorator/api/controller/properties.interface.js.map +1 -0
- package/dist/{type/decorator/api/function/create/executor-properties.type.d.ts → interface/decorator/api/function/create-executor-properties.interface.d.ts} +2 -2
- package/dist/interface/decorator/api/function/create-executor-properties.interface.js +2 -0
- package/dist/interface/decorator/api/function/create-executor-properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/function/delete-executor-properties.type.d.ts +9 -0
- package/dist/interface/decorator/api/function/delete-executor-properties.type.js +2 -0
- package/dist/interface/decorator/api/function/delete-executor-properties.type.js.map +1 -0
- package/dist/interface/decorator/api/function/get-executor-properties.interface.d.ts +8 -0
- package/dist/interface/decorator/api/function/get-executor-properties.interface.js +2 -0
- package/dist/interface/decorator/api/function/get-executor-properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/function/get-list-executor-properties.type.d.ts +8 -0
- package/dist/interface/decorator/api/function/get-list-executor-properties.type.js +2 -0
- package/dist/interface/decorator/api/function/get-list-executor-properties.type.js.map +1 -0
- package/dist/interface/decorator/api/function/get-many-executor-properties.interface.d.ts +8 -0
- package/dist/interface/decorator/api/function/get-many-executor-properties.interface.js +2 -0
- package/dist/interface/decorator/api/function/get-many-executor-properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/function/index.d.ts +5 -1
- package/dist/interface/decorator/api/function/index.js +5 -2
- package/dist/interface/decorator/api/function/index.js.map +1 -1
- package/dist/interface/decorator/api/function/{create-properties.interface.d.ts → properties.interface.d.ts} +1 -1
- package/dist/interface/decorator/api/function/properties.interface.js +2 -0
- package/dist/interface/decorator/api/function/properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/function/update-executor-properties.type.d.ts +10 -0
- package/dist/interface/decorator/api/function/update-executor-properties.type.js +2 -0
- package/dist/interface/decorator/api/function/update-executor-properties.type.js.map +1 -0
- package/dist/interface/decorator/api/get-list-response-result.interface.js +1 -2
- package/dist/interface/decorator/api/get-list-response-result.interface.js.map +1 -1
- package/dist/interface/decorator/api/index.d.ts +1 -2
- package/dist/interface/decorator/api/index.js +6 -23
- package/dist/interface/decorator/api/index.js.map +1 -1
- package/dist/interface/decorator/api/method/index.js +2 -18
- package/dist/interface/decorator/api/method/index.js.map +1 -1
- package/dist/interface/decorator/api/method/properties.interface.d.ts +1 -1
- package/dist/interface/decorator/api/method/properties.interface.js +1 -2
- package/dist/interface/decorator/api/method/properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/method/throttler-properties.interface.js +1 -2
- package/dist/interface/decorator/api/method/throttler-properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/property/base-properties.interface.js +1 -2
- package/dist/interface/decorator/api/property/base-properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/property/date-properties.interface.js +1 -2
- package/dist/interface/decorator/api/property/date-properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/property/index.js +6 -22
- package/dist/interface/decorator/api/property/index.js.map +1 -1
- package/dist/interface/decorator/api/property/number-properties.interface.js +1 -2
- package/dist/interface/decorator/api/property/number-properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/property/object-properties.interface.d.ts +1 -1
- package/dist/interface/decorator/api/property/object-properties.interface.js +1 -2
- package/dist/interface/decorator/api/property/object-properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/property/string-properties.interface.js +1 -2
- package/dist/interface/decorator/api/property/string-properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/property/uuid-properties.interface.js +1 -2
- package/dist/interface/decorator/api/property/uuid-properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/response-type.interface.js +1 -2
- package/dist/interface/decorator/api/response-type.interface.js.map +1 -1
- package/dist/interface/decorator/index.js +1 -17
- package/dist/interface/decorator/index.js.map +1 -1
- package/dist/interface/dto-generate-factory.interface.d.ts +3 -2
- package/dist/interface/dto-generate-factory.interface.js +1 -2
- package/dist/interface/dto-generate-factory.interface.js.map +1 -1
- package/dist/interface/entity/column.interface.d.ts +2 -2
- package/dist/interface/entity/column.interface.js +1 -2
- package/dist/interface/entity/column.interface.js.map +1 -1
- package/dist/interface/entity/index.js +2 -18
- package/dist/interface/entity/index.js.map +1 -1
- package/dist/interface/entity/interface.d.ts +3 -3
- package/dist/interface/entity/interface.js +1 -2
- package/dist/interface/entity/interface.js.map +1 -1
- package/dist/interface/index.d.ts +2 -1
- package/dist/interface/index.js +8 -23
- package/dist/interface/index.js.map +1 -1
- package/dist/interface/utility/api/controller/index.d.ts +1 -0
- package/dist/interface/utility/api/controller/index.js +2 -0
- package/dist/interface/utility/api/controller/index.js.map +1 -0
- package/dist/interface/utility/api/controller/primary-column.interface.d.ts +4 -0
- package/dist/interface/utility/api/controller/primary-column.interface.js +2 -0
- package/dist/interface/utility/api/controller/primary-column.interface.js.map +1 -0
- package/dist/interface/utility/api/index.d.ts +1 -0
- package/dist/interface/utility/api/index.js +2 -0
- package/dist/interface/utility/api/index.js.map +1 -0
- package/dist/interface/utility/error-string-properties.interface.js +1 -2
- package/dist/interface/utility/error-string-properties.interface.js.map +1 -1
- package/dist/interface/utility/get-entity-columns-properties.interface.d.ts +1 -0
- package/dist/interface/utility/get-entity-columns-properties.interface.js +1 -2
- package/dist/interface/utility/get-entity-columns-properties.interface.js.map +1 -1
- package/dist/interface/utility/index.d.ts +1 -0
- package/dist/interface/utility/index.js +2 -17
- package/dist/interface/utility/index.js.map +1 -1
- package/dist/type/api-request-transformer.type.d.ts +15 -0
- package/dist/type/api-request-transformer.type.js +2 -0
- package/dist/type/api-request-transformer.type.js.map +1 -0
- package/dist/type/class/api-exception.type.d.ts +2 -0
- package/dist/type/class/api-exception.type.js +2 -0
- package/dist/type/class/api-exception.type.js.map +1 -0
- package/dist/type/class/controller/index.d.ts +1 -0
- package/dist/type/class/controller/index.js +2 -0
- package/dist/type/class/controller/index.js.map +1 -0
- package/dist/type/class/controller/method.type.d.ts +5 -0
- package/dist/type/class/controller/method.type.js +2 -0
- package/dist/type/class/controller/method.type.js.map +1 -0
- package/dist/type/class/index.d.ts +3 -0
- package/dist/type/class/index.js +4 -0
- package/dist/type/class/index.js.map +1 -0
- package/dist/type/class/metadata.type.d.ts +2 -0
- package/dist/type/class/metadata.type.js +2 -0
- package/dist/type/class/metadata.type.js.map +1 -0
- package/dist/type/decorator/api/controller/constructor.type.d.ts +2 -2
- package/dist/type/decorator/api/controller/constructor.type.js +1 -2
- package/dist/type/decorator/api/controller/constructor.type.js.map +1 -1
- package/dist/type/decorator/api/controller/get-list-query.type.d.ts +11 -0
- package/dist/type/decorator/api/controller/get-list-query.type.js +2 -0
- package/dist/type/decorator/api/controller/get-list-query.type.js.map +1 -0
- package/dist/type/decorator/api/controller/index.d.ts +4 -0
- package/dist/type/decorator/api/controller/index.js +5 -17
- package/dist/type/decorator/api/controller/index.js.map +1 -1
- package/dist/type/decorator/api/controller/properties/index.d.ts +1 -0
- package/dist/type/decorator/api/controller/properties/index.js +2 -0
- package/dist/type/decorator/api/controller/properties/index.js.map +1 -0
- package/dist/type/decorator/api/controller/properties/route/base-request-relations.type.d.ts +18 -0
- package/dist/type/decorator/api/controller/properties/route/base-request-relations.type.js +2 -0
- package/dist/type/decorator/api/controller/properties/route/base-request-relations.type.js.map +1 -0
- package/dist/type/decorator/api/controller/properties/route/base-request-transformers.type.d.ts +10 -0
- package/dist/type/decorator/api/controller/properties/route/base-request-transformers.type.js +2 -0
- package/dist/type/decorator/api/controller/properties/route/base-request-transformers.type.js.map +1 -0
- package/dist/type/decorator/api/controller/properties/route/base-response-transformers.type.d.ts +10 -0
- package/dist/type/decorator/api/controller/properties/route/base-response-transformers.type.js +2 -0
- package/dist/type/decorator/api/controller/properties/route/base-response-transformers.type.js.map +1 -0
- package/dist/type/decorator/api/controller/properties/route/index.d.ts +3 -0
- package/dist/type/decorator/api/controller/properties/route/index.js +4 -0
- package/dist/type/decorator/api/controller/properties/route/index.js.map +1 -0
- package/dist/type/decorator/api/controller/properties-route.type.d.ts +3 -0
- package/dist/type/decorator/api/controller/properties-route.type.js +2 -0
- package/dist/type/decorator/api/controller/properties-route.type.js.map +1 -0
- package/dist/type/decorator/api/controller/transformer-config.type.d.ts +8 -0
- package/dist/type/decorator/api/controller/transformer-config.type.js +2 -0
- package/dist/type/decorator/api/controller/transformer-config.type.js.map +1 -0
- package/dist/type/decorator/api/filter/allowed-types.type.js +1 -2
- package/dist/type/decorator/api/filter/allowed-types.type.js.map +1 -1
- package/dist/type/decorator/api/filter/extracted-allowed-types.type.js +1 -2
- package/dist/type/decorator/api/filter/extracted-allowed-types.type.js.map +1 -1
- package/dist/type/decorator/api/filter/field-selector.type.js +1 -2
- package/dist/type/decorator/api/filter/field-selector.type.js.map +1 -1
- package/dist/type/decorator/api/filter/index.js +4 -20
- package/dist/type/decorator/api/filter/index.js.map +1 -1
- package/dist/type/decorator/api/filter/order-by.type.js +1 -2
- package/dist/type/decorator/api/filter/order-by.type.js.map +1 -1
- package/dist/type/decorator/api/function/create-properties.type.d.ts +2 -0
- package/dist/type/decorator/api/function/create-properties.type.js +2 -0
- package/dist/type/decorator/api/function/create-properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/delete-criteria.type.d.ts +2 -0
- package/dist/type/decorator/api/function/delete-criteria.type.js +2 -0
- package/dist/type/decorator/api/function/delete-criteria.type.js.map +1 -0
- package/dist/type/decorator/api/function/get-list-properties.type.d.ts +5 -0
- package/dist/type/decorator/api/function/get-list-properties.type.js +2 -0
- package/dist/type/decorator/api/function/get-list-properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/get-many.properties.d.ts +2 -0
- package/dist/type/decorator/api/function/get-many.properties.js +2 -0
- package/dist/type/decorator/api/function/get-many.properties.js.map +1 -0
- package/dist/type/decorator/api/function/get-properties.type.d.ts +2 -0
- package/dist/type/decorator/api/function/get-properties.type.js +2 -0
- package/dist/type/decorator/api/function/get-properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/index.d.ts +8 -5
- package/dist/type/decorator/api/function/index.js +8 -21
- package/dist/type/decorator/api/function/index.js.map +1 -1
- package/dist/type/decorator/api/function/properties.type.js +1 -2
- package/dist/type/decorator/api/function/properties.type.js.map +1 -1
- package/dist/type/decorator/api/function/update-criteria.type.d.ts +2 -0
- package/dist/type/decorator/api/function/update-criteria.type.js +2 -0
- package/dist/type/decorator/api/function/update-criteria.type.js.map +1 -0
- package/dist/type/decorator/api/function/update-properties.type.d.ts +2 -0
- package/dist/type/decorator/api/function/update-properties.type.js +2 -0
- package/dist/type/decorator/api/function/update-properties.type.js.map +1 -0
- package/dist/type/decorator/api/index.d.ts +1 -0
- package/dist/type/decorator/api/index.js +5 -20
- package/dist/type/decorator/api/index.js.map +1 -1
- package/dist/type/decorator/api/property/describe/array/index.js +2 -18
- package/dist/type/decorator/api/property/describe/array/index.js.map +1 -1
- package/dist/type/decorator/api/property/describe/array/optional-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/array/optional-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/array/required-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/array/required-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/base-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/base-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/boolean-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/boolean-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/date-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/date-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/dto/body-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/dto/body-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/dto/guard-properties.type.d.ts +6 -0
- package/dist/type/decorator/api/property/describe/dto/guard-properties.type.js +2 -0
- package/dist/type/decorator/api/property/describe/dto/guard-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/dto/index.js +5 -21
- package/dist/type/decorator/api/property/describe/dto/index.js.map +1 -1
- package/dist/type/decorator/api/property/describe/dto/properties.type.d.ts +2 -0
- package/dist/type/decorator/api/property/describe/dto/properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/dto/properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/dto/query/get-list-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/dto/query/get-list-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/dto/query/index.js +2 -18
- package/dist/type/decorator/api/property/describe/dto/query/index.js.map +1 -1
- package/dist/type/decorator/api/property/describe/dto/query/properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/dto/query/properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/dto/request-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/dto/request-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/dto/response-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/dto/response-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/example-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/example-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/index.js +12 -28
- package/dist/type/decorator/api/property/describe/index.js.map +1 -1
- package/dist/type/decorator/api/property/describe/number-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/number-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/object-properties.type.d.ts +1 -1
- package/dist/type/decorator/api/property/describe/object-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/object-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/properties/base-dto-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/properties/base-dto-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/properties/base-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/properties/base-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/properties/index.js +2 -18
- package/dist/type/decorator/api/property/describe/properties/index.js.map +1 -1
- package/dist/type/decorator/api/property/describe/properties.type.d.ts +2 -2
- package/dist/type/decorator/api/property/describe/properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/relation-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/relation-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/string-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/string-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/describe/uuid-properties.type.js +1 -2
- package/dist/type/decorator/api/property/describe/uuid-properties.type.js.map +1 -1
- package/dist/type/decorator/api/property/index.js +1 -17
- package/dist/type/decorator/api/property/index.js.map +1 -1
- package/dist/type/decorator/api/service/index.d.ts +2 -0
- package/dist/type/decorator/api/service/index.js +3 -0
- package/dist/type/decorator/api/service/index.js.map +1 -0
- package/dist/type/decorator/api/service/keys.type.d.ts +4 -0
- package/dist/type/decorator/api/service/keys.type.js +2 -0
- package/dist/type/decorator/api/service/keys.type.js.map +1 -0
- package/dist/type/decorator/api/service/properties.type.js +2 -0
- package/dist/type/decorator/api/service/properties.type.js.map +1 -0
- package/dist/type/decorator/index.js +1 -17
- package/dist/type/decorator/index.js.map +1 -1
- package/dist/type/factory/api/controller/index.d.ts +3 -0
- package/dist/type/factory/api/controller/index.js +4 -17
- package/dist/type/factory/api/controller/index.js.map +1 -1
- package/dist/type/factory/api/controller/method-map.type.d.ts +12 -0
- package/dist/type/factory/api/controller/method-map.type.js +2 -0
- package/dist/type/factory/api/controller/method-map.type.js.map +1 -0
- package/dist/type/factory/api/controller/method-name-map.type.d.ts +5 -0
- package/dist/type/factory/api/controller/method-name-map.type.js +2 -0
- package/dist/type/factory/api/controller/method-name-map.type.js.map +1 -0
- package/dist/type/factory/api/controller/method-name.type.d.ts +4 -0
- package/dist/type/factory/api/controller/method-name.type.js +2 -0
- package/dist/type/factory/api/controller/method-name.type.js.map +1 -0
- package/dist/type/factory/api/controller/target-methods.type.d.ts +9 -1
- package/dist/type/factory/api/controller/target-methods.type.js +1 -2
- package/dist/type/factory/api/controller/target-methods.type.js.map +1 -1
- package/dist/type/factory/api/index.js +1 -17
- package/dist/type/factory/api/index.js.map +1 -1
- package/dist/type/factory/index.js +1 -17
- package/dist/type/factory/index.js.map +1 -1
- package/dist/type/index.d.ts +2 -0
- package/dist/type/index.js +5 -19
- package/dist/type/index.js.map +1 -1
- package/dist/type/utility/capitalize-string.type.d.ts +1 -0
- package/dist/type/utility/capitalize-string.type.js +2 -0
- package/dist/type/utility/capitalize-string.type.js.map +1 -0
- package/dist/type/utility/dto/generate-allowed-combination.type.js +1 -2
- package/dist/type/utility/dto/generate-allowed-combination.type.js.map +1 -1
- package/dist/type/utility/dto/generate-is-allowed-combination.type.js +1 -2
- package/dist/type/utility/dto/generate-is-allowed-combination.type.js.map +1 -1
- package/dist/type/utility/dto/index.js +2 -18
- package/dist/type/utility/dto/index.js.map +1 -1
- package/dist/type/utility/index.d.ts +1 -0
- package/dist/type/utility/index.js +2 -17
- package/dist/type/utility/index.js.map +1 -1
- package/dist/utility/api/controller/apply-decorators.utility.d.ts +4 -0
- package/dist/utility/api/controller/apply-decorators.utility.js +65 -0
- package/dist/utility/api/controller/apply-decorators.utility.js.map +1 -0
- package/dist/utility/api/controller/apply-metadata.utility.d.ts +4 -0
- package/dist/utility/api/controller/apply-metadata.utility.js +43 -0
- package/dist/utility/api/controller/apply-metadata.utility.js.map +1 -0
- package/dist/utility/api/controller/get-method-name.utility.js +4 -7
- package/dist/utility/api/controller/get-method-name.utility.js.map +1 -1
- package/dist/utility/api/controller/get-primary-column.utility.d.ts +3 -0
- package/dist/utility/api/controller/get-primary-column.utility.js +11 -0
- package/dist/utility/api/controller/get-primary-column.utility.js.map +1 -0
- package/dist/utility/api/controller/handle-request-relations.utility.d.ts +4 -0
- package/dist/utility/api/controller/handle-request-relations.utility.js +56 -0
- package/dist/utility/api/controller/handle-request-relations.utility.js.map +1 -0
- package/dist/utility/api/controller/index.d.ts +5 -0
- package/dist/utility/api/controller/index.js +7 -18
- package/dist/utility/api/controller/index.js.map +1 -1
- package/dist/utility/api/controller/transform-request.utility.d.ts +17 -0
- package/dist/utility/api/controller/transform-request.utility.js +126 -0
- package/dist/utility/api/controller/transform-request.utility.js.map +1 -0
- package/dist/utility/api/controller/validate-request.utility.d.ts +3 -0
- package/dist/utility/api/controller/validate-request.utility.js +13 -0
- package/dist/utility/api/controller/validate-request.utility.js.map +1 -0
- package/dist/utility/api/controller/write-dto-swagger.utility.d.ts +4 -0
- package/dist/utility/api/controller/write-dto-swagger.utility.js +42 -0
- package/dist/utility/api/controller/write-dto-swagger.utility.js.map +1 -0
- package/dist/utility/api/controller/write-method.utility.d.ts +2 -2
- package/dist/utility/api/controller/write-method.utility.js +6 -9
- package/dist/utility/api/controller/write-method.utility.js.map +1 -1
- package/dist/utility/api/filter-order-by-from-entity.utility.d.ts +1 -1
- package/dist/utility/api/filter-order-by-from-entity.utility.js +7 -10
- package/dist/utility/api/filter-order-by-from-entity.utility.js.map +1 -1
- package/dist/utility/api/index.js +2 -18
- package/dist/utility/api/index.js.map +1 -1
- package/dist/utility/capitalize-string.utility.js +1 -4
- package/dist/utility/capitalize-string.utility.js.map +1 -1
- package/dist/utility/dto/analize.utility.js +3 -6
- package/dist/utility/dto/analize.utility.js.map +1 -1
- package/dist/utility/dto/build-decorator.utility.d.ts +3 -1
- package/dist/utility/dto/build-decorator.utility.js +21 -20
- package/dist/utility/dto/build-decorator.utility.js.map +1 -1
- package/dist/utility/dto/generate-decorator.utility.d.ts +2 -1
- package/dist/utility/dto/generate-decorator.utility.js +8 -12
- package/dist/utility/dto/generate-decorator.utility.js.map +1 -1
- package/dist/utility/dto/generate-exception.utility.js +24 -27
- package/dist/utility/dto/generate-exception.utility.js.map +1 -1
- package/dist/utility/dto/generate-relation-response.utility.d.ts +4 -0
- package/dist/utility/dto/generate-relation-response.utility.js +23 -0
- package/dist/utility/dto/generate-relation-response.utility.js.map +1 -0
- package/dist/utility/dto/generate.utility.d.ts +3 -2
- package/dist/utility/dto/generate.utility.js +57 -64
- package/dist/utility/dto/generate.utility.js.map +1 -1
- package/dist/utility/dto/get-base-class.utility.d.ts +1 -1
- package/dist/utility/dto/get-base-class.utility.js +16 -19
- package/dist/utility/dto/get-base-class.utility.js.map +1 -1
- package/dist/utility/dto/get-decorator-config.utility.js +5 -9
- package/dist/utility/dto/get-decorator-config.utility.js.map +1 -1
- package/dist/utility/dto/handle-date-property.utility.js +5 -8
- package/dist/utility/dto/handle-date-property.utility.js.map +1 -1
- package/dist/utility/dto/index.d.ts +2 -0
- package/dist/utility/dto/index.js +11 -25
- package/dist/utility/dto/index.js.map +1 -1
- package/dist/utility/dto/is-property-exposed-for-guard.utility.d.ts +5 -0
- package/dist/utility/dto/is-property-exposed-for-guard.utility.js +13 -0
- package/dist/utility/dto/is-property-exposed-for-guard.utility.js.map +1 -0
- package/dist/utility/dto/is-property-should-be-marked.utility.d.ts +5 -0
- package/dist/utility/dto/is-property-should-be-marked.utility.js +29 -0
- package/dist/utility/dto/is-property-should-be-marked.utility.js.map +1 -0
- package/dist/utility/dto/is-should-be-generated.utility.js +10 -14
- package/dist/utility/dto/is-should-be-generated.utility.js.map +1 -1
- package/dist/utility/dto/validate-property-config.utility.js +4 -8
- package/dist/utility/dto/validate-property-config.utility.js.map +1 -1
- package/dist/utility/error-exception.utility.js +1 -4
- package/dist/utility/error-exception.utility.js.map +1 -1
- package/dist/utility/error-string.utility.js +1 -4
- package/dist/utility/error-string.utility.js.map +1 -1
- package/dist/utility/generate-entity-information.utility.d.ts +1 -1
- package/dist/utility/generate-entity-information.utility.js +12 -15
- package/dist/utility/generate-entity-information.utility.js.map +1 -1
- package/dist/utility/get-entity-columns.utility.d.ts +1 -2
- package/dist/utility/get-entity-columns.utility.js +15 -8
- package/dist/utility/get-entity-columns.utility.js.map +1 -1
- package/dist/utility/index.js +7 -23
- package/dist/utility/index.js.map +1 -1
- package/dist/validator/all-or-none-of-listed-properties.validator.js +4 -7
- package/dist/validator/all-or-none-of-listed-properties.validator.js.map +1 -1
- package/dist/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js +4 -7
- package/dist/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js.map +1 -1
- package/dist/validator/has-at-least-one-of-listed-properties.validator.js +4 -7
- package/dist/validator/has-at-least-one-of-listed-properties.validator.js.map +1 -1
- package/dist/validator/has-at-least-one-property.validator.js +4 -7
- package/dist/validator/has-at-least-one-property.validator.js.map +1 -1
- package/dist/validator/index.js +6 -22
- package/dist/validator/index.js.map +1 -1
- package/dist/validator/is-regular-expression.validator.js +4 -7
- package/dist/validator/is-regular-expression.validator.js.map +1 -1
- package/dist/validator/only-one-of-listed-properties.validator.js +4 -7
- package/dist/validator/only-one-of-listed-properties.validator.js.map +1 -1
- package/package.json +79 -55
- package/dist/class/api/base-service.class.d.ts +0 -10
- package/dist/class/api/base-service.class.js +0 -31
- package/dist/class/api/base-service.class.js.map +0 -1
- package/dist/helper/index.d.ts +0 -1
- package/dist/helper/index.js +0 -3
- package/dist/helper/index.js.map +0 -1
- package/dist/interface/decorator/api/base-controller.interface.d.ts +0 -4
- package/dist/interface/decorator/api/base-controller.interface.js +0 -3
- package/dist/interface/decorator/api/base-controller.interface.js.map +0 -1
- package/dist/interface/decorator/api/controller-properties.interface.d.ts +0 -26
- package/dist/interface/decorator/api/controller-properties.interface.js +0 -3
- package/dist/interface/decorator/api/controller-properties.interface.js.map +0 -1
- package/dist/interface/decorator/api/function/create-properties.interface.js +0 -3
- package/dist/interface/decorator/api/function/create-properties.interface.js.map +0 -1
- package/dist/interface/service.interface.d.ts +0 -1
- package/dist/interface/service.interface.js +0 -3
- package/dist/interface/service.interface.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/type/decorator/api/function/create/executor-properties.type.js +0 -3
- package/dist/type/decorator/api/function/create/executor-properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/create/index.d.ts +0 -2
- package/dist/type/decorator/api/function/create/index.js +0 -19
- package/dist/type/decorator/api/function/create/index.js.map +0 -1
- package/dist/type/decorator/api/function/create/properties.type.d.ts +0 -1
- package/dist/type/decorator/api/function/create/properties.type.js +0 -3
- package/dist/type/decorator/api/function/create/properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/delete/executor-properties.type.d.ts +0 -9
- package/dist/type/decorator/api/function/delete/executor-properties.type.js +0 -3
- package/dist/type/decorator/api/function/delete/executor-properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/delete/index.d.ts +0 -1
- package/dist/type/decorator/api/function/delete/index.js +0 -18
- package/dist/type/decorator/api/function/delete/index.js.map +0 -1
- package/dist/type/decorator/api/function/get/executor-properties.type.d.ts +0 -7
- package/dist/type/decorator/api/function/get/executor-properties.type.js +0 -3
- package/dist/type/decorator/api/function/get/executor-properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/get/index.d.ts +0 -2
- package/dist/type/decorator/api/function/get/index.js +0 -19
- package/dist/type/decorator/api/function/get/index.js.map +0 -1
- package/dist/type/decorator/api/function/get/properties.type.d.ts +0 -6
- package/dist/type/decorator/api/function/get/properties.type.js +0 -3
- package/dist/type/decorator/api/function/get/properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/get-list/base-properties.type.d.ts +0 -16
- package/dist/type/decorator/api/function/get-list/base-properties.type.js +0 -3
- package/dist/type/decorator/api/function/get-list/base-properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/get-list/executor-properties.type.d.ts +0 -9
- package/dist/type/decorator/api/function/get-list/executor-properties.type.js +0 -3
- package/dist/type/decorator/api/function/get-list/executor-properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/get-list/index.d.ts +0 -3
- package/dist/type/decorator/api/function/get-list/index.js +0 -20
- package/dist/type/decorator/api/function/get-list/index.js.map +0 -1
- package/dist/type/decorator/api/function/get-list/properties.type.d.ts +0 -9
- package/dist/type/decorator/api/function/get-list/properties.type.js +0 -3
- package/dist/type/decorator/api/function/get-list/properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/update/executor-properties.type.d.ts +0 -11
- package/dist/type/decorator/api/function/update/executor-properties.type.js +0 -3
- package/dist/type/decorator/api/function/update/executor-properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/update/index.d.ts +0 -2
- package/dist/type/decorator/api/function/update/index.js +0 -19
- package/dist/type/decorator/api/function/update/index.js.map +0 -1
- package/dist/type/decorator/api/function/update/properties.type.d.ts +0 -1
- package/dist/type/decorator/api/function/update/properties.type.js +0 -3
- package/dist/type/decorator/api/function/update/properties.type.js.map +0 -1
- package/dist/type/decorator/api/service-properties.type.js +0 -3
- package/dist/type/decorator/api/service-properties.type.js.map +0 -1
- package/dist/utility/dto/is-property-should-be-enabled.utility.d.ts +0 -3
- package/dist/utility/dto/is-property-should-be-enabled.utility.js +0 -26
- package/dist/utility/dto/is-property-should-be-enabled.utility.js.map +0 -1
- /package/dist/type/decorator/api/{service-properties.type.d.ts → service/properties.type.d.ts} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# API Controller Configuration Documentation
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
The API Controller configuration is a TypeScript-based configuration system that provides a comprehensive way to define API endpoints with authentication, request/response handling, validation, and data transformation capabilities.
|
|
5
|
+
|
|
6
|
+
## Table of Contents
|
|
7
|
+
- [Basic Configuration Structure](#basic-configuration-structure)
|
|
8
|
+
- [Route Configuration](#route-configuration)
|
|
9
|
+
- [Authentication](#authentication)
|
|
10
|
+
- [Request Handling](#request-handling)
|
|
11
|
+
- [Response Handling](#response-handling)
|
|
12
|
+
- [Data Transformation](#data-transformation)
|
|
13
|
+
- [Validation](#validation)
|
|
14
|
+
- [Relations Management](#relations-management)
|
|
15
|
+
- [Auto DTO Configuration](#auto-dto-configuration)
|
|
16
|
+
|
|
17
|
+
## Basic Configuration Structure
|
|
18
|
+
|
|
19
|
+
The base configuration object follows this interface:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
interface IApiControllerProperties<E> {
|
|
23
|
+
entity: IApiBaseEntity;
|
|
24
|
+
name?: string;
|
|
25
|
+
path?: string;
|
|
26
|
+
routes: {
|
|
27
|
+
[R in EApiRouteType]?: TApiControllerPropertiesRoute<E, R>;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Properties:
|
|
33
|
+
- `entity`: The base entity class for the controller
|
|
34
|
+
- `name`: Optional name for the controller
|
|
35
|
+
- `path`: Optional URL path for the controller
|
|
36
|
+
- `routes`: Object containing route configurations
|
|
37
|
+
|
|
38
|
+
## Route Configuration
|
|
39
|
+
|
|
40
|
+
Routes are defined using the `EApiRouteType` enum, which includes:
|
|
41
|
+
- CREATE
|
|
42
|
+
- GET
|
|
43
|
+
- GET_LIST
|
|
44
|
+
- UPDATE
|
|
45
|
+
- PARTIAL_UPDATE
|
|
46
|
+
- DELETE
|
|
47
|
+
|
|
48
|
+
Each route can be configured with:
|
|
49
|
+
- Authentication settings
|
|
50
|
+
- Request handling
|
|
51
|
+
- Response handling
|
|
52
|
+
- Data transformations
|
|
53
|
+
- Validation rules
|
|
54
|
+
|
|
55
|
+
Example:
|
|
56
|
+
```typescript
|
|
57
|
+
{
|
|
58
|
+
[EApiRouteType.CREATE]: {
|
|
59
|
+
authentication: {...},
|
|
60
|
+
request: {...},
|
|
61
|
+
response: {...}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Authentication
|
|
67
|
+
|
|
68
|
+
Authentication configuration allows you to specify:
|
|
69
|
+
- Bearer token strategies
|
|
70
|
+
- Security strategies
|
|
71
|
+
- Authentication guards
|
|
72
|
+
- Authentication type
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
interface IApiControllerPropertiesRouteAuthentication {
|
|
76
|
+
bearerStrategies?: Array<string>;
|
|
77
|
+
guard: Type<IAuthGuard>;
|
|
78
|
+
securityStrategies?: Array<string>;
|
|
79
|
+
type: EApiAuthenticationType;
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Example:
|
|
84
|
+
```typescript
|
|
85
|
+
authentication: {
|
|
86
|
+
bearerStrategies: ["accountAuthorization"],
|
|
87
|
+
guard: AccountGuard,
|
|
88
|
+
securityStrategies: ["accountRequestSignature", "accountRequestTimestamp"],
|
|
89
|
+
type: EApiAuthenticationType.ACCOUNT
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Request Handling
|
|
94
|
+
|
|
95
|
+
Request configuration includes:
|
|
96
|
+
- Relations loading
|
|
97
|
+
- Data transformation
|
|
98
|
+
- Request validation
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
interface IApiControllerPropertiesRouteBaseRequest<E, R> {
|
|
102
|
+
relations?: TApiControllerPropertiesRouteBaseRequestRelations<E>;
|
|
103
|
+
transformers?: TApiControllerPropertiesRouteBaseRequestTransformers<E, R>;
|
|
104
|
+
validators?: Array<IApiRequestValidator<E>>;
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Relations Loading Strategies
|
|
109
|
+
|
|
110
|
+
Two strategies are available:
|
|
111
|
+
1. **AUTO**: Automatically loads relations
|
|
112
|
+
2. **MANUAL**: Manually specify relations to load
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
relations: {
|
|
116
|
+
loadRelations: true,
|
|
117
|
+
relationsLoadStrategy: EApiControllerLoadRelationsStrategy.MANUAL,
|
|
118
|
+
relationsToLoad: ["bank"],
|
|
119
|
+
servicesLoadStrategy: EApiControllerLoadRelationsStrategy.MANUAL,
|
|
120
|
+
relationsServices: {
|
|
121
|
+
bank: "bankService"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Response Handling
|
|
127
|
+
|
|
128
|
+
Response configuration allows you to:
|
|
129
|
+
- Specify relations to include
|
|
130
|
+
- Transform response data
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
interface IApiControllerPropertiesRouteBaseResponse<E, R> {
|
|
134
|
+
relations?: FindOptionsRelations<E>;
|
|
135
|
+
transformers?: TApiControllerPropertiesRouteBaseResponseTransformers<E, R>;
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Example:
|
|
140
|
+
```typescript
|
|
141
|
+
response: {
|
|
142
|
+
relations: {
|
|
143
|
+
bank: true,
|
|
144
|
+
currency: true
|
|
145
|
+
},
|
|
146
|
+
transformers: {
|
|
147
|
+
[EApiDtoType.RESPONSE]: [
|
|
148
|
+
{
|
|
149
|
+
key: "user",
|
|
150
|
+
type: EApiControllerRequestTransformerType.DYNAMIC,
|
|
151
|
+
value: TRANSFORMER_VALUE_DTO_CONSTANT.REQUEST_IP
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Data Transformation
|
|
159
|
+
|
|
160
|
+
Transformers can be configured for different DTO types:
|
|
161
|
+
- BODY
|
|
162
|
+
- QUERY
|
|
163
|
+
- REQUEST
|
|
164
|
+
- RESPONSE
|
|
165
|
+
|
|
166
|
+
Two types of transformers are available:
|
|
167
|
+
1. **DYNAMIC**: Uses predefined constants
|
|
168
|
+
2. **STATIC**: Uses static values
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
type TApiRequestTransformer<E> = {
|
|
172
|
+
key: keyof IApiGetListResponseResult<E> | keyof Partial<E> | keyof TApiFunctionGetListProperties<E>;
|
|
173
|
+
} & (
|
|
174
|
+
| {
|
|
175
|
+
type: EApiControllerRequestTransformerType.DYNAMIC;
|
|
176
|
+
value: (typeof TRANSFORMER_VALUE_DTO_CONSTANT)[keyof typeof TRANSFORMER_VALUE_DTO_CONSTANT];
|
|
177
|
+
}
|
|
178
|
+
| {
|
|
179
|
+
type: EApiControllerRequestTransformerType.STATIC;
|
|
180
|
+
value: string;
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Validation
|
|
186
|
+
|
|
187
|
+
Validators can be configured for requests with:
|
|
188
|
+
- Error type
|
|
189
|
+
- Exception class
|
|
190
|
+
- Validation function
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
interface IApiRequestValidator<E> {
|
|
194
|
+
errorType: EErrorStringAction;
|
|
195
|
+
exception: TApiException;
|
|
196
|
+
validationFunction: (entity: DeepPartial<E> | Partial<E> | TApiFunctionGetListProperties<E>) => boolean | Promise<boolean>;
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Example:
|
|
201
|
+
```typescript
|
|
202
|
+
validators: [
|
|
203
|
+
{
|
|
204
|
+
errorType: EErrorStringAction.ADDRESS_NOT_MATCH_PATTERN,
|
|
205
|
+
exception: BadRequestException,
|
|
206
|
+
validationFunction: (account: Partial<Account>): boolean =>
|
|
207
|
+
(account.id?.includes("7") ? account.id.includes("AAAA") : true)
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Auto DTO Configuration
|
|
213
|
+
|
|
214
|
+
Auto DTO allows automatic Data Transfer Object configuration:
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
autoDto?: {
|
|
218
|
+
[key in EApiDtoType]?: IApiControllerPropertiesRouteAutoDtoConfig;
|
|
219
|
+
};
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Example:
|
|
223
|
+
```typescript
|
|
224
|
+
autoDto: {
|
|
225
|
+
[EApiDtoType.REQUEST]: {
|
|
226
|
+
validators: [
|
|
227
|
+
{
|
|
228
|
+
constraintClass: HasAtLeastOneOfListedProperties,
|
|
229
|
+
options: ["hybrid", "currencyId"]
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Usage Example
|
|
237
|
+
|
|
238
|
+
Here's a complete example of a route configuration:
|
|
239
|
+
|
|
240
|
+
```typescript
|
|
241
|
+
[EApiRouteType.CREATE]: {
|
|
242
|
+
authentication: {
|
|
243
|
+
bearerStrategies: ["accountAuthorization"],
|
|
244
|
+
guard: AccountGuard,
|
|
245
|
+
securityStrategies: ["accountRequestSignature", "accountRequestTimestamp"],
|
|
246
|
+
type: EApiAuthenticationType.ACCOUNT
|
|
247
|
+
},
|
|
248
|
+
request: {
|
|
249
|
+
relations: {
|
|
250
|
+
loadRelations: true,
|
|
251
|
+
relationsLoadStrategy: EApiControllerLoadRelationsStrategy.MANUAL,
|
|
252
|
+
relationsServices: {
|
|
253
|
+
bank: "bankService"
|
|
254
|
+
},
|
|
255
|
+
relationsToLoad: ["bank"],
|
|
256
|
+
servicesLoadStrategy: EApiControllerLoadRelationsStrategy.MANUAL
|
|
257
|
+
},
|
|
258
|
+
transformers: {
|
|
259
|
+
[EApiDtoType.BODY]: [
|
|
260
|
+
{
|
|
261
|
+
key: "user",
|
|
262
|
+
type: EApiControllerRequestTransformerType.DYNAMIC,
|
|
263
|
+
value: TRANSFORMER_VALUE_DTO_CONSTANT.AUTHORIZED_ENTITY
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
validators: [
|
|
268
|
+
{
|
|
269
|
+
errorType: EErrorStringAction.ADDRESS_NOT_MATCH_PATTERN,
|
|
270
|
+
exception: BadRequestException,
|
|
271
|
+
validationFunction: (account: Partial<Account>): boolean =>
|
|
272
|
+
(account.id?.includes("7") ? account.id.includes("AAAA") : true)
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
response: {
|
|
277
|
+
relations: {
|
|
278
|
+
bank: true,
|
|
279
|
+
currency: true
|
|
280
|
+
},
|
|
281
|
+
transformers: {
|
|
282
|
+
[EApiDtoType.RESPONSE]: [
|
|
283
|
+
{
|
|
284
|
+
key: "user",
|
|
285
|
+
type: EApiControllerRequestTransformerType.DYNAMIC,
|
|
286
|
+
value: TRANSFORMER_VALUE_DTO_CONSTANT.REQUEST_IP
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## Best Practices
|
|
295
|
+
|
|
296
|
+
1. **Authentication**
|
|
297
|
+
- Always specify appropriate bearer and security strategies
|
|
298
|
+
- Use proper guards for route protection
|
|
299
|
+
- Choose the correct authentication type
|
|
300
|
+
|
|
301
|
+
2. **Relations**
|
|
302
|
+
- Use MANUAL strategy when you need precise control over relation loading
|
|
303
|
+
- Use AUTO strategy for simpler cases
|
|
304
|
+
- Always specify required services when using MANUAL strategy
|
|
305
|
+
|
|
306
|
+
3. **Validation**
|
|
307
|
+
- Implement comprehensive validation rules
|
|
308
|
+
- Use appropriate error types and exceptions
|
|
309
|
+
- Consider both sync and async validation functions
|
|
310
|
+
|
|
311
|
+
4. **Transformation**
|
|
312
|
+
- Use DYNAMIC transformers for runtime values
|
|
313
|
+
- Use STATIC transformers for constant values
|
|
314
|
+
- Consider the DTO type when applying transformations
|
|
315
|
+
|
|
316
|
+
## Notes
|
|
317
|
+
|
|
318
|
+
- All configurations are type-safe with TypeScript
|
|
319
|
+
- Relations loading can be controlled at a granular level
|
|
320
|
+
- Transformers can be applied at multiple stages of request/response handling
|
|
321
|
+
- Validation can be both synchronous and asynchronous
|
|
322
|
+
- Auto DTO configuration provides a simplified way to handle data transfer objects
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./base
|
|
1
|
+
export * from "./service-base.class";
|
package/dist/class/api/index.js
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./base-service.class"), exports);
|
|
1
|
+
export * from "./service-base.class";
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/class/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IApiGetListResponseResult } from "../../interface";
|
|
2
|
+
import type { TApiFunctionGetManyProperties, TApiFunctionUpdateCriteria } from "../../type";
|
|
3
|
+
import type { TApiFunctionCreateProperties, TApiFunctionDeleteCriteria, TApiFunctionGetListProperties, TApiFunctionGetProperties, TApiFunctionUpdateProperties } from "../../type";
|
|
4
|
+
export declare class ApiServiceBase<E> {
|
|
5
|
+
create(properties: TApiFunctionCreateProperties<E>): Promise<E>;
|
|
6
|
+
delete(criteria: TApiFunctionDeleteCriteria<E>): Promise<void>;
|
|
7
|
+
get(properties: TApiFunctionGetProperties<E>): Promise<E>;
|
|
8
|
+
getList(properties: TApiFunctionGetListProperties<E>): Promise<IApiGetListResponseResult<E>>;
|
|
9
|
+
getMany(properties: TApiFunctionGetManyProperties<E>): Promise<Array<E>>;
|
|
10
|
+
update(criteria: TApiFunctionUpdateCriteria<E>, properties: TApiFunctionUpdateProperties<E>): Promise<E>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export class ApiServiceBase {
|
|
2
|
+
create(properties) {
|
|
3
|
+
void properties;
|
|
4
|
+
return Promise.resolve({});
|
|
5
|
+
}
|
|
6
|
+
delete(criteria) {
|
|
7
|
+
void criteria;
|
|
8
|
+
return Promise.resolve();
|
|
9
|
+
}
|
|
10
|
+
get(properties) {
|
|
11
|
+
void properties;
|
|
12
|
+
return Promise.resolve({});
|
|
13
|
+
}
|
|
14
|
+
getList(properties) {
|
|
15
|
+
void properties;
|
|
16
|
+
return Promise.resolve({ items: [], total: 0 });
|
|
17
|
+
}
|
|
18
|
+
getMany(properties) {
|
|
19
|
+
void properties;
|
|
20
|
+
return Promise.resolve([]);
|
|
21
|
+
}
|
|
22
|
+
update(criteria, properties) {
|
|
23
|
+
void criteria;
|
|
24
|
+
void properties;
|
|
25
|
+
return Promise.resolve({});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=service-base.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-base.class.js","sourceRoot":"","sources":["../../../src/class/api/service-base.class.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,cAAc;IAC1B,MAAM,CAAC,UAA2C;QACjD,KAAK,UAAU,CAAC;QAEhB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAO,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,QAAuC;QAC7C,KAAK,QAAQ,CAAC;QAEd,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAED,GAAG,CAAC,UAAwC;QAC3C,KAAK,UAAU,CAAC;QAEhB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAO,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,CAAC,UAA4C;QACnD,KAAK,UAAU,CAAC;QAEhB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAA6C,CAAC,CAAC;IAC5F,CAAC;IAED,OAAO,CAAC,UAA4C;QACnD,KAAK,UAAU,CAAC;QAEhB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,QAAuC,EAAE,UAA2C;QAC1F,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU,CAAC;QAEhB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAO,CAAC,CAAC;IACjC,CAAC;CACD"}
|
package/dist/class/index.js
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./api"), exports);
|
|
18
|
-
__exportStar(require("./metadata-storage.class"), exports);
|
|
19
|
-
__exportStar(require("./utility"), exports);
|
|
1
|
+
export * from "./api";
|
|
2
|
+
export * from "./metadata-storage.class";
|
|
3
|
+
export * from "./utility";
|
|
20
4
|
//# sourceMappingURL=index.js.map
|
package/dist/class/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/class/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,0BAA0B,CAAC;AACzC,cAAc,WAAW,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import type { IMetadataEntry } from "../interface";
|
|
2
|
+
import type { TMetadata } from "../type";
|
|
1
3
|
export declare class MetadataStorage {
|
|
2
4
|
private static instance;
|
|
3
5
|
private readonly STORAGE;
|
|
4
6
|
static getInstance(): MetadataStorage;
|
|
5
|
-
getAllEntitiesMetadata(): Record<string,
|
|
6
|
-
getMetadata(entityName: string
|
|
7
|
-
|
|
7
|
+
getAllEntitiesMetadata(): Record<string, TMetadata>;
|
|
8
|
+
getMetadata(entityName: string): TMetadata | undefined;
|
|
9
|
+
getMetadata(entityName: string, propertyName: string): IMetadataEntry | undefined;
|
|
10
|
+
getMetadata<K extends keyof IMetadataEntry>(entityName: string, propertyName: string, key: K): IMetadataEntry[K] | undefined;
|
|
11
|
+
setMetadata<K extends keyof IMetadataEntry>(entityName: string, propertyName: string, key: K, value: IMetadataEntry[K]): void;
|
|
8
12
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.MetadataStorage = void 0;
|
|
4
|
-
class MetadataStorage {
|
|
1
|
+
import { PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT } from "../constant";
|
|
2
|
+
export class MetadataStorage {
|
|
5
3
|
static instance;
|
|
6
4
|
STORAGE = new Map();
|
|
7
5
|
static getInstance() {
|
|
@@ -36,10 +34,10 @@ class MetadataStorage {
|
|
|
36
34
|
}
|
|
37
35
|
const entityMetadata = this.STORAGE.get(entityName);
|
|
38
36
|
if (!entityMetadata.has(propertyName)) {
|
|
39
|
-
entityMetadata.set(propertyName, {});
|
|
37
|
+
entityMetadata.set(propertyName, { [PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT.METADATA_PROPERTY_NAME]: {} });
|
|
40
38
|
}
|
|
41
|
-
entityMetadata.get(propertyName)
|
|
39
|
+
const propertyMetadata = entityMetadata.get(propertyName);
|
|
40
|
+
propertyMetadata[key] = value;
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
|
-
exports.MetadataStorage = MetadataStorage;
|
|
45
43
|
//# sourceMappingURL=metadata-storage.class.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata-storage.class.js","sourceRoot":"
|
|
1
|
+
{"version":3,"file":"metadata-storage.class.js","sourceRoot":"","sources":["../../src/class/metadata-storage.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wCAAwC,EAAE,MAAM,aAAa,CAAC;AAMvE,MAAM,OAAO,eAAe;IACnB,MAAM,CAAC,QAAQ,CAAkB;IAExB,OAAO,GAA6C,IAAI,GAAG,EAAuC,CAAC;IAE7G,MAAM,CAAC,WAAW;QACxB,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;YAC/B,eAAe,CAAC,QAAQ,GAAG,IAAI,eAAe,EAAE,CAAC;QAClD,CAAC;QAED,OAAO,eAAe,CAAC,QAAQ,CAAC;IACjC,CAAC;IAEM,sBAAsB;QAC5B,MAAM,MAAM,GAA8B,EAAE,CAAC;QAE7C,KAAK,MAAM,CAAC,UAAU,EAAE,cAAc,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;YACnE,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAKM,WAAW,CAAC,UAAkB,EAAE,YAAqB,EAAE,GAA0B;QACvF,MAAM,cAAc,GAA4C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAE7F,IAAI,CAAC,cAAc;YAAE,OAAO,SAAS,CAAC;QAEtC,IAAI,CAAC,YAAY;YAAE,OAAO,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QAC7D,MAAM,gBAAgB,GAA+B,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAEtF,IAAI,CAAC,gBAAgB;YAAE,OAAO,SAAS,CAAC;QAExC,IAAI,CAAC,GAAG;YAAE,OAAO,gBAAgB,CAAC;QAElC,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAEM,WAAW,CAAiC,UAAkB,EAAE,YAAoB,EAAE,GAAM,EAAE,KAAwB;QAC5H,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QACzC,CAAC;QACD,MAAM,cAAc,GAAgC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC;QAElF,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YACvC,cAAc,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,wCAAwC,CAAC,sBAAsB,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC7G,CAAC;QAED,MAAM,gBAAgB,GAAmB,cAAc,CAAC,GAAG,CAAC,YAAY,CAAE,CAAC;QAC3E,gBAAgB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC/B,CAAC;CACD"}
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./strategy"), exports);
|
|
18
|
-
__exportStar(require("./property"), exports);
|
|
1
|
+
export * from "./strategy";
|
|
2
|
+
export * from "./property";
|
|
19
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/class/utility/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IApiEntity, IDtoGenerateFactory } from "../../../../../interface";
|
|
2
2
|
import type { TApiPropertyDescribeBooleanProperties, TApiPropertyDescribeDtoProperties } from "../../../../../type";
|
|
3
|
-
export declare class DtoPropertyFactoryBoolean implements IDtoGenerateFactory {
|
|
4
|
-
create(metadata: TApiPropertyDescribeBooleanProperties, entity: IApiEntity
|
|
3
|
+
export declare class DtoPropertyFactoryBoolean<E> implements IDtoGenerateFactory<E> {
|
|
4
|
+
create(metadata: TApiPropertyDescribeBooleanProperties, entity: IApiEntity<E>, config: TApiPropertyDescribeDtoProperties): PropertyDecorator;
|
|
5
5
|
}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.DtoPropertyFactoryBoolean = void 0;
|
|
4
|
-
const decorator_1 = require("../../../../../decorator");
|
|
5
|
-
class DtoPropertyFactoryBoolean {
|
|
1
|
+
import { ApiPropertyBoolean } from "../../../../../decorator";
|
|
2
|
+
export class DtoPropertyFactoryBoolean {
|
|
6
3
|
create(metadata, entity, config) {
|
|
7
|
-
return
|
|
4
|
+
return ApiPropertyBoolean({
|
|
8
5
|
description: metadata.description,
|
|
9
6
|
entity,
|
|
10
7
|
...config,
|
|
11
8
|
});
|
|
12
9
|
}
|
|
13
10
|
}
|
|
14
|
-
exports.DtoPropertyFactoryBoolean = DtoPropertyFactoryBoolean;
|
|
15
11
|
//# sourceMappingURL=boolean.class.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.class.js","sourceRoot":"
|
|
1
|
+
{"version":3,"file":"boolean.class.js","sourceRoot":"","sources":["../../../../../../src/class/utility/dto/property/factory/boolean.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAK9D,MAAM,OAAO,yBAAyB;IACrC,MAAM,CAAC,QAA+C,EAAE,MAAqB,EAAE,MAAyC;QACvH,OAAO,kBAAkB,CAAC;YACzB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,MAAM;YACN,GAAG,MAAM;SACT,CAAC,CAAC;IACJ,CAAC;CACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IApiEntity, IDtoGenerateFactory } from "../../../../../interface";
|
|
2
2
|
import type { TApiPropertyDescribeDateProperties, TApiPropertyDescribeDtoProperties } from "../../../../../type";
|
|
3
|
-
export declare class DtoPropertyFactoryDate implements IDtoGenerateFactory {
|
|
4
|
-
create(metadata: TApiPropertyDescribeDateProperties, entity: IApiEntity
|
|
3
|
+
export declare class DtoPropertyFactoryDate<E> implements IDtoGenerateFactory<E> {
|
|
4
|
+
create(metadata: TApiPropertyDescribeDateProperties, entity: IApiEntity<E>, config: TApiPropertyDescribeDtoProperties): PropertyDecorator;
|
|
5
5
|
}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.DtoPropertyFactoryDate = void 0;
|
|
4
|
-
const decorator_1 = require("../../../../../decorator");
|
|
5
|
-
class DtoPropertyFactoryDate {
|
|
1
|
+
import { ApiPropertyDate } from "../../../../../decorator";
|
|
2
|
+
export class DtoPropertyFactoryDate {
|
|
6
3
|
create(metadata, entity, config) {
|
|
7
|
-
return
|
|
4
|
+
return ApiPropertyDate({
|
|
8
5
|
entity,
|
|
9
6
|
...config,
|
|
10
7
|
type: metadata.dataType,
|
|
11
8
|
});
|
|
12
9
|
}
|
|
13
10
|
}
|
|
14
|
-
exports.DtoPropertyFactoryDate = DtoPropertyFactoryDate;
|
|
15
11
|
//# sourceMappingURL=date.class.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.class.js","sourceRoot":"
|
|
1
|
+
{"version":3,"file":"date.class.js","sourceRoot":"","sources":["../../../../../../src/class/utility/dto/property/factory/date.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAK3D,MAAM,OAAO,sBAAsB;IAClC,MAAM,CAAC,QAA4C,EAAE,MAAqB,EAAE,MAAyC;QACpH,OAAO,eAAe,CAAC;YACtB,MAAM;YACN,GAAG,MAAM;YACT,IAAI,EAAE,QAAQ,CAAC,QAAQ;SACvB,CAAC,CAAC;IACJ,CAAC;CACD"}
|
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./uuid.class"), exports);
|
|
18
|
-
__exportStar(require("./string.class"), exports);
|
|
19
|
-
__exportStar(require("./object.class"), exports);
|
|
20
|
-
__exportStar(require("./number.class"), exports);
|
|
21
|
-
__exportStar(require("./boolean.class"), exports);
|
|
22
|
-
__exportStar(require("./date.class"), exports);
|
|
1
|
+
export * from "./uuid.class";
|
|
2
|
+
export * from "./string.class";
|
|
3
|
+
export * from "./object.class";
|
|
4
|
+
export * from "./number.class";
|
|
5
|
+
export * from "./boolean.class";
|
|
6
|
+
export * from "./date.class";
|
|
23
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/class/utility/dto/property/factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IApiEntity, IDtoGenerateFactory } from "src/interface";
|
|
2
2
|
import type { TApiPropertyDescribeDtoProperties, TApiPropertyDescribeNumberProperties } from "src/type";
|
|
3
|
-
export declare class DtoPropertyFactoryNumber implements IDtoGenerateFactory {
|
|
4
|
-
create(metadata: TApiPropertyDescribeNumberProperties, entity: IApiEntity
|
|
3
|
+
export declare class DtoPropertyFactoryNumber<E> implements IDtoGenerateFactory<E> {
|
|
4
|
+
create(metadata: TApiPropertyDescribeNumberProperties, entity: IApiEntity<E>, config: TApiPropertyDescribeDtoProperties): PropertyDecorator;
|
|
5
5
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.DtoPropertyFactoryNumber = void 0;
|
|
4
|
-
const decorator_1 = require("../../../../../decorator");
|
|
5
|
-
class DtoPropertyFactoryNumber {
|
|
1
|
+
import { ApiPropertyNumber } from "../../../../../decorator";
|
|
2
|
+
export class DtoPropertyFactoryNumber {
|
|
6
3
|
create(metadata, entity, config) {
|
|
7
|
-
return
|
|
4
|
+
return ApiPropertyNumber({
|
|
8
5
|
description: metadata.description,
|
|
9
6
|
entity,
|
|
10
7
|
...config,
|
|
@@ -15,5 +12,4 @@ class DtoPropertyFactoryNumber {
|
|
|
15
12
|
});
|
|
16
13
|
}
|
|
17
14
|
}
|
|
18
|
-
exports.DtoPropertyFactoryNumber = DtoPropertyFactoryNumber;
|
|
19
15
|
//# sourceMappingURL=number.class.js.map
|