@elsikora/nestjs-crud-automator 3.0.2-dev.1 → 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,8 +1,15 @@
|
|
|
1
|
+
import '../../../../class/api/controller/generated/get-many-contract.class.js';
|
|
2
|
+
import { ApiControllerGeneratedReadScopeStorage } from '../../../../class/api/controller/generated/read-scope-storage.class.js';
|
|
3
|
+
import 'node:buffer';
|
|
4
|
+
import { ApiControllerGeneratedFunctionCapability } from '../../../../class/api/controller/generated/function-capability.class.js';
|
|
5
|
+
import { ApiControllerGeneratedRelationCacheContract } from '../../../../class/api/controller/generated/relation-cache-contract.class.js';
|
|
6
|
+
import { ApiControllerGeneratedWriteHydrationContract } from '../../../../class/api/controller/generated/write-hydration-contract.class.js';
|
|
1
7
|
import { ApiFunctionContextStorage } from '../../../../class/api/function/context-storage.class.js';
|
|
2
8
|
import { ApiSubscriberExecutor } from '../../../../class/api/subscriber/executor.class.js';
|
|
3
9
|
import '../../../../enum/decorator/api/action.enum.js';
|
|
4
10
|
import '../../../../enum/decorator/api/authentication-type.enum.js';
|
|
5
11
|
import '../../../../enum/decorator/api/controller/get-list/query/filter/missing-behavior.enum.js';
|
|
12
|
+
import '../../../../enum/decorator/api/controller/get-list/query/pagination-mode.enum.js';
|
|
6
13
|
import '../../../../enum/decorator/api/controller/get-list/query/unlisted-fields.enum.js';
|
|
7
14
|
import '../../../../enum/decorator/api/controller/relation-reference-shape.enum.js';
|
|
8
15
|
import '../../../../enum/decorator/api/controller/request/target.enum.js';
|
|
@@ -52,30 +59,45 @@ function ApiFunctionGet(properties) {
|
|
|
52
59
|
const transactionMode = properties.transaction?.mode ?? EApiFunctionTransactionMode.SUPPORTS;
|
|
53
60
|
return function (_target, propertyKey, descriptor) {
|
|
54
61
|
descriptor.value = async function (getProperties) {
|
|
62
|
+
const mandatoryWhere = ApiControllerGeneratedReadScopeStorage.claim(EApiFunctionType.GET, getProperties);
|
|
63
|
+
const isWriteHydration = mandatoryWhere ? ApiControllerGeneratedReadScopeStorage.isWriteHydration(EApiFunctionType.GET, getProperties) : false;
|
|
55
64
|
return await ApiFunctionExecuteWithTransaction({
|
|
56
65
|
callback: async (eventManager) => {
|
|
57
66
|
const entityInstance = new entity();
|
|
58
67
|
const repository = eventManager ? eventManager.getRepository(entity) : this.repository;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
FUNCTION_TYPE: EApiFunctionType.GET,
|
|
63
|
-
result: getProperties,
|
|
64
|
-
};
|
|
65
|
-
const result = await ApiSubscriberExecutor.executeFunctionBeforeSubscribers(this.constructor, entityInstance, EApiFunctionType.GET, executionContext);
|
|
66
|
-
if (result) {
|
|
67
|
-
executionContext.result = result;
|
|
68
|
-
}
|
|
69
|
-
if (!repository) {
|
|
70
|
-
const errorExecutionContext = {
|
|
68
|
+
let finalProperties;
|
|
69
|
+
try {
|
|
70
|
+
const executionContext = {
|
|
71
71
|
DATA: { eventManager, getProperties, repository },
|
|
72
72
|
ENTITY: entityInstance,
|
|
73
73
|
FUNCTION_TYPE: EApiFunctionType.GET,
|
|
74
|
+
result: getProperties,
|
|
74
75
|
};
|
|
75
|
-
await ApiSubscriberExecutor.
|
|
76
|
-
|
|
76
|
+
const result = await ApiSubscriberExecutor.executeFunctionBeforeSubscribers(this.constructor, entityInstance, EApiFunctionType.GET, executionContext);
|
|
77
|
+
if (result) {
|
|
78
|
+
executionContext.result = result;
|
|
79
|
+
}
|
|
80
|
+
if (!repository) {
|
|
81
|
+
throw ErrorException("Repository is not available in this context");
|
|
82
|
+
}
|
|
83
|
+
const subscriberProperties = executionContext.result ?? {};
|
|
84
|
+
finalProperties = mandatoryWhere ? ApiControllerGeneratedReadScopeStorage.protect(subscriberProperties, mandatoryWhere) : subscriberProperties;
|
|
85
|
+
if (mandatoryWhere) {
|
|
86
|
+
ApiControllerGeneratedRelationCacheContract.assertSafe(repository, finalProperties);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
catch (caughtError) {
|
|
90
|
+
if (mandatoryWhere || !repository) {
|
|
91
|
+
const errorExecutionContext = {
|
|
92
|
+
DATA: { eventManager, getProperties, repository },
|
|
93
|
+
ENTITY: entityInstance,
|
|
94
|
+
FUNCTION_TYPE: EApiFunctionType.GET,
|
|
95
|
+
};
|
|
96
|
+
await ApiSubscriberExecutor.executeFunctionErrorSubscribers(this.constructor, entityInstance, EApiFunctionType.GET, EApiSubscriberOnType.BEFORE_ERROR, errorExecutionContext, caughtError);
|
|
97
|
+
}
|
|
98
|
+
throw caughtError;
|
|
77
99
|
}
|
|
78
|
-
return executor({ constructor: this.constructor, entity, properties:
|
|
100
|
+
return executor({ constructor: this.constructor, entity, properties: finalProperties, repository }, isWriteHydration);
|
|
79
101
|
},
|
|
80
102
|
entity,
|
|
81
103
|
functionType: EApiFunctionType.GET,
|
|
@@ -95,6 +117,7 @@ function ApiFunctionGet(properties) {
|
|
|
95
117
|
serviceConstructor: this.constructor,
|
|
96
118
|
});
|
|
97
119
|
};
|
|
120
|
+
ApiControllerGeneratedFunctionCapability.mark(descriptor.value, EApiFunctionType.GET, entity);
|
|
98
121
|
return descriptor;
|
|
99
122
|
};
|
|
100
123
|
}
|
|
@@ -102,11 +125,12 @@ function ApiFunctionGet(properties) {
|
|
|
102
125
|
* Executes the single entity retrieval operation with error handling
|
|
103
126
|
* @template E The entity type
|
|
104
127
|
* @param {IApiFunctionGetExecutorProperties<E>} options - Properties required for entity retrieval
|
|
128
|
+
* @param {boolean} isWriteHydration - Whether the GET hydrates a generated mutation target
|
|
105
129
|
* @returns {Promise<E>} The retrieved entity instance
|
|
106
130
|
* @throws {NotFoundException} If the entity is not found
|
|
107
131
|
* @throws {InternalServerErrorException} If the retrieval operation fails
|
|
108
132
|
*/
|
|
109
|
-
async function executor(options) {
|
|
133
|
+
async function executor(options, isWriteHydration) {
|
|
110
134
|
const { constructor, entity, properties, repository } = options;
|
|
111
135
|
const eventManager = ApiFunctionContextStorage.getEventManager();
|
|
112
136
|
try {
|
|
@@ -114,13 +138,23 @@ async function executor(options) {
|
|
|
114
138
|
if (!item) {
|
|
115
139
|
throw new NotFoundException(ErrorString({ entity, type: EErrorStringAction.NOT_FOUND }));
|
|
116
140
|
}
|
|
141
|
+
const repositoryMetadata = repository.metadata;
|
|
142
|
+
const relationMetadata = repositoryMetadata?.relations ?? [];
|
|
143
|
+
const allowedHydrationAccessors = new Set(isWriteHydration ? relationMetadata.filter((relation) => relation.isLazy).map((relation) => relation.propertyName) : []);
|
|
144
|
+
const rawHydrationSnapshot = isWriteHydration ? ApiControllerGeneratedWriteHydrationContract.createSnapshot(item, allowedHydrationAccessors) : undefined;
|
|
145
|
+
const subscriberItem = isWriteHydration ? ApiControllerGeneratedWriteHydrationContract.createSnapshot(item, allowedHydrationAccessors) : item;
|
|
146
|
+
const subscriberHydrationSnapshot = isWriteHydration ? ApiControllerGeneratedWriteHydrationContract.createSnapshot(subscriberItem, allowedHydrationAccessors) : undefined;
|
|
117
147
|
const executionContext = {
|
|
118
148
|
DATA: { eventManager, properties, repository },
|
|
119
|
-
ENTITY:
|
|
149
|
+
ENTITY: subscriberItem,
|
|
120
150
|
FUNCTION_TYPE: EApiFunctionType.GET,
|
|
121
|
-
result:
|
|
151
|
+
result: subscriberItem,
|
|
122
152
|
};
|
|
123
|
-
const afterResult = await ApiSubscriberExecutor.executeFunctionSubscribers(constructor,
|
|
153
|
+
const afterResult = await ApiSubscriberExecutor.executeFunctionSubscribers(constructor, subscriberItem, EApiFunctionType.GET, EApiSubscriberOnType.AFTER, executionContext);
|
|
154
|
+
if (isWriteHydration && rawHydrationSnapshot && subscriberHydrationSnapshot) {
|
|
155
|
+
ApiControllerGeneratedWriteHydrationContract.assertUnchanged(item, rawHydrationSnapshot, subscriberItem, subscriberHydrationSnapshot, afterResult, allowedHydrationAccessors);
|
|
156
|
+
return item;
|
|
157
|
+
}
|
|
124
158
|
if (afterResult) {
|
|
125
159
|
return afterResult;
|
|
126
160
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorator.js","sources":["../../../../../../../src/decorator/api/function/get/decorator.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"decorator.js","sources":["../../../../../../../src/decorator/api/function/get/decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;;;;;;AAMG;AACG,SAAU,cAAc,CAA2B,UAAqC,EAAA;AAC7F,IAAA,MAAM,EAAE,MAAM,EAAE,GAA8B,UAAU;IACxD,MAAM,eAAe,GAAgC,UAAU,CAAC,WAAW,EAAE,IAAI,IAAI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-1,8 +1,14 @@
|
|
|
1
|
+
import '../../../../class/api/controller/generated/get-many-contract.class.js';
|
|
2
|
+
import { ApiControllerGeneratedReadScopeStorage } from '../../../../class/api/controller/generated/read-scope-storage.class.js';
|
|
3
|
+
import 'node:buffer';
|
|
4
|
+
import { ApiControllerGeneratedFunctionCapability } from '../../../../class/api/controller/generated/function-capability.class.js';
|
|
5
|
+
import { ApiControllerGeneratedRelationCacheContract } from '../../../../class/api/controller/generated/relation-cache-contract.class.js';
|
|
1
6
|
import { ApiFunctionContextStorage } from '../../../../class/api/function/context-storage.class.js';
|
|
2
7
|
import { ApiSubscriberExecutor } from '../../../../class/api/subscriber/executor.class.js';
|
|
3
8
|
import '../../../../enum/decorator/api/action.enum.js';
|
|
4
9
|
import '../../../../enum/decorator/api/authentication-type.enum.js';
|
|
5
10
|
import '../../../../enum/decorator/api/controller/get-list/query/filter/missing-behavior.enum.js';
|
|
11
|
+
import '../../../../enum/decorator/api/controller/get-list/query/pagination-mode.enum.js';
|
|
6
12
|
import '../../../../enum/decorator/api/controller/get-list/query/unlisted-fields.enum.js';
|
|
7
13
|
import '../../../../enum/decorator/api/controller/relation-reference-shape.enum.js';
|
|
8
14
|
import '../../../../enum/decorator/api/controller/request/target.enum.js';
|
|
@@ -52,30 +58,44 @@ function ApiFunctionGetList(properties) {
|
|
|
52
58
|
const transactionMode = properties.transaction?.mode ?? EApiFunctionTransactionMode.SUPPORTS;
|
|
53
59
|
return function (_target, propertyKey, descriptor) {
|
|
54
60
|
descriptor.value = async function (getListProperties) {
|
|
61
|
+
const mandatoryWhere = ApiControllerGeneratedReadScopeStorage.claim(EApiFunctionType.GET_LIST, getListProperties);
|
|
55
62
|
return await ApiFunctionExecuteWithTransaction({
|
|
56
63
|
callback: async (eventManager) => {
|
|
57
64
|
const entityInstance = new entity();
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
const result = await ApiSubscriberExecutor.executeFunctionBeforeSubscribers(this.constructor, entityInstance, EApiFunctionType.GET_LIST, executionContext);
|
|
65
|
-
if (result) {
|
|
66
|
-
executionContext.result = result;
|
|
67
|
-
}
|
|
68
|
-
const repository = this.repository;
|
|
69
|
-
if (!repository) {
|
|
70
|
-
const errorExecutionContext = {
|
|
71
|
-
DATA: { eventManager, getListProperties, repository: this.repository },
|
|
65
|
+
const repository = eventManager ? eventManager.getRepository(entity) : this.repository;
|
|
66
|
+
let finalProperties;
|
|
67
|
+
try {
|
|
68
|
+
const executionContext = {
|
|
69
|
+
DATA: { eventManager, getListProperties, repository },
|
|
72
70
|
ENTITY: entityInstance,
|
|
73
71
|
FUNCTION_TYPE: EApiFunctionType.GET_LIST,
|
|
72
|
+
result: getListProperties,
|
|
74
73
|
};
|
|
75
|
-
await ApiSubscriberExecutor.
|
|
76
|
-
|
|
74
|
+
const result = await ApiSubscriberExecutor.executeFunctionBeforeSubscribers(this.constructor, entityInstance, EApiFunctionType.GET_LIST, executionContext);
|
|
75
|
+
if (result) {
|
|
76
|
+
executionContext.result = result;
|
|
77
|
+
}
|
|
78
|
+
if (!repository) {
|
|
79
|
+
throw ErrorException("Repository is not available in this context");
|
|
80
|
+
}
|
|
81
|
+
const subscriberProperties = executionContext.result ?? {};
|
|
82
|
+
finalProperties = mandatoryWhere ? ApiControllerGeneratedReadScopeStorage.protect(subscriberProperties, mandatoryWhere) : subscriberProperties;
|
|
83
|
+
if (mandatoryWhere) {
|
|
84
|
+
ApiControllerGeneratedRelationCacheContract.assertSafe(repository, finalProperties);
|
|
85
|
+
}
|
|
77
86
|
}
|
|
78
|
-
|
|
87
|
+
catch (caughtError) {
|
|
88
|
+
if (mandatoryWhere || !repository) {
|
|
89
|
+
const errorExecutionContext = {
|
|
90
|
+
DATA: { eventManager, getListProperties, repository },
|
|
91
|
+
ENTITY: entityInstance,
|
|
92
|
+
FUNCTION_TYPE: EApiFunctionType.GET_LIST,
|
|
93
|
+
};
|
|
94
|
+
await ApiSubscriberExecutor.executeFunctionErrorSubscribers(this.constructor, entityInstance, EApiFunctionType.GET_LIST, EApiSubscriberOnType.BEFORE_ERROR, errorExecutionContext, caughtError);
|
|
95
|
+
}
|
|
96
|
+
throw caughtError;
|
|
97
|
+
}
|
|
98
|
+
return executor({ constructor: this.constructor, entity, properties: finalProperties, repository });
|
|
79
99
|
},
|
|
80
100
|
entity,
|
|
81
101
|
functionType: EApiFunctionType.GET_LIST,
|
|
@@ -83,8 +103,9 @@ function ApiFunctionGetList(properties) {
|
|
|
83
103
|
mode: transactionMode,
|
|
84
104
|
onPreflightError: async (eventManager, error) => {
|
|
85
105
|
const entityInstance = new entity();
|
|
106
|
+
const repository = eventManager ? eventManager.getRepository(entity) : this.repository;
|
|
86
107
|
const errorExecutionContext = {
|
|
87
|
-
DATA: { eventManager, getListProperties, repository
|
|
108
|
+
DATA: { eventManager, getListProperties, repository },
|
|
88
109
|
ENTITY: entityInstance,
|
|
89
110
|
FUNCTION_TYPE: EApiFunctionType.GET_LIST,
|
|
90
111
|
};
|
|
@@ -94,6 +115,7 @@ function ApiFunctionGetList(properties) {
|
|
|
94
115
|
serviceConstructor: this.constructor,
|
|
95
116
|
});
|
|
96
117
|
};
|
|
118
|
+
ApiControllerGeneratedFunctionCapability.mark(descriptor.value, EApiFunctionType.GET_LIST, entity);
|
|
97
119
|
return descriptor;
|
|
98
120
|
};
|
|
99
121
|
}
|
|
@@ -124,15 +146,7 @@ async function executor(options) {
|
|
|
124
146
|
const { constructor, entity, properties, repository } = options;
|
|
125
147
|
const eventManager = ApiFunctionContextStorage.getEventManager();
|
|
126
148
|
try {
|
|
127
|
-
|
|
128
|
-
let totalCount;
|
|
129
|
-
if (eventManager) {
|
|
130
|
-
const eventRepository = eventManager.getRepository(entity);
|
|
131
|
-
[items, totalCount] = await eventRepository.findAndCount(properties);
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
[items, totalCount] = await repository.findAndCount(properties);
|
|
135
|
-
}
|
|
149
|
+
const [items, totalCount] = await repository.findAndCount(properties);
|
|
136
150
|
const result = {
|
|
137
151
|
count: items.length,
|
|
138
152
|
currentPage: calculateCurrentPage(properties, items.length),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.decorator.js","sources":["../../../../../../../src/decorator/api/function/get/list.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.decorator.js","sources":["../../../../../../../src/decorator/api/function/get/list.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;;;;;;AAMG;AACG,SAAU,kBAAkB,CAA2B,UAAqC,EAAA;AACjG,IAAA,MAAM,EAAE,MAAM,EAAE,GAA8B,UAAU;IACxD,MAAM,eAAe,GAAgC,UAAU,CAAC,WAAW,EAAE,IAAI,IAAI,2BAA2B,CAAC,QAAQ;AAEzH,IAAA,OAAO,UAAU,OAAgB,EAAE,WAAmB,EAAE,UAA8B,EAAA;AACrF,QAAA,UAAU,CAAC,KAAK,GAAG,gBAAqD,iBAAmD,EAAA;AAC1H,YAAA,MAAM,cAAc,GAA+C,sCAAsC,CAAC,KAAK,CAAI,gBAAgB,CAAC,QAAQ,EAAE,iBAAiB,CAAC;YAEhK,OAAO,MAAM,iCAAiC,CAAC;AAC9C,gBAAA,QAAQ,EAAE,OAAO,YAAuC,KAA2C;AAClG,oBAAA,MAAM,cAAc,GAAM,IAAI,MAAM,EAAE;AACtC,oBAAA,MAAM,UAAU,GAAkB,YAAY,GAAG,YAAY,CAAC,aAAa,CAAI,MAAM,CAAC,GAAG,IAAI,CAAC,UAAU;AACxG,oBAAA,IAAI,eAAiD;AAErD,oBAAA,IAAI;AACH,wBAAA,MAAM,gBAAgB,GAAgF;AACrG,4BAAA,IAAI,EAAE,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE;AACrD,4BAAA,MAAM,EAAE,cAAc;4BACtB,aAAa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AAA,CAAC,EACF,EAAE,KAAK,EAAE,WAAW,EAAE,CACtB;IACF;AACD;;;;"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import { ApiControllerGeneratedGetManyContract } from '../../../../class/api/controller/generated/get-many-contract.class.js';
|
|
2
|
+
import { ApiControllerGeneratedReadScopeStorage } from '../../../../class/api/controller/generated/read-scope-storage.class.js';
|
|
3
|
+
import 'node:buffer';
|
|
4
|
+
import { ApiControllerGeneratedFunctionCapability } from '../../../../class/api/controller/generated/function-capability.class.js';
|
|
5
|
+
import { ApiControllerGeneratedRelationCacheContract } from '../../../../class/api/controller/generated/relation-cache-contract.class.js';
|
|
6
|
+
import { ApiControllerGetListCursorRuntime } from '../../../../class/api/controller/get-list/cursor/runtime.class.js';
|
|
1
7
|
import { ApiFunctionContextStorage } from '../../../../class/api/function/context-storage.class.js';
|
|
2
8
|
import { ApiSubscriberExecutor } from '../../../../class/api/subscriber/executor.class.js';
|
|
3
9
|
import '../../../../enum/decorator/api/action.enum.js';
|
|
4
10
|
import '../../../../enum/decorator/api/authentication-type.enum.js';
|
|
5
11
|
import '../../../../enum/decorator/api/controller/get-list/query/filter/missing-behavior.enum.js';
|
|
12
|
+
import '../../../../enum/decorator/api/controller/get-list/query/pagination-mode.enum.js';
|
|
6
13
|
import '../../../../enum/decorator/api/controller/get-list/query/unlisted-fields.enum.js';
|
|
7
14
|
import '../../../../enum/decorator/api/controller/relation-reference-shape.enum.js';
|
|
8
15
|
import '../../../../enum/decorator/api/controller/request/target.enum.js';
|
|
@@ -52,30 +59,44 @@ function ApiFunctionGetMany(properties) {
|
|
|
52
59
|
const transactionMode = properties.transaction?.mode ?? EApiFunctionTransactionMode.SUPPORTS;
|
|
53
60
|
return function (_target, propertyKey, descriptor) {
|
|
54
61
|
descriptor.value = async function (getManyProperties) {
|
|
62
|
+
const mandatoryWhere = ApiControllerGeneratedReadScopeStorage.claim(EApiFunctionType.GET_MANY, getManyProperties);
|
|
63
|
+
const isGeneratedCursorCall = ApiControllerGeneratedGetManyContract.hasActiveSession();
|
|
55
64
|
return await ApiFunctionExecuteWithTransaction({
|
|
56
65
|
callback: async (eventManager) => {
|
|
57
66
|
const entityInstance = new entity();
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
let repository = this.repository;
|
|
68
|
+
let finalProperties;
|
|
69
|
+
let isBeforeResolved = false;
|
|
70
|
+
let mandatoryProperties;
|
|
71
|
+
try {
|
|
72
|
+
mandatoryProperties = mandatoryWhere ? ApiControllerGeneratedGetManyContract.createSnapshot(getManyProperties) : undefined;
|
|
73
|
+
const beforeSubscriber = (executeBeforeSubscribers).bind(undefined, this.constructor, entityInstance, eventManager, repository);
|
|
74
|
+
const subscriberProperties = mandatoryWhere ? await ApiControllerGeneratedGetManyContract.resolveBefore(getManyProperties, beforeSubscriber) : await beforeSubscriber(getManyProperties);
|
|
75
|
+
isBeforeResolved = true;
|
|
76
|
+
repository = isGeneratedCursorCall ? repository : this.repository;
|
|
77
|
+
if (!repository) {
|
|
78
|
+
throw ErrorException("Repository is not available in this context");
|
|
79
|
+
}
|
|
80
|
+
const scopedProperties = mandatoryWhere && !ApiControllerGeneratedGetManyContract.hasActiveSession() ? ApiControllerGeneratedReadScopeStorage.protect(subscriberProperties, mandatoryWhere) : subscriberProperties;
|
|
81
|
+
finalProperties = mandatoryProperties ? ApiControllerGeneratedGetManyContract.protect(scopedProperties, mandatoryProperties) : scopedProperties;
|
|
82
|
+
if (mandatoryWhere) {
|
|
83
|
+
const generatedRepository = eventManager ? eventManager.getRepository(entity) : repository;
|
|
84
|
+
ApiControllerGeneratedRelationCacheContract.assertSafe(generatedRepository, finalProperties);
|
|
85
|
+
}
|
|
67
86
|
}
|
|
68
|
-
|
|
69
|
-
|
|
87
|
+
catch (caughtError) {
|
|
88
|
+
if (!ApiControllerGeneratedGetManyContract.hasActiveSession() && !isBeforeResolved) {
|
|
89
|
+
throw caughtError;
|
|
90
|
+
}
|
|
70
91
|
const errorExecutionContext = {
|
|
71
|
-
DATA: { eventManager, getManyProperties, repository
|
|
92
|
+
DATA: { eventManager, getManyProperties, repository },
|
|
72
93
|
ENTITY: entityInstance,
|
|
73
94
|
FUNCTION_TYPE: EApiFunctionType.GET_MANY,
|
|
74
95
|
};
|
|
75
|
-
await ApiSubscriberExecutor.executeFunctionErrorSubscribers(this.constructor, entityInstance, EApiFunctionType.GET_MANY, EApiSubscriberOnType.BEFORE_ERROR, errorExecutionContext,
|
|
76
|
-
throw
|
|
96
|
+
await ApiSubscriberExecutor.executeFunctionErrorSubscribers(this.constructor, entityInstance, EApiFunctionType.GET_MANY, EApiSubscriberOnType.BEFORE_ERROR, errorExecutionContext, caughtError);
|
|
97
|
+
throw caughtError;
|
|
77
98
|
}
|
|
78
|
-
return executor({ constructor: this.constructor, entity, properties:
|
|
99
|
+
return executor({ constructor: this.constructor, entity, properties: finalProperties, repository }, mandatoryProperties);
|
|
79
100
|
},
|
|
80
101
|
entity,
|
|
81
102
|
functionType: EApiFunctionType.GET_MANY,
|
|
@@ -94,17 +115,42 @@ function ApiFunctionGetMany(properties) {
|
|
|
94
115
|
serviceConstructor: this.constructor,
|
|
95
116
|
});
|
|
96
117
|
};
|
|
118
|
+
ApiControllerGeneratedFunctionCapability.mark(descriptor.value, EApiFunctionType.GET_MANY, entity);
|
|
97
119
|
return descriptor;
|
|
98
120
|
};
|
|
99
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Executes GET_MANY BEFORE subscribers for one property snapshot.
|
|
124
|
+
* @template E The entity type
|
|
125
|
+
* @param {new (...arguments_: Array<unknown>) => unknown} constructor - Service constructor
|
|
126
|
+
* @param {E} entityInstance - Subscriber entity context
|
|
127
|
+
* @param {EntityManager} eventManager - Active transaction manager
|
|
128
|
+
* @param {Repository<E>} repository - Service repository
|
|
129
|
+
* @param {TApiFunctionGetManyProperties<E>} getManyProperties - Properties exposed to the subscriber
|
|
130
|
+
* @returns {Promise<TApiFunctionGetManyProperties<E>>} Subscriber-selected properties
|
|
131
|
+
*/
|
|
132
|
+
async function executeBeforeSubscribers(constructor, entityInstance, eventManager, repository, getManyProperties) {
|
|
133
|
+
const executionContext = {
|
|
134
|
+
DATA: { eventManager, getManyProperties, repository },
|
|
135
|
+
ENTITY: entityInstance,
|
|
136
|
+
FUNCTION_TYPE: EApiFunctionType.GET_MANY,
|
|
137
|
+
result: getManyProperties,
|
|
138
|
+
};
|
|
139
|
+
const result = await ApiSubscriberExecutor.executeFunctionBeforeSubscribers(constructor, entityInstance, EApiFunctionType.GET_MANY, executionContext);
|
|
140
|
+
if (result) {
|
|
141
|
+
executionContext.result = result;
|
|
142
|
+
}
|
|
143
|
+
return executionContext.result ?? {};
|
|
144
|
+
}
|
|
100
145
|
/**
|
|
101
146
|
* Executes the retrieval of multiple entities with error handling
|
|
102
147
|
* @template E The entity type
|
|
103
148
|
* @param {IApiFunctionGetManyExecutorProperties<E>} options - Properties required for retrieving multiple entities
|
|
149
|
+
* @param {TApiFunctionGetManyProperties<E>} [generatedProperties] - Protected cursor query options for generated routes
|
|
104
150
|
* @returns {Promise<Array<E>>} An array of retrieved entity instances, or an empty array when no entities match
|
|
105
151
|
* @throws {InternalServerErrorException} If the retrieval operation fails
|
|
106
152
|
*/
|
|
107
|
-
async function executor(options) {
|
|
153
|
+
async function executor(options, generatedProperties) {
|
|
108
154
|
const { constructor, entity, properties, repository } = options;
|
|
109
155
|
const eventManager = ApiFunctionContextStorage.getEventManager();
|
|
110
156
|
try {
|
|
@@ -122,11 +168,16 @@ async function executor(options) {
|
|
|
122
168
|
FUNCTION_TYPE: EApiFunctionType.GET_MANY,
|
|
123
169
|
result: items,
|
|
124
170
|
};
|
|
171
|
+
const protectedOrderFields = generatedProperties?.order ? Object.keys(generatedProperties.order) : undefined;
|
|
172
|
+
const protectedResultSignature = protectedOrderFields ? ApiControllerGetListCursorRuntime.createItemsInvariantSignature(items, protectedOrderFields) : undefined;
|
|
125
173
|
const afterResult = await ApiSubscriberExecutor.executeFunctionSubscribers(constructor, new entity(), EApiFunctionType.GET_MANY, EApiSubscriberOnType.AFTER, executionContext);
|
|
126
|
-
|
|
127
|
-
|
|
174
|
+
// eslint-disable-next-line @elsikora/typescript/prefer-nullish-coalescing -- Direct calls preserve the existing truthy replacement contract.
|
|
175
|
+
const finalItems = generatedProperties ? (afterResult ?? items) : afterResult || items;
|
|
176
|
+
if (protectedOrderFields && protectedResultSignature) {
|
|
177
|
+
ApiControllerGetListCursorRuntime.assertItemsInvariant(finalItems, protectedOrderFields, protectedResultSignature);
|
|
178
|
+
return ApiControllerGetListCursorRuntime.isolateItems(finalItems, protectedOrderFields);
|
|
128
179
|
}
|
|
129
|
-
return
|
|
180
|
+
return finalItems;
|
|
130
181
|
}
|
|
131
182
|
catch (caughtError) {
|
|
132
183
|
const entityInstance = new entity();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"many.decorator.js","sources":["../../../../../../../src/decorator/api/function/get/many.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"many.decorator.js","sources":["../../../../../../../src/decorator/api/function/get/many.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;;;;;;AAMG;AACG,SAAU,kBAAkB,CAA2B,UAAqC,EAAA;AACjG,IAAA,MAAM,EAAE,MAAM,EAAE,GAA8B,UAAU;IACxD,MAAM,eAAe,GAAgC,UAAU,CAAC,WAAW,EAAE,IAAI,IAAI,2BAA2B,CAAC,QAAQ;AAEzH,IAAA,OAAO,UAAU,OAAgB,EAAE,WAAmB,EAAE,UAA8B,EAAA;AAIrF,QAAA,UAAU,CAAC,KAAK,GAAG,gBAAqD,iBAAmD,EAAA;AAC1H,YAAA,MAAM,cAAc,GAA+C,sCAAsC,CAAC,KAAK,CAAI,gBAAgB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,4BAA4B,CACrC,WAAW,CAAC;YACX,MAAM;YACN,IAAI,EAAE,kBAAkB,CAAC,cAAc;AACvC,SAAA,CAAC,EACF,EAAE,KAAK,EAAE,WAAW,EAAE,CACtB;IACF;AACD;;;;"}
|
|
@@ -2,6 +2,7 @@ import { ApiFunctionStepRuntime } from '../../../class/api/function/step-runtime
|
|
|
2
2
|
import '../../../enum/decorator/api/action.enum.js';
|
|
3
3
|
import '../../../enum/decorator/api/authentication-type.enum.js';
|
|
4
4
|
import '../../../enum/decorator/api/controller/get-list/query/filter/missing-behavior.enum.js';
|
|
5
|
+
import '../../../enum/decorator/api/controller/get-list/query/pagination-mode.enum.js';
|
|
5
6
|
import '../../../enum/decorator/api/controller/get-list/query/unlisted-fields.enum.js';
|
|
6
7
|
import '../../../enum/decorator/api/controller/relation-reference-shape.enum.js';
|
|
7
8
|
import '../../../enum/decorator/api/controller/request/target.enum.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.decorator.js","sources":["../../../../../../src/decorator/api/function/step.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"step.decorator.js","sources":["../../../../../../src/decorator/api/function/step.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;AAKG;AACG,SAAU,eAAe,CAA2B,UAAyC,EAAA;IAClG,MAAM,eAAe,GAAgC,UAAU,CAAC,WAAW,EAAE,IAAI,IAAI,2BAA2B,CAAC,QAAQ;AAEzH,IAAA,OAAO,UAAU,OAAgB,EAAE,WAAmB,EAAE,UAA8B,EAAA;AACrF,QAAA,MAAM,cAAc,GAAwD,UAAU,CAAC,KAA4D;AAEnJ,QAAA,UAAU,CAAC,KAAK,GAAG,gBAAsD,GAAG,iBAAiC,EAAA;AAC5G,YAAA,OAAO,MAAM,sBAAsB,CAAC,OAAO,CAAC;gBAC3C,iBAAiB;AACjB,gBAAA,UAAU,EAAE,WAAW;gBACvB,cAAc;gBACd,UAAU;AACV,gBAAA,MAAM,EAAE,IAAI;gBACZ,eAAe;AACf,aAAA,CAAC;AACH,QAAA,CAAC;AAED,QAAA,OAAO,UAAU;AAClB,IAAA,CAAC;AACF;;;;"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { ApiControllerGeneratedFunctionCapability } from '../../../class/api/controller/generated/function-capability.class.js';
|
|
2
|
+
import { ApiControllerGeneratedReadScopeStorage } from '../../../class/api/controller/generated/read-scope-storage.class.js';
|
|
1
3
|
import { ApiFunctionContextStorage } from '../../../class/api/function/context-storage.class.js';
|
|
2
4
|
import { ApiSubscriberExecutor } from '../../../class/api/subscriber/executor.class.js';
|
|
3
5
|
import { ApiFunctionGet } from './get/decorator.js';
|
|
4
6
|
import '../../../enum/decorator/api/action.enum.js';
|
|
5
7
|
import '../../../enum/decorator/api/authentication-type.enum.js';
|
|
6
8
|
import '../../../enum/decorator/api/controller/get-list/query/filter/missing-behavior.enum.js';
|
|
9
|
+
import '../../../enum/decorator/api/controller/get-list/query/pagination-mode.enum.js';
|
|
7
10
|
import '../../../enum/decorator/api/controller/get-list/query/unlisted-fields.enum.js';
|
|
8
11
|
import '../../../enum/decorator/api/controller/relation-reference-shape.enum.js';
|
|
9
12
|
import '../../../enum/decorator/api/controller/request/target.enum.js';
|
|
@@ -59,6 +62,7 @@ function ApiFunctionUpdate(properties) {
|
|
|
59
62
|
let getFunction;
|
|
60
63
|
return function (_target, propertyKey, descriptor) {
|
|
61
64
|
descriptor.value = async function (criteria, updateProperties) {
|
|
65
|
+
const mandatoryWhere = ApiControllerGeneratedReadScopeStorage.claim(EApiFunctionType.UPDATE, criteria);
|
|
62
66
|
return await ApiFunctionExecuteWithTransaction({
|
|
63
67
|
callback: async (eventManager) => {
|
|
64
68
|
const entityInstance = new entity();
|
|
@@ -84,7 +88,7 @@ function ApiFunctionUpdate(properties) {
|
|
|
84
88
|
}
|
|
85
89
|
let existingEntity;
|
|
86
90
|
try {
|
|
87
|
-
existingEntity = await
|
|
91
|
+
existingEntity = await executeProtectedGet(this, getFunction, criteria, mandatoryWhere);
|
|
88
92
|
}
|
|
89
93
|
catch (caughtError) {
|
|
90
94
|
const errorExecutionContext = {
|
|
@@ -126,9 +130,24 @@ function ApiFunctionUpdate(properties) {
|
|
|
126
130
|
serviceConstructor: this.constructor,
|
|
127
131
|
});
|
|
128
132
|
};
|
|
133
|
+
ApiControllerGeneratedFunctionCapability.mark(descriptor.value, EApiFunctionType.UPDATE, entity);
|
|
129
134
|
return descriptor;
|
|
130
135
|
};
|
|
131
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Loads the generated update target through the protected decorated GET lifecycle.
|
|
139
|
+
* @template E The entity type
|
|
140
|
+
* @param {object} service - Service that owns the decorated GET implementation
|
|
141
|
+
* @param {Repository<E>} service.repository - Entity repository
|
|
142
|
+
* @param {(properties: TApiFunctionGetProperties<E>) => Promise<E>} getFunction - Decorated GET implementation
|
|
143
|
+
* @param {TApiFunctionUpdateCriteria<E>} criteria - Update criteria passed to the generated service function
|
|
144
|
+
* @param {TApiAuthorizationScopeWhere<E>} [mandatoryWhere] - Generated route scope that the internal GET must preserve
|
|
145
|
+
* @returns {Promise<E>} The entity loaded within the generated route scope
|
|
146
|
+
*/
|
|
147
|
+
async function executeProtectedGet(service, getFunction, criteria, mandatoryWhere) {
|
|
148
|
+
const getProperties = { where: criteria };
|
|
149
|
+
return mandatoryWhere ? await ApiControllerGeneratedReadScopeStorage.runWriteHydration(getProperties, mandatoryWhere, async () => await Reflect.apply(getFunction, service, [getProperties])) : await Reflect.apply(getFunction, service, [getProperties]);
|
|
150
|
+
}
|
|
132
151
|
/**
|
|
133
152
|
* Executes the entity update operation with error handling
|
|
134
153
|
* @template E The entity type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.decorator.js","sources":["../../../../../../src/decorator/api/function/update.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,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KAAK,CAAC;AAEjL,YAAA,MAAM,KAAK;QACZ;AAEA,QAAA,aAAa,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,CAAA,sBAAA,EAAyB,MAAM,CAAC,IAAI,CAAA,CAAA,CAAG,EAAE,KAAK,CAAC;QACpG,MAAM,qBAAqB,CAAC,+BAA+B,CAAC,WAAW,EAAE,cAAc,EAAE,gBAAgB,CAAC,MAAM,EAAE,oBAAoB,CAAC,WAAW,EAAE,qBAAqB,EAAE,KAAc,CAAC;AAE1L,QAAA,MAAM,IAAI,4BAA4B,CACrC,WAAW,CAAC;AACX,YAAA,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,kBAAkB,CAAC,cAAc;AACvC,SAAA,CAAC,EACF,EAAE,KAAK,EAAE,WAAW,EAAE,CACtB;IACF;AACD;;;;"}
|
|
@@ -4,6 +4,7 @@ import { METHOD_API_DECORATOR_CONSTANT } from '../../constant/decorator/api/meth
|
|
|
4
4
|
import '../../enum/decorator/api/action.enum.js';
|
|
5
5
|
import '../../enum/decorator/api/authentication-type.enum.js';
|
|
6
6
|
import '../../enum/decorator/api/controller/get-list/query/filter/missing-behavior.enum.js';
|
|
7
|
+
import '../../enum/decorator/api/controller/get-list/query/pagination-mode.enum.js';
|
|
7
8
|
import '../../enum/decorator/api/controller/get-list/query/unlisted-fields.enum.js';
|
|
8
9
|
import '../../enum/decorator/api/controller/relation-reference-shape.enum.js';
|
|
9
10
|
import '../../enum/decorator/api/controller/request/target.enum.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method.decorator.js","sources":["../../../../../src/decorator/api/method.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"method.decorator.js","sources":["../../../../../src/decorator/api/method.decorator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA;;;;;AAKG;AACG,SAAU,SAAS,CAA2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