@elsikora/nestjs-crud-automator 3.0.2 → 4.0.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -11
- package/dist/cjs/class/api/authorization/guard.class.d.ts +1 -0
- package/dist/cjs/class/api/authorization/guard.class.js +39 -3
- package/dist/cjs/class/api/authorization/guard.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/iam/engine.class.d.ts +3 -2
- package/dist/cjs/class/api/authorization/iam/engine.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/iam/query-planner.class.d.ts +3 -2
- package/dist/cjs/class/api/authorization/iam/query-planner.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/policy/base.class.js +1 -0
- package/dist/cjs/class/api/authorization/policy/base.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/policy/executor.class.d.ts +2 -1
- package/dist/cjs/class/api/authorization/policy/executor.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/policy/registry.class.d.ts +3 -2
- package/dist/cjs/class/api/authorization/policy/registry.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/runtime.class.d.ts +3 -2
- package/dist/cjs/class/api/authorization/runtime.class.js +2 -1
- package/dist/cjs/class/api/authorization/runtime.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/simulator.class.d.ts +3 -3
- package/dist/cjs/class/api/authorization/simulator.class.js.map +1 -1
- package/dist/cjs/class/api/controller/generated/function-capability.class.d.ts +12 -0
- package/dist/cjs/class/api/controller/generated/function-capability.class.js +47 -0
- package/dist/cjs/class/api/controller/generated/function-capability.class.js.map +1 -0
- package/dist/cjs/class/api/controller/generated/get-many-contract.class.d.ts +25 -0
- package/dist/cjs/class/api/controller/generated/get-many-contract.class.js +250 -0
- package/dist/cjs/class/api/controller/generated/get-many-contract.class.js.map +1 -0
- package/dist/cjs/class/api/controller/generated/index.d.ts +3 -0
- package/dist/cjs/class/api/controller/generated/read-scope-storage.class.d.ts +19 -0
- package/dist/cjs/class/api/controller/generated/read-scope-storage.class.js +120 -0
- package/dist/cjs/class/api/controller/generated/read-scope-storage.class.js.map +1 -0
- package/dist/cjs/class/api/controller/generated/relation-cache-contract.class.d.ts +11 -0
- package/dist/cjs/class/api/controller/generated/relation-cache-contract.class.js +70 -0
- package/dist/cjs/class/api/controller/generated/relation-cache-contract.class.js.map +1 -0
- package/dist/cjs/class/api/controller/generated/scope-where-contract.class.d.ts +14 -0
- package/dist/cjs/class/api/controller/generated/scope-where-contract.class.js +68 -0
- package/dist/cjs/class/api/controller/generated/scope-where-contract.class.js.map +1 -0
- package/dist/cjs/class/api/controller/generated/security-snapshot.class.d.ts +14 -0
- package/dist/cjs/class/api/controller/generated/security-snapshot.class.js +165 -0
- package/dist/cjs/class/api/controller/generated/security-snapshot.class.js.map +1 -0
- package/dist/cjs/class/api/controller/generated/write-hydration-contract.class.d.ts +9 -0
- package/dist/cjs/class/api/controller/generated/write-hydration-contract.class.js +69 -0
- package/dist/cjs/class/api/controller/generated/write-hydration-contract.class.js.map +1 -0
- package/dist/cjs/class/api/controller/get-list/cursor/data-source-contract.class.d.ts +32 -0
- package/dist/cjs/class/api/controller/get-list/cursor/data-source-contract.class.js +424 -0
- package/dist/cjs/class/api/controller/get-list/cursor/data-source-contract.class.js.map +1 -0
- package/dist/cjs/class/api/controller/get-list/cursor/index.d.ts +2 -0
- package/dist/cjs/class/api/controller/get-list/cursor/runtime.class.d.ts +28 -0
- package/dist/cjs/class/api/controller/get-list/cursor/runtime.class.js +371 -0
- package/dist/cjs/class/api/controller/get-list/cursor/runtime.class.js.map +1 -0
- package/dist/cjs/class/api/controller/get-list/query/plan-compiler.class.d.ts +20 -0
- package/dist/cjs/class/api/controller/get-list/query/plan-compiler.class.js +479 -41
- package/dist/cjs/class/api/controller/get-list/query/plan-compiler.class.js.map +1 -1
- package/dist/cjs/class/api/controller/get-list/query/runtime.class.d.ts +2 -0
- package/dist/cjs/class/api/controller/get-list/query/runtime.class.js +45 -2
- package/dist/cjs/class/api/controller/get-list/query/runtime.class.js.map +1 -1
- package/dist/cjs/class/api/controller/identity-plan-compiler.class.d.ts +14 -0
- package/dist/cjs/class/api/controller/identity-plan-compiler.class.js +150 -0
- package/dist/cjs/class/api/controller/identity-plan-compiler.class.js.map +1 -0
- package/dist/cjs/class/api/controller/index.d.ts +1 -0
- package/dist/cjs/class/api/controller/read-plan-compiler.class.d.ts +17 -0
- package/dist/cjs/class/api/controller/read-plan-compiler.class.js +240 -0
- package/dist/cjs/class/api/controller/read-plan-compiler.class.js.map +1 -0
- package/dist/cjs/class/api/function/context-storage.class.js +1 -0
- package/dist/cjs/class/api/function/context-storage.class.js.map +1 -1
- package/dist/cjs/class/api/function/custom-runtime.class.js +1 -0
- package/dist/cjs/class/api/function/custom-runtime.class.js.map +1 -1
- package/dist/cjs/class/api/function/step-runtime.class.js +1 -0
- package/dist/cjs/class/api/function/step-runtime.class.js.map +1 -1
- package/dist/cjs/class/api/function/transaction/exception/commit-unknown-outcome.class.js +1 -0
- package/dist/cjs/class/api/function/transaction/exception/commit-unknown-outcome.class.js.map +1 -1
- package/dist/cjs/class/api/function/transaction/exception/post-commit.class.js +1 -0
- package/dist/cjs/class/api/function/transaction/exception/post-commit.class.js.map +1 -1
- package/dist/cjs/class/api/function/transaction/exception/rollback.class.js +1 -0
- package/dist/cjs/class/api/function/transaction/exception/rollback.class.js.map +1 -1
- package/dist/cjs/class/api/function/transaction/lifecycle.class.js +1 -0
- package/dist/cjs/class/api/function/transaction/lifecycle.class.js.map +1 -1
- package/dist/cjs/class/api/function/transaction/registry.class.js +1 -0
- package/dist/cjs/class/api/function/transaction/registry.class.js.map +1 -1
- package/dist/cjs/class/api/function/transaction/runtime.class.js +1 -0
- package/dist/cjs/class/api/function/transaction/runtime.class.js.map +1 -1
- package/dist/cjs/class/api/function/transaction/scope.class.js +1 -0
- package/dist/cjs/class/api/function/transaction/scope.class.js.map +1 -1
- package/dist/cjs/class/api/route-runtime.class.d.ts +2 -0
- package/dist/cjs/class/api/route-runtime.class.js +202 -60
- package/dist/cjs/class/api/route-runtime.class.js.map +1 -1
- package/dist/cjs/class/api/subscriber/executor.class.js +1 -0
- package/dist/cjs/class/api/subscriber/executor.class.js.map +1 -1
- package/dist/cjs/class/api/subscriber/registry.class.d.ts +3 -3
- package/dist/cjs/class/api/subscriber/registry.class.js +3 -1
- package/dist/cjs/class/api/subscriber/registry.class.js.map +1 -1
- package/dist/cjs/class/api/subscriber/route-base.class.d.ts +2 -2
- package/dist/cjs/class/api/subscriber/route-base.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/exception/details/foreign-key-violation.class.js +1 -0
- package/dist/cjs/class/utility/dto/exception/details/foreign-key-violation.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/exception/details/unique-violation.class.js +1 -0
- package/dist/cjs/class/utility/dto/exception/details/unique-violation.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/property/factory/number.class.js +1 -0
- package/dist/cjs/class/utility/dto/property/factory/number.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/property/factory/relation.class.js +1 -0
- package/dist/cjs/class/utility/dto/property/factory/relation.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/strategy/body.class.js +1 -0
- package/dist/cjs/class/utility/dto/strategy/body.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/strategy/query.class.js +1 -0
- package/dist/cjs/class/utility/dto/strategy/query.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/strategy/request.class.js +1 -0
- package/dist/cjs/class/utility/dto/strategy/request.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/strategy/response.class.js +1 -0
- package/dist/cjs/class/utility/dto/strategy/response.class.js.map +1 -1
- package/dist/cjs/constant/api-controller-cursor.constant.d.ts +1 -0
- package/dist/cjs/constant/api-controller-cursor.constant.js +6 -0
- package/dist/cjs/constant/api-controller-cursor.constant.js.map +1 -0
- package/dist/cjs/constant/filter/operator-registry.constant.js +1 -0
- package/dist/cjs/constant/filter/operator-registry.constant.js.map +1 -1
- package/dist/cjs/constant/safe-object-property-names.constant.d.ts +1 -0
- package/dist/cjs/constant/safe-object-property-names.constant.js +6 -0
- package/dist/cjs/constant/safe-object-property-names.constant.js.map +1 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/customizer-map.constant.js +1 -0
- package/dist/cjs/constant/utility/api/get-default-string-format-properties/customizer-map.constant.js.map +1 -1
- package/dist/cjs/constant/utility/dto/constant.js +1 -0
- package/dist/cjs/constant/utility/dto/constant.js.map +1 -1
- package/dist/cjs/decorator/api/controller/decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/create.decorator.js +1 -0
- package/dist/cjs/decorator/api/function/create.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/custom.decorator.js +1 -0
- package/dist/cjs/decorator/api/function/custom.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/decorator.js +5 -0
- package/dist/cjs/decorator/api/function/decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/delete.decorator.js +19 -7
- package/dist/cjs/decorator/api/function/delete.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/get/decorator.js +53 -19
- package/dist/cjs/decorator/api/function/get/decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/get/list.decorator.js +41 -27
- package/dist/cjs/decorator/api/function/get/list.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/get/many.decorator.js +70 -19
- package/dist/cjs/decorator/api/function/get/many.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/step.decorator.js +1 -0
- package/dist/cjs/decorator/api/function/step.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/update.decorator.js +20 -1
- package/dist/cjs/decorator/api/function/update.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/method.decorator.js +1 -0
- package/dist/cjs/decorator/api/method.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/boolean.decorator.js +1 -0
- package/dist/cjs/decorator/api/property/boolean.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/date.decorator.js +1 -0
- package/dist/cjs/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/number.decorator.js +1 -0
- package/dist/cjs/decorator/api/property/number.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/string.decorator.js +1 -0
- package/dist/cjs/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/uuid.decorator.js +1 -0
- 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.js +16 -0
- package/dist/cjs/decorator/api/service/decorator.js.map +1 -1
- package/dist/cjs/enum/decorator/api/controller/get-list/query/index.d.ts +1 -0
- package/dist/cjs/enum/decorator/api/controller/get-list/query/pagination-mode.enum.d.ts +4 -0
- package/dist/cjs/enum/decorator/api/controller/get-list/query/pagination-mode.enum.js +8 -0
- package/dist/cjs/enum/decorator/api/controller/get-list/query/pagination-mode.enum.js.map +1 -0
- package/dist/cjs/factory/api-controller.factory.d.ts +4 -4
- package/dist/cjs/factory/api-controller.factory.js +37 -11
- package/dist/cjs/factory/api-controller.factory.js.map +1 -1
- package/dist/cjs/index.js +15 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interface/api/request-validator.interface.d.ts +3 -2
- package/dist/cjs/interface/class/api/authorization/policy/build-options.interface.d.ts +3 -2
- package/dist/cjs/interface/class/api/authorization/policy/registry.interface.d.ts +3 -2
- package/dist/cjs/interface/class/api/authorization/policy/subscriber/context/data.interface.d.ts +2 -1
- package/dist/cjs/interface/class/api/authorization/policy/subscriber/context/interface.d.ts +3 -2
- package/dist/cjs/interface/class/api/authorization/policy/subscriber/interface.d.ts +9 -8
- package/dist/cjs/interface/class/api/authorization/policy/subscriber/registration.interface.d.ts +3 -2
- package/dist/cjs/interface/class/api/authorization/request-metadata.interface.d.ts +3 -2
- package/dist/cjs/interface/class/api/controller/generated/get-many-session.interface.d.ts +11 -0
- package/dist/cjs/interface/class/api/controller/generated/index.d.ts +2 -0
- package/dist/cjs/interface/class/api/controller/generated/read-scope-entry.interface.d.ts +10 -0
- package/dist/cjs/interface/class/api/controller/get-list/query/plan/order/entry.interface.d.ts +5 -0
- package/dist/cjs/interface/class/api/controller/get-list/query/plan/order/index.d.ts +1 -0
- package/dist/cjs/interface/class/api/controller/get-list/query/plan/order/interface.d.ts +3 -0
- package/dist/cjs/interface/class/api/controller/get-list/query/plan/pagination.interface.d.ts +4 -0
- package/dist/cjs/interface/class/api/controller/get-list/query/runtime-result.interface.d.ts +2 -0
- package/dist/cjs/interface/class/api/controller/identity-plan.interface.d.ts +7 -0
- package/dist/cjs/interface/class/api/controller/index.d.ts +1 -0
- package/dist/cjs/interface/class/api/controller/read/index.d.ts +1 -0
- package/dist/cjs/interface/class/api/controller/read/plan/index.d.ts +2 -0
- package/dist/cjs/interface/class/api/controller/read/plan/interface.d.ts +7 -0
- package/dist/cjs/interface/class/api/controller/read/plan/parameter.interface.d.ts +4 -0
- package/dist/cjs/interface/class/api/route/runtime/generated/targets.interface.d.ts +2 -1
- package/dist/cjs/interface/class/api/subscriber/route/execution/context/data/extended.interface.d.ts +3 -2
- package/dist/cjs/interface/class/api/subscriber/route.interface.d.ts +7 -7
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/index.d.ts +1 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/read/index.d.ts +3 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/read/interface.d.ts +4 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/read/scope-parameter.interface.d.ts +5 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/read/scope.interface.d.ts +4 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/index.d.ts +1 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/interface.d.ts +2 -2
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/query/index.d.ts +1 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/query/interface.d.ts +4 -1
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/query/order/entry.interface.d.ts +6 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/query/order/index.d.ts +1 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/query/order/interface.d.ts +3 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/query/pagination.interface.d.ts +4 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/read-parameters-target.interface.d.ts +5 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/target.interface.d.ts +3 -2
- package/dist/cjs/interface/decorator/api/controller/properties/route/identity.interface.d.ts +3 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/index.d.ts +1 -0
- package/dist/cjs/interface/decorator/api/get-list/cursor-response-result.interface.d.ts +5 -0
- package/dist/cjs/interface/decorator/api/get-list/index.d.ts +2 -0
- package/dist/cjs/interface/decorator/api/index.d.ts +1 -1
- package/dist/cjs/module/api/authorization.module.js +2 -1
- package/dist/cjs/module/api/authorization.module.js.map +1 -1
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/type/api-request-transformer.type.d.ts +4 -2
- package/dist/cjs/type/class/api/authorization/policy/before/get/list-result.type.d.ts +2 -1
- package/dist/cjs/type/class/api/authorization/policy/context/before/get/list-context.type.d.ts +4 -3
- package/dist/cjs/type/class/api/authorization/policy/context/with-request-metadata.type.d.ts +4 -3
- package/dist/cjs/type/class/api/authorization/policy/hook/execution-result.type.d.ts +5 -0
- package/dist/cjs/type/class/api/authorization/policy/hook/result.type.d.ts +3 -2
- package/dist/cjs/type/class/api/authorization/policy/hook/type.d.ts +2 -1
- package/dist/cjs/type/class/api/authorization/rule/transform-payload.type.d.ts +2 -2
- package/dist/cjs/type/class/api/controller/generated/function.type.d.ts +1 -0
- package/dist/cjs/type/class/api/controller/generated/index.d.ts +2 -0
- package/dist/cjs/type/class/api/controller/generated/scope-function-type.type.d.ts +2 -0
- package/dist/cjs/type/class/api/controller/get-list/compiled/index.d.ts +3 -0
- package/dist/cjs/type/class/api/controller/get-list/compiled/order-field.type.d.ts +16 -0
- package/dist/cjs/type/class/api/controller/get-list/compiled/order.type.d.ts +6 -0
- package/dist/cjs/type/class/api/controller/get-list/compiled/plan.type.d.ts +8 -0
- package/dist/cjs/type/class/api/controller/get-list/cursor/execution-options.type.d.ts +18 -0
- package/dist/cjs/type/class/api/controller/get-list/cursor/index.d.ts +2 -0
- package/dist/cjs/type/class/api/controller/get-list/cursor/query-runtime-result.type.d.ts +8 -0
- package/dist/cjs/type/class/api/controller/get-list/index.d.ts +2 -0
- package/dist/cjs/type/class/api/controller/index.d.ts +1 -0
- package/dist/cjs/type/class/api/subscriber/route/after/get/list-context.type.d.ts +3 -2
- package/dist/cjs/type/class/api/subscriber/route/before/get/list-context.type.d.ts +5 -6
- package/dist/cjs/type/decorator/api/controller/get-list/index.d.ts +1 -0
- package/dist/cjs/type/decorator/api/controller/get-list/query/dto-contract.type.d.ts +1 -0
- package/dist/cjs/type/decorator/api/controller/get-list/query/request-target.type.d.ts +7 -0
- package/dist/cjs/type/decorator/api/controller/get-list/query/type.d.ts +22 -2
- package/dist/cjs/type/decorator/api/controller/get-list/response.type.d.ts +3 -0
- package/dist/cjs/type/decorator/api/controller/index.d.ts +1 -0
- package/dist/cjs/type/decorator/api/controller/properties/route/contract.type.d.ts +5 -0
- package/dist/cjs/type/decorator/api/controller/properties/route/identity/index.d.ts +2 -0
- package/dist/cjs/type/decorator/api/controller/properties/route/identity/with.type.d.ts +11 -0
- package/dist/cjs/type/decorator/api/controller/properties/route/identity/without.type.d.ts +3 -0
- package/dist/cjs/type/decorator/api/controller/properties/route/read/dto.type.d.ts +10 -0
- package/dist/cjs/type/decorator/api/controller/properties/route/read/index.d.ts +3 -0
- package/dist/cjs/type/decorator/api/controller/properties/route/read/with.type.d.ts +11 -0
- package/dist/cjs/type/decorator/api/controller/properties/route/read/without.type.d.ts +3 -0
- package/dist/cjs/type/decorator/api/controller/properties/route/without-parameters-dto.type.d.ts +4 -0
- package/dist/cjs/type/decorator/api/controller/properties-route.type.d.ts +3 -3
- package/dist/cjs/type/decorator/api/controller/read/direct-scalar-field.type.d.ts +2 -0
- package/dist/cjs/type/decorator/api/controller/read/index.d.ts +2 -0
- package/dist/cjs/type/decorator/api/controller/read/parameter-transformer/index.d.ts +1 -0
- package/dist/cjs/type/decorator/api/controller/read/parameter-transformer/type.d.ts +3 -0
- package/dist/cjs/type/decorator/api/controller/read/parameter-transformer/with-string-key.type.d.ts +5 -0
- package/dist/cjs/type/decorator/api/property/describe/properties/base/properties.type.d.ts +1 -1
- package/dist/cjs/type/factory/api/controller/method/map.type.d.ts +4 -5
- package/dist/cjs/type/factory/api/controller/target-methods.type.d.ts +3 -3
- package/dist/cjs/type/utility/api/controller/transform-data/is-validation-properties.type.d.ts +3 -2
- package/dist/cjs/type/utility/api/controller/transform-data/object-to-transform.type.d.ts +4 -3
- package/dist/cjs/type/utility/api/controller/transform-data/runtime-transformer.type.d.ts +3 -0
- package/dist/cjs/type/utility/api/controller/transform-data/targets.type.d.ts +17 -0
- package/dist/cjs/type/utility/dto/generate/allowed-combination.type.d.ts +1 -1
- package/dist/cjs/utility/api/controller/apply/decorators.utility.d.ts +18 -2
- package/dist/cjs/utility/api/controller/apply/decorators.utility.js +24 -2
- package/dist/cjs/utility/api/controller/apply/decorators.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/apply/metadata.utility.d.ts +18 -0
- package/dist/cjs/utility/api/controller/apply/metadata.utility.js +23 -3
- package/dist/cjs/utility/api/controller/apply/metadata.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/build-route-documentation.utility.js +1 -0
- package/dist/cjs/utility/api/controller/build-route-documentation.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/get/dto.utility.d.ts +17 -0
- package/dist/cjs/utility/api/controller/get/dto.utility.js +90 -11
- package/dist/cjs/utility/api/controller/get/dto.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/get-list/query/get-pagination-mode.utility.d.ts +8 -0
- package/dist/cjs/utility/api/controller/get-list/query/get-pagination-mode.utility.js +43 -0
- package/dist/cjs/utility/api/controller/get-list/query/get-pagination-mode.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/get-list/query/open-api/decorators.utility.js +1 -0
- package/dist/cjs/utility/api/controller/get-list/query/open-api/decorators.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/get-list/query/open-api/value-schema.utility.js +1 -0
- package/dist/cjs/utility/api/controller/get-list/query/open-api/value-schema.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/get-list/query/resolve-cursor-order-fields.utility.d.ts +7 -0
- package/dist/cjs/utility/api/controller/get-list/query/resolve-cursor-order-fields.utility.js +26 -0
- package/dist/cjs/utility/api/controller/get-list/query/resolve-cursor-order-fields.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/get-list/transform/filter.utility.js +1 -0
- package/dist/cjs/utility/api/controller/get-list/transform/filter.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/handle-request-relations.utility.d.ts +2 -1
- package/dist/cjs/utility/api/controller/handle-request-relations.utility.js +1 -0
- package/dist/cjs/utility/api/controller/handle-request-relations.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/identity/assert-plan.utility.d.ts +8 -0
- package/dist/cjs/utility/api/controller/identity/assert-plan.utility.js +18 -0
- package/dist/cjs/utility/api/controller/identity/assert-plan.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/identity/index.d.ts +2 -0
- package/dist/cjs/utility/api/controller/identity/plan/get.utility.d.ts +7 -0
- package/dist/cjs/utility/api/controller/identity/plan/get.utility.js +15 -0
- package/dist/cjs/utility/api/controller/identity/plan/get.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/identity/plan/index.d.ts +2 -0
- package/dist/cjs/utility/api/controller/identity/plan/metadata-key.constant.d.ts +1 -0
- package/dist/cjs/utility/api/controller/identity/plan/metadata-key.constant.js +6 -0
- package/dist/cjs/utility/api/controller/identity/plan/metadata-key.constant.js.map +1 -0
- package/dist/cjs/utility/api/controller/identity/plan/set.utility.d.ts +8 -0
- package/dist/cjs/utility/api/controller/identity/plan/set.utility.js +16 -0
- package/dist/cjs/utility/api/controller/identity/plan/set.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/read/assert-plan.utility.d.ts +8 -0
- package/dist/cjs/utility/api/controller/read/assert-plan.utility.js +18 -0
- package/dist/cjs/utility/api/controller/read/assert-plan.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/read/index.d.ts +3 -0
- package/dist/cjs/utility/api/controller/read/plan/get.utility.d.ts +8 -0
- package/dist/cjs/utility/api/controller/read/plan/get.utility.js +16 -0
- package/dist/cjs/utility/api/controller/read/plan/get.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/read/plan/index.d.ts +2 -0
- package/dist/cjs/utility/api/controller/read/plan/metadata-key.constant.d.ts +1 -0
- package/dist/cjs/utility/api/controller/read/plan/metadata-key.constant.js +6 -0
- package/dist/cjs/utility/api/controller/read/plan/metadata-key.constant.js.map +1 -0
- package/dist/cjs/utility/api/controller/read/plan/set.utility.d.ts +9 -0
- package/dist/cjs/utility/api/controller/read/plan/set.utility.js +17 -0
- package/dist/cjs/utility/api/controller/read/plan/set.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/read/scope.utility.d.ts +12 -0
- package/dist/cjs/utility/api/controller/read/scope.utility.js +38 -0
- package/dist/cjs/utility/api/controller/read/scope.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/transform-data.utility.js +13 -11
- package/dist/cjs/utility/api/controller/transform-data.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/validate-request.utility.d.ts +2 -1
- package/dist/cjs/utility/api/controller/validate-request.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/write/dto-swagger.utility.d.ts +17 -0
- package/dist/cjs/utility/api/controller/write/dto-swagger.utility.js +23 -4
- package/dist/cjs/utility/api/controller/write/dto-swagger.utility.js.map +1 -1
- package/dist/cjs/utility/api/function-transaction.utility.js +1 -0
- package/dist/cjs/utility/api/function-transaction.utility.js.map +1 -1
- package/dist/cjs/utility/api/route/apply-dto-metadata.utility.js +1 -0
- package/dist/cjs/utility/api/route/apply-dto-metadata.utility.js.map +1 -1
- package/dist/cjs/utility/api/route/response/project-relation.utility.js +1 -0
- package/dist/cjs/utility/api/route/response/project-relation.utility.js.map +1 -1
- package/dist/cjs/utility/authorization/scope-merge-where.utility.js +247 -130
- package/dist/cjs/utility/authorization/scope-merge-where.utility.js.map +1 -1
- package/dist/cjs/utility/dto/build-decorator.utility.js +1 -0
- package/dist/cjs/utility/dto/build-decorator.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate/core.utility.js +19 -7
- package/dist/cjs/utility/dto/generate/core.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate/dynamic.utility.js +1 -0
- package/dist/cjs/utility/dto/generate/dynamic.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate/exception.utility.js +1 -0
- package/dist/cjs/utility/dto/generate/exception.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate/filter-decorator.utility.js +1 -0
- package/dist/cjs/utility/dto/generate/filter-decorator.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate/get-list/cursor-response.utility.d.ts +10 -0
- package/dist/cjs/utility/dto/generate/get-list/cursor-response.utility.js +100 -0
- package/dist/cjs/utility/dto/generate/get-list/cursor-response.utility.js.map +1 -0
- package/dist/cjs/utility/dto/generate/get-list/index.d.ts +3 -0
- package/dist/cjs/utility/dto/generate/{get-list-query-properties.utility.d.ts → get-list/query-properties.utility.d.ts} +4 -4
- package/dist/cjs/utility/dto/generate/{get-list-query-properties.utility.js → get-list/query-properties.utility.js} +35 -34
- package/dist/cjs/utility/dto/generate/get-list/query-properties.utility.js.map +1 -0
- package/dist/cjs/utility/dto/generate/{get-list-response.utility.d.ts → get-list/response.utility.d.ts} +1 -1
- package/dist/cjs/utility/dto/generate/{get-list-response.utility.js → get-list/response.utility.js} +33 -32
- package/dist/cjs/utility/dto/generate/get-list/response.utility.js.map +1 -0
- package/dist/cjs/utility/dto/generate/identity-read-parameters.utility.d.ts +17 -0
- package/dist/cjs/utility/dto/generate/identity-read-parameters.utility.js +113 -0
- package/dist/cjs/utility/dto/generate/identity-read-parameters.utility.js.map +1 -0
- package/dist/cjs/utility/dto/generate/index.d.ts +1 -1
- package/dist/cjs/utility/dto/generate/read-parameters.utility.d.ts +17 -0
- package/dist/cjs/utility/dto/generate/read-parameters.utility.js +111 -0
- package/dist/cjs/utility/dto/generate/read-parameters.utility.js.map +1 -0
- package/dist/cjs/utility/dto/get/get-list-query-base-class.utility.d.ts +3 -2
- package/dist/cjs/utility/dto/get/get-list-query-base-class.utility.js +48 -15
- package/dist/cjs/utility/dto/get/get-list-query-base-class.utility.js.map +1 -1
- package/dist/cjs/utility/dto/handle-date-property.utility.js +1 -0
- package/dist/cjs/utility/dto/handle-date-property.utility.js.map +1 -1
- package/dist/cjs/utility/dto/is/property/infrastructure-timestamp.utility.js +1 -0
- package/dist/cjs/utility/dto/is/property/infrastructure-timestamp.utility.js.map +1 -1
- package/dist/cjs/utility/dto/is/property/should-be-marked.utility.js +1 -0
- package/dist/cjs/utility/dto/is/property/should-be-marked.utility.js.map +1 -1
- package/dist/cjs/utility/dto/is/should-be-generated.utility.js +1 -0
- package/dist/cjs/utility/dto/is/should-be-generated.utility.js.map +1 -1
- package/dist/cjs/utility/object-find-property-descriptor.utility.d.ts +7 -0
- package/dist/cjs/utility/object-find-property-descriptor.utility.js +22 -0
- package/dist/cjs/utility/object-find-property-descriptor.utility.js.map +1 -0
- package/dist/cjs/validator/at-most-one-of-listed-properties.validator.d.ts +5 -0
- package/dist/cjs/validator/at-most-one-of-listed-properties.validator.js +21 -0
- package/dist/cjs/validator/at-most-one-of-listed-properties.validator.js.map +1 -0
- package/dist/esm/class/api/authorization/guard.class.d.ts +1 -0
- package/dist/esm/class/api/authorization/guard.class.js +39 -3
- package/dist/esm/class/api/authorization/guard.class.js.map +1 -1
- package/dist/esm/class/api/authorization/iam/engine.class.d.ts +3 -2
- package/dist/esm/class/api/authorization/iam/engine.class.js.map +1 -1
- package/dist/esm/class/api/authorization/iam/query-planner.class.d.ts +3 -2
- package/dist/esm/class/api/authorization/iam/query-planner.class.js.map +1 -1
- package/dist/esm/class/api/authorization/policy/base.class.js +1 -0
- package/dist/esm/class/api/authorization/policy/base.class.js.map +1 -1
- package/dist/esm/class/api/authorization/policy/executor.class.d.ts +2 -1
- package/dist/esm/class/api/authorization/policy/executor.class.js.map +1 -1
- package/dist/esm/class/api/authorization/policy/registry.class.d.ts +3 -2
- package/dist/esm/class/api/authorization/policy/registry.class.js.map +1 -1
- package/dist/esm/class/api/authorization/runtime.class.d.ts +3 -2
- package/dist/esm/class/api/authorization/runtime.class.js +2 -1
- package/dist/esm/class/api/authorization/runtime.class.js.map +1 -1
- package/dist/esm/class/api/authorization/simulator.class.d.ts +3 -3
- package/dist/esm/class/api/authorization/simulator.class.js.map +1 -1
- package/dist/esm/class/api/controller/generated/function-capability.class.d.ts +12 -0
- package/dist/esm/class/api/controller/generated/function-capability.class.js +45 -0
- package/dist/esm/class/api/controller/generated/function-capability.class.js.map +1 -0
- package/dist/esm/class/api/controller/generated/get-many-contract.class.d.ts +25 -0
- package/dist/esm/class/api/controller/generated/get-many-contract.class.js +248 -0
- package/dist/esm/class/api/controller/generated/get-many-contract.class.js.map +1 -0
- package/dist/esm/class/api/controller/generated/index.d.ts +3 -0
- package/dist/esm/class/api/controller/generated/read-scope-storage.class.d.ts +19 -0
- package/dist/esm/class/api/controller/generated/read-scope-storage.class.js +118 -0
- package/dist/esm/class/api/controller/generated/read-scope-storage.class.js.map +1 -0
- package/dist/esm/class/api/controller/generated/relation-cache-contract.class.d.ts +11 -0
- package/dist/esm/class/api/controller/generated/relation-cache-contract.class.js +68 -0
- package/dist/esm/class/api/controller/generated/relation-cache-contract.class.js.map +1 -0
- package/dist/esm/class/api/controller/generated/scope-where-contract.class.d.ts +14 -0
- package/dist/esm/class/api/controller/generated/scope-where-contract.class.js +66 -0
- package/dist/esm/class/api/controller/generated/scope-where-contract.class.js.map +1 -0
- package/dist/esm/class/api/controller/generated/security-snapshot.class.d.ts +14 -0
- package/dist/esm/class/api/controller/generated/security-snapshot.class.js +163 -0
- package/dist/esm/class/api/controller/generated/security-snapshot.class.js.map +1 -0
- package/dist/esm/class/api/controller/generated/write-hydration-contract.class.d.ts +9 -0
- package/dist/esm/class/api/controller/generated/write-hydration-contract.class.js +67 -0
- package/dist/esm/class/api/controller/generated/write-hydration-contract.class.js.map +1 -0
- package/dist/esm/class/api/controller/get-list/cursor/data-source-contract.class.d.ts +32 -0
- package/dist/esm/class/api/controller/get-list/cursor/data-source-contract.class.js +422 -0
- package/dist/esm/class/api/controller/get-list/cursor/data-source-contract.class.js.map +1 -0
- package/dist/esm/class/api/controller/get-list/cursor/index.d.ts +2 -0
- package/dist/esm/class/api/controller/get-list/cursor/runtime.class.d.ts +28 -0
- package/dist/esm/class/api/controller/get-list/cursor/runtime.class.js +369 -0
- package/dist/esm/class/api/controller/get-list/cursor/runtime.class.js.map +1 -0
- package/dist/esm/class/api/controller/get-list/query/plan-compiler.class.d.ts +20 -0
- package/dist/esm/class/api/controller/get-list/query/plan-compiler.class.js +479 -41
- package/dist/esm/class/api/controller/get-list/query/plan-compiler.class.js.map +1 -1
- package/dist/esm/class/api/controller/get-list/query/runtime.class.d.ts +2 -0
- package/dist/esm/class/api/controller/get-list/query/runtime.class.js +45 -2
- package/dist/esm/class/api/controller/get-list/query/runtime.class.js.map +1 -1
- package/dist/esm/class/api/controller/identity-plan-compiler.class.d.ts +14 -0
- package/dist/esm/class/api/controller/identity-plan-compiler.class.js +148 -0
- package/dist/esm/class/api/controller/identity-plan-compiler.class.js.map +1 -0
- package/dist/esm/class/api/controller/index.d.ts +1 -0
- package/dist/esm/class/api/controller/read-plan-compiler.class.d.ts +17 -0
- package/dist/esm/class/api/controller/read-plan-compiler.class.js +238 -0
- package/dist/esm/class/api/controller/read-plan-compiler.class.js.map +1 -0
- package/dist/esm/class/api/function/context-storage.class.js +1 -0
- package/dist/esm/class/api/function/context-storage.class.js.map +1 -1
- package/dist/esm/class/api/function/custom-runtime.class.js +1 -0
- package/dist/esm/class/api/function/custom-runtime.class.js.map +1 -1
- package/dist/esm/class/api/function/step-runtime.class.js +1 -0
- package/dist/esm/class/api/function/step-runtime.class.js.map +1 -1
- package/dist/esm/class/api/function/transaction/exception/commit-unknown-outcome.class.js +1 -0
- package/dist/esm/class/api/function/transaction/exception/commit-unknown-outcome.class.js.map +1 -1
- package/dist/esm/class/api/function/transaction/exception/post-commit.class.js +1 -0
- package/dist/esm/class/api/function/transaction/exception/post-commit.class.js.map +1 -1
- package/dist/esm/class/api/function/transaction/exception/rollback.class.js +1 -0
- package/dist/esm/class/api/function/transaction/exception/rollback.class.js.map +1 -1
- package/dist/esm/class/api/function/transaction/lifecycle.class.js +1 -0
- package/dist/esm/class/api/function/transaction/lifecycle.class.js.map +1 -1
- package/dist/esm/class/api/function/transaction/registry.class.js +1 -0
- package/dist/esm/class/api/function/transaction/registry.class.js.map +1 -1
- package/dist/esm/class/api/function/transaction/runtime.class.js +1 -0
- package/dist/esm/class/api/function/transaction/runtime.class.js.map +1 -1
- package/dist/esm/class/api/function/transaction/scope.class.js +1 -0
- package/dist/esm/class/api/function/transaction/scope.class.js.map +1 -1
- package/dist/esm/class/api/route-runtime.class.d.ts +2 -0
- package/dist/esm/class/api/route-runtime.class.js +201 -59
- package/dist/esm/class/api/route-runtime.class.js.map +1 -1
- package/dist/esm/class/api/subscriber/executor.class.js +1 -0
- package/dist/esm/class/api/subscriber/executor.class.js.map +1 -1
- package/dist/esm/class/api/subscriber/registry.class.d.ts +3 -3
- package/dist/esm/class/api/subscriber/registry.class.js +3 -1
- package/dist/esm/class/api/subscriber/registry.class.js.map +1 -1
- package/dist/esm/class/api/subscriber/route-base.class.d.ts +2 -2
- package/dist/esm/class/api/subscriber/route-base.class.js.map +1 -1
- package/dist/esm/class/utility/dto/exception/details/foreign-key-violation.class.js +1 -0
- package/dist/esm/class/utility/dto/exception/details/foreign-key-violation.class.js.map +1 -1
- package/dist/esm/class/utility/dto/exception/details/unique-violation.class.js +1 -0
- package/dist/esm/class/utility/dto/exception/details/unique-violation.class.js.map +1 -1
- package/dist/esm/class/utility/dto/property/factory/number.class.js +1 -0
- package/dist/esm/class/utility/dto/property/factory/number.class.js.map +1 -1
- package/dist/esm/class/utility/dto/property/factory/relation.class.js +1 -0
- package/dist/esm/class/utility/dto/property/factory/relation.class.js.map +1 -1
- package/dist/esm/class/utility/dto/strategy/body.class.js +1 -0
- package/dist/esm/class/utility/dto/strategy/body.class.js.map +1 -1
- package/dist/esm/class/utility/dto/strategy/query.class.js +1 -0
- package/dist/esm/class/utility/dto/strategy/query.class.js.map +1 -1
- package/dist/esm/class/utility/dto/strategy/request.class.js +1 -0
- package/dist/esm/class/utility/dto/strategy/request.class.js.map +1 -1
- package/dist/esm/class/utility/dto/strategy/response.class.js +1 -0
- package/dist/esm/class/utility/dto/strategy/response.class.js.map +1 -1
- package/dist/esm/constant/api-controller-cursor.constant.d.ts +1 -0
- package/dist/esm/constant/api-controller-cursor.constant.js +4 -0
- package/dist/esm/constant/api-controller-cursor.constant.js.map +1 -0
- package/dist/esm/constant/filter/operator-registry.constant.js +1 -0
- package/dist/esm/constant/filter/operator-registry.constant.js.map +1 -1
- package/dist/esm/constant/safe-object-property-names.constant.d.ts +1 -0
- package/dist/esm/constant/safe-object-property-names.constant.js +4 -0
- package/dist/esm/constant/safe-object-property-names.constant.js.map +1 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/customizer-map.constant.js +1 -0
- package/dist/esm/constant/utility/api/get-default-string-format-properties/customizer-map.constant.js.map +1 -1
- package/dist/esm/constant/utility/dto/constant.js +1 -0
- package/dist/esm/constant/utility/dto/constant.js.map +1 -1
- package/dist/esm/decorator/api/controller/decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/create.decorator.js +1 -0
- package/dist/esm/decorator/api/function/create.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/custom.decorator.js +1 -0
- package/dist/esm/decorator/api/function/custom.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/decorator.js +5 -0
- package/dist/esm/decorator/api/function/decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/delete.decorator.js +19 -7
- package/dist/esm/decorator/api/function/delete.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/get/decorator.js +53 -19
- package/dist/esm/decorator/api/function/get/decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/get/list.decorator.js +41 -27
- package/dist/esm/decorator/api/function/get/list.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/get/many.decorator.js +70 -19
- package/dist/esm/decorator/api/function/get/many.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/step.decorator.js +1 -0
- package/dist/esm/decorator/api/function/step.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/update.decorator.js +20 -1
- package/dist/esm/decorator/api/function/update.decorator.js.map +1 -1
- package/dist/esm/decorator/api/method.decorator.js +1 -0
- package/dist/esm/decorator/api/method.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/boolean.decorator.js +1 -0
- package/dist/esm/decorator/api/property/boolean.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/date.decorator.js +1 -0
- package/dist/esm/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/number.decorator.js +1 -0
- package/dist/esm/decorator/api/property/number.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/string.decorator.js +1 -0
- package/dist/esm/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/uuid.decorator.js +1 -0
- 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.js +16 -0
- package/dist/esm/decorator/api/service/decorator.js.map +1 -1
- package/dist/esm/enum/decorator/api/controller/get-list/query/index.d.ts +1 -0
- package/dist/esm/enum/decorator/api/controller/get-list/query/pagination-mode.enum.d.ts +4 -0
- package/dist/esm/enum/decorator/api/controller/get-list/query/pagination-mode.enum.js +8 -0
- package/dist/esm/enum/decorator/api/controller/get-list/query/pagination-mode.enum.js.map +1 -0
- package/dist/esm/factory/api-controller.factory.d.ts +4 -4
- package/dist/esm/factory/api-controller.factory.js +36 -10
- package/dist/esm/factory/api-controller.factory.js.map +1 -1
- package/dist/esm/index.js +7 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interface/api/request-validator.interface.d.ts +3 -2
- package/dist/esm/interface/class/api/authorization/policy/build-options.interface.d.ts +3 -2
- package/dist/esm/interface/class/api/authorization/policy/registry.interface.d.ts +3 -2
- package/dist/esm/interface/class/api/authorization/policy/subscriber/context/data.interface.d.ts +2 -1
- package/dist/esm/interface/class/api/authorization/policy/subscriber/context/interface.d.ts +3 -2
- package/dist/esm/interface/class/api/authorization/policy/subscriber/interface.d.ts +9 -8
- package/dist/esm/interface/class/api/authorization/policy/subscriber/registration.interface.d.ts +3 -2
- package/dist/esm/interface/class/api/authorization/request-metadata.interface.d.ts +3 -2
- package/dist/esm/interface/class/api/controller/generated/get-many-session.interface.d.ts +11 -0
- package/dist/esm/interface/class/api/controller/generated/index.d.ts +2 -0
- package/dist/esm/interface/class/api/controller/generated/read-scope-entry.interface.d.ts +10 -0
- package/dist/esm/interface/class/api/controller/get-list/query/plan/order/entry.interface.d.ts +5 -0
- package/dist/esm/interface/class/api/controller/get-list/query/plan/order/index.d.ts +1 -0
- package/dist/esm/interface/class/api/controller/get-list/query/plan/order/interface.d.ts +3 -0
- package/dist/esm/interface/class/api/controller/get-list/query/plan/pagination.interface.d.ts +4 -0
- package/dist/esm/interface/class/api/controller/get-list/query/runtime-result.interface.d.ts +2 -0
- package/dist/esm/interface/class/api/controller/identity-plan.interface.d.ts +7 -0
- package/dist/esm/interface/class/api/controller/index.d.ts +1 -0
- package/dist/esm/interface/class/api/controller/read/index.d.ts +1 -0
- package/dist/esm/interface/class/api/controller/read/plan/index.d.ts +2 -0
- package/dist/esm/interface/class/api/controller/read/plan/interface.d.ts +7 -0
- package/dist/esm/interface/class/api/controller/read/plan/parameter.interface.d.ts +4 -0
- package/dist/esm/interface/class/api/route/runtime/generated/targets.interface.d.ts +2 -1
- package/dist/esm/interface/class/api/subscriber/route/execution/context/data/extended.interface.d.ts +3 -2
- package/dist/esm/interface/class/api/subscriber/route.interface.d.ts +7 -7
- package/dist/esm/interface/decorator/api/controller/properties/route/base/index.d.ts +1 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/read/index.d.ts +3 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/read/interface.d.ts +4 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/read/scope-parameter.interface.d.ts +5 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/read/scope.interface.d.ts +4 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/index.d.ts +1 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/interface.d.ts +2 -2
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/query/index.d.ts +1 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/query/interface.d.ts +4 -1
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/query/order/entry.interface.d.ts +6 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/query/order/index.d.ts +1 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/query/order/interface.d.ts +3 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/query/pagination.interface.d.ts +4 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/read-parameters-target.interface.d.ts +5 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/target.interface.d.ts +3 -2
- package/dist/esm/interface/decorator/api/controller/properties/route/identity.interface.d.ts +3 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/index.d.ts +1 -0
- package/dist/esm/interface/decorator/api/get-list/cursor-response-result.interface.d.ts +5 -0
- package/dist/esm/interface/decorator/api/get-list/index.d.ts +2 -0
- package/dist/esm/interface/decorator/api/index.d.ts +1 -1
- package/dist/esm/module/api/authorization.module.js +2 -1
- package/dist/esm/module/api/authorization.module.js.map +1 -1
- package/dist/esm/package.json +1 -0
- package/dist/esm/type/api-request-transformer.type.d.ts +4 -2
- package/dist/esm/type/class/api/authorization/policy/before/get/list-result.type.d.ts +2 -1
- package/dist/esm/type/class/api/authorization/policy/context/before/get/list-context.type.d.ts +4 -3
- package/dist/esm/type/class/api/authorization/policy/context/with-request-metadata.type.d.ts +4 -3
- package/dist/esm/type/class/api/authorization/policy/hook/execution-result.type.d.ts +5 -0
- package/dist/esm/type/class/api/authorization/policy/hook/result.type.d.ts +3 -2
- package/dist/esm/type/class/api/authorization/policy/hook/type.d.ts +2 -1
- package/dist/esm/type/class/api/authorization/rule/transform-payload.type.d.ts +2 -2
- package/dist/esm/type/class/api/controller/generated/function.type.d.ts +1 -0
- package/dist/esm/type/class/api/controller/generated/index.d.ts +2 -0
- package/dist/esm/type/class/api/controller/generated/scope-function-type.type.d.ts +2 -0
- package/dist/esm/type/class/api/controller/get-list/compiled/index.d.ts +3 -0
- package/dist/esm/type/class/api/controller/get-list/compiled/order-field.type.d.ts +16 -0
- package/dist/esm/type/class/api/controller/get-list/compiled/order.type.d.ts +6 -0
- package/dist/esm/type/class/api/controller/get-list/compiled/plan.type.d.ts +8 -0
- package/dist/esm/type/class/api/controller/get-list/cursor/execution-options.type.d.ts +18 -0
- package/dist/esm/type/class/api/controller/get-list/cursor/index.d.ts +2 -0
- package/dist/esm/type/class/api/controller/get-list/cursor/query-runtime-result.type.d.ts +8 -0
- package/dist/esm/type/class/api/controller/get-list/index.d.ts +2 -0
- package/dist/esm/type/class/api/controller/index.d.ts +1 -0
- package/dist/esm/type/class/api/subscriber/route/after/get/list-context.type.d.ts +3 -2
- package/dist/esm/type/class/api/subscriber/route/before/get/list-context.type.d.ts +5 -6
- package/dist/esm/type/decorator/api/controller/get-list/index.d.ts +1 -0
- package/dist/esm/type/decorator/api/controller/get-list/query/dto-contract.type.d.ts +1 -0
- package/dist/esm/type/decorator/api/controller/get-list/query/request-target.type.d.ts +7 -0
- package/dist/esm/type/decorator/api/controller/get-list/query/type.d.ts +22 -2
- package/dist/esm/type/decorator/api/controller/get-list/response.type.d.ts +3 -0
- package/dist/esm/type/decorator/api/controller/index.d.ts +1 -0
- package/dist/esm/type/decorator/api/controller/properties/route/contract.type.d.ts +5 -0
- package/dist/esm/type/decorator/api/controller/properties/route/identity/index.d.ts +2 -0
- package/dist/esm/type/decorator/api/controller/properties/route/identity/with.type.d.ts +11 -0
- package/dist/esm/type/decorator/api/controller/properties/route/identity/without.type.d.ts +3 -0
- package/dist/esm/type/decorator/api/controller/properties/route/read/dto.type.d.ts +10 -0
- package/dist/esm/type/decorator/api/controller/properties/route/read/index.d.ts +3 -0
- package/dist/esm/type/decorator/api/controller/properties/route/read/with.type.d.ts +11 -0
- package/dist/esm/type/decorator/api/controller/properties/route/read/without.type.d.ts +3 -0
- package/dist/esm/type/decorator/api/controller/properties/route/without-parameters-dto.type.d.ts +4 -0
- package/dist/esm/type/decorator/api/controller/properties-route.type.d.ts +3 -3
- package/dist/esm/type/decorator/api/controller/read/direct-scalar-field.type.d.ts +2 -0
- package/dist/esm/type/decorator/api/controller/read/index.d.ts +2 -0
- package/dist/esm/type/decorator/api/controller/read/parameter-transformer/index.d.ts +1 -0
- package/dist/esm/type/decorator/api/controller/read/parameter-transformer/type.d.ts +3 -0
- package/dist/esm/type/decorator/api/controller/read/parameter-transformer/with-string-key.type.d.ts +5 -0
- package/dist/esm/type/decorator/api/property/describe/properties/base/properties.type.d.ts +1 -1
- package/dist/esm/type/factory/api/controller/method/map.type.d.ts +4 -5
- package/dist/esm/type/factory/api/controller/target-methods.type.d.ts +3 -3
- package/dist/esm/type/utility/api/controller/transform-data/is-validation-properties.type.d.ts +3 -2
- package/dist/esm/type/utility/api/controller/transform-data/object-to-transform.type.d.ts +4 -3
- package/dist/esm/type/utility/api/controller/transform-data/runtime-transformer.type.d.ts +3 -0
- package/dist/esm/type/utility/api/controller/transform-data/targets.type.d.ts +17 -0
- package/dist/esm/type/utility/dto/generate/allowed-combination.type.d.ts +1 -1
- package/dist/esm/utility/api/controller/apply/decorators.utility.d.ts +18 -2
- package/dist/esm/utility/api/controller/apply/decorators.utility.js +25 -4
- package/dist/esm/utility/api/controller/apply/decorators.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/apply/metadata.utility.d.ts +18 -0
- package/dist/esm/utility/api/controller/apply/metadata.utility.js +24 -5
- package/dist/esm/utility/api/controller/apply/metadata.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/build-route-documentation.utility.js +1 -0
- package/dist/esm/utility/api/controller/build-route-documentation.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/get/dto.utility.d.ts +17 -0
- package/dist/esm/utility/api/controller/get/dto.utility.js +90 -12
- package/dist/esm/utility/api/controller/get/dto.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/get-list/query/get-pagination-mode.utility.d.ts +8 -0
- package/dist/esm/utility/api/controller/get-list/query/get-pagination-mode.utility.js +41 -0
- package/dist/esm/utility/api/controller/get-list/query/get-pagination-mode.utility.js.map +1 -0
- package/dist/esm/utility/api/controller/get-list/query/open-api/decorators.utility.js +1 -0
- package/dist/esm/utility/api/controller/get-list/query/open-api/decorators.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/get-list/query/open-api/value-schema.utility.js +1 -0
- package/dist/esm/utility/api/controller/get-list/query/open-api/value-schema.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/get-list/query/resolve-cursor-order-fields.utility.d.ts +7 -0
- package/dist/esm/utility/api/controller/get-list/query/resolve-cursor-order-fields.utility.js +24 -0
- package/dist/esm/utility/api/controller/get-list/query/resolve-cursor-order-fields.utility.js.map +1 -0
- package/dist/esm/utility/api/controller/get-list/transform/filter.utility.js +1 -0
- package/dist/esm/utility/api/controller/get-list/transform/filter.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/handle-request-relations.utility.d.ts +2 -1
- package/dist/esm/utility/api/controller/handle-request-relations.utility.js +1 -0
- package/dist/esm/utility/api/controller/handle-request-relations.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/identity/assert-plan.utility.d.ts +8 -0
- package/dist/esm/utility/api/controller/identity/assert-plan.utility.js +16 -0
- package/dist/esm/utility/api/controller/identity/assert-plan.utility.js.map +1 -0
- package/dist/esm/utility/api/controller/identity/index.d.ts +2 -0
- package/dist/esm/utility/api/controller/identity/plan/get.utility.d.ts +7 -0
- package/dist/esm/utility/api/controller/identity/plan/get.utility.js +13 -0
- package/dist/esm/utility/api/controller/identity/plan/get.utility.js.map +1 -0
- package/dist/esm/utility/api/controller/identity/plan/index.d.ts +2 -0
- package/dist/esm/utility/api/controller/identity/plan/metadata-key.constant.d.ts +1 -0
- package/dist/esm/utility/api/controller/identity/plan/metadata-key.constant.js +4 -0
- package/dist/esm/utility/api/controller/identity/plan/metadata-key.constant.js.map +1 -0
- package/dist/esm/utility/api/controller/identity/plan/set.utility.d.ts +8 -0
- package/dist/esm/utility/api/controller/identity/plan/set.utility.js +14 -0
- package/dist/esm/utility/api/controller/identity/plan/set.utility.js.map +1 -0
- package/dist/esm/utility/api/controller/read/assert-plan.utility.d.ts +8 -0
- package/dist/esm/utility/api/controller/read/assert-plan.utility.js +16 -0
- package/dist/esm/utility/api/controller/read/assert-plan.utility.js.map +1 -0
- package/dist/esm/utility/api/controller/read/index.d.ts +3 -0
- package/dist/esm/utility/api/controller/read/plan/get.utility.d.ts +8 -0
- package/dist/esm/utility/api/controller/read/plan/get.utility.js +14 -0
- package/dist/esm/utility/api/controller/read/plan/get.utility.js.map +1 -0
- package/dist/esm/utility/api/controller/read/plan/index.d.ts +2 -0
- package/dist/esm/utility/api/controller/read/plan/metadata-key.constant.d.ts +1 -0
- package/dist/esm/utility/api/controller/read/plan/metadata-key.constant.js +4 -0
- package/dist/esm/utility/api/controller/read/plan/metadata-key.constant.js.map +1 -0
- package/dist/esm/utility/api/controller/read/plan/set.utility.d.ts +9 -0
- package/dist/esm/utility/api/controller/read/plan/set.utility.js +15 -0
- package/dist/esm/utility/api/controller/read/plan/set.utility.js.map +1 -0
- package/dist/esm/utility/api/controller/read/scope.utility.d.ts +12 -0
- package/dist/esm/utility/api/controller/read/scope.utility.js +36 -0
- package/dist/esm/utility/api/controller/read/scope.utility.js.map +1 -0
- package/dist/esm/utility/api/controller/transform-data.utility.js +13 -11
- package/dist/esm/utility/api/controller/transform-data.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/validate-request.utility.d.ts +2 -1
- package/dist/esm/utility/api/controller/validate-request.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/write/dto-swagger.utility.d.ts +17 -0
- package/dist/esm/utility/api/controller/write/dto-swagger.utility.js +24 -6
- package/dist/esm/utility/api/controller/write/dto-swagger.utility.js.map +1 -1
- package/dist/esm/utility/api/function-transaction.utility.js +1 -0
- package/dist/esm/utility/api/function-transaction.utility.js.map +1 -1
- package/dist/esm/utility/api/route/apply-dto-metadata.utility.js +1 -0
- package/dist/esm/utility/api/route/apply-dto-metadata.utility.js.map +1 -1
- package/dist/esm/utility/api/route/response/project-relation.utility.js +1 -0
- package/dist/esm/utility/api/route/response/project-relation.utility.js.map +1 -1
- package/dist/esm/utility/authorization/scope-merge-where.utility.js +248 -131
- package/dist/esm/utility/authorization/scope-merge-where.utility.js.map +1 -1
- package/dist/esm/utility/dto/build-decorator.utility.js +1 -0
- package/dist/esm/utility/dto/build-decorator.utility.js.map +1 -1
- package/dist/esm/utility/dto/generate/core.utility.js +18 -6
- package/dist/esm/utility/dto/generate/core.utility.js.map +1 -1
- package/dist/esm/utility/dto/generate/dynamic.utility.js +1 -0
- package/dist/esm/utility/dto/generate/dynamic.utility.js.map +1 -1
- package/dist/esm/utility/dto/generate/exception.utility.js +1 -0
- package/dist/esm/utility/dto/generate/exception.utility.js.map +1 -1
- package/dist/esm/utility/dto/generate/filter-decorator.utility.js +1 -0
- package/dist/esm/utility/dto/generate/filter-decorator.utility.js.map +1 -1
- package/dist/esm/utility/dto/generate/get-list/cursor-response.utility.d.ts +10 -0
- package/dist/esm/utility/dto/generate/get-list/cursor-response.utility.js +98 -0
- package/dist/esm/utility/dto/generate/get-list/cursor-response.utility.js.map +1 -0
- package/dist/esm/utility/dto/generate/get-list/index.d.ts +3 -0
- package/dist/esm/utility/dto/generate/{get-list-query-properties.utility.d.ts → get-list/query-properties.utility.d.ts} +4 -4
- package/dist/esm/utility/dto/generate/{get-list-query-properties.utility.js → get-list/query-properties.utility.js} +35 -34
- package/dist/esm/utility/dto/generate/get-list/query-properties.utility.js.map +1 -0
- package/dist/esm/utility/dto/generate/{get-list-response.utility.d.ts → get-list/response.utility.d.ts} +1 -1
- package/dist/esm/utility/dto/generate/{get-list-response.utility.js → get-list/response.utility.js} +33 -32
- package/dist/esm/utility/dto/generate/get-list/response.utility.js.map +1 -0
- package/dist/esm/utility/dto/generate/identity-read-parameters.utility.d.ts +17 -0
- package/dist/esm/utility/dto/generate/identity-read-parameters.utility.js +111 -0
- package/dist/esm/utility/dto/generate/identity-read-parameters.utility.js.map +1 -0
- package/dist/esm/utility/dto/generate/index.d.ts +1 -1
- package/dist/esm/utility/dto/generate/read-parameters.utility.d.ts +17 -0
- package/dist/esm/utility/dto/generate/read-parameters.utility.js +109 -0
- package/dist/esm/utility/dto/generate/read-parameters.utility.js.map +1 -0
- package/dist/esm/utility/dto/get/get-list-query-base-class.utility.d.ts +3 -2
- package/dist/esm/utility/dto/get/get-list-query-base-class.utility.js +48 -15
- package/dist/esm/utility/dto/get/get-list-query-base-class.utility.js.map +1 -1
- package/dist/esm/utility/dto/handle-date-property.utility.js +1 -0
- package/dist/esm/utility/dto/handle-date-property.utility.js.map +1 -1
- package/dist/esm/utility/dto/is/property/infrastructure-timestamp.utility.js +1 -0
- package/dist/esm/utility/dto/is/property/infrastructure-timestamp.utility.js.map +1 -1
- package/dist/esm/utility/dto/is/property/should-be-marked.utility.js +1 -0
- package/dist/esm/utility/dto/is/property/should-be-marked.utility.js.map +1 -1
- package/dist/esm/utility/dto/is/should-be-generated.utility.js +1 -0
- package/dist/esm/utility/dto/is/should-be-generated.utility.js.map +1 -1
- package/dist/esm/utility/object-find-property-descriptor.utility.d.ts +7 -0
- package/dist/esm/utility/object-find-property-descriptor.utility.js +20 -0
- package/dist/esm/utility/object-find-property-descriptor.utility.js.map +1 -0
- package/dist/esm/validator/at-most-one-of-listed-properties.validator.d.ts +5 -0
- package/dist/esm/validator/at-most-one-of-listed-properties.validator.js +21 -0
- package/dist/esm/validator/at-most-one-of-listed-properties.validator.js.map +1 -0
- package/package.json +2 -1
- package/dist/cjs/utility/dto/generate/get-list-query-properties.utility.js.map +0 -1
- package/dist/cjs/utility/dto/generate/get-list-response.utility.js.map +0 -1
- package/dist/esm/utility/dto/generate/get-list-query-properties.utility.js.map +0 -1
- package/dist/esm/utility/dto/generate/get-list-response.utility.js.map +0 -1
- /package/dist/cjs/interface/decorator/api/{get-list-response-result.interface.d.ts → get-list/response-result.interface.d.ts} +0 -0
- /package/dist/esm/interface/decorator/api/{get-list-response-result.interface.d.ts → get-list/response-result.interface.d.ts} +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var safeObjectPropertyNames_constant = require('../../constant/safe-object-property-names.constant.js');
|
|
4
|
+
var exception_utility = require('../error/exception.utility.js');
|
|
3
5
|
var typeorm = require('typeorm');
|
|
4
6
|
|
|
5
7
|
/**
|
|
@@ -10,8 +12,10 @@ var typeorm = require('typeorm');
|
|
|
10
12
|
* @returns {TApiAuthorizationScopeWhere<E>} Combined filter.
|
|
11
13
|
*/
|
|
12
14
|
function AuthorizationScopeMergeWhere(baseWhere, scopedWhere) {
|
|
15
|
+
validateWhereOperand(baseWhere);
|
|
16
|
+
validateWhereOperand(scopedWhere);
|
|
13
17
|
if (!baseWhere) {
|
|
14
|
-
return scopedWhere;
|
|
18
|
+
return scopedWhere ? normalizeWhereOperand(scopedWhere) : scopedWhere;
|
|
15
19
|
}
|
|
16
20
|
if (!scopedWhere) {
|
|
17
21
|
return baseWhere;
|
|
@@ -24,7 +28,11 @@ function AuthorizationScopeMergeWhere(baseWhere, scopedWhere) {
|
|
|
24
28
|
mergedVariants.push(mergeRecordValues(baseVariant, scopedVariant));
|
|
25
29
|
}
|
|
26
30
|
}
|
|
27
|
-
|
|
31
|
+
const mergedWhere = mergedVariants.length === 1 ? mergedVariants[0] : mergedVariants;
|
|
32
|
+
if (!mergedWhere) {
|
|
33
|
+
throw exception_utility.ErrorException("Authorization scope WHERE merge produced no branches");
|
|
34
|
+
}
|
|
35
|
+
return normalizeWhereOperand(mergedWhere);
|
|
28
36
|
}
|
|
29
37
|
/**
|
|
30
38
|
* Compares two where-clause leaf values for semantic equality.
|
|
@@ -33,8 +41,11 @@ function AuthorizationScopeMergeWhere(baseWhere, scopedWhere) {
|
|
|
33
41
|
* @returns {boolean} True when both values represent the same condition.
|
|
34
42
|
*/
|
|
35
43
|
function areValuesEquivalent(left, right) {
|
|
44
|
+
if (left instanceof Date || right instanceof Date) {
|
|
45
|
+
return left instanceof Date && right instanceof Date && left.getTime() === right.getTime();
|
|
46
|
+
}
|
|
36
47
|
if (isFindOperator(left) && isFindOperator(right)) {
|
|
37
|
-
return left
|
|
48
|
+
return left === right;
|
|
38
49
|
}
|
|
39
50
|
if (Array.isArray(left) && Array.isArray(right)) {
|
|
40
51
|
if (left.length !== right.length) {
|
|
@@ -53,118 +64,153 @@ function areValuesEquivalent(left, right) {
|
|
|
53
64
|
return left === right;
|
|
54
65
|
}
|
|
55
66
|
/**
|
|
56
|
-
*
|
|
57
|
-
* @param {unknown}
|
|
58
|
-
* @param {unknown}
|
|
59
|
-
* @returns {
|
|
67
|
+
* Builds a TypeORM conjunction without approximating database operator semantics.
|
|
68
|
+
* @param {unknown} baseValue - Existing scalar or operator.
|
|
69
|
+
* @param {unknown} scopedValue - Scoped scalar or operator.
|
|
70
|
+
* @returns {FindOperator<unknown>} TypeORM `And(...)` operator.
|
|
60
71
|
*/
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
return leftDate - rightDate;
|
|
66
|
-
}
|
|
67
|
-
const leftNumber = normalizeNumberValue(left);
|
|
68
|
-
const rightNumber = normalizeNumberValue(right);
|
|
69
|
-
if (leftNumber !== undefined && rightNumber !== undefined) {
|
|
70
|
-
return leftNumber - rightNumber;
|
|
71
|
-
}
|
|
72
|
-
return toComparableText(left).localeCompare(toComparableText(right));
|
|
72
|
+
function createConjunctionOperator(baseValue, scopedValue) {
|
|
73
|
+
const baseOperator = isFindOperator(baseValue) ? baseValue : typeorm.Equal(baseValue);
|
|
74
|
+
const scopedOperator = isFindOperator(scopedValue) ? scopedValue : typeorm.Equal(scopedValue);
|
|
75
|
+
return typeorm.And(baseOperator, scopedOperator);
|
|
73
76
|
}
|
|
74
77
|
/**
|
|
75
78
|
* Builds a match-nothing FindOperator branch for impossible conflicts.
|
|
76
|
-
* @returns {
|
|
79
|
+
* @returns {FindOperator<unknown>} TypeORM `In([])` operator.
|
|
77
80
|
*/
|
|
78
81
|
function createMatchNothingOperator() {
|
|
79
82
|
return typeorm.In([]);
|
|
80
83
|
}
|
|
81
84
|
/**
|
|
82
|
-
*
|
|
83
|
-
* @param {unknown}
|
|
84
|
-
* @
|
|
85
|
+
* Defines an own enumerable WHERE property without invoking prototype setters.
|
|
86
|
+
* @param {Record<string, unknown>} target - WHERE branch receiving the property.
|
|
87
|
+
* @param {string} key - Entity property name.
|
|
88
|
+
* @param {unknown} value - WHERE condition value.
|
|
89
|
+
* @returns {void}
|
|
85
90
|
*/
|
|
86
|
-
function
|
|
87
|
-
|
|
91
|
+
function defineWhereProperty(target, key, value) {
|
|
92
|
+
Object.defineProperty(target, key, {
|
|
93
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
94
|
+
configurable: true,
|
|
95
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
96
|
+
enumerable: true,
|
|
97
|
+
value,
|
|
98
|
+
// eslint-disable-next-line @elsikora/typescript/naming-convention
|
|
99
|
+
writable: true,
|
|
100
|
+
});
|
|
88
101
|
}
|
|
89
102
|
/**
|
|
90
|
-
*
|
|
91
|
-
* @param {unknown} value - Candidate
|
|
92
|
-
* @returns {
|
|
103
|
+
* Reads a dense array through own data descriptors without invoking accessors.
|
|
104
|
+
* @param {Array<unknown>} value - Candidate array.
|
|
105
|
+
* @returns {Array<unknown> | undefined} Stable item values, or undefined for sparse/extended/accessor arrays.
|
|
93
106
|
*/
|
|
94
|
-
function
|
|
95
|
-
|
|
107
|
+
function getDenseArrayDataValues(value) {
|
|
108
|
+
const ownKeys = Reflect.ownKeys(value);
|
|
109
|
+
const lengthDescriptor = Object.getOwnPropertyDescriptor(value, "length");
|
|
110
|
+
if (ownKeys.length !== value.length + 1 || !lengthDescriptor || lengthDescriptor.enumerable || !("value" in lengthDescriptor) || lengthDescriptor.value !== value.length) {
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
const values = [];
|
|
114
|
+
for (let index = 0; index < value.length; index++) {
|
|
115
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, String(index));
|
|
116
|
+
if (!descriptor?.enumerable || !("value" in descriptor)) {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
values.push(descriptor.value);
|
|
120
|
+
}
|
|
121
|
+
return values;
|
|
96
122
|
}
|
|
97
123
|
/**
|
|
98
|
-
*
|
|
99
|
-
* @param {unknown} value -
|
|
100
|
-
* @
|
|
101
|
-
* @returns {boolean} True when the scalar satisfies the operator.
|
|
124
|
+
* Reads enumerable string-keyed data properties without invoking accessors.
|
|
125
|
+
* @param {Record<string, unknown>} value - Candidate WHERE record.
|
|
126
|
+
* @returns {Array<[string, unknown]> | undefined} Stable entries, or undefined for hidden, symbol, or accessor properties.
|
|
102
127
|
*/
|
|
103
|
-
function
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const end = boundaries[1];
|
|
109
|
-
return compareValues(value, start) >= 0 && compareValues(value, end) <= 0;
|
|
110
|
-
}
|
|
111
|
-
case "equal": {
|
|
112
|
-
return areValuesEquivalent(value, operator._value);
|
|
113
|
-
}
|
|
114
|
-
case "ilike": {
|
|
115
|
-
return matchesLike(value, operator._value, true);
|
|
116
|
-
}
|
|
117
|
-
case "in": {
|
|
118
|
-
const values = Array.isArray(operator._value) ? operator._value : [operator._value];
|
|
119
|
-
return values.some((entry) => (isFindOperator(entry) ? matchesFindOperator(value, entry) : areValuesEquivalent(value, entry)));
|
|
120
|
-
}
|
|
121
|
-
case "isnull": {
|
|
122
|
-
return value === null || value === undefined;
|
|
123
|
-
}
|
|
124
|
-
case "lessThan": {
|
|
125
|
-
return compareValues(value, operator._value) < 0;
|
|
126
|
-
}
|
|
127
|
-
case "lessThanOrEqual": {
|
|
128
|
-
return compareValues(value, operator._value) <= 0;
|
|
128
|
+
function getWhereRecordDataEntries(value) {
|
|
129
|
+
const entries = [];
|
|
130
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
131
|
+
if (typeof key !== "string") {
|
|
132
|
+
return undefined;
|
|
129
133
|
}
|
|
130
|
-
|
|
131
|
-
|
|
134
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
135
|
+
if (!descriptor?.enumerable || !("value" in descriptor)) {
|
|
136
|
+
return undefined;
|
|
132
137
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
+
entries.push([key, descriptor.value]);
|
|
139
|
+
}
|
|
140
|
+
return entries;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Detects whether every declared WHERE property contains a condition TypeORM will not discard.
|
|
144
|
+
* @param {Record<string, unknown>} branch - Plain WHERE branch.
|
|
145
|
+
* @returns {boolean} True when the branch is non-empty and every condition is effective.
|
|
146
|
+
*/
|
|
147
|
+
function hasOnlyEffectiveWherePredicates(branch) {
|
|
148
|
+
const entries = getWhereRecordDataEntries(branch);
|
|
149
|
+
if (!entries?.length) {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
return entries.every(([, value]) => {
|
|
153
|
+
if (value === undefined || value === null) {
|
|
154
|
+
return false;
|
|
138
155
|
}
|
|
139
|
-
|
|
140
|
-
|
|
156
|
+
if (Array.isArray(value)) {
|
|
157
|
+
const arrayValues = getDenseArrayDataValues(value);
|
|
158
|
+
if (!arrayValues) {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
if (arrayValues.length === 0) {
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
const objectBranches = arrayValues.map((branchValue) => isWhereBranchObject(branchValue));
|
|
165
|
+
if (objectBranches.every(Boolean)) {
|
|
166
|
+
return arrayValues.every((branchValue) => hasOnlyEffectiveWherePredicates(branchValue));
|
|
167
|
+
}
|
|
168
|
+
if (objectBranches.some(Boolean)) {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
return arrayValues.every((scalarValue) => scalarValue !== undefined && scalarValue !== null && !Array.isArray(scalarValue) && (isAtomicWhereValue(scalarValue) || ["bigint", "boolean", "number", "string"].includes(typeof scalarValue)));
|
|
141
172
|
}
|
|
142
|
-
|
|
143
|
-
return
|
|
173
|
+
if (isWhereBranchObject(value)) {
|
|
174
|
+
return hasOnlyEffectiveWherePredicates(value);
|
|
144
175
|
}
|
|
145
|
-
|
|
176
|
+
return isAtomicWhereValue(value) || ["bigint", "boolean", "number", "string"].includes(typeof value);
|
|
177
|
+
});
|
|
146
178
|
}
|
|
147
179
|
/**
|
|
148
|
-
*
|
|
149
|
-
* @param {unknown} value -
|
|
150
|
-
* @
|
|
151
|
-
* @param {boolean} isCaseInsensitive - Whether matching should ignore case.
|
|
152
|
-
* @returns {boolean} True when the value matches the pattern.
|
|
180
|
+
* Detects object-shaped values that the normalizer treats as scalar predicates.
|
|
181
|
+
* @param {unknown} value - Candidate WHERE value.
|
|
182
|
+
* @returns {boolean} True for supported atomic object values.
|
|
153
183
|
*/
|
|
154
|
-
function
|
|
155
|
-
|
|
184
|
+
function isAtomicWhereValue(value) {
|
|
185
|
+
return value instanceof Date || isFindOperator(value) || ArrayBuffer.isView(value);
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Detects TypeORM FindOperator-like values without depending on private typings.
|
|
189
|
+
* @param {unknown} value - Candidate value.
|
|
190
|
+
* @returns {boolean} True when the value looks like a FindOperator.
|
|
191
|
+
*/
|
|
192
|
+
function isFindOperator(value) {
|
|
193
|
+
return typeorm.InstanceChecker.isFindOperator(value);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Detects plain record objects that can be merged recursively.
|
|
197
|
+
* @param {unknown} value - Candidate value.
|
|
198
|
+
* @returns {boolean} True when the value is a mergeable record.
|
|
199
|
+
*/
|
|
200
|
+
function isRecord(value) {
|
|
201
|
+
if (!value || typeof value !== "object" || Array.isArray(value) || value instanceof Date || isFindOperator(value)) {
|
|
156
202
|
return false;
|
|
157
203
|
}
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
return
|
|
204
|
+
const prototype = Object.getPrototypeOf(value);
|
|
205
|
+
return prototype === null || prototype === Object.prototype;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Detects object values that TypeORM may interpret as nested relation criteria.
|
|
209
|
+
* @param {unknown} value - Candidate nested WHERE value.
|
|
210
|
+
* @returns {boolean} True when the object must be inspected recursively.
|
|
211
|
+
*/
|
|
212
|
+
function isWhereBranchObject(value) {
|
|
213
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value) && !isAtomicWhereValue(value));
|
|
168
214
|
}
|
|
169
215
|
/**
|
|
170
216
|
* Recursively merges nested record values using logical AND semantics.
|
|
@@ -179,14 +225,14 @@ function mergeRecordValues(baseValue, scopedValue) {
|
|
|
179
225
|
const currentBaseValue = baseValue[key];
|
|
180
226
|
const currentScopedValue = scopedValue[key];
|
|
181
227
|
if (currentBaseValue === undefined) {
|
|
182
|
-
mergedValue
|
|
228
|
+
defineWhereProperty(mergedValue, key, currentScopedValue);
|
|
183
229
|
continue;
|
|
184
230
|
}
|
|
185
231
|
if (currentScopedValue === undefined) {
|
|
186
|
-
mergedValue
|
|
232
|
+
defineWhereProperty(mergedValue, key, currentBaseValue);
|
|
187
233
|
continue;
|
|
188
234
|
}
|
|
189
|
-
mergedValue
|
|
235
|
+
defineWhereProperty(mergedValue, key, mergeWhereValue(currentBaseValue, currentScopedValue));
|
|
190
236
|
}
|
|
191
237
|
return mergedValue;
|
|
192
238
|
}
|
|
@@ -203,64 +249,135 @@ function mergeWhereValue(baseValue, scopedValue) {
|
|
|
203
249
|
if (areValuesEquivalent(baseValue, scopedValue)) {
|
|
204
250
|
return baseValue;
|
|
205
251
|
}
|
|
206
|
-
if (isFindOperator(baseValue)
|
|
207
|
-
return
|
|
208
|
-
}
|
|
209
|
-
if (!isFindOperator(baseValue) && isFindOperator(scopedValue)) {
|
|
210
|
-
return matchesFindOperator(baseValue, scopedValue) ? baseValue : createMatchNothingOperator();
|
|
252
|
+
if (isFindOperator(baseValue) || isFindOperator(scopedValue)) {
|
|
253
|
+
return createConjunctionOperator(baseValue, scopedValue);
|
|
211
254
|
}
|
|
212
255
|
return createMatchNothingOperator();
|
|
213
256
|
}
|
|
214
257
|
/**
|
|
215
|
-
* Normalizes
|
|
216
|
-
* @
|
|
217
|
-
* @
|
|
258
|
+
* Normalizes a validated WHERE operand before TypeORM receives it.
|
|
259
|
+
* @template E - Entity type
|
|
260
|
+
* @param {TApiAuthorizationScopeWhere<E>} value - Validated operand.
|
|
261
|
+
* @returns {TApiAuthorizationScopeWhere<E>} Operand with scalar leaves represented by exact Equal operators.
|
|
218
262
|
*/
|
|
219
|
-
function
|
|
220
|
-
if (value
|
|
221
|
-
return value.
|
|
263
|
+
function normalizeWhereOperand(value) {
|
|
264
|
+
if (Array.isArray(value)) {
|
|
265
|
+
return value.map((branch) => normalizeWhereRecord(branch));
|
|
222
266
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
267
|
+
return normalizeWhereRecord(value);
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Normalizes every value in a WHERE branch without invoking prototype setters.
|
|
271
|
+
* @param {Record<string, unknown>} value - Validated WHERE branch.
|
|
272
|
+
* @returns {Record<string, unknown>} Normalized branch.
|
|
273
|
+
*/
|
|
274
|
+
function normalizeWhereRecord(value) {
|
|
275
|
+
const normalized = {};
|
|
276
|
+
const entries = getWhereRecordDataEntries(value);
|
|
277
|
+
if (!entries) {
|
|
278
|
+
throw exception_utility.ErrorException("Authorization scope WHERE object must contain enumerable data properties only");
|
|
227
279
|
}
|
|
228
|
-
|
|
280
|
+
for (const [key, nestedValue] of entries) {
|
|
281
|
+
defineWhereProperty(normalized, key, normalizeWhereValue(nestedValue));
|
|
282
|
+
}
|
|
283
|
+
return normalized;
|
|
229
284
|
}
|
|
230
285
|
/**
|
|
231
|
-
*
|
|
232
|
-
* @param {unknown} value -
|
|
233
|
-
* @returns {
|
|
286
|
+
* Converts scalar leaves to exact TypeORM equality while retaining relation structure.
|
|
287
|
+
* @param {unknown} value - Validated WHERE value.
|
|
288
|
+
* @returns {unknown} Normalized TypeORM condition.
|
|
234
289
|
*/
|
|
235
|
-
function
|
|
236
|
-
if (
|
|
290
|
+
function normalizeWhereValue(value) {
|
|
291
|
+
if (isFindOperator(value)) {
|
|
237
292
|
return value;
|
|
238
293
|
}
|
|
239
|
-
if (
|
|
240
|
-
|
|
294
|
+
if (Array.isArray(value)) {
|
|
295
|
+
const arrayValues = getDenseArrayDataValues(value);
|
|
296
|
+
if (!arrayValues) {
|
|
297
|
+
throw exception_utility.ErrorException("Authorization scope WHERE arrays must contain dense enumerable data items only");
|
|
298
|
+
}
|
|
299
|
+
if (arrayValues.length === 0) {
|
|
300
|
+
return typeorm.Equal(arrayValues);
|
|
301
|
+
}
|
|
302
|
+
const objectBranches = arrayValues.map((branchValue) => isWhereBranchObject(branchValue));
|
|
303
|
+
return objectBranches.every(Boolean) ? arrayValues.map((branchValue) => normalizeWhereRecord(branchValue)) : typeorm.Equal(arrayValues);
|
|
304
|
+
}
|
|
305
|
+
return isWhereBranchObject(value) ? normalizeWhereRecord(value) : typeorm.Equal(value);
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Rejects array-form WHERE expressions that TypeORM would interpret as unconstrained.
|
|
309
|
+
* @param {unknown} value - Candidate array-form WHERE expression.
|
|
310
|
+
* @returns {void}
|
|
311
|
+
*/
|
|
312
|
+
function validateWhereArray(value) {
|
|
313
|
+
if (!Array.isArray(value)) {
|
|
314
|
+
return;
|
|
241
315
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
316
|
+
const branches = getDenseArrayDataValues(value);
|
|
317
|
+
if (!branches) {
|
|
318
|
+
throw exception_utility.ErrorException("Authorization scope WHERE array branches must be non-empty plain objects");
|
|
319
|
+
}
|
|
320
|
+
if (branches.length === 0) {
|
|
321
|
+
throw exception_utility.ErrorException("Authorization scope WHERE cannot be an empty array");
|
|
322
|
+
}
|
|
323
|
+
if (branches.some((branch) => !isRecord(branch) || !hasOnlyEffectiveWherePredicates(branch))) {
|
|
324
|
+
throw exception_utility.ErrorException("Authorization scope WHERE array branches must be non-empty plain objects");
|
|
325
|
+
}
|
|
326
|
+
for (const branch of branches) {
|
|
327
|
+
validateWhereRecordKeys(branch);
|
|
245
328
|
}
|
|
246
|
-
return undefined;
|
|
247
329
|
}
|
|
248
330
|
/**
|
|
249
|
-
*
|
|
250
|
-
* @param {unknown} value - Candidate
|
|
251
|
-
* @returns {
|
|
331
|
+
* Rejects malformed or non-empty but ineffective scalar WHERE expressions.
|
|
332
|
+
* @param {unknown} value - Candidate WHERE expression.
|
|
333
|
+
* @returns {void}
|
|
252
334
|
*/
|
|
253
|
-
function
|
|
254
|
-
if (
|
|
255
|
-
return
|
|
335
|
+
function validateWhereOperand(value) {
|
|
336
|
+
if (value === undefined) {
|
|
337
|
+
return;
|
|
256
338
|
}
|
|
257
|
-
if (
|
|
258
|
-
|
|
339
|
+
if (Array.isArray(value)) {
|
|
340
|
+
validateWhereArray(value);
|
|
341
|
+
return;
|
|
259
342
|
}
|
|
260
|
-
if (value
|
|
261
|
-
|
|
343
|
+
if (!isRecord(value)) {
|
|
344
|
+
throw exception_utility.ErrorException("Authorization scope WHERE must be undefined, a plain object, or an array of plain objects");
|
|
345
|
+
}
|
|
346
|
+
const entries = getWhereRecordDataEntries(value);
|
|
347
|
+
if (!entries || (entries.length > 0 && !hasOnlyEffectiveWherePredicates(value))) {
|
|
348
|
+
throw exception_utility.ErrorException("Authorization scope WHERE object must contain an effective predicate");
|
|
349
|
+
}
|
|
350
|
+
validateWhereRecordKeys(value);
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Rejects prototype-sensitive entity paths recursively.
|
|
354
|
+
* @param {Record<string, unknown>} value - WHERE branch to inspect.
|
|
355
|
+
* @returns {void}
|
|
356
|
+
*/
|
|
357
|
+
function validateWhereRecordKeys(value) {
|
|
358
|
+
const entries = getWhereRecordDataEntries(value);
|
|
359
|
+
if (!entries) {
|
|
360
|
+
throw exception_utility.ErrorException("Authorization scope WHERE object must contain enumerable data properties only");
|
|
361
|
+
}
|
|
362
|
+
for (const [key, nestedValue] of entries) {
|
|
363
|
+
if (safeObjectPropertyNames_constant.UNSAFE_OBJECT_PROPERTY_NAMES_CONSTANT.has(key)) {
|
|
364
|
+
throw exception_utility.ErrorException(`Authorization scope WHERE property "${key}" is not a safe property name`);
|
|
365
|
+
}
|
|
366
|
+
if (Array.isArray(nestedValue)) {
|
|
367
|
+
const branches = getDenseArrayDataValues(nestedValue);
|
|
368
|
+
if (!branches) {
|
|
369
|
+
throw exception_utility.ErrorException("Authorization scope WHERE arrays must contain dense enumerable data items only");
|
|
370
|
+
}
|
|
371
|
+
for (const branch of branches) {
|
|
372
|
+
if (isWhereBranchObject(branch)) {
|
|
373
|
+
validateWhereRecordKeys(branch);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
else if (isWhereBranchObject(nestedValue)) {
|
|
378
|
+
validateWhereRecordKeys(nestedValue);
|
|
379
|
+
}
|
|
262
380
|
}
|
|
263
|
-
return "";
|
|
264
381
|
}
|
|
265
382
|
|
|
266
383
|
exports.AuthorizationScopeMergeWhere = AuthorizationScopeMergeWhere;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-merge-where.utility.js","sources":["../../../../../src/utility/authorization/scope-merge-where.utility.ts"],"sourcesContent":[null],"names":["In"],"mappings":";;;;AAWA;;;;;;AAMG;AACG,SAAU,4BAA4B,CAA2B,SAAyC,EAAE,WAA2C,EAAA;IAC5J,IAAI,CAAC,SAAS,EAAE;AACf,QAAA,OAAO,WAAW;IACnB;IAEA,IAAI,CAAC,WAAW,EAAE;AACjB,QAAA,OAAO,SAAS;IACjB;AAEA,IAAA,MAAM,YAAY,GAA+B,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,GAAG,CAAC,SAAS,CAAC;AACnG,IAAA,MAAM,cAAc,GAA+B,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,GAAG,CAAC,WAAW,CAAC;IAC3G,MAAM,cAAc,GAA+B,EAAE;AAErD,IAAA,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE;AACvC,QAAA,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE;YAC3C,cAAc,CA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,GAAG,SAAS,GAAG,WAAW;IAC3D;AAEA,IAAA,OAAO,SAAS;AACjB;AAEA;;;;AAIG;AACH,SAAS,gBAAgB,CAAC,KAAc,EAAA;AACvC,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC9B,QAAA,OAAO,KAAK;IACb;AAEA,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;AACzF,QAAA,OAAO,KAAK,CAAC,QAAQ,EAAE;IACxB;AAEA,IAAA,IAAI,KAAK,YAAY,IAAI,EAAE;AAC1B,QAAA,OAAO,KAAK,CAAC,WAAW,EAAE;IAC3B;AAEA,IAAA,OAAO,EAAE;AACV;;;;"}
|
|
1
|
+
{"version":3,"file":"scope-merge-where.utility.js","sources":["../../../../../src/utility/authorization/scope-merge-where.utility.ts"],"sourcesContent":[null],"names":["ErrorException","Equal","And","In","InstanceChecker","UNSAFE_OBJECT_PROPERTY_NAMES_CONSTANT"],"mappings":";;;;;;AAQA;;;;;;AAMG;AACG,SAAU,4BAA4B,CAA2B,SAAyC,EAAE,WAA2C,EAAA;IAC5J,oBAAoB,CAAC,SAAS,CAAC;IAC/B,oBAAoB,CAAC,WAAW,CAAC;IAEjC,IAAI,CAAC,SAAS,EAAE;AACf,QAAA,OAAO,WAAW,GAAG,qBAAqB,CAAC,WAAW,CAAC,GAAG,WAAW;IACtE;IAEA,IAAI,CAAC,WAAW,EAAE;AACjB,QAAA,OAAO,SAAS;IACjB;AAEA,IAAA,MAAM,YAAY,GAA+B,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,GAAG,CAAC,SAAS,CAAC;AACnG,IAAA,MAAM,cAAc,GAA+B,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,GAAG,CAAC,WAAW,CAAC;IAC3G,MAAM,cAAc,GAA+B,EAAE;AAErD,IAAA,KAAK,MAAM,WAAW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CAAC;gBAChC;YACD;QACD;AAAO,aAAA,IAAI,mBAAmB,CAAC,WAAW,CAAC,EAAE;YAC5C,uBAAuB,CAAC,WAAW,CAAC;QACrC;IACD;AACD;;;;"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require('../../enum/decorator/api/action.enum.js');
|
|
4
4
|
require('../../enum/decorator/api/authentication-type.enum.js');
|
|
5
5
|
require('../../enum/decorator/api/controller/get-list/query/filter/missing-behavior.enum.js');
|
|
6
|
+
require('../../enum/decorator/api/controller/get-list/query/pagination-mode.enum.js');
|
|
6
7
|
require('../../enum/decorator/api/controller/get-list/query/unlisted-fields.enum.js');
|
|
7
8
|
require('../../enum/decorator/api/controller/relation-reference-shape.enum.js');
|
|
8
9
|
require('../../enum/decorator/api/controller/request/target.enum.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-decorator.utility.js","sources":["../../../../../src/utility/dto/build-decorator.utility.ts"],"sourcesContent":[null],"names":["DtoIsPropertyExposedForGuard","EApiDtoType","EApiRouteType","DtoIsPropertyInfrastructureTimestamp","EApiPropertyDescribeType","DtoHandleDateProperty","DtoGetDecoratorConfig","DtoGenerateDecorator"],"mappings":"
|
|
1
|
+
{"version":3,"file":"build-decorator.utility.js","sources":["../../../../../src/utility/dto/build-decorator.utility.ts"],"sourcesContent":[null],"names":["DtoIsPropertyExposedForGuard","EApiDtoType","EApiRouteType","DtoIsPropertyInfrastructureTimestamp","EApiPropertyDescribeType","DtoHandleDateProperty","DtoGetDecoratorConfig","DtoGenerateDecorator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA;;;;;;;;;;;;;;AAcG;AACH;AACM,SAAU,iBAAiB,CAAoD,MAAS,EAAE,gBAAgD,EAAE,MAAqB,EAAE,OAAU,EAAE,YAAoB,EAAE,YAA+B,EAAE,aAA6C,EAAA;IAKxR,MAAM,UAAU,GAA2C,gBAAgB,CAAC,UAAU,GAAG,MAAM,CAA2C;AA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AAA,CAAC,CAAC;QACH;IACD;IAEA,MAAM,MAAM,GAAsCD,6CAAqB,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC;AAE1G,IAAA,OAAO,CAACC,sCAAoB,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;AAC9G;;;;"}
|
|
@@ -8,6 +8,7 @@ var generate_constant = require('../../../constant/utility/dto/generate.constant
|
|
|
8
8
|
require('../../../enum/decorator/api/action.enum.js');
|
|
9
9
|
require('../../../enum/decorator/api/authentication-type.enum.js');
|
|
10
10
|
require('../../../enum/decorator/api/controller/get-list/query/filter/missing-behavior.enum.js');
|
|
11
|
+
var paginationMode_enum = require('../../../enum/decorator/api/controller/get-list/query/pagination-mode.enum.js');
|
|
11
12
|
require('../../../enum/decorator/api/controller/get-list/query/unlisted-fields.enum.js');
|
|
12
13
|
require('../../../enum/decorator/api/controller/relation-reference-shape.enum.js');
|
|
13
14
|
require('../../../enum/decorator/api/controller/request/target.enum.js');
|
|
@@ -33,6 +34,7 @@ require('../../../enum/decorator/api/property/string-type.enum.js');
|
|
|
33
34
|
require('../../../enum/decorator/api/route/subscriber-authorization-expectation.enum.js');
|
|
34
35
|
var type_enum = require('../../../enum/decorator/api/route/type.enum.js');
|
|
35
36
|
var swagger = require('@nestjs/swagger');
|
|
37
|
+
var getPaginationMode_utility = require('../../api/controller/get-list/query/get-pagination-mode.utility.js');
|
|
36
38
|
var camelCaseString_utility = require('../../camel-case-string.utility.js');
|
|
37
39
|
var pop_utility = require('../auto/context/pop.utility.js');
|
|
38
40
|
var push_utility = require('../auto/context/push.utility.js');
|
|
@@ -40,12 +42,14 @@ var buildDecorator_utility = require('../build-decorator.utility.js');
|
|
|
40
42
|
var cacheKey_utility = require('./cache-key.utility.js');
|
|
41
43
|
var dynamic_utility = require('./dynamic.utility.js');
|
|
42
44
|
var filterDecorator_utility = require('./filter-decorator.utility.js');
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
+
var cursorResponse_utility = require('./get-list/cursor-response.utility.js');
|
|
46
|
+
var queryProperties_utility = require('./get-list/query-properties.utility.js');
|
|
47
|
+
var response_utility = require('./get-list/response.utility.js');
|
|
45
48
|
var getListQueryBaseClass_utility = require('../get/get-list-query-base-class.utility.js');
|
|
46
49
|
var shouldBeMarked_utility = require('../is/property/should-be-marked.utility.js');
|
|
47
50
|
var shouldBeGenerated_utility = require('../is/should-be-generated.utility.js');
|
|
48
51
|
var exception_utility = require('../../error/exception.utility.js');
|
|
52
|
+
var atMostOneOfListedProperties_validator = require('../../../validator/at-most-one-of-listed-properties.validator.js');
|
|
49
53
|
var pairedCustomSuffixesFields_validator = require('../../../validator/has/paired-custom-suffixes-fields.validator.js');
|
|
50
54
|
var classTransformer = require('class-transformer');
|
|
51
55
|
var classValidator = require('class-validator');
|
|
@@ -70,14 +74,16 @@ function DtoGenerate(entity, entityMetadata, method, dtoType, dtoConfig, current
|
|
|
70
74
|
if (!shouldBeGenerated_utility.DtoIsShouldBeGenerated(method, dtoType)) {
|
|
71
75
|
return undefined;
|
|
72
76
|
}
|
|
77
|
+
const isGetListResponse = method === type_enum.EApiRouteType.GET_LIST && dtoType === dtoType_enum.EApiDtoType.RESPONSE;
|
|
78
|
+
const isCursorGetListResponse = isGetListResponse && getPaginationMode_utility.ApiControllerGetListQueryGetPaginationMode(queryPlan) === paginationMode_enum.EApiControllerGetListQueryPaginationMode.CURSOR;
|
|
73
79
|
const cacheKey = cacheKey_utility.DtoGenerateCacheKey({
|
|
74
|
-
controllerName: queryPlan?.controllerName,
|
|
80
|
+
controllerName: isCursorGetListResponse ? undefined : queryPlan?.controllerName,
|
|
75
81
|
dtoConfig,
|
|
76
82
|
dtoType,
|
|
77
83
|
entityName: String(entityMetadata.name),
|
|
78
84
|
guardName: currentGuard?.name,
|
|
79
85
|
method,
|
|
80
|
-
queryPlanSignature: queryPlan?.signature,
|
|
86
|
+
queryPlanSignature: isCursorGetListResponse ? paginationMode_enum.EApiControllerGetListQueryPaginationMode.CURSOR : queryPlan?.signature,
|
|
81
87
|
});
|
|
82
88
|
const cached = dtoGenerateCache.get(cacheKey);
|
|
83
89
|
if (cached) {
|
|
@@ -98,7 +104,7 @@ function DtoGenerate(entity, entityMetadata, method, dtoType, dtoConfig, current
|
|
|
98
104
|
});
|
|
99
105
|
}
|
|
100
106
|
}
|
|
101
|
-
const queryFilterProperties = method === type_enum.EApiRouteType.GET_LIST && dtoType === dtoType_enum.EApiDtoType.QUERY ?
|
|
107
|
+
const queryFilterProperties = method === type_enum.EApiRouteType.GET_LIST && dtoType === dtoType_enum.EApiDtoType.QUERY ? queryProperties_utility.DtoGenerateGetListQueryProperties(entityMetadata, markedProperties, currentGuard, queryPlan) : [];
|
|
102
108
|
const BaseClass = method === type_enum.EApiRouteType.GET_LIST && dtoType === dtoType_enum.EApiDtoType.QUERY ? getListQueryBaseClass_utility.DtoGetGetListQueryBaseClass(entity, entityMetadata, method, dtoType, queryPlan) : class {
|
|
103
109
|
};
|
|
104
110
|
const isTypedFilterPlan = method === type_enum.EApiRouteType.GET_LIST && dtoType === dtoType_enum.EApiDtoType.QUERY && queryPlan !== undefined && !queryPlan.filter.isLegacy;
|
|
@@ -237,12 +243,18 @@ function DtoGenerate(entity, entityMetadata, method, dtoType, dtoConfig, current
|
|
|
237
243
|
writable: true,
|
|
238
244
|
});
|
|
239
245
|
classValidator.Validate(pairedCustomSuffixesFields_validator.HasPairedCustomSuffixesFieldsValidator, ["operator", ["value", "values"]])(GeneratedDTO.prototype, "object");
|
|
246
|
+
if (getPaginationMode_utility.ApiControllerGetListQueryGetPaginationMode(queryPlan) === paginationMode_enum.EApiControllerGetListQueryPaginationMode.CURSOR) {
|
|
247
|
+
classValidator.Validate(atMostOneOfListedProperties_validator.AtMostOneOfListedPropertiesValidator, ["after", "before"])(GeneratedDTO.prototype, "object");
|
|
248
|
+
}
|
|
240
249
|
}
|
|
241
250
|
if (extraModels.length > 0) {
|
|
242
251
|
swagger.ApiExtraModels(...extraModels)(GeneratedDTO);
|
|
243
252
|
}
|
|
244
|
-
|
|
245
|
-
|
|
253
|
+
let result = GeneratedDTO;
|
|
254
|
+
if (method === type_enum.EApiRouteType.GET_LIST && dtoType === dtoType_enum.EApiDtoType.RESPONSE) {
|
|
255
|
+
// @ts-ignore The generated entity/DTO constructors satisfy the wrapper generator at runtime.
|
|
256
|
+
result = getPaginationMode_utility.ApiControllerGetListQueryGetPaginationMode(queryPlan) === paginationMode_enum.EApiControllerGetListQueryPaginationMode.CURSOR ? cursorResponse_utility.DtoGenerateGetListCursorResponse(entity, GeneratedDTO, `${entityMetadata.name ?? "UnknownResource"}${camelCaseString_utility.CamelCaseString(method)}Cursor${camelCaseString_utility.CamelCaseString(dtoType)}ItemsDTO`) : response_utility.DtoGenerateGetListResponse(entity, GeneratedDTO, `${entityMetadata.name ?? "UnknownResource"}${camelCaseString_utility.CamelCaseString(method)}${camelCaseString_utility.CamelCaseString(dtoType)}ItemsDTO`);
|
|
257
|
+
}
|
|
246
258
|
dtoGenerateCache.set(cacheKey, result);
|
|
247
259
|
return result;
|
|
248
260
|
}
|