@decaf-ts/for-nest 0.6.0 → 0.7.0

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 (298) hide show
  1. package/lib/cjs/bin/cli.cjs +3 -2
  2. package/lib/cjs/bin/cli.cjs.map +1 -0
  3. package/lib/cjs/cli-module.cjs +2 -1
  4. package/lib/cjs/cli-module.cjs.map +1 -0
  5. package/lib/cjs/constants.cjs +1 -0
  6. package/lib/cjs/constants.cjs.map +1 -0
  7. package/lib/cjs/controllers.cjs +3 -2
  8. package/lib/cjs/controllers.cjs.map +1 -0
  9. package/lib/cjs/core-module.cjs +31 -25
  10. package/lib/cjs/core-module.cjs.map +1 -0
  11. package/lib/cjs/decaf-model/DecafModelModule.cjs +11 -6
  12. package/lib/cjs/decaf-model/DecafModelModule.cjs.map +1 -0
  13. package/lib/cjs/decaf-model/FromModelController.cjs +69 -63
  14. package/lib/cjs/decaf-model/FromModelController.cjs.map +1 -0
  15. package/lib/cjs/decaf-model/decorators/ApiOperationFromModel.cjs +1 -0
  16. package/lib/cjs/decaf-model/decorators/ApiOperationFromModel.cjs.map +1 -0
  17. package/lib/cjs/decaf-model/decorators/ApiParamsFromModel.cjs +1 -0
  18. package/lib/cjs/decaf-model/decorators/ApiParamsFromModel.cjs.map +1 -0
  19. package/lib/cjs/decaf-model/decorators/DecafBody.cjs +1 -0
  20. package/lib/cjs/decaf-model/decorators/DecafBody.cjs.map +1 -0
  21. package/lib/cjs/decaf-model/decorators/DecafParams.cjs +1 -0
  22. package/lib/cjs/decaf-model/decorators/DecafParams.cjs.map +1 -0
  23. package/lib/cjs/decaf-model/decorators/decorators.cjs +5 -4
  24. package/lib/cjs/decaf-model/decorators/decorators.cjs.map +1 -0
  25. package/lib/cjs/decaf-model/decorators/index.cjs +1 -0
  26. package/lib/cjs/decaf-model/decorators/index.cjs.map +1 -0
  27. package/lib/cjs/decaf-model/decorators/types.cjs +1 -0
  28. package/lib/cjs/decaf-model/decorators/types.cjs.map +1 -0
  29. package/lib/cjs/decaf-model/decorators/utils.cjs +1 -0
  30. package/lib/cjs/decaf-model/decorators/utils.cjs.map +1 -0
  31. package/lib/cjs/decaf-model/index.cjs +1 -0
  32. package/lib/cjs/decaf-model/index.cjs.map +1 -0
  33. package/lib/cjs/decaf-model/types.cjs +1 -0
  34. package/lib/cjs/decaf-model/types.cjs.map +1 -0
  35. package/lib/cjs/decaf-model/utils.cjs +5 -4
  36. package/lib/cjs/decaf-model/utils.cjs.map +1 -0
  37. package/lib/cjs/decoration.cjs +15 -14
  38. package/lib/cjs/decoration.cjs.map +1 -0
  39. package/lib/cjs/events-module/DecafStreamModule.cjs +15 -10
  40. package/lib/cjs/events-module/DecafStreamModule.cjs.map +1 -0
  41. package/lib/cjs/events-module/EventsController.cjs +20 -14
  42. package/lib/cjs/events-module/EventsController.cjs.map +1 -0
  43. package/lib/cjs/events-module/constant.cjs +1 -0
  44. package/lib/cjs/events-module/constant.cjs.map +1 -0
  45. package/lib/cjs/events-module/index.cjs +1 -0
  46. package/lib/cjs/events-module/index.cjs.map +1 -0
  47. package/lib/cjs/events-module/utils.cjs +1 -0
  48. package/lib/cjs/events-module/utils.cjs.map +1 -0
  49. package/lib/cjs/factory/NestBootstraper.cjs +7 -6
  50. package/lib/cjs/factory/NestBootstraper.cjs.map +1 -0
  51. package/lib/cjs/factory/errors/cors.cjs +1 -0
  52. package/lib/cjs/factory/errors/cors.cjs.map +1 -0
  53. package/lib/cjs/factory/errors/index.cjs +1 -0
  54. package/lib/cjs/factory/errors/index.cjs.map +1 -0
  55. package/lib/cjs/factory/errors/throttling.cjs +1 -0
  56. package/lib/cjs/factory/errors/throttling.cjs.map +1 -0
  57. package/lib/cjs/factory/exceptions/DecafErrorFilter.cjs +11 -6
  58. package/lib/cjs/factory/exceptions/DecafErrorFilter.cjs.map +1 -0
  59. package/lib/cjs/factory/exceptions/decorators.cjs +5 -4
  60. package/lib/cjs/factory/exceptions/decorators.cjs.map +1 -0
  61. package/lib/cjs/factory/exceptions/index.cjs +1 -0
  62. package/lib/cjs/factory/exceptions/index.cjs.map +1 -0
  63. package/lib/cjs/factory/index.cjs +1 -0
  64. package/lib/cjs/factory/index.cjs.map +1 -0
  65. package/lib/cjs/factory/openapi/DtoBuilder.cjs +8 -7
  66. package/lib/cjs/factory/openapi/DtoBuilder.cjs.map +1 -0
  67. package/lib/cjs/factory/openapi/SwaggerBuilder.cjs +7 -6
  68. package/lib/cjs/factory/openapi/SwaggerBuilder.cjs.map +1 -0
  69. package/lib/cjs/factory/openapi/SwaggerCustomUI.cjs +3 -2
  70. package/lib/cjs/factory/openapi/SwaggerCustomUI.cjs.map +1 -0
  71. package/lib/cjs/factory/openapi/constants.cjs +1 -0
  72. package/lib/cjs/factory/openapi/constants.cjs.map +1 -0
  73. package/lib/cjs/factory/openapi/index.cjs +1 -0
  74. package/lib/cjs/factory/openapi/index.cjs.map +1 -0
  75. package/lib/cjs/index.cjs +18 -17
  76. package/lib/cjs/index.cjs.map +1 -0
  77. package/lib/cjs/interceptors/AuthInterceptor.cjs +16 -10
  78. package/lib/cjs/interceptors/AuthInterceptor.cjs.map +1 -0
  79. package/lib/cjs/interceptors/DecafRequestHandlerInterceptor.cjs +14 -8
  80. package/lib/cjs/interceptors/DecafRequestHandlerInterceptor.cjs.map +1 -0
  81. package/lib/cjs/interceptors/context.cjs +1 -0
  82. package/lib/cjs/interceptors/context.cjs.map +1 -0
  83. package/lib/cjs/interceptors/index.cjs +1 -0
  84. package/lib/cjs/interceptors/index.cjs.map +1 -0
  85. package/lib/cjs/module.cjs +16 -11
  86. package/lib/cjs/module.cjs.map +1 -0
  87. package/lib/cjs/overrides/Adapter.cjs +1 -0
  88. package/lib/cjs/overrides/Adapter.cjs.map +1 -0
  89. package/lib/cjs/overrides/ModelBuilderExtensions.cjs +3 -2
  90. package/lib/cjs/overrides/ModelBuilderExtensions.cjs.map +1 -0
  91. package/lib/cjs/overrides/constants.cjs +1 -0
  92. package/lib/cjs/overrides/constants.cjs.map +1 -0
  93. package/lib/cjs/overrides/decoration.cjs +8 -7
  94. package/lib/cjs/overrides/decoration.cjs.map +1 -0
  95. package/lib/cjs/overrides/helpers.cjs +8 -7
  96. package/lib/cjs/overrides/helpers.cjs.map +1 -0
  97. package/lib/cjs/overrides/index.cjs +1 -0
  98. package/lib/cjs/overrides/index.cjs.map +1 -0
  99. package/lib/cjs/overrides/overrides.cjs +1 -0
  100. package/lib/cjs/overrides/overrides.cjs.map +1 -0
  101. package/lib/cjs/ram/RamRequestTransformer.cjs +1 -0
  102. package/lib/cjs/ram/RamRequestTransformer.cjs.map +1 -0
  103. package/lib/cjs/ram/index.cjs +1 -0
  104. package/lib/cjs/ram/index.cjs.map +1 -0
  105. package/lib/cjs/request/DecafAuthHandler.cjs +1 -0
  106. package/lib/cjs/request/DecafAuthHandler.cjs.map +1 -0
  107. package/lib/cjs/request/DecafHandlerExecutor.cjs +16 -10
  108. package/lib/cjs/request/DecafHandlerExecutor.cjs.map +1 -0
  109. package/lib/cjs/request/DecafRequestContext.cjs +12 -6
  110. package/lib/cjs/request/DecafRequestContext.cjs.map +1 -0
  111. package/lib/cjs/request/DecafResponseInterceptor.cjs +13 -7
  112. package/lib/cjs/request/DecafResponseInterceptor.cjs.map +1 -0
  113. package/lib/cjs/request/index.cjs +1 -0
  114. package/lib/cjs/request/index.cjs.map +1 -0
  115. package/lib/cjs/types.cjs +1 -0
  116. package/lib/cjs/types.cjs.map +1 -0
  117. package/lib/cjs/utils.cjs +1 -0
  118. package/lib/cjs/utils.cjs.map +1 -0
  119. package/lib/esm/index.js +1 -1
  120. package/lib/types/bin/cli.d.cts +1 -0
  121. package/lib/types/bin/cli.d.mts +1 -0
  122. package/lib/types/cli-module.d.cts +11 -0
  123. package/lib/types/cli-module.d.mts +11 -0
  124. package/lib/types/constants.d.cts +15 -0
  125. package/lib/types/constants.d.mts +15 -0
  126. package/lib/types/controllers.d.cts +22 -0
  127. package/lib/types/controllers.d.mts +22 -0
  128. package/lib/types/core-module.d.cts +17 -0
  129. package/lib/types/core-module.d.mts +17 -0
  130. package/lib/types/decaf-model/DecafModelModule.d.cts +9 -0
  131. package/lib/types/decaf-model/DecafModelModule.d.mts +9 -0
  132. package/lib/types/decaf-model/FromModelController.d.cts +61 -0
  133. package/lib/types/decaf-model/FromModelController.d.mts +61 -0
  134. package/lib/types/decaf-model/decorators/ApiOperationFromModel.d.cts +30 -0
  135. package/lib/types/decaf-model/decorators/ApiOperationFromModel.d.mts +30 -0
  136. package/lib/types/decaf-model/decorators/ApiParamsFromModel.d.cts +13 -0
  137. package/lib/types/decaf-model/decorators/ApiParamsFromModel.d.mts +13 -0
  138. package/lib/types/decaf-model/decorators/DecafBody.d.cts +5 -0
  139. package/lib/types/decaf-model/decorators/DecafBody.d.mts +5 -0
  140. package/lib/types/decaf-model/decorators/DecafParams.d.cts +9 -0
  141. package/lib/types/decaf-model/decorators/DecafParams.d.mts +9 -0
  142. package/lib/types/decaf-model/decorators/decorators.d.cts +29 -0
  143. package/lib/types/decaf-model/decorators/decorators.d.mts +29 -0
  144. package/lib/types/decaf-model/decorators/index.d.cts +7 -0
  145. package/lib/types/decaf-model/decorators/index.d.mts +7 -0
  146. package/lib/types/decaf-model/decorators/types.d.cts +23 -0
  147. package/lib/types/decaf-model/decorators/types.d.mts +23 -0
  148. package/lib/types/decaf-model/decorators/utils.d.cts +11 -0
  149. package/lib/types/decaf-model/decorators/utils.d.mts +11 -0
  150. package/lib/types/decaf-model/index.d.cts +3 -0
  151. package/lib/types/decaf-model/index.d.mts +3 -0
  152. package/lib/types/decaf-model/types.d.cts +7 -0
  153. package/lib/types/decaf-model/types.d.mts +7 -0
  154. package/lib/types/decaf-model/utils.d.cts +10 -0
  155. package/lib/types/decaf-model/utils.d.mts +10 -0
  156. package/lib/types/decoration.d.cts +1 -0
  157. package/lib/types/decoration.d.mts +1 -0
  158. package/lib/types/events-module/DecafStreamModule.d.cts +4 -0
  159. package/lib/types/events-module/DecafStreamModule.d.mts +4 -0
  160. package/lib/types/events-module/EventsController.d.cts +11 -0
  161. package/lib/types/events-module/EventsController.d.mts +11 -0
  162. package/lib/types/events-module/constant.d.cts +1 -0
  163. package/lib/types/events-module/constant.d.mts +1 -0
  164. package/lib/types/events-module/index.d.cts +2 -0
  165. package/lib/types/events-module/index.d.mts +2 -0
  166. package/lib/types/events-module/utils.d.cts +1 -0
  167. package/lib/types/events-module/utils.d.mts +1 -0
  168. package/lib/types/factory/NestBootstraper.d.cts +224 -0
  169. package/lib/types/factory/NestBootstraper.d.mts +224 -0
  170. package/lib/types/factory/errors/cors.d.cts +4 -0
  171. package/lib/types/factory/errors/cors.d.mts +4 -0
  172. package/lib/types/factory/errors/index.d.cts +1 -0
  173. package/lib/types/factory/errors/index.d.mts +1 -0
  174. package/lib/types/factory/errors/throttling.d.cts +4 -0
  175. package/lib/types/factory/errors/throttling.d.mts +4 -0
  176. package/lib/types/factory/exceptions/DecafErrorFilter.d.cts +4 -0
  177. package/lib/types/factory/exceptions/DecafErrorFilter.d.mts +4 -0
  178. package/lib/types/factory/exceptions/decorators.d.cts +2 -0
  179. package/lib/types/factory/exceptions/decorators.d.mts +2 -0
  180. package/lib/types/factory/exceptions/index.d.cts +2 -0
  181. package/lib/types/factory/exceptions/index.d.mts +2 -0
  182. package/lib/types/factory/index.d.cts +4 -0
  183. package/lib/types/factory/index.d.mts +4 -0
  184. package/lib/types/factory/openapi/DtoBuilder.d.cts +25 -0
  185. package/lib/types/factory/openapi/DtoBuilder.d.mts +25 -0
  186. package/lib/types/factory/openapi/SwaggerBuilder.d.cts +10 -0
  187. package/lib/types/factory/openapi/SwaggerBuilder.d.mts +10 -0
  188. package/lib/types/factory/openapi/SwaggerCustomUI.d.cts +22 -0
  189. package/lib/types/factory/openapi/SwaggerCustomUI.d.mts +22 -0
  190. package/lib/types/factory/openapi/constants.d.cts +27 -0
  191. package/lib/types/factory/openapi/constants.d.mts +27 -0
  192. package/lib/types/factory/openapi/index.d.cts +2 -0
  193. package/lib/types/factory/openapi/index.d.mts +2 -0
  194. package/lib/types/index.d.cts +43 -0
  195. package/lib/types/index.d.mts +43 -0
  196. package/lib/types/index.d.ts +1 -1
  197. package/lib/types/interceptors/AuthInterceptor.d.cts +10 -0
  198. package/lib/types/interceptors/AuthInterceptor.d.mts +10 -0
  199. package/lib/types/interceptors/DecafRequestHandlerInterceptor.d.cts +57 -0
  200. package/lib/types/interceptors/DecafRequestHandlerInterceptor.d.mts +57 -0
  201. package/lib/types/interceptors/context.d.cts +6 -0
  202. package/lib/types/interceptors/context.d.mts +6 -0
  203. package/lib/types/interceptors/index.d.cts +3 -0
  204. package/lib/types/interceptors/index.d.mts +3 -0
  205. package/lib/types/module.d.cts +8 -0
  206. package/lib/types/module.d.mts +8 -0
  207. package/lib/types/overrides/Adapter.d.cts +13 -0
  208. package/lib/types/overrides/Adapter.d.mts +13 -0
  209. package/lib/types/overrides/ModelBuilderExtensions.d.cts +8 -0
  210. package/lib/types/overrides/ModelBuilderExtensions.d.mts +8 -0
  211. package/lib/types/overrides/constants.d.cts +21 -0
  212. package/lib/types/overrides/constants.d.mts +21 -0
  213. package/lib/types/overrides/decoration.d.cts +30 -0
  214. package/lib/types/overrides/decoration.d.mts +30 -0
  215. package/lib/types/overrides/helpers.d.cts +11 -0
  216. package/lib/types/overrides/helpers.d.mts +11 -0
  217. package/lib/types/overrides/index.d.cts +6 -0
  218. package/lib/types/overrides/index.d.mts +6 -0
  219. package/lib/types/overrides/overrides.d.cts +1 -0
  220. package/lib/types/overrides/overrides.d.mts +1 -0
  221. package/lib/types/ram/RamRequestTransformer.d.cts +5 -0
  222. package/lib/types/ram/RamRequestTransformer.d.mts +5 -0
  223. package/lib/types/ram/index.d.cts +1 -0
  224. package/lib/types/ram/index.d.mts +1 -0
  225. package/lib/types/request/DecafAuthHandler.d.cts +10 -0
  226. package/lib/types/request/DecafAuthHandler.d.mts +10 -0
  227. package/lib/types/request/DecafHandlerExecutor.d.cts +52 -0
  228. package/lib/types/request/DecafHandlerExecutor.d.mts +52 -0
  229. package/lib/types/request/DecafRequestContext.d.cts +11 -0
  230. package/lib/types/request/DecafRequestContext.d.mts +11 -0
  231. package/lib/types/request/DecafResponseInterceptor.d.cts +8 -0
  232. package/lib/types/request/DecafResponseInterceptor.d.mts +8 -0
  233. package/lib/types/request/index.d.cts +4 -0
  234. package/lib/types/request/index.d.mts +4 -0
  235. package/lib/types/types.d.cts +88 -0
  236. package/lib/types/types.d.mts +88 -0
  237. package/lib/types/utils.d.cts +2 -0
  238. package/lib/types/utils.d.mts +2 -0
  239. package/package.json +4 -4
  240. package/lib/cjs/bin/cli.js.map +0 -1
  241. package/lib/cjs/cli-module.js.map +0 -1
  242. package/lib/cjs/constants.js.map +0 -1
  243. package/lib/cjs/controllers.js.map +0 -1
  244. package/lib/cjs/core-module.js.map +0 -1
  245. package/lib/cjs/decaf-model/DecafModelModule.js.map +0 -1
  246. package/lib/cjs/decaf-model/FromModelController.js.map +0 -1
  247. package/lib/cjs/decaf-model/decorators/ApiOperationFromModel.js.map +0 -1
  248. package/lib/cjs/decaf-model/decorators/ApiParamsFromModel.js.map +0 -1
  249. package/lib/cjs/decaf-model/decorators/DecafBody.js.map +0 -1
  250. package/lib/cjs/decaf-model/decorators/DecafParams.js.map +0 -1
  251. package/lib/cjs/decaf-model/decorators/decorators.js.map +0 -1
  252. package/lib/cjs/decaf-model/decorators/index.js.map +0 -1
  253. package/lib/cjs/decaf-model/decorators/types.js.map +0 -1
  254. package/lib/cjs/decaf-model/decorators/utils.js.map +0 -1
  255. package/lib/cjs/decaf-model/index.js.map +0 -1
  256. package/lib/cjs/decaf-model/types.js.map +0 -1
  257. package/lib/cjs/decaf-model/utils.js.map +0 -1
  258. package/lib/cjs/decoration.js.map +0 -1
  259. package/lib/cjs/events-module/DecafStreamModule.js.map +0 -1
  260. package/lib/cjs/events-module/EventsController.js.map +0 -1
  261. package/lib/cjs/events-module/constant.js.map +0 -1
  262. package/lib/cjs/events-module/index.js.map +0 -1
  263. package/lib/cjs/events-module/utils.js.map +0 -1
  264. package/lib/cjs/factory/NestBootstraper.js.map +0 -1
  265. package/lib/cjs/factory/errors/cors.js.map +0 -1
  266. package/lib/cjs/factory/errors/index.js.map +0 -1
  267. package/lib/cjs/factory/errors/throttling.js.map +0 -1
  268. package/lib/cjs/factory/exceptions/DecafErrorFilter.js.map +0 -1
  269. package/lib/cjs/factory/exceptions/decorators.js.map +0 -1
  270. package/lib/cjs/factory/exceptions/index.js.map +0 -1
  271. package/lib/cjs/factory/index.js.map +0 -1
  272. package/lib/cjs/factory/openapi/DtoBuilder.js.map +0 -1
  273. package/lib/cjs/factory/openapi/SwaggerBuilder.js.map +0 -1
  274. package/lib/cjs/factory/openapi/SwaggerCustomUI.js.map +0 -1
  275. package/lib/cjs/factory/openapi/constants.js.map +0 -1
  276. package/lib/cjs/factory/openapi/index.js.map +0 -1
  277. package/lib/cjs/index.js.map +0 -1
  278. package/lib/cjs/interceptors/AuthInterceptor.js.map +0 -1
  279. package/lib/cjs/interceptors/DecafRequestHandlerInterceptor.js.map +0 -1
  280. package/lib/cjs/interceptors/context.js.map +0 -1
  281. package/lib/cjs/interceptors/index.js.map +0 -1
  282. package/lib/cjs/module.js.map +0 -1
  283. package/lib/cjs/overrides/Adapter.js.map +0 -1
  284. package/lib/cjs/overrides/ModelBuilderExtensions.js.map +0 -1
  285. package/lib/cjs/overrides/constants.js.map +0 -1
  286. package/lib/cjs/overrides/decoration.js.map +0 -1
  287. package/lib/cjs/overrides/helpers.js.map +0 -1
  288. package/lib/cjs/overrides/index.js.map +0 -1
  289. package/lib/cjs/overrides/overrides.js.map +0 -1
  290. package/lib/cjs/ram/RamRequestTransformer.js.map +0 -1
  291. package/lib/cjs/ram/index.js.map +0 -1
  292. package/lib/cjs/request/DecafAuthHandler.js.map +0 -1
  293. package/lib/cjs/request/DecafHandlerExecutor.js.map +0 -1
  294. package/lib/cjs/request/DecafRequestContext.js.map +0 -1
  295. package/lib/cjs/request/DecafResponseInterceptor.js.map +0 -1
  296. package/lib/cjs/request/index.js.map +0 -1
  297. package/lib/cjs/types.js.map +0 -1
  298. package/lib/cjs/utils.js.map +0 -1
