@elsikora/nestjs-crud-automator 2.1.2-dev.1 → 2.2.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/dist/cjs/class/api/authorization/bootstrap-validation.service.class.js +1 -1
- package/dist/cjs/class/api/authorization/bootstrap-validation.service.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/hook/permission/cache.class.js +1 -1
- package/dist/cjs/class/api/authorization/hook/permission/cache.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/hook/permission/resolver.class.js +1 -1
- package/dist/cjs/class/api/authorization/hook/permission/resolver.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/iam/attachment/cache.class.js +1 -1
- package/dist/cjs/class/api/authorization/iam/attachment/cache.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/iam/attachment/resolver.class.js +2 -2
- package/dist/cjs/class/api/authorization/iam/attachment/resolver.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/iam/document/cache.class.js +1 -1
- package/dist/cjs/class/api/authorization/iam/document/cache.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/iam/document/resolver.class.js +1 -1
- package/dist/cjs/class/api/authorization/iam/document/resolver.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/runtime.class.js +2 -2
- package/dist/cjs/class/api/authorization/runtime.class.js.map +1 -1
- package/dist/cjs/class/api/route-runtime.class.d.ts +1 -0
- package/dist/cjs/class/api/route-runtime.class.js +41 -3
- package/dist/cjs/class/api/route-runtime.class.js.map +1 -1
- package/dist/cjs/constant/interface/api/property/default-string-format.constant.js +9 -0
- package/dist/cjs/constant/interface/api/property/default-string-format.constant.js.map +1 -1
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/bigint-string/constant.d.ts +5 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/bigint-string/constant.js +12 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/bigint-string/constant.js.map +1 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/bigint-string/index.d.ts +2 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/bigint-string/sign/default.constant.d.ts +2 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/bigint-string/sign/default.constant.js +6 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/bigint-string/sign/default.constant.js.map +1 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/bigint-string/sign/index.d.ts +2 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/bigint-string/sign/properties.constant.d.ts +2 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/bigint-string/sign/properties.constant.js +28 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/bigint-string/sign/properties.constant.js.map +1 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/constant.d.ts +9 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/constant.js +12 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/constant.js.map +1 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/customizer/index.d.ts +1 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/customizer/map.constant.d.ts +2 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/customizer/map.constant.js +28 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/customizer/map.constant.js.map +1 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/index.d.ts +1 -0
- package/dist/cjs/constant/utility/api/index.d.ts +1 -0
- package/dist/cjs/constant/utility/index.d.ts +1 -0
- package/dist/cjs/decorator/api/controller/observable.decorator.js +9 -3
- package/dist/cjs/decorator/api/controller/observable.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/controller/securable.decorator.js +9 -3
- package/dist/cjs/decorator/api/controller/securable.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/method.decorator.js +38 -15
- package/dist/cjs/decorator/api/method.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/boolean.decorator.d.ts +1 -1
- package/dist/cjs/decorator/api/property/boolean.decorator.js +4 -5
- package/dist/cjs/decorator/api/property/boolean.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/date.decorator.d.ts +1 -1
- package/dist/cjs/decorator/api/property/date.decorator.js +4 -5
- package/dist/cjs/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/enum.decorator.d.ts +1 -1
- package/dist/cjs/decorator/api/property/enum.decorator.js +4 -5
- package/dist/cjs/decorator/api/property/enum.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/number.decorator.d.ts +1 -1
- package/dist/cjs/decorator/api/property/number.decorator.js +4 -5
- package/dist/cjs/decorator/api/property/number.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/object.decorator.d.ts +1 -1
- package/dist/cjs/decorator/api/property/object.decorator.js +38 -6
- package/dist/cjs/decorator/api/property/object.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/string.decorator.d.ts +1 -1
- package/dist/cjs/decorator/api/property/string.decorator.js +8 -6
- package/dist/cjs/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/uuid.decorator.d.ts +1 -1
- package/dist/cjs/decorator/api/property/uuid.decorator.js +4 -5
- package/dist/cjs/decorator/api/property/uuid.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/route-custom.decorator.js +1 -0
- package/dist/cjs/decorator/api/route-custom.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/service/decorator.d.ts +1 -1
- package/dist/cjs/decorator/api/service/decorator.js +1 -1
- package/dist/cjs/decorator/api/service/observable.decorator.js +9 -3
- package/dist/cjs/decorator/api/service/observable.decorator.js.map +1 -1
- package/dist/cjs/enum/decorator/api/property/data-type.enum.d.ts +1 -0
- package/dist/cjs/enum/decorator/api/property/data-type.enum.js +1 -0
- package/dist/cjs/enum/decorator/api/property/data-type.enum.js.map +1 -1
- package/dist/cjs/enum/decorator/api/property/string-type.enum.d.ts +1 -0
- package/dist/cjs/enum/decorator/api/property/string-type.enum.js +1 -0
- package/dist/cjs/enum/decorator/api/property/string-type.enum.js.map +1 -1
- package/dist/cjs/factory/api-controller.factory.js +4 -0
- package/dist/cjs/factory/api-controller.factory.js.map +1 -1
- package/dist/cjs/index.js +25 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interceptor/correlation-id-response-body.interceptor.js +2 -8
- package/dist/cjs/interceptor/correlation-id-response-body.interceptor.js.map +1 -1
- package/dist/cjs/interface/decorator/api/route/response/properties.interface.d.ts +3 -1
- package/dist/cjs/interface/decorator/api/route/runtime-properties.interface.d.ts +2 -1
- package/dist/cjs/module/api/authorization.module.js +1 -1
- package/dist/cjs/module/api/authorization.module.js.map +1 -1
- package/dist/cjs/type/decorator/api/index.d.ts +1 -0
- package/dist/cjs/type/decorator/api/property/default/string/format/type.d.ts +1 -1
- package/dist/cjs/type/decorator/api/route/custom/dto-properties.type.d.ts +8 -0
- package/dist/cjs/type/decorator/api/route/custom/index.d.ts +1 -0
- package/dist/cjs/type/decorator/api/route/discriminated/dto-properties.type.d.ts +10 -0
- package/dist/cjs/type/decorator/api/route/discriminated/index.d.ts +1 -0
- package/dist/cjs/type/decorator/api/route/index.d.ts +2 -0
- package/dist/cjs/type/index.d.ts +1 -0
- package/dist/cjs/type/utility/api/discriminator/index.d.ts +1 -0
- package/dist/cjs/type/utility/api/discriminator/validate/config-properties.type.d.ts +8 -0
- package/dist/cjs/type/utility/api/discriminator/validate/index.d.ts +1 -0
- package/dist/cjs/type/utility/api/get-default-string-format-properties/bigint-string/index.d.ts +2 -0
- package/dist/cjs/type/utility/api/get-default-string-format-properties/bigint-string/options.type.d.ts +4 -0
- package/dist/cjs/type/utility/api/get-default-string-format-properties/bigint-string/sign/index.d.ts +2 -0
- package/dist/cjs/type/utility/api/get-default-string-format-properties/bigint-string/sign/properties.type.d.ts +2 -0
- package/dist/cjs/type/utility/api/get-default-string-format-properties/bigint-string/sign/type.d.ts +1 -0
- package/dist/cjs/type/utility/api/get-default-string-format-properties/customizer/index.d.ts +2 -0
- package/dist/cjs/type/utility/api/get-default-string-format-properties/customizer/map.type.d.ts +5 -0
- package/dist/cjs/type/utility/api/get-default-string-format-properties/customizer/type.d.ts +3 -0
- package/dist/cjs/type/utility/api/get-default-string-format-properties/index.d.ts +3 -0
- package/dist/cjs/type/utility/api/get-default-string-format-properties/options.type.d.ts +4 -0
- package/dist/cjs/type/utility/api/get-default-string-format-properties/parameters.type.d.ts +3 -0
- package/dist/cjs/type/utility/api/index.d.ts +2 -0
- package/dist/cjs/type/utility/index.d.ts +1 -1
- package/dist/cjs/utility/api/controller/apply/decorators.utility.d.ts +1 -1
- package/dist/cjs/utility/api/controller/apply/decorators.utility.js +1 -1
- package/dist/cjs/utility/api/controller/apply/metadata.utility.js +0 -1
- package/dist/cjs/utility/api/controller/apply/metadata.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/get/dto.utility.js +1 -0
- package/dist/cjs/utility/api/controller/get/dto.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/get-list/transform/filter.utility.d.ts +1 -1
- package/dist/cjs/utility/api/controller/get-list/transform/filter.utility.js +1 -1
- package/dist/cjs/utility/api/controller/get-list/transform/operation.utility.d.ts +2 -2
- package/dist/cjs/utility/api/controller/get-list/transform/operation.utility.js +2 -2
- package/dist/cjs/utility/api/controller/write/dto-swagger.utility.js +7 -3
- package/dist/cjs/utility/api/controller/write/dto-swagger.utility.js.map +1 -1
- package/dist/cjs/utility/api/discriminator/index.d.ts +1 -0
- package/dist/cjs/utility/api/discriminator/validate/config.utility.d.ts +7 -0
- package/dist/cjs/utility/api/discriminator/validate/config.utility.js +54 -0
- package/dist/cjs/utility/api/discriminator/validate/config.utility.js.map +1 -0
- package/dist/cjs/utility/api/discriminator/validate/index.d.ts +1 -0
- package/dist/cjs/utility/api/get-default-string-format-properties/bigint-string/apply-options.utility.d.ts +9 -0
- package/dist/cjs/utility/api/get-default-string-format-properties/bigint-string/apply-options.utility.js +20 -0
- package/dist/cjs/utility/api/get-default-string-format-properties/bigint-string/apply-options.utility.js.map +1 -0
- package/dist/cjs/utility/api/get-default-string-format-properties/bigint-string/index.d.ts +1 -0
- package/dist/cjs/utility/api/get-default-string-format-properties/customizer/apply.utility.d.ts +11 -0
- package/dist/cjs/utility/api/get-default-string-format-properties/customizer/apply.utility.js +20 -0
- package/dist/cjs/utility/api/get-default-string-format-properties/customizer/apply.utility.js.map +1 -0
- package/dist/cjs/utility/api/get-default-string-format-properties/customizer/index.d.ts +1 -0
- package/dist/cjs/utility/api/get-default-string-format-properties/index.d.ts +1 -0
- package/dist/cjs/utility/api/{get-default-string-format-properties.utility.d.ts → get-default-string-format-properties/utility.d.ts} +5 -2
- package/dist/cjs/utility/api/{get-default-string-format-properties.utility.js → get-default-string-format-properties/utility.js} +8 -5
- package/dist/cjs/utility/api/get-default-string-format-properties/utility.js.map +1 -0
- package/dist/cjs/utility/api/index.d.ts +2 -1
- package/dist/cjs/utility/api/route/apply-dto-metadata.utility.js +20 -6
- package/dist/cjs/utility/api/route/apply-dto-metadata.utility.js.map +1 -1
- package/dist/cjs/utility/api/route/discriminator/build-open-api-schema.utility.d.ts +9 -0
- package/dist/cjs/utility/api/route/discriminator/build-open-api-schema.utility.js +26 -0
- package/dist/cjs/utility/api/route/discriminator/build-open-api-schema.utility.js.map +1 -0
- package/dist/cjs/utility/api/route/discriminator/create-validation-failure.utility.d.ts +9 -0
- package/dist/cjs/utility/api/route/discriminator/create-validation-failure.utility.js +46 -0
- package/dist/cjs/utility/api/route/discriminator/create-validation-failure.utility.js.map +1 -0
- package/dist/cjs/utility/api/route/discriminator/index.d.ts +6 -0
- package/dist/cjs/utility/api/route/discriminator/is-dto-properties.utility.d.ts +7 -0
- package/dist/cjs/utility/api/route/discriminator/is-dto-properties.utility.js +13 -0
- package/dist/cjs/utility/api/route/discriminator/is-dto-properties.utility.js.map +1 -0
- package/dist/cjs/utility/api/route/discriminator/prepare-payload.utility.d.ts +8 -0
- package/dist/cjs/utility/api/route/discriminator/prepare-payload.utility.js +19 -0
- package/dist/cjs/utility/api/route/discriminator/prepare-payload.utility.js.map +1 -0
- package/dist/cjs/utility/api/route/discriminator/resolve-dto.utility.d.ts +10 -0
- package/dist/cjs/utility/api/route/discriminator/resolve-dto.utility.js +35 -0
- package/dist/cjs/utility/api/route/discriminator/resolve-dto.utility.js.map +1 -0
- package/dist/cjs/utility/api/route/discriminator/validate-dto-properties.utility.d.ts +8 -0
- package/dist/cjs/utility/api/route/discriminator/validate-dto-properties.utility.js +21 -0
- package/dist/cjs/utility/api/route/discriminator/validate-dto-properties.utility.js.map +1 -0
- package/dist/cjs/utility/api/route/dto/collect-with-registered-children.utility.d.ts +8 -0
- package/dist/cjs/utility/api/route/dto/collect-with-registered-children.utility.js +29 -0
- package/dist/cjs/utility/api/route/dto/collect-with-registered-children.utility.js.map +1 -0
- package/dist/cjs/utility/api/route/dto/index.d.ts +1 -0
- package/dist/cjs/utility/api/route/index.d.ts +4 -0
- package/dist/cjs/utility/api/route/response/project-relation.utility.js +16 -13
- package/dist/cjs/utility/api/route/response/project-relation.utility.js.map +1 -1
- package/dist/cjs/utility/api/route/response/serialize.utility.js +20 -0
- package/dist/cjs/utility/api/route/response/serialize.utility.js.map +1 -1
- package/dist/cjs/utility/api/route/validation/flatten-errors.utility.d.ts +8 -0
- package/dist/cjs/utility/api/route/validation/flatten-errors.utility.js +26 -0
- package/dist/cjs/utility/api/route/validation/flatten-errors.utility.js.map +1 -0
- package/dist/cjs/utility/api/route/validation/index.d.ts +1 -0
- package/dist/cjs/utility/authorization/scope-merge-where.utility.js +2 -2
- package/dist/cjs/utility/authorization/scope-merge-where.utility.js.map +1 -1
- package/dist/cjs/utility/database/typeorm/is/foreign-key-violation.utility.js +1 -4
- package/dist/cjs/utility/database/typeorm/is/foreign-key-violation.utility.js.map +1 -1
- package/dist/cjs/utility/database/typeorm/is/unique-violation.utility.js +1 -4
- package/dist/cjs/utility/database/typeorm/is/unique-violation.utility.js.map +1 -1
- package/dist/cjs/utility/dto/build-decorator.utility.js +1 -3
- package/dist/cjs/utility/dto/build-decorator.utility.js.map +1 -1
- package/dist/cjs/utility/dto/manual/property-metadata.utility.js +1 -1
- package/dist/cjs/utility/dto/manual/property-metadata.utility.js.map +1 -1
- package/dist/cjs/utility/generate-entity-information.utility.js +8 -15
- package/dist/cjs/utility/generate-entity-information.utility.js.map +1 -1
- package/dist/cjs/utility/index.d.ts +1 -1
- package/dist/cjs/utility/register-auto-dto-child.utility.d.ts +6 -0
- package/dist/cjs/utility/register-auto-dto-child.utility.js +30 -0
- package/dist/cjs/utility/register-auto-dto-child.utility.js.map +1 -1
- package/dist/cjs/validator/has/paired-custom-suffixes-fields.validator.js +1 -1
- package/dist/cjs/validator/has/paired-custom-suffixes-fields.validator.js.map +1 -1
- package/dist/cjs/validator/must-match-one-of-schemas.validator.d.ts +1 -2
- package/dist/cjs/validator/must-match-one-of-schemas.validator.js +4 -33
- package/dist/cjs/validator/must-match-one-of-schemas.validator.js.map +1 -1
- package/dist/esm/class/api/authorization/bootstrap-validation.service.class.js +2 -2
- package/dist/esm/class/api/authorization/bootstrap-validation.service.class.js.map +1 -1
- package/dist/esm/class/api/authorization/hook/permission/cache.class.js +1 -1
- package/dist/esm/class/api/authorization/hook/permission/cache.class.js.map +1 -1
- package/dist/esm/class/api/authorization/hook/permission/resolver.class.js +2 -2
- package/dist/esm/class/api/authorization/hook/permission/resolver.class.js.map +1 -1
- package/dist/esm/class/api/authorization/iam/attachment/cache.class.js +1 -1
- package/dist/esm/class/api/authorization/iam/attachment/cache.class.js.map +1 -1
- package/dist/esm/class/api/authorization/iam/attachment/resolver.class.js +3 -3
- package/dist/esm/class/api/authorization/iam/attachment/resolver.class.js.map +1 -1
- package/dist/esm/class/api/authorization/iam/document/cache.class.js +1 -1
- package/dist/esm/class/api/authorization/iam/document/cache.class.js.map +1 -1
- package/dist/esm/class/api/authorization/iam/document/resolver.class.js +2 -2
- package/dist/esm/class/api/authorization/iam/document/resolver.class.js.map +1 -1
- package/dist/esm/class/api/authorization/runtime.class.js +2 -2
- package/dist/esm/class/api/authorization/runtime.class.js.map +1 -1
- package/dist/esm/class/api/route-runtime.class.d.ts +1 -0
- package/dist/esm/class/api/route-runtime.class.js +41 -3
- package/dist/esm/class/api/route-runtime.class.js.map +1 -1
- package/dist/esm/constant/interface/api/property/default-string-format.constant.js +9 -0
- package/dist/esm/constant/interface/api/property/default-string-format.constant.js.map +1 -1
- package/dist/esm/constant/utility/api/get-default-string-format-properties/bigint-string/constant.d.ts +5 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/bigint-string/constant.js +10 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/bigint-string/constant.js.map +1 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/bigint-string/index.d.ts +2 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/bigint-string/sign/default.constant.d.ts +2 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/bigint-string/sign/default.constant.js +4 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/bigint-string/sign/default.constant.js.map +1 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/bigint-string/sign/index.d.ts +2 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/bigint-string/sign/properties.constant.d.ts +2 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/bigint-string/sign/properties.constant.js +26 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/bigint-string/sign/properties.constant.js.map +1 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/constant.d.ts +9 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/constant.js +10 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/constant.js.map +1 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/customizer/index.d.ts +1 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/customizer/map.constant.d.ts +2 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/customizer/map.constant.js +26 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/customizer/map.constant.js.map +1 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/index.d.ts +1 -0
- package/dist/esm/constant/utility/api/index.d.ts +1 -0
- package/dist/esm/constant/utility/index.d.ts +1 -0
- package/dist/esm/decorator/api/controller/observable.decorator.js +9 -3
- package/dist/esm/decorator/api/controller/observable.decorator.js.map +1 -1
- package/dist/esm/decorator/api/controller/securable.decorator.js +9 -3
- package/dist/esm/decorator/api/controller/securable.decorator.js.map +1 -1
- package/dist/esm/decorator/api/method.decorator.js +31 -8
- package/dist/esm/decorator/api/method.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/boolean.decorator.d.ts +1 -1
- package/dist/esm/decorator/api/property/boolean.decorator.js +4 -5
- package/dist/esm/decorator/api/property/boolean.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/date.decorator.d.ts +1 -1
- package/dist/esm/decorator/api/property/date.decorator.js +4 -5
- package/dist/esm/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/enum.decorator.d.ts +1 -1
- package/dist/esm/decorator/api/property/enum.decorator.js +4 -5
- package/dist/esm/decorator/api/property/enum.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/number.decorator.d.ts +1 -1
- package/dist/esm/decorator/api/property/number.decorator.js +4 -5
- package/dist/esm/decorator/api/property/number.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/object.decorator.d.ts +1 -1
- package/dist/esm/decorator/api/property/object.decorator.js +38 -6
- package/dist/esm/decorator/api/property/object.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/string.decorator.d.ts +1 -1
- package/dist/esm/decorator/api/property/string.decorator.js +8 -6
- package/dist/esm/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/uuid.decorator.d.ts +1 -1
- package/dist/esm/decorator/api/property/uuid.decorator.js +4 -5
- package/dist/esm/decorator/api/property/uuid.decorator.js.map +1 -1
- package/dist/esm/decorator/api/route-custom.decorator.js +1 -0
- package/dist/esm/decorator/api/route-custom.decorator.js.map +1 -1
- package/dist/esm/decorator/api/service/decorator.d.ts +1 -1
- package/dist/esm/decorator/api/service/decorator.js +1 -1
- package/dist/esm/decorator/api/service/observable.decorator.js +9 -3
- package/dist/esm/decorator/api/service/observable.decorator.js.map +1 -1
- package/dist/esm/enum/decorator/api/property/data-type.enum.d.ts +1 -0
- package/dist/esm/enum/decorator/api/property/data-type.enum.js +1 -0
- package/dist/esm/enum/decorator/api/property/data-type.enum.js.map +1 -1
- package/dist/esm/enum/decorator/api/property/string-type.enum.d.ts +1 -0
- package/dist/esm/enum/decorator/api/property/string-type.enum.js +1 -0
- package/dist/esm/enum/decorator/api/property/string-type.enum.js.map +1 -1
- package/dist/esm/factory/api-controller.factory.js +4 -0
- package/dist/esm/factory/api-controller.factory.js.map +1 -1
- package/dist/esm/index.js +13 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interceptor/correlation-id-response-body.interceptor.js +2 -8
- package/dist/esm/interceptor/correlation-id-response-body.interceptor.js.map +1 -1
- package/dist/esm/interface/decorator/api/route/response/properties.interface.d.ts +3 -1
- package/dist/esm/interface/decorator/api/route/runtime-properties.interface.d.ts +2 -1
- package/dist/esm/module/api/authorization.module.js +1 -1
- package/dist/esm/module/api/authorization.module.js.map +1 -1
- package/dist/esm/type/decorator/api/index.d.ts +1 -0
- package/dist/esm/type/decorator/api/property/default/string/format/type.d.ts +1 -1
- package/dist/esm/type/decorator/api/route/custom/dto-properties.type.d.ts +8 -0
- package/dist/esm/type/decorator/api/route/custom/index.d.ts +1 -0
- package/dist/esm/type/decorator/api/route/discriminated/dto-properties.type.d.ts +10 -0
- package/dist/esm/type/decorator/api/route/discriminated/index.d.ts +1 -0
- package/dist/esm/type/decorator/api/route/index.d.ts +2 -0
- package/dist/esm/type/index.d.ts +1 -0
- package/dist/esm/type/utility/api/discriminator/index.d.ts +1 -0
- package/dist/esm/type/utility/api/discriminator/validate/config-properties.type.d.ts +8 -0
- package/dist/esm/type/utility/api/discriminator/validate/index.d.ts +1 -0
- package/dist/esm/type/utility/api/get-default-string-format-properties/bigint-string/index.d.ts +2 -0
- package/dist/esm/type/utility/api/get-default-string-format-properties/bigint-string/options.type.d.ts +4 -0
- package/dist/esm/type/utility/api/get-default-string-format-properties/bigint-string/sign/index.d.ts +2 -0
- package/dist/esm/type/utility/api/get-default-string-format-properties/bigint-string/sign/properties.type.d.ts +2 -0
- package/dist/esm/type/utility/api/get-default-string-format-properties/bigint-string/sign/type.d.ts +1 -0
- package/dist/esm/type/utility/api/get-default-string-format-properties/customizer/index.d.ts +2 -0
- package/dist/esm/type/utility/api/get-default-string-format-properties/customizer/map.type.d.ts +5 -0
- package/dist/esm/type/utility/api/get-default-string-format-properties/customizer/type.d.ts +3 -0
- package/dist/esm/type/utility/api/get-default-string-format-properties/index.d.ts +3 -0
- package/dist/esm/type/utility/api/get-default-string-format-properties/options.type.d.ts +4 -0
- package/dist/esm/type/utility/api/get-default-string-format-properties/parameters.type.d.ts +3 -0
- package/dist/esm/type/utility/api/index.d.ts +2 -0
- package/dist/esm/type/utility/index.d.ts +1 -1
- package/dist/esm/utility/api/controller/apply/decorators.utility.d.ts +1 -1
- package/dist/esm/utility/api/controller/apply/decorators.utility.js +1 -1
- package/dist/esm/utility/api/controller/apply/metadata.utility.js +0 -1
- package/dist/esm/utility/api/controller/apply/metadata.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/get/dto.utility.js +1 -0
- package/dist/esm/utility/api/controller/get/dto.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/get-list/transform/filter.utility.d.ts +1 -1
- package/dist/esm/utility/api/controller/get-list/transform/filter.utility.js +1 -1
- package/dist/esm/utility/api/controller/get-list/transform/operation.utility.d.ts +2 -2
- package/dist/esm/utility/api/controller/get-list/transform/operation.utility.js +2 -2
- package/dist/esm/utility/api/controller/write/dto-swagger.utility.js +7 -3
- package/dist/esm/utility/api/controller/write/dto-swagger.utility.js.map +1 -1
- package/dist/esm/utility/api/discriminator/index.d.ts +1 -0
- package/dist/esm/utility/api/discriminator/validate/config.utility.d.ts +7 -0
- package/dist/esm/utility/api/discriminator/validate/config.utility.js +52 -0
- package/dist/esm/utility/api/discriminator/validate/config.utility.js.map +1 -0
- package/dist/esm/utility/api/discriminator/validate/index.d.ts +1 -0
- package/dist/esm/utility/api/get-default-string-format-properties/bigint-string/apply-options.utility.d.ts +9 -0
- package/dist/esm/utility/api/get-default-string-format-properties/bigint-string/apply-options.utility.js +18 -0
- package/dist/esm/utility/api/get-default-string-format-properties/bigint-string/apply-options.utility.js.map +1 -0
- package/dist/esm/utility/api/get-default-string-format-properties/bigint-string/index.d.ts +1 -0
- package/dist/esm/utility/api/get-default-string-format-properties/customizer/apply.utility.d.ts +11 -0
- package/dist/esm/utility/api/get-default-string-format-properties/customizer/apply.utility.js +18 -0
- package/dist/esm/utility/api/get-default-string-format-properties/customizer/apply.utility.js.map +1 -0
- package/dist/esm/utility/api/get-default-string-format-properties/customizer/index.d.ts +1 -0
- package/dist/esm/utility/api/get-default-string-format-properties/index.d.ts +1 -0
- package/dist/esm/utility/api/{get-default-string-format-properties.utility.d.ts → get-default-string-format-properties/utility.d.ts} +5 -2
- package/dist/esm/utility/api/{get-default-string-format-properties.utility.js → get-default-string-format-properties/utility.js} +8 -5
- package/dist/esm/utility/api/get-default-string-format-properties/utility.js.map +1 -0
- package/dist/esm/utility/api/index.d.ts +2 -1
- package/dist/esm/utility/api/route/apply-dto-metadata.utility.js +21 -7
- package/dist/esm/utility/api/route/apply-dto-metadata.utility.js.map +1 -1
- package/dist/esm/utility/api/route/discriminator/build-open-api-schema.utility.d.ts +9 -0
- package/dist/esm/utility/api/route/discriminator/build-open-api-schema.utility.js +24 -0
- package/dist/esm/utility/api/route/discriminator/build-open-api-schema.utility.js.map +1 -0
- package/dist/esm/utility/api/route/discriminator/create-validation-failure.utility.d.ts +9 -0
- package/dist/esm/utility/api/route/discriminator/create-validation-failure.utility.js +44 -0
- package/dist/esm/utility/api/route/discriminator/create-validation-failure.utility.js.map +1 -0
- package/dist/esm/utility/api/route/discriminator/index.d.ts +6 -0
- package/dist/esm/utility/api/route/discriminator/is-dto-properties.utility.d.ts +7 -0
- package/dist/esm/utility/api/route/discriminator/is-dto-properties.utility.js +11 -0
- package/dist/esm/utility/api/route/discriminator/is-dto-properties.utility.js.map +1 -0
- package/dist/esm/utility/api/route/discriminator/prepare-payload.utility.d.ts +8 -0
- package/dist/esm/utility/api/route/discriminator/prepare-payload.utility.js +17 -0
- package/dist/esm/utility/api/route/discriminator/prepare-payload.utility.js.map +1 -0
- package/dist/esm/utility/api/route/discriminator/resolve-dto.utility.d.ts +10 -0
- package/dist/esm/utility/api/route/discriminator/resolve-dto.utility.js +33 -0
- package/dist/esm/utility/api/route/discriminator/resolve-dto.utility.js.map +1 -0
- package/dist/esm/utility/api/route/discriminator/validate-dto-properties.utility.d.ts +8 -0
- package/dist/esm/utility/api/route/discriminator/validate-dto-properties.utility.js +19 -0
- package/dist/esm/utility/api/route/discriminator/validate-dto-properties.utility.js.map +1 -0
- package/dist/esm/utility/api/route/dto/collect-with-registered-children.utility.d.ts +8 -0
- package/dist/esm/utility/api/route/dto/collect-with-registered-children.utility.js +27 -0
- package/dist/esm/utility/api/route/dto/collect-with-registered-children.utility.js.map +1 -0
- package/dist/esm/utility/api/route/dto/index.d.ts +1 -0
- package/dist/esm/utility/api/route/index.d.ts +4 -0
- package/dist/esm/utility/api/route/response/project-relation.utility.js +16 -13
- package/dist/esm/utility/api/route/response/project-relation.utility.js.map +1 -1
- package/dist/esm/utility/api/route/response/serialize.utility.js +20 -0
- package/dist/esm/utility/api/route/response/serialize.utility.js.map +1 -1
- package/dist/esm/utility/api/route/validation/flatten-errors.utility.d.ts +8 -0
- package/dist/esm/utility/api/route/validation/flatten-errors.utility.js +24 -0
- package/dist/esm/utility/api/route/validation/flatten-errors.utility.js.map +1 -0
- package/dist/esm/utility/api/route/validation/index.d.ts +1 -0
- package/dist/esm/utility/authorization/scope-merge-where.utility.js +2 -2
- package/dist/esm/utility/authorization/scope-merge-where.utility.js.map +1 -1
- package/dist/esm/utility/database/typeorm/is/foreign-key-violation.utility.js +1 -4
- package/dist/esm/utility/database/typeorm/is/foreign-key-violation.utility.js.map +1 -1
- package/dist/esm/utility/database/typeorm/is/unique-violation.utility.js +1 -4
- package/dist/esm/utility/database/typeorm/is/unique-violation.utility.js.map +1 -1
- package/dist/esm/utility/dto/build-decorator.utility.js +1 -3
- package/dist/esm/utility/dto/build-decorator.utility.js.map +1 -1
- package/dist/esm/utility/dto/manual/property-metadata.utility.js +1 -1
- package/dist/esm/utility/dto/manual/property-metadata.utility.js.map +1 -1
- package/dist/esm/utility/generate-entity-information.utility.js +8 -15
- package/dist/esm/utility/generate-entity-information.utility.js.map +1 -1
- package/dist/esm/utility/index.d.ts +1 -1
- package/dist/esm/utility/register-auto-dto-child.utility.d.ts +6 -0
- package/dist/esm/utility/register-auto-dto-child.utility.js +30 -1
- package/dist/esm/utility/register-auto-dto-child.utility.js.map +1 -1
- package/dist/esm/validator/has/paired-custom-suffixes-fields.validator.js +1 -1
- package/dist/esm/validator/has/paired-custom-suffixes-fields.validator.js.map +1 -1
- package/dist/esm/validator/must-match-one-of-schemas.validator.d.ts +1 -2
- package/dist/esm/validator/must-match-one-of-schemas.validator.js +4 -33
- package/dist/esm/validator/must-match-one-of-schemas.validator.js.map +1 -1
- package/package.json +31 -30
- package/dist/cjs/utility/api/get-default-string-format-properties.utility.js.map +0 -1
- package/dist/esm/utility/api/get-default-string-format-properties.utility.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.constant.js","sources":["../../../../../../../../../src/constant/utility/api/get-default-string-format-properties/bigint-string/sign/default.constant.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEO,MAAM,oFAAoF,GAAyD;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { TApiGetDefaultStringFormatPropertiesBigIntStringSign, TApiGetDefaultStringFormatPropertiesBigIntStringSignProperties } from '../../../../../../type/utility/api';
|
|
2
|
+
export declare const SIGN_PROPERTIES_BIGINT_STRING_GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT: Record<TApiGetDefaultStringFormatPropertiesBigIntStringSign, TApiGetDefaultStringFormatPropertiesBigIntStringSignProperties>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const SIGN_PROPERTIES_BIGINT_STRING_GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT = {
|
|
2
|
+
negative: {
|
|
3
|
+
description: "negative bigint decimal string",
|
|
4
|
+
exampleValue: "-1000",
|
|
5
|
+
maxLength: 20,
|
|
6
|
+
minLength: 2,
|
|
7
|
+
pattern: String.raw `/^-[1-9]\d{0,18}$/`,
|
|
8
|
+
},
|
|
9
|
+
signed: {
|
|
10
|
+
description: "bigint decimal string",
|
|
11
|
+
exampleValue: "1000",
|
|
12
|
+
maxLength: 20,
|
|
13
|
+
minLength: 1,
|
|
14
|
+
pattern: String.raw `/^-?(0|[1-9]\d{0,18})$/`,
|
|
15
|
+
},
|
|
16
|
+
unsigned: {
|
|
17
|
+
description: "unsigned bigint decimal string",
|
|
18
|
+
exampleValue: "1000",
|
|
19
|
+
maxLength: 20,
|
|
20
|
+
minLength: 1,
|
|
21
|
+
pattern: String.raw `/^(0|[1-9]\d{0,19})$/`,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { SIGN_PROPERTIES_BIGINT_STRING_GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT };
|
|
26
|
+
//# sourceMappingURL=properties.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties.constant.js","sources":["../../../../../../../../../src/constant/utility/api/get-default-string-format-properties/bigint-string/sign/properties.constant.ts"],"sourcesContent":[null],"names":[],"mappings":"AAGO,MAAM,uFAAuF,GAAiI;AACpO,IAAA,QAAQ,EAAE;AACT,QAAA,WAAW,EAAE,gCAAgC;AAC7C,QAAA,YAAY,EAAE,OAAO;AACrB,QAAA,SAAS,EAAE,EAAE;AACb,QAAA,SAAS,EAAE,CAAC;AACZ,QAAA,OAAO,EAAE,MAAM,CAAC,GAAG,CAAA,CAAA,kBAAA,CAAoB;AACvC,KAAA;AACD,IAAA,MAAM,EAAE;AACP,QAAA,WAAW,EAAE,uBAAuB;AACpC,QAAA,YAAY,EAAE,MAAM;AACpB,QAAA,SAAS,EAAE,EAAE;AACb,QAAA,SAAS,EAAE,CAAC;AACZ,QAAA,OAAO,EAAE,MAAM,CAAC,GAAG,CAAA,CAAA,uBAAA,CAAyB;AAC5C,KAAA;AACD,IAAA,QAAQ,EAAE;AACT,QAAA,WAAW,EAAE,gCAAgC;AAC7C,QAAA,YAAY,EAAE,MAAM;AACpB,QAAA,SAAS,EAAE,EAAE;AACb,QAAA,SAAS,EAAE,CAAC;AACZ,QAAA,OAAO,EAAE,MAAM,CAAC,GAAG,CAAA,CAAA,qBAAA,CAAuB;AAC1C,KAAA;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TApiGetDefaultStringFormatPropertiesBigIntStringSign, TApiGetDefaultStringFormatPropertiesBigIntStringSignProperties } from '../../../../type/utility/api';
|
|
2
|
+
import { TApiGetDefaultStringFormatPropertiesCustomizerMap } from '../../../../type/utility/api/get-default-string-format-properties/customizer';
|
|
3
|
+
export declare const GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT: {
|
|
4
|
+
readonly BIGINT_STRING: {
|
|
5
|
+
readonly DEFAULT_SIGN: TApiGetDefaultStringFormatPropertiesBigIntStringSign;
|
|
6
|
+
readonly SIGN_PROPERTIES: Record<TApiGetDefaultStringFormatPropertiesBigIntStringSign, TApiGetDefaultStringFormatPropertiesBigIntStringSignProperties>;
|
|
7
|
+
};
|
|
8
|
+
readonly CUSTOMIZER_MAP: TApiGetDefaultStringFormatPropertiesCustomizerMap;
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BIGINT_STRING_GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT } from './bigint-string/constant.js';
|
|
2
|
+
import { CUSTOMIZER_MAP_GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT } from './customizer/map.constant.js';
|
|
3
|
+
|
|
4
|
+
const GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT = {
|
|
5
|
+
BIGINT_STRING: BIGINT_STRING_GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT,
|
|
6
|
+
CUSTOMIZER_MAP: CUSTOMIZER_MAP_GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT };
|
|
10
|
+
//# sourceMappingURL=constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constant.js","sources":["../../../../../../../src/constant/utility/api/get-default-string-format-properties/constant.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAMO,MAAM,yDAAyD,GAMlE;AACH,IAAA,aAAa,EAAE,uEAAuE;AACtF,IAAA,cAAc,EAAE,wEAAwE;;;;;"}
|
package/dist/esm/constant/utility/api/get-default-string-format-properties/customizer/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CUSTOMIZER_MAP_GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT } from './map.constant';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { TApiGetDefaultStringFormatPropertiesCustomizerMap } from '../../../../../type/utility/api/get-default-string-format-properties/customizer';
|
|
2
|
+
export declare const CUSTOMIZER_MAP_GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT: TApiGetDefaultStringFormatPropertiesCustomizerMap;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import '../../../../../enum/decorator/api/action.enum.js';
|
|
2
|
+
import '../../../../../enum/decorator/api/authentication-type.enum.js';
|
|
3
|
+
import '../../../../../enum/decorator/api/controller/load-relations-strategy.enum.js';
|
|
4
|
+
import '../../../../../enum/decorator/api/controller/relation-reference-shape.enum.js';
|
|
5
|
+
import '../../../../../enum/decorator/api/controller/request/target.enum.js';
|
|
6
|
+
import '../../../../../enum/decorator/api/controller/request/transformer-type.enum.js';
|
|
7
|
+
import '../../../../../enum/decorator/api/controller/response-target.enum.js';
|
|
8
|
+
import '../../../../../enum/decorator/api/dto-type.enum.js';
|
|
9
|
+
import '../../../../../enum/decorator/api/function-transaction-mode.enum.js';
|
|
10
|
+
import '../../../../../enum/decorator/api/function-type.enum.js';
|
|
11
|
+
import '../../../../../enum/decorator/api/on-type.enum.js';
|
|
12
|
+
import '../../../../../enum/decorator/api/property/data-type.enum.js';
|
|
13
|
+
import '../../../../../enum/decorator/api/property/date/identifier.enum.js';
|
|
14
|
+
import '../../../../../enum/decorator/api/property/date/type.enum.js';
|
|
15
|
+
import '../../../../../enum/decorator/api/property/desribe-type.enum.js';
|
|
16
|
+
import '../../../../../enum/decorator/api/property/number-type.enum.js';
|
|
17
|
+
import { EApiPropertyStringType } from '../../../../../enum/decorator/api/property/string-type.enum.js';
|
|
18
|
+
import '../../../../../enum/decorator/api/route-type.enum.js';
|
|
19
|
+
import { ApplyBigIntStringGetDefaultStringFormatPropertiesOptions } from '../../../../../utility/api/get-default-string-format-properties/bigint-string/apply-options.utility.js';
|
|
20
|
+
|
|
21
|
+
const CUSTOMIZER_MAP_GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT = {
|
|
22
|
+
[EApiPropertyStringType.BIGINT_STRING]: ApplyBigIntStringGetDefaultStringFormatPropertiesOptions,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { CUSTOMIZER_MAP_GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT };
|
|
26
|
+
//# sourceMappingURL=map.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.constant.js","sources":["../../../../../../../../src/constant/utility/api/get-default-string-format-properties/customizer/map.constant.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAKO,MAAM,wEAAwE,GAAsD;AAC1I,IAAA,CAAC,sBAAsB,CAAC,aAAa,GAAG,wDAAwD;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GET_DEFAULT_STRING_FORMAT_PROPERTIES_API_UTILITY_CONSTANT } from './constant';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-default-string-format-properties';
|
|
@@ -7,9 +7,15 @@ import { CONTROLLER_API_DECORATOR_CONSTANT } from '../../../constant/decorator/a
|
|
|
7
7
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-controller/api-controller-observable | API Reference - ApiControllerObservable}
|
|
8
8
|
*/
|
|
9
9
|
function ApiControllerObservable() {
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
return applyApiControllerObservableMetadata;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Applies controller observable metadata.
|
|
14
|
+
* @param {object} target - Decorated controller target.
|
|
15
|
+
* @returns {void}
|
|
16
|
+
*/
|
|
17
|
+
function applyApiControllerObservableMetadata(target) {
|
|
18
|
+
Reflect.defineMetadata(CONTROLLER_API_DECORATOR_CONSTANT.OBSERVABLE_METADATA_KEY, true, target);
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
export { ApiControllerObservable };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observable.decorator.js","sources":["../../../../../../src/decorator/api/controller/observable.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;AAKG;SACa,uBAAuB,GAAA;
|
|
1
|
+
{"version":3,"file":"observable.decorator.js","sources":["../../../../../../src/decorator/api/controller/observable.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;AAKG;SACa,uBAAuB,GAAA;AACtC,IAAA,OAAO,oCAAoC;AAC5C;AAEA;;;;AAIG;AACH,SAAS,oCAAoC,CAAC,MAAc,EAAA;IAC3D,OAAO,CAAC,cAAc,CAAC,iCAAiC,CAAC,uBAAuB,EAAE,IAAI,EAAE,MAAM,CAAC;AAChG;;;;"}
|
|
@@ -7,9 +7,15 @@ import { CONTROLLER_API_DECORATOR_CONSTANT } from '../../../constant/decorator/a
|
|
|
7
7
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-controller/api-controller-securable | API Reference - ApiControllerSecurable}
|
|
8
8
|
*/
|
|
9
9
|
function ApiControllerSecurable() {
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
return applyApiControllerSecurableMetadata;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Applies controller securable metadata.
|
|
14
|
+
* @param {object} target - Decorated controller target.
|
|
15
|
+
* @returns {void}
|
|
16
|
+
*/
|
|
17
|
+
function applyApiControllerSecurableMetadata(target) {
|
|
18
|
+
Reflect.defineMetadata(CONTROLLER_API_DECORATOR_CONSTANT.SECURABLE_METADATA_KEY, true, target);
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
export { ApiControllerSecurable };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"securable.decorator.js","sources":["../../../../../../src/decorator/api/controller/securable.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;AAKG;SACa,sBAAsB,GAAA;
|
|
1
|
+
{"version":3,"file":"securable.decorator.js","sources":["../../../../../../src/decorator/api/controller/securable.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;AAKG;SACa,sBAAsB,GAAA;AACrC,IAAA,OAAO,mCAAmC;AAC3C;AAEA;;;;AAIG;AACH,SAAS,mCAAmC,CAAC,MAAc,EAAA;IAC1D,OAAO,CAAC,cAAc,CAAC,iCAAiC,CAAC,sBAAsB,EAAE,IAAI,EAAE,MAAM,CAAC;AAC/F;;;;"}
|
|
@@ -19,11 +19,14 @@ import '../../enum/decorator/api/property/desribe-type.enum.js';
|
|
|
19
19
|
import '../../enum/decorator/api/property/number-type.enum.js';
|
|
20
20
|
import '../../enum/decorator/api/property/string-type.enum.js';
|
|
21
21
|
import { EApiRouteType } from '../../enum/decorator/api/route-type.enum.js';
|
|
22
|
-
import { SetMetadata, HttpCode,
|
|
23
|
-
import {
|
|
22
|
+
import { HttpStatus, SetMetadata, HttpCode, RequestMethod, Put, Post, Patch, Get, Delete, UseGuards, applyDecorators } from '@nestjs/common';
|
|
23
|
+
import { ApiExtraModels, ApiResponse, ApiOperation, ApiUnauthorizedResponse, ApiForbiddenResponse, ApiInternalServerErrorResponse, ApiNotFoundResponse, ApiBadRequestResponse, ApiConflictResponse, ApiTooManyRequestsResponse, ApiBearerAuth, ApiSecurity } from '@nestjs/swagger';
|
|
24
24
|
import { Throttle } from '@nestjs/throttler';
|
|
25
|
-
import {
|
|
25
|
+
import { ApiRouteBuildDiscriminatedDtoOpenApiSchema } from '../../utility/api/route/discriminator/build-open-api-schema.utility.js';
|
|
26
26
|
import { ErrorException } from '../../utility/error/exception.utility.js';
|
|
27
|
+
import '@nestjs/swagger/dist/constants.js';
|
|
28
|
+
import { ApiRouteCollectDtoWithRegisteredChildren } from '../../utility/api/route/dto/collect-with-registered-children.utility.js';
|
|
29
|
+
import { DtoGenerateException } from '../../utility/dto/generate/exception.utility.js';
|
|
27
30
|
|
|
28
31
|
/**
|
|
29
32
|
* Composes Nest route, Swagger, throttling, authentication, and route metadata decorators.
|
|
@@ -62,6 +65,30 @@ function ApiMethod(options) {
|
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
}
|
|
68
|
+
const successResponseDecorators = [];
|
|
69
|
+
if (metadata.response && metadata.response.status !== HttpStatus.NO_CONTENT && Array.isArray(metadata.response.type)) {
|
|
70
|
+
if (!metadata.response.discriminator) {
|
|
71
|
+
throw ErrorException("ApiMethod error: response.discriminator is required when response.type is an array");
|
|
72
|
+
}
|
|
73
|
+
const responseDtos = [];
|
|
74
|
+
ApiRouteCollectDtoWithRegisteredChildren(responseDtos, metadata.response.type);
|
|
75
|
+
successResponseDecorators.push(ApiExtraModels(...responseDtos), ApiResponse({
|
|
76
|
+
description: "Success",
|
|
77
|
+
schema: ApiRouteBuildDiscriminatedDtoOpenApiSchema({
|
|
78
|
+
discriminator: metadata.response.discriminator,
|
|
79
|
+
type: metadata.response.type,
|
|
80
|
+
}, "ApiMethod response"),
|
|
81
|
+
status: metadata.response.status,
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
const responseType = Array.isArray(metadata.response?.type) ? undefined : metadata.response?.type;
|
|
86
|
+
successResponseDecorators.push(ApiResponse({
|
|
87
|
+
description: "Success",
|
|
88
|
+
status: metadata.response?.status,
|
|
89
|
+
type: responseType,
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
65
92
|
const decorators = [
|
|
66
93
|
SetMetadata(METHOD_API_DECORATOR_CONSTANT.ROUTE_METADATA_KEY, metadata),
|
|
67
94
|
ApiOperation({
|
|
@@ -69,11 +96,7 @@ function ApiMethod(options) {
|
|
|
69
96
|
operationId: metadata.documentation?.operationId,
|
|
70
97
|
summary: operationSummary,
|
|
71
98
|
}),
|
|
72
|
-
|
|
73
|
-
description: "Success",
|
|
74
|
-
status: metadata.response?.status,
|
|
75
|
-
type: metadata.response?.type,
|
|
76
|
-
}),
|
|
99
|
+
...successResponseDecorators,
|
|
77
100
|
HttpCode(metadata.response?.status ?? HttpStatus.OK),
|
|
78
101
|
];
|
|
79
102
|
if (metadata.throttling?.default) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method.decorator.js","sources":["../../../../../src/decorator/api/method.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"method.decorator.js","sources":["../../../../../src/decorator/api/method.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA;;;;;AAKG;AACG,SAAU,SAAS,CAA2B,OAAgC,EAAA;AACnF,IAAA,MAAM,QAAQ,GAAwC,OAAO,CAAC,QAAQ;AACtE,IAAA,IAAI,gBAAgB,GAAuB,QAAQ,CAAC,aAAa,EAAE,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM;AAEtG,IAAA,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,OAAO,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE;AAC5D,QAAA,QAAQ,QAAQ,CAAC,KAAK,CAAC,IAAI;AAC1B,YAAA,KAAK,aAAa,CAAC,MAAM,EAAE;gBAC1B,gBAAgB,GAAG,iBAAiB;gBAEpC;YACD;AAEA,YAAA,KAAK,aAAa,CAAC,MAAM,EAAE;gBAC1B,gBAAgB,GAAG,iBAAiB;gBAEpC;YACD;AAEA,YAAA,KAAK,aAAa,CAAC,GAAG,EAAE;gBACvB,gBAAgB,GAAG,cAAc;gBAEjC;YACD;AAEA,YAAA,KAAK,aAAa,CAAC,QAAQ,EAAE;gBAC5B,gBAAgB,GAAG,mBAAmB;gBAEtC;YACD;AAEA,YAAA,KAAK,aAAa,CAAC,cAAc,EAAE;gBAClC,gBAAgB,GAAG,2BAA2B;gBAE9C;YACD;AAEA,YAAA,KAAK,aAAa,CAAC,MAAM,EAAE;gBAC1B,gBAAgB,GAAG,iBAAiB;gBAEpC;YACD;;IAEF;IAEA,MAAM,yBAAyB,GAA2B,EAAE;IAE5D,IAAI,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,KAAK,UAAU,CAAC,U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AAA,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAEzC;QACD;QAEA,SAAS;AACR,YAAA,MAAM,cAAc,CAAC,CAAA,wBAAA,EAA2B,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA,iBAAA,CAAmB,CAAC;QAClG;;AAGD,IAAA,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,QAAQ,EAAE,cAAc,EAAE,gBAAgB,IAAI,EAAE,EAAE;QACjF,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzC;AAEA,IAAA,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,QAAQ,EAAE,cAAc,EAAE,kBAAkB,IAAI,EAAE,EAAE;QACnF,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvC;IAEA,MAAM,MAAM,GAA2C,EAAE;IAEzD,IAAI,QAAQ,CAAC,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE;QAC7C,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC;IACpD;AAEA,IAAA,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC;IAClC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,CAAC;AAErC,IAAA,OAAO,eAAe,CAAC,GAAG,UAAU,CAAC;AACtC;;;;"}
|
|
@@ -14,7 +14,7 @@ import { TApiPropertyBaseProperties } from '../../../type/decorator/api/property
|
|
|
14
14
|
* number values (0/non-zero), and proper boolean values. This makes it robust when working with
|
|
15
15
|
* form data and query parameters.
|
|
16
16
|
* @param {TApiPropertyBaseProperties} properties - Configuration options for the boolean property
|
|
17
|
-
* @returns {
|
|
17
|
+
* @returns {PropertyDecorator} A decorator function that can be applied to a class property
|
|
18
18
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-property/api-property-boolean | API Reference - ApiPropertyBoolean}
|
|
19
19
|
* @example
|
|
20
20
|
* ```typescript
|
|
@@ -41,7 +41,7 @@ import { IsBoolean, IsArray, ArrayMinSize, ArrayMaxSize, ArrayNotEmpty, Validate
|
|
|
41
41
|
* number values (0/non-zero), and proper boolean values. This makes it robust when working with
|
|
42
42
|
* form data and query parameters.
|
|
43
43
|
* @param {TApiPropertyBaseProperties} properties - Configuration options for the boolean property
|
|
44
|
-
* @returns {
|
|
44
|
+
* @returns {PropertyDecorator} A decorator function that can be applied to a class property
|
|
45
45
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-property/api-property-boolean | API Reference - ApiPropertyBoolean}
|
|
46
46
|
* @example
|
|
47
47
|
* ```typescript
|
|
@@ -106,9 +106,10 @@ function buildApiPropertyOptions(properties) {
|
|
|
106
106
|
description: `${String(properties.entity.name)} ${properties.description ?? ""}`,
|
|
107
107
|
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
108
108
|
nullable: !!properties.isNullable,
|
|
109
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
110
|
+
required: properties.isRequired,
|
|
109
111
|
type: EApiPropertyDataType.BOOLEAN,
|
|
110
112
|
};
|
|
111
|
-
apiPropertyOptions.required = properties.isRequired;
|
|
112
113
|
if (properties.isArray) {
|
|
113
114
|
apiPropertyOptions.isArray = true;
|
|
114
115
|
apiPropertyOptions.minItems = properties.minItems;
|
|
@@ -129,9 +130,7 @@ function buildApiPropertyOptions(properties) {
|
|
|
129
130
|
* @private
|
|
130
131
|
*/
|
|
131
132
|
function buildDecorators(properties, apiPropertyOptions) {
|
|
132
|
-
|
|
133
|
-
decorators.push(...buildResponseDecorators(properties), ...buildRequestDecorators(properties), ...buildFormatDecorators(properties), ...buildTransformDecorators(properties));
|
|
134
|
-
return decorators;
|
|
133
|
+
return [ApiProperty(apiPropertyOptions), ...buildResponseDecorators(properties), ...buildRequestDecorators(properties), ...buildFormatDecorators(properties), ...buildTransformDecorators(properties)];
|
|
135
134
|
}
|
|
136
135
|
/**
|
|
137
136
|
* Builds decorators for format validation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.decorator.js","sources":["../../../../../../src/decorator/api/property/boolean.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDG;AACG,SAAU,kBAAkB,CAAC,UAAsC,EAAA;AACxE,IAAA,OAAO,CAAC,MAAc,EAAE,WAA4B,KAAU;QAC7D,0BAA0B,CAAC,UAAU,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,cAAqD,KAAI;YAC7H,MAAM,oBAAoB,GAA+B,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE;YAElG,eAAe,CAAC,oBAAoB,CAAC;AACrC,YAAA,iCAAiC,CAAC,MAAM,EAAE,WAAW,EAAE;AACtD,gBAAA,KAAK,EAAE,kBAAkB,CAAC,oBAAoB,CAAC;gBAC/C,SAAS,EAAE,mCAAmC,CAAC,OAAO;AACtD,gBAAA,UAAU,EAAE,oBAAoB;AAChC,aAAA,CAAC;AAEF,YAAA,MAAM,kBAAkB,GAAuB,uBAAuB,CAAC,oBAAoB,CAAC;YAC5F,MAAM,UAAU,GAA6B,eAAe,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;YAEtG,eAAe,CAAC,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC;AACnD,YAAA,4BAA4B,CAAC,MAAM,EAAE,WAAW,EAAE,oBAAoB,CAAC;AACxE,QAAA,CAAC,CAAC;AACH,IAAA,CAAC;AACF;AAEA;;;;;AAKG;AACH,SAAS,uBAAuB,CAAC,UAAsC,EAAA;AACtE,IAAA,MAAM,kBAAkB,GAAuB;AAC9C,QAAA,WAAW,EAAE,CAAA,EAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,WAAW,IAAI,EAAE,CAAA,CAAE;;AAEhF,QAAA,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU;
|
|
1
|
+
{"version":3,"file":"boolean.decorator.js","sources":["../../../../../../src/decorator/api/property/boolean.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDG;AACG,SAAU,kBAAkB,CAAC,UAAsC,EAAA;AACxE,IAAA,OAAO,CAAC,MAAc,EAAE,WAA4B,KAAU;QAC7D,0BAA0B,CAAC,UAAU,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,cAAqD,KAAI;YAC7H,MAAM,oBAAoB,GAA+B,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE;YAElG,eAAe,CAAC,oBAAoB,CAAC;AACrC,YAAA,iCAAiC,CAAC,MAAM,EAAE,WAAW,EAAE;AACtD,gBAAA,KAAK,EAAE,kBAAkB,CAAC,oBAAoB,CAAC;gBAC/C,SAAS,EAAE,mCAAmC,CAAC,OAAO;AACtD,gBAAA,UAAU,EAAE,oBAAoB;AAChC,aAAA,CAAC;AAEF,YAAA,MAAM,kBAAkB,GAAuB,uBAAuB,CAAC,oBAAoB,CAAC;YAC5F,MAAM,UAAU,GAA6B,eAAe,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;YAEtG,eAAe,CAAC,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC;AACnD,YAAA,4BAA4B,CAAC,MAAM,EAAE,WAAW,EAAE,oBAAoB,CAAC;AACxE,QAAA,CAAC,CAAC;AACH,IAAA,CAAC;AACF;AAEA;;;;;AAKG;AACH,SAAS,uBAAuB,CAAC,UAAsC,EAAA;AACtE,IAAA,MAAM,kBAAk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D,YAAA,MAAM,CAAC,IAAI,CAAC,iEAAiE,CAAC;QAC/E;IACD;AAEA,IAAA,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACtB,MAAM,cAAc,CAAC,CAAA,0BAAA,EAA6B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAE,CAAC;IACvE;AACD;;;;"}
|
|
@@ -14,7 +14,7 @@ import { TApiPropertyDateProperties } from '../../../type/decorator/api/property
|
|
|
14
14
|
* The decorator provides appropriate examples and validation patterns based on the format,
|
|
15
15
|
* and handles string-to-Date transformation for request DTOs.
|
|
16
16
|
* @param {TApiPropertyDateProperties} properties - Configuration options for the date property
|
|
17
|
-
* @returns {
|
|
17
|
+
* @returns {PropertyDecorator} A decorator function that can be applied to a class property
|
|
18
18
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-property/api-property-date | API Reference - ApiPropertyDate}
|
|
19
19
|
* @example
|
|
20
20
|
* ```typescript
|
|
@@ -41,7 +41,7 @@ import { IsDate, IsArray, ArrayMinSize, ArrayMaxSize, ArrayNotEmpty, ValidateIf
|
|
|
41
41
|
* The decorator provides appropriate examples and validation patterns based on the format,
|
|
42
42
|
* and handles string-to-Date transformation for request DTOs.
|
|
43
43
|
* @param {TApiPropertyDateProperties} properties - Configuration options for the date property
|
|
44
|
-
* @returns {
|
|
44
|
+
* @returns {PropertyDecorator} A decorator function that can be applied to a class property
|
|
45
45
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-property/api-property-date | API Reference - ApiPropertyDate}
|
|
46
46
|
* @example
|
|
47
47
|
* ```typescript
|
|
@@ -111,9 +111,10 @@ function buildApiPropertyOptions(properties) {
|
|
|
111
111
|
description: `${String(properties.entity.name)} ${getDescription(properties.identifier)}`,
|
|
112
112
|
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
113
113
|
nullable: !!properties.isNullable,
|
|
114
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
115
|
+
required: properties.isRequired,
|
|
114
116
|
type: EApiPropertyDataType.STRING,
|
|
115
117
|
};
|
|
116
|
-
apiPropertyOptions.required = properties.isRequired;
|
|
117
118
|
if (properties.isArray) {
|
|
118
119
|
apiPropertyOptions.isArray = true;
|
|
119
120
|
apiPropertyOptions.minItems = properties.minItems;
|
|
@@ -142,9 +143,7 @@ function buildApiPropertyOptions(properties) {
|
|
|
142
143
|
* @private
|
|
143
144
|
*/
|
|
144
145
|
function buildDecorators(properties, apiPropertyOptions) {
|
|
145
|
-
|
|
146
|
-
decorators.push(...buildResponseDecorators(properties), ...buildRequestDecorators(properties), ...buildFormatDecorators(properties), ...buildTransformDecorators(properties));
|
|
147
|
-
return decorators;
|
|
146
|
+
return [ApiProperty(apiPropertyOptions), ...buildResponseDecorators(properties), ...buildRequestDecorators(properties), ...buildFormatDecorators(properties), ...buildTransformDecorators(properties)];
|
|
148
147
|
}
|
|
149
148
|
/**
|
|
150
149
|
* Builds decorators for date format validation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.decorator.js","sources":["../../../../../../src/decorator/api/property/date.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDG;AACG,SAAU,eAAe,CAAC,UAAsC,EAAA;AACrE,IAAA,OAAO,CAAC,MAAc,EAAE,WAA4B,KAAU;QAC7D,0BAA0B,CAAC,UAAU,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,cAAqD,KAAI;YAC1H,MAAM,oBAAoB,GAA+B,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE;YAElG,eAAe,CAAC,oBAAoB,CAAC;AACrC,YAAA,iCAAiC,CAAC,MAAM,EAAE,WAAW,EAAE;AACtD,gBAAA,KAAK,EAAE,eAAe,CAAC,oBAAoB,CAAC;gBAC5C,SAAS,EAAE,mCAAmC,CAAC,IAAI;AACnD,gBAAA,UAAU,EAAE,oBAAoB;AAChC,aAAA,CAAC;AAEF,YAAA,MAAM,kBAAkB,GAAuB,uBAAuB,CAAC,oBAAoB,CAAC;YAC5F,MAAM,UAAU,GAA6B,eAAe,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;YAEtG,eAAe,CAAC,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC;AACnD,YAAA,4BAA4B,CAAC,MAAM,EAAE,WAAW,EAAE,oBAAoB,CAAC;AACxE,QAAA,CAAC,CAAC;AACH,IAAA,CAAC;AACF;AAEA;;;;;AAKG;AACH,SAAS,uBAAuB,CAAC,UAAsC,EAAA;IACtE,MAAM,OAAO,GAAW,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC;AAErD,IAAA,MAAM,kBAAkB,GAAuB;AAC9C,QAAA,WAAW,EAAE,CAAA,EAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA,CAAE;;AAEzF,QAAA,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU;
|
|
1
|
+
{"version":3,"file":"date.decorator.js","sources":["../../../../../../src/decorator/api/property/date.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDG;AACG,SAAU,eAAe,CAAC,UAAsC,EAAA;AACrE,IAAA,OAAO,CAAC,MAAc,EAAE,WAA4B,KAAU;QAC7D,0BAA0B,CAAC,UAAU,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,cAAqD,KAAI;YAC1H,MAAM,oBAAoB,GAA+B,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE;YAElG,eAAe,CAAC,oBAAoB,CAAC;AACr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AAG,CAAC,EAAE;AAC5B,YAAA,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC;QACzC;QAEA,IAAI,UAAU,CAAC,aAAa,IAAI,UAAU,CAAC,QAAQ,IAAI,CAAC,EAAE;AACzD,YAAA,MAAM,CAAC,IAAI,CAAC,iEAAiE,CAAC;QAC/E;IACD;AAEA,IAAA,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACtB,MAAM,cAAc,CAAC,CAAA,uBAAA,EAA0B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAE,CAAC;IACpE;AACD;;;;"}
|
|
@@ -15,7 +15,7 @@ import { TApiPropertyEnumProperties } from '../../../type/decorator/api/property
|
|
|
15
15
|
* The decorator provides proper validation and documentation of enum values, ensuring
|
|
16
16
|
* that only valid options are accepted in requests and properly documented in the API.
|
|
17
17
|
* @param {TApiPropertyEnumProperties} properties - Configuration options for the enum property
|
|
18
|
-
* @returns {
|
|
18
|
+
* @returns {PropertyDecorator} A decorator function that can be applied to a class property
|
|
19
19
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-property/api-property-enum | API Reference - ApiPropertyEnum}
|
|
20
20
|
* @example
|
|
21
21
|
* ```typescript
|
|
@@ -24,7 +24,7 @@ import { IsEnum, IsArray, ArrayMinSize, ArrayMaxSize, ArrayNotEmpty, ValidateIf
|
|
|
24
24
|
* The decorator provides proper validation and documentation of enum values, ensuring
|
|
25
25
|
* that only valid options are accepted in requests and properly documented in the API.
|
|
26
26
|
* @param {TApiPropertyEnumProperties} properties - Configuration options for the enum property
|
|
27
|
-
* @returns {
|
|
27
|
+
* @returns {PropertyDecorator} A decorator function that can be applied to a class property
|
|
28
28
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-property/api-property-enum | API Reference - ApiPropertyEnum}
|
|
29
29
|
* @example
|
|
30
30
|
* ```typescript
|
|
@@ -111,8 +111,9 @@ function buildApiPropertyOptions(properties) {
|
|
|
111
111
|
description: `${String(properties.entity.name)} ${properties.description ?? ""}`,
|
|
112
112
|
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
113
113
|
nullable: !!properties.isNullable,
|
|
114
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
115
|
+
required: properties.isRequired,
|
|
114
116
|
};
|
|
115
|
-
apiPropertyOptions.required = properties.isRequired;
|
|
116
117
|
if (properties.isArray === true) {
|
|
117
118
|
apiPropertyOptions.isArray = true;
|
|
118
119
|
apiPropertyOptions.minItems = properties.minItems;
|
|
@@ -142,9 +143,7 @@ function buildApiPropertyOptions(properties) {
|
|
|
142
143
|
* @private
|
|
143
144
|
*/
|
|
144
145
|
function buildDecorators(properties, apiPropertyOptions) {
|
|
145
|
-
|
|
146
|
-
decorators.push(...buildResponseDecorators(properties), ...buildRequestDecorators(properties), ...buildFormatDecorators(properties));
|
|
147
|
-
return decorators;
|
|
146
|
+
return [ApiProperty(apiPropertyOptions), ...buildResponseDecorators(properties), ...buildRequestDecorators(properties), ...buildFormatDecorators(properties)];
|
|
148
147
|
}
|
|
149
148
|
/**
|
|
150
149
|
* Builds decorators for enum validation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.decorator.js","sources":["../../../../../../src/decorator/api/property/enum.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EG;AACG,SAAU,eAAe,CAAC,UAAsC,EAAA;AACrE,IAAA,OAAO,CAAC,MAAc,EAAE,WAA4B,KAAU;QAC7D,0BAA0B,CAAC,UAAU,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,cAAqD,KAAI;YAC1H,MAAM,oBAAoB,GAA+B,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE;YAElG,eAAe,CAAC,oBAAoB,CAAC;AACrC,YAAA,iCAAiC,CAAC,MAAM,EAAE,WAAW,EAAE;AACtD,gBAAA,KAAK,EAAE,eAAe,CAAC,oBAAoB,CAAC;gBAC5C,SAAS,EAAE,mCAAmC,CAAC,IAAI;AACnD,gBAAA,UAAU,EAAE,oBAAoB;AAChC,aAAA,CAAC;AAEF,YAAA,MAAM,kBAAkB,GAAuB,uBAAuB,CAAC,oBAAoB,CAAC;YAC5F,MAAM,UAAU,GAA6B,eAAe,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;YAEtG,eAAe,CAAC,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC;AACnD,YAAA,4BAA4B,CAAC,MAAM,EAAE,WAAW,EAAE,oBAAoB,CAAC;AACxE,QAAA,CAAC,CAAC;AACH,IAAA,CAAC;AACF;AAEA;;;;;AAKG;AACH,SAAS,uBAAuB,CAAC,UAAsC,EAAA;AACtE,IAAA,MAAM,kBAAkB,GAAiD;AACxE,QAAA,WAAW,EAAE,CAAA,EAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,WAAW,IAAI,EAAE,CAAA,CAAE;;AAEhF,QAAA,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU
|
|
1
|
+
{"version":3,"file":"enum.decorator.js","sources":["../../../../../../src/decorator/api/property/enum.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EG;AACG,SAAU,eAAe,CAAC,UAAsC,EAAA;AACrE,IAAA,OAAO,CAAC,MAAc,EAAE,WAA4B,KAAU;QAC7D,0BAA0B,CAAC,UAAU,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,cAAqD,KAAI;YAC1H,MAAM,oBAAoB,GAA+B,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE;YAEl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,cAAc,CAAC,CAAA,uBAAA,EAA0B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAE,CAAC;IACpE;AACD;;;;"}
|
|
@@ -15,7 +15,7 @@ import { TApiPropertyNumberProperties } from '../../../type/decorator/api/proper
|
|
|
15
15
|
* The decorator can automatically generate an example value within the specified range
|
|
16
16
|
* if one is not provided, and applies appropriate validation rules based on the configuration.
|
|
17
17
|
* @param {TApiPropertyNumberProperties} properties - Configuration options for the number property
|
|
18
|
-
* @returns {
|
|
18
|
+
* @returns {PropertyDecorator} A decorator function that can be applied to a class property
|
|
19
19
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-property/api-property-number | API Reference - ApiPropertyNumber}
|
|
20
20
|
* @example
|
|
21
21
|
* ```typescript
|
|
@@ -44,7 +44,7 @@ import random from 'lodash/random.js';
|
|
|
44
44
|
* The decorator can automatically generate an example value within the specified range
|
|
45
45
|
* if one is not provided, and applies appropriate validation rules based on the configuration.
|
|
46
46
|
* @param {TApiPropertyNumberProperties} properties - Configuration options for the number property
|
|
47
|
-
* @returns {
|
|
47
|
+
* @returns {PropertyDecorator} A decorator function that can be applied to a class property
|
|
48
48
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-property/api-property-number | API Reference - ApiPropertyNumber}
|
|
49
49
|
* @example
|
|
50
50
|
* ```typescript
|
|
@@ -130,9 +130,10 @@ function buildApiPropertyOptions(properties) {
|
|
|
130
130
|
format: getFormat(properties),
|
|
131
131
|
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
132
132
|
nullable: !!properties.isNullable,
|
|
133
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
134
|
+
required: properties.isRequired,
|
|
133
135
|
type: properties.format === EApiPropertyNumberType.DOUBLE ? EApiPropertyDataType.NUMBER : EApiPropertyDataType.INTEGER,
|
|
134
136
|
};
|
|
135
|
-
apiPropertyOptions.required = properties.isRequired;
|
|
136
137
|
if (properties.isArray) {
|
|
137
138
|
apiPropertyOptions.isArray = true;
|
|
138
139
|
apiPropertyOptions.minItems = properties.minItems;
|
|
@@ -160,9 +161,7 @@ function buildApiPropertyOptions(properties) {
|
|
|
160
161
|
* @private
|
|
161
162
|
*/
|
|
162
163
|
function buildDecorators(properties, apiPropertyOptions) {
|
|
163
|
-
|
|
164
|
-
decorators.push(...buildResponseDecorators(properties), ...buildRequestDecorators(properties), ...buildFormatDecorators(properties), ...buildTransformDecorators(properties), ...buildNumberValidationDecorators(properties));
|
|
165
|
-
return decorators;
|
|
164
|
+
return [ApiProperty(apiPropertyOptions), ...buildResponseDecorators(properties), ...buildRequestDecorators(properties), ...buildFormatDecorators(properties), ...buildTransformDecorators(properties), ...buildNumberValidationDecorators(properties)];
|
|
166
165
|
}
|
|
167
166
|
/**
|
|
168
167
|
* Builds decorators for number format validation based on the specified format type.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number.decorator.js","sources":["../../../../../../src/decorator/api/property/number.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEG;AACG,SAAU,iBAAiB,CAAC,UAAwC,EAAA;AACzE,IAAA,OAAO,CAAC,MAAc,EAAE,WAA4B,KAAU;QAC7D,0BAA0B,CAAC,UAAU,CAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC,cAAyD,KAAI;AAChI,YAAA,MAAM,oBAAoB,GAAiC;AAC1D,gBAAA,GAAG,UAAU;AACb,gBAAA,MAAM,EAAE,cAAc;aACtB;AAED,YAAA,oBAAoB,CAAC,YAAY,KAAK,MAAM,CAAC,oBAAoB,CAAC,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC;YAExG,eAAe,CAAC,oBAAoB,CAAC;AACrC,YAAA,iCAAiC,CAAC,MAAM,EAAE,WAAW,EAAE;AACtD,gBAAA,KAAK,EAAE,iBAAiB,CAAC,oBAAoB,CAAC;gBAC9C,SAAS,EAAE,mCAAmC,CAAC,MAAM;AACrD,gBAAA,UAAU,EAAE,oBAAoB;AAChC,aAAA,CAAC;AAEF,YAAA,MAAM,kBAAkB,GAAuB,uBAAuB,CAAC,oBAAoB,CAAC;YAC5F,MAAM,UAAU,GAA6B,eAAe,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;YAEtG,eAAe,CAAC,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC;AACnD,YAAA,4BAA4B,CAAC,MAAM,EAAE,WAAW,EAAE,oBAAoB,CAAC;AACxE,QAAA,CAAC,CAAC;AACH,IAAA,CAAC;AACF;AAEA;;;;;;;AAOG;AACH,SAAS,uBAAuB,CAAC,UAAwC,EAAA;AACxE,IAAA,MAAM,kBAAkB,GAAuB;AAC9C,QAAA,WAAW,EAAE,CAAA,EAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,WAAW,IAAI,EAAE,CAAA,CAAE;AAChF,QAAA,MAAM,EAAE,SAAS,CAAC,UAAU,CAAC;;AAE7B,QAAA,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU;
|
|
1
|
+
{"version":3,"file":"number.decorator.js","sources":["../../../../../../src/decorator/api/property/number.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEG;AACG,SAAU,iBAAiB,CAAC,UAAwC,EAAA;AACzE,IAAA,OAAO,CAAC,MAAc,EAAE,WAA4B,KAAU;QAC7D,0BAA0B,CAAC,UAAU,CAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC,cAAyD,KAAI;AAChI,YAAA,MAAM,oBAAoB,GAAiC;AAC1D,gBAAA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AC;QACrD;AAEA,QAAA,IAAI,UAAU,CAAC,QAAQ,GAAG,CAAC,EAAE;AAC5B,YAAA,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC;QACzC;AAEA,QAAA,IAAI,UAAU,CAAC,QAAQ,GAAG,CAAC,EAAE;AAC5B,YAAA,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC;QACzC;QAEA,IAAI,UAAU,CAAC,aAAa,IAAI,UAAU,CAAC,QAAQ,IAAI,CAAC,EAAE;AACzD,YAAA,MAAM,CAAC,IAAI,CAAC,iEAAiE,CAAC;QAC/E;IACD;AAEA,IAAA,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACtB,MAAM,cAAc,CAAC,CAAA,yBAAA,EAA4B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAE,CAAC;IACtE;AACD;;;;"}
|
|
@@ -11,7 +11,7 @@ import { TApiPropertyObjectProperties } from '../../../type/decorator/api/proper
|
|
|
11
11
|
* - Validation rules
|
|
12
12
|
* - Transformation rules
|
|
13
13
|
* @param {TApiPropertyObjectProperties} options - Configuration options for the object property
|
|
14
|
-
* @returns {
|
|
14
|
+
* @returns {PropertyDecorator} A decorator function that can be applied to a class property
|
|
15
15
|
* @see {@link https://elsikora.com/docs/nestjs-crud-automator/api-reference/decorators/api-property/api-property-object | API Reference - ApiPropertyObject}
|
|
16
16
|
* @example
|
|
17
17
|
* ```typescript
|