@elsikora/nestjs-crud-automator 1.24.0 → 2.0.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +213 -163
- package/dist/cjs/class/api/authorization/bootstrap-validation.service.class.d.ts +1 -0
- package/dist/cjs/class/api/authorization/bootstrap-validation.service.class.js +37 -3
- package/dist/cjs/class/api/authorization/bootstrap-validation.service.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/cache-invalidation.service.class.d.ts +7 -0
- package/dist/cjs/class/api/authorization/cache-invalidation.service.class.js +21 -0
- package/dist/cjs/class/api/authorization/cache-invalidation.service.class.js.map +1 -0
- package/dist/cjs/class/api/authorization/guard.class.d.ts +1 -2
- package/dist/cjs/class/api/authorization/guard.class.js +13 -18
- package/dist/cjs/class/api/authorization/guard.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/index.d.ts +1 -0
- package/dist/cjs/class/api/authorization/policy/executor.class.js +1 -2
- package/dist/cjs/class/api/authorization/policy/executor.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/policy/index.d.ts +1 -0
- package/dist/cjs/class/api/authorization/policy/registry.class.d.ts +3 -5
- package/dist/cjs/class/api/authorization/policy/registry.class.js +11 -34
- package/dist/cjs/class/api/authorization/policy/registry.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/policy/subscriber-wrapper.class.d.ts +10 -0
- package/dist/cjs/class/api/authorization/policy/subscriber-wrapper.class.js +23 -0
- package/dist/cjs/class/api/authorization/policy/subscriber-wrapper.class.js.map +1 -0
- package/dist/cjs/class/api/authorization/runtime.class.d.ts +3 -2
- package/dist/cjs/class/api/authorization/runtime.class.js +6 -5
- package/dist/cjs/class/api/authorization/runtime.class.js.map +1 -1
- package/dist/cjs/class/api/authorization/simulator.class.d.ts +2 -0
- package/dist/cjs/class/api/authorization/simulator.class.js +1 -0
- package/dist/cjs/class/api/authorization/simulator.class.js.map +1 -1
- package/dist/cjs/class/api/function/context-storage.class.d.ts +7 -0
- package/dist/cjs/class/api/function/context-storage.class.js +16 -0
- package/dist/cjs/class/api/function/context-storage.class.js.map +1 -0
- package/dist/cjs/class/api/function/custom-runtime.class.d.ts +19 -0
- package/dist/cjs/class/api/function/custom-runtime.class.js +118 -0
- package/dist/cjs/class/api/function/custom-runtime.class.js.map +1 -0
- package/dist/cjs/class/api/function/index.d.ts +1 -0
- package/dist/cjs/class/api/function/transaction-scope.class.d.ts +6 -0
- package/dist/cjs/class/api/function/transaction-scope.class.js +34 -0
- package/dist/cjs/class/api/function/transaction-scope.class.js.map +1 -0
- package/dist/cjs/class/api/index.d.ts +2 -0
- package/dist/cjs/class/api/route-runtime.class.d.ts +21 -0
- package/dist/cjs/class/api/route-runtime.class.js +335 -0
- package/dist/cjs/class/api/route-runtime.class.js.map +1 -0
- package/dist/cjs/class/api/service-base.class.d.ts +9 -7
- package/dist/cjs/class/api/service-base.class.js +16 -6
- package/dist/cjs/class/api/service-base.class.js.map +1 -1
- package/dist/cjs/class/api/subscriber/executor.class.d.ts +7 -6
- package/dist/cjs/class/api/subscriber/executor.class.js +16 -12
- package/dist/cjs/class/api/subscriber/executor.class.js.map +1 -1
- package/dist/cjs/class/api/subscriber/index.d.ts +1 -0
- package/dist/cjs/class/api/subscriber/registry.class.d.ts +5 -2
- package/dist/cjs/class/api/subscriber/registry.class.js +26 -24
- package/dist/cjs/class/api/subscriber/registry.class.js.map +1 -1
- package/dist/cjs/class/api/subscriber/wrapper.class.d.ts +18 -0
- package/dist/cjs/class/api/subscriber/wrapper.class.js +23 -0
- package/dist/cjs/class/api/subscriber/wrapper.class.js.map +1 -0
- package/dist/cjs/class/utility/dto/exception/details/foreign-key-violation.class.js +5 -1
- 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 +5 -1
- 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 +6 -2
- 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 +5 -1
- package/dist/cjs/class/utility/dto/property/factory/relation.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/strategy/body.class.js +5 -1
- package/dist/cjs/class/utility/dto/strategy/body.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/strategy/query.class.js +5 -1
- package/dist/cjs/class/utility/dto/strategy/query.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/strategy/request.class.js +5 -1
- package/dist/cjs/class/utility/dto/strategy/request.class.js.map +1 -1
- package/dist/cjs/class/utility/dto/strategy/response.class.js +5 -1
- package/dist/cjs/class/utility/dto/strategy/response.class.js.map +1 -1
- package/dist/cjs/constant/decorator/api/method.constant.d.ts +2 -3
- package/dist/cjs/constant/decorator/api/method.constant.js +4 -6
- package/dist/cjs/constant/decorator/api/method.constant.js.map +1 -1
- package/dist/cjs/constant/utility/dto/constant.js +6 -2
- package/dist/cjs/constant/utility/dto/constant.js.map +1 -1
- package/dist/cjs/decorator/api/function/create.decorator.js +51 -24
- package/dist/cjs/decorator/api/function/create.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/custom.decorator.d.ts +9 -0
- package/dist/cjs/decorator/api/function/custom.decorator.js +47 -0
- package/dist/cjs/decorator/api/function/custom.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/function/decorator.js +16 -7
- package/dist/cjs/decorator/api/function/decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/delete.decorator.js +62 -41
- package/dist/cjs/decorator/api/function/delete.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/get/decorator.js +40 -25
- package/dist/cjs/decorator/api/function/get/decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/get/list.decorator.js +40 -25
- package/dist/cjs/decorator/api/function/get/list.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/get/many.decorator.js +40 -25
- package/dist/cjs/decorator/api/function/get/many.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/function/index.d.ts +1 -0
- package/dist/cjs/decorator/api/function/update.decorator.js +62 -41
- package/dist/cjs/decorator/api/function/update.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/index.d.ts +1 -0
- package/dist/cjs/decorator/api/method.decorator.d.ts +5 -6
- package/dist/cjs/decorator/api/method.decorator.js +65 -325
- package/dist/cjs/decorator/api/method.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/boolean.decorator.js +23 -4
- package/dist/cjs/decorator/api/property/boolean.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/date.decorator.js +23 -4
- package/dist/cjs/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/enum.decorator.js +21 -3
- package/dist/cjs/decorator/api/property/enum.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/number.decorator.js +28 -5
- package/dist/cjs/decorator/api/property/number.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/object.decorator.js +21 -3
- package/dist/cjs/decorator/api/property/object.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/string.decorator.js +25 -8
- package/dist/cjs/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/property/uuid.decorator.js +26 -4
- package/dist/cjs/decorator/api/property/uuid.decorator.js.map +1 -1
- package/dist/cjs/decorator/api/route-custom.decorator.d.ts +9 -0
- package/dist/cjs/decorator/api/route-custom.decorator.js +101 -0
- package/dist/cjs/decorator/api/route-custom.decorator.js.map +1 -0
- package/dist/cjs/decorator/api/service/decorator.js +28 -23
- package/dist/cjs/decorator/api/service/decorator.js.map +1 -1
- package/dist/cjs/enum/decorator/api/controller/index.d.ts +3 -1
- package/dist/cjs/enum/decorator/api/controller/relation-reference-shape.enum.d.ts +4 -0
- package/dist/cjs/enum/decorator/api/controller/relation-reference-shape.enum.js +8 -0
- package/dist/cjs/enum/decorator/api/controller/relation-reference-shape.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/controller/request/index.d.ts +2 -0
- package/dist/cjs/enum/decorator/api/controller/request/target.enum.d.ts +5 -0
- package/dist/cjs/enum/decorator/api/controller/request/target.enum.js +9 -0
- package/dist/cjs/enum/decorator/api/controller/request/target.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/controller/{request-transformer-type.enum.js → request/transformer-type.enum.js} +1 -1
- package/dist/cjs/enum/decorator/api/controller/request/transformer-type.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/controller/response-target.enum.d.ts +3 -0
- package/dist/cjs/enum/decorator/api/controller/response-target.enum.js +7 -0
- package/dist/cjs/enum/decorator/api/controller/response-target.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/dto-type.enum.d.ts +1 -1
- package/dist/cjs/enum/decorator/api/dto-type.enum.js +1 -1
- package/dist/cjs/enum/decorator/api/dto-type.enum.js.map +1 -1
- package/dist/cjs/enum/decorator/api/function-transaction-mode.enum.d.ts +6 -0
- package/dist/cjs/enum/decorator/api/function-transaction-mode.enum.js +10 -0
- package/dist/cjs/enum/decorator/api/function-transaction-mode.enum.js.map +1 -0
- package/dist/cjs/enum/decorator/api/function-type.enum.d.ts +1 -0
- package/dist/cjs/enum/decorator/api/function-type.enum.js +1 -0
- package/dist/cjs/enum/decorator/api/function-type.enum.js.map +1 -1
- package/dist/cjs/enum/decorator/api/index.d.ts +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/Observable.js +106 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/Observable.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/Subscriber.js +158 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/Subscription.js +148 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/config.js +7 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/config.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/lastValueFrom.js +28 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/lastValueFrom.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/observable/from.js +11 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/observable/from.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/observable/innerFrom.js +154 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/observable/innerFrom.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +66 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/operators/observeOn.js +15 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/operators/observeOn.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/operators/subscribeOn.js +13 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/operators/subscribeOn.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleArray.js +23 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleArray.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js +28 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js +37 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js +12 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/schedulePromise.js +12 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/schedulePromise.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js +11 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduled.js +42 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduled.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +20 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/symbol/iterator.js +13 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/symbol/iterator.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/symbol/observable.js +6 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/EmptyError.js +14 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/EmptyError.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +17 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/createErrorClass.js +15 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/errorContext.js +10 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/executeSchedule.js +22 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/executeSchedule.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/identity.js +8 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isArrayLike.js +6 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isArrayLike.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isAsyncIterable.js +10 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isAsyncIterable.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isInteropObservable.js +11 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isInteropObservable.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isIterable.js +11 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isIterable.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isPromise.js +10 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isPromise.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isReadableStreamLike.js +44 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/isReadableStreamLike.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/lift.js +26 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/lift.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/noop.js +6 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/pipe.js +18 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/throwUnobservableError.js +8 -0
- package/dist/cjs/external/rxjs/dist/esm5/internal/util/throwUnobservableError.js.map +1 -0
- package/dist/cjs/external/tslib/tslib.es6.js +125 -0
- package/dist/cjs/external/tslib/tslib.es6.js.map +1 -1
- package/dist/cjs/factory/api-controller.factory.d.ts +1 -0
- package/dist/cjs/factory/api-controller.factory.js +42 -393
- package/dist/cjs/factory/api-controller.factory.js.map +1 -1
- package/dist/cjs/index.js +45 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interceptor/api-route-runtime.interceptor.d.ts +5 -0
- package/dist/cjs/interceptor/api-route-runtime.interceptor.js +29 -0
- package/dist/cjs/interceptor/api-route-runtime.interceptor.js.map +1 -0
- package/dist/cjs/interface/class/api/authorization/policy/registry.interface.d.ts +1 -0
- package/dist/cjs/interface/class/api/authorization/policy/subscriber/context/interface.d.ts +1 -1
- package/dist/cjs/interface/class/api/function/context/index.d.ts +2 -0
- package/dist/cjs/interface/class/api/function/context/interface.d.ts +10 -0
- package/dist/cjs/interface/class/api/function/context/operations.interface.d.ts +13 -0
- package/dist/cjs/interface/class/api/function/index.d.ts +1 -0
- package/dist/cjs/interface/class/api/index.d.ts +2 -0
- package/dist/cjs/interface/class/api/route/index.d.ts +1 -0
- package/dist/cjs/interface/class/api/route/runtime/context-data.interface.d.ts +10 -0
- package/dist/cjs/interface/class/api/route/runtime/custom-execution-options.interface.d.ts +9 -0
- package/dist/cjs/interface/class/api/route/runtime/generated/execution-options.interface.d.ts +14 -0
- package/dist/cjs/interface/class/api/route/runtime/generated/index.d.ts +2 -0
- package/dist/cjs/interface/class/api/route/runtime/generated/targets.interface.d.ts +12 -0
- package/dist/cjs/interface/class/api/route/runtime/http-request.interface.d.ts +8 -0
- package/dist/cjs/interface/class/api/route/runtime/index.d.ts +4 -0
- package/dist/cjs/interface/class/api/subscriber/function/error-execution-context.interface.d.ts +1 -0
- package/dist/cjs/interface/class/api/subscriber/function/execution/context.interface.d.ts +1 -0
- package/dist/cjs/interface/class/api/subscriber/function.interface.d.ts +4 -0
- package/dist/cjs/interface/class/api/subscriber/route/error-execution-context.interface.d.ts +2 -1
- package/dist/cjs/interface/class/api/subscriber/route/execution/context/data/extended.interface.d.ts +36 -0
- package/dist/cjs/interface/class/api/subscriber/route/execution/context/data/index.d.ts +2 -0
- package/dist/cjs/interface/class/api/subscriber/route/execution/context/data/interface.d.ts +32 -0
- package/dist/cjs/interface/class/api/subscriber/route/execution/context/index.d.ts +2 -0
- package/dist/cjs/interface/class/api/subscriber/route/execution/context/interface.d.ts +11 -0
- package/dist/cjs/interface/class/api/subscriber/route/execution/index.d.ts +1 -2
- package/dist/cjs/interface/class/api/subscriber/route.interface.d.ts +6 -2
- package/dist/cjs/interface/decorator/api/controller/properties/route/authentication.interface.d.ts +1 -1
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/generation.interface.d.ts +5 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/index.d.ts +5 -2
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/interface.d.ts +4 -7
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/index.d.ts +4 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/interface.d.ts +6 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/reference.interface.d.ts +5 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/request/index.d.ts +2 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/request/interface.d.ts +6 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/request/load.interface.d.ts +10 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/response/index.d.ts +2 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/response/interface.d.ts +6 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/response/load.interface.d.ts +4 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/index.d.ts +2 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/interface.d.ts +6 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/target.interface.d.ts +6 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/response/index.d.ts +2 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/response/interface.d.ts +7 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/response/target.interface.d.ts +4 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/security.interface.d.ts +6 -0
- package/dist/cjs/interface/decorator/api/controller/properties/route/with/dto.interface.d.ts +1 -1
- package/dist/cjs/interface/decorator/api/function/create-executor-properties.interface.d.ts +1 -2
- package/dist/cjs/interface/decorator/api/function/custom-properties.interface.d.ts +9 -0
- package/dist/cjs/interface/decorator/api/function/delete-executor-properties.interface.d.ts +2 -3
- package/dist/cjs/interface/decorator/api/function/get/executor-properties.interface.d.ts +1 -2
- package/dist/cjs/interface/decorator/api/function/get/list-executor-properties.interface.d.ts +1 -2
- package/dist/cjs/interface/decorator/api/function/get/many-executor-properties.interface.d.ts +1 -2
- package/dist/cjs/interface/decorator/api/function/index.d.ts +1 -0
- package/dist/cjs/interface/decorator/api/function/properties.interface.d.ts +4 -0
- package/dist/cjs/interface/decorator/api/function/update-executor-properties.interface.d.ts +2 -3
- package/dist/cjs/interface/decorator/api/index.d.ts +1 -0
- package/dist/cjs/interface/decorator/api/method/index.d.ts +0 -2
- package/dist/cjs/interface/decorator/api/method/properties.interface.d.ts +4 -17
- package/dist/cjs/interface/decorator/api/route/custom-properties.interface.d.ts +6 -0
- package/dist/cjs/interface/decorator/api/route/documentation-properties.interface.d.ts +5 -0
- package/dist/cjs/interface/decorator/api/route/index.d.ts +7 -0
- package/dist/cjs/interface/decorator/api/route/metadata/index.d.ts +3 -0
- package/dist/cjs/interface/decorator/api/route/metadata/interface.d.ts +15 -0
- package/dist/cjs/interface/decorator/api/route/metadata/resource.interface.d.ts +6 -0
- package/dist/cjs/interface/decorator/api/route/metadata/route.interface.d.ts +7 -0
- package/dist/cjs/interface/decorator/api/route/response/index.d.ts +2 -0
- package/dist/cjs/interface/decorator/api/route/response/properties.interface.d.ts +9 -0
- package/dist/cjs/interface/decorator/api/route/response/serialization-properties.interface.d.ts +3 -0
- package/dist/cjs/interface/decorator/api/route/runtime-properties.interface.d.ts +11 -0
- package/dist/cjs/interface/decorator/api/route/security/authentication-properties.interface.d.ts +9 -0
- package/dist/cjs/interface/decorator/api/route/security/authorization-properties.interface.d.ts +4 -0
- package/dist/cjs/interface/decorator/api/route/security/index.d.ts +3 -0
- package/dist/cjs/interface/decorator/api/route/security/properties.interface.d.ts +6 -0
- package/dist/cjs/interface/decorator/api/route/throttling/default-properties.interface.d.ts +4 -0
- package/dist/cjs/interface/decorator/api/route/throttling/index.d.ts +2 -0
- package/dist/cjs/interface/decorator/api/route/throttling/properties.interface.d.ts +4 -0
- package/dist/cjs/interface/decorator/api/subscriber/function/filter.interface.d.ts +5 -0
- package/dist/cjs/interface/decorator/api/subscriber/function/index.d.ts +2 -0
- package/dist/cjs/interface/decorator/api/subscriber/function/properties.interface.d.ts +7 -0
- package/dist/cjs/interface/decorator/api/subscriber/index.d.ts +2 -2
- package/dist/cjs/interface/decorator/api/subscriber/route-properties.interface.d.ts +4 -0
- package/dist/cjs/module/api/authorization.module.js +18 -1
- package/dist/cjs/module/api/authorization.module.js.map +1 -1
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/type/class/api/subscriber/route/after/create-context.type.d.ts +2 -2
- package/dist/cjs/type/class/api/subscriber/route/after/delete-context.type.d.ts +2 -2
- package/dist/cjs/type/class/api/subscriber/route/after/get/context.type.d.ts +2 -2
- package/dist/cjs/type/class/api/subscriber/route/after/get/list-context.type.d.ts +2 -2
- package/dist/cjs/type/class/api/subscriber/route/after/partial-update-context.type.d.ts +2 -2
- package/dist/cjs/type/class/api/subscriber/route/after/update-context.type.d.ts +2 -2
- package/dist/cjs/type/class/api/subscriber/route/before/create-context.type.d.ts +2 -2
- package/dist/cjs/type/class/api/subscriber/route/before/delete-context.type.d.ts +2 -2
- package/dist/cjs/type/class/api/subscriber/route/before/get/context.type.d.ts +2 -2
- package/dist/cjs/type/class/api/subscriber/route/before/get/list-context.type.d.ts +2 -2
- package/dist/cjs/type/class/api/subscriber/route/before/partial-update-context.type.d.ts +2 -2
- package/dist/cjs/type/class/api/subscriber/route/before/update-context.type.d.ts +2 -2
- package/dist/cjs/type/decorator/api/controller/properties/route/base/request/allowed-target.type.d.ts +9 -0
- package/dist/cjs/type/decorator/api/controller/properties/route/base/request/index.d.ts +1 -1
- package/dist/cjs/type/decorator/api/controller/properties/route/base/request/transformers.type.d.ts +7 -7
- package/dist/cjs/type/decorator/api/controller/properties/route/base/response-transformers.type.d.ts +6 -6
- package/dist/cjs/type/decorator/api/controller/transformer-config.type.d.ts +5 -5
- package/dist/cjs/type/decorator/api/function/properties.type.d.ts +5 -3
- package/dist/cjs/type/decorator/api/property/describe/dto/request-properties.type.d.ts +1 -1
- package/dist/cjs/type/decorator/api/property/describe/properties/base/properties.type.d.ts +4 -4
- package/dist/cjs/type/utility/dto/generate/allowed-combination.type.d.ts +4 -4
- package/dist/cjs/utility/api/controller/apply/decorators.utility.js +58 -26
- package/dist/cjs/utility/api/controller/apply/decorators.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/apply/metadata.utility.js +6 -2
- package/dist/cjs/utility/api/controller/apply/metadata.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/get/dto.utility.js +6 -2
- package/dist/cjs/utility/api/controller/get/dto.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/get-list/transform/filter.utility.js +5 -1
- 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 +4 -4
- package/dist/cjs/utility/api/controller/handle-request-relations.utility.js +37 -11
- package/dist/cjs/utility/api/controller/handle-request-relations.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/index.d.ts +1 -0
- package/dist/cjs/utility/api/controller/serialize-route-response.utility.d.ts +14 -0
- package/dist/cjs/utility/api/controller/serialize-route-response.utility.js +29 -0
- package/dist/cjs/utility/api/controller/serialize-route-response.utility.js.map +1 -0
- package/dist/cjs/utility/api/controller/transform-data.utility.d.ts +8 -7
- package/dist/cjs/utility/api/controller/transform-data.utility.js +21 -18
- package/dist/cjs/utility/api/controller/transform-data.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/validate-request.utility.d.ts +3 -3
- package/dist/cjs/utility/api/controller/validate-request.utility.js +10 -9
- package/dist/cjs/utility/api/controller/validate-request.utility.js.map +1 -1
- package/dist/cjs/utility/api/controller/write/dto-swagger.utility.js +6 -2
- package/dist/cjs/utility/api/controller/write/dto-swagger.utility.js.map +1 -1
- package/dist/cjs/utility/api/function-transaction.utility.d.ts +20 -0
- package/dist/cjs/utility/api/function-transaction.utility.js +52 -0
- package/dist/cjs/utility/api/function-transaction.utility.js.map +1 -0
- package/dist/cjs/utility/api/index.d.ts +1 -0
- package/dist/cjs/utility/api/route/index.d.ts +1 -0
- package/dist/cjs/utility/api/route/response/index.d.ts +2 -0
- package/dist/cjs/utility/api/route/response/project-relation.utility.d.ts +11 -0
- package/dist/cjs/utility/api/route/response/project-relation.utility.js +75 -0
- package/dist/cjs/utility/api/route/response/project-relation.utility.js.map +1 -0
- package/dist/cjs/utility/api/route/response/serialize.utility.d.ts +11 -0
- package/dist/cjs/utility/api/route/response/serialize.utility.js +26 -0
- package/dist/cjs/utility/api/route/response/serialize.utility.js.map +1 -0
- package/dist/cjs/utility/dto/build-decorator.utility.js +5 -1
- package/dist/cjs/utility/dto/build-decorator.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate/core.utility.js +5 -1
- package/dist/cjs/utility/dto/generate/core.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate/dynamic.utility.js +5 -1
- package/dist/cjs/utility/dto/generate/dynamic.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate/exception.utility.js +5 -1
- package/dist/cjs/utility/dto/generate/exception.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate/filter-decorator.utility.js +5 -1
- package/dist/cjs/utility/dto/generate/filter-decorator.utility.js.map +1 -1
- package/dist/cjs/utility/dto/generate/get-list-response.utility.js +5 -1
- package/dist/cjs/utility/dto/generate/get-list-response.utility.js.map +1 -1
- package/dist/cjs/utility/dto/get/get-list-query-base-class.utility.js +5 -1
- 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 +5 -1
- package/dist/cjs/utility/dto/handle-date-property.utility.js.map +1 -1
- package/dist/cjs/utility/dto/is/property/should-be-marked.utility.js +7 -3
- 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 +8 -4
- package/dist/cjs/utility/dto/is/should-be-generated.utility.js.map +1 -1
- package/dist/esm/class/api/authorization/bootstrap-validation.service.class.d.ts +1 -0
- package/dist/esm/class/api/authorization/bootstrap-validation.service.class.js +37 -3
- package/dist/esm/class/api/authorization/bootstrap-validation.service.class.js.map +1 -1
- package/dist/esm/class/api/authorization/cache-invalidation.service.class.d.ts +7 -0
- package/dist/esm/class/api/authorization/cache-invalidation.service.class.js +21 -0
- package/dist/esm/class/api/authorization/cache-invalidation.service.class.js.map +1 -0
- package/dist/esm/class/api/authorization/guard.class.d.ts +1 -2
- package/dist/esm/class/api/authorization/guard.class.js +13 -18
- package/dist/esm/class/api/authorization/guard.class.js.map +1 -1
- package/dist/esm/class/api/authorization/index.d.ts +1 -0
- package/dist/esm/class/api/authorization/policy/executor.class.js +1 -2
- package/dist/esm/class/api/authorization/policy/executor.class.js.map +1 -1
- package/dist/esm/class/api/authorization/policy/index.d.ts +1 -0
- package/dist/esm/class/api/authorization/policy/registry.class.d.ts +3 -5
- package/dist/esm/class/api/authorization/policy/registry.class.js +10 -33
- package/dist/esm/class/api/authorization/policy/registry.class.js.map +1 -1
- package/dist/esm/class/api/authorization/policy/subscriber-wrapper.class.d.ts +10 -0
- package/dist/esm/class/api/authorization/policy/subscriber-wrapper.class.js +21 -0
- package/dist/esm/class/api/authorization/policy/subscriber-wrapper.class.js.map +1 -0
- package/dist/esm/class/api/authorization/runtime.class.d.ts +3 -2
- package/dist/esm/class/api/authorization/runtime.class.js +6 -5
- package/dist/esm/class/api/authorization/runtime.class.js.map +1 -1
- package/dist/esm/class/api/authorization/simulator.class.d.ts +2 -0
- package/dist/esm/class/api/authorization/simulator.class.js +1 -0
- package/dist/esm/class/api/authorization/simulator.class.js.map +1 -1
- package/dist/esm/class/api/function/context-storage.class.d.ts +7 -0
- package/dist/esm/class/api/function/context-storage.class.js +14 -0
- package/dist/esm/class/api/function/context-storage.class.js.map +1 -0
- package/dist/esm/class/api/function/custom-runtime.class.d.ts +19 -0
- package/dist/esm/class/api/function/custom-runtime.class.js +116 -0
- package/dist/esm/class/api/function/custom-runtime.class.js.map +1 -0
- package/dist/esm/class/api/function/index.d.ts +1 -0
- package/dist/esm/class/api/function/transaction-scope.class.d.ts +6 -0
- package/dist/esm/class/api/function/transaction-scope.class.js +32 -0
- package/dist/esm/class/api/function/transaction-scope.class.js.map +1 -0
- package/dist/esm/class/api/index.d.ts +2 -0
- package/dist/esm/class/api/route-runtime.class.d.ts +21 -0
- package/dist/esm/class/api/route-runtime.class.js +333 -0
- package/dist/esm/class/api/route-runtime.class.js.map +1 -0
- package/dist/esm/class/api/service-base.class.d.ts +9 -7
- package/dist/esm/class/api/service-base.class.js +16 -6
- package/dist/esm/class/api/service-base.class.js.map +1 -1
- package/dist/esm/class/api/subscriber/executor.class.d.ts +7 -6
- package/dist/esm/class/api/subscriber/executor.class.js +16 -12
- package/dist/esm/class/api/subscriber/executor.class.js.map +1 -1
- package/dist/esm/class/api/subscriber/index.d.ts +1 -0
- package/dist/esm/class/api/subscriber/registry.class.d.ts +5 -2
- package/dist/esm/class/api/subscriber/registry.class.js +24 -22
- package/dist/esm/class/api/subscriber/registry.class.js.map +1 -1
- package/dist/esm/class/api/subscriber/wrapper.class.d.ts +18 -0
- package/dist/esm/class/api/subscriber/wrapper.class.js +21 -0
- package/dist/esm/class/api/subscriber/wrapper.class.js.map +1 -0
- package/dist/esm/class/utility/dto/exception/details/foreign-key-violation.class.js +5 -1
- 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 +5 -1
- 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 +6 -2
- 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 +5 -1
- package/dist/esm/class/utility/dto/property/factory/relation.class.js.map +1 -1
- package/dist/esm/class/utility/dto/strategy/body.class.js +5 -1
- package/dist/esm/class/utility/dto/strategy/body.class.js.map +1 -1
- package/dist/esm/class/utility/dto/strategy/query.class.js +5 -1
- package/dist/esm/class/utility/dto/strategy/query.class.js.map +1 -1
- package/dist/esm/class/utility/dto/strategy/request.class.js +5 -1
- package/dist/esm/class/utility/dto/strategy/request.class.js.map +1 -1
- package/dist/esm/class/utility/dto/strategy/response.class.js +5 -1
- package/dist/esm/class/utility/dto/strategy/response.class.js.map +1 -1
- package/dist/esm/constant/decorator/api/method.constant.d.ts +2 -3
- package/dist/esm/constant/decorator/api/method.constant.js +4 -6
- package/dist/esm/constant/decorator/api/method.constant.js.map +1 -1
- package/dist/esm/constant/utility/dto/constant.js +6 -2
- package/dist/esm/constant/utility/dto/constant.js.map +1 -1
- package/dist/esm/decorator/api/function/create.decorator.js +51 -24
- package/dist/esm/decorator/api/function/create.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/custom.decorator.d.ts +9 -0
- package/dist/esm/decorator/api/function/custom.decorator.js +45 -0
- package/dist/esm/decorator/api/function/custom.decorator.js.map +1 -0
- package/dist/esm/decorator/api/function/decorator.js +16 -7
- package/dist/esm/decorator/api/function/decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/delete.decorator.js +62 -41
- package/dist/esm/decorator/api/function/delete.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/get/decorator.js +40 -25
- package/dist/esm/decorator/api/function/get/decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/get/list.decorator.js +40 -25
- package/dist/esm/decorator/api/function/get/list.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/get/many.decorator.js +40 -25
- package/dist/esm/decorator/api/function/get/many.decorator.js.map +1 -1
- package/dist/esm/decorator/api/function/index.d.ts +1 -0
- package/dist/esm/decorator/api/function/update.decorator.js +62 -41
- package/dist/esm/decorator/api/function/update.decorator.js.map +1 -1
- package/dist/esm/decorator/api/index.d.ts +1 -0
- package/dist/esm/decorator/api/method.decorator.d.ts +5 -6
- package/dist/esm/decorator/api/method.decorator.js +66 -326
- package/dist/esm/decorator/api/method.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/boolean.decorator.js +24 -5
- package/dist/esm/decorator/api/property/boolean.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/date.decorator.js +24 -5
- package/dist/esm/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/enum.decorator.js +22 -4
- package/dist/esm/decorator/api/property/enum.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/number.decorator.js +30 -7
- package/dist/esm/decorator/api/property/number.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/object.decorator.js +22 -4
- package/dist/esm/decorator/api/property/object.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/string.decorator.js +26 -9
- package/dist/esm/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/esm/decorator/api/property/uuid.decorator.js +27 -5
- package/dist/esm/decorator/api/property/uuid.decorator.js.map +1 -1
- package/dist/esm/decorator/api/route-custom.decorator.d.ts +9 -0
- package/dist/esm/decorator/api/route-custom.decorator.js +99 -0
- package/dist/esm/decorator/api/route-custom.decorator.js.map +1 -0
- package/dist/esm/decorator/api/service/decorator.js +28 -23
- package/dist/esm/decorator/api/service/decorator.js.map +1 -1
- package/dist/esm/enum/decorator/api/controller/index.d.ts +3 -1
- package/dist/esm/enum/decorator/api/controller/relation-reference-shape.enum.d.ts +4 -0
- package/dist/esm/enum/decorator/api/controller/relation-reference-shape.enum.js +8 -0
- package/dist/esm/enum/decorator/api/controller/relation-reference-shape.enum.js.map +1 -0
- package/dist/esm/enum/decorator/api/controller/request/index.d.ts +2 -0
- package/dist/esm/enum/decorator/api/controller/request/target.enum.d.ts +5 -0
- package/dist/esm/enum/decorator/api/controller/request/target.enum.js +9 -0
- package/dist/esm/enum/decorator/api/controller/request/target.enum.js.map +1 -0
- package/dist/esm/enum/decorator/api/controller/{request-transformer-type.enum.js → request/transformer-type.enum.js} +1 -1
- package/dist/esm/enum/decorator/api/controller/request/transformer-type.enum.js.map +1 -0
- package/dist/esm/enum/decorator/api/controller/response-target.enum.d.ts +3 -0
- package/dist/esm/enum/decorator/api/controller/response-target.enum.js +7 -0
- package/dist/esm/enum/decorator/api/controller/response-target.enum.js.map +1 -0
- package/dist/esm/enum/decorator/api/dto-type.enum.d.ts +1 -1
- package/dist/esm/enum/decorator/api/dto-type.enum.js +1 -1
- package/dist/esm/enum/decorator/api/dto-type.enum.js.map +1 -1
- package/dist/esm/enum/decorator/api/function-transaction-mode.enum.d.ts +6 -0
- package/dist/esm/enum/decorator/api/function-transaction-mode.enum.js +10 -0
- package/dist/esm/enum/decorator/api/function-transaction-mode.enum.js.map +1 -0
- package/dist/esm/enum/decorator/api/function-type.enum.d.ts +1 -0
- package/dist/esm/enum/decorator/api/function-type.enum.js +1 -0
- package/dist/esm/enum/decorator/api/function-type.enum.js.map +1 -1
- package/dist/esm/enum/decorator/api/index.d.ts +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/Observable.js +104 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/Observable.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/Subscriber.js +154 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/Subscription.js +145 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/config.js +5 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/config.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/lastValueFrom.js +26 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/lastValueFrom.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/observable/from.js +9 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/observable/from.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/observable/innerFrom.js +146 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/observable/innerFrom.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +63 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/operators/observeOn.js +13 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/operators/observeOn.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/operators/subscribeOn.js +11 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/operators/subscribeOn.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleArray.js +21 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleArray.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js +26 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js +35 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js +10 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/schedulePromise.js +10 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/schedulePromise.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js +9 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduled.js +40 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduled.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +18 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/symbol/iterator.js +10 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/symbol/iterator.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/symbol/observable.js +4 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/EmptyError.js +12 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/EmptyError.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +15 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/arrRemove.js +9 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/createErrorClass.js +13 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/errorContext.js +8 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/executeSchedule.js +20 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/executeSchedule.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/identity.js +6 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isArrayLike.js +4 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isArrayLike.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isAsyncIterable.js +8 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isAsyncIterable.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isFunction.js +6 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isInteropObservable.js +9 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isInteropObservable.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isIterable.js +9 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isIterable.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isPromise.js +8 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isPromise.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isReadableStreamLike.js +41 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/isReadableStreamLike.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/lift.js +23 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/lift.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/noop.js +4 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/pipe.js +16 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/reportUnhandledError.js +12 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/throwUnobservableError.js +6 -0
- package/dist/esm/external/rxjs/dist/esm5/internal/util/throwUnobservableError.js.map +1 -0
- package/dist/esm/external/tslib/tslib.es6.js +117 -1
- package/dist/esm/external/tslib/tslib.es6.js.map +1 -1
- package/dist/esm/factory/api-controller.factory.d.ts +1 -0
- package/dist/esm/factory/api-controller.factory.js +42 -393
- package/dist/esm/factory/api-controller.factory.js.map +1 -1
- package/dist/esm/index.js +15 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interceptor/api-route-runtime.interceptor.d.ts +5 -0
- package/dist/esm/interceptor/api-route-runtime.interceptor.js +29 -0
- package/dist/esm/interceptor/api-route-runtime.interceptor.js.map +1 -0
- package/dist/esm/interface/class/api/authorization/policy/registry.interface.d.ts +1 -0
- package/dist/esm/interface/class/api/authorization/policy/subscriber/context/interface.d.ts +1 -1
- package/dist/esm/interface/class/api/function/context/index.d.ts +2 -0
- package/dist/esm/interface/class/api/function/context/interface.d.ts +10 -0
- package/dist/esm/interface/class/api/function/context/operations.interface.d.ts +13 -0
- package/dist/esm/interface/class/api/function/index.d.ts +1 -0
- package/dist/esm/interface/class/api/index.d.ts +2 -0
- package/dist/esm/interface/class/api/route/index.d.ts +1 -0
- package/dist/esm/interface/class/api/route/runtime/context-data.interface.d.ts +10 -0
- package/dist/esm/interface/class/api/route/runtime/custom-execution-options.interface.d.ts +9 -0
- package/dist/esm/interface/class/api/route/runtime/generated/execution-options.interface.d.ts +14 -0
- package/dist/esm/interface/class/api/route/runtime/generated/index.d.ts +2 -0
- package/dist/esm/interface/class/api/route/runtime/generated/targets.interface.d.ts +12 -0
- package/dist/esm/interface/class/api/route/runtime/http-request.interface.d.ts +8 -0
- package/dist/esm/interface/class/api/route/runtime/index.d.ts +4 -0
- package/dist/esm/interface/class/api/subscriber/function/error-execution-context.interface.d.ts +1 -0
- package/dist/esm/interface/class/api/subscriber/function/execution/context.interface.d.ts +1 -0
- package/dist/esm/interface/class/api/subscriber/function.interface.d.ts +4 -0
- package/dist/esm/interface/class/api/subscriber/route/error-execution-context.interface.d.ts +2 -1
- package/dist/esm/interface/class/api/subscriber/route/execution/context/data/extended.interface.d.ts +36 -0
- package/dist/esm/interface/class/api/subscriber/route/execution/context/data/index.d.ts +2 -0
- package/dist/esm/interface/class/api/subscriber/route/execution/context/data/interface.d.ts +32 -0
- package/dist/esm/interface/class/api/subscriber/route/execution/context/index.d.ts +2 -0
- package/dist/esm/interface/class/api/subscriber/route/execution/context/interface.d.ts +11 -0
- package/dist/esm/interface/class/api/subscriber/route/execution/index.d.ts +1 -2
- package/dist/esm/interface/class/api/subscriber/route.interface.d.ts +6 -2
- package/dist/esm/interface/decorator/api/controller/properties/route/authentication.interface.d.ts +1 -1
- package/dist/esm/interface/decorator/api/controller/properties/route/base/generation.interface.d.ts +5 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/index.d.ts +5 -2
- package/dist/esm/interface/decorator/api/controller/properties/route/base/interface.d.ts +4 -7
- package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/index.d.ts +4 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/interface.d.ts +6 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/reference.interface.d.ts +5 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/request/index.d.ts +2 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/request/interface.d.ts +6 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/request/load.interface.d.ts +10 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/response/index.d.ts +2 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/response/interface.d.ts +6 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/response/load.interface.d.ts +4 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/index.d.ts +2 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/interface.d.ts +6 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request/target.interface.d.ts +6 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/response/index.d.ts +2 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/response/interface.d.ts +7 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/response/target.interface.d.ts +4 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/base/security.interface.d.ts +6 -0
- package/dist/esm/interface/decorator/api/controller/properties/route/with/dto.interface.d.ts +1 -1
- package/dist/esm/interface/decorator/api/function/create-executor-properties.interface.d.ts +1 -2
- package/dist/esm/interface/decorator/api/function/custom-properties.interface.d.ts +9 -0
- package/dist/esm/interface/decorator/api/function/delete-executor-properties.interface.d.ts +2 -3
- package/dist/esm/interface/decorator/api/function/get/executor-properties.interface.d.ts +1 -2
- package/dist/esm/interface/decorator/api/function/get/list-executor-properties.interface.d.ts +1 -2
- package/dist/esm/interface/decorator/api/function/get/many-executor-properties.interface.d.ts +1 -2
- package/dist/esm/interface/decorator/api/function/index.d.ts +1 -0
- package/dist/esm/interface/decorator/api/function/properties.interface.d.ts +4 -0
- package/dist/esm/interface/decorator/api/function/update-executor-properties.interface.d.ts +2 -3
- package/dist/esm/interface/decorator/api/index.d.ts +1 -0
- package/dist/esm/interface/decorator/api/method/index.d.ts +0 -2
- package/dist/esm/interface/decorator/api/method/properties.interface.d.ts +4 -17
- package/dist/esm/interface/decorator/api/route/custom-properties.interface.d.ts +6 -0
- package/dist/esm/interface/decorator/api/route/documentation-properties.interface.d.ts +5 -0
- package/dist/esm/interface/decorator/api/route/index.d.ts +7 -0
- package/dist/esm/interface/decorator/api/route/metadata/index.d.ts +3 -0
- package/dist/esm/interface/decorator/api/route/metadata/interface.d.ts +15 -0
- package/dist/esm/interface/decorator/api/route/metadata/resource.interface.d.ts +6 -0
- package/dist/esm/interface/decorator/api/route/metadata/route.interface.d.ts +7 -0
- package/dist/esm/interface/decorator/api/route/response/index.d.ts +2 -0
- package/dist/esm/interface/decorator/api/route/response/properties.interface.d.ts +9 -0
- package/dist/esm/interface/decorator/api/route/response/serialization-properties.interface.d.ts +3 -0
- package/dist/esm/interface/decorator/api/route/runtime-properties.interface.d.ts +11 -0
- package/dist/esm/interface/decorator/api/route/security/authentication-properties.interface.d.ts +9 -0
- package/dist/esm/interface/decorator/api/route/security/authorization-properties.interface.d.ts +4 -0
- package/dist/esm/interface/decorator/api/route/security/index.d.ts +3 -0
- package/dist/esm/interface/decorator/api/route/security/properties.interface.d.ts +6 -0
- package/dist/esm/interface/decorator/api/route/throttling/default-properties.interface.d.ts +4 -0
- package/dist/esm/interface/decorator/api/route/throttling/index.d.ts +2 -0
- package/dist/esm/interface/decorator/api/route/throttling/properties.interface.d.ts +4 -0
- package/dist/esm/interface/decorator/api/subscriber/function/filter.interface.d.ts +5 -0
- package/dist/esm/interface/decorator/api/subscriber/function/index.d.ts +2 -0
- package/dist/esm/interface/decorator/api/subscriber/function/properties.interface.d.ts +7 -0
- package/dist/esm/interface/decorator/api/subscriber/index.d.ts +2 -2
- package/dist/esm/interface/decorator/api/subscriber/route-properties.interface.d.ts +4 -0
- package/dist/esm/module/api/authorization.module.js +18 -1
- package/dist/esm/module/api/authorization.module.js.map +1 -1
- package/dist/esm/package.json +0 -1
- package/dist/esm/type/class/api/subscriber/route/after/create-context.type.d.ts +2 -2
- package/dist/esm/type/class/api/subscriber/route/after/delete-context.type.d.ts +2 -2
- package/dist/esm/type/class/api/subscriber/route/after/get/context.type.d.ts +2 -2
- package/dist/esm/type/class/api/subscriber/route/after/get/list-context.type.d.ts +2 -2
- package/dist/esm/type/class/api/subscriber/route/after/partial-update-context.type.d.ts +2 -2
- package/dist/esm/type/class/api/subscriber/route/after/update-context.type.d.ts +2 -2
- package/dist/esm/type/class/api/subscriber/route/before/create-context.type.d.ts +2 -2
- package/dist/esm/type/class/api/subscriber/route/before/delete-context.type.d.ts +2 -2
- package/dist/esm/type/class/api/subscriber/route/before/get/context.type.d.ts +2 -2
- package/dist/esm/type/class/api/subscriber/route/before/get/list-context.type.d.ts +2 -2
- package/dist/esm/type/class/api/subscriber/route/before/partial-update-context.type.d.ts +2 -2
- package/dist/esm/type/class/api/subscriber/route/before/update-context.type.d.ts +2 -2
- package/dist/esm/type/decorator/api/controller/properties/route/base/request/allowed-target.type.d.ts +9 -0
- package/dist/esm/type/decorator/api/controller/properties/route/base/request/index.d.ts +1 -1
- package/dist/esm/type/decorator/api/controller/properties/route/base/request/transformers.type.d.ts +7 -7
- package/dist/esm/type/decorator/api/controller/properties/route/base/response-transformers.type.d.ts +6 -6
- package/dist/esm/type/decorator/api/controller/transformer-config.type.d.ts +5 -5
- package/dist/esm/type/decorator/api/function/properties.type.d.ts +5 -3
- package/dist/esm/type/decorator/api/property/describe/dto/request-properties.type.d.ts +1 -1
- package/dist/esm/type/decorator/api/property/describe/properties/base/properties.type.d.ts +4 -4
- package/dist/esm/type/utility/dto/generate/allowed-combination.type.d.ts +4 -4
- package/dist/esm/utility/api/controller/apply/decorators.utility.js +59 -27
- package/dist/esm/utility/api/controller/apply/decorators.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/apply/metadata.utility.js +6 -2
- package/dist/esm/utility/api/controller/apply/metadata.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/get/dto.utility.js +6 -2
- package/dist/esm/utility/api/controller/get/dto.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/get-list/transform/filter.utility.js +5 -1
- 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 +4 -4
- package/dist/esm/utility/api/controller/handle-request-relations.utility.js +37 -11
- package/dist/esm/utility/api/controller/handle-request-relations.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/index.d.ts +1 -0
- package/dist/esm/utility/api/controller/serialize-route-response.utility.d.ts +14 -0
- package/dist/esm/utility/api/controller/serialize-route-response.utility.js +27 -0
- package/dist/esm/utility/api/controller/serialize-route-response.utility.js.map +1 -0
- package/dist/esm/utility/api/controller/transform-data.utility.d.ts +8 -7
- package/dist/esm/utility/api/controller/transform-data.utility.js +19 -16
- package/dist/esm/utility/api/controller/transform-data.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/validate-request.utility.d.ts +3 -3
- package/dist/esm/utility/api/controller/validate-request.utility.js +10 -9
- package/dist/esm/utility/api/controller/validate-request.utility.js.map +1 -1
- package/dist/esm/utility/api/controller/write/dto-swagger.utility.js +6 -2
- package/dist/esm/utility/api/controller/write/dto-swagger.utility.js.map +1 -1
- package/dist/esm/utility/api/function-transaction.utility.d.ts +20 -0
- package/dist/esm/utility/api/function-transaction.utility.js +50 -0
- package/dist/esm/utility/api/function-transaction.utility.js.map +1 -0
- package/dist/esm/utility/api/index.d.ts +1 -0
- package/dist/esm/utility/api/route/index.d.ts +1 -0
- package/dist/esm/utility/api/route/response/index.d.ts +2 -0
- package/dist/esm/utility/api/route/response/project-relation.utility.d.ts +11 -0
- package/dist/esm/utility/api/route/response/project-relation.utility.js +73 -0
- package/dist/esm/utility/api/route/response/project-relation.utility.js.map +1 -0
- package/dist/esm/utility/api/route/response/serialize.utility.d.ts +11 -0
- package/dist/esm/utility/api/route/response/serialize.utility.js +24 -0
- package/dist/esm/utility/api/route/response/serialize.utility.js.map +1 -0
- package/dist/esm/utility/dto/build-decorator.utility.js +5 -1
- package/dist/esm/utility/dto/build-decorator.utility.js.map +1 -1
- package/dist/esm/utility/dto/generate/core.utility.js +5 -1
- package/dist/esm/utility/dto/generate/core.utility.js.map +1 -1
- package/dist/esm/utility/dto/generate/dynamic.utility.js +5 -1
- package/dist/esm/utility/dto/generate/dynamic.utility.js.map +1 -1
- package/dist/esm/utility/dto/generate/exception.utility.js +5 -1
- package/dist/esm/utility/dto/generate/exception.utility.js.map +1 -1
- package/dist/esm/utility/dto/generate/filter-decorator.utility.js +5 -1
- package/dist/esm/utility/dto/generate/filter-decorator.utility.js.map +1 -1
- package/dist/esm/utility/dto/generate/get-list-response.utility.js +5 -1
- package/dist/esm/utility/dto/generate/get-list-response.utility.js.map +1 -1
- package/dist/esm/utility/dto/get/get-list-query-base-class.utility.js +5 -1
- 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 +5 -1
- package/dist/esm/utility/dto/handle-date-property.utility.js.map +1 -1
- package/dist/esm/utility/dto/is/property/should-be-marked.utility.js +7 -3
- 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 +8 -4
- package/dist/esm/utility/dto/is/should-be-generated.utility.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/enum/decorator/api/controller/request-transformer-type.enum.js.map +0 -1
- package/dist/cjs/interface/class/api/subscriber/route/execution/context-data.interface.d.ts +0 -82
- package/dist/cjs/interface/class/api/subscriber/route/execution/context.interface.d.ts +0 -29
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/request.interface.d.ts +0 -8
- package/dist/cjs/interface/decorator/api/controller/properties/route/base/response.interface.d.ts +0 -7
- package/dist/cjs/interface/decorator/api/method/authorization.interface.d.ts +0 -3
- package/dist/cjs/interface/decorator/api/method/throttler-properties.interface.d.ts +0 -4
- package/dist/cjs/interface/decorator/api/subscriber/function-properties.interface.d.ts +0 -5
- package/dist/cjs/type/decorator/api/controller/properties/route/base/request/relations.type.d.ts +0 -18
- package/dist/esm/enum/decorator/api/controller/request-transformer-type.enum.js.map +0 -1
- package/dist/esm/interface/class/api/subscriber/route/execution/context-data.interface.d.ts +0 -82
- package/dist/esm/interface/class/api/subscriber/route/execution/context.interface.d.ts +0 -29
- package/dist/esm/interface/decorator/api/controller/properties/route/base/request.interface.d.ts +0 -8
- package/dist/esm/interface/decorator/api/controller/properties/route/base/response.interface.d.ts +0 -7
- package/dist/esm/interface/decorator/api/method/authorization.interface.d.ts +0 -3
- package/dist/esm/interface/decorator/api/method/throttler-properties.interface.d.ts +0 -4
- package/dist/esm/interface/decorator/api/subscriber/function-properties.interface.d.ts +0 -5
- package/dist/esm/type/decorator/api/controller/properties/route/base/request/relations.type.d.ts +0 -18
- /package/dist/cjs/enum/decorator/api/controller/{request-transformer-type.enum.d.ts → request/transformer-type.enum.d.ts} +0 -0
- /package/dist/esm/enum/decorator/api/controller/{request-transformer-type.enum.d.ts → request/transformer-type.enum.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<p align="center">
|
|
9
9
|
<a aria-label="ElsiKora logo" href="https://elsikora.com">
|
|
10
10
|
<img src="https://img.shields.io/badge/MADE%20BY%20ElsiKora-333333.svg?style=for-the-badge" alt="ElsiKora">
|
|
11
|
-
</a> <img src="https://img.shields.io/badge/npm-blue.svg?style=for-the-badge&logo=npm&logoColor=white" alt="npm"> <img src="https://img.shields.io/badge/typescript-blue.svg?style=for-the-badge&logo=typescript&logoColor=white" alt="typescript"> <img src="https://img.shields.io/badge/nestjs-red.svg?style=for-the-badge&logo=nestjs&logoColor=white" alt="nestjs"> <img src="https://img.shields.io/badge/swagger-green.svg?style=for-the-badge&logo=swagger&logoColor=white" alt="swagger"> <img src="https://img.shields.io/badge/license-blue.svg?style=for-the-badge&logo=license&logoColor=white" alt="license"> <img src="https://img.shields.io/badge/version-1.
|
|
11
|
+
</a> <img src="https://img.shields.io/badge/npm-blue.svg?style=for-the-badge&logo=npm&logoColor=white" alt="npm"> <img src="https://img.shields.io/badge/typescript-blue.svg?style=for-the-badge&logo=typescript&logoColor=white" alt="typescript"> <img src="https://img.shields.io/badge/nestjs-red.svg?style=for-the-badge&logo=nestjs&logoColor=white" alt="nestjs"> <img src="https://img.shields.io/badge/swagger-green.svg?style=for-the-badge&logo=swagger&logoColor=white" alt="swagger"> <img src="https://img.shields.io/badge/license-blue.svg?style=for-the-badge&logo=license&logoColor=white" alt="license"> <img src="https://img.shields.io/badge/version-1.24.0-brightgreen.svg?style=for-the-badge&logo=v&logoColor=white" alt="version-1.24.0">
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
## 📚 Table of Contents
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
- [Advanced Usage](#advanced-usage)
|
|
22
22
|
- [Subscriber System (Hooks)](#subscriber-system-hooks-intercepting-and-extending-logic)
|
|
23
23
|
- [Swagger Documentation](#swagger-documentation)
|
|
24
|
-
- [
|
|
24
|
+
- [Current Status](#-current-status)
|
|
25
|
+
- [AI Agent Skill](#-ai-agent-skill)
|
|
25
26
|
- [FAQ](#-faq)
|
|
26
27
|
- [License](#-license)
|
|
27
28
|
|
|
@@ -45,19 +46,16 @@ The core philosophy of this library is built on four pillars: being **Declarativ
|
|
|
45
46
|
- ✨ **🌐 Full support for TypeScript with strong typing throughout the library**
|
|
46
47
|
- ✨ **Hooks and Subscriber System:** Intercept and extend business logic at both the controller and service level.
|
|
47
48
|
- ✨ **Dynamic and Polymorphic DTOs:** Generate DTOs on-the-fly based on discriminator fields.
|
|
48
|
-
- ✨ **
|
|
49
|
+
- ✨ **Guard-Based Field Exposure:** Generate route-specific response DTOs based on configured guard classes.
|
|
49
50
|
- ✨ **🔐 Declarative Authorization Policies:** Subscriber-style policies with automatic guard wiring, scopes, and response transforms.
|
|
50
51
|
- ✨ **Request Tracing:** Built-in `CorrelationIDResponseBodyInterceptor` to correlate requests and logs.
|
|
51
52
|
- ✨ **Convention over Configuration:** Smart defaults for service and DTO naming to reduce boilerplate.
|
|
52
53
|
|
|
53
54
|
## 🛠 Installation
|
|
54
55
|
|
|
55
|
-
```bash
|
|
56
|
-
## Installation
|
|
57
|
-
|
|
58
56
|
Install NestJS-Crud-Automator using your preferred package manager:
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
```bash
|
|
61
59
|
# Using npm
|
|
62
60
|
npm install @elsikora/nestjs-crud-automator
|
|
63
61
|
|
|
@@ -66,22 +64,27 @@ yarn add @elsikora/nestjs-crud-automator
|
|
|
66
64
|
|
|
67
65
|
# Using pnpm
|
|
68
66
|
pnpm add @elsikora/nestjs-crud-automator
|
|
69
|
-
|
|
67
|
+
```
|
|
70
68
|
|
|
71
69
|
### Prerequisites
|
|
72
70
|
|
|
73
71
|
Make sure you have the following dependencies installed in your NestJS project:
|
|
74
72
|
|
|
75
|
-
- NestJS
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
73
|
+
- NestJS `@nestjs/common` and `@nestjs/core` `>=11.0.5`
|
|
74
|
+
- `@nestjs/passport` `>=11.0.5`
|
|
75
|
+
- `@nestjs/platform-fastify` `>=11.0.5`
|
|
76
|
+
- `@nestjs/swagger` `>=11.0.3`
|
|
77
|
+
- `@nestjs/throttler` `>=6.4.0`
|
|
78
|
+
- TypeORM `>=0.3.20`
|
|
79
|
+
- Fastify `>=5.0.0`
|
|
80
|
+
- `class-validator` `>=0.14.1`
|
|
81
|
+
- `class-transformer` `>=0.5.1`
|
|
82
|
+
- `lodash` `>=4.17.21`
|
|
80
83
|
|
|
81
84
|
You might need to install these peer dependencies if they're not already in your project:
|
|
82
85
|
|
|
83
|
-
|
|
84
|
-
npm install @nestjs/common @nestjs/swagger @nestjs/throttler typeorm class-transformer class-validator
|
|
86
|
+
```bash
|
|
87
|
+
npm install @nestjs/common @nestjs/core @nestjs/passport @nestjs/platform-fastify @nestjs/swagger @nestjs/throttler typeorm class-transformer class-validator fastify lodash
|
|
85
88
|
```
|
|
86
89
|
|
|
87
90
|
## 💡 Usage
|
|
@@ -94,7 +97,7 @@ First, define your entity with the `ApiPropertyDescribe` decorators to provide m
|
|
|
94
97
|
|
|
95
98
|
```typescript
|
|
96
99
|
import { Entity, PrimaryGeneratedColumn, Column } from "typeorm";
|
|
97
|
-
import { ApiPropertyDescribe, EApiPropertyDescribeType, EApiPropertyStringType, EApiPropertyDateIdentifier, EApiPropertyDateType } from "@elsikora/nestjs-crud-automator";
|
|
100
|
+
import { ApiPropertyDescribe, EApiPropertyDescribeType, EApiPropertyStringType, EApiPropertyDateIdentifier, EApiPropertyDateType, GetDefaultStringFormatProperties } from "@elsikora/nestjs-crud-automator";
|
|
98
101
|
|
|
99
102
|
@Entity("users")
|
|
100
103
|
export class UserEntity {
|
|
@@ -122,10 +125,7 @@ export class UserEntity {
|
|
|
122
125
|
type: EApiPropertyDescribeType.STRING,
|
|
123
126
|
description: "User email",
|
|
124
127
|
format: EApiPropertyStringType.EMAIL,
|
|
125
|
-
|
|
126
|
-
maxLength: 255,
|
|
127
|
-
pattern: "/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/",
|
|
128
|
-
exampleValue: "user@example.com",
|
|
128
|
+
...GetDefaultStringFormatProperties(EApiPropertyStringType.EMAIL),
|
|
129
129
|
})
|
|
130
130
|
email: string;
|
|
131
131
|
|
|
@@ -171,7 +171,7 @@ export class UserService extends ApiServiceBase<UserEntity> {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
// You can add custom methods here that go beyond basic CRUD
|
|
174
|
-
async findByEmail(email: string): Promise<UserEntity |
|
|
174
|
+
async findByEmail(email: string): Promise<UserEntity | null> {
|
|
175
175
|
return this.repository.findOne({ where: { email } });
|
|
176
176
|
}
|
|
177
177
|
}
|
|
@@ -182,35 +182,44 @@ export class UserService extends ApiServiceBase<UserEntity> {
|
|
|
182
182
|
Create a controller with the `ApiController` decorator to generate all CRUD endpoints:
|
|
183
183
|
|
|
184
184
|
```typescript
|
|
185
|
-
import {
|
|
186
|
-
import { ApiController, EApiRouteType } from "@elsikora/nestjs-crud-automator";
|
|
185
|
+
import { ApiController, EApiAuthenticationType, EApiRouteType } from "@elsikora/nestjs-crud-automator";
|
|
187
186
|
import { UserEntity } from "./user.entity";
|
|
188
187
|
import { UserService } from "./user.service";
|
|
189
188
|
import { JwtAuthGuard } from "../auth/guards/jwt-auth.guard";
|
|
190
189
|
|
|
191
|
-
@Controller("users")
|
|
192
190
|
@ApiController<UserEntity>({
|
|
193
191
|
entity: UserEntity,
|
|
194
192
|
name: "Users",
|
|
193
|
+
path: "users",
|
|
195
194
|
routes: {
|
|
196
195
|
[EApiRouteType.CREATE]: {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
196
|
+
security: {
|
|
197
|
+
authentication: {
|
|
198
|
+
type: EApiAuthenticationType.USER,
|
|
199
|
+
guard: JwtAuthGuard,
|
|
200
|
+
bearerStrategies: ["jwt"],
|
|
201
|
+
},
|
|
200
202
|
},
|
|
201
203
|
},
|
|
202
204
|
[EApiRouteType.UPDATE]: {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
security: {
|
|
206
|
+
authentication: {
|
|
207
|
+
type: EApiAuthenticationType.USER,
|
|
208
|
+
guard: JwtAuthGuard,
|
|
209
|
+
bearerStrategies: ["jwt"],
|
|
210
|
+
},
|
|
206
211
|
},
|
|
207
212
|
},
|
|
208
213
|
[EApiRouteType.DELETE]: {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
214
|
+
security: {
|
|
215
|
+
authentication: {
|
|
216
|
+
type: EApiAuthenticationType.USER,
|
|
217
|
+
guard: JwtAuthGuard,
|
|
218
|
+
bearerStrategies: ["jwt"],
|
|
219
|
+
},
|
|
212
220
|
},
|
|
213
221
|
},
|
|
222
|
+
[EApiRouteType.PARTIAL_UPDATE]: {},
|
|
214
223
|
[EApiRouteType.GET]: {},
|
|
215
224
|
[EApiRouteType.GET_LIST]: {},
|
|
216
225
|
},
|
|
@@ -257,7 +266,7 @@ export class UserController {
|
|
|
257
266
|
Automatically transform request data:
|
|
258
267
|
|
|
259
268
|
```typescript
|
|
260
|
-
import { ApiController,
|
|
269
|
+
import { ApiController, EApiControllerRequestTarget, EApiControllerRequestTransformerType, EApiRouteType, TRANSFORMER_VALUE_DTO_CONSTANT } from "@elsikora/nestjs-crud-automator";
|
|
261
270
|
|
|
262
271
|
@ApiController<UserEntity>({
|
|
263
272
|
entity: UserEntity,
|
|
@@ -265,8 +274,8 @@ import { ApiController, EApiRouteType, EApiDtoType, EApiControllerRequestTransfo
|
|
|
265
274
|
routes: {
|
|
266
275
|
[EApiRouteType.CREATE]: {
|
|
267
276
|
request: {
|
|
268
|
-
|
|
269
|
-
|
|
277
|
+
[EApiControllerRequestTarget.BODY]: {
|
|
278
|
+
transformers: [
|
|
270
279
|
{
|
|
271
280
|
key: "createdBy",
|
|
272
281
|
type: EApiControllerRequestTransformerType.DYNAMIC,
|
|
@@ -289,24 +298,27 @@ export class UserController {
|
|
|
289
298
|
Automatically load related entities:
|
|
290
299
|
|
|
291
300
|
```typescript
|
|
292
|
-
import { ApiController,
|
|
301
|
+
import { ApiController, EApiControllerLoadRelationsStrategy, EApiControllerRelationReferenceShape, EApiRouteType } from "@elsikora/nestjs-crud-automator";
|
|
293
302
|
|
|
294
303
|
@ApiController<PostEntity>({
|
|
295
304
|
entity: PostEntity,
|
|
296
305
|
name: "Posts",
|
|
297
306
|
routes: {
|
|
298
|
-
[EApiRouteType.
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
307
|
+
[EApiRouteType.CREATE]: {
|
|
308
|
+
relations: {
|
|
309
|
+
request: {
|
|
310
|
+
reference: { shape: EApiControllerRelationReferenceShape.SCALAR },
|
|
311
|
+
load: {
|
|
312
|
+
shouldLoad: true,
|
|
313
|
+
relationStrategy: EApiControllerLoadRelationsStrategy.AUTO,
|
|
314
|
+
serviceStrategy: EApiControllerLoadRelationsStrategy.AUTO,
|
|
315
|
+
shouldForceAllServicesToBeSpecified: false,
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
response: {
|
|
319
|
+
reference: { shape: EApiControllerRelationReferenceShape.OBJECT, key: "id" },
|
|
320
|
+
load: { include: { author: true, comments: true } },
|
|
306
321
|
},
|
|
307
|
-
},
|
|
308
|
-
response: {
|
|
309
|
-
relations: ["author", "comments"],
|
|
310
322
|
},
|
|
311
323
|
},
|
|
312
324
|
},
|
|
@@ -315,7 +327,6 @@ export class PostController {
|
|
|
315
327
|
constructor(
|
|
316
328
|
public service: PostService,
|
|
317
329
|
public authorService: UserService,
|
|
318
|
-
public commentsService: CommentService,
|
|
319
330
|
) {}
|
|
320
331
|
}
|
|
321
332
|
```
|
|
@@ -325,7 +336,7 @@ export class PostController {
|
|
|
325
336
|
Use custom DTOs instead of auto-generated ones:
|
|
326
337
|
|
|
327
338
|
```typescript
|
|
328
|
-
import { ApiController, EApiRouteType } from "@elsikora/nestjs-crud-automator";
|
|
339
|
+
import { ApiController, EApiDtoType, EApiRouteType } from "@elsikora/nestjs-crud-automator";
|
|
329
340
|
import { CreateUserDto } from "./dto/create-user.dto";
|
|
330
341
|
import { UpdateUserDto } from "./dto/update-user.dto";
|
|
331
342
|
import { UserResponseDto } from "./dto/user-response.dto";
|
|
@@ -336,14 +347,14 @@ import { UserResponseDto } from "./dto/user-response.dto";
|
|
|
336
347
|
routes: {
|
|
337
348
|
[EApiRouteType.CREATE]: {
|
|
338
349
|
dto: {
|
|
339
|
-
|
|
340
|
-
|
|
350
|
+
[EApiDtoType.BODY]: CreateUserDto,
|
|
351
|
+
[EApiDtoType.RESPONSE]: UserResponseDto,
|
|
341
352
|
},
|
|
342
353
|
},
|
|
343
354
|
[EApiRouteType.UPDATE]: {
|
|
344
355
|
dto: {
|
|
345
|
-
|
|
346
|
-
|
|
356
|
+
[EApiDtoType.BODY]: UpdateUserDto,
|
|
357
|
+
[EApiDtoType.RESPONSE]: UserResponseDto,
|
|
347
358
|
},
|
|
348
359
|
},
|
|
349
360
|
},
|
|
@@ -355,14 +366,14 @@ export class UserController {
|
|
|
355
366
|
|
|
356
367
|
For `GET_LIST`, response DTOs support two explicit modes:
|
|
357
368
|
|
|
358
|
-
- `
|
|
359
|
-
- `
|
|
369
|
+
- `[EApiDtoType.RESPONSE]: PublicUserListResponseDto` when the app owns the whole list wrapper.
|
|
370
|
+
- `[EApiDtoType.RESPONSE]: { itemType: PublicUserResponseDto }` when the framework owns the list wrapper and the app owns each item shape.
|
|
360
371
|
|
|
361
372
|
Use the item DTO mode when you only need to narrow each returned item:
|
|
362
373
|
|
|
363
374
|
```typescript
|
|
364
375
|
import { Expose } from "class-transformer";
|
|
365
|
-
import { ApiController, EApiRouteType } from "@elsikora/nestjs-crud-automator";
|
|
376
|
+
import { ApiController, EApiDtoType, EApiRouteType } from "@elsikora/nestjs-crud-automator";
|
|
366
377
|
|
|
367
378
|
class PublicUserResponseDto {
|
|
368
379
|
@Expose()
|
|
@@ -377,7 +388,7 @@ class PublicUserResponseDto {
|
|
|
377
388
|
routes: {
|
|
378
389
|
[EApiRouteType.GET_LIST]: {
|
|
379
390
|
dto: {
|
|
380
|
-
|
|
391
|
+
[EApiDtoType.RESPONSE]: {
|
|
381
392
|
itemType: PublicUserResponseDto,
|
|
382
393
|
name: "PublicUserListResponseDto",
|
|
383
394
|
},
|
|
@@ -399,14 +410,11 @@ Authorization now has two first-class modes:
|
|
|
399
410
|
- `hooks`: auto-discovered `@ApiAuthorizationPolicy({ entity })` classes
|
|
400
411
|
- `iam`: attachment/document-based IAM evaluation with optional boundaries
|
|
401
412
|
|
|
402
|
-
`@ApiControllerSecurable()` is marker-only. It turns on the authorization pipeline, but mode selection and all authorization configuration live in `@ApiController({ authorization: ... })`. Each route uses exactly one mode, and route config can override the controller default with `routes[routeType].authorization.mode`.
|
|
413
|
+
`@ApiControllerSecurable()` is marker-only. It turns on the authorization pipeline, but mode selection and all authorization configuration live in `@ApiController({ authorization: ... })`. Each route uses exactly one mode, and route config can override the controller default with `routes[routeType].security.authorization.mode`.
|
|
403
414
|
|
|
404
415
|
#### Runtime authorization actions
|
|
405
416
|
|
|
406
|
-
`@ApiMethod(...)` uses
|
|
407
|
-
|
|
408
|
-
- `action` is a documentation hint for Swagger summaries and descriptions
|
|
409
|
-
- `authorization.action` is the runtime authorization action string used by hooks and IAM
|
|
417
|
+
`@ApiMethod(...)` uses one route action identity: `metadata.resource.action`. Generated CRUD routes also carry `metadata.route.type` for built-in CRUD/IAM mapping.
|
|
410
418
|
|
|
411
419
|
Auto-generated CRUD routes receive built-in runtime actions automatically:
|
|
412
420
|
|
|
@@ -421,49 +429,79 @@ Custom secured routes should declare their own domain-specific action strings:
|
|
|
421
429
|
|
|
422
430
|
```typescript
|
|
423
431
|
@ApiMethod<UserEntity>({
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
432
|
+
metadata: {
|
|
433
|
+
resource: {
|
|
434
|
+
action: "update.promote",
|
|
435
|
+
entity: UserEntity,
|
|
436
|
+
},
|
|
437
|
+
route: {
|
|
438
|
+
method: RequestMethod.POST,
|
|
439
|
+
path: ":id/promote",
|
|
440
|
+
},
|
|
441
|
+
security: {
|
|
442
|
+
authorization: { mode: EApiAuthorizationMode.HOOKS },
|
|
443
|
+
},
|
|
444
|
+
response: {
|
|
445
|
+
status: HttpStatus.OK,
|
|
446
|
+
type: UserResponseDto,
|
|
447
|
+
},
|
|
448
|
+
},
|
|
449
|
+
})
|
|
450
|
+
public promote(@Param("id") id: string) {
|
|
451
|
+
return this.service.promote(id);
|
|
452
|
+
}
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
The same `metadata.resource.action` value is what hooks receive as `context.action` and what IAM turns into a namespaced action such as `admin:user:update.promote`.
|
|
456
|
+
|
|
457
|
+
Use `@ApiRouteCustom(...)` when a custom controller route should also participate in the custom route runtime: request/response transformers, route subscribers, relation loading/projection, authorization result transforms, and response serialization. `@ApiMethod(...)` remains the low-level metadata/decorator composer.
|
|
458
|
+
|
|
459
|
+
```typescript
|
|
460
|
+
@ApiRouteCustom<UserEntity>({
|
|
461
|
+
resource: { action: "update.promote", entity: UserEntity },
|
|
462
|
+
route: { method: RequestMethod.POST, path: ":id/promote" },
|
|
463
|
+
security: {
|
|
464
|
+
authorization: { mode: EApiAuthorizationMode.HOOKS },
|
|
465
|
+
},
|
|
466
|
+
response: {
|
|
467
|
+
status: HttpStatus.OK,
|
|
468
|
+
type: UserResponseDto,
|
|
469
|
+
serialization: { isEnabled: true },
|
|
427
470
|
},
|
|
428
|
-
entity: UserEntity,
|
|
429
|
-
httpCode: HttpStatus.OK,
|
|
430
|
-
method: RequestMethod.POST,
|
|
431
|
-
path: ":id/promote",
|
|
432
|
-
responseType: UserResponseDto,
|
|
433
471
|
})
|
|
434
472
|
public promote(@Param("id") id: string) {
|
|
435
473
|
return this.service.promote(id);
|
|
436
474
|
}
|
|
437
475
|
```
|
|
438
476
|
|
|
439
|
-
|
|
477
|
+
Function decorators support explicit transaction modes without exposing `EntityManager` as a public method argument:
|
|
478
|
+
|
|
479
|
+
```typescript
|
|
480
|
+
@ApiFunctionCustom<UserEntity>({
|
|
481
|
+
action: "bulkPromote",
|
|
482
|
+
entity: UserEntity,
|
|
483
|
+
transaction: { mode: EApiFunctionTransactionMode.REQUIRED },
|
|
484
|
+
})
|
|
485
|
+
async bulkPromote(ids: Array<string>): Promise<Array<UserEntity>> {
|
|
486
|
+
const context = this.getApiFunctionContext<UserEntity>();
|
|
487
|
+
|
|
488
|
+
return await Promise.all(ids.map(async (id) => await context.operations.update({ id }, { role: "admin" })));
|
|
489
|
+
}
|
|
490
|
+
```
|
|
440
491
|
|
|
441
492
|
```typescript
|
|
442
493
|
// app.module.ts
|
|
443
|
-
import type {
|
|
444
|
-
IApiAuthorizationPrincipal,
|
|
445
|
-
IApiHookPermissionSource,
|
|
446
|
-
IApiPolicyAttachmentSource,
|
|
447
|
-
IApiPolicyDocumentSource,
|
|
448
|
-
IApiResolvedPolicyAttachments,
|
|
449
|
-
} from "@elsikora/nestjs-crud-automator";
|
|
494
|
+
import type { IApiAuthorizationPrincipal, IApiHookPermissionSource, IApiPolicyAttachmentSource, IApiPolicyDocumentSource, IApiResolvedPolicyAttachments } from "@elsikora/nestjs-crud-automator";
|
|
450
495
|
|
|
451
496
|
import { Module } from "@nestjs/common";
|
|
452
497
|
|
|
453
|
-
import {
|
|
454
|
-
ApiAuthorizationModule,
|
|
455
|
-
EApiAuthorizationPrincipalType,
|
|
456
|
-
EApiPolicySourceType,
|
|
457
|
-
AuthorizationResolveDefaultPrincipal,
|
|
458
|
-
} from "@elsikora/nestjs-crud-automator";
|
|
498
|
+
import { ApiAuthorizationModule, EApiAuthorizationPrincipalType, EApiPolicyEffect, EApiPolicySourceType, AuthorizationResolveDefaultPrincipal } from "@elsikora/nestjs-crud-automator";
|
|
459
499
|
|
|
460
500
|
const hookPermissionSource: IApiHookPermissionSource = {
|
|
461
501
|
async getPermissions(principal: IApiAuthorizationPrincipal): Promise<ReadonlyArray<string>> {
|
|
462
502
|
const permissions = principal.claims?.permissions;
|
|
463
503
|
|
|
464
|
-
return Array.isArray(permissions)
|
|
465
|
-
? permissions.filter((value): value is string => typeof value === "string")
|
|
466
|
-
: [];
|
|
504
|
+
return Array.isArray(permissions) ? permissions.filter((value): value is string => typeof value === "string") : [];
|
|
467
505
|
},
|
|
468
506
|
};
|
|
469
507
|
|
|
@@ -494,8 +532,8 @@ const iamDocumentSource: IApiPolicyDocumentSource = {
|
|
|
494
532
|
"resource.operatorId": "operator-1",
|
|
495
533
|
},
|
|
496
534
|
},
|
|
497
|
-
Effect:
|
|
498
|
-
Resource: ["gameport:admin:item
|
|
535
|
+
Effect: EApiPolicyEffect.ALLOW,
|
|
536
|
+
Resource: ["gameport:admin:item/*"],
|
|
499
537
|
Sid: "AllowOperatorItems",
|
|
500
538
|
},
|
|
501
539
|
],
|
|
@@ -549,10 +587,7 @@ Use `ApiAuthorizationModule.forRootAsync(...)` when the resolver or IAM sources
|
|
|
549
587
|
// authorization.module.ts
|
|
550
588
|
import { Injectable, Module } from "@nestjs/common";
|
|
551
589
|
|
|
552
|
-
import {
|
|
553
|
-
ApiAuthorizationModule,
|
|
554
|
-
AuthorizationResolveDefaultPrincipal,
|
|
555
|
-
} from "@elsikora/nestjs-crud-automator";
|
|
590
|
+
import { ApiAuthorizationModule, AuthorizationResolveDefaultPrincipal } from "@elsikora/nestjs-crud-automator";
|
|
556
591
|
|
|
557
592
|
@Injectable()
|
|
558
593
|
class DbPrincipalResolver {
|
|
@@ -600,11 +635,7 @@ Use the controller `authorization` block to pick the mode:
|
|
|
600
635
|
|
|
601
636
|
```typescript
|
|
602
637
|
// user.controller.ts
|
|
603
|
-
import {
|
|
604
|
-
EApiAuthorizationMode,
|
|
605
|
-
ApiController,
|
|
606
|
-
ApiControllerSecurable,
|
|
607
|
-
} from "@elsikora/nestjs-crud-automator";
|
|
638
|
+
import { EApiAuthorizationMode, ApiController, ApiControllerSecurable } from "@elsikora/nestjs-crud-automator";
|
|
608
639
|
|
|
609
640
|
@ApiControllerSecurable()
|
|
610
641
|
@ApiController<UserEntity>({
|
|
@@ -613,6 +644,7 @@ import {
|
|
|
613
644
|
},
|
|
614
645
|
entity: UserEntity,
|
|
615
646
|
path: "users",
|
|
647
|
+
routes: {},
|
|
616
648
|
})
|
|
617
649
|
export class UserController {
|
|
618
650
|
constructor(public service: UserService) {}
|
|
@@ -623,18 +655,9 @@ Hooks mode keeps entity-based policy autodiscovery:
|
|
|
623
655
|
|
|
624
656
|
```typescript
|
|
625
657
|
// policies/user-hooks.policy.ts
|
|
626
|
-
import type {
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
TApiAuthorizationPolicyBeforeGetListContext,
|
|
630
|
-
TApiAuthorizationPolicyBeforeUpdateContext,
|
|
631
|
-
} from "@elsikora/nestjs-crud-automator";
|
|
632
|
-
|
|
633
|
-
import {
|
|
634
|
-
EApiAuthorizationPermissionMatch,
|
|
635
|
-
ApiAuthorizationPolicy,
|
|
636
|
-
ApiAuthorizationPolicyBase,
|
|
637
|
-
} from "@elsikora/nestjs-crud-automator";
|
|
658
|
+
import type { IApiAuthorizationRuleContext, IApiAuthorizationScope, TApiAuthorizationPolicyBeforeGetListContext, TApiAuthorizationPolicyBeforeUpdateContext } from "@elsikora/nestjs-crud-automator";
|
|
659
|
+
|
|
660
|
+
import { EApiAuthorizationPermissionMatch, ApiAuthorizationPolicy, ApiAuthorizationPolicyBase } from "@elsikora/nestjs-crud-automator";
|
|
638
661
|
|
|
639
662
|
@ApiAuthorizationPolicy<UserEntity>({ entity: UserEntity, priority: 200 })
|
|
640
663
|
export class UserHooksPolicy extends ApiAuthorizationPolicyBase<UserEntity> {
|
|
@@ -651,7 +674,9 @@ export class UserHooksPolicy extends ApiAuthorizationPolicyBase<UserEntity> {
|
|
|
651
674
|
}
|
|
652
675
|
|
|
653
676
|
public onBeforeGetList(context: TApiAuthorizationPolicyBeforeGetListContext<UserEntity>) {
|
|
654
|
-
|
|
677
|
+
const requestedOperatorId = context.query.operatorId as string | undefined;
|
|
678
|
+
|
|
679
|
+
if (requestedOperatorId && requestedOperatorId !== this.getOperatorId(context.principal)) {
|
|
655
680
|
return [];
|
|
656
681
|
}
|
|
657
682
|
|
|
@@ -678,6 +703,15 @@ export class UserHooksPolicy extends ApiAuthorizationPolicyBase<UserEntity> {
|
|
|
678
703
|
}
|
|
679
704
|
```
|
|
680
705
|
|
|
706
|
+
Register hooks policies as Nest providers; discovery only sees provider instances:
|
|
707
|
+
|
|
708
|
+
```typescript
|
|
709
|
+
@Module({
|
|
710
|
+
providers: [UserHooksPolicy],
|
|
711
|
+
})
|
|
712
|
+
export class UserModule {}
|
|
713
|
+
```
|
|
714
|
+
|
|
681
715
|
Generated CRUD routes dispatch to CRUD hooks such as `onBeforeGetList` or `onBeforeUpdate` using the internal `routeType`. Custom `@ApiMethod(...)` routes do not use CRUD hook names; handle them in `getCustomActionRule(action, context)` instead:
|
|
682
716
|
|
|
683
717
|
```typescript
|
|
@@ -719,6 +753,7 @@ IAM mode stays storage-agnostic. Attachments and documents come from your config
|
|
|
719
753
|
},
|
|
720
754
|
entity: ItemEntity,
|
|
721
755
|
path: "items",
|
|
756
|
+
routes: {},
|
|
722
757
|
})
|
|
723
758
|
export class ItemController {
|
|
724
759
|
constructor(public service: ItemService) {}
|
|
@@ -733,7 +768,7 @@ Generated CRUD actions are normalized to IAM-friendly names inside the configure
|
|
|
733
768
|
- `update` / `partialUpdate` -> `<policyNamespace>:update`
|
|
734
769
|
- `delete` -> `<policyNamespace>:delete`
|
|
735
770
|
|
|
736
|
-
Custom `@ApiMethod(...)` actions pass through unchanged after the namespace. For example, `
|
|
771
|
+
Custom `@ApiMethod(...)` actions pass through unchanged after the namespace. For example, `resource.action: "update.promote"` becomes `admin:item:update.promote` when `policyNamespace` is `admin:item`.
|
|
737
772
|
|
|
738
773
|
The runtime resolves a `principal`, dispatches to the selected mode, and stores a unified `authorizationDecision` on the request. Hooks mode traces matched rules and resolved permissions; IAM mode traces attachments, documents, statements, boundaries, and final decision type. For out-of-band checks, inject `ApiAuthorizationSimulator` and call `evaluate(...)` with the same controller authorization metadata you use at runtime.
|
|
739
774
|
|
|
@@ -744,6 +779,7 @@ Important IAM details from the current implementation:
|
|
|
744
779
|
- route filters and authorization scopes are merged with logical `AND`, not overwrite semantics
|
|
745
780
|
- impossible conflicts collapse to a match-nothing branch instead of rewriting the requested filter
|
|
746
781
|
- relation payloads can be raw UUID strings, so create/update conditions like `request.body.operator = "${principal.attributes.operatorId}"` work without hooks fallback
|
|
782
|
+
- `{id}` placeholders belong to `resourceDefinition.resourcePath`; policy document `Resource` entries should use concrete strings or wildcards such as `gameport:admin:item/*`
|
|
747
783
|
|
|
748
784
|
### `CorrelationIDResponseBodyInterceptor`: Request Tracing
|
|
749
785
|
|
|
@@ -785,7 +821,7 @@ This is the most powerful feature for extending the default behavior. It allows
|
|
|
785
821
|
|
|
786
822
|
#### Enabling the Subscriber System
|
|
787
823
|
|
|
788
|
-
To get the subscriber system working, you need to follow **
|
|
824
|
+
To get the subscriber system working, you need to follow **four mandatory steps**:
|
|
789
825
|
|
|
790
826
|
1. **Import `ApiSubscriberModule`**: This module provides the `ApiSubscriberDiscoveryService`, which is responsible for discovering your subscribers. You need to import it into the root module of your application. `app.module.ts`
|
|
791
827
|
|
|
@@ -807,27 +843,33 @@ To get the subscriber system working, you need to follow **three mandatory steps
|
|
|
807
843
|
```typescript
|
|
808
844
|
import { ApiController, ApiControllerObservable } from "@elsikora/nestjs-crud-automator";
|
|
809
845
|
|
|
810
|
-
@Controller("posts")
|
|
811
846
|
@ApiController({
|
|
812
|
-
|
|
847
|
+
entity: PostEntity,
|
|
848
|
+
path: "posts",
|
|
849
|
+
routes: {},
|
|
813
850
|
})
|
|
814
851
|
@ApiControllerObservable() // <--- IMPORTANT
|
|
815
852
|
export class PostController {
|
|
816
|
-
|
|
853
|
+
/* ... */
|
|
817
854
|
}
|
|
818
855
|
```
|
|
819
856
|
|
|
820
|
-
3. **Make the service "observable"**: Similarly, add the `@ApiServiceObservable()` decorator to the service class.
|
|
857
|
+
3. **Make the service "observable"**: Similarly, add the `@ApiServiceObservable()` decorator to the service class.
|
|
858
|
+
|
|
859
|
+
```typescript
|
|
860
|
+
import { ApiService, ApiServiceBase, ApiServiceObservable } from "@elsikora/nestjs-crud-automator";
|
|
861
|
+
|
|
862
|
+
@Injectable()
|
|
863
|
+
@ApiService({
|
|
864
|
+
entity: PostEntity,
|
|
865
|
+
})
|
|
866
|
+
@ApiServiceObservable() // <--- IMPORTANT
|
|
867
|
+
export class PostService extends ApiServiceBase<PostEntity> {
|
|
868
|
+
/* ... */
|
|
869
|
+
}
|
|
870
|
+
```
|
|
821
871
|
|
|
822
|
-
|
|
823
|
-
@ApiService({
|
|
824
|
-
/* ... */
|
|
825
|
-
})
|
|
826
|
-
@ApiServiceObservable() // <--- IMPORTANT
|
|
827
|
-
export class PostService extends ApiServiceBase<Post> {
|
|
828
|
-
/* ... */
|
|
829
|
-
}
|
|
830
|
-
```
|
|
872
|
+
4. **Register subscriber classes as Nest providers**: discovery only sees provider instances.
|
|
831
873
|
|
|
832
874
|
Without these steps, your subscriber classes will simply not be discovered and called.
|
|
833
875
|
|
|
@@ -874,7 +916,7 @@ In case of an error at any stage, execution is interrupted, and the correspondin
|
|
|
874
916
|
const createdPost = context.result;
|
|
875
917
|
|
|
876
918
|
// Fully typed access to authentication and request data
|
|
877
|
-
|
|
919
|
+
const currentUser = context.DATA.authenticationRequest?.user as { id: string } | undefined;
|
|
878
920
|
const clientIp = context.DATA.ip;
|
|
879
921
|
|
|
880
922
|
if (createdPost && currentUser) {
|
|
@@ -986,43 +1028,51 @@ The library provides advanced filtering capabilities for list endpoints:
|
|
|
986
1028
|
|
|
987
1029
|
This query would search for users with "john" in their username and created between Jan 1 and Dec 31, 2023.
|
|
988
1030
|
|
|
1031
|
+
## 🛣 Current Status
|
|
1032
|
+
|
|
1033
|
+
The current public package focuses on NestJS REST controllers backed by TypeORM repositories. Core CRUD generation, DTO generation, Swagger/OpenAPI metadata, request/response transformers, relation loading, pagination, filtering/sorting, subscribers, and hooks/IAM authorization are implemented.
|
|
1034
|
+
|
|
1035
|
+
MongoDB, GraphQL, soft deletes, bulk operations, general-purpose cache integration, and custom parameter decorators are not part of the current public contract. Authorization policy rule caching and explicit authorization cache invalidation are supported.
|
|
1036
|
+
|
|
989
1037
|
## 🛣 Roadmap
|
|
990
1038
|
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
| Task / Feature | Status |
|
|
994
|
-
| ------------------------------------------- | -------------- |
|
|
995
|
-
| Core CRUD operations | ✅ Done |
|
|
996
|
-
| TypeORM integration | ✅ Done |
|
|
997
|
-
| Swagger/OpenAPI documentation | ✅ Done |
|
|
998
|
-
| Validation with class-validator | ✅ Done |
|
|
999
|
-
| Transformation with class-transformer | ✅ Done |
|
|
1000
|
-
| Advanced filtering for GET_LIST operation | ✅ Done |
|
|
1001
|
-
| Authentication guard integration | ✅ Done |
|
|
1002
|
-
| Request/response transformers | ✅ Done |
|
|
1003
|
-
| Relation loading strategies | ✅ Done |
|
|
1004
|
-
| Custom validator integration | ✅ Done |
|
|
1005
|
-
| Pagination support | ✅ Done |
|
|
1006
|
-
| Error handling with standardized responses | ✅ Done |
|
|
1007
|
-
| Support for TypeScript decorators | ✅ Done |
|
|
1008
|
-
| Support for ESM and CommonJS modules | ✅ Done |
|
|
1009
|
-
| Subscriber System | ✅ Done |
|
|
1010
|
-
| Hooks and IAM authorization pipeline | ✅ Done |
|
|
1011
|
-
| DI-backed authorization bootstrap | ✅ Done |
|
|
1012
|
-
| Scope-safe authorization filtering | ✅ Done |
|
|
1013
|
-
| MongoDB support | 🚧 In Progress |
|
|
1014
|
-
| GraphQL integration | 🚧 In Progress |
|
|
1015
|
-
| Support for soft deletes | 🚧 In Progress |
|
|
1016
|
-
| Cache integration | 🚧 In Progress |
|
|
1017
|
-
| Audit logging middleware | 🚧 In Progress |
|
|
1018
|
-
| Bulk operations (create many, update many) | 🚧 In Progress |
|
|
1019
|
-
| Query complexity analyzer | 🚧 In Progress |
|
|
1020
|
-
| Rate limiting enhancements | 🚧 In Progress |
|
|
1021
|
-
| Custom parameter decorators | 🚧 In Progress |
|
|
1039
|
+
The roadmap is aligned with the current source contract rather than older docs-only examples.
|
|
1022
1040
|
|
|
1023
|
-
|
|
1041
|
+
### Available Now
|
|
1024
1042
|
|
|
1025
|
-
|
|
1043
|
+
- REST CRUD controller and service generation for TypeORM entities
|
|
1044
|
+
- Entity-driven DTO generation for body, query, parameters, and response contracts
|
|
1045
|
+
- Custom DTO support, including nested manual DTOs and GET_LIST item response DTOs
|
|
1046
|
+
- Swagger/OpenAPI metadata generation for generated and custom routes
|
|
1047
|
+
- Pagination, filtering, sorting, request validators, and request/response transformers
|
|
1048
|
+
- Request and response relation loading with configurable reference projection
|
|
1049
|
+
- Route and function subscribers, including custom route/function hooks and error hooks
|
|
1050
|
+
- Hooks-mode authorization policies and IAM-style policy document authorization
|
|
1051
|
+
- Function transaction scopes for generated and custom service operations
|
|
1052
|
+
- Environment-agnostic AI guidance bundle for AI-assisted development
|
|
1053
|
+
|
|
1054
|
+
### Current Focus
|
|
1055
|
+
|
|
1056
|
+
- Keep `README.md`, `docs/`, and `ai/` synchronized with the public TypeScript interfaces
|
|
1057
|
+
- Expand examples for `ApiRouteCustom`, `ApiFunctionCustom`, relation loading boundaries, and IAM cache invalidation
|
|
1058
|
+
- Harden documentation around generated `PUT` vs `PATCH`, GET_LIST response modes, subscriber context shapes, and authorization custom actions
|
|
1059
|
+
- Continue improving tests for custom DTOs, route runtime behavior, policy execution, and transaction scopes
|
|
1060
|
+
|
|
1061
|
+
### Future Candidates
|
|
1062
|
+
|
|
1063
|
+
- Soft-delete route semantics
|
|
1064
|
+
- Bulk create/update/delete operations
|
|
1065
|
+
- File upload recipes for generated and custom controllers
|
|
1066
|
+
- General-purpose cache adapter examples beyond authorization rule caching
|
|
1067
|
+
- GraphQL or MongoDB support after a separate API design pass
|
|
1068
|
+
|
|
1069
|
+
## 🤖 AI Guidance Bundle
|
|
1070
|
+
|
|
1071
|
+
This repository includes a source-aligned, environment-agnostic AI guidance bundle at `ai/`. The canonical CRUD Automator skill lives at `ai/crud-automator/SKILL.md`, with adapters for Cursor, Claude Code, Codex-style agents, and other agent runners.
|
|
1072
|
+
|
|
1073
|
+
Use `ai/README.md` for installation instructions when a specific tool expects files such as `.cursor/skills`, `AGENTS.md`, or `CLAUDE.md`. The skill covers current route config shape, DTO rules, custom route/function boundaries, subscribers, HOOKS/IAM authorization, relation loading, transactions, and common docs drift pitfalls.
|
|
1074
|
+
|
|
1075
|
+
## ❓ FAQ
|
|
1026
1076
|
|
|
1027
1077
|
### How does NestJS-Crud-Automator compare to @nestjsx/crud?
|
|
1028
1078
|
|
|
@@ -1060,7 +1110,7 @@ Yes, as long as your repository follows the TypeORM Repository pattern, it will
|
|
|
1060
1110
|
|
|
1061
1111
|
## 🔒 License
|
|
1062
1112
|
|
|
1063
|
-
This project is licensed under
|
|
1113
|
+
This project is licensed under **MIT License**.
|
|
1064
1114
|
|
|
1065
1115
|
Copyright (c) 2025 ElsiKora
|
|
1066
1116
|
|
|
@@ -1068,4 +1118,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
|
1068
1118
|
|
|
1069
1119
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
1070
1120
|
|
|
1071
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
|
|
1121
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|