@@ -1,22 +1,27 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DecafHandlerExecutor = void 0;
2
4
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
5
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
7
+ r = Reflect.decorate(decorators, target, key, desc);
8
+ else
9
+ for (var i = decorators.length - 1; i >= 0; i--)
10
+ if (d = decorators[i])
11
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
12
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
13
  };
8
14
  var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
15
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
16
+ return Reflect.metadata(k, v);
10
17
  };
11
18
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
19
+ return function (target, key) { decorator(target, key, paramIndex); };
13
20
  };
14
21
  var DecafHandlerExecutor_1;
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.DecafHandlerExecutor = void 0;
17
22
  const common_1 = require("@nestjs/common");
18
- const DecafRequestContext_1 = require("./DecafRequestContext.cjs");
19
- const constants_1 = require("./../constants.cjs");
23
+ const DecafRequestContext_js_1 = require("./DecafRequestContext.cjs");
24
+ const constants_js_1 = require("./../constants.cjs");
20
25
  const logging_1 = require("@decaf-ts/logging");
21
26
  /**
22
27
  * @description
@@ -78,7 +83,8 @@ let DecafHandlerExecutor = DecafHandlerExecutor_1 = class DecafHandlerExecutor {
78
83
  exports.DecafHandlerExecutor = DecafHandlerExecutor;
79
84
  exports.DecafHandlerExecutor = DecafHandlerExecutor = DecafHandlerExecutor_1 = __decorate([
80
85
  (0, common_1.Injectable)({ scope: common_1.Scope.REQUEST }),
81
- __param(0, (0, common_1.Inject)(constants_1.DECAF_HANDLERS)),
82
- __metadata("design:paramtypes", [Array, DecafRequestContext_1.DecafRequestContext])
86
+ __param(0, (0, common_1.Inject)(constants_js_1.DECAF_HANDLERS)),
87
+ __metadata("design:paramtypes", [Array, DecafRequestContext_js_1.DecafRequestContext])
83
88
  ], DecafHandlerExecutor);
89
+ //# sourceMappingURL=DecafHandlerExecutor.js.map
84
90
  //# sourceMappingURL=DecafHandlerExecutor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DecafHandlerExecutor.js","sourceRoot":"","sources":["DecafHandlerExecutor.js"],"names":[],"mappings":";;;AAAA,IAAI,UAAU,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,UAAU,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI;IACjF,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7H,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU;QAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,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AoB,GAAG,sBAAsB,GAAG,MAAM,oBAAoB;IAC1E,YAAY,QAAQ,EAAE,OAAO;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG;QACf,MAAM,GAAG,GAAG,iBAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpE,GAAG,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,OAAO,CAAC,IAAI,YAAY,IAAI,CAAC,QAAQ,CAAC,MAAM,yBAAyB,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;QACxH,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClC,MAAM,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QACjD,CAAC;IACL,CAAC;CACJ,CAAC;AAMO,oDAAoB;AAL7B,+BAAA,oBAAoB,GAAG,sBAAsB,GAAG,UAAU,CAAC;IACvD,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;IACpC,OAAO,CAAC,CAAC,EAAE,IAAA,eAAM,EAAC,6BAAc,CAAC,CAAC;IAClC,UAAU,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,4CAAmB,CAAC,CAAC;CAChE,EAAE,oBAAoB,CAAC,CAAC;AAEzB,gDAAgD"}
@@ -1,18 +1,23 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DecafRequestContext = void 0;
2
4
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
5
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
7
+ r = Reflect.decorate(decorators, target, key, desc);
8
+ else
9
+ for (var i = decorators.length - 1; i >= 0; i--)
10
+ if (d = decorators[i])
11
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
12
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
13
  };
8
14
  var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
15
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
16
+ return Reflect.metadata(k, v);
10
17
  };
11
18
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
19
+ return function (target, key) { decorator(target, key, paramIndex); };
13
20
  };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.DecafRequestContext = void 0;
16
21
  const common_1 = require("@nestjs/common");
17
22
  const db_decorators_1 = require("@decaf-ts/db-decorators");
18
23
  const core_1 = require("@nestjs/core");
@@ -55,4 +60,5 @@ exports.DecafRequestContext = DecafRequestContext = __decorate([
55
60
  __param(0, (0, common_1.Inject)(core_1.REQUEST)),
56
61
  __metadata("design:paramtypes", [Request])
57
62
  ], DecafRequestContext);
63
+ //# sourceMappingURL=DecafRequestContext.js.map
58
64
  //# sourceMappingURL=DecafRequestContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DecafRequestContext.js","sourceRoot":"","sources":["DecafRequestContext.js"],"names":[],"mappings":";;;AAAA,IAAI,UAAU,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,UAAU,UAAU,EAAE,MAAM,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qC,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;CACJ,CAAC;AAMO,kDAAmB;AAL5B,8BAAA,mBAAmB,GAAG,UAAU,CAAC;IAC7B,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;IACpC,OAAO,CAAC,CAAC,EAAE,IAAA,eAAM,EAAC,cAAO,CAAC,CAAC;IAC3B,UAAU,CAAC,mBAAmB,EAAE,CAAC,OAAO,CAAC,CAAC;CAC7C,EAAE,mBAAmB,CAAC,CAAC;AAExB,+CAA+C"}
@@ -1,18 +1,23 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DecafResponseInterceptor = void 0;
2
4
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
5
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
7
+ r = Reflect.decorate(decorators, target, key, desc);
8
+ else
9
+ for (var i = decorators.length - 1; i >= 0; i--)
10
+ if (d = decorators[i])
11
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
12
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
13
  };
8
14
  var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
15
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
16
+ return Reflect.metadata(k, v);
10
17
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DecafResponseInterceptor = void 0;
13
18
  const common_1 = require("@nestjs/common");
14
19
  const rxjs_1 = require("rxjs");
15
- const DecafRequestContext_1 = require("./DecafRequestContext.cjs");
20
+ const DecafRequestContext_js_1 = require("./DecafRequestContext.cjs");
16
21
  let DecafResponseInterceptor = class DecafResponseInterceptor {
17
22
  constructor(ctx) {
18
23
  this.ctx = ctx;
@@ -27,6 +32,7 @@ let DecafResponseInterceptor = class DecafResponseInterceptor {
27
32
  exports.DecafResponseInterceptor = DecafResponseInterceptor;
28
33
  exports.DecafResponseInterceptor = DecafResponseInterceptor = __decorate([
29
34
  (0, common_1.Injectable)(),
30
- __metadata("design:paramtypes", [DecafRequestContext_1.DecafRequestContext])
35
+ __metadata("design:paramtypes", [DecafRequestContext_js_1.DecafRequestContext])
31
36
  ], DecafResponseInterceptor);
37
+ //# sourceMappingURL=DecafResponseInterceptor.js.map
32
38
  //# sourceMappingURL=DecafResponseInterceptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DecafResponseInterceptor.js","sourceRoot":"","sources":["DecafResponseInterceptor.js"],"names":[],"mappings":";;;AAAA,IAAI,UAAU,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,UAAU,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI;IACjF,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7H,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU;QAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;;QAC1H,KAAK,IAAI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AAC,QAAQ,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC,CAAC;IACR,CAAC;CACJ,CAAC;AAKO,4DAAwB;AAJjC,mCAAA,wBAAwB,GAAG,UAAU,CAAC;IAClC,IAAA,mBAAU,GAAE;IACZ,UAAU,CAAC,mBAAmB,EAAE,CAAC,4CAAmB,CAAC,CAAC;CACzD,EAAE,wBAAwB,CAAC,CAAC;AAE7B,oDAAoD"}
@@ -18,4 +18,5 @@ __exportStar(require("./DecafAuthHandler.cjs"), exports);
18
18
  __exportStar(require("./DecafRequestContext.cjs"), exports);
19
19
  __exportStar(require("./DecafHandlerExecutor.cjs"), exports);
20
20
  __exportStar(require("./DecafResponseInterceptor.cjs"), exports);
21
+ //# sourceMappingURL=index.js.map
21
22
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,2DAAyC;AACzC,4DAA0C;AAC1C,gEAA8C;AAC9C,iCAAiC"}
package/lib/cjs/types.cjs CHANGED
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
3
4
  //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;AACA,iCAAiC"}
package/lib/cjs/utils.cjs CHANGED
@@ -11,4 +11,5 @@ function repoForModel(model) {
11
11
  const repo = core_1.Repository.forModel(m);
12
12
  return repo;
13
13
  }
14
+ //# sourceMappingURL=utils.js.map
14
15
  //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":";;AAGA,oCAMC;AATD,yEAAuD;AACvD,2DAAwD;AACxD,yCAA4C;AAC5C,SAAgB,YAAY,CAAC,KAAK;IAC9B,MAAM,CAAC,GAAG,4BAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC3B,IAAI,CAAC,CAAC;QACF,MAAM,IAAI,6BAAa,CAAC,iCAAiC,KAAK,EAAE,CAAC,CAAC;IACtE,MAAM,IAAI,GAAG,iBAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC;AAChB,CAAC;AACD,iCAAiC"}
package/lib/esm/index.js CHANGED
@@ -40,7 +40,7 @@ export * from "./events-module/index.js";
40
40
  * @constant
41
41
  * @type {string}
42
42
  */
