@elsikora/nestjs-crud-automator 1.24.0-dev.1 → 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.
Files changed (794) hide show
  1. package/README.md +213 -163
  2. package/dist/cjs/class/api/authorization/bootstrap-validation.service.class.d.ts +1 -0
  3. package/dist/cjs/class/api/authorization/bootstrap-validation.service.class.js +37 -3
  4. package/dist/cjs/class/api/authorization/bootstrap-validation.service.class.js.map +1 -1
  5. package/dist/cjs/class/api/authorization/cache-invalidation.service.class.d.ts +7 -0
  6. package/dist/cjs/class/api/authorization/cache-invalidation.service.class.js +21 -0
  7. package/dist/cjs/class/api/authorization/cache-invalidation.service.class.js.map +1 -0
  8. package/dist/cjs/class/api/authorization/guard.class.d.ts +1 -2
  9. package/dist/cjs/class/api/authorization/guard.class.js +13 -18
  10. package/dist/cjs/class/api/authorization/guard.class.js.map +1 -1
  11. package/dist/cjs/class/api/authorization/index.d.ts +1 -0
  12. package/dist/cjs/class/api/authorization/policy/executor.class.js +1 -2
  13. package/dist/cjs/class/api/authorization/policy/executor.class.js.map +1 -1
  14. package/dist/cjs/class/api/authorization/policy/index.d.ts +1 -0
  15. package/dist/cjs/class/api/authorization/policy/registry.class.d.ts +3 -5
  16. package/dist/cjs/class/api/authorization/policy/registry.class.js +11 -34
  17. package/dist/cjs/class/api/authorization/policy/registry.class.js.map +1 -1
  18. package/dist/cjs/class/api/authorization/policy/subscriber-wrapper.class.d.ts +10 -0
  19. package/dist/cjs/class/api/authorization/policy/subscriber-wrapper.class.js +23 -0
  20. package/dist/cjs/class/api/authorization/policy/subscriber-wrapper.class.js.map +1 -0
  21. package/dist/cjs/class/api/authorization/runtime.class.d.ts +3 -2
  22. package/dist/cjs/class/api/authorization/runtime.class.js +6 -5
  23. package/dist/cjs/class/api/authorization/runtime.class.js.map +1 -1
  24. package/dist/cjs/class/api/authorization/simulator.class.d.ts +2 -0
  25. package/dist/cjs/class/api/authorization/simulator.class.js +1 -0
  26. package/dist/cjs/class/api/authorization/simulator.class.js.map +1 -1
  27. package/dist/cjs/class/api/function/context-storage.class.d.ts +7 -0
  28. package/dist/cjs/class/api/function/context-storage.class.js +16 -0
  29. package/dist/cjs/class/api/function/context-storage.class.js.map +1 -0
  30. package/dist/cjs/class/api/function/custom-runtime.class.d.ts +19 -0
  31. package/dist/cjs/class/api/function/custom-runtime.class.js +118 -0
  32. package/dist/cjs/class/api/function/custom-runtime.class.js.map +1 -0
  33. package/dist/cjs/class/api/function/index.d.ts +1 -0
  34. package/dist/cjs/class/api/function/transaction-scope.class.d.ts +6 -0
  35. package/dist/cjs/class/api/function/transaction-scope.class.js +34 -0
  36. package/dist/cjs/class/api/function/transaction-scope.class.js.map +1 -0
  37. package/dist/cjs/class/api/index.d.ts +2 -0
  38. package/dist/cjs/class/api/route-runtime.class.d.ts +21 -0
  39. package/dist/cjs/class/api/route-runtime.class.js +335 -0
  40. package/dist/cjs/class/api/route-runtime.class.js.map +1 -0
  41. package/dist/cjs/class/api/service-base.class.d.ts +9 -7
  42. package/dist/cjs/class/api/service-base.class.js +16 -6
  43. package/dist/cjs/class/api/service-base.class.js.map +1 -1
  44. package/dist/cjs/class/api/subscriber/executor.class.d.ts +7 -6
  45. package/dist/cjs/class/api/subscriber/executor.class.js +16 -12
  46. package/dist/cjs/class/api/subscriber/executor.class.js.map +1 -1
  47. package/dist/cjs/class/api/subscriber/index.d.ts +1 -0
  48. package/dist/cjs/class/api/subscriber/registry.class.d.ts +5 -2
  49. package/dist/cjs/class/api/subscriber/registry.class.js +26 -24
  50. package/dist/cjs/class/api/subscriber/registry.class.js.map +1 -1
  51. package/dist/cjs/class/api/subscriber/wrapper.class.d.ts +18 -0
  52. package/dist/cjs/class/api/subscriber/wrapper.class.js +23 -0
  53. package/dist/cjs/class/api/subscriber/wrapper.class.js.map +1 -0
  54. package/dist/cjs/class/utility/dto/exception/details/foreign-key-violation.class.js +5 -1
  55. package/dist/cjs/class/utility/dto/exception/details/foreign-key-violation.class.js.map +1 -1
  56. package/dist/cjs/class/utility/dto/exception/details/unique-violation.class.js +5 -1
  57. package/dist/cjs/class/utility/dto/exception/details/unique-violation.class.js.map +1 -1
  58. package/dist/cjs/class/utility/dto/property/factory/number.class.js +6 -2
  59. package/dist/cjs/class/utility/dto/property/factory/number.class.js.map +1 -1
  60. package/dist/cjs/class/utility/dto/property/factory/relation.class.js +5 -1
  61. package/dist/cjs/class/utility/dto/property/factory/relation.class.js.map +1 -1
  62. package/dist/cjs/class/utility/dto/strategy/body.class.js +5 -1
  63. package/dist/cjs/class/utility/dto/strategy/body.class.js.map +1 -1
  64. package/dist/cjs/class/utility/dto/strategy/query.class.js +5 -1
  65. package/dist/cjs/class/utility/dto/strategy/query.class.js.map +1 -1
  66. package/dist/cjs/class/utility/dto/strategy/request.class.js +5 -1
  67. package/dist/cjs/class/utility/dto/strategy/request.class.js.map +1 -1
  68. package/dist/cjs/class/utility/dto/strategy/response.class.js +5 -1
  69. package/dist/cjs/class/utility/dto/strategy/response.class.js.map +1 -1
  70. package/dist/cjs/constant/decorator/api/method.constant.d.ts +2 -3
  71. package/dist/cjs/constant/decorator/api/method.constant.js +4 -6
  72. package/dist/cjs/constant/decorator/api/method.constant.js.map +1 -1
  73. package/dist/cjs/constant/utility/dto/constant.js +6 -2
  74. package/dist/cjs/constant/utility/dto/constant.js.map +1 -1
  75. package/dist/cjs/decorator/api/function/create.decorator.js +51 -24
  76. package/dist/cjs/decorator/api/function/create.decorator.js.map +1 -1
  77. package/dist/cjs/decorator/api/function/custom.decorator.d.ts +9 -0
  78. package/dist/cjs/decorator/api/function/custom.decorator.js +47 -0
  79. package/dist/cjs/decorator/api/function/custom.decorator.js.map +1 -0
  80. package/dist/cjs/decorator/api/function/decorator.js +16 -7
  81. package/dist/cjs/decorator/api/function/decorator.js.map +1 -1
  82. package/dist/cjs/decorator/api/function/delete.decorator.js +62 -41
  83. package/dist/cjs/decorator/api/function/delete.decorator.js.map +1 -1
  84. package/dist/cjs/decorator/api/function/get/decorator.js +40 -25
  85. package/dist/cjs/decorator/api/function/get/decorator.js.map +1 -1
  86. package/dist/cjs/decorator/api/function/get/list.decorator.js +40 -25
  87. package/dist/cjs/decorator/api/function/get/list.decorator.js.map +1 -1
  88. package/dist/cjs/decorator/api/function/get/many.decorator.js +40 -25
  89. package/dist/cjs/decorator/api/function/get/many.decorator.js.map +1 -1
  90. package/dist/cjs/decorator/api/function/index.d.ts +1 -0
  91. package/dist/cjs/decorator/api/function/update.decorator.js +62 -41
  92. package/dist/cjs/decorator/api/function/update.decorator.js.map +1 -1
  93. package/dist/cjs/decorator/api/index.d.ts +1 -0
  94. package/dist/cjs/decorator/api/method.decorator.d.ts +5 -6
  95. package/dist/cjs/decorator/api/method.decorator.js +65 -325
  96. package/dist/cjs/decorator/api/method.decorator.js.map +1 -1
  97. package/dist/cjs/decorator/api/property/boolean.decorator.js +23 -4
  98. package/dist/cjs/decorator/api/property/boolean.decorator.js.map +1 -1
  99. package/dist/cjs/decorator/api/property/date.decorator.js +23 -4
  100. package/dist/cjs/decorator/api/property/date.decorator.js.map +1 -1
  101. package/dist/cjs/decorator/api/property/enum.decorator.js +21 -3
  102. package/dist/cjs/decorator/api/property/enum.decorator.js.map +1 -1
  103. package/dist/cjs/decorator/api/property/number.decorator.js +28 -5
  104. package/dist/cjs/decorator/api/property/number.decorator.js.map +1 -1
  105. package/dist/cjs/decorator/api/property/object.decorator.js +21 -3
  106. package/dist/cjs/decorator/api/property/object.decorator.js.map +1 -1
  107. package/dist/cjs/decorator/api/property/string.decorator.js +25 -8
  108. package/dist/cjs/decorator/api/property/string.decorator.js.map +1 -1
  109. package/dist/cjs/decorator/api/property/uuid.decorator.js +26 -4
  110. package/dist/cjs/decorator/api/property/uuid.decorator.js.map +1 -1
  111. package/dist/cjs/decorator/api/route-custom.decorator.d.ts +9 -0
  112. package/dist/cjs/decorator/api/route-custom.decorator.js +101 -0
  113. package/dist/cjs/decorator/api/route-custom.decorator.js.map +1 -0
  114. package/dist/cjs/decorator/api/service/decorator.js +28 -23
  115. package/dist/cjs/decorator/api/service/decorator.js.map +1 -1
  116. package/dist/cjs/enum/decorator/api/controller/index.d.ts +3 -1
  117. package/dist/cjs/enum/decorator/api/controller/relation-reference-shape.enum.d.ts +4 -0
  118. package/dist/cjs/enum/decorator/api/controller/relation-reference-shape.enum.js +8 -0
  119. package/dist/cjs/enum/decorator/api/controller/relation-reference-shape.enum.js.map +1 -0
  120. package/dist/cjs/enum/decorator/api/controller/request/index.d.ts +2 -0
  121. package/dist/cjs/enum/decorator/api/controller/request/target.enum.d.ts +5 -0
  122. package/dist/cjs/enum/decorator/api/controller/request/target.enum.js +9 -0
  123. package/dist/cjs/enum/decorator/api/controller/request/target.enum.js.map +1 -0
  124. package/dist/cjs/enum/decorator/api/controller/{request-transformer-type.enum.js → request/transformer-type.enum.js} +1 -1
  125. package/dist/cjs/enum/decorator/api/controller/request/transformer-type.enum.js.map +1 -0
  126. package/dist/cjs/enum/decorator/api/controller/response-target.enum.d.ts +3 -0
  127. package/dist/cjs/enum/decorator/api/controller/response-target.enum.js +7 -0
  128. package/dist/cjs/enum/decorator/api/controller/response-target.enum.js.map +1 -0
  129. package/dist/cjs/enum/decorator/api/dto-type.enum.d.ts +1 -1
  130. package/dist/cjs/enum/decorator/api/dto-type.enum.js +1 -1
  131. package/dist/cjs/enum/decorator/api/dto-type.enum.js.map +1 -1
  132. package/dist/cjs/enum/decorator/api/function-transaction-mode.enum.d.ts +6 -0
  133. package/dist/cjs/enum/decorator/api/function-transaction-mode.enum.js +10 -0
  134. package/dist/cjs/enum/decorator/api/function-transaction-mode.enum.js.map +1 -0
  135. package/dist/cjs/enum/decorator/api/function-type.enum.d.ts +1 -0
  136. package/dist/cjs/enum/decorator/api/function-type.enum.js +1 -0
  137. package/dist/cjs/enum/decorator/api/function-type.enum.js.map +1 -1
  138. package/dist/cjs/enum/decorator/api/index.d.ts +1 -0
  139. package/dist/cjs/external/rxjs/dist/esm5/internal/Observable.js +106 -0
  140. package/dist/cjs/external/rxjs/dist/esm5/internal/Observable.js.map +1 -0
  141. package/dist/cjs/external/rxjs/dist/esm5/internal/Subscriber.js +158 -0
  142. package/dist/cjs/external/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
  143. package/dist/cjs/external/rxjs/dist/esm5/internal/Subscription.js +148 -0
  144. package/dist/cjs/external/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
  145. package/dist/cjs/external/rxjs/dist/esm5/internal/config.js +7 -0
  146. package/dist/cjs/external/rxjs/dist/esm5/internal/config.js.map +1 -0
  147. package/dist/cjs/external/rxjs/dist/esm5/internal/lastValueFrom.js +28 -0
  148. package/dist/cjs/external/rxjs/dist/esm5/internal/lastValueFrom.js.map +1 -0
  149. package/dist/cjs/external/rxjs/dist/esm5/internal/observable/from.js +11 -0
  150. package/dist/cjs/external/rxjs/dist/esm5/internal/observable/from.js.map +1 -0
  151. package/dist/cjs/external/rxjs/dist/esm5/internal/observable/innerFrom.js +154 -0
  152. package/dist/cjs/external/rxjs/dist/esm5/internal/observable/innerFrom.js.map +1 -0
  153. package/dist/cjs/external/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +66 -0
  154. package/dist/cjs/external/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map +1 -0
  155. package/dist/cjs/external/rxjs/dist/esm5/internal/operators/observeOn.js +15 -0
  156. package/dist/cjs/external/rxjs/dist/esm5/internal/operators/observeOn.js.map +1 -0
  157. package/dist/cjs/external/rxjs/dist/esm5/internal/operators/subscribeOn.js +13 -0
  158. package/dist/cjs/external/rxjs/dist/esm5/internal/operators/subscribeOn.js.map +1 -0
  159. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleArray.js +23 -0
  160. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleArray.js.map +1 -0
  161. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js +28 -0
  162. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js.map +1 -0
  163. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js +37 -0
  164. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js.map +1 -0
  165. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js +12 -0
  166. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js.map +1 -0
  167. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/schedulePromise.js +12 -0
  168. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/schedulePromise.js.map +1 -0
  169. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js +11 -0
  170. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js.map +1 -0
  171. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduled.js +42 -0
  172. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduled/scheduled.js.map +1 -0
  173. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +20 -0
  174. package/dist/cjs/external/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
  175. package/dist/cjs/external/rxjs/dist/esm5/internal/symbol/iterator.js +13 -0
  176. package/dist/cjs/external/rxjs/dist/esm5/internal/symbol/iterator.js.map +1 -0
  177. package/dist/cjs/external/rxjs/dist/esm5/internal/symbol/observable.js +6 -0
  178. package/dist/cjs/external/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
  179. package/dist/cjs/external/rxjs/dist/esm5/internal/util/EmptyError.js +14 -0
  180. package/dist/cjs/external/rxjs/dist/esm5/internal/util/EmptyError.js.map +1 -0
  181. package/dist/cjs/external/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +17 -0
  182. package/dist/cjs/external/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
  183. package/dist/cjs/external/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
  184. package/dist/cjs/external/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
  185. package/dist/cjs/external/rxjs/dist/esm5/internal/util/createErrorClass.js +15 -0
  186. package/dist/cjs/external/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
  187. package/dist/cjs/external/rxjs/dist/esm5/internal/util/errorContext.js +10 -0
  188. package/dist/cjs/external/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
  189. package/dist/cjs/external/rxjs/dist/esm5/internal/util/executeSchedule.js +22 -0
  190. package/dist/cjs/external/rxjs/dist/esm5/internal/util/executeSchedule.js.map +1 -0
  191. package/dist/cjs/external/rxjs/dist/esm5/internal/util/identity.js +8 -0
  192. package/dist/cjs/external/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
  193. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isArrayLike.js +6 -0
  194. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isArrayLike.js.map +1 -0
  195. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isAsyncIterable.js +10 -0
  196. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isAsyncIterable.js.map +1 -0
  197. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
  198. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
  199. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isInteropObservable.js +11 -0
  200. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isInteropObservable.js.map +1 -0
  201. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isIterable.js +11 -0
  202. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isIterable.js.map +1 -0
  203. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isPromise.js +10 -0
  204. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isPromise.js.map +1 -0
  205. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isReadableStreamLike.js +44 -0
  206. package/dist/cjs/external/rxjs/dist/esm5/internal/util/isReadableStreamLike.js.map +1 -0
  207. package/dist/cjs/external/rxjs/dist/esm5/internal/util/lift.js +26 -0
  208. package/dist/cjs/external/rxjs/dist/esm5/internal/util/lift.js.map +1 -0
  209. package/dist/cjs/external/rxjs/dist/esm5/internal/util/noop.js +6 -0
  210. package/dist/cjs/external/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
  211. package/dist/cjs/external/rxjs/dist/esm5/internal/util/pipe.js +18 -0
  212. package/dist/cjs/external/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
  213. package/dist/cjs/external/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
  214. package/dist/cjs/external/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
  215. package/dist/cjs/external/rxjs/dist/esm5/internal/util/throwUnobservableError.js +8 -0
  216. package/dist/cjs/external/rxjs/dist/esm5/internal/util/throwUnobservableError.js.map +1 -0
  217. package/dist/cjs/external/tslib/tslib.es6.js +125 -0
  218. package/dist/cjs/external/tslib/tslib.es6.js.map +1 -1
  219. package/dist/cjs/factory/api-controller.factory.d.ts +1 -0
  220. package/dist/cjs/factory/api-controller.factory.js +42 -393
  221. package/dist/cjs/factory/api-controller.factory.js.map +1 -1
  222. package/dist/cjs/index.js +45 -2
  223. package/dist/cjs/index.js.map +1 -1
  224. package/dist/cjs/interceptor/api-route-runtime.interceptor.d.ts +5 -0
  225. package/dist/cjs/interceptor/api-route-runtime.interceptor.js +29 -0
  226. package/dist/cjs/interceptor/api-route-runtime.interceptor.js.map +1 -0
  227. package/dist/cjs/interface/class/api/authorization/policy/registry.interface.d.ts +1 -0
  228. package/dist/cjs/interface/class/api/authorization/policy/subscriber/context/interface.d.ts +1 -1
  229. package/dist/cjs/interface/class/api/function/context/index.d.ts +2 -0
  230. package/dist/cjs/interface/class/api/function/context/interface.d.ts +10 -0
  231. package/dist/cjs/interface/class/api/function/context/operations.interface.d.ts +13 -0
  232. package/dist/cjs/interface/class/api/function/index.d.ts +1 -0
  233. package/dist/cjs/interface/class/api/index.d.ts +2 -0
  234. package/dist/cjs/interface/class/api/route/index.d.ts +1 -0
  235. package/dist/cjs/interface/class/api/route/runtime/context-data.interface.d.ts +10 -0
  236. package/dist/cjs/interface/class/api/route/runtime/custom-execution-options.interface.d.ts +9 -0
  237. package/dist/cjs/interface/class/api/route/runtime/generated/execution-options.interface.d.ts +14 -0
  238. package/dist/cjs/interface/class/api/route/runtime/generated/index.d.ts +2 -0
  239. package/dist/cjs/interface/class/api/route/runtime/generated/targets.interface.d.ts +12 -0
  240. package/dist/cjs/interface/class/api/route/runtime/http-request.interface.d.ts +8 -0
  241. package/dist/cjs/interface/class/api/route/runtime/index.d.ts +4 -0
  242. package/dist/cjs/interface/class/api/subscriber/function/error-execution-context.interface.d.ts +1 -0
  243. package/dist/cjs/interface/class/api/subscriber/function/execution/context.interface.d.ts +1 -0
  244. package/dist/cjs/interface/class/api/subscriber/function.interface.d.ts +4 -0
  245. package/dist/cjs/interface/class/api/subscriber/route/error-execution-context.interface.d.ts +2 -1
  246. package/dist/cjs/interface/class/api/subscriber/route/execution/context/data/extended.interface.d.ts +36 -0
  247. package/dist/cjs/interface/class/api/subscriber/route/execution/context/data/index.d.ts +2 -0
  248. package/dist/cjs/interface/class/api/subscriber/route/execution/context/data/interface.d.ts +32 -0
  249. package/dist/cjs/interface/class/api/subscriber/route/execution/context/index.d.ts +2 -0
  250. package/dist/cjs/interface/class/api/subscriber/route/execution/context/interface.d.ts +11 -0
  251. package/dist/cjs/interface/class/api/subscriber/route/execution/index.d.ts +1 -2
  252. package/dist/cjs/interface/class/api/subscriber/route.interface.d.ts +6 -2
  253. package/dist/cjs/interface/decorator/api/controller/properties/route/authentication.interface.d.ts +1 -1
  254. package/dist/cjs/interface/decorator/api/controller/properties/route/base/generation.interface.d.ts +5 -0
  255. package/dist/cjs/interface/decorator/api/controller/properties/route/base/index.d.ts +5 -2
  256. package/dist/cjs/interface/decorator/api/controller/properties/route/base/interface.d.ts +4 -7
  257. package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/index.d.ts +4 -0
  258. package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/interface.d.ts +6 -0
  259. package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/reference.interface.d.ts +5 -0
  260. package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/request/index.d.ts +2 -0
  261. package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/request/interface.d.ts +6 -0
  262. package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/request/load.interface.d.ts +10 -0
  263. package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/response/index.d.ts +2 -0
  264. package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/response/interface.d.ts +6 -0
  265. package/dist/cjs/interface/decorator/api/controller/properties/route/base/relations/response/load.interface.d.ts +4 -0
  266. package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/index.d.ts +2 -0
  267. package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/interface.d.ts +6 -0
  268. package/dist/cjs/interface/decorator/api/controller/properties/route/base/request/target.interface.d.ts +6 -0
  269. package/dist/cjs/interface/decorator/api/controller/properties/route/base/response/index.d.ts +2 -0
  270. package/dist/cjs/interface/decorator/api/controller/properties/route/base/response/interface.d.ts +7 -0
  271. package/dist/cjs/interface/decorator/api/controller/properties/route/base/response/target.interface.d.ts +4 -0
  272. package/dist/cjs/interface/decorator/api/controller/properties/route/base/security.interface.d.ts +6 -0
  273. package/dist/cjs/interface/decorator/api/controller/properties/route/with/dto.interface.d.ts +1 -1
  274. package/dist/cjs/interface/decorator/api/function/create-executor-properties.interface.d.ts +1 -2
  275. package/dist/cjs/interface/decorator/api/function/custom-properties.interface.d.ts +9 -0
  276. package/dist/cjs/interface/decorator/api/function/delete-executor-properties.interface.d.ts +2 -3
  277. package/dist/cjs/interface/decorator/api/function/get/executor-properties.interface.d.ts +1 -2
  278. package/dist/cjs/interface/decorator/api/function/get/list-executor-properties.interface.d.ts +1 -2
  279. package/dist/cjs/interface/decorator/api/function/get/many-executor-properties.interface.d.ts +1 -2
  280. package/dist/cjs/interface/decorator/api/function/index.d.ts +1 -0
  281. package/dist/cjs/interface/decorator/api/function/properties.interface.d.ts +4 -0
  282. package/dist/cjs/interface/decorator/api/function/update-executor-properties.interface.d.ts +2 -3
  283. package/dist/cjs/interface/decorator/api/index.d.ts +1 -0
  284. package/dist/cjs/interface/decorator/api/method/index.d.ts +0 -2
  285. package/dist/cjs/interface/decorator/api/method/properties.interface.d.ts +4 -17
  286. package/dist/cjs/interface/decorator/api/route/custom-properties.interface.d.ts +6 -0
  287. package/dist/cjs/interface/decorator/api/route/documentation-properties.interface.d.ts +5 -0
  288. package/dist/cjs/interface/decorator/api/route/index.d.ts +7 -0
  289. package/dist/cjs/interface/decorator/api/route/metadata/index.d.ts +3 -0
  290. package/dist/cjs/interface/decorator/api/route/metadata/interface.d.ts +15 -0
  291. package/dist/cjs/interface/decorator/api/route/metadata/resource.interface.d.ts +6 -0
  292. package/dist/cjs/interface/decorator/api/route/metadata/route.interface.d.ts +7 -0
  293. package/dist/cjs/interface/decorator/api/route/response/index.d.ts +2 -0
  294. package/dist/cjs/interface/decorator/api/route/response/properties.interface.d.ts +9 -0
  295. package/dist/cjs/interface/decorator/api/route/response/serialization-properties.interface.d.ts +3 -0
  296. package/dist/cjs/interface/decorator/api/route/runtime-properties.interface.d.ts +11 -0
  297. package/dist/cjs/interface/decorator/api/route/security/authentication-properties.interface.d.ts +9 -0
  298. package/dist/cjs/interface/decorator/api/route/security/authorization-properties.interface.d.ts +4 -0
  299. package/dist/cjs/interface/decorator/api/route/security/index.d.ts +3 -0
  300. package/dist/cjs/interface/decorator/api/route/security/properties.interface.d.ts +6 -0
  301. package/dist/cjs/interface/decorator/api/route/throttling/default-properties.interface.d.ts +4 -0
  302. package/dist/cjs/interface/decorator/api/route/throttling/index.d.ts +2 -0
  303. package/dist/cjs/interface/decorator/api/route/throttling/properties.interface.d.ts +4 -0
  304. package/dist/cjs/interface/decorator/api/subscriber/function/filter.interface.d.ts +5 -0
  305. package/dist/cjs/interface/decorator/api/subscriber/function/index.d.ts +2 -0
  306. package/dist/cjs/interface/decorator/api/subscriber/function/properties.interface.d.ts +7 -0
  307. package/dist/cjs/interface/decorator/api/subscriber/index.d.ts +2 -2
  308. package/dist/cjs/interface/decorator/api/subscriber/route-properties.interface.d.ts +4 -0
  309. package/dist/cjs/module/api/authorization.module.js +18 -1
  310. package/dist/cjs/module/api/authorization.module.js.map +1 -1
  311. package/dist/cjs/package.json +0 -1
  312. package/dist/cjs/type/class/api/subscriber/route/after/create-context.type.d.ts +2 -2
  313. package/dist/cjs/type/class/api/subscriber/route/after/delete-context.type.d.ts +2 -2
  314. package/dist/cjs/type/class/api/subscriber/route/after/get/context.type.d.ts +2 -2
  315. package/dist/cjs/type/class/api/subscriber/route/after/get/list-context.type.d.ts +2 -2
  316. package/dist/cjs/type/class/api/subscriber/route/after/partial-update-context.type.d.ts +2 -2
  317. package/dist/cjs/type/class/api/subscriber/route/after/update-context.type.d.ts +2 -2
  318. package/dist/cjs/type/class/api/subscriber/route/before/create-context.type.d.ts +2 -2
  319. package/dist/cjs/type/class/api/subscriber/route/before/delete-context.type.d.ts +2 -2
  320. package/dist/cjs/type/class/api/subscriber/route/before/get/context.type.d.ts +2 -2
  321. package/dist/cjs/type/class/api/subscriber/route/before/get/list-context.type.d.ts +2 -2
  322. package/dist/cjs/type/class/api/subscriber/route/before/partial-update-context.type.d.ts +2 -2
  323. package/dist/cjs/type/class/api/subscriber/route/before/update-context.type.d.ts +2 -2
  324. package/dist/cjs/type/decorator/api/controller/properties/route/base/request/allowed-target.type.d.ts +9 -0
  325. package/dist/cjs/type/decorator/api/controller/properties/route/base/request/index.d.ts +1 -1
  326. package/dist/cjs/type/decorator/api/controller/properties/route/base/request/transformers.type.d.ts +7 -7
  327. package/dist/cjs/type/decorator/api/controller/properties/route/base/response-transformers.type.d.ts +6 -6
  328. package/dist/cjs/type/decorator/api/controller/transformer-config.type.d.ts +5 -5
  329. package/dist/cjs/type/decorator/api/function/properties.type.d.ts +5 -3
  330. package/dist/cjs/type/decorator/api/property/describe/dto/request-properties.type.d.ts +1 -1
  331. package/dist/cjs/type/decorator/api/property/describe/properties/base/properties.type.d.ts +4 -4
  332. package/dist/cjs/type/utility/dto/generate/allowed-combination.type.d.ts +4 -4
  333. package/dist/cjs/utility/api/controller/apply/decorators.utility.js +58 -26
  334. package/dist/cjs/utility/api/controller/apply/decorators.utility.js.map +1 -1
  335. package/dist/cjs/utility/api/controller/apply/metadata.utility.js +6 -2
  336. package/dist/cjs/utility/api/controller/apply/metadata.utility.js.map +1 -1
  337. package/dist/cjs/utility/api/controller/get/dto.utility.js +6 -2
  338. package/dist/cjs/utility/api/controller/get/dto.utility.js.map +1 -1
  339. package/dist/cjs/utility/api/controller/get-list/transform/filter.utility.js +5 -1
  340. package/dist/cjs/utility/api/controller/get-list/transform/filter.utility.js.map +1 -1
  341. package/dist/cjs/utility/api/controller/handle-request-relations.utility.d.ts +4 -4
  342. package/dist/cjs/utility/api/controller/handle-request-relations.utility.js +37 -11
  343. package/dist/cjs/utility/api/controller/handle-request-relations.utility.js.map +1 -1
  344. package/dist/cjs/utility/api/controller/index.d.ts +1 -0
  345. package/dist/cjs/utility/api/controller/serialize-route-response.utility.d.ts +14 -0
  346. package/dist/cjs/utility/api/controller/serialize-route-response.utility.js +29 -0
  347. package/dist/cjs/utility/api/controller/serialize-route-response.utility.js.map +1 -0
  348. package/dist/cjs/utility/api/controller/transform-data.utility.d.ts +8 -7
  349. package/dist/cjs/utility/api/controller/transform-data.utility.js +21 -18
  350. package/dist/cjs/utility/api/controller/transform-data.utility.js.map +1 -1
  351. package/dist/cjs/utility/api/controller/validate-request.utility.d.ts +3 -3
  352. package/dist/cjs/utility/api/controller/validate-request.utility.js +10 -9
  353. package/dist/cjs/utility/api/controller/validate-request.utility.js.map +1 -1
  354. package/dist/cjs/utility/api/controller/write/dto-swagger.utility.js +6 -2
  355. package/dist/cjs/utility/api/controller/write/dto-swagger.utility.js.map +1 -1
  356. package/dist/cjs/utility/api/function-transaction.utility.d.ts +20 -0
  357. package/dist/cjs/utility/api/function-transaction.utility.js +52 -0
  358. package/dist/cjs/utility/api/function-transaction.utility.js.map +1 -0
  359. package/dist/cjs/utility/api/index.d.ts +1 -0
  360. package/dist/cjs/utility/api/route/index.d.ts +1 -0
  361. package/dist/cjs/utility/api/route/response/index.d.ts +2 -0
  362. package/dist/cjs/utility/api/route/response/project-relation.utility.d.ts +11 -0
  363. package/dist/cjs/utility/api/route/response/project-relation.utility.js +75 -0
  364. package/dist/cjs/utility/api/route/response/project-relation.utility.js.map +1 -0
  365. package/dist/cjs/utility/api/route/response/serialize.utility.d.ts +11 -0
  366. package/dist/cjs/utility/api/route/response/serialize.utility.js +26 -0
  367. package/dist/cjs/utility/api/route/response/serialize.utility.js.map +1 -0
  368. package/dist/cjs/utility/dto/build-decorator.utility.js +5 -1
  369. package/dist/cjs/utility/dto/build-decorator.utility.js.map +1 -1
  370. package/dist/cjs/utility/dto/generate/core.utility.js +5 -1
  371. package/dist/cjs/utility/dto/generate/core.utility.js.map +1 -1
  372. package/dist/cjs/utility/dto/generate/dynamic.utility.js +5 -1
  373. package/dist/cjs/utility/dto/generate/dynamic.utility.js.map +1 -1
  374. package/dist/cjs/utility/dto/generate/exception.utility.js +5 -1
  375. package/dist/cjs/utility/dto/generate/exception.utility.js.map +1 -1
  376. package/dist/cjs/utility/dto/generate/filter-decorator.utility.js +5 -1
  377. package/dist/cjs/utility/dto/generate/filter-decorator.utility.js.map +1 -1
  378. package/dist/cjs/utility/dto/generate/get-list-response.utility.js +5 -1
  379. package/dist/cjs/utility/dto/generate/get-list-response.utility.js.map +1 -1
  380. package/dist/cjs/utility/dto/get/get-list-query-base-class.utility.js +5 -1
  381. package/dist/cjs/utility/dto/get/get-list-query-base-class.utility.js.map +1 -1
  382. package/dist/cjs/utility/dto/handle-date-property.utility.js +5 -1
  383. package/dist/cjs/utility/dto/handle-date-property.utility.js.map +1 -1
  384. package/dist/cjs/utility/dto/is/property/should-be-marked.utility.js +7 -3
  385. package/dist/cjs/utility/dto/is/property/should-be-marked.utility.js.map +1 -1
  386. package/dist/cjs/utility/dto/is/should-be-generated.utility.js +8 -4
  387. package/dist/cjs/utility/dto/is/should-be-generated.utility.js.map +1 -1
  388. package/dist/esm/class/api/authorization/bootstrap-validation.service.class.d.ts +1 -0
  389. package/dist/esm/class/api/authorization/bootstrap-validation.service.class.js +37 -3
  390. package/dist/esm/class/api/authorization/bootstrap-validation.service.class.js.map +1 -1
  391. package/dist/esm/class/api/authorization/cache-invalidation.service.class.d.ts +7 -0
  392. package/dist/esm/class/api/authorization/cache-invalidation.service.class.js +21 -0
  393. package/dist/esm/class/api/authorization/cache-invalidation.service.class.js.map +1 -0
  394. package/dist/esm/class/api/authorization/guard.class.d.ts +1 -2
  395. package/dist/esm/class/api/authorization/guard.class.js +13 -18
  396. package/dist/esm/class/api/authorization/guard.class.js.map +1 -1
  397. package/dist/esm/class/api/authorization/index.d.ts +1 -0
  398. package/dist/esm/class/api/authorization/policy/executor.class.js +1 -2
  399. package/dist/esm/class/api/authorization/policy/executor.class.js.map +1 -1
  400. package/dist/esm/class/api/authorization/policy/index.d.ts +1 -0
  401. package/dist/esm/class/api/authorization/policy/registry.class.d.ts +3 -5
  402. package/dist/esm/class/api/authorization/policy/registry.class.js +10 -33
  403. package/dist/esm/class/api/authorization/policy/registry.class.js.map +1 -1
  404. package/dist/esm/class/api/authorization/policy/subscriber-wrapper.class.d.ts +10 -0
  405. package/dist/esm/class/api/authorization/policy/subscriber-wrapper.class.js +21 -0
  406. package/dist/esm/class/api/authorization/policy/subscriber-wrapper.class.js.map +1 -0
  407. package/dist/esm/class/api/authorization/runtime.class.d.ts +3 -2
  408. package/dist/esm/class/api/authorization/runtime.class.js +6 -5
  409. package/dist/esm/class/api/authorization/runtime.class.js.map +1 -1
  410. package/dist/esm/class/api/authorization/simulator.class.d.ts +2 -0
  411. package/dist/esm/class/api/authorization/simulator.class.js +1 -0
  412. package/dist/esm/class/api/authorization/simulator.class.js.map +1 -1
  413. package/dist/esm/class/api/function/context-storage.class.d.ts +7 -0
  414. package/dist/esm/class/api/function/context-storage.class.js +14 -0
  415. package/dist/esm/class/api/function/context-storage.class.js.map +1 -0
  416. package/dist/esm/class/api/function/custom-runtime.class.d.ts +19 -0
  417. package/dist/esm/class/api/function/custom-runtime.class.js +116 -0
  418. package/dist/esm/class/api/function/custom-runtime.class.js.map +1 -0
  419. package/dist/esm/class/api/function/index.d.ts +1 -0
  420. package/dist/esm/class/api/function/transaction-scope.class.d.ts +6 -0
  421. package/dist/esm/class/api/function/transaction-scope.class.js +32 -0
  422. package/dist/esm/class/api/function/transaction-scope.class.js.map +1 -0
  423. package/dist/esm/class/api/index.d.ts +2 -0
  424. package/dist/esm/class/api/route-runtime.class.d.ts +21 -0
  425. package/dist/esm/class/api/route-runtime.class.js +333 -0
  426. package/dist/esm/class/api/route-runtime.class.js.map +1 -0
  427. package/dist/esm/class/api/service-base.class.d.ts +9 -7
  428. package/dist/esm/class/api/service-base.class.js +16 -6
  429. package/dist/esm/class/api/service-base.class.js.map +1 -1
  430. package/dist/esm/class/api/subscriber/executor.class.d.ts +7 -6
  431. package/dist/esm/class/api/subscriber/executor.class.js +16 -12
  432. package/dist/esm/class/api/subscriber/executor.class.js.map +1 -1
  433. package/dist/esm/class/api/subscriber/index.d.ts +1 -0
  434. package/dist/esm/class/api/subscriber/registry.class.d.ts +5 -2
  435. package/dist/esm/class/api/subscriber/registry.class.js +24 -22
  436. package/dist/esm/class/api/subscriber/registry.class.js.map +1 -1
  437. package/dist/esm/class/api/subscriber/wrapper.class.d.ts +18 -0
  438. package/dist/esm/class/api/subscriber/wrapper.class.js +21 -0
  439. package/dist/esm/class/api/subscriber/wrapper.class.js.map +1 -0
  440. package/dist/esm/class/utility/dto/exception/details/foreign-key-violation.class.js +5 -1
  441. package/dist/esm/class/utility/dto/exception/details/foreign-key-violation.class.js.map +1 -1
  442. package/dist/esm/class/utility/dto/exception/details/unique-violation.class.js +5 -1
  443. package/dist/esm/class/utility/dto/exception/details/unique-violation.class.js.map +1 -1
  444. package/dist/esm/class/utility/dto/property/factory/number.class.js +6 -2
  445. package/dist/esm/class/utility/dto/property/factory/number.class.js.map +1 -1
  446. package/dist/esm/class/utility/dto/property/factory/relation.class.js +5 -1
  447. package/dist/esm/class/utility/dto/property/factory/relation.class.js.map +1 -1
  448. package/dist/esm/class/utility/dto/strategy/body.class.js +5 -1
  449. package/dist/esm/class/utility/dto/strategy/body.class.js.map +1 -1
  450. package/dist/esm/class/utility/dto/strategy/query.class.js +5 -1
  451. package/dist/esm/class/utility/dto/strategy/query.class.js.map +1 -1
  452. package/dist/esm/class/utility/dto/strategy/request.class.js +5 -1
  453. package/dist/esm/class/utility/dto/strategy/request.class.js.map +1 -1
  454. package/dist/esm/class/utility/dto/strategy/response.class.js +5 -1
  455. package/dist/esm/class/utility/dto/strategy/response.class.js.map +1 -1
  456. package/dist/esm/constant/decorator/api/method.constant.d.ts +2 -3
  457. package/dist/esm/constant/decorator/api/method.constant.js +4 -6
  458. package/dist/esm/constant/decorator/api/method.constant.js.map +1 -1
  459. package/dist/esm/constant/utility/dto/constant.js +6 -2
  460. package/dist/esm/constant/utility/dto/constant.js.map +1 -1
  461. package/dist/esm/decorator/api/function/create.decorator.js +51 -24
  462. package/dist/esm/decorator/api/function/create.decorator.js.map +1 -1
  463. package/dist/esm/decorator/api/function/custom.decorator.d.ts +9 -0
  464. package/dist/esm/decorator/api/function/custom.decorator.js +45 -0
  465. package/dist/esm/decorator/api/function/custom.decorator.js.map +1 -0
  466. package/dist/esm/decorator/api/function/decorator.js +16 -7
  467. package/dist/esm/decorator/api/function/decorator.js.map +1 -1
  468. package/dist/esm/decorator/api/function/delete.decorator.js +62 -41
  469. package/dist/esm/decorator/api/function/delete.decorator.js.map +1 -1
  470. package/dist/esm/decorator/api/function/get/decorator.js +40 -25
  471. package/dist/esm/decorator/api/function/get/decorator.js.map +1 -1
  472. package/dist/esm/decorator/api/function/get/list.decorator.js +40 -25
  473. package/dist/esm/decorator/api/function/get/list.decorator.js.map +1 -1
  474. package/dist/esm/decorator/api/function/get/many.decorator.js +40 -25
  475. package/dist/esm/decorator/api/function/get/many.decorator.js.map +1 -1
  476. package/dist/esm/decorator/api/function/index.d.ts +1 -0
  477. package/dist/esm/decorator/api/function/update.decorator.js +62 -41
  478. package/dist/esm/decorator/api/function/update.decorator.js.map +1 -1
  479. package/dist/esm/decorator/api/index.d.ts +1 -0
  480. package/dist/esm/decorator/api/method.decorator.d.ts +5 -6
  481. package/dist/esm/decorator/api/method.decorator.js +66 -326
  482. package/dist/esm/decorator/api/method.decorator.js.map +1 -1
  483. package/dist/esm/decorator/api/property/boolean.decorator.js +24 -5
  484. package/dist/esm/decorator/api/property/boolean.decorator.js.map +1 -1
  485. package/dist/esm/decorator/api/property/date.decorator.js +24 -5
  486. package/dist/esm/decorator/api/property/date.decorator.js.map +1 -1
  487. package/dist/esm/decorator/api/property/enum.decorator.js +22 -4
  488. package/dist/esm/decorator/api/property/enum.decorator.js.map +1 -1
  489. package/dist/esm/decorator/api/property/number.decorator.js +30 -7
  490. package/dist/esm/decorator/api/property/number.decorator.js.map +1 -1
  491. package/dist/esm/decorator/api/property/object.decorator.js +22 -4
  492. package/dist/esm/decorator/api/property/object.decorator.js.map +1 -1
  493. package/dist/esm/decorator/api/property/string.decorator.js +26 -9
  494. package/dist/esm/decorator/api/property/string.decorator.js.map +1 -1
  495. package/dist/esm/decorator/api/property/uuid.decorator.js +27 -5
  496. package/dist/esm/decorator/api/property/uuid.decorator.js.map +1 -1
  497. package/dist/esm/decorator/api/route-custom.decorator.d.ts +9 -0
  498. package/dist/esm/decorator/api/route-custom.decorator.js +99 -0
  499. package/dist/esm/decorator/api/route-custom.decorator.js.map +1 -0
  500. package/dist/esm/decorator/api/service/decorator.js +28 -23
  501. package/dist/esm/decorator/api/service/decorator.js.map +1 -1
  502. package/dist/esm/enum/decorator/api/controller/index.d.ts +3 -1
  503. package/dist/esm/enum/decorator/api/controller/relation-reference-shape.enum.d.ts +4 -0
  504. package/dist/esm/enum/decorator/api/controller/relation-reference-shape.enum.js +8 -0
  505. package/dist/esm/enum/decorator/api/controller/relation-reference-shape.enum.js.map +1 -0
  506. package/dist/esm/enum/decorator/api/controller/request/index.d.ts +2 -0
  507. package/dist/esm/enum/decorator/api/controller/request/target.enum.d.ts +5 -0
  508. package/dist/esm/enum/decorator/api/controller/request/target.enum.js +9 -0
  509. package/dist/esm/enum/decorator/api/controller/request/target.enum.js.map +1 -0
  510. package/dist/esm/enum/decorator/api/controller/{request-transformer-type.enum.js → request/transformer-type.enum.js} +1 -1
  511. package/dist/esm/enum/decorator/api/controller/request/transformer-type.enum.js.map +1 -0
  512. package/dist/esm/enum/decorator/api/controller/response-target.enum.d.ts +3 -0
  513. package/dist/esm/enum/decorator/api/controller/response-target.enum.js +7 -0
  514. package/dist/esm/enum/decorator/api/controller/response-target.enum.js.map +1 -0
  515. package/dist/esm/enum/decorator/api/dto-type.enum.d.ts +1 -1
  516. package/dist/esm/enum/decorator/api/dto-type.enum.js +1 -1
  517. package/dist/esm/enum/decorator/api/dto-type.enum.js.map +1 -1
  518. package/dist/esm/enum/decorator/api/function-transaction-mode.enum.d.ts +6 -0
  519. package/dist/esm/enum/decorator/api/function-transaction-mode.enum.js +10 -0
  520. package/dist/esm/enum/decorator/api/function-transaction-mode.enum.js.map +1 -0
  521. package/dist/esm/enum/decorator/api/function-type.enum.d.ts +1 -0
  522. package/dist/esm/enum/decorator/api/function-type.enum.js +1 -0
  523. package/dist/esm/enum/decorator/api/function-type.enum.js.map +1 -1
  524. package/dist/esm/enum/decorator/api/index.d.ts +1 -0
  525. package/dist/esm/external/rxjs/dist/esm5/internal/Observable.js +104 -0
  526. package/dist/esm/external/rxjs/dist/esm5/internal/Observable.js.map +1 -0
  527. package/dist/esm/external/rxjs/dist/esm5/internal/Subscriber.js +154 -0
  528. package/dist/esm/external/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
  529. package/dist/esm/external/rxjs/dist/esm5/internal/Subscription.js +145 -0
  530. package/dist/esm/external/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
  531. package/dist/esm/external/rxjs/dist/esm5/internal/config.js +5 -0
  532. package/dist/esm/external/rxjs/dist/esm5/internal/config.js.map +1 -0
  533. package/dist/esm/external/rxjs/dist/esm5/internal/lastValueFrom.js +26 -0
  534. package/dist/esm/external/rxjs/dist/esm5/internal/lastValueFrom.js.map +1 -0
  535. package/dist/esm/external/rxjs/dist/esm5/internal/observable/from.js +9 -0
  536. package/dist/esm/external/rxjs/dist/esm5/internal/observable/from.js.map +1 -0
  537. package/dist/esm/external/rxjs/dist/esm5/internal/observable/innerFrom.js +146 -0
  538. package/dist/esm/external/rxjs/dist/esm5/internal/observable/innerFrom.js.map +1 -0
  539. package/dist/esm/external/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +63 -0
  540. package/dist/esm/external/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map +1 -0
  541. package/dist/esm/external/rxjs/dist/esm5/internal/operators/observeOn.js +13 -0
  542. package/dist/esm/external/rxjs/dist/esm5/internal/operators/observeOn.js.map +1 -0
  543. package/dist/esm/external/rxjs/dist/esm5/internal/operators/subscribeOn.js +11 -0
  544. package/dist/esm/external/rxjs/dist/esm5/internal/operators/subscribeOn.js.map +1 -0
  545. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleArray.js +21 -0
  546. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleArray.js.map +1 -0
  547. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js +26 -0
  548. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js.map +1 -0
  549. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js +35 -0
  550. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js.map +1 -0
  551. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js +10 -0
  552. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js.map +1 -0
  553. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/schedulePromise.js +10 -0
  554. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/schedulePromise.js.map +1 -0
  555. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js +9 -0
  556. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js.map +1 -0
  557. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduled.js +40 -0
  558. package/dist/esm/external/rxjs/dist/esm5/internal/scheduled/scheduled.js.map +1 -0
  559. package/dist/esm/external/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +18 -0
  560. package/dist/esm/external/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
  561. package/dist/esm/external/rxjs/dist/esm5/internal/symbol/iterator.js +10 -0
  562. package/dist/esm/external/rxjs/dist/esm5/internal/symbol/iterator.js.map +1 -0
  563. package/dist/esm/external/rxjs/dist/esm5/internal/symbol/observable.js +4 -0
  564. package/dist/esm/external/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
  565. package/dist/esm/external/rxjs/dist/esm5/internal/util/EmptyError.js +12 -0
  566. package/dist/esm/external/rxjs/dist/esm5/internal/util/EmptyError.js.map +1 -0
  567. package/dist/esm/external/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +15 -0
  568. package/dist/esm/external/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
  569. package/dist/esm/external/rxjs/dist/esm5/internal/util/arrRemove.js +9 -0
  570. package/dist/esm/external/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
  571. package/dist/esm/external/rxjs/dist/esm5/internal/util/createErrorClass.js +13 -0
  572. package/dist/esm/external/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
  573. package/dist/esm/external/rxjs/dist/esm5/internal/util/errorContext.js +8 -0
  574. package/dist/esm/external/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
  575. package/dist/esm/external/rxjs/dist/esm5/internal/util/executeSchedule.js +20 -0
  576. package/dist/esm/external/rxjs/dist/esm5/internal/util/executeSchedule.js.map +1 -0
  577. package/dist/esm/external/rxjs/dist/esm5/internal/util/identity.js +6 -0
  578. package/dist/esm/external/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
  579. package/dist/esm/external/rxjs/dist/esm5/internal/util/isArrayLike.js +4 -0
  580. package/dist/esm/external/rxjs/dist/esm5/internal/util/isArrayLike.js.map +1 -0
  581. package/dist/esm/external/rxjs/dist/esm5/internal/util/isAsyncIterable.js +8 -0
  582. package/dist/esm/external/rxjs/dist/esm5/internal/util/isAsyncIterable.js.map +1 -0
  583. package/dist/esm/external/rxjs/dist/esm5/internal/util/isFunction.js +6 -0
  584. package/dist/esm/external/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
  585. package/dist/esm/external/rxjs/dist/esm5/internal/util/isInteropObservable.js +9 -0
  586. package/dist/esm/external/rxjs/dist/esm5/internal/util/isInteropObservable.js.map +1 -0
  587. package/dist/esm/external/rxjs/dist/esm5/internal/util/isIterable.js +9 -0
  588. package/dist/esm/external/rxjs/dist/esm5/internal/util/isIterable.js.map +1 -0
  589. package/dist/esm/external/rxjs/dist/esm5/internal/util/isPromise.js +8 -0
  590. package/dist/esm/external/rxjs/dist/esm5/internal/util/isPromise.js.map +1 -0
  591. package/dist/esm/external/rxjs/dist/esm5/internal/util/isReadableStreamLike.js +41 -0
  592. package/dist/esm/external/rxjs/dist/esm5/internal/util/isReadableStreamLike.js.map +1 -0
  593. package/dist/esm/external/rxjs/dist/esm5/internal/util/lift.js +23 -0
  594. package/dist/esm/external/rxjs/dist/esm5/internal/util/lift.js.map +1 -0
  595. package/dist/esm/external/rxjs/dist/esm5/internal/util/noop.js +4 -0
  596. package/dist/esm/external/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
  597. package/dist/esm/external/rxjs/dist/esm5/internal/util/pipe.js +16 -0
  598. package/dist/esm/external/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
  599. package/dist/esm/external/rxjs/dist/esm5/internal/util/reportUnhandledError.js +12 -0
  600. package/dist/esm/external/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
  601. package/dist/esm/external/rxjs/dist/esm5/internal/util/throwUnobservableError.js +6 -0
  602. package/dist/esm/external/rxjs/dist/esm5/internal/util/throwUnobservableError.js.map +1 -0
  603. package/dist/esm/external/tslib/tslib.es6.js +117 -1
  604. package/dist/esm/external/tslib/tslib.es6.js.map +1 -1
  605. package/dist/esm/factory/api-controller.factory.d.ts +1 -0
  606. package/dist/esm/factory/api-controller.factory.js +42 -393
  607. package/dist/esm/factory/api-controller.factory.js.map +1 -1
  608. package/dist/esm/index.js +15 -1
  609. package/dist/esm/index.js.map +1 -1
  610. package/dist/esm/interceptor/api-route-runtime.interceptor.d.ts +5 -0
  611. package/dist/esm/interceptor/api-route-runtime.interceptor.js +29 -0
  612. package/dist/esm/interceptor/api-route-runtime.interceptor.js.map +1 -0
  613. package/dist/esm/interface/class/api/authorization/policy/registry.interface.d.ts +1 -0
  614. package/dist/esm/interface/class/api/authorization/policy/subscriber/context/interface.d.ts +1 -1
  615. package/dist/esm/interface/class/api/function/context/index.d.ts +2 -0
  616. package/dist/esm/interface/class/api/function/context/interface.d.ts +10 -0
  617. package/dist/esm/interface/class/api/function/context/operations.interface.d.ts +13 -0
  618. package/dist/esm/interface/class/api/function/index.d.ts +1 -0
  619. package/dist/esm/interface/class/api/index.d.ts +2 -0
  620. package/dist/esm/interface/class/api/route/index.d.ts +1 -0
  621. package/dist/esm/interface/class/api/route/runtime/context-data.interface.d.ts +10 -0
  622. package/dist/esm/interface/class/api/route/runtime/custom-execution-options.interface.d.ts +9 -0
  623. package/dist/esm/interface/class/api/route/runtime/generated/execution-options.interface.d.ts +14 -0
  624. package/dist/esm/interface/class/api/route/runtime/generated/index.d.ts +2 -0
  625. package/dist/esm/interface/class/api/route/runtime/generated/targets.interface.d.ts +12 -0
  626. package/dist/esm/interface/class/api/route/runtime/http-request.interface.d.ts +8 -0
  627. package/dist/esm/interface/class/api/route/runtime/index.d.ts +4 -0
  628. package/dist/esm/interface/class/api/subscriber/function/error-execution-context.interface.d.ts +1 -0
  629. package/dist/esm/interface/class/api/subscriber/function/execution/context.interface.d.ts +1 -0
  630. package/dist/esm/interface/class/api/subscriber/function.interface.d.ts +4 -0
  631. package/dist/esm/interface/class/api/subscriber/route/error-execution-context.interface.d.ts +2 -1
  632. package/dist/esm/interface/class/api/subscriber/route/execution/context/data/extended.interface.d.ts +36 -0
  633. package/dist/esm/interface/class/api/subscriber/route/execution/context/data/index.d.ts +2 -0
  634. package/dist/esm/interface/class/api/subscriber/route/execution/context/data/interface.d.ts +32 -0
  635. package/dist/esm/interface/class/api/subscriber/route/execution/context/index.d.ts +2 -0
  636. package/dist/esm/interface/class/api/subscriber/route/execution/context/interface.d.ts +11 -0
  637. package/dist/esm/interface/class/api/subscriber/route/execution/index.d.ts +1 -2
  638. package/dist/esm/interface/class/api/subscriber/route.interface.d.ts +6 -2
  639. package/dist/esm/interface/decorator/api/controller/properties/route/authentication.interface.d.ts +1 -1
  640. package/dist/esm/interface/decorator/api/controller/properties/route/base/generation.interface.d.ts +5 -0
  641. package/dist/esm/interface/decorator/api/controller/properties/route/base/index.d.ts +5 -2
  642. package/dist/esm/interface/decorator/api/controller/properties/route/base/interface.d.ts +4 -7
  643. package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/index.d.ts +4 -0
  644. package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/interface.d.ts +6 -0
  645. package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/reference.interface.d.ts +5 -0
  646. package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/request/index.d.ts +2 -0
  647. package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/request/interface.d.ts +6 -0
  648. package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/request/load.interface.d.ts +10 -0
  649. package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/response/index.d.ts +2 -0
  650. package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/response/interface.d.ts +6 -0
  651. package/dist/esm/interface/decorator/api/controller/properties/route/base/relations/response/load.interface.d.ts +4 -0
  652. package/dist/esm/interface/decorator/api/controller/properties/route/base/request/index.d.ts +2 -0
  653. package/dist/esm/interface/decorator/api/controller/properties/route/base/request/interface.d.ts +6 -0
  654. package/dist/esm/interface/decorator/api/controller/properties/route/base/request/target.interface.d.ts +6 -0
  655. package/dist/esm/interface/decorator/api/controller/properties/route/base/response/index.d.ts +2 -0
  656. package/dist/esm/interface/decorator/api/controller/properties/route/base/response/interface.d.ts +7 -0
  657. package/dist/esm/interface/decorator/api/controller/properties/route/base/response/target.interface.d.ts +4 -0
  658. package/dist/esm/interface/decorator/api/controller/properties/route/base/security.interface.d.ts +6 -0
  659. package/dist/esm/interface/decorator/api/controller/properties/route/with/dto.interface.d.ts +1 -1
  660. package/dist/esm/interface/decorator/api/function/create-executor-properties.interface.d.ts +1 -2
  661. package/dist/esm/interface/decorator/api/function/custom-properties.interface.d.ts +9 -0
  662. package/dist/esm/interface/decorator/api/function/delete-executor-properties.interface.d.ts +2 -3
  663. package/dist/esm/interface/decorator/api/function/get/executor-properties.interface.d.ts +1 -2
  664. package/dist/esm/interface/decorator/api/function/get/list-executor-properties.interface.d.ts +1 -2
  665. package/dist/esm/interface/decorator/api/function/get/many-executor-properties.interface.d.ts +1 -2
  666. package/dist/esm/interface/decorator/api/function/index.d.ts +1 -0
  667. package/dist/esm/interface/decorator/api/function/properties.interface.d.ts +4 -0
  668. package/dist/esm/interface/decorator/api/function/update-executor-properties.interface.d.ts +2 -3
  669. package/dist/esm/interface/decorator/api/index.d.ts +1 -0
  670. package/dist/esm/interface/decorator/api/method/index.d.ts +0 -2
  671. package/dist/esm/interface/decorator/api/method/properties.interface.d.ts +4 -17
  672. package/dist/esm/interface/decorator/api/route/custom-properties.interface.d.ts +6 -0
  673. package/dist/esm/interface/decorator/api/route/documentation-properties.interface.d.ts +5 -0
  674. package/dist/esm/interface/decorator/api/route/index.d.ts +7 -0
  675. package/dist/esm/interface/decorator/api/route/metadata/index.d.ts +3 -0
  676. package/dist/esm/interface/decorator/api/route/metadata/interface.d.ts +15 -0
  677. package/dist/esm/interface/decorator/api/route/metadata/resource.interface.d.ts +6 -0
  678. package/dist/esm/interface/decorator/api/route/metadata/route.interface.d.ts +7 -0
  679. package/dist/esm/interface/decorator/api/route/response/index.d.ts +2 -0
  680. package/dist/esm/interface/decorator/api/route/response/properties.interface.d.ts +9 -0
  681. package/dist/esm/interface/decorator/api/route/response/serialization-properties.interface.d.ts +3 -0
  682. package/dist/esm/interface/decorator/api/route/runtime-properties.interface.d.ts +11 -0
  683. package/dist/esm/interface/decorator/api/route/security/authentication-properties.interface.d.ts +9 -0
  684. package/dist/esm/interface/decorator/api/route/security/authorization-properties.interface.d.ts +4 -0
  685. package/dist/esm/interface/decorator/api/route/security/index.d.ts +3 -0
  686. package/dist/esm/interface/decorator/api/route/security/properties.interface.d.ts +6 -0
  687. package/dist/esm/interface/decorator/api/route/throttling/default-properties.interface.d.ts +4 -0
  688. package/dist/esm/interface/decorator/api/route/throttling/index.d.ts +2 -0
  689. package/dist/esm/interface/decorator/api/route/throttling/properties.interface.d.ts +4 -0
  690. package/dist/esm/interface/decorator/api/subscriber/function/filter.interface.d.ts +5 -0
  691. package/dist/esm/interface/decorator/api/subscriber/function/index.d.ts +2 -0
  692. package/dist/esm/interface/decorator/api/subscriber/function/properties.interface.d.ts +7 -0
  693. package/dist/esm/interface/decorator/api/subscriber/index.d.ts +2 -2
  694. package/dist/esm/interface/decorator/api/subscriber/route-properties.interface.d.ts +4 -0
  695. package/dist/esm/module/api/authorization.module.js +18 -1
  696. package/dist/esm/module/api/authorization.module.js.map +1 -1
  697. package/dist/esm/package.json +0 -1
  698. package/dist/esm/type/class/api/subscriber/route/after/create-context.type.d.ts +2 -2
  699. package/dist/esm/type/class/api/subscriber/route/after/delete-context.type.d.ts +2 -2
  700. package/dist/esm/type/class/api/subscriber/route/after/get/context.type.d.ts +2 -2
  701. package/dist/esm/type/class/api/subscriber/route/after/get/list-context.type.d.ts +2 -2
  702. package/dist/esm/type/class/api/subscriber/route/after/partial-update-context.type.d.ts +2 -2
  703. package/dist/esm/type/class/api/subscriber/route/after/update-context.type.d.ts +2 -2
  704. package/dist/esm/type/class/api/subscriber/route/before/create-context.type.d.ts +2 -2
  705. package/dist/esm/type/class/api/subscriber/route/before/delete-context.type.d.ts +2 -2
  706. package/dist/esm/type/class/api/subscriber/route/before/get/context.type.d.ts +2 -2
  707. package/dist/esm/type/class/api/subscriber/route/before/get/list-context.type.d.ts +2 -2
  708. package/dist/esm/type/class/api/subscriber/route/before/partial-update-context.type.d.ts +2 -2
  709. package/dist/esm/type/class/api/subscriber/route/before/update-context.type.d.ts +2 -2
  710. package/dist/esm/type/decorator/api/controller/properties/route/base/request/allowed-target.type.d.ts +9 -0
  711. package/dist/esm/type/decorator/api/controller/properties/route/base/request/index.d.ts +1 -1
  712. package/dist/esm/type/decorator/api/controller/properties/route/base/request/transformers.type.d.ts +7 -7
  713. package/dist/esm/type/decorator/api/controller/properties/route/base/response-transformers.type.d.ts +6 -6
  714. package/dist/esm/type/decorator/api/controller/transformer-config.type.d.ts +5 -5
  715. package/dist/esm/type/decorator/api/function/properties.type.d.ts +5 -3
  716. package/dist/esm/type/decorator/api/property/describe/dto/request-properties.type.d.ts +1 -1
  717. package/dist/esm/type/decorator/api/property/describe/properties/base/properties.type.d.ts +4 -4
  718. package/dist/esm/type/utility/dto/generate/allowed-combination.type.d.ts +4 -4
  719. package/dist/esm/utility/api/controller/apply/decorators.utility.js +59 -27
  720. package/dist/esm/utility/api/controller/apply/decorators.utility.js.map +1 -1
  721. package/dist/esm/utility/api/controller/apply/metadata.utility.js +6 -2
  722. package/dist/esm/utility/api/controller/apply/metadata.utility.js.map +1 -1
  723. package/dist/esm/utility/api/controller/get/dto.utility.js +6 -2
  724. package/dist/esm/utility/api/controller/get/dto.utility.js.map +1 -1
  725. package/dist/esm/utility/api/controller/get-list/transform/filter.utility.js +5 -1
  726. package/dist/esm/utility/api/controller/get-list/transform/filter.utility.js.map +1 -1
  727. package/dist/esm/utility/api/controller/handle-request-relations.utility.d.ts +4 -4
  728. package/dist/esm/utility/api/controller/handle-request-relations.utility.js +37 -11
  729. package/dist/esm/utility/api/controller/handle-request-relations.utility.js.map +1 -1
  730. package/dist/esm/utility/api/controller/index.d.ts +1 -0
  731. package/dist/esm/utility/api/controller/serialize-route-response.utility.d.ts +14 -0
  732. package/dist/esm/utility/api/controller/serialize-route-response.utility.js +27 -0
  733. package/dist/esm/utility/api/controller/serialize-route-response.utility.js.map +1 -0
  734. package/dist/esm/utility/api/controller/transform-data.utility.d.ts +8 -7
  735. package/dist/esm/utility/api/controller/transform-data.utility.js +19 -16
  736. package/dist/esm/utility/api/controller/transform-data.utility.js.map +1 -1
  737. package/dist/esm/utility/api/controller/validate-request.utility.d.ts +3 -3
  738. package/dist/esm/utility/api/controller/validate-request.utility.js +10 -9
  739. package/dist/esm/utility/api/controller/validate-request.utility.js.map +1 -1
  740. package/dist/esm/utility/api/controller/write/dto-swagger.utility.js +6 -2
  741. package/dist/esm/utility/api/controller/write/dto-swagger.utility.js.map +1 -1
  742. package/dist/esm/utility/api/function-transaction.utility.d.ts +20 -0
  743. package/dist/esm/utility/api/function-transaction.utility.js +50 -0
  744. package/dist/esm/utility/api/function-transaction.utility.js.map +1 -0
  745. package/dist/esm/utility/api/index.d.ts +1 -0
  746. package/dist/esm/utility/api/route/index.d.ts +1 -0
  747. package/dist/esm/utility/api/route/response/index.d.ts +2 -0
  748. package/dist/esm/utility/api/route/response/project-relation.utility.d.ts +11 -0
  749. package/dist/esm/utility/api/route/response/project-relation.utility.js +73 -0
  750. package/dist/esm/utility/api/route/response/project-relation.utility.js.map +1 -0
  751. package/dist/esm/utility/api/route/response/serialize.utility.d.ts +11 -0
  752. package/dist/esm/utility/api/route/response/serialize.utility.js +24 -0
  753. package/dist/esm/utility/api/route/response/serialize.utility.js.map +1 -0
  754. package/dist/esm/utility/dto/build-decorator.utility.js +5 -1
  755. package/dist/esm/utility/dto/build-decorator.utility.js.map +1 -1
  756. package/dist/esm/utility/dto/generate/core.utility.js +5 -1
  757. package/dist/esm/utility/dto/generate/core.utility.js.map +1 -1
  758. package/dist/esm/utility/dto/generate/dynamic.utility.js +5 -1
  759. package/dist/esm/utility/dto/generate/dynamic.utility.js.map +1 -1
  760. package/dist/esm/utility/dto/generate/exception.utility.js +5 -1
  761. package/dist/esm/utility/dto/generate/exception.utility.js.map +1 -1
  762. package/dist/esm/utility/dto/generate/filter-decorator.utility.js +5 -1
  763. package/dist/esm/utility/dto/generate/filter-decorator.utility.js.map +1 -1
  764. package/dist/esm/utility/dto/generate/get-list-response.utility.js +5 -1
  765. package/dist/esm/utility/dto/generate/get-list-response.utility.js.map +1 -1
  766. package/dist/esm/utility/dto/get/get-list-query-base-class.utility.js +5 -1
  767. package/dist/esm/utility/dto/get/get-list-query-base-class.utility.js.map +1 -1
  768. package/dist/esm/utility/dto/handle-date-property.utility.js +5 -1
  769. package/dist/esm/utility/dto/handle-date-property.utility.js.map +1 -1
  770. package/dist/esm/utility/dto/is/property/should-be-marked.utility.js +7 -3
  771. package/dist/esm/utility/dto/is/property/should-be-marked.utility.js.map +1 -1
  772. package/dist/esm/utility/dto/is/should-be-generated.utility.js +8 -4
  773. package/dist/esm/utility/dto/is/should-be-generated.utility.js.map +1 -1
  774. package/package.json +1 -1
  775. package/dist/cjs/enum/decorator/api/controller/request-transformer-type.enum.js.map +0 -1
  776. package/dist/cjs/interface/class/api/subscriber/route/execution/context-data.interface.d.ts +0 -82
  777. package/dist/cjs/interface/class/api/subscriber/route/execution/context.interface.d.ts +0 -29
  778. package/dist/cjs/interface/decorator/api/controller/properties/route/base/request.interface.d.ts +0 -8
  779. package/dist/cjs/interface/decorator/api/controller/properties/route/base/response.interface.d.ts +0 -7
  780. package/dist/cjs/interface/decorator/api/method/authorization.interface.d.ts +0 -3
  781. package/dist/cjs/interface/decorator/api/method/throttler-properties.interface.d.ts +0 -4
  782. package/dist/cjs/interface/decorator/api/subscriber/function-properties.interface.d.ts +0 -5
  783. package/dist/cjs/type/decorator/api/controller/properties/route/base/request/relations.type.d.ts +0 -18
  784. package/dist/esm/enum/decorator/api/controller/request-transformer-type.enum.js.map +0 -1
  785. package/dist/esm/interface/class/api/subscriber/route/execution/context-data.interface.d.ts +0 -82
  786. package/dist/esm/interface/class/api/subscriber/route/execution/context.interface.d.ts +0 -29
  787. package/dist/esm/interface/decorator/api/controller/properties/route/base/request.interface.d.ts +0 -8
  788. package/dist/esm/interface/decorator/api/controller/properties/route/base/response.interface.d.ts +0 -7
  789. package/dist/esm/interface/decorator/api/method/authorization.interface.d.ts +0 -3
  790. package/dist/esm/interface/decorator/api/method/throttler-properties.interface.d.ts +0 -4
  791. package/dist/esm/interface/decorator/api/subscriber/function-properties.interface.d.ts +0 -5
  792. package/dist/esm/type/decorator/api/controller/properties/route/base/request/relations.type.d.ts +0 -18
  793. /package/dist/cjs/enum/decorator/api/controller/{request-transformer-type.enum.d.ts → request/transformer-type.enum.d.ts} +0 -0
  794. /package/dist/esm/enum/decorator/api/controller/{request-transformer-type.enum.d.ts → request/transformer-type.enum.d.ts} +0 -0
