@elsikora/nestjs-crud-automator 1.6.3-dev.1 → 1.6.4-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/class/api/service-base.class.js +25 -0
- package/dist/cjs/class/api/service-base.class.js.map +1 -0
- package/dist/cjs/class/metadata-storage.class.js +50 -0
- package/dist/cjs/class/metadata-storage.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/property/factory/boolean.class.js +17 -0
- package/dist/cjs/class/utility/dto/property/factory/boolean.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/property/factory/date.class.js +17 -0
- package/dist/cjs/class/utility/dto/property/factory/date.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/property/factory/enum.class.js +17 -0
- package/dist/cjs/class/utility/dto/property/factory/enum.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/property/factory/number.class.d.ts +7 -0
- package/dist/cjs/class/utility/dto/property/factory/number.class.js +34 -0
- package/dist/cjs/class/utility/dto/property/factory/number.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/property/factory/object.class.js +18 -0
- package/dist/cjs/class/utility/dto/property/factory/object.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/property/factory/relation.class.js +31 -0
- package/dist/cjs/class/utility/dto/property/factory/relation.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/property/factory/string.class.js +17 -0
- package/dist/cjs/class/utility/dto/property/factory/string.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/property/factory/uuid.class.js +13 -0
- package/dist/cjs/class/utility/dto/property/factory/uuid.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/strategy/body.class.js +49 -0
- package/dist/cjs/class/utility/dto/strategy/body.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/strategy/query.class.js +46 -0
- package/dist/cjs/class/utility/dto/strategy/query.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/strategy/request.class.js +49 -0
- package/dist/cjs/class/utility/dto/strategy/request.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/strategy/response.class.js +49 -0
- package/dist/cjs/class/utility/dto/strategy/response.class.js.map +1 -0
- package/dist/cjs/constant/date.constant.js +11 -0
- package/dist/cjs/constant/date.constant.js.map +1 -0
- package/dist/cjs/constant/decorator/api/controller.constant.js +9 -0
- package/dist/cjs/constant/decorator/api/controller.constant.js.map +1 -0
- package/dist/cjs/constant/decorator/api/function.constant.js +26 -0
- package/dist/cjs/constant/decorator/api/function.constant.js.map +1 -0
- package/dist/cjs/constant/decorator/api/property-describe.constant.js +9 -0
- package/dist/cjs/constant/decorator/api/property-describe.constant.js.map +1 -0
- package/dist/cjs/constant/dto/exception.constant.js +15 -0
- package/dist/cjs/constant/dto/exception.constant.js.map +1 -0
- package/dist/cjs/constant/dto/list.constant.js +17 -0
- package/dist/cjs/constant/dto/list.constant.js.map +1 -0
- package/dist/cjs/constant/dto/transformer-value.constant.js +17 -0
- package/dist/cjs/constant/dto/transformer-value.constant.js.map +1 -0
- package/dist/cjs/constant/factory/dto/get-list-query.constant.js +15 -0
- package/dist/cjs/constant/factory/dto/get-list-query.constant.js.map +1 -0
- package/dist/cjs/constant/interface/api/filter.constant.js +9 -0
- package/dist/cjs/constant/interface/api/filter.constant.js.map +1 -0
- package/dist/cjs/constant/interface/api/property/string.constant.js +13 -0
- package/dist/cjs/constant/interface/api/property/string.constant.js.map +1 -0
- package/dist/cjs/constant/interface/api/property/wallet.constant.js +13 -0
- package/dist/cjs/constant/interface/api/property/wallet.constant.js.map +1 -0
- package/dist/cjs/constant/number.constant.js +39 -0
- package/dist/cjs/constant/number.constant.js.map +1 -0
- package/dist/cjs/constant/utility/dto/constant.js +55 -0
- package/dist/cjs/constant/utility/dto/constant.js.map +1 -0
- package/dist/cjs/constant/utility/dto/generate.constant.js +11 -0
- package/dist/cjs/constant/utility/dto/generate.constant.js.map +1 -0
- package/dist/cjs/decorator/api/controller.decorator.js +18 -0
- package/dist/cjs/decorator/api/controller.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/function/create.decorator.js +53 -0
- package/dist/cjs/decorator/api/function/create.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/function/decorator.js +71 -0
- package/dist/cjs/decorator/api/function/decorator.js.map +1 -0
- package/dist/cjs/decorator/api/function/delete.decorator.js +71 -0
- package/dist/cjs/decorator/api/function/delete.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/function/get-list.decorator.js +60 -0
- package/dist/cjs/decorator/api/function/get-list.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/function/get-many.decorator.js +57 -0
- package/dist/cjs/decorator/api/function/get-many.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/function/get.decorator.js +57 -0
- package/dist/cjs/decorator/api/function/get.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/function/update.decorator.js +82 -0
- package/dist/cjs/decorator/api/function/update.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/method.decorator.js +351 -0
- package/dist/cjs/decorator/api/method.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/property/boolean.decorator.js +179 -0
- package/dist/cjs/decorator/api/property/boolean.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/property/date.decorator.js +206 -0
- package/dist/cjs/decorator/api/property/date.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/property/describe.decorator.js +31 -0
- package/dist/cjs/decorator/api/property/describe.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/property/enum.decorator.js +105 -0
- package/dist/cjs/decorator/api/property/enum.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/property/number.decorator.js +215 -0
- package/dist/cjs/decorator/api/property/number.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/property/object.decorator.js +104 -0
- package/dist/cjs/decorator/api/property/object.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/property/string.decorator.js +234 -0
- package/dist/cjs/decorator/api/property/string.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/property/uuid.decorator.js +120 -0
- package/dist/cjs/decorator/api/property/uuid.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/service.decorator.js +163 -0
- package/dist/cjs/decorator/api/service.decorator.js.map +1 -0
- package/dist/cjs/enum/decorator/api/action.enum.js +34 -0
- package/dist/cjs/enum/decorator/api/action.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/authentication-type.enum.js +10 -0
- package/dist/cjs/enum/decorator/api/authentication-type.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/controller/load-relations-strategy.enum.js +8 -0
- package/dist/cjs/enum/decorator/api/controller/load-relations-strategy.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/controller/request-transformer-type.enum.js +8 -0
- package/dist/cjs/enum/decorator/api/controller/request-transformer-type.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/dto-type.enum.js +10 -0
- package/dist/cjs/enum/decorator/api/dto-type.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/function/type.enum.js +12 -0
- package/dist/cjs/enum/decorator/api/function/type.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/property/data-type.enum.js +22 -0
- package/dist/cjs/enum/decorator/api/property/data-type.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/property/date/identifier.enum.js +18 -0
- package/dist/cjs/enum/decorator/api/property/date/identifier.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/property/date/type.enum.js +11 -0
- package/dist/cjs/enum/decorator/api/property/date/type.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/property/desribe-type.enum.js +14 -0
- package/dist/cjs/enum/decorator/api/property/desribe-type.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/property/number-type.enum.js +10 -0
- package/dist/cjs/enum/decorator/api/property/number-type.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/property/string-type.enum.js +17 -0
- package/dist/cjs/enum/decorator/api/property/string-type.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/route-type.enum.js +12 -0
- package/dist/cjs/enum/decorator/api/route-type.enum.js.map +1 -0
- package/dist/cjs/enum/exception.enum.js +34 -0
- package/dist/cjs/enum/exception.enum.js.map +1 -0
- package/dist/cjs/enum/filter-operation.enum.js +123 -0
- package/dist/cjs/enum/filter-operation.enum.js.map +1 -0
- package/dist/cjs/enum/filter-order-direction.enum.js +8 -0
- package/dist/cjs/enum/filter-order-direction.enum.js.map +1 -0
- package/dist/cjs/enum/utility/error-string-action.enum.js +106 -0
- package/dist/cjs/enum/utility/error-string-action.enum.js.map +1 -0
- package/dist/cjs/external/tslib/tslib.es6.js +38 -0
- package/dist/cjs/external/tslib/tslib.es6.js.map +1 -0
- package/dist/cjs/factory/api/controller.factory.js +215 -0
- package/dist/cjs/factory/api/controller.factory.js.map +1 -0
- package/dist/cjs/index.js +219 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/interceptor/correlation-id-response-body.interceptor.js +76 -0
- package/dist/cjs/interceptor/correlation-id-response-body.interceptor.js.map +1 -0
- package/dist/cjs/interface/class/dto/strategy.interface.d.ts +5 -0
- package/dist/cjs/type/class/metadata.type.d.ts +2 -0
- package/dist/cjs/utility/api/controller/apply-decorators.utility.js +83 -0
- package/dist/cjs/utility/api/controller/apply-decorators.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/apply-metadata.utility.js +78 -0
- package/dist/cjs/utility/api/controller/apply-metadata.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/get-list/transform-filter.utility.js +48 -0
- package/dist/cjs/utility/api/controller/get-list/transform-filter.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/get-list/transform-operation.utility.js +82 -0
- package/dist/cjs/utility/api/controller/get-list/transform-operation.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/get-method-name.utility.js +11 -0
- package/dist/cjs/utility/api/controller/get-method-name.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/get-primary-column.utility.js +15 -0
- package/dist/cjs/utility/api/controller/get-primary-column.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/handle-request-relations.utility.js +72 -0
- package/dist/cjs/utility/api/controller/handle-request-relations.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/transform-data.utility.js +149 -0
- package/dist/cjs/utility/api/controller/transform-data.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/validate-request.utility.js +18 -0
- package/dist/cjs/utility/api/controller/validate-request.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/write-dto-swagger.utility.js +79 -0
- package/dist/cjs/utility/api/controller/write-dto-swagger.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/write-method.utility.js +15 -0
- package/dist/cjs/utility/api/controller/write-method.utility.js.map +1 -0
- package/dist/cjs/utility/api/filter-order-by-from-entity.utility.js +48 -0
- package/dist/cjs/utility/api/filter-order-by-from-entity.utility.js.map +1 -0
- package/dist/cjs/utility/camel-case-string.utility.js +31 -0
- package/dist/cjs/utility/camel-case-string.utility.js.map +1 -0
- package/dist/cjs/utility/capitalize-string.utility.js +8 -0
- package/dist/cjs/utility/capitalize-string.utility.js.map +1 -0
- package/dist/cjs/utility/dto/analize.utility.js +27 -0
- package/dist/cjs/utility/dto/analize.utility.js.map +1 -0
- package/dist/cjs/utility/dto/build-decorator.utility.js +51 -0
- package/dist/cjs/utility/dto/build-decorator.utility.js.map +1 -0
- package/dist/cjs/utility/dto/generate-decorator.utility.js +15 -0
- package/dist/cjs/utility/dto/generate-decorator.utility.js.map +1 -0
- package/dist/cjs/utility/dto/generate-exception.utility.js +98 -0
- package/dist/cjs/utility/dto/generate-exception.utility.js.map +1 -0
- package/dist/cjs/utility/dto/generate-filter-decorator.utility.js +52 -0
- package/dist/cjs/utility/dto/generate-filter-decorator.utility.js.map +1 -0
- package/dist/cjs/utility/dto/generate-get-list-response.utility.js +99 -0
- package/dist/cjs/utility/dto/generate-get-list-response.utility.js.map +1 -0
- package/dist/cjs/utility/dto/generate-relation-response.utility.js +20 -0
- package/dist/cjs/utility/dto/generate-relation-response.utility.js.map +1 -0
- package/dist/cjs/utility/dto/generate.utility.js +133 -0
- package/dist/cjs/utility/dto/generate.utility.js.map +1 -0
- package/dist/cjs/utility/dto/get-decorator-config.utility.js +20 -0
- package/dist/cjs/utility/dto/get-decorator-config.utility.js.map +1 -0
- package/dist/cjs/utility/dto/get-get-list-query-base-class.utility.js +93 -0
- package/dist/cjs/utility/dto/get-get-list-query-base-class.utility.js.map +1 -0
- package/dist/cjs/utility/dto/handle-date-property.utility.js +35 -0
- package/dist/cjs/utility/dto/handle-date-property.utility.js.map +1 -0
- package/dist/cjs/utility/dto/is-property-exposed-for-guard.utility.js +15 -0
- package/dist/cjs/utility/dto/is-property-exposed-for-guard.utility.js.map +1 -0
- package/dist/cjs/utility/dto/is-property-should-be-marked.utility.js +46 -0
- package/dist/cjs/utility/dto/is-property-should-be-marked.utility.js.map +1 -0
- package/dist/cjs/utility/dto/is-should-be-generated.utility.js +41 -0
- package/dist/cjs/utility/dto/is-should-be-generated.utility.js.map +1 -0
- package/dist/cjs/utility/dto/validate-property-config.utility.js +6 -0
- package/dist/cjs/utility/dto/validate-property-config.utility.js.map +1 -0
- package/dist/cjs/utility/error-exception.utility.js +8 -0
- package/dist/cjs/utility/error-exception.utility.js.map +1 -0
- package/dist/cjs/utility/error-string.utility.js +8 -0
- package/dist/cjs/utility/error-string.utility.js.map +1 -0
- package/dist/cjs/utility/generate-entity-information.utility.js +78 -0
- package/dist/cjs/utility/generate-entity-information.utility.js.map +1 -0
- package/dist/cjs/utility/get-entity-columns.utility.js +22 -0
- package/dist/cjs/utility/get-entity-columns.utility.js.map +1 -0
- package/dist/cjs/utility/is-error-of-type.utility.js +68 -0
- package/dist/cjs/utility/is-error-of-type.utility.js.map +1 -0
- package/dist/cjs/validator/all-or-none-of-listed-properties.validator.js +23 -0
- package/dist/cjs/validator/all-or-none-of-listed-properties.validator.js.map +1 -0
- package/dist/cjs/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js +33 -0
- package/dist/cjs/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js.map +1 -0
- package/dist/cjs/validator/has-at-least-one-of-listed-properties.validator.js +29 -0
- package/dist/cjs/validator/has-at-least-one-of-listed-properties.validator.js.map +1 -0
- package/dist/cjs/validator/has-at-least-one-property.validator.js +17 -0
- package/dist/cjs/validator/has-at-least-one-property.validator.js.map +1 -0
- package/dist/cjs/validator/has-paired-custom-suffixes-fields.validator.js +214 -0
- package/dist/cjs/validator/has-paired-custom-suffixes-fields.validator.js.map +1 -0
- package/dist/cjs/validator/is-regular-expression.validator.js +25 -0
- package/dist/cjs/validator/is-regular-expression.validator.js.map +1 -0
- package/dist/cjs/validator/only-one-of-listed-properties.validator.js +28 -0
- package/dist/cjs/validator/only-one-of-listed-properties.validator.js.map +1 -0
- package/dist/package.json +12 -8
- package/package.json +12 -8
- package/dist/class/api/index.js +0 -18
- package/dist/class/api/index.js.map +0 -1
- package/dist/class/api/service-base.class.js +0 -32
- package/dist/class/api/service-base.class.js.map +0 -1
- package/dist/class/index.js +0 -20
- package/dist/class/index.js.map +0 -1
- package/dist/class/metadata-storage.class.js +0 -47
- package/dist/class/metadata-storage.class.js.map +0 -1
- package/dist/class/utility/dto/index.js +0 -19
- package/dist/class/utility/dto/index.js.map +0 -1
- package/dist/class/utility/dto/property/factory/boolean.class.js +0 -16
- package/dist/class/utility/dto/property/factory/boolean.class.js.map +0 -1
- package/dist/class/utility/dto/property/factory/date.class.js +0 -16
- package/dist/class/utility/dto/property/factory/date.class.js.map +0 -1
- package/dist/class/utility/dto/property/factory/enum.class.js +0 -16
- package/dist/class/utility/dto/property/factory/enum.class.js.map +0 -1
- package/dist/class/utility/dto/property/factory/index.js +0 -23
- package/dist/class/utility/dto/property/factory/index.js.map +0 -1
- package/dist/class/utility/dto/property/factory/number.class.d.ts +0 -7
- package/dist/class/utility/dto/property/factory/number.class.js +0 -18
- package/dist/class/utility/dto/property/factory/number.class.js.map +0 -1
- package/dist/class/utility/dto/property/factory/object.class.js +0 -17
- package/dist/class/utility/dto/property/factory/object.class.js.map +0 -1
- package/dist/class/utility/dto/property/factory/relation.class.js +0 -15
- package/dist/class/utility/dto/property/factory/relation.class.js.map +0 -1
- package/dist/class/utility/dto/property/factory/string.class.js +0 -16
- package/dist/class/utility/dto/property/factory/string.class.js.map +0 -1
- package/dist/class/utility/dto/property/factory/uuid.class.js +0 -12
- package/dist/class/utility/dto/property/factory/uuid.class.js.map +0 -1
- package/dist/class/utility/dto/property/index.js +0 -18
- package/dist/class/utility/dto/property/index.js.map +0 -1
- package/dist/class/utility/dto/strategy/body.class.js +0 -33
- package/dist/class/utility/dto/strategy/body.class.js.map +0 -1
- package/dist/class/utility/dto/strategy/index.js +0 -21
- package/dist/class/utility/dto/strategy/index.js.map +0 -1
- package/dist/class/utility/dto/strategy/query.class.js +0 -30
- package/dist/class/utility/dto/strategy/query.class.js.map +0 -1
- package/dist/class/utility/dto/strategy/request.class.js +0 -33
- package/dist/class/utility/dto/strategy/request.class.js.map +0 -1
- package/dist/class/utility/dto/strategy/response.class.js +0 -33
- package/dist/class/utility/dto/strategy/response.class.js.map +0 -1
- package/dist/class/utility/index.js +0 -18
- package/dist/class/utility/index.js.map +0 -1
- package/dist/constant/date.constant.js +0 -10
- package/dist/constant/date.constant.js.map +0 -1
- package/dist/constant/decorator/api/controller.constant.js +0 -8
- package/dist/constant/decorator/api/controller.constant.js.map +0 -1
- package/dist/constant/decorator/api/function.constant.js +0 -9
- package/dist/constant/decorator/api/function.constant.js.map +0 -1
- package/dist/constant/decorator/api/index.js +0 -20
- package/dist/constant/decorator/api/index.js.map +0 -1
- package/dist/constant/decorator/api/property-describe.constant.js +0 -8
- package/dist/constant/decorator/api/property-describe.constant.js.map +0 -1
- package/dist/constant/decorator/index.js +0 -18
- package/dist/constant/decorator/index.js.map +0 -1
- package/dist/constant/dto/exception.constant.js +0 -14
- package/dist/constant/dto/exception.constant.js.map +0 -1
- package/dist/constant/dto/index.js +0 -20
- package/dist/constant/dto/index.js.map +0 -1
- package/dist/constant/dto/list.constant.js +0 -14
- package/dist/constant/dto/list.constant.js.map +0 -1
- package/dist/constant/dto/transformer-value.constant.js +0 -16
- package/dist/constant/dto/transformer-value.constant.js.map +0 -1
- package/dist/constant/factory/dto/get-list-query.constant.js +0 -14
- package/dist/constant/factory/dto/get-list-query.constant.js.map +0 -1
- package/dist/constant/factory/dto/index.js +0 -18
- package/dist/constant/factory/dto/index.js.map +0 -1
- package/dist/constant/factory/index.js +0 -18
- package/dist/constant/factory/index.js.map +0 -1
- package/dist/constant/index.js +0 -23
- package/dist/constant/index.js.map +0 -1
- package/dist/constant/interface/api/filter.constant.js +0 -8
- package/dist/constant/interface/api/filter.constant.js.map +0 -1
- package/dist/constant/interface/api/index.js +0 -19
- package/dist/constant/interface/api/index.js.map +0 -1
- package/dist/constant/interface/api/property/index.js +0 -19
- package/dist/constant/interface/api/property/index.js.map +0 -1
- package/dist/constant/interface/api/property/string.constant.js +0 -12
- package/dist/constant/interface/api/property/string.constant.js.map +0 -1
- package/dist/constant/interface/api/property/wallet.constant.js +0 -12
- package/dist/constant/interface/api/property/wallet.constant.js.map +0 -1
- package/dist/constant/interface/index.js +0 -18
- package/dist/constant/interface/index.js.map +0 -1
- package/dist/constant/number.constant.js +0 -38
- package/dist/constant/number.constant.js.map +0 -1
- package/dist/constant/utility/dto/constant.js +0 -29
- package/dist/constant/utility/dto/constant.js.map +0 -1
- package/dist/constant/utility/dto/generate.constant.js +0 -10
- package/dist/constant/utility/dto/generate.constant.js.map +0 -1
- package/dist/decorator/api/controller.decorator.js +0 -17
- package/dist/decorator/api/controller.decorator.js.map +0 -1
- package/dist/decorator/api/function/create.decorator.js +0 -38
- package/dist/decorator/api/function/create.decorator.js.map +0 -1
- package/dist/decorator/api/function/decorator.js +0 -54
- package/dist/decorator/api/function/decorator.js.map +0 -1
- package/dist/decorator/api/function/delete.decorator.js +0 -56
- package/dist/decorator/api/function/delete.decorator.js.map +0 -1
- package/dist/decorator/api/function/get-list.decorator.js +0 -43
- package/dist/decorator/api/function/get-list.decorator.js.map +0 -1
- package/dist/decorator/api/function/get-many.decorator.js +0 -42
- package/dist/decorator/api/function/get-many.decorator.js.map +0 -1
- package/dist/decorator/api/function/get.decorator.js +0 -42
- package/dist/decorator/api/function/get.decorator.js.map +0 -1
- package/dist/decorator/api/function/index.js +0 -24
- package/dist/decorator/api/function/index.js.map +0 -1
- package/dist/decorator/api/function/update.decorator.js +0 -67
- package/dist/decorator/api/function/update.decorator.js.map +0 -1
- package/dist/decorator/api/index.js +0 -22
- package/dist/decorator/api/index.js.map +0 -1
- package/dist/decorator/api/method.decorator.js +0 -333
- package/dist/decorator/api/method.decorator.js.map +0 -1
- package/dist/decorator/api/property/boolean.decorator.js +0 -162
- package/dist/decorator/api/property/boolean.decorator.js.map +0 -1
- package/dist/decorator/api/property/date.decorator.js +0 -189
- package/dist/decorator/api/property/date.decorator.js.map +0 -1
- package/dist/decorator/api/property/describe.decorator.js +0 -12
- package/dist/decorator/api/property/describe.decorator.js.map +0 -1
- package/dist/decorator/api/property/enum.decorator.js +0 -103
- package/dist/decorator/api/property/enum.decorator.js.map +0 -1
- package/dist/decorator/api/property/index.js +0 -24
- package/dist/decorator/api/property/index.js.map +0 -1
- package/dist/decorator/api/property/number.decorator.js +0 -200
- package/dist/decorator/api/property/number.decorator.js.map +0 -1
- package/dist/decorator/api/property/object.decorator.js +0 -102
- package/dist/decorator/api/property/object.decorator.js.map +0 -1
- package/dist/decorator/api/property/string.decorator.js +0 -211
- package/dist/decorator/api/property/string.decorator.js.map +0 -1
- package/dist/decorator/api/property/uuid.decorator.js +0 -103
- package/dist/decorator/api/property/uuid.decorator.js.map +0 -1
- package/dist/decorator/api/service.decorator.js +0 -146
- package/dist/decorator/api/service.decorator.js.map +0 -1
- package/dist/decorator/index.js +0 -18
- package/dist/decorator/index.js.map +0 -1
- package/dist/enum/decorator/api/action.enum.js +0 -35
- package/dist/enum/decorator/api/action.enum.js.map +0 -1
- package/dist/enum/decorator/api/authentication-type.enum.js +0 -11
- package/dist/enum/decorator/api/authentication-type.enum.js.map +0 -1
- package/dist/enum/decorator/api/controller/index.js +0 -19
- package/dist/enum/decorator/api/controller/index.js.map +0 -1
- package/dist/enum/decorator/api/controller/load-relations-strategy.enum.js +0 -9
- package/dist/enum/decorator/api/controller/load-relations-strategy.enum.js.map +0 -1
- package/dist/enum/decorator/api/controller/request-transformer-type.enum.js +0 -9
- package/dist/enum/decorator/api/controller/request-transformer-type.enum.js.map +0 -1
- package/dist/enum/decorator/api/dto-type.enum.js +0 -11
- package/dist/enum/decorator/api/dto-type.enum.js.map +0 -1
- package/dist/enum/decorator/api/function/index.js +0 -18
- package/dist/enum/decorator/api/function/index.js.map +0 -1
- package/dist/enum/decorator/api/function/type.enum.js +0 -13
- package/dist/enum/decorator/api/function/type.enum.js.map +0 -1
- package/dist/enum/decorator/api/index.js +0 -24
- package/dist/enum/decorator/api/index.js.map +0 -1
- package/dist/enum/decorator/api/property/data-type.enum.js +0 -23
- package/dist/enum/decorator/api/property/data-type.enum.js.map +0 -1
- package/dist/enum/decorator/api/property/date/identifier.enum.js +0 -19
- package/dist/enum/decorator/api/property/date/identifier.enum.js.map +0 -1
- package/dist/enum/decorator/api/property/date/index.js +0 -19
- package/dist/enum/decorator/api/property/date/index.js.map +0 -1
- package/dist/enum/decorator/api/property/date/type.enum.js +0 -11
- package/dist/enum/decorator/api/property/date/type.enum.js.map +0 -1
- package/dist/enum/decorator/api/property/desribe-type.enum.js +0 -15
- package/dist/enum/decorator/api/property/desribe-type.enum.js.map +0 -1
- package/dist/enum/decorator/api/property/index.js +0 -22
- package/dist/enum/decorator/api/property/index.js.map +0 -1
- package/dist/enum/decorator/api/property/number-type.enum.js +0 -10
- package/dist/enum/decorator/api/property/number-type.enum.js.map +0 -1
- package/dist/enum/decorator/api/property/string-type.enum.js +0 -17
- package/dist/enum/decorator/api/property/string-type.enum.js.map +0 -1
- package/dist/enum/decorator/api/route-type.enum.js +0 -13
- package/dist/enum/decorator/api/route-type.enum.js.map +0 -1
- package/dist/enum/decorator/index.js +0 -18
- package/dist/enum/decorator/index.js.map +0 -1
- package/dist/enum/exception.enum.js +0 -35
- package/dist/enum/exception.enum.js.map +0 -1
- package/dist/enum/filter-operation.enum.js +0 -124
- package/dist/enum/filter-operation.enum.js.map +0 -1
- package/dist/enum/filter-order-direction.enum.js +0 -9
- package/dist/enum/filter-order-direction.enum.js.map +0 -1
- package/dist/enum/index.js +0 -21
- package/dist/enum/index.js.map +0 -1
- package/dist/enum/utility/error-string-action.enum.js +0 -107
- package/dist/enum/utility/error-string-action.enum.js.map +0 -1
- package/dist/enum/utility/index.js +0 -18
- package/dist/enum/utility/index.js.map +0 -1
- package/dist/factory/api/controller.factory.js +0 -181
- package/dist/factory/api/controller.factory.js.map +0 -1
- package/dist/factory/api/index.js +0 -18
- package/dist/factory/api/index.js.map +0 -1
- package/dist/factory/index.js +0 -18
- package/dist/factory/index.js.map +0 -1
- package/dist/index.js +0 -25
- package/dist/index.js.map +0 -1
- package/dist/interceptor/correlation-id-response-body.interceptor.js +0 -82
- package/dist/interceptor/correlation-id-response-body.interceptor.js.map +0 -1
- package/dist/interceptor/index.js +0 -18
- package/dist/interceptor/index.js.map +0 -1
- package/dist/interface/api-authentication-request.interface.js +0 -3
- package/dist/interface/api-authentication-request.interface.js.map +0 -1
- package/dist/interface/api-base-entity.interface.js +0 -3
- package/dist/interface/api-base-entity.interface.js.map +0 -1
- package/dist/interface/api-dto-validator.interface.js +0 -3
- package/dist/interface/api-dto-validator.interface.js.map +0 -1
- package/dist/interface/api-request-validator.interface.js +0 -3
- package/dist/interface/api-request-validator.interface.js.map +0 -1
- package/dist/interface/class/dto/index.js +0 -3
- package/dist/interface/class/dto/index.js.map +0 -1
- package/dist/interface/class/dto/strategy.interface.d.ts +0 -5
- package/dist/interface/class/dto/strategy.interface.js +0 -3
- package/dist/interface/class/dto/strategy.interface.js.map +0 -1
- package/dist/interface/class/index.js +0 -3
- package/dist/interface/class/index.js.map +0 -1
- package/dist/interface/class/metadata-entry.interface.js +0 -3
- package/dist/interface/class/metadata-entry.interface.js.map +0 -1
- package/dist/interface/decorator/api/controller/base.interface.js +0 -3
- package/dist/interface/decorator/api/controller/base.interface.js.map +0 -1
- package/dist/interface/decorator/api/controller/index.js +0 -3
- package/dist/interface/decorator/api/controller/index.js.map +0 -1
- package/dist/interface/decorator/api/controller/properties/index.js +0 -3
- package/dist/interface/decorator/api/controller/properties/index.js.map +0 -1
- package/dist/interface/decorator/api/controller/properties/route/authentication.interface.js +0 -3
- package/dist/interface/decorator/api/controller/properties/route/authentication.interface.js.map +0 -1
- package/dist/interface/decorator/api/controller/properties/route/auto-dto-config.interface.js +0 -3
- package/dist/interface/decorator/api/controller/properties/route/auto-dto-config.interface.js.map +0 -1
- package/dist/interface/decorator/api/controller/properties/route/base-request.interface.js +0 -3
- package/dist/interface/decorator/api/controller/properties/route/base-request.interface.js.map +0 -1
- package/dist/interface/decorator/api/controller/properties/route/base-response.interface.js +0 -3
- package/dist/interface/decorator/api/controller/properties/route/base-response.interface.js.map +0 -1
- package/dist/interface/decorator/api/controller/properties/route/base.interface.js +0 -3
- package/dist/interface/decorator/api/controller/properties/route/base.interface.js.map +0 -1
- package/dist/interface/decorator/api/controller/properties/route/index.js +0 -3
- package/dist/interface/decorator/api/controller/properties/route/index.js.map +0 -1
- package/dist/interface/decorator/api/controller/properties/route/with-auto-dto.interface.js +0 -3
- package/dist/interface/decorator/api/controller/properties/route/with-auto-dto.interface.js.map +0 -1
- package/dist/interface/decorator/api/controller/properties/route/with-dto.interface.js +0 -3
- package/dist/interface/decorator/api/controller/properties/route/with-dto.interface.js.map +0 -1
- 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-executor-properties.interface.js +0 -3
- package/dist/interface/decorator/api/function/create-executor-properties.interface.js.map +0 -1
- package/dist/interface/decorator/api/function/delete-executor-properties.interface.js +0 -3
- package/dist/interface/decorator/api/function/delete-executor-properties.interface.js.map +0 -1
- package/dist/interface/decorator/api/function/get-executor-properties.interface.js +0 -3
- package/dist/interface/decorator/api/function/get-executor-properties.interface.js.map +0 -1
- package/dist/interface/decorator/api/function/get-list-executor-properties.interface.js +0 -3
- package/dist/interface/decorator/api/function/get-list-executor-properties.interface.js.map +0 -1
- package/dist/interface/decorator/api/function/get-many-executor-properties.interface.js +0 -3
- package/dist/interface/decorator/api/function/get-many-executor-properties.interface.js.map +0 -1
- package/dist/interface/decorator/api/function/index.js +0 -3
- package/dist/interface/decorator/api/function/index.js.map +0 -1
- package/dist/interface/decorator/api/function/properties.interface.js +0 -3
- package/dist/interface/decorator/api/function/properties.interface.js.map +0 -1
- package/dist/interface/decorator/api/function/update-executor-properties.interface.js +0 -3
- package/dist/interface/decorator/api/function/update-executor-properties.interface.js.map +0 -1
- package/dist/interface/decorator/api/get-list-response-result.interface.js +0 -3
- package/dist/interface/decorator/api/get-list-response-result.interface.js.map +0 -1
- package/dist/interface/decorator/api/index.js +0 -3
- package/dist/interface/decorator/api/index.js.map +0 -1
- package/dist/interface/decorator/api/method/index.js +0 -3
- package/dist/interface/decorator/api/method/index.js.map +0 -1
- package/dist/interface/decorator/api/method/properties.interface.js +0 -3
- package/dist/interface/decorator/api/method/properties.interface.js.map +0 -1
- package/dist/interface/decorator/api/method/throttler-properties.interface.js +0 -3
- package/dist/interface/decorator/api/method/throttler-properties.interface.js.map +0 -1
- package/dist/interface/decorator/api/response-type.interface.js +0 -3
- package/dist/interface/decorator/api/response-type.interface.js.map +0 -1
- package/dist/interface/decorator/index.js +0 -3
- package/dist/interface/decorator/index.js.map +0 -1
- package/dist/interface/dto-generate-factory.interface.js +0 -3
- package/dist/interface/dto-generate-factory.interface.js.map +0 -1
- package/dist/interface/entity/column.interface.js +0 -3
- package/dist/interface/entity/column.interface.js.map +0 -1
- package/dist/interface/entity/index.js +0 -3
- package/dist/interface/entity/index.js.map +0 -1
- package/dist/interface/entity/interface.js +0 -3
- package/dist/interface/entity/interface.js.map +0 -1
- package/dist/interface/index.js +0 -3
- package/dist/interface/index.js.map +0 -1
- package/dist/interface/utility/api/controller/index.js +0 -3
- package/dist/interface/utility/api/controller/index.js.map +0 -1
- package/dist/interface/utility/api/controller/primary-column.interface.js +0 -3
- package/dist/interface/utility/api/controller/primary-column.interface.js.map +0 -1
- package/dist/interface/utility/api/index.js +0 -3
- package/dist/interface/utility/api/index.js.map +0 -1
- package/dist/interface/utility/error-string-properties.interface.js +0 -3
- package/dist/interface/utility/error-string-properties.interface.js.map +0 -1
- package/dist/interface/utility/get-entity-columns-properties.interface.js +0 -3
- package/dist/interface/utility/get-entity-columns-properties.interface.js.map +0 -1
- package/dist/interface/utility/index.js +0 -3
- package/dist/interface/utility/index.js.map +0 -1
- package/dist/type/api-request-transformer.type.js +0 -3
- package/dist/type/api-request-transformer.type.js.map +0 -1
- package/dist/type/class/api-exception.type.js +0 -3
- package/dist/type/class/api-exception.type.js.map +0 -1
- package/dist/type/class/controller/index.js +0 -3
- package/dist/type/class/controller/index.js.map +0 -1
- package/dist/type/class/controller/method.type.js +0 -3
- package/dist/type/class/controller/method.type.js.map +0 -1
- package/dist/type/class/index.js +0 -3
- package/dist/type/class/index.js.map +0 -1
- package/dist/type/class/metadata.type.d.ts +0 -2
- package/dist/type/class/metadata.type.js +0 -3
- package/dist/type/class/metadata.type.js.map +0 -1
- package/dist/type/decorator/api/controller/constructor.type.js +0 -3
- package/dist/type/decorator/api/controller/constructor.type.js.map +0 -1
- package/dist/type/decorator/api/controller/get-list-query.type.js +0 -3
- package/dist/type/decorator/api/controller/get-list-query.type.js.map +0 -1
- package/dist/type/decorator/api/controller/index.js +0 -3
- package/dist/type/decorator/api/controller/index.js.map +0 -1
- package/dist/type/decorator/api/controller/properties/index.js +0 -3
- package/dist/type/decorator/api/controller/properties/index.js.map +0 -1
- package/dist/type/decorator/api/controller/properties/route/base-request-relations.type.js +0 -3
- package/dist/type/decorator/api/controller/properties/route/base-request-relations.type.js.map +0 -1
- package/dist/type/decorator/api/controller/properties/route/base-request-transformers.type.js +0 -3
- package/dist/type/decorator/api/controller/properties/route/base-request-transformers.type.js.map +0 -1
- package/dist/type/decorator/api/controller/properties/route/base-response-transformers.type.js +0 -3
- package/dist/type/decorator/api/controller/properties/route/base-response-transformers.type.js.map +0 -1
- package/dist/type/decorator/api/controller/properties/route/index.js +0 -3
- package/dist/type/decorator/api/controller/properties/route/index.js.map +0 -1
- package/dist/type/decorator/api/controller/properties-route.type.js +0 -3
- package/dist/type/decorator/api/controller/properties-route.type.js.map +0 -1
- package/dist/type/decorator/api/controller/transformer-config.type.js +0 -3
- package/dist/type/decorator/api/controller/transformer-config.type.js.map +0 -1
- package/dist/type/decorator/api/filter/allowed-types.type.js +0 -3
- package/dist/type/decorator/api/filter/allowed-types.type.js.map +0 -1
- package/dist/type/decorator/api/filter/extracted-allowed-types.type.js +0 -3
- package/dist/type/decorator/api/filter/extracted-allowed-types.type.js.map +0 -1
- package/dist/type/decorator/api/filter/field-selector.type.js +0 -3
- package/dist/type/decorator/api/filter/field-selector.type.js.map +0 -1
- package/dist/type/decorator/api/filter/index.js +0 -3
- package/dist/type/decorator/api/filter/index.js.map +0 -1
- package/dist/type/decorator/api/filter/order-by.type.js +0 -3
- package/dist/type/decorator/api/filter/order-by.type.js.map +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-criteria.type.js +0 -3
- package/dist/type/decorator/api/function/delete-criteria.type.js.map +0 -1
- package/dist/type/decorator/api/function/get-list-properties-where.type.js +0 -3
- package/dist/type/decorator/api/function/get-list-properties-where.type.js.map +0 -1
- 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/get-many.properties.js +0 -3
- package/dist/type/decorator/api/function/get-many.properties.js.map +0 -1
- 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/index.js +0 -3
- package/dist/type/decorator/api/function/index.js.map +0 -1
- package/dist/type/decorator/api/function/properties.type.js +0 -3
- package/dist/type/decorator/api/function/properties.type.js.map +0 -1
- package/dist/type/decorator/api/function/update-criteria.type.js +0 -3
- package/dist/type/decorator/api/function/update-criteria.type.js.map +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/index.js +0 -3
- package/dist/type/decorator/api/index.js.map +0 -1
- package/dist/type/decorator/api/property/base/array/index.js +0 -3
- package/dist/type/decorator/api/property/base/array/index.js.map +0 -1
- package/dist/type/decorator/api/property/base/array/optional-properties.type.js +0 -3
- package/dist/type/decorator/api/property/base/array/optional-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/base/array/required-properties.type.js +0 -3
- package/dist/type/decorator/api/property/base/array/required-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/base/index.js +0 -3
- package/dist/type/decorator/api/property/base/index.js.map +0 -1
- package/dist/type/decorator/api/property/base/properties.type.js +0 -3
- package/dist/type/decorator/api/property/base/properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/base/request-properties.type.js +0 -3
- package/dist/type/decorator/api/property/base/request-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/base/response-properties.type.js +0 -3
- package/dist/type/decorator/api/property/base/response-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/date-properties.type.js +0 -3
- package/dist/type/decorator/api/property/date-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/array/index.js +0 -3
- package/dist/type/decorator/api/property/describe/array/index.js.map +0 -1
- package/dist/type/decorator/api/property/describe/array/optional-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/array/optional-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/array/required-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/array/required-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/base-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/base-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/boolean-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/boolean-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/date-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/date-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/dto/body-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/dto/body-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/dto/guard-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/dto/guard-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/dto/index.js +0 -3
- package/dist/type/decorator/api/property/describe/dto/index.js.map +0 -1
- package/dist/type/decorator/api/property/describe/dto/properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/dto/properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/dto/query/get-list-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/dto/query/get-list-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/dto/query/index.js +0 -3
- package/dist/type/decorator/api/property/describe/dto/query/index.js.map +0 -1
- package/dist/type/decorator/api/property/describe/dto/query/properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/dto/query/properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/dto/request-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/dto/request-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/dto/response-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/dto/response-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/enum-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/enum-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/example-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/example-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/index.js +0 -3
- package/dist/type/decorator/api/property/describe/index.js.map +0 -1
- package/dist/type/decorator/api/property/describe/number-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/number-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/object-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/object-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/properties/base-dto-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/properties/base-dto-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/properties/base-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/properties/base-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/properties/index.js +0 -3
- package/dist/type/decorator/api/property/describe/properties/index.js.map +0 -1
- package/dist/type/decorator/api/property/describe/properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/relation-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/relation-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/string-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/string-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/describe/uuid-properties.type.js +0 -3
- package/dist/type/decorator/api/property/describe/uuid-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/enum-properties.type.js +0 -3
- package/dist/type/decorator/api/property/enum-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/index.js +0 -3
- package/dist/type/decorator/api/property/index.js.map +0 -1
- package/dist/type/decorator/api/property/number-properties.type.js +0 -3
- package/dist/type/decorator/api/property/number-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/object-properties.type.js +0 -3
- package/dist/type/decorator/api/property/object-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/string-properties.type.js +0 -3
- package/dist/type/decorator/api/property/string-properties.type.js.map +0 -1
- package/dist/type/decorator/api/property/uuid-properties.type.js +0 -3
- package/dist/type/decorator/api/property/uuid-properties.type.js.map +0 -1
- package/dist/type/decorator/api/service/index.js +0 -3
- package/dist/type/decorator/api/service/index.js.map +0 -1
- package/dist/type/decorator/api/service/keys.type.js +0 -3
- package/dist/type/decorator/api/service/keys.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/type/decorator/index.js +0 -3
- package/dist/type/decorator/index.js.map +0 -1
- package/dist/type/factory/api/controller/index.js +0 -3
- package/dist/type/factory/api/controller/index.js.map +0 -1
- package/dist/type/factory/api/controller/method-map.type.js +0 -3
- package/dist/type/factory/api/controller/method-map.type.js.map +0 -1
- package/dist/type/factory/api/controller/method-name-map.type.js +0 -3
- package/dist/type/factory/api/controller/method-name-map.type.js.map +0 -1
- package/dist/type/factory/api/controller/method-name.type.js +0 -3
- package/dist/type/factory/api/controller/method-name.type.js.map +0 -1
- package/dist/type/factory/api/controller/target-methods.type.js +0 -3
- package/dist/type/factory/api/controller/target-methods.type.js.map +0 -1
- package/dist/type/factory/api/index.js +0 -3
- package/dist/type/factory/api/index.js.map +0 -1
- package/dist/type/factory/index.js +0 -3
- package/dist/type/factory/index.js.map +0 -1
- package/dist/type/index.js +0 -3
- package/dist/type/index.js.map +0 -1
- package/dist/type/utility/api/controller/index.js +0 -3
- package/dist/type/utility/api/controller/index.js.map +0 -1
- package/dist/type/utility/api/controller/transform-data/data.type.js +0 -3
- package/dist/type/utility/api/controller/transform-data/data.type.js.map +0 -1
- package/dist/type/utility/api/controller/transform-data/index.js +0 -3
- package/dist/type/utility/api/controller/transform-data/index.js.map +0 -1
- package/dist/type/utility/api/controller/transform-data/is-validation-properties.type.js +0 -3
- package/dist/type/utility/api/controller/transform-data/is-validation-properties.type.js.map +0 -1
- package/dist/type/utility/api/controller/transform-data/object-to-transform.type.js +0 -3
- package/dist/type/utility/api/controller/transform-data/object-to-transform.type.js.map +0 -1
- package/dist/type/utility/api/index.js +0 -3
- package/dist/type/utility/api/index.js.map +0 -1
- package/dist/type/utility/capitalize-string.type.js +0 -3
- package/dist/type/utility/capitalize-string.type.js.map +0 -1
- package/dist/type/utility/date-keys.type.js +0 -3
- package/dist/type/utility/date-keys.type.js.map +0 -1
- package/dist/type/utility/date-range-keys.type.js +0 -3
- package/dist/type/utility/date-range-keys.type.js.map +0 -1
- package/dist/type/utility/dto/generate-allowed-combination.type.js +0 -3
- package/dist/type/utility/dto/generate-allowed-combination.type.js.map +0 -1
- package/dist/type/utility/dto/generate-is-allowed-combination.type.js +0 -3
- package/dist/type/utility/dto/generate-is-allowed-combination.type.js.map +0 -1
- package/dist/type/utility/dto/index.js +0 -3
- package/dist/type/utility/dto/index.js.map +0 -1
- package/dist/type/utility/filter-keys.type.js +0 -3
- package/dist/type/utility/filter-keys.type.js.map +0 -1
- package/dist/type/utility/index.js +0 -3
- package/dist/type/utility/index.js.map +0 -1
- package/dist/type/utility/non-date-keys.type.js +0 -3
- package/dist/type/utility/non-date-keys.type.js.map +0 -1
- package/dist/utility/api/controller/apply-decorators.utility.js +0 -66
- package/dist/utility/api/controller/apply-decorators.utility.js.map +0 -1
- package/dist/utility/api/controller/apply-metadata.utility.js +0 -45
- package/dist/utility/api/controller/apply-metadata.utility.js.map +0 -1
- package/dist/utility/api/controller/get-list/index.js +0 -19
- package/dist/utility/api/controller/get-list/index.js.map +0 -1
- package/dist/utility/api/controller/get-list/transform-filter.utility.js +0 -30
- package/dist/utility/api/controller/get-list/transform-filter.utility.js.map +0 -1
- package/dist/utility/api/controller/get-list/transform-operation.utility.js +0 -80
- package/dist/utility/api/controller/get-list/transform-operation.utility.js.map +0 -1
- package/dist/utility/api/controller/get-method-name.utility.js +0 -8
- package/dist/utility/api/controller/get-method-name.utility.js.map +0 -1
- package/dist/utility/api/controller/get-primary-column.utility.js +0 -14
- package/dist/utility/api/controller/get-primary-column.utility.js.map +0 -1
- package/dist/utility/api/controller/handle-request-relations.utility.js +0 -54
- package/dist/utility/api/controller/handle-request-relations.utility.js.map +0 -1
- package/dist/utility/api/controller/index.js +0 -26
- package/dist/utility/api/controller/index.js.map +0 -1
- package/dist/utility/api/controller/transform-data.utility.js +0 -132
- package/dist/utility/api/controller/transform-data.utility.js.map +0 -1
- package/dist/utility/api/controller/validate-request.utility.js +0 -16
- package/dist/utility/api/controller/validate-request.utility.js.map +0 -1
- package/dist/utility/api/controller/write-dto-swagger.utility.js +0 -45
- package/dist/utility/api/controller/write-dto-swagger.utility.js.map +0 -1
- package/dist/utility/api/controller/write-method.utility.js +0 -13
- package/dist/utility/api/controller/write-method.utility.js.map +0 -1
- package/dist/utility/api/filter-order-by-from-entity.utility.js +0 -44
- package/dist/utility/api/filter-order-by-from-entity.utility.js.map +0 -1
- package/dist/utility/api/index.js +0 -19
- package/dist/utility/api/index.js.map +0 -1
- package/dist/utility/camel-case-string.utility.js +0 -30
- package/dist/utility/camel-case-string.utility.js.map +0 -1
- package/dist/utility/capitalize-string.utility.js +0 -7
- package/dist/utility/capitalize-string.utility.js.map +0 -1
- package/dist/utility/dto/analize.utility.js +0 -10
- package/dist/utility/dto/analize.utility.js.map +0 -1
- package/dist/utility/dto/build-decorator.utility.js +0 -34
- package/dist/utility/dto/build-decorator.utility.js.map +0 -1
- package/dist/utility/dto/generate-decorator.utility.js +0 -13
- package/dist/utility/dto/generate-decorator.utility.js.map +0 -1
- package/dist/utility/dto/generate-exception.utility.js +0 -87
- package/dist/utility/dto/generate-exception.utility.js.map +0 -1
- package/dist/utility/dto/generate-filter-decorator.utility.js +0 -35
- package/dist/utility/dto/generate-filter-decorator.utility.js.map +0 -1
- package/dist/utility/dto/generate-get-list-response.utility.js +0 -97
- package/dist/utility/dto/generate-get-list-response.utility.js.map +0 -1
- package/dist/utility/dto/generate-relation-response.utility.js +0 -27
- package/dist/utility/dto/generate-relation-response.utility.js.map +0 -1
- package/dist/utility/dto/generate.utility.js +0 -115
- package/dist/utility/dto/generate.utility.js.map +0 -1
- package/dist/utility/dto/get-decorator-config.utility.js +0 -21
- package/dist/utility/dto/get-decorator-config.utility.js.map +0 -1
- package/dist/utility/dto/get-get-list-query-base-class.utility.js +0 -83
- package/dist/utility/dto/get-get-list-query-base-class.utility.js.map +0 -1
- package/dist/utility/dto/handle-date-property.utility.js +0 -19
- package/dist/utility/dto/handle-date-property.utility.js.map +0 -1
- package/dist/utility/dto/index.js +0 -29
- package/dist/utility/dto/index.js.map +0 -1
- package/dist/utility/dto/is-property-exposed-for-guard.utility.js +0 -14
- package/dist/utility/dto/is-property-exposed-for-guard.utility.js.map +0 -1
- package/dist/utility/dto/is-property-should-be-marked.utility.js +0 -29
- package/dist/utility/dto/is-property-should-be-marked.utility.js.map +0 -1
- package/dist/utility/dto/is-should-be-generated.utility.js +0 -25
- package/dist/utility/dto/is-should-be-generated.utility.js.map +0 -1
- package/dist/utility/dto/validate-property-config.utility.js +0 -6
- package/dist/utility/dto/validate-property-config.utility.js.map +0 -1
- package/dist/utility/error-exception.utility.js +0 -7
- package/dist/utility/error-exception.utility.js.map +0 -1
- package/dist/utility/error-string.utility.js +0 -7
- package/dist/utility/error-string.utility.js.map +0 -1
- package/dist/utility/generate-entity-information.utility.js +0 -60
- package/dist/utility/generate-entity-information.utility.js.map +0 -1
- package/dist/utility/get-entity-columns.utility.js +0 -20
- package/dist/utility/get-entity-columns.utility.js.map +0 -1
- package/dist/utility/index.js +0 -26
- package/dist/utility/index.js.map +0 -1
- package/dist/utility/is-error-of-type.utility.js +0 -51
- package/dist/utility/is-error-of-type.utility.js.map +0 -1
- package/dist/validator/all-or-none-of-listed-properties.validator.js +0 -29
- package/dist/validator/all-or-none-of-listed-properties.validator.js.map +0 -1
- package/dist/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js +0 -39
- package/dist/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js.map +0 -1
- package/dist/validator/has-at-least-one-of-listed-properties.validator.js +0 -35
- package/dist/validator/has-at-least-one-of-listed-properties.validator.js.map +0 -1
- package/dist/validator/has-at-least-one-property.validator.js +0 -23
- package/dist/validator/has-at-least-one-property.validator.js.map +0 -1
- package/dist/validator/has-paired-custom-suffixes-fields.validator.js +0 -220
- package/dist/validator/has-paired-custom-suffixes-fields.validator.js.map +0 -1
- package/dist/validator/index.js +0 -23
- package/dist/validator/index.js.map +0 -1
- package/dist/validator/is-regular-expression.validator.js +0 -31
- package/dist/validator/is-regular-expression.validator.js.map +0 -1
- package/dist/validator/only-one-of-listed-properties.validator.js +0 -34
- package/dist/validator/only-one-of-listed-properties.validator.js.map +0 -1
- /package/dist/{class → cjs/class}/api/index.d.ts +0 -0
- /package/dist/{class → cjs/class}/api/service-base.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/index.d.ts +0 -0
- /package/dist/{class → cjs/class}/metadata-storage.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/index.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/property/factory/boolean.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/property/factory/date.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/property/factory/enum.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/property/factory/index.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/property/factory/object.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/property/factory/relation.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/property/factory/string.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/property/factory/uuid.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/property/index.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/strategy/body.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/strategy/index.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/strategy/query.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/strategy/request.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/dto/strategy/response.class.d.ts +0 -0
- /package/dist/{class → cjs/class}/utility/index.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/date.constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/decorator/api/controller.constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/decorator/api/function.constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/decorator/api/index.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/decorator/api/property-describe.constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/decorator/index.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/dto/exception.constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/dto/index.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/dto/list.constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/dto/transformer-value.constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/factory/dto/get-list-query.constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/factory/dto/index.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/factory/index.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/index.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/interface/api/filter.constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/interface/api/index.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/interface/api/property/index.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/interface/api/property/string.constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/interface/api/property/wallet.constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/interface/index.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/number.constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/utility/dto/constant.d.ts +0 -0
- /package/dist/{constant → cjs/constant}/utility/dto/generate.constant.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/controller.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/function/create.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/function/decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/function/delete.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/function/get-list.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/function/get-many.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/function/get.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/function/index.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/function/update.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/index.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/method.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/property/boolean.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/property/date.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/property/describe.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/property/enum.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/property/index.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/property/number.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/property/object.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/property/string.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/property/uuid.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/api/service.decorator.d.ts +0 -0
- /package/dist/{decorator → cjs/decorator}/index.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/action.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/authentication-type.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/controller/index.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/controller/load-relations-strategy.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/controller/request-transformer-type.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/dto-type.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/function/index.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/function/type.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/index.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/property/data-type.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/property/date/identifier.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/property/date/index.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/property/date/type.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/property/desribe-type.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/property/index.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/property/number-type.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/property/string-type.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/api/route-type.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/decorator/index.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/exception.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/filter-operation.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/filter-order-direction.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/index.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/utility/error-string-action.enum.d.ts +0 -0
- /package/dist/{enum → cjs/enum}/utility/index.d.ts +0 -0
- /package/dist/{factory → cjs/factory}/api/controller.factory.d.ts +0 -0
- /package/dist/{factory → cjs/factory}/api/index.d.ts +0 -0
- /package/dist/{factory → cjs/factory}/index.d.ts +0 -0
- /package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/dist/{interceptor → cjs/interceptor}/correlation-id-response-body.interceptor.d.ts +0 -0
- /package/dist/{interceptor → cjs/interceptor}/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/api-authentication-request.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/api-base-entity.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/api-dto-validator.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/api-request-validator.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/class/dto/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/class/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/class/metadata-entry.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/controller/base.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/controller/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/controller/properties/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/controller/properties/route/authentication.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/controller/properties/route/auto-dto-config.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/controller/properties/route/base-request.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/controller/properties/route/base-response.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/controller/properties/route/base.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/controller/properties/route/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/controller/properties/route/with-auto-dto.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/controller/properties/route/with-dto.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/controller/properties.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/function/create-executor-properties.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/function/delete-executor-properties.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/function/get-executor-properties.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/function/get-list-executor-properties.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/function/get-many-executor-properties.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/function/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/function/properties.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/function/update-executor-properties.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/get-list-response-result.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/method/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/method/properties.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/method/throttler-properties.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/api/response-type.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/decorator/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/dto-generate-factory.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/entity/column.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/entity/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/entity/interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/utility/api/controller/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/utility/api/controller/primary-column.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/utility/api/index.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/utility/error-string-properties.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/utility/get-entity-columns-properties.interface.d.ts +0 -0
- /package/dist/{interface → cjs/interface}/utility/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/api-request-transformer.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/class/api-exception.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/class/controller/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/class/controller/method.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/class/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/controller/constructor.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/controller/get-list-query.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/controller/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/controller/properties/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/controller/properties/route/base-request-relations.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/controller/properties/route/base-request-transformers.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/controller/properties/route/base-response-transformers.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/controller/properties/route/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/controller/properties-route.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/controller/transformer-config.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/filter/allowed-types.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/filter/extracted-allowed-types.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/filter/field-selector.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/filter/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/filter/order-by.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/function/create-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/function/delete-criteria.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/function/get-list-properties-where.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/function/get-list-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/function/get-many.properties.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/function/get-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/function/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/function/properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/function/update-criteria.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/function/update-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/base/array/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/base/array/optional-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/base/array/required-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/base/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/base/properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/base/request-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/base/response-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/date-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/array/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/array/optional-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/array/required-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/base-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/boolean-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/date-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/dto/body-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/dto/guard-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/dto/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/dto/properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/dto/query/get-list-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/dto/query/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/dto/query/properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/dto/request-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/dto/response-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/enum-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/example-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/number-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/object-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/properties/base-dto-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/properties/base-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/properties/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/relation-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/string-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/describe/uuid-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/enum-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/number-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/object-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/string-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/property/uuid-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/service/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/service/keys.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/api/service/properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/decorator/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/factory/api/controller/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/factory/api/controller/method-map.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/factory/api/controller/method-name-map.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/factory/api/controller/method-name.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/factory/api/controller/target-methods.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/factory/api/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/factory/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/api/controller/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/api/controller/transform-data/data.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/api/controller/transform-data/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/api/controller/transform-data/is-validation-properties.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/api/controller/transform-data/object-to-transform.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/api/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/capitalize-string.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/date-keys.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/date-range-keys.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/dto/generate-allowed-combination.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/dto/generate-is-allowed-combination.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/dto/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/filter-keys.type.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/index.d.ts +0 -0
- /package/dist/{type → cjs/type}/utility/non-date-keys.type.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/apply-decorators.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/apply-metadata.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/get-list/index.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/get-list/transform-filter.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/get-list/transform-operation.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/get-method-name.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/get-primary-column.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/handle-request-relations.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/index.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/transform-data.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/validate-request.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/write-dto-swagger.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/controller/write-method.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/filter-order-by-from-entity.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/api/index.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/camel-case-string.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/capitalize-string.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/analize.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/build-decorator.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/generate-decorator.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/generate-exception.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/generate-filter-decorator.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/generate-get-list-response.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/generate-relation-response.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/generate.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/get-decorator-config.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/get-get-list-query-base-class.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/handle-date-property.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/index.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/is-property-exposed-for-guard.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/is-property-should-be-marked.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/is-should-be-generated.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/dto/validate-property-config.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/error-exception.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/error-string.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/generate-entity-information.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/get-entity-columns.utility.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/index.d.ts +0 -0
- /package/dist/{utility → cjs/utility}/is-error-of-type.utility.d.ts +0 -0
- /package/dist/{validator → cjs/validator}/all-or-none-of-listed-properties.validator.d.ts +0 -0
- /package/dist/{validator → cjs/validator}/has-at-least-one-and-only-one-of-listed-properties.validator.d.ts +0 -0
- /package/dist/{validator → cjs/validator}/has-at-least-one-of-listed-properties.validator.d.ts +0 -0
- /package/dist/{validator → cjs/validator}/has-at-least-one-property.validator.d.ts +0 -0
- /package/dist/{validator → cjs/validator}/has-paired-custom-suffixes-fields.validator.d.ts +0 -0
- /package/dist/{validator → cjs/validator}/index.d.ts +0 -0
- /package/dist/{validator → cjs/validator}/is-regular-expression.validator.d.ts +0 -0
- /package/dist/{validator → cjs/validator}/only-one-of-listed-properties.validator.d.ts +0 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var common = require('@nestjs/common');
|
|
4
|
+
var swagger = require('@nestjs/swagger');
|
|
5
|
+
var classTransformer = require('class-transformer');
|
|
6
|
+
var classValidator = require('class-validator');
|
|
7
|
+
var random = require('lodash/random');
|
|
8
|
+
require('../../../constant/decorator/api/function.constant.js');
|
|
9
|
+
var number_constant = require('../../../constant/number.constant.js');
|
|
10
|
+
require('../../../enum/decorator/api/action.enum.js');
|
|
11
|
+
require('../../../enum/decorator/api/authentication-type.enum.js');
|
|
12
|
+
require('../../../enum/decorator/api/controller/load-relations-strategy.enum.js');
|
|
13
|
+
require('../../../enum/decorator/api/controller/request-transformer-type.enum.js');
|
|
14
|
+
require('../../../enum/decorator/api/dto-type.enum.js');
|
|
15
|
+
require('../../../enum/decorator/api/function/type.enum.js');
|
|
16
|
+
var dataType_enum = require('../../../enum/decorator/api/property/data-type.enum.js');
|
|
17
|
+
require('../../../enum/decorator/api/property/date/identifier.enum.js');
|
|
18
|
+
require('../../../enum/decorator/api/property/date/type.enum.js');
|
|
19
|
+
require('../../../enum/decorator/api/property/desribe-type.enum.js');
|
|
20
|
+
var numberType_enum = require('../../../enum/decorator/api/property/number-type.enum.js');
|
|
21
|
+
require('../../../enum/decorator/api/property/string-type.enum.js');
|
|
22
|
+
require('../../../enum/decorator/api/route-type.enum.js');
|
|
23
|
+
require('../../../enum/exception.enum.js');
|
|
24
|
+
require('../../../enum/filter-order-direction.enum.js');
|
|
25
|
+
require('../../../enum/utility/error-string-action.enum.js');
|
|
26
|
+
|
|
27
|
+
function ApiPropertyNumber(properties) {
|
|
28
|
+
if (properties.exampleValue === undefined) {
|
|
29
|
+
properties.exampleValue = random(properties.minimum, properties.maximum);
|
|
30
|
+
}
|
|
31
|
+
validateOptions(properties);
|
|
32
|
+
const apiPropertyOptions = buildApiPropertyOptions(properties);
|
|
33
|
+
const decorators = buildDecorators(properties, apiPropertyOptions);
|
|
34
|
+
return common.applyDecorators(...decorators);
|
|
35
|
+
}
|
|
36
|
+
function buildApiPropertyOptions(properties) {
|
|
37
|
+
const apiPropertyOptions = {
|
|
38
|
+
description: `${String(properties.entity.name)} ${properties.description ?? ""}`,
|
|
39
|
+
format: getFormat(properties),
|
|
40
|
+
nullable: properties.isNullable,
|
|
41
|
+
type: getType(properties),
|
|
42
|
+
};
|
|
43
|
+
apiPropertyOptions.required = properties.isResponse === false || properties.isResponse === undefined ? properties.isRequired : false;
|
|
44
|
+
if (properties.isArray) {
|
|
45
|
+
apiPropertyOptions.isArray = true;
|
|
46
|
+
apiPropertyOptions.minItems = properties.minItems;
|
|
47
|
+
apiPropertyOptions.maxItems = properties.maxItems;
|
|
48
|
+
apiPropertyOptions.uniqueItems = properties.isUniqueItems;
|
|
49
|
+
apiPropertyOptions.example = Array.isArray(properties.exampleValue) ? properties.exampleValue : [properties.exampleValue];
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
apiPropertyOptions.example = properties.exampleValue;
|
|
53
|
+
}
|
|
54
|
+
apiPropertyOptions.minimum = properties.minimum;
|
|
55
|
+
apiPropertyOptions.maximum = properties.maximum;
|
|
56
|
+
if ((properties.isResponse === false || properties.isResponse === undefined) && properties.multipleOf !== undefined) {
|
|
57
|
+
apiPropertyOptions.multipleOf = properties.multipleOf;
|
|
58
|
+
}
|
|
59
|
+
return apiPropertyOptions;
|
|
60
|
+
}
|
|
61
|
+
function buildDecorators(properties, apiPropertyOptions) {
|
|
62
|
+
const decorators = [swagger.ApiProperty(apiPropertyOptions)];
|
|
63
|
+
decorators.push(...buildResponseDecorators(properties), ...buildRequestDecorators(properties), ...buildFormatDecorators(properties), ...buildTransformDecorators(properties), ...buildNumberValidationDecorators(properties));
|
|
64
|
+
return decorators;
|
|
65
|
+
}
|
|
66
|
+
function buildFormatDecorators(properties) {
|
|
67
|
+
const decorators = [];
|
|
68
|
+
const isArray = properties.isArray ?? false;
|
|
69
|
+
if (properties.isResponse === undefined || !properties.isResponse) {
|
|
70
|
+
switch (properties.format) {
|
|
71
|
+
case numberType_enum.EApiPropertyNumberType.DOUBLE: {
|
|
72
|
+
decorators.push(classValidator.IsNumber({}, { each: isArray }));
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
case numberType_enum.EApiPropertyNumberType.INTEGER: {
|
|
76
|
+
decorators.push(classValidator.IsInt({ each: isArray }));
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
default: {
|
|
80
|
+
throw new Error(`ApiPropertyNumber error: Format is not valid for number property: ${String(properties.format)}`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
decorators.push(classTransformer.Type(() => Number));
|
|
84
|
+
}
|
|
85
|
+
return decorators;
|
|
86
|
+
}
|
|
87
|
+
function buildNumberValidationDecorators(properties) {
|
|
88
|
+
const decorators = [];
|
|
89
|
+
const isArray = properties.isArray ?? false;
|
|
90
|
+
if ((properties.isResponse === false || properties.isResponse === undefined) && properties.multipleOf !== undefined) {
|
|
91
|
+
decorators.push(classValidator.IsDivisibleBy(properties.multipleOf, { each: isArray }), classValidator.Min(properties.minimum, { each: isArray }), classValidator.Max(properties.maximum, { each: isArray }));
|
|
92
|
+
}
|
|
93
|
+
return decorators;
|
|
94
|
+
}
|
|
95
|
+
function buildRequestDecorators(properties) {
|
|
96
|
+
const decorators = [];
|
|
97
|
+
if (properties.isResponse === false || properties.isResponse === undefined) {
|
|
98
|
+
if (!properties.isRequired) {
|
|
99
|
+
decorators.push(classValidator.IsOptional());
|
|
100
|
+
}
|
|
101
|
+
if (properties.isArray === true) {
|
|
102
|
+
decorators.push(classValidator.IsArray(), classValidator.ArrayMinSize(properties.minItems), classValidator.ArrayMaxSize(properties.maxItems));
|
|
103
|
+
if (properties.minItems > 0) {
|
|
104
|
+
decorators.push(classValidator.ArrayNotEmpty());
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return decorators;
|
|
109
|
+
}
|
|
110
|
+
function buildResponseDecorators(properties) {
|
|
111
|
+
const decorators = [];
|
|
112
|
+
if (properties.isResponse) {
|
|
113
|
+
decorators.push(swagger.ApiResponseProperty());
|
|
114
|
+
if (properties.isExpose === undefined || properties.isExpose) {
|
|
115
|
+
decorators.push(classTransformer.Expose());
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
decorators.push(classTransformer.Exclude());
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return decorators;
|
|
122
|
+
}
|
|
123
|
+
function buildTransformDecorators(properties) {
|
|
124
|
+
const decorators = [];
|
|
125
|
+
if (!properties.isResponse) {
|
|
126
|
+
if (properties.isArray) {
|
|
127
|
+
decorators.push(classTransformer.Transform(({ value }) => value.map(Number), { toClassOnly: true }));
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
decorators.push(classTransformer.Transform(({ value }) => Number(value), { toClassOnly: true }));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return decorators;
|
|
134
|
+
}
|
|
135
|
+
function getFormat(properties) {
|
|
136
|
+
switch (properties.format) {
|
|
137
|
+
case numberType_enum.EApiPropertyNumberType.DOUBLE: {
|
|
138
|
+
return numberType_enum.EApiPropertyNumberType.DOUBLE;
|
|
139
|
+
}
|
|
140
|
+
case numberType_enum.EApiPropertyNumberType.INTEGER: {
|
|
141
|
+
return properties.maximum <= number_constant.NUMBER_CONSTANT.MAX_INTEGER && properties.maximum >= number_constant.NUMBER_CONSTANT.MIN_INTEGER ? "int32" : "int64";
|
|
142
|
+
}
|
|
143
|
+
default: {
|
|
144
|
+
throw new Error("ApiPropertyNumber error: Format is not defined");
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function getType(properties) {
|
|
149
|
+
switch (properties.format) {
|
|
150
|
+
case numberType_enum.EApiPropertyNumberType.DOUBLE: {
|
|
151
|
+
return dataType_enum.EApiPropertyDataType.NUMBER;
|
|
152
|
+
}
|
|
153
|
+
case numberType_enum.EApiPropertyNumberType.INTEGER: {
|
|
154
|
+
return dataType_enum.EApiPropertyDataType.INTEGER;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function validateOptions(properties) {
|
|
159
|
+
const errors = [];
|
|
160
|
+
if (properties.minimum > properties.maximum) {
|
|
161
|
+
errors.push("'minimum' is greater than maximum");
|
|
162
|
+
}
|
|
163
|
+
if (properties.multipleOf !== undefined) {
|
|
164
|
+
if (Array.isArray(properties.exampleValue)) {
|
|
165
|
+
for (const example of properties.exampleValue) {
|
|
166
|
+
if (!classValidator.isInt(example / properties.multipleOf)) {
|
|
167
|
+
errors.push("'exampleValue' is not a multiple of 'multipleOf' value: " + String(example));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
else if (properties.exampleValue !== undefined && !classValidator.isInt(properties.exampleValue / properties.multipleOf)) {
|
|
172
|
+
errors.push("'exampleValue' is not a multiple of 'multipleOf' value: " + String(properties.exampleValue));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (Array.isArray(properties.exampleValue)) {
|
|
176
|
+
for (const example of properties.exampleValue) {
|
|
177
|
+
if (example < properties.minimum) {
|
|
178
|
+
errors.push("'exampleValue' is less than 'minimum': " + String(example));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
else if (properties.exampleValue !== undefined && properties.exampleValue < properties.minimum) {
|
|
183
|
+
errors.push("'exampleValue' is less than 'minimum': " + String(properties.exampleValue));
|
|
184
|
+
}
|
|
185
|
+
if (Array.isArray(properties.exampleValue)) {
|
|
186
|
+
for (const example of properties.exampleValue) {
|
|
187
|
+
if (example > properties.maximum) {
|
|
188
|
+
errors.push("'exampleValue' is greater than 'maximum': " + String(example));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
else if (properties.exampleValue !== undefined && properties.exampleValue > properties.maximum) {
|
|
193
|
+
errors.push("'exampleValue' is greater than 'maximum': " + String(properties.exampleValue));
|
|
194
|
+
}
|
|
195
|
+
if (properties.isArray === true) {
|
|
196
|
+
if (properties.minItems > properties.maxItems) {
|
|
197
|
+
errors.push("'minItems' is greater than 'maxItems'");
|
|
198
|
+
}
|
|
199
|
+
if (properties.minItems < 0) {
|
|
200
|
+
errors.push("'minItems' is less than 0");
|
|
201
|
+
}
|
|
202
|
+
if (properties.maxItems < 0) {
|
|
203
|
+
errors.push("'maxItems' is less than 0");
|
|
204
|
+
}
|
|
205
|
+
if (properties.isUniqueItems && properties.maxItems <= 1) {
|
|
206
|
+
errors.push("'uniqueItems' is true but 'maxItems' is less than or equal to 1");
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (errors.length > 0) {
|
|
210
|
+
throw new Error(`ApiPropertyNumber error: ${errors.join("\n")}`);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
exports.ApiPropertyNumber = ApiPropertyNumber;
|
|
215
|
+
//# sourceMappingURL=number.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.decorator.js","sources":["../../../../../../src/decorator/api/property/number.decorator.ts"],"sourcesContent":[null],"names":["applyDecorators","ApiProperty","EApiPropertyNumberType","IsNumber","IsInt","Type","IsDivisibleBy","Min","Max","IsOptional","IsArray","ArrayMinSize","ArrayMaxSize","ArrayNotEmpty","ApiResponseProperty","Expose","Exclude","Transform","NUMBER_CONSTANT","EApiPropertyDataType","isInt"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAaM,SAAU,iBAAiB,CAAC,UAAwC,EAAA;AACzE,IAAA,IAAI,UAAU,CAAC,YAAY,KAAK,SAAS,EAAE;AAC1C,QAAA,UAAU,CAAC,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC;;IAGzE,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,UAAwC,EAAA;AACxE,IAAA,MAAM,kBAAkB,GAAuB;AAC9C,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,CAAC,CAAA,yBAAA,EAA4B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAE,CAAA,CAAC;;AAElE;;;;"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var common = require('@nestjs/common');
|
|
4
|
+
var swagger = require('@nestjs/swagger');
|
|
5
|
+
var classTransformer = require('class-transformer');
|
|
6
|
+
var classValidator = require('class-validator');
|
|
7
|
+
|
|
8
|
+
function ApiPropertyObject(options) {
|
|
9
|
+
validateOptions(options);
|
|
10
|
+
const apiPropertyOptions = buildApiPropertyOptions(options);
|
|
11
|
+
const decorators = buildDecorators(options, apiPropertyOptions);
|
|
12
|
+
return common.applyDecorators(...decorators);
|
|
13
|
+
}
|
|
14
|
+
function buildApiPropertyOptions(properties) {
|
|
15
|
+
const apiPropertyOptions = {
|
|
16
|
+
description: `${String(properties.entity.name)} ${properties.description ?? ""}`,
|
|
17
|
+
nullable: properties.isNullable,
|
|
18
|
+
type: properties.type,
|
|
19
|
+
};
|
|
20
|
+
apiPropertyOptions.required = properties.isResponse === false || properties.isResponse === undefined ? properties.isRequired : false;
|
|
21
|
+
if (properties.additionalProperties) {
|
|
22
|
+
apiPropertyOptions.additionalProperties = properties.additionalProperties;
|
|
23
|
+
}
|
|
24
|
+
if (properties.isArray) {
|
|
25
|
+
apiPropertyOptions.isArray = true;
|
|
26
|
+
apiPropertyOptions.minItems = properties.minItems;
|
|
27
|
+
apiPropertyOptions.maxItems = properties.maxItems;
|
|
28
|
+
apiPropertyOptions.uniqueItems = properties.isUniqueItems;
|
|
29
|
+
apiPropertyOptions.description = `Array of ${String(properties.entity.name)} ${properties.description ?? ""}`;
|
|
30
|
+
}
|
|
31
|
+
return apiPropertyOptions;
|
|
32
|
+
}
|
|
33
|
+
function buildDecorators(properties, apiPropertyOptions) {
|
|
34
|
+
const decorators = [swagger.ApiProperty(apiPropertyOptions)];
|
|
35
|
+
decorators.push(...buildResponseDecorators(properties), ...buildRequestDecorators(properties), ...buildTransformDecorators(properties), ...buildObjectValidationDecorators(properties));
|
|
36
|
+
return decorators;
|
|
37
|
+
}
|
|
38
|
+
function buildObjectValidationDecorators(properties) {
|
|
39
|
+
const decorators = [];
|
|
40
|
+
const isArray = properties.isArray ?? false;
|
|
41
|
+
if (!properties.isResponse && properties.shouldValidateNested) {
|
|
42
|
+
decorators.push(classValidator.ValidateNested({ each: isArray }));
|
|
43
|
+
}
|
|
44
|
+
return decorators;
|
|
45
|
+
}
|
|
46
|
+
function buildRequestDecorators(properties) {
|
|
47
|
+
const decorators = [];
|
|
48
|
+
if (properties.isResponse === false || properties.isResponse === undefined) {
|
|
49
|
+
if (!properties.isRequired) {
|
|
50
|
+
decorators.push(classValidator.IsOptional());
|
|
51
|
+
}
|
|
52
|
+
if (properties.isArray === true) {
|
|
53
|
+
decorators.push(classValidator.IsArray(), classValidator.ArrayMinSize(properties.minItems), classValidator.ArrayMaxSize(properties.maxItems));
|
|
54
|
+
if (properties.minItems > 0) {
|
|
55
|
+
decorators.push(classValidator.ArrayNotEmpty());
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return decorators;
|
|
60
|
+
}
|
|
61
|
+
function buildResponseDecorators(properties) {
|
|
62
|
+
const decorators = [];
|
|
63
|
+
if (properties.isResponse) {
|
|
64
|
+
decorators.push(swagger.ApiResponseProperty());
|
|
65
|
+
if (properties.isExpose === undefined || properties.isExpose) {
|
|
66
|
+
decorators.push(classTransformer.Expose());
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
decorators.push(classTransformer.Exclude());
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return decorators;
|
|
73
|
+
}
|
|
74
|
+
function buildTransformDecorators(properties) {
|
|
75
|
+
const decorators = [];
|
|
76
|
+
decorators.push(classTransformer.Type(() => properties.type));
|
|
77
|
+
return decorators;
|
|
78
|
+
}
|
|
79
|
+
function validateOptions(properties) {
|
|
80
|
+
const errors = [];
|
|
81
|
+
if (properties.isArray && !properties.shouldValidateNested && !properties.isResponse) {
|
|
82
|
+
errors.push("Array property must be 'shouldValidateNested'");
|
|
83
|
+
}
|
|
84
|
+
if (properties.isArray === true) {
|
|
85
|
+
if (properties.minItems > properties.maxItems) {
|
|
86
|
+
errors.push("'minItems' is greater than 'maxItems'");
|
|
87
|
+
}
|
|
88
|
+
if (properties.minItems < 0) {
|
|
89
|
+
errors.push("'minItems' is less than 0");
|
|
90
|
+
}
|
|
91
|
+
if (properties.maxItems < 0) {
|
|
92
|
+
errors.push("'maxItems' is less than 0");
|
|
93
|
+
}
|
|
94
|
+
if (properties.isUniqueItems && properties.maxItems <= 1) {
|
|
95
|
+
errors.push("'uniqueItems' is true but 'maxItems' is less than or equal to 1");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (errors.length > 0) {
|
|
99
|
+
throw new Error(`ApiPropertyString error: ${errors.join("\n")}`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
exports.ApiPropertyObject = ApiPropertyObject;
|
|
104
|
+
//# sourceMappingURL=object.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.decorator.js","sources":["../../../../../../src/decorator/api/property/object.decorator.ts"],"sourcesContent":[null],"names":["applyDecorators","ApiProperty","ValidateNested","IsOptional","IsArray","ArrayMinSize","ArrayMaxSize","ArrayNotEmpty","ApiResponseProperty","Expose","Exclude","Type"],"mappings":";;;;;;;AASM,SAAU,iBAAiB,CAAC,OAAqC,EAAA;IACtE,eAAe,CAAC,OAAO,CAAC;AAExB,IAAA,MAAM,kBAAkB,GAAuB,uBAAuB,CAAC,OAAO,CAAC;IAC/E,MAAM,UAAU,GAA6B,eAAe,CAAC,OAAO,EAAE,kBAAkB,CAAC;AAEzF,IAAA,OAAOA,sBAAe,CAAC,GAAG,UAAU,CAAC;AACtC;AAEA,SAAS,uBAAuB,CAAC,UAAwC,EAAA;AACxE,IAAA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;;;"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var common = require('@nestjs/common');
|
|
4
|
+
var swagger = require('@nestjs/swagger');
|
|
5
|
+
var classTransformer = require('class-transformer');
|
|
6
|
+
var classValidator = require('class-validator');
|
|
7
|
+
require('../../../constant/decorator/api/function.constant.js');
|
|
8
|
+
var string_constant = require('../../../constant/interface/api/property/string.constant.js');
|
|
9
|
+
require('../../../enum/decorator/api/action.enum.js');
|
|
10
|
+
require('../../../enum/decorator/api/authentication-type.enum.js');
|
|
11
|
+
require('../../../enum/decorator/api/controller/load-relations-strategy.enum.js');
|
|
12
|
+
require('../../../enum/decorator/api/controller/request-transformer-type.enum.js');
|
|
13
|
+
require('../../../enum/decorator/api/dto-type.enum.js');
|
|
14
|
+
require('../../../enum/decorator/api/function/type.enum.js');
|
|
15
|
+
var dataType_enum = require('../../../enum/decorator/api/property/data-type.enum.js');
|
|
16
|
+
require('../../../enum/decorator/api/property/date/identifier.enum.js');
|
|
17
|
+
require('../../../enum/decorator/api/property/date/type.enum.js');
|
|
18
|
+
require('../../../enum/decorator/api/property/desribe-type.enum.js');
|
|
19
|
+
require('../../../enum/decorator/api/property/number-type.enum.js');
|
|
20
|
+
var stringType_enum = require('../../../enum/decorator/api/property/string-type.enum.js');
|
|
21
|
+
require('../../../enum/decorator/api/route-type.enum.js');
|
|
22
|
+
require('../../../enum/exception.enum.js');
|
|
23
|
+
require('../../../enum/filter-order-direction.enum.js');
|
|
24
|
+
require('../../../enum/utility/error-string-action.enum.js');
|
|
25
|
+
require('../../../validator/all-or-none-of-listed-properties.validator.js');
|
|
26
|
+
require('../../../validator/has-at-least-one-and-only-one-of-listed-properties.validator.js');
|
|
27
|
+
require('../../../validator/has-at-least-one-of-listed-properties.validator.js');
|
|
28
|
+
require('../../../validator/has-at-least-one-property.validator.js');
|
|
29
|
+
var isRegularExpression_validator = require('../../../validator/is-regular-expression.validator.js');
|
|
30
|
+
require('../../../validator/only-one-of-listed-properties.validator.js');
|
|
31
|
+
|
|
32
|
+
function ApiPropertyString(properties) {
|
|
33
|
+
validateOptions(properties);
|
|
34
|
+
const apiPropertyOptions = buildApiPropertyOptions(properties);
|
|
35
|
+
const decorators = buildDecorators(properties, apiPropertyOptions);
|
|
36
|
+
return common.applyDecorators(...decorators);
|
|
37
|
+
}
|
|
38
|
+
function buildApiPropertyOptions(properties) {
|
|
39
|
+
const apiPropertyOptions = {
|
|
40
|
+
description: `${String(properties.entity.name)} ${properties.description ?? ""}`,
|
|
41
|
+
nullable: properties.isNullable,
|
|
42
|
+
type: dataType_enum.EApiPropertyDataType.STRING,
|
|
43
|
+
};
|
|
44
|
+
apiPropertyOptions.required = properties.isResponse === false || properties.isResponse === undefined ? properties.isRequired : false;
|
|
45
|
+
if (properties.isArray === true) {
|
|
46
|
+
apiPropertyOptions.isArray = true;
|
|
47
|
+
apiPropertyOptions.minItems = properties.minItems;
|
|
48
|
+
apiPropertyOptions.maxItems = properties.maxItems;
|
|
49
|
+
apiPropertyOptions.uniqueItems = properties.isUniqueItems;
|
|
50
|
+
apiPropertyOptions.items = {
|
|
51
|
+
maxLength: properties.maxLength,
|
|
52
|
+
minLength: properties.minLength,
|
|
53
|
+
};
|
|
54
|
+
apiPropertyOptions.example = Array.isArray(properties.exampleValue) ? properties.exampleValue : [properties.exampleValue];
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
apiPropertyOptions.maxLength = properties.maxLength;
|
|
58
|
+
apiPropertyOptions.minLength = properties.minLength;
|
|
59
|
+
apiPropertyOptions.example = properties.exampleValue;
|
|
60
|
+
}
|
|
61
|
+
apiPropertyOptions.format = properties.format;
|
|
62
|
+
apiPropertyOptions.pattern = properties.pattern.slice(1, -1);
|
|
63
|
+
return apiPropertyOptions;
|
|
64
|
+
}
|
|
65
|
+
function buildDecorators(properties, apiPropertyOptions) {
|
|
66
|
+
const decorators = [swagger.ApiProperty(apiPropertyOptions)];
|
|
67
|
+
decorators.push(...buildResponseDecorators(properties), ...buildRequestDecorators(properties), ...buildFormatDecorators(properties), ...buildStringValidationDecorators(properties));
|
|
68
|
+
return decorators;
|
|
69
|
+
}
|
|
70
|
+
function buildFormatDecorators(properties) {
|
|
71
|
+
const decorators = [];
|
|
72
|
+
const isArray = properties.isArray ?? false;
|
|
73
|
+
if (properties.isResponse === undefined || !properties.isResponse) {
|
|
74
|
+
switch (properties.format) {
|
|
75
|
+
case stringType_enum.EApiPropertyStringType.DATE: {
|
|
76
|
+
decorators.push(classValidator.IsDate({ each: isArray }), classTransformer.Type(() => Date));
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
case stringType_enum.EApiPropertyStringType.EMAIL: {
|
|
80
|
+
decorators.push(classValidator.IsEmail({}, { each: isArray }));
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
case stringType_enum.EApiPropertyStringType.IP: {
|
|
84
|
+
decorators.push(classValidator.IsIP(string_constant.STRING_PROPERTY_API_INTERFACE_CONSTANT.IP_VERSION, { each: isArray }));
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
case stringType_enum.EApiPropertyStringType.LOWERCASE_STRING: {
|
|
88
|
+
decorators.push(classValidator.IsString({ each: isArray }), classValidator.IsLowercase({ each: isArray }));
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
case stringType_enum.EApiPropertyStringType.REGEXP: {
|
|
92
|
+
decorators.push(classValidator.Validate(isRegularExpression_validator.IsRegularExpression, {
|
|
93
|
+
each: isArray,
|
|
94
|
+
message: `${String(properties.description)} must be valid regular expression string`,
|
|
95
|
+
}), classValidator.Matches(new RegExp(properties.pattern.slice(1, -1)), { each: isArray }), classTransformer.Type(() => RegExp));
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
case stringType_enum.EApiPropertyStringType.STRING: {
|
|
99
|
+
decorators.push(classValidator.IsString({ each: isArray }));
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
case stringType_enum.EApiPropertyStringType.UPPERCASE_STRING: {
|
|
103
|
+
decorators.push(classValidator.IsString({ each: isArray }), classValidator.IsUppercase({ each: isArray }));
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
case stringType_enum.EApiPropertyStringType.URL: {
|
|
107
|
+
decorators.push(classValidator.IsUrl({
|
|
108
|
+
protocols: ["https", "http"],
|
|
109
|
+
require_host: true,
|
|
110
|
+
require_protocol: true,
|
|
111
|
+
}, { each: isArray }));
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
case stringType_enum.EApiPropertyStringType.UUID: {
|
|
115
|
+
decorators.push(classValidator.IsUUID("all", { each: isArray }));
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
default: {
|
|
119
|
+
throw new Error(`ApiPropertyString error: Format is not valid for string property: ${String(properties.format)}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return decorators;
|
|
124
|
+
}
|
|
125
|
+
function buildRequestDecorators(properties) {
|
|
126
|
+
const decorators = [];
|
|
127
|
+
if (properties.isResponse === false || properties.isResponse === undefined) {
|
|
128
|
+
if (!properties.isRequired) {
|
|
129
|
+
decorators.push(classValidator.IsOptional());
|
|
130
|
+
}
|
|
131
|
+
if (properties.isArray === true) {
|
|
132
|
+
decorators.push(classValidator.IsArray(), classValidator.ArrayMinSize(properties.minItems), classValidator.ArrayMaxSize(properties.maxItems));
|
|
133
|
+
if (properties.minItems > 0) {
|
|
134
|
+
decorators.push(classValidator.ArrayNotEmpty());
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return decorators;
|
|
139
|
+
}
|
|
140
|
+
function buildResponseDecorators(properties) {
|
|
141
|
+
const decorators = [];
|
|
142
|
+
if (properties.isResponse) {
|
|
143
|
+
decorators.push(swagger.ApiResponseProperty());
|
|
144
|
+
if (properties.isExpose === undefined || properties.isExpose) {
|
|
145
|
+
decorators.push(classTransformer.Expose());
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
decorators.push(classTransformer.Exclude());
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return decorators;
|
|
152
|
+
}
|
|
153
|
+
function buildStringValidationDecorators(properties) {
|
|
154
|
+
const decorators = [];
|
|
155
|
+
const isArray = properties.isArray ?? false;
|
|
156
|
+
if (properties.isResponse === false || properties.isResponse === undefined) {
|
|
157
|
+
classValidator.Matches(new RegExp(properties.pattern.slice(1, -1)), { each: isArray });
|
|
158
|
+
classValidator.Length(properties.minLength, properties.maxLength, { each: isArray });
|
|
159
|
+
}
|
|
160
|
+
return decorators;
|
|
161
|
+
}
|
|
162
|
+
function validateOptions(properties) {
|
|
163
|
+
const errors = [];
|
|
164
|
+
if ((!properties.isResponse && (!properties.exampleValue || !properties.pattern)) || (properties.exampleValue && properties.pattern)) {
|
|
165
|
+
const matches = /^\/(.*?)\/([gimuy]*)$/.exec(properties.pattern);
|
|
166
|
+
if (matches) {
|
|
167
|
+
const pattern = matches[string_constant.STRING_PROPERTY_API_INTERFACE_CONSTANT.REGEX_PATTERN_INDEX];
|
|
168
|
+
const flags = matches[string_constant.STRING_PROPERTY_API_INTERFACE_CONSTANT.REGEX_FLAGS_INDEX];
|
|
169
|
+
const regex = new RegExp(pattern, flags);
|
|
170
|
+
if (Array.isArray(properties.exampleValue)) {
|
|
171
|
+
for (const example of properties.exampleValue) {
|
|
172
|
+
if (!regex.test(example)) {
|
|
173
|
+
errors.push("RegExp 'pattern' does not match example string: " + example);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else if (!regex.test(properties.exampleValue)) {
|
|
178
|
+
errors.push("RegExp 'pattern' does not match 'example' string: " + properties.exampleValue);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
errors.push("Invalid RegExp 'pattern' format: " + properties.pattern);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if (properties.minLength > properties.maxLength) {
|
|
186
|
+
errors.push("'minLength' is greater than 'maxLength'");
|
|
187
|
+
}
|
|
188
|
+
if (properties.minLength < 0) {
|
|
189
|
+
errors.push("'minLength' is less than 0");
|
|
190
|
+
}
|
|
191
|
+
if (properties.maxLength < 0) {
|
|
192
|
+
errors.push("'maxLength' is less than 0");
|
|
193
|
+
}
|
|
194
|
+
if (Array.isArray(properties.exampleValue)) {
|
|
195
|
+
for (const example of properties.exampleValue) {
|
|
196
|
+
if (example.length < properties.minLength) {
|
|
197
|
+
errors.push("Example length is less than 'minLength': " + example);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
else if (properties.exampleValue.length < properties.minLength) {
|
|
202
|
+
errors.push("Example length is less than 'minLength': " + properties.exampleValue);
|
|
203
|
+
}
|
|
204
|
+
if (Array.isArray(properties.exampleValue)) {
|
|
205
|
+
for (const example of properties.exampleValue) {
|
|
206
|
+
if (example.length > properties.maxLength) {
|
|
207
|
+
errors.push("Example length is greater than 'maxLength': " + example);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
else if (properties.exampleValue.length > properties.maxLength) {
|
|
212
|
+
errors.push("Example length is greater than 'maxLength': " + properties.exampleValue);
|
|
213
|
+
}
|
|
214
|
+
if (properties.isArray === true) {
|
|
215
|
+
if (properties.minItems > properties.maxItems) {
|
|
216
|
+
errors.push("'minItems' is greater than 'maxItems'");
|
|
217
|
+
}
|
|
218
|
+
if (properties.minItems < 0) {
|
|
219
|
+
errors.push("'minItems' is less than 0");
|
|
220
|
+
}
|
|
221
|
+
if (properties.maxItems < 0) {
|
|
222
|
+
errors.push("'maxItems' is less than 0");
|
|
223
|
+
}
|
|
224
|
+
if (properties.isUniqueItems && properties.maxItems <= 1) {
|
|
225
|
+
errors.push("'uniqueItems' is true but 'maxItems' is less than or equal to 1");
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (errors.length > 0) {
|
|
229
|
+
throw new Error(`ApiPropertyString error: ${errors.join("\n")}`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
exports.ApiPropertyString = ApiPropertyString;
|
|
234
|
+
//# sourceMappingURL=string.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.decorator.js","sources":["../../../../../../src/decorator/api/property/string.decorator.ts"],"sourcesContent":[null],"names":["applyDecorators","EApiPropertyDataType","ApiProperty","EApiPropertyStringType","IsDate","Type","IsEmail","IsIP","STRING_PROPERTY_API_INTERFACE_CONSTANT","IsString","IsLowercase","Validate","IsRegularExpression","Matches","IsUppercase","IsUrl","IsUUID","IsOptional","IsArray","ArrayMinSize","ArrayMaxSize","ArrayNotEmpty","ApiResponseProperty","Expose","Exclude","Length"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaM,SAAU,iBAAiB,CAAC,UAAwC,EAAA;IACzE,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,UAAwC,EAAA;AACxE,IAAA,MAAM,kBAAkB,GAA6C;AACpE,QAAA,WAAW,EAAE,CAAG,EAAA,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,WAAW,IAAI,EAAE,CAAE,CAAA;QAEhF,QAAQ,EAAE,UAAU,CAAC,UAAU;QAC/B,IAAI,EAAEC,kCAAoB,CAAC,MAAM;KACjC;IAED,kBAAkB,CAAC,QAAQ,GAAG,UAAU,CAAC,UAAU,KAAK,KAAK,IAAI,UAAU,CAAC,UAAU,KAAK,SAAS,GAAG,UAAU,CAAC,UAAU,GAAG,KAAK;AAEpI,IAAA,IAAI,UAAU,CAAC,O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