43
- export const VERSION = "0.5.0";
43
+ export const VERSION = "0.6.0";
44
44
  export const PACKAGE_NAME = "@decaf-ts/for-nest";
45
45
  Metadata.allowReregistration(true);
46
46
  Metadata.registerLibrary(PACKAGE_NAME, VERSION);
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { Command } from "commander";
2
+ export declare function resolveInputPath(input?: string, exists?: (candidate: string) => boolean, candidates?: string[]): string;
3
+ export declare function buildOutputFilePath(params: {
4
+ outputDir: string;
5
+ pkgName?: string;
6
+ name?: string;
7
+ fileName?: string;
8
+ appendVersion?: boolean;
9
+ version?: string;
10
+ }): string;
11
+ export default function nest(): Command;
@@ -0,0 +1,11 @@
1
+ import { Command } from "commander";
2
+ export declare function resolveInputPath(input?: string, exists?: (candidate: string) => boolean, candidates?: string[]): string;
3
+ export declare function buildOutputFilePath(params: {
4
+ outputDir: string;
5
+ pkgName?: string;
6
+ name?: string;
7
+ fileName?: string;
8
+ appendVersion?: boolean;
9
+ version?: string;
10
+ }): string;
11
+ export default function nest(): Command;
@@ -0,0 +1,15 @@
1
+ import { AdapterFlags, Context } from "@decaf-ts/core";
2
+ import { Logger } from "@decaf-ts/logging";
3
+ export declare const DECAF_MODULE_OPTIONS = "DecafModuleOptions";
4
+ export declare const DECAF_ADAPTER_ID = "DecafAdapter";
5
+ export declare const DECAF_ROUTE = "DecafRoute";
6
+ export declare const DECAF_HANDLERS: unique symbol;
7
+ export declare const DECAF_ADAPTER_OPTIONS: unique symbol;
8
+ export declare const AUTH_HANDLER: unique symbol;
9
+ export declare const AUTH_META_KEY = "auth:meta";
10
+ export declare const DECAF_CONTEXT_KEY: unique symbol;
11
+ export type DecafServerFlags<LOG extends Logger = Logger> = AdapterFlags<LOG> & {
12
+ headers: Record<string, any>;
13
+ overrides: Record<string, any>;
14
+ };
15
+ export type DecafServerCtx = Context<DecafServerFlags>;
@@ -0,0 +1,15 @@
1
+ import { AdapterFlags, Context } from "@decaf-ts/core";
2
+ import { Logger } from "@decaf-ts/logging";
3
+ export declare const DECAF_MODULE_OPTIONS = "DecafModuleOptions";
4
+ export declare const DECAF_ADAPTER_ID = "DecafAdapter";
5
+ export declare const DECAF_ROUTE = "DecafRoute";
6
+ export declare const DECAF_HANDLERS: unique symbol;
7
+ export declare const DECAF_ADAPTER_OPTIONS: unique symbol;
8
+ export declare const AUTH_HANDLER: unique symbol;
9
+ export declare const AUTH_META_KEY = "auth:meta";
10
+ export declare const DECAF_CONTEXT_KEY: unique symbol;
11
+ export type DecafServerFlags<LOG extends Logger = Logger> = AdapterFlags<LOG> & {
12
+ headers: Record<string, any>;
13
+ overrides: Record<string, any>;
14
+ };
15
+ export type DecafServerCtx = Context<DecafServerFlags>;
@@ -0,0 +1,22 @@
1
+ import { Context, ContextOf, ContextualizedArgs, FlagsOf, MaybeContextualArg, MethodOrOperation, ModelService, Repo, Service } from "@decaf-ts/core";
2
+ import { type Request } from "express";
3
+ import { DecafServerCtx } from "./constants.cjs";
4
+ import { Model, ModelConstructor } from "@decaf-ts/decorator-validation";
5
+ import { DecafRequestContext } from "./request/DecafRequestContext.cjs";
6
+ export declare abstract class DecafController<CONTEXT extends DecafServerCtx> extends Service<CONTEXT> {
7
+ protected readonly clientContext: DecafRequestContext;
8
+ protected constructor(clientContext: DecafRequestContext, name: string);
9
+ protected logCtx<ARGS extends any[] = any[], METHOD extends MethodOrOperation = MethodOrOperation>(args: MaybeContextualArg<CONTEXT, ARGS>, operation: METHOD): ContextualizedArgs<CONTEXT, ARGS, METHOD extends string ? true : false>;
10
+ protected logCtx<ARGS extends any[] = any[], METHOD extends MethodOrOperation = MethodOrOperation>(args: MaybeContextualArg<CONTEXT, ARGS>, operation: METHOD, allowCreate: false, overrides?: Partial<FlagsOf<CONTEXT>>): ContextualizedArgs<CONTEXT, ARGS, METHOD extends string ? true : false>;
11
+ protected logCtx<ARGS extends any[] = any[], METHOD extends MethodOrOperation = MethodOrOperation>(args: MaybeContextualArg<CONTEXT, ARGS>, operation: METHOD, allowCreate: true, overrides?: Partial<FlagsOf<CONTEXT>>): Promise<ContextualizedArgs<CONTEXT, ARGS, METHOD extends string ? true : false>>;
12
+ protected bindLoggerToRequest<RESULT extends ContextualizedArgs<any, any>>(value: RESULT | Promise<RESULT>, request?: Request): RESULT | Promise<RESULT>;
13
+ }
14
+ export declare abstract class DecafModelController<M extends Model<boolean>, C extends DecafServerCtx = DecafServerCtx> extends DecafController<C> {
15
+ private _persistence?;
16
+ abstract get class(): ModelConstructor<M>;
17
+ persistence(ctx?: Context<any>): Repo<M> | ModelService<M>;
18
+ protected constructor(clientContext: DecafRequestContext, name: string);
19
+ protected logCtx<ARGS extends any[] = any[], METHOD extends MethodOrOperation = MethodOrOperation>(args: MaybeContextualArg<any, ARGS>, operation: METHOD): ContextualizedArgs<ContextOf<ReturnType<this["persistence"]>>, ARGS, METHOD extends string ? true : false>;
20
+ protected logCtx<ARGS extends any[] = any[], METHOD extends MethodOrOperation = MethodOrOperation>(args: MaybeContextualArg<ContextOf<ReturnType<this["persistence"]>>, ARGS>, operation: METHOD, allowCreate: false, overrides?: Partial<FlagsOf<ContextOf<ReturnType<this["persistence"]>>>>): ContextualizedArgs<ContextOf<ReturnType<this["persistence"]>>, ARGS, METHOD extends string ? true : false>;
21
+ protected logCtx<ARGS extends any[] = any[], METHOD extends MethodOrOperation = MethodOrOperation>(args: MaybeContextualArg<ContextOf<ReturnType<this["persistence"]>>, ARGS>, operation: METHOD, allowCreate: true, overrides?: Partial<FlagsOf<ContextOf<ReturnType<this["persistence"]>>>>): Promise<ContextualizedArgs<ContextOf<ReturnType<this["persistence"]>>, ARGS, METHOD extends string ? true : false>>;
22
+ }
@@ -0,0 +1,22 @@
1
+ import { Context, ContextOf, ContextualizedArgs, FlagsOf, MaybeContextualArg, MethodOrOperation, ModelService, Repo, Service } from "@decaf-ts/core";
2
+ import { type Request } from "express";
3
+ import { DecafServerCtx } from "./constants.js";
4
+ import { Model, ModelConstructor } from "@decaf-ts/decorator-validation";
5
+ import { DecafRequestContext } from "./request/DecafRequestContext.js";
6
+ export declare abstract class DecafController<CONTEXT extends DecafServerCtx> extends Service<CONTEXT> {
7
+ protected readonly clientContext: DecafRequestContext;
8
+ protected constructor(clientContext: DecafRequestContext, name: string);
9
+ protected logCtx<ARGS extends any[] = any[], METHOD extends MethodOrOperation = MethodOrOperation>(args: MaybeContextualArg<CONTEXT, ARGS>, operation: METHOD): ContextualizedArgs<CONTEXT, ARGS, METHOD extends string ? true : false>;
10
+ protected logCtx<ARGS extends any[] = any[], METHOD extends MethodOrOperation = MethodOrOperation>(args: MaybeContextualArg<CONTEXT, ARGS>, operation: METHOD, allowCreate: false, overrides?: Partial<FlagsOf<CONTEXT>>): ContextualizedArgs<CONTEXT, ARGS, METHOD extends string ? true : false>;
11
+ protected logCtx<ARGS extends any[] = any[], METHOD extends MethodOrOperation = MethodOrOperation>(args: MaybeContextualArg<CONTEXT, ARGS>, operation: METHOD, allowCreate: true, overrides?: Partial<FlagsOf<CONTEXT>>): Promise<ContextualizedArgs<CONTEXT, ARGS, METHOD extends string ? true : false>>;
12
+ protected bindLoggerToRequest<RESULT extends ContextualizedArgs<any, any>>(value: RESULT | Promise<RESULT>, request?: Request): RESULT | Promise<RESULT>;
13
+ }
14
+ export declare abstract class DecafModelController<M extends Model<boolean>, C extends DecafServerCtx = DecafServerCtx> extends DecafController<C> {
15
+ private _persistence?;
16
+ abstract get class(): ModelConstructor<M>;
17
+ persistence(ctx?: Context<any>): Repo<M> | ModelService<M>;
18
+ protected constructor(clientContext: DecafRequestContext, name: string);
19
+ protected logCtx<ARGS extends any[] = any[], METHOD extends MethodOrOperation = MethodOrOperation>(args: MaybeContextualArg<any, ARGS>, operation: METHOD): ContextualizedArgs<ContextOf<ReturnType<this["persistence"]>>, ARGS, METHOD extends string ? true : false>;
20
+ protected logCtx<ARGS extends any[] = any[], METHOD extends MethodOrOperation = MethodOrOperation>(args: MaybeContextualArg<ContextOf<ReturnType<this["persistence"]>>, ARGS>, operation: METHOD, allowCreate: false, overrides?: Partial<FlagsOf<ContextOf<ReturnType<this["persistence"]>>>>): ContextualizedArgs<ContextOf<ReturnType<this["persistence"]>>, ARGS, METHOD extends string ? true : false>;
21
+ protected logCtx<ARGS extends any[] = any[], METHOD extends MethodOrOperation = MethodOrOperation>(args: MaybeContextualArg<ContextOf<ReturnType<this["persistence"]>>, ARGS>, operation: METHOD, allowCreate: true, overrides?: Partial<FlagsOf<ContextOf<ReturnType<this["persistence"]>>>>): Promise<ContextualizedArgs<ContextOf<ReturnType<this["persistence"]>>, ARGS, METHOD extends string ? true : false>>;
22
+ }
@@ -0,0 +1,17 @@
1
+ import { DynamicModule, OnApplicationShutdown } from "@nestjs/common";
2
+ import { ModuleRef } from "@nestjs/core";
3
+ import type { DecafModuleOptions } from "./types.cjs";
4
+ import { Adapter, PersistenceService } from "@decaf-ts/core";
5
+ import { Logger } from "@decaf-ts/logging";
6
+ export declare class DecafCoreModule<CONF, ADAPTER extends Adapter<CONF, any, any, any>> implements OnApplicationShutdown {
7
+ private readonly options;
8
+ private readonly moduleRef;
9
+ private static _logger;
10
+ private static _persistence?;
11
+ protected static get persistence(): PersistenceService<any>;
12
+ protected static get log(): Logger;
13
+ constructor(options: DecafModuleOptions<CONF, ADAPTER>, moduleRef: ModuleRef);
14
+ static forRoot(options: DecafModuleOptions): DynamicModule;
15
+ static bootPersistence(options: DecafModuleOptions): Promise<Adapter<any, any, any, any>[]>;
16
+ onApplicationShutdown(): Promise<void>;
17
+ }
@@ -0,0 +1,17 @@
1
+ import { DynamicModule, OnApplicationShutdown } from "@nestjs/common";
2
+ import { ModuleRef } from "@nestjs/core";
3
+ import type { DecafModuleOptions } from "./types.js";
4
+ import { Adapter, PersistenceService } from "@decaf-ts/core";
5
+ import { Logger } from "@decaf-ts/logging";
6
+ export declare class DecafCoreModule<CONF, ADAPTER extends Adapter<CONF, any, any, any>> implements OnApplicationShutdown {
7
+ private readonly options;
8
+ private readonly moduleRef;
9
+ private static _logger;
10
+ private static _persistence?;
11
+ protected static get persistence(): PersistenceService<any>;
12
+ protected static get log(): Logger;
13
+ constructor(options: DecafModuleOptions<CONF, ADAPTER>, moduleRef: ModuleRef);
14
+ static forRoot(options: DecafModuleOptions): DynamicModule;
15
+ static bootPersistence(options: DecafModuleOptions): Promise<Adapter<any, any, any, any>[]>;
16
+ onApplicationShutdown(): Promise<void>;
17
+ }
@@ -0,0 +1,9 @@
1
+ import { DynamicModule, Provider } from "@nestjs/common";
2
+ import { DecafModuleOptions } from "../types.cjs";
3
+ import { Model, ModelConstructor } from "@decaf-ts/decorator-validation";
4
+ export declare function getModuleFor(flavour: string): {
5
+ new (): {};
6
+ readonly log: import("@decaf-ts/logging").Logger;
7
+ createModelServices<T extends Model<boolean>>(models: ModelConstructor<T>[]): Provider[];
8
+ forRoot(flavour: string, options?: Partial<DecafModuleOptions>): DynamicModule;
9
+ };
@@ -0,0 +1,9 @@
1
+ import { DynamicModule, Provider } from "@nestjs/common";
2
+ import { DecafModuleOptions } from "../types.js";
3
+ import { Model, ModelConstructor } from "@decaf-ts/decorator-validation";
4
+ export declare function getModuleFor(flavour: string): {
5
+ new (): {};
6
+ readonly log: import("@decaf-ts/logging").Logger;
7
+ createModelServices<T extends Model<boolean>>(models: ModelConstructor<T>[]): Provider[];
8
+ forRoot(flavour: string, options?: Partial<DecafModuleOptions>): DynamicModule;
9
+ };
@@ -0,0 +1,61 @@
1
+ import { ModelService, type Repo } from "@decaf-ts/core";
2
+ import { Model, ModelConstructor } from "@decaf-ts/decorator-validation";
3
+ import { type DecafModelRoute } from "./decorators/index.cjs";
4
+ import { ControllerConstructor } from "./types.cjs";
5
+ import "../overrides";
6
+ /**
7
+ * @description
8
+ * Factory and utilities for generating dynamic NestJS controllers from Decaf {@link Model} definitions.
9
+ *
10
+ * @summary
11
+ * The `FromModelController` class provides the infrastructure necessary to automatically generate
12
+ * strongly-typed CRUD controllers based on a given {@link ModelConstructor}. It inspects metadata from
13
+ * the model, derives route paths, parameters, and generates a dynamic controller class at runtime with
14
+ * full support for querying, creation, update, and deletion of model entities through a {@link Repo}.
15
+ *
16
+ * @template T The {@link Model} type associated with the generated controller.
17
+ *
18
+ * @param ModelClazz The model class to generate the controller from.
19
+ *
20
+ * @class FromModelController
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * // Given a Decaf Model:
25
+ * class User extends Model<User> {
26
+ * id!: string;
27
+ * name!: string;
28
+ * }
29
+ *
30
+ * // Register controller:
31
+ * const UserController = FromModelController.create(User);
32
+ *
33
+ * // NestJS will expose:
34
+ * // POST /user
35
+ * // GET /user/:id
36
+ * // GET /user/query/:method
37
+ * // PUT /user/:id
38
+ * // DELETE /user/:id
39
+ * ```
40
+ *
41
+ * @mermaid
42
+ * sequenceDiagram
43
+ * participant Client
44
+ * participant Controller
45
+ * participant Repo
46
+ * participant DB
47
+ *
48
+ * Client->>Controller: HTTP Request
49
+ * Controller->>Repo: Resolve repository for Model
50
+ * Repo->>DB: Execute DB operation
51
+ * DB-->>Repo: DB Result
52
+ * Repo-->>Controller: Model Instance(s)
53
+ * Controller-->>Client: JSON Response
54
+ */
55
+ export declare class FromModelController {
56
+ private static readonly log;
57
+ static getPersistence<T extends Model<boolean>>(ModelClazz: ModelConstructor<T>): Repo<T> | ModelService<T>;
58
+ static createQueryRoutesFromRepository<T extends Model<boolean>>(persistence: Repo<T> | ModelService<T>, prefix?: string): ControllerConstructor<T>;
59
+ static create<T extends Model<any>>(ModelConstr: ModelConstructor<T>): any;
60
+ static getRouteParametersFromModel<T extends Model<any>>(ModelClazz: ModelConstructor<T>): DecafModelRoute;
61
+ }
@@ -0,0 +1,61 @@
1
+ import { ModelService, type Repo } from "@decaf-ts/core";
2
+ import { Model, ModelConstructor } from "@decaf-ts/decorator-validation";
3
+ import { type DecafModelRoute } from "./decorators/index.js";
4
+ import { ControllerConstructor } from "./types.js";
5
+ import "../overrides";
6
+ /**
7
+ * @description
8
+ * Factory and utilities for generating dynamic NestJS controllers from Decaf {@link Model} definitions.
9
+ *
10
+ * @summary
11
+ * The `FromModelController` class provides the infrastructure necessary to automatically generate
12
+ * strongly-typed CRUD controllers based on a given {@link ModelConstructor}. It inspects metadata from
13
+ * the model, derives route paths, parameters, and generates a dynamic controller class at runtime with
14
+ * full support for querying, creation, update, and deletion of model entities through a {@link Repo}.
15
+ *
16
+ * @template T The {@link Model} type associated with the generated controller.
17
+ *
18
+ * @param ModelClazz The model class to generate the controller from.
19
+ *
20
+ * @class FromModelController
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * // Given a Decaf Model:
25
+ * class User extends Model<User> {
26
+ * id!: string;
27
+ * name!: string;
28
+ * }
29
+ *
30
+ * // Register controller:
31
+ * const UserController = FromModelController.create(User);
32
+ *
33
+ * // NestJS will expose:
34
+ * // POST /user
35
+ * // GET /user/:id
36
+ * // GET /user/query/:method
37
+ * // PUT /user/:id
38
+ * // DELETE /user/:id
39
+ * ```
40
+ *
41
+ * @mermaid
42
+ * sequenceDiagram
43
+ * participant Client
44
+ * participant Controller
45
+ * participant Repo
46
+ * participant DB
47
+ *
48
+ * Client->>Controller: HTTP Request
49
+ * Controller->>Repo: Resolve repository for Model
50
+ * Repo->>DB: Execute DB operation
51
+ * DB-->>Repo: DB Result
52
+ * Repo-->>Controller: Model Instance(s)
53
+ * Controller-->>Client: JSON Response
54
+ */
55
+ export declare class FromModelController {
56
+ private static readonly log;
57
+ static getPersistence<T extends Model<boolean>>(ModelClazz: ModelConstructor<T>): Repo<T> | ModelService<T>;
58
+ static createQueryRoutesFromRepository<T extends Model<boolean>>(persistence: Repo<T> | ModelService<T>, prefix?: string): ControllerConstructor<T>;
59
+ static create<T extends Model<any>>(ModelConstr: ModelConstructor<T>): any;
60
+ static getRouteParametersFromModel<T extends Model<any>>(ModelClazz: ModelConstructor<T>): DecafModelRoute;
61
+ }
@@ -0,0 +1,30 @@
1
+ import { CrudOperations } from "@decaf-ts/db-decorators";
2
+ import { ModelConstructor } from "@decaf-ts/decorator-validation";
3
+ import { HttpVerbs } from "./types.cjs";
4
+ /**
5
+ * @description Determines if a given CRUD operation is blocked for a specific model constructor.
6
+ * @summary Retrieves the operation-blocking handler metadata stored on the provided model constructor (under `OperationKeys.REFLECT + OperationKeys.BLOCK`), executes it (if present) with its persisted arguments plus the requested operation, and returns whether the operation is blocked. If no handler exists, the operation is considered allowed (returns `false`).
7
+ * @param {ModelConstructor<any>} ModelConstructor - The target model constructor whose metadata may include a blocking handler.
8
+ * @param {CrudOperations} op - The CRUD operation to evaluate (e.g., `OperationKeys.CREATE`, `OperationKeys.READ`, `OperationKeys.UPDATE`, `OperationKeys.DELETE`).
9
+ * @return {boolean} `true` when the operation is explicitly blocked by the model's handler; otherwise `false`.
10
+ * @function isOperationBlocked
11
+ */
12
+ export declare function isOperationBlocked(ModelConstructor: ModelConstructor<any>, op: CrudOperations): boolean;
13
+ /**
14
+ * @description Conditionally applies an HTTP method decorator for a given model and verb, hiding the endpoint in Swagger (and not registering the route) when the model blocks that CRUD operation.
15
+ * @summary Maps an HTTP verb to its corresponding `CrudOperations` key and Nest HTTP decorator (`@Get`, `@Post`, etc.). It checks `isOperationBlocked(ModelConstructor, crudOp)` and, if blocked, applies only `@ApiExcludeEndpoint()` (Swagger-hidden, no Nest route). If permitted, it applies the appropriate HTTP decorator with the optional `path`.
16
+ * @param {ModelConstructor<any>} ModelConstructor - The model constructor used to resolve operation-blocking rules.
17
+ * @param {HttpVerbs} verb - The HTTP verb to map (e.g., `"GET" | "POST" | "PUT" | "PATCH" | "DELETE"`).
18
+ * @param {string} [path] - Optional route path passed through to the corresponding Nest HTTP method decorator.
19
+ * @return {MethodDecorator} A method decorator that either excludes the endpoint from Swagger (and route registration) or applies the correct HTTP decorator.
20
+ */
21
+ export declare function ApiOperationFromModel(ModelConstructor: ModelConstructor<any>, verb: HttpVerbs, path?: string): MethodDecorator;
22
+ /**
23
+ * @description Conditionally applies an HTTP method decorator for a given model and verb, hiding the endpoint in Swagger (and not registering the route) when the model blocks that CRUD operation.
24
+ * @summary Maps an HTTP verb to its corresponding `CrudOperations` key and Nest HTTP decorator (`@Get`, `@Post`, etc.). It checks `isOperationBlocked(ModelConstructor, crudOp)` and, if blocked, applies only `@ApiExcludeEndpoint()` (Swagger-hidden, no Nest route). If permitted, it applies the appropriate HTTP decorator with the optional `path`.
25
+ * @param {ModelConstructor<any>} ModelConstructor - The model constructor used to resolve operation-blocking rules.
26
+ * @param {HttpVerbs} verb - The HTTP verb to map (e.g., `"GET" | "POST" | "PUT" | "PATCH" | "DELETE"`).
27
+ * @param {string} [path] - Optional route path passed through to the corresponding Nest HTTP method decorator.
28
+ * @return {MethodDecorator} A method decorator that either excludes the endpoint from Swagger (and route registration) or applies the correct HTTP decorator.
29
+ */
30
+ export declare function BulkApiOperationFromModel(ModelConstructor: ModelConstructor<any>, verb: HttpVerbs, path?: string): MethodDecorator;
@@ -0,0 +1,30 @@
1
+ import { CrudOperations } from "@decaf-ts/db-decorators";
2
+ import { ModelConstructor } from "@decaf-ts/decorator-validation";
3
+ import { HttpVerbs } from "./types.js";
4
+ /**
5
+ * @description Determines if a given CRUD operation is blocked for a specific model constructor.
6
+ * @summary Retrieves the operation-blocking handler metadata stored on the provided model constructor (under `OperationKeys.REFLECT + OperationKeys.BLOCK`), executes it (if present) with its persisted arguments plus the requested operation, and returns whether the operation is blocked. If no handler exists, the operation is considered allowed (returns `false`).
7
+ * @param {ModelConstructor<any>} ModelConstructor - The target model constructor whose metadata may include a blocking handler.
8
+ * @param {CrudOperations} op - The CRUD operation to evaluate (e.g., `OperationKeys.CREATE`, `OperationKeys.READ`, `OperationKeys.UPDATE`, `OperationKeys.DELETE`).
9
+ * @return {boolean} `true` when the operation is explicitly blocked by the model's handler; otherwise `false`.
10
+ * @function isOperationBlocked
11
+ */
12
+ export declare function isOperationBlocked(ModelConstructor: ModelConstructor<any>, op: CrudOperations): boolean;
13
+ /**
14
+ * @description Conditionally applies an HTTP method decorator for a given model and verb, hiding the endpoint in Swagger (and not registering the route) when the model blocks that CRUD operation.
15
+ * @summary Maps an HTTP verb to its corresponding `CrudOperations` key and Nest HTTP decorator (`@Get`, `@Post`, etc.). It checks `isOperationBlocked(ModelConstructor, crudOp)` and, if blocked, applies only `@ApiExcludeEndpoint()` (Swagger-hidden, no Nest route). If permitted, it applies the appropriate HTTP decorator with the optional `path`.
16
+ * @param {ModelConstructor<any>} ModelConstructor - The model constructor used to resolve operation-blocking rules.
17
+ * @param {HttpVerbs} verb - The HTTP verb to map (e.g., `"GET" | "POST" | "PUT" | "PATCH" | "DELETE"`).
18
+ * @param {string} [path] - Optional route path passed through to the corresponding Nest HTTP method decorator.
19
+ * @return {MethodDecorator} A method decorator that either excludes the endpoint from Swagger (and route registration) or applies the correct HTTP decorator.
20
+ */
21
+ export declare function ApiOperationFromModel(ModelConstructor: ModelConstructor<any>, verb: HttpVerbs, path?: string): MethodDecorator;
22
+ /**
23
+ * @description Conditionally applies an HTTP method decorator for a given model and verb, hiding the endpoint in Swagger (and not registering the route) when the model blocks that CRUD operation.
24
+ * @summary Maps an HTTP verb to its corresponding `CrudOperations` key and Nest HTTP decorator (`@Get`, `@Post`, etc.). It checks `isOperationBlocked(ModelConstructor, crudOp)` and, if blocked, applies only `@ApiExcludeEndpoint()` (Swagger-hidden, no Nest route). If permitted, it applies the appropriate HTTP decorator with the optional `path`.
25
+ * @param {ModelConstructor<any>} ModelConstructor - The model constructor used to resolve operation-blocking rules.
26
+ * @param {HttpVerbs} verb - The HTTP verb to map (e.g., `"GET" | "POST" | "PUT" | "PATCH" | "DELETE"`).
27
+ * @param {string} [path] - Optional route path passed through to the corresponding Nest HTTP method decorator.
28
+ * @return {MethodDecorator} A method decorator that either excludes the endpoint from Swagger (and route registration) or applies the correct HTTP decorator.
29
+ */
30
+ export declare function BulkApiOperationFromModel(ModelConstructor: ModelConstructor<any>, verb: HttpVerbs, path?: string): MethodDecorator;
@@ -0,0 +1,13 @@
1
+ import type { DecafApiProperty } from "./types.cjs";
2
+ /**
3
+ * @description Applies a set of Swagger `@ApiParam` decorators generated from a typed specification array.
4
+ * @summary Transforms each entry of the provided `ApiParam[]` into a corresponding `@ApiParam()` decorator (defaulting `description`, `required`, and `type` when omitted) and composes them into a single decorator via Nest's `applyDecorators`. Useful for synchronizing runtime route params with OpenAPI documentation in a concise, declarative way.
5
+ * @param {ApiParam[]} [props=[]] Array describing path parameters to be documented.
6
+ * @param {string} props[].name The parameter's name as it appears in the route template (e.g., `:id`).
7
+ * @param {string} [props[].description] Human-readable explanation of the parameter; defaults to `"Path parameter: <name>"`.
8
+ * @param {boolean} [props[].required=true] Whether the parameter is required; defaults to `true`.
9
+ * @param {Constructor<any>} [props[].type=String] Constructor/type used by Swagger to infer schema (e.g., `String`, `Number`, `UUID`, custom class).
10
+ * @return {any} A composed decorator applying all generated `@ApiParam` decorators to the target method or controller.
11
+ * @function ApiParamsFromModel
12
+ */
13
+ export declare function ApiParamsFromModel(props?: DecafApiProperty[]): MethodDecorator & ClassDecorator;
@@ -0,0 +1,13 @@
1
+ import type { DecafApiProperty } from "./types.js";
2
+ /**
3
+ * @description Applies a set of Swagger `@ApiParam` decorators generated from a typed specification array.
4
+ * @summary Transforms each entry of the provided `ApiParam[]` into a corresponding `@ApiParam()` decorator (defaulting `description`, `required`, and `type` when omitted) and composes them into a single decorator via Nest's `applyDecorators`. Useful for synchronizing runtime route params with OpenAPI documentation in a concise, declarative way.
5
+ * @param {ApiParam[]} [props=[]] Array describing path parameters to be documented.
6
+ * @param {string} props[].name The parameter's name as it appears in the route template (e.g., `:id`).
7
+ * @param {string} [props[].description] Human-readable explanation of the parameter; defaults to `"Path parameter: <name>"`.
8
+ * @param {boolean} [props[].required=true] Whether the parameter is required; defaults to `true`.
9
+ * @param {Constructor<any>} [props[].type=String] Constructor/type used by Swagger to infer schema (e.g., `String`, `Number`, `UUID`, custom class).
10
+ * @return {any} A composed decorator applying all generated `@ApiParam` decorators to the target method or controller.
11
+ * @function ApiParamsFromModel
12
+ */
13
+ export declare function ApiParamsFromModel(props?: DecafApiProperty[]): MethodDecorator & ClassDecorator;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @description Custom decorator that extracts the request body and instantiates it using the Model constructor
3
+ * found on the controller. Handles both single objects and arrays.
4
+ */
5
+ export declare const DecafBody: (...dataOrPipes: unknown[]) => ParameterDecorator;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @description Custom decorator that extracts the request body and instantiates it using the Model constructor
3
+ * found on the controller. Handles both single objects and arrays.
4
+ */
5
+ export declare const DecafBody: (...dataOrPipes: unknown[]) => ParameterDecorator;
@@ -0,0 +1,9 @@
1
+ import { DecafApiProperty } from "./types.cjs";
2
+ /**
3
+ * @description A higher-level decorator factory that leverages `OrderedParams` to extract route parameters in a specific order derived from a list of `ApiParam` definitions.
4
+ * @summary `DecafParams` computes the order of route parameters based on the provided `ApiParam[]` specification (using each element’s `name`), then applies `OrderedParams(order)` as a parameter decorator. This enables parameter-level binding that remains consistent with the documented API parameter metadata.
5
+ * @param {ApiParam[]} [props=[]] Array of `ApiParam` definitions whose `name` fields determine the parameter extraction order.
6
+ * @return {ParameterDecorator} A NestJS parameter decorator that injects an ordered list of parameters and metadata into the controller method argument.
7
+ */
8
+ export declare function DecafParams(props?: DecafApiProperty[]): ParameterDecorator;
9
+ export declare const DecafQuery: (...dataOrPipes: unknown[]) => ParameterDecorator;