@@ -3,16 +3,16 @@ import type { IApiAuthorizationPolicy, IApiAuthorizationPolicyRegistry, IApiAuth
3
3
  import type { IApiAuthorizationPolicyBuildOptions } from '../../../../interface/class/api/authorization/policy/build-options.interface';
4
4
  import type { IApiAuthorizationPolicyCacheOptions } from '../../../../interface/class/api/authorization/policy/cache-options.interface';
5
5
  import type { TApiAuthorizationPolicyHookResult } from '../../../../type/class/api/authorization/policy/hook/index';
6
- type TEntityConstructor<E extends IApiBaseEntity> = new () => E;
7
6
  export declare class ApiAuthorizationPolicyRegistry implements IApiAuthorizationPolicyRegistry {
8
7
  private cacheOptions;
9
8
  private readonly POLICY_REGISTRY;
10
9
  private readonly POLICY_RULE_CACHE;
11
10
  constructor();
12
- buildAggregatedPolicy<E extends IApiBaseEntity, TAction extends string>(entity: TEntityConstructor<E>, action: TAction, options?: IApiAuthorizationPolicyBuildOptions<E>): Promise<IApiAuthorizationPolicy<E, TApiAuthorizationPolicyHookResult<TAction, E>> | undefined>;
11
+ buildAggregatedPolicy<E extends IApiBaseEntity, TAction extends string>(entity: new () => E, action: TAction, options?: IApiAuthorizationPolicyBuildOptions<E>): Promise<IApiAuthorizationPolicy<E, TApiAuthorizationPolicyHookResult<TAction, E>> | undefined>;
13
12
  clear(): void;
14
13
  configureCache(options?: IApiAuthorizationPolicyCacheOptions): void;
15
- hasSubscriberForEntity(entity: TEntityConstructor<IApiBaseEntity>): boolean;
14
+ hasSubscriberForEntity(entity: new () => IApiBaseEntity): boolean;
15
+ invalidateCache(entity?: new () => IApiBaseEntity): void;
16
16
  registerSubscriber<E extends IApiBaseEntity>(registration: IApiAuthorizationPolicySubscriberRegistration<E>): void;
17
17
  private cacheRules;
18
18
  private createPolicyCacheKey;
@@ -26,7 +26,5 @@ export declare class ApiAuthorizationPolicyRegistry implements IApiAuthorization
26
26
  private resolvePolicyId;
27
27
  private resolvePolicyRules;
28
28
  private resolvePrincipal;
29
- private resolveRouteType;
30
29
  }
31
30
  export declare const apiAuthorizationPolicyRegistry: ApiAuthorizationPolicyRegistry;
32
- export {};
@@ -1,9 +1,9 @@
1
1
  import { AUTHORIZATION_POLICY_DECORATOR_CONSTANT } from '../../../../constant/class/authorization/policy/decorator.constant.js';
2
- import { EApiRouteType } from '../../../../enum/decorator/api/route-type.enum.js';
3
2
  import { AuthorizationResolveDefaultPrincipal } from '../../../../utility/authorization/resolve-default-principal.utility.js';
4
3
  import { GenerateEntityInformation } from '../../../../utility/generate-entity-information.utility.js';
5
4
  import { LoggerUtility } from '../../../../utility/logger.utility.js';
6
5
  import { ApiAuthorizationPolicyExecutor } from './executor.class.js';
6
+ import { PolicySubscriberWrapper } from './subscriber-wrapper.class.js';
7
7
 
8
8
  const policyRegistryLogger = LoggerUtility.getLogger("ApiAuthorizationPolicyRegistry");
9
9
  class ApiAuthorizationPolicyRegistry {
@@ -28,7 +28,6 @@ class ApiAuthorizationPolicyRegistry {
28
28
  const entityMetadata = GenerateEntityInformation(entity);
29
29
  const { authenticationRequest, permissions = [], principal: principalOverride, principalResolver, requestMetadata, routeType: routeTypeOverride } = options;
30
30
  const principal = await this.resolvePrincipal(authenticationRequest, principalOverride, principalResolver);
31
- const routeType = this.resolveRouteType(action, routeTypeOverride);
32
31
  const contextData = {
33
32
  action,
34
33
  authenticationRequest,
@@ -37,7 +36,7 @@ class ApiAuthorizationPolicyRegistry {
37
36
  entityMetadata,
38
37
  permissions,
39
38
  principal,
40
- routeType,
39
+ routeType: routeTypeOverride,
41
40
  };
42
41
  const aggregatedRules = [];
43
42
  const policyIds = new Set();
@@ -83,6 +82,13 @@ class ApiAuthorizationPolicyRegistry {
83
82
  hasSubscriberForEntity(entity) {
84
83
  return (this.POLICY_REGISTRY.get(this.getEntityName(entity))?.registrations.length ?? 0) > 0;
85
84
  }
85
+ invalidateCache(entity) {
86
+ if (!entity) {
87
+ this.POLICY_RULE_CACHE.clear();
88
+ return;
89
+ }
90
+ this.invalidateCacheForEntity(this.getEntityName(entity));
91
+ }
86
92
  registerSubscriber(registration) {
87
93
  const normalizedRegistration = {
88
94
  cache: registration.cache,
@@ -101,7 +107,7 @@ class ApiAuthorizationPolicyRegistry {
101
107
  }
102
108
  wrapper.addRegistration(normalizedRegistration);
103
109
  policyRegistryLogger.debug(`Total registrations for entity "${entityName}": ${wrapper.getRegistrationCount()}`);
104
- this.invalidateCacheForEntity(entityName);
110
+ this.invalidateCache(normalizedRegistration.entity);
105
111
  }
106
112
  cacheRules(cacheKey, rules, cacheOptions) {
107
113
  if (!cacheOptions.isEnabled) {
@@ -188,37 +194,8 @@ class ApiAuthorizationPolicyRegistry {
188
194
  }
189
195
  return AuthorizationResolveDefaultPrincipal(authenticationRequest?.user);
190
196
  }
191
- // NOTE: This is a compatibility shim until buildAggregatedPolicy uses a single
192
- // source of truth for CRUD actions instead of accepting both action and routeType.
193
- resolveRouteType(action, routeType) {
194
- if (routeType) {
195
- return routeType;
196
- }
197
- return Object.values(EApiRouteType).includes(action) ? action : undefined;
198
- }
199
197
  }
200
198
  const apiAuthorizationPolicyRegistry = new ApiAuthorizationPolicyRegistry();
201
- class PolicySubscriberWrapper {
202
- name;
203
- registrations;
204
- constructor(name, registrations = []) {
205
- this.name = name;
206
- this.registrations = registrations;
207
- }
208
- addRegistration(registration) {
209
- this.registrations.push(registration);
210
- this.registrations.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
211
- }
212
- getName() {
213
- return this.getNormalizedName();
214
- }
215
- getRegistrationCount() {
216
- return this.registrations.length;
217
- }
218
- getNormalizedName() {
219
- return this.name;
220
- }
221
- }
222
199
 
223
200
  export { ApiAuthorizationPolicyRegistry, apiAuthorizationPolicyRegistry };
224
201
  //# sourceMappingURL=registry.class.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.class.js","sources":["../../../../../../../src/class/api/authorization/policy/registry.class.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAiBA,MAAM,oBAAoB,GAAkB,aAAa,CAAC,SAAS,CAAC,gCAAgC,CAAC;MAIxF,8BAA8B,CAAA;AAClC,IAAA,YAAY;AAEH,IAAA,eAAe;AAEf,IAAA,iBAAiB;AAElC,IAAA,WAAA,GAAA;AACC,QAAA,IAAI,CAAC,iBAAiB,GAAG,IAAI,GAAG,EAAE;AAClC,QAAA,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,EAAE;QAChC,IAAI,CAAC,YAAY,GAAG,EAAE,SAA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C1B,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM;IACjC;IAEQ,iBAAiB,GAAA;QACxB,OAAO,IAAI,CAAC,IAAI;IACjB;AACA;;;;"}
1
+ {"version":3,"file":"registry.class.js","sources":["../../../../../../../src/class/api/authorization/policy/registry.class.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAkBA,MAAM,oBAAoB,GAAkB,aAAa,CAAC,SAAS,CAAC,gCAAgC,CAAC;MAExF,8BAA8B,CAAA;AAClC,IAAA,YAAY;AAEH,IAAA,eAAe;AAEf,IAAA,iBAAiB;AAElC,IAAA,WAAA,GAAA;AACC,QAAA,IAAI,CAAC,iBAAiB,GAAG,IAAI,GAAG,EAAE;AAClC,QAAA,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,EAAE;QAChC,IAAI,CAAC,YAAY,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE;IACzC;IAEO,MAAM,qBAAqB,CAAmD,MAAmB,EAAE,MAAe,EAAE,UAAkD,EAAE,EAAA;QAC9K,MAAM,UAAU,GAAW,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;QACrD,oBAAoB,CAAC,KAAK,CAAC,CAAA,uCAAA,EAA0C,UAAU,CAAA,UAAA,EAAa,MAAM,CAAA,CAAA,CAAG,CAAC;QAEtG,MAAM,mBAAmB,GAAwC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC;AACrG,QAAA,MAAM,aAAa,GAAyE,mBAAmB,EAAE,aAAa,IAAI,EAAE;QAEpI,oBAAoB,CAAC,KAAK,CAAC,CAAA,MAAA,EAAS,aAAa,CAAC,MAAM,CAAA,6BAAA,EAAgC,UAAU,CAAA,CAAA,CAAG,CAAC;AACtG,QAAA,oBAAoB,CAAC,KAAK,CAAC,CAAA,0BAAA,EAA6B,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,OAAgC,KAAK,OAAO,CAAC,OA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orizationPolicySubscriberRegistration } from '../../../../interface/class/api/authorization/index';
3
+ export declare class PolicySubscriberWrapper {
4
+ private readonly name;
5
+ registrations: Array<IApiAuthorizationPolicySubscriberRegistration<IApiBaseEntity>>;
6
+ constructor(name: string, registrations?: Array<IApiAuthorizationPolicySubscriberRegistration<IApiBaseEntity>>);
7
+ addRegistration(registration: IApiAuthorizationPolicySubscriberRegistration<IApiBaseEntity>): void;
8
+ getName(): string;
9
+ getRegistrationCount(): number;
10
+ }
@@ -0,0 +1,21 @@
1
+ class PolicySubscriberWrapper {
2
+ name;
3
+ registrations;
4
+ constructor(name, registrations = []) {
5
+ this.name = name;
6
+ this.registrations = registrations;
7
+ }
8
+ addRegistration(registration) {
9
+ this.registrations.push(registration);
10
+ this.registrations.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
11
+ }
12
+ getName() {
13
+ return this.name;
14
+ }
15
+ getRegistrationCount() {
16
+ return this.registrations.length;
17
+ }
18
+ }
19
+
20
+ export { PolicySubscriberWrapper };
21
+ //# sourceMappingURL=subscriber-wrapper.class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscriber-wrapper.class.js","sources":["../../../../../../../src/class/api/authorization/policy/subscriber-wrapper.class.ts"],"sourcesContent":[null],"names":[],"mappings":"MAGa,uBAAuB,CAAA;AAIjB,IAAA,IAAA;AAHX,IAAA,aAAa;IAEpB,WAAA,CACkB,IAAY,EAC7B,aAAA,GAAsF,EAAE,EAAA;QADvE,IAAA,CAAA,IAAI,GAAJ,IAAI;AAGrB,QAAA,IAAI,CAAC,aAAa,GAAG,aAAa;IACnC;AAEO,IAAA,eAAe,CAAC,YAA2E,EAAA;AACjG,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC;AACrC,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAgE,EAAE,CAAgE,KAAK,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;IACvM;IAEO,OAAO,GAAA;QACb,OAAO,IAAI,CAAC,IAAI;IACjB;IAEO,oBAAoB,GAAA;AAC1B,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM;IACjC;AACA;;;;"}
@@ -1,7 +1,8 @@
1
1
  import type { IApiBaseEntity } from '../../../interface/api-base-entity.interface';
2
2
  import type { IApiAuthenticationRequest } from '../../../interface/api/authentication-request.interface';
3
3
  import type { IApiAuthorizationAuditSink, IApiAuthorizationDecision, IApiAuthorizationPolicyRegistry, IApiAuthorizationPrincipal, IApiAuthorizationPrincipalResolver, IApiAuthorizationRequestMetadata } from '../../../interface/class/api/authorization/index';
4
- import type { IApiControllerAuthorizationProperties, IApiControllerRouteAuthorizationProperties } from '../../../interface/decorator/api/controller/properties/index';
4
+ import type { IApiControllerAuthorizationProperties } from '../../../interface/decorator/api/controller/properties/index';
5
+ import type { IApiRouteAuthorizationProperties } from '../../../interface/decorator/api/route/index';
5
6
  import type { TApiAuthorizationRuleTransformPayload } from '../../../type/class/api/authorization/rule/transform-payload.type';
6
7
  import { EApiRouteType } from '../../../enum/decorator/api/route-type.enum';
7
8
  import { ApiAuthorizationEngine } from './engine.class';
@@ -25,7 +26,7 @@ export declare class ApiAuthorizationRuntime {
25
26
  principal?: IApiAuthorizationPrincipal;
26
27
  requestMetadata: IApiAuthorizationRequestMetadata<E>;
27
28
  resource?: E;
28
- routeAuthorization?: IApiControllerRouteAuthorizationProperties;
29
+ routeAuthorization?: IApiRouteAuthorizationProperties;
29
30
  routeType?: EApiRouteType;
30
31
  }): Promise<IApiAuthorizationDecision<E, TApiAuthorizationRuleTransformPayload<E>>>;
31
32
  private createImplicitDenyHookPolicy;
@@ -65,6 +65,7 @@ let ApiAuthorizationRuntime = class ApiAuthorizationRuntime {
65
65
  principal,
66
66
  requestMetadata: options.requestMetadata,
67
67
  resource: options.resource,
68
+ routeType: options.routeType,
68
69
  });
69
70
  if (this.auditSink) {
70
71
  authorizationRuntimeLogger.verbose(`Recording authorization audit event for principal "${principal.id}" action "${options.action}".`);
@@ -117,7 +118,7 @@ let ApiAuthorizationRuntime = class ApiAuthorizationRuntime {
117
118
  const documents = await this.iamDocumentResolver.resolve(policyIds);
118
119
  authorizationRuntimeLogger.verbose(`Resolved ${documents.length} IAM policy documents for namespace "${options.authorization.policyNamespace}" and principal "${options.principal.id}".`);
119
120
  return await this.iamEngine.evaluate({
120
- action: this.resolveIamAction(options.authorization.policyNamespace, options.action),
121
+ action: this.resolveIamAction(options.authorization.policyNamespace, options.action, options.routeType),
121
122
  attachments,
122
123
  documents,
123
124
  policyNamespace: options.authorization.policyNamespace,
@@ -127,8 +128,8 @@ let ApiAuthorizationRuntime = class ApiAuthorizationRuntime {
127
128
  resourceDefinition: options.authorization.resourceDefinition,
128
129
  });
129
130
  }
130
- resolveIamAction(policyNamespace, action) {
131
- const iamActionByRouteType = {
131
+ resolveIamAction(policyNamespace, action, routeType) {
132
+ const actionByRouteType = {
132
133
  [EApiRouteType.CREATE]: "create",
133
134
  [EApiRouteType.DELETE]: "delete",
134
135
  [EApiRouteType.GET]: "read",
@@ -136,8 +137,8 @@ let ApiAuthorizationRuntime = class ApiAuthorizationRuntime {
136
137
  [EApiRouteType.PARTIAL_UPDATE]: "update",
137
138
  [EApiRouteType.UPDATE]: "update",
138
139
  };
139
- const iamAction = iamActionByRouteType[action];
140
- return iamAction ? `${policyNamespace}:${iamAction}` : `${policyNamespace}:${action}`;
140
+ const resolvedAction = routeType ? actionByRouteType[routeType] : undefined;
141
+ return resolvedAction ? `${policyNamespace}:${resolvedAction}` : `${policyNamespace}:${action}`;
141
142
  }
142
143
  resolveMode(authorization, routeAuthorization) {
143
144
  const mode = routeAuthorization?.mode ?? authorization.defaultMode;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.class.js","sources":["../../../../../../src/class/api/authorization/runtime.class.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;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SAAiD,EAAE,qBAAiD,EAAA;QAClI,IAAI,SAAS,EAAE;YACd,0BAA0B,CAAC,OAAO,CAAC,CAAA,wCAAA,EAA2C,SAAS,CAAC,EAAE,CAAA,EAAA,CAAI,CAAC;AAE/F,YAAA,OAAO,SAAS;QACjB;AAEA,QAAA,IAAI,IAAI,CAAC,iBAAiB,EAAE;AAC3B,YAAA,0BAA0B,CAAC,OAAO,CAAC,qEAAqE,CAAC;AAEzG,YAAA,OAAO,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,qBAAqB,EAAE,IAAI,EAAE,qBAAqB,CAAC;QAChG;AAEA,QAAA,0BAA0B,CAAC,OAAO,CAAC,mEAAmE,CAAC;AAEvG,QAAA,OAAO,oCAAoC,CAAC,qBAAqB,EAAE,IAAI,CAAC;IACzE;;AA1KY,uBAAuB,GAAA,UAAA,CAAA;AADnC,IAAA,UAAU,EAAE;AAGV,IAAA,OAAA,CAAA,CAAA,EAAA,MAAM,CAAC,mCAAmC,CAAC,CAAA;IAO3C,OAAA,CAAA,CAAA,EAAA,QAAQ,EAAE,CAAA;AACV,IAAA,OAAA,CAAA,CAAA,EAAA,MAAM,CAAC,sCAAsC,CAAC,CAAA;IAE9C,OAAA,CAAA,CAAA,EAAA,QAAQ,EAAE,CAAA;AACV,IAAA,OAAA,CAAA,CAAA,EAAA,MAAM,CAAC,8BAA8B,CAAC,CAAA;6CATD,sBAAsB;QACnB,sCAAsC;QACvC,qCAAqC;QACvC,mCAAmC;QAC7C,yBAAyB,EAAA,MAAA,EAAA,MAAA,CAAA;AAR1C,CAAA,EAAA,uBAAuB,CA2KnC;;;;"}
1
+ {"version":3,"file":"runtime.class.js","sources":["../../../../../../src/class/api/authorization/runtime.class.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,0BAA0B,GAAkB,aAAa,CAAC,SAAS,CAAC,yBAAyB,CAAC;AAG7F,IAAM,uBAAuB,GAA7B,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AAgB,CAAC,SAAiD,EAAE,qBAAiD,EAAA;QAClI,IAAI,SAAS,EAAE;YACd,0BAA0B,CAAC,OAAO,CAAC,CAAA,wCAAA,EAA2C,SAAS,CAAC,EAAE,CAAA,EAAA,CAAI,CAAC;AAE/F,YAAA,OAAO,SAAS;QACjB;AAEA,QAAA,IAAI,IAAI,CAAC,iBAAiB,EAAE;AAC3B,YAAA,0BAA0B,CAAC,OAAO,CAAC,qEAAqE,CAAC;AAEzG,YAAA,OAAO,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,qBAAqB,EAAE,IAAI,EAAE,qBAAqB,CAAC;QAChG;AAEA,QAAA,0BAA0B,CAAC,OAAO,CAAC,mEAAmE,CAAC;AAEvG,QAAA,OAAO,oCAAoC,CAAC,qBAAqB,EAAE,IAAI,CAAC;IACzE;;AAjKY,uBAAuB,GAAA,UAAA,CAAA;AADnC,IAAA,UAAU,EAAE;AAGV,IAAA,OAAA,CAAA,CAAA,EAAA,MAAM,CAAC,mCAAmC,CAAC,CAAA;IAO3C,OAAA,CAAA,CAAA,EAAA,QAAQ,EAAE,CAAA;AACV,IAAA,OAAA,CAAA,CAAA,EAAA,MAAM,CAAC,sCAAsC,CAAC,CAAA;IAE9C,OAAA,CAAA,CAAA,EAAA,QAAQ,EAAE,CAAA;AACV,IAAA,OAAA,CAAA,CAAA,EAAA,MAAM,CAAC,8BAA8B,CAAC,CAAA;6CATD,sBAAsB;QACnB,sCAAsC;QACvC,qCAAqC;QACvC,mCAAmC;QAC7C,yBAAyB,EAAA,MAAA,EAAA,MAAA,CAAA;AAR1C,CAAA,EAAA,uBAAuB,CAkKnC;;;;"}
@@ -2,6 +2,7 @@ import type { IApiBaseEntity } from '../../../interface/api-base-entity.interfac
2
2
  import type { IApiAuthorizationDecision, IApiAuthorizationPrincipal, IApiAuthorizationRequestMetadata } from '../../../interface/class/api/authorization/index';
3
3
  import type { IApiControllerAuthorizationProperties, IApiControllerRouteAuthorizationProperties } from '../../../interface/decorator/api/controller/properties/index';
4
4
  import type { TApiAuthorizationRuleTransformPayload } from '../../../type/class/api/authorization/rule/transform-payload.type';
5
+ import { EApiRouteType } from '../../../enum/decorator/api/index';
5
6
  import { ApiAuthorizationRuntime } from './runtime.class';
6
7
  export declare class ApiAuthorizationSimulator {
7
8
  private readonly runtime;
@@ -14,5 +15,6 @@ export declare class ApiAuthorizationSimulator {
14
15
  requestMetadata?: IApiAuthorizationRequestMetadata<E>;
15
16
  resource?: E;
16
17
  routeAuthorization?: IApiControllerRouteAuthorizationProperties;
18
+ routeType?: EApiRouteType;
17
19
  }): Promise<IApiAuthorizationDecision<E, TApiAuthorizationRuleTransformPayload<E>>>;
18
20
  }
@@ -16,6 +16,7 @@ let ApiAuthorizationSimulator = class ApiAuthorizationSimulator {
16
16
  requestMetadata: options.requestMetadata ?? {},
17
17
  resource: options.resource,
18
18
  routeAuthorization: options.routeAuthorization,
19
+ routeType: options.routeType,
19
20
  });
20
21
  }
21
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"simulator.class.js","sources":["../../../../../../src/class/api/authorization/simulator.class.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAUO,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB,CAAA;AACD,IAAA,OAAA;AAApC,IAAA,WAAA,CAAoC,OAAgC,EAAA;QAAhC,IAAA,CAAA,OAAO,GAAP,OAAO;IAA4B;IAEhE,MAAM,QAAQ,CAA2B,OAAsR,EAAA;AACrU,QAAA,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;YAClC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,SAAS,EAAE,OAAO,CAAC,SAAS;AAC5B,YAAA,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,EAAE;YAC9C,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;AAC9C,SAAA,CAAC;IACH;;AAbY,yBAAyB,GAAA,UAAA,CAAA;AADrC,IAAA,UAAU,EAAE;qCAEiC,uBAAuB,CAAA;AADxD,CAAA,EAAA,yBAAyB,CAcrC;;;;"}
1
+ {"version":3,"file":"simulator.class.js","sources":["../../../../../../src/class/api/authorization/simulator.class.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAWO,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB,CAAA;AACD,IAAA,OAAA;AAApC,IAAA,WAAA,CAAoC,OAAgC,EAAA;QAAhC,IAAA,CAAA,OAAO,GAAP,OAAO;IAA4B;IAEhE,MAAM,QAAQ,CAA2B,OAAiT,EAAA;AAChW,QAAA,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;YAClC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,SAAS,EAAE,OAAO,CAAC,SAAS;AAC5B,YAAA,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,EAAE;YAC9C,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;YAC9C,SAAS,EAAE,OAAO,CAAC,SAAS;AAC5B,SAAA,CAAC;IACH;;AAdY,yBAAyB,GAAA,UAAA,CAAA;AADrC,IAAA,UAAU,EAAE;qCAEiC,uBAAuB,CAAA;AADxD,CAAA,EAAA,yBAAyB,CAerC;;;;"}
@@ -0,0 +1,7 @@
1
+ import type { IApiBaseEntity } from '../../../interface/api-base-entity.interface';
2
+ import type { IApiFunctionContext } from '../../../interface/class/api/function/index';
3
+ export declare class ApiFunctionContextStorage {
4
+ private static readonly STORAGE;
5
+ static get<E extends IApiBaseEntity>(): IApiFunctionContext<E> | undefined;
6
+ static run<E extends IApiBaseEntity, R>(context: IApiFunctionContext<E>, callback: () => Promise<R>): Promise<R>;
7
+ }
@@ -0,0 +1,14 @@
1
+ import { AsyncLocalStorage } from 'node:async_hooks';
2
+
3
+ class ApiFunctionContextStorage {
4
+ static STORAGE = new AsyncLocalStorage();
5
+ static get() {
6
+ return ApiFunctionContextStorage.STORAGE.getStore();
7
+ }
8
+ static run(context, callback) {
9
+ return ApiFunctionContextStorage.STORAGE.run(context, callback);
10
+ }
11
+ }
12
+
13
+ export { ApiFunctionContextStorage };
14
+ //# sourceMappingURL=context-storage.class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-storage.class.js","sources":["../../../../../../src/class/api/function/context-storage.class.ts"],"sourcesContent":[null],"names":["NodeAsyncLocalStorage"],"mappings":";;MAOa,yBAAyB,CAAA;AAC7B,IAAA,OAAgB,OAAO,GAA2D,IAAIA,iBAAqB,EAAuC;AAEnJ,IAAA,OAAO,GAAG,GAAA;AAChB,QAAA,OAAO,yBAAyB,CAAC,OAAO,CAAC,QAAQ,EAAwC;IAC1F;AAEO,IAAA,OAAO,GAAG,CAA8B,OAA+B,EAAE,QAA0B,EAAA;QACzG,OAAO,yBAAyB,CAAC,OAAO,CAAC,GAAG,CAAC,OAAyD,EAAE,QAAQ,CAAC;IAClH;;;;;"}
@@ -0,0 +1,19 @@
1
+ import type { IApiBaseEntity } from '../../../interface/api-base-entity.interface';
2
+ import type { IApiFunctionCustomProperties } from '../../../interface/decorator/api/function/index';
3
+ import type { Repository } from "typeorm";
4
+ import { EApiFunctionTransactionMode } from '../../../enum/decorator/api/index';
5
+ export declare class ApiFunctionCustomRuntime {
6
+ static execute<E extends IApiBaseEntity>(options: {
7
+ functionArguments: Array<unknown>;
8
+ originalMethod: (...arguments_: Array<unknown>) => Promise<unknown>;
9
+ properties: IApiFunctionCustomProperties<E>;
10
+ target: {
11
+ repository: Repository<E>;
12
+ };
13
+ transactionMode: EApiFunctionTransactionMode;
14
+ }): Promise<unknown>;
15
+ private static createContext;
16
+ private static executeErrorSubscribers;
17
+ private static executeWithEventManager;
18
+ private static resolveEventManager;
19
+ }
@@ -0,0 +1,116 @@
1
+ import { ApiFunctionContextStorage } from './context-storage.class.js';
2
+ import { ApiSubscriberExecutor } from '../subscriber/executor.class.js';
3
+ import '../../../enum/decorator/api/action.enum.js';
4
+ import '../../../enum/decorator/api/authentication-type.enum.js';
5
+ import '../../../enum/decorator/api/controller/load-relations-strategy.enum.js';
6
+ import '../../../enum/decorator/api/controller/relation-reference-shape.enum.js';
7
+ import '../../../enum/decorator/api/controller/request/target.enum.js';
8
+ import '../../../enum/decorator/api/controller/request/transformer-type.enum.js';
9
+ import '../../../enum/decorator/api/controller/response-target.enum.js';
10
+ import '../../../enum/decorator/api/dto-type.enum.js';
11
+ import { EApiFunctionTransactionMode } from '../../../enum/decorator/api/function-transaction-mode.enum.js';
12
+ import { EApiFunctionType } from '../../../enum/decorator/api/function-type.enum.js';
13
+ import { EApiSubscriberOnType } from '../../../enum/decorator/api/on-type.enum.js';
14
+ import '../../../enum/decorator/api/property/data-type.enum.js';
15
+ import '../../../enum/decorator/api/property/date/identifier.enum.js';
16
+ import '../../../enum/decorator/api/property/date/type.enum.js';
17
+ import '../../../enum/decorator/api/property/desribe-type.enum.js';
18
+ import '../../../enum/decorator/api/property/number-type.enum.js';
19
+ import '../../../enum/decorator/api/property/string-type.enum.js';
20
+ import '../../../enum/decorator/api/route-type.enum.js';
21
+ import { ErrorException } from '../../../utility/error/exception.utility.js';
22
+
23
+ class ApiFunctionCustomRuntime {
24
+ static async execute(options) {
25
+ const activeContext = ApiFunctionContextStorage.get();
26
+ let eventManager;
27
+ try {
28
+ eventManager = ApiFunctionCustomRuntime.resolveEventManager(options.transactionMode, activeContext);
29
+ }
30
+ catch (error) {
31
+ await ApiFunctionCustomRuntime.executeErrorSubscribers(options, undefined, EApiSubscriberOnType.BEFORE_ERROR, error);
32
+ throw error;
33
+ }
34
+ if (options.transactionMode === EApiFunctionTransactionMode.REQUIRED && !eventManager) {
35
+ return await options.target.repository.manager.transaction(async (transactionManager) => await ApiFunctionCustomRuntime.executeWithEventManager({ ...options, eventManager: transactionManager }));
36
+ }
37
+ return await ApiFunctionCustomRuntime.executeWithEventManager({ ...options, eventManager });
38
+ }
39
+ static createContext(options) {
40
+ const repository = options.eventManager?.getRepository(options.properties.entity) ?? options.target.repository;
41
+ return {
42
+ entity: options.properties.entity,
43
+ eventManager: options.eventManager,
44
+ getRepository: (repositoryEntity) => options.eventManager?.getRepository(repositoryEntity) ?? options.target.repository.manager.getRepository(repositoryEntity),
45
+ operations: {
46
+ create: async (properties) => await options.target.create(properties),
47
+ delete: async (criteria) => {
48
+ await options.target.delete(criteria);
49
+ },
50
+ get: async (properties) => await options.target.get(properties),
51
+ getList: async (properties) => await options.target.getList(properties),
52
+ getMany: async (properties) => await options.target.getMany(properties),
53
+ getRepository: (repositoryEntity) => options.eventManager?.getRepository(repositoryEntity) ?? options.target.repository.manager.getRepository(repositoryEntity),
54
+ update: async (criteria, properties) => await options.target.update(criteria, properties),
55
+ },
56
+ repository,
57
+ };
58
+ }
59
+ static async executeErrorSubscribers(options, eventManager, onType, error) {
60
+ const entityInstance = new options.properties.entity();
61
+ const errorExecutionContext = {
62
+ action: options.properties.action,
63
+ DATA: { eventManager, repository: options.target.repository },
64
+ ENTITY: entityInstance,
65
+ FUNCTION_TYPE: EApiFunctionType.CUSTOM,
66
+ };
67
+ await ApiSubscriberExecutor.executeFunctionErrorSubscribers(options.target.constructor, entityInstance, EApiFunctionType.CUSTOM, onType, errorExecutionContext, error, options.properties.action);
68
+ }
69
+ static async executeWithEventManager(options) {
70
+ const entityInstance = new options.properties.entity();
71
+ const context = ApiFunctionCustomRuntime.createContext(options);
72
+ const executionContext = {
73
+ action: options.properties.action,
74
+ DATA: { eventManager: options.eventManager, repository: options.target.repository },
75
+ ENTITY: entityInstance,
76
+ FUNCTION_TYPE: EApiFunctionType.CUSTOM,
77
+ result: options.functionArguments,
78
+ };
79
+ let finalArguments;
80
+ try {
81
+ const beforeResult = await ApiSubscriberExecutor.executeFunctionSubscribers(options.target.constructor, entityInstance, EApiFunctionType.CUSTOM, EApiSubscriberOnType.BEFORE, executionContext, options.properties.action);
82
+ finalArguments = beforeResult ?? options.functionArguments;
83
+ }
84
+ catch (error) {
85
+ await ApiFunctionCustomRuntime.executeErrorSubscribers(options, options.eventManager, EApiSubscriberOnType.BEFORE_ERROR, error);
86
+ throw error;
87
+ }
88
+ try {
89
+ const result = await ApiFunctionContextStorage.run(context, async () => await options.originalMethod.apply(options.target, finalArguments));
90
+ const afterExecutionContext = {
91
+ action: options.properties.action,
92
+ DATA: { eventManager: options.eventManager, repository: options.target.repository },
93
+ ENTITY: entityInstance,
94
+ FUNCTION_TYPE: EApiFunctionType.CUSTOM,
95
+ result,
96
+ };
97
+ return (await ApiSubscriberExecutor.executeFunctionSubscribers(options.target.constructor, entityInstance, EApiFunctionType.CUSTOM, EApiSubscriberOnType.AFTER, afterExecutionContext, options.properties.action)) ?? result;
98
+ }
99
+ catch (error) {
100
+ await ApiFunctionCustomRuntime.executeErrorSubscribers(options, options.eventManager, EApiSubscriberOnType.AFTER_ERROR, error);
101
+ throw error;
102
+ }
103
+ }
104
+ static resolveEventManager(transactionMode, activeContext) {
105
+ if (transactionMode === EApiFunctionTransactionMode.NONE && activeContext?.eventManager) {
106
+ throw ErrorException("ApiFunctionCustom transaction mode NONE cannot run inside an active transaction");
107
+ }
108
+ if (transactionMode === EApiFunctionTransactionMode.MANDATORY && !activeContext?.eventManager) {
109
+ throw ErrorException("ApiFunctionCustom transaction mode MANDATORY requires an active transaction");
110
+ }
111
+ return transactionMode === EApiFunctionTransactionMode.NONE ? undefined : activeContext?.eventManager;
112
+ }
113
+ }
114
+
115
+ export { ApiFunctionCustomRuntime };
116
+ //# sourceMappingURL=custom-runtime.class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-runtime.class.js","sources":["../../../../../../src/class/api/function/custom-runtime.class.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAaa,wB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AC;QACpG;AAEA,QAAA,OAAO,eAAe,KAAK,2BAA2B,CAAC,IAAI,GAAG,SAAS,GAAG,aAAa,EAAE,YAAY;IACtG;AACA;;;;"}
@@ -0,0 +1 @@
1
+ export { ApiFunctionTransactionScope } from './transaction-scope.class';
@@ -0,0 +1,6 @@
1
+ import type { DataSource, EntityManager } from "typeorm";
2
+ export declare class ApiFunctionTransactionScope {
3
+ static runWithDataSource<R>(dataSource: DataSource, callback: () => Promise<R>): Promise<R>;
4
+ static runWithEntityManager<R>(entityManager: EntityManager, callback: () => Promise<R>): Promise<R>;
5
+ private static createMissingServiceContextError;
6
+ }
@@ -0,0 +1,32 @@
1
+ import { ApiFunctionContextStorage } from './context-storage.class.js';
2
+
3
+ class ApiFunctionTransactionScope {
4
+ static async runWithDataSource(dataSource, callback) {
5
+ return await dataSource.transaction(async (entityManager) => await ApiFunctionTransactionScope.runWithEntityManager(entityManager, callback));
6
+ }
7
+ static async runWithEntityManager(entityManager, callback) {
8
+ const entity = Object;
9
+ const context = {
10
+ entity,
11
+ eventManager: entityManager,
12
+ getRepository: (repositoryEntity) => entityManager.getRepository(repositoryEntity),
13
+ operations: {
14
+ create: () => Promise.reject(ApiFunctionTransactionScope.createMissingServiceContextError()),
15
+ delete: () => Promise.reject(ApiFunctionTransactionScope.createMissingServiceContextError()),
16
+ get: () => Promise.reject(ApiFunctionTransactionScope.createMissingServiceContextError()),
17
+ getList: () => Promise.reject(ApiFunctionTransactionScope.createMissingServiceContextError()),
18
+ getMany: () => Promise.reject(ApiFunctionTransactionScope.createMissingServiceContextError()),
19
+ getRepository: (repositoryEntity) => entityManager.getRepository(repositoryEntity),
20
+ update: () => Promise.reject(ApiFunctionTransactionScope.createMissingServiceContextError()),
21
+ },
22
+ repository: entityManager.getRepository(entity),
23
+ };
24
+ return await ApiFunctionContextStorage.run(context, callback);
25
+ }
26
+ static createMissingServiceContextError() {
27
+ return new Error("ApiFunctionTransactionScope operations require a decorated service context");
28
+ }
29
+ }
30
+
31
+ export { ApiFunctionTransactionScope };
32
+ //# sourceMappingURL=transaction-scope.class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-scope.class.js","sources":["../../../../../../src/class/api/function/transaction-scope.class.ts"],"sourcesContent":[null],"names":[],"mappings":";;MAMa,2BAA2B,CAAA;AAChC,IAAA,aAAa,iBAAiB,CAAI,UAAsB,EAAE,QAA0B,EAAA;QAC1F,OAAO,MAAM,UAAU,CAAC,WAAW,CAAC,OAAO,aAA4B,KAAiB,MAAM,2BAA2B,CAAC,oBAAoB,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IACzK;AAEO,IAAA,aAAa,oBAAoB,CAAI,aAA4B,EAAE,QAA0B,EAAA;QACnG,MAAM,MAAM,GAA6B,MAA6C;AAEtF,QAAA,MAAM,OAAO,GAAwC;YACpD,MAAM;AACN,YAAA,YAAY,EAAE,aAAa;YAC3B,aAAa,EAAE,CAA2B,gBAA6B,KAAoB,aAAa,CAAC,aAAa,CAAC,gBAAgB,CAAC;AACxI,YAAA,UAAU,EAAE;AACX,gBAAA,MAAM,EAAE,MAA+B,OAAO,CAAC,MAAM,CAAC,2BAA2B,CAAC,gCAAgC,EAAE,CAAC;AACrH,gBAAA,MAAM,EAAE,MAAqB,OAAO,CAAC,MAAM,CAAC,2BAA2B,CAAC,gCAAgC,EAAE,CAAC;AAC3G,gBAAA,GAAG,EAAE,MAA+B,OAAO,CAAC,MAAM,CAAC,2BAA2B,CAAC,gCAAgC,EAAE,CAAC;AAClH,gBAAA,OAAO,EAAE,MAAsB,OAAO,CAAC,MAAM,CAAC,2BAA2B,CAAC,gCAAgC,EAAE,CAAC;AAC7G,gBAAA,OAAO,EAAE,MAAsC,OAAO,CAAC,MAAM,CAAC,2BAA2B,CAAC,gCAAgC,EAAE,CAAC;gBAC7H,aAAa,EAAE,CAA2B,gBAA6B,KAAoB,aAAa,CAAC,aAAa,CAAC,gBAAgB,CAAC;AACxI,gBAAA,MAAM,EAAE,MAA+B,OAAO,CAAC,MAAM,CAAC,2BAA2B,CAAC,gCAAgC,EAAE,CAAC;AACrH,aAAA;AACD,YAAA,UAAU,EAAE,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC;SAC/C;QAED,OAAO,MAAM,yBAAyB,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC9D;AAEQ,IAAA,OAAO,gCAAgC,GAAA;AAC9C,QAAA,OAAO,IAAI,KAAK,CAAC,4EAA4E,CAAC;IAC/F;AACA;;;;"}
@@ -1,2 +1,4 @@
1
+ export * from './function/index';
2
+ export { ApiRouteRuntime } from './route-runtime.class';
1
3
  export * from './service-base.class';
2
4
  export * from './subscriber/index';
@@ -0,0 +1,21 @@
1
+ import type { IApiBaseEntity } from '../../interface/api-base-entity.interface';
2
+ import type { IApiRouteRuntimeCustomExecutionOptions, IApiRouteRuntimeGeneratedExecutionOptions } from '../../interface/class/api/route/index';
3
+ import type { IApiRouteMetadata, IApiRouteRuntimeProperties } from '../../interface/decorator/api/index';
4
+ import type { TApiControllerMethod } from '../../type/class/controller-method.type';
5
+ import { EApiRouteType } from '../../enum/decorator/api/index';
6
+ export declare class ApiRouteRuntime {
7
+ static executeCustom<E extends IApiBaseEntity, R>(options: IApiRouteRuntimeCustomExecutionOptions<E, R>): Promise<R>;
8
+ static executeCustomRequestRelations<E extends IApiBaseEntity>(controller: TApiControllerMethod<E>, metadata: IApiRouteMetadata<E>, runtimeProperties: IApiRouteRuntimeProperties<E>, body: Partial<E> | undefined): Promise<void>;
9
+ static executeCustomResponseRelations<E extends IApiBaseEntity, R>(controller: TApiControllerMethod<E>, runtimeProperties: IApiRouteRuntimeProperties<E>, response: R): Promise<R>;
10
+ static executeGenerated<E extends IApiBaseEntity, R extends EApiRouteType>(options: IApiRouteRuntimeGeneratedExecutionOptions<E, R>): Promise<unknown>;
11
+ private static executeCustomErrorSubscribers;
12
+ private static executeCustomResponse;
13
+ private static executeGeneratedErrorSubscribers;
14
+ private static executeGeneratedOperation;
15
+ private static executeGeneratedRequestPipeline;
16
+ private static executeGeneratedResponse;
17
+ private static executeGeneratedUpdateOperation;
18
+ private static executeRequestTargets;
19
+ private static loadCustomResponseRelations;
20
+ private static resolvePrimaryKey;
21
+ }