@venizia/ignis 0.2.0-4 → 0.2.0-41

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 (361) hide show
  1. package/dist/base/applications/base.d.ts +19 -13
  2. package/dist/base/applications/base.d.ts.map +1 -1
  3. package/dist/base/applications/base.js +85 -65
  4. package/dist/base/applications/base.js.map +1 -1
  5. package/dist/base/applications/boot-steps.d.ts +13 -0
  6. package/dist/base/applications/boot-steps.d.ts.map +1 -0
  7. package/dist/base/applications/boot-steps.js +23 -0
  8. package/dist/base/applications/boot-steps.js.map +1 -0
  9. package/dist/base/applications/common/index.d.ts +2 -0
  10. package/dist/base/applications/common/index.d.ts.map +1 -0
  11. package/dist/base/applications/common/index.js +18 -0
  12. package/dist/base/applications/common/index.js.map +1 -0
  13. package/dist/base/applications/{types.d.ts → common/types.d.ts} +11 -0
  14. package/dist/base/applications/common/types.d.ts.map +1 -0
  15. package/dist/base/applications/common/types.js.map +1 -0
  16. package/dist/base/applications/index.d.ts +2 -1
  17. package/dist/base/applications/index.d.ts.map +1 -1
  18. package/dist/base/applications/index.js +2 -1
  19. package/dist/base/applications/index.js.map +1 -1
  20. package/dist/base/applications/server.d.ts +4 -2
  21. package/dist/base/applications/server.d.ts.map +1 -1
  22. package/dist/base/applications/server.js +25 -2
  23. package/dist/base/applications/server.js.map +1 -1
  24. package/dist/base/controllers/grpc/adapter.d.ts +2 -1
  25. package/dist/base/controllers/grpc/adapter.d.ts.map +1 -1
  26. package/dist/base/controllers/grpc/adapter.js +4 -3
  27. package/dist/base/controllers/grpc/adapter.js.map +1 -1
  28. package/dist/base/middlewares/app-error/app-error.middleware.d.ts +3 -2
  29. package/dist/base/middlewares/app-error/app-error.middleware.d.ts.map +1 -1
  30. package/dist/base/middlewares/app-error/app-error.middleware.js +4 -3
  31. package/dist/base/middlewares/app-error/app-error.middleware.js.map +1 -1
  32. package/dist/base/middlewares/request-spy/request-spy.middleware.d.ts.map +1 -1
  33. package/dist/base/middlewares/request-spy/request-spy.middleware.js +2 -1
  34. package/dist/base/middlewares/request-spy/request-spy.middleware.js.map +1 -1
  35. package/dist/common/constants.d.ts.map +1 -1
  36. package/dist/common/constants.js +2 -1
  37. package/dist/common/constants.js.map +1 -1
  38. package/dist/common/environments.d.ts +31 -10
  39. package/dist/common/environments.d.ts.map +1 -1
  40. package/dist/common/environments.js +33 -10
  41. package/dist/common/environments.js.map +1 -1
  42. package/dist/components/api-reference/component.js +2 -2
  43. package/dist/components/api-reference/component.js.map +1 -1
  44. package/dist/components/api-reference/index.d.ts +1 -1
  45. package/dist/components/api-reference/index.d.ts.map +1 -1
  46. package/dist/components/api-reference/index.js +1 -1
  47. package/dist/components/api-reference/index.js.map +1 -1
  48. package/dist/components/api-reference/ui/factory.d.ts +14 -0
  49. package/dist/components/api-reference/ui/factory.d.ts.map +1 -0
  50. package/dist/components/api-reference/{ui-factory.js → ui/factory.js} +12 -25
  51. package/dist/components/api-reference/ui/factory.js.map +1 -0
  52. package/dist/components/api-reference/ui/index.d.ts +4 -0
  53. package/dist/components/api-reference/ui/index.d.ts.map +1 -0
  54. package/dist/components/api-reference/ui/index.js +20 -0
  55. package/dist/components/api-reference/ui/index.js.map +1 -0
  56. package/dist/components/api-reference/ui/scalar.d.ts +8 -0
  57. package/dist/components/api-reference/ui/scalar.d.ts.map +1 -0
  58. package/dist/components/api-reference/ui/scalar.js +28 -0
  59. package/dist/components/api-reference/ui/scalar.js.map +1 -0
  60. package/dist/components/api-reference/ui/swagger.d.ts +8 -0
  61. package/dist/components/api-reference/ui/swagger.d.ts.map +1 -0
  62. package/dist/components/api-reference/ui/swagger.js +28 -0
  63. package/dist/components/api-reference/ui/swagger.js.map +1 -0
  64. package/dist/components/auth/authenticate/controllers/factory.d.ts +33 -2
  65. package/dist/components/auth/authenticate/controllers/factory.d.ts.map +1 -1
  66. package/dist/components/auth/authenticate/services/service/verifier.service.d.ts.map +1 -1
  67. package/dist/components/auth/authenticate/services/service/verifier.service.js +10 -6
  68. package/dist/components/auth/authenticate/services/service/verifier.service.js.map +1 -1
  69. package/dist/components/auth/authenticate/strategies/index.d.ts +1 -1
  70. package/dist/components/auth/authenticate/strategies/index.d.ts.map +1 -1
  71. package/dist/components/auth/authenticate/strategies/index.js +1 -1
  72. package/dist/components/auth/authenticate/strategies/index.js.map +1 -1
  73. package/dist/components/auth/authenticate/strategies/jwks/index.d.ts +3 -0
  74. package/dist/components/auth/authenticate/strategies/jwks/index.d.ts.map +1 -0
  75. package/dist/components/auth/authenticate/strategies/jwks/index.js +19 -0
  76. package/dist/components/auth/authenticate/strategies/jwks/index.js.map +1 -0
  77. package/dist/components/auth/authenticate/strategies/jwks/issuer.d.ts +13 -0
  78. package/dist/components/auth/authenticate/strategies/jwks/issuer.d.ts.map +1 -0
  79. package/dist/components/auth/authenticate/strategies/{jwks.strategy.js → jwks/issuer.js} +4 -27
  80. package/dist/components/auth/authenticate/strategies/jwks/issuer.js.map +1 -0
  81. package/dist/components/auth/authenticate/strategies/{jwks.strategy.d.ts → jwks/verifier.d.ts} +2 -10
  82. package/dist/components/auth/authenticate/strategies/jwks/verifier.d.ts.map +1 -0
  83. package/dist/components/auth/authenticate/strategies/jwks/verifier.js +45 -0
  84. package/dist/components/auth/authenticate/strategies/jwks/verifier.js.map +1 -0
  85. package/dist/components/auth/authorize/adapters/base-filtered.d.ts +1 -1
  86. package/dist/components/auth/authorize/adapters/base-filtered.d.ts.map +1 -1
  87. package/dist/components/auth/authorize/adapters/base-filtered.js +5 -8
  88. package/dist/components/auth/authorize/adapters/base-filtered.js.map +1 -1
  89. package/dist/components/auth/authorize/adapters/common/index.d.ts +2 -0
  90. package/dist/components/auth/authorize/adapters/common/index.d.ts.map +1 -0
  91. package/dist/components/auth/authorize/adapters/common/index.js +18 -0
  92. package/dist/components/auth/authorize/adapters/common/index.js.map +1 -0
  93. package/dist/components/auth/authorize/adapters/{types.d.ts → common/types.d.ts} +1 -1
  94. package/dist/components/auth/authorize/adapters/common/types.d.ts.map +1 -0
  95. package/dist/components/auth/authorize/adapters/common/types.js.map +1 -0
  96. package/dist/components/auth/authorize/adapters/connector.d.ts +10 -0
  97. package/dist/components/auth/authorize/adapters/connector.d.ts.map +1 -0
  98. package/dist/components/auth/authorize/adapters/connector.js +20 -0
  99. package/dist/components/auth/authorize/adapters/connector.js.map +1 -0
  100. package/dist/components/auth/authorize/adapters/custom-grant-expander.d.ts +52 -0
  101. package/dist/components/auth/authorize/adapters/custom-grant-expander.d.ts.map +1 -0
  102. package/dist/components/auth/authorize/adapters/custom-grant-expander.js +111 -0
  103. package/dist/components/auth/authorize/adapters/custom-grant-expander.js.map +1 -0
  104. package/dist/components/auth/authorize/adapters/index.d.ts +4 -2
  105. package/dist/components/auth/authorize/adapters/index.d.ts.map +1 -1
  106. package/dist/components/auth/authorize/adapters/index.js +4 -2
  107. package/dist/components/auth/authorize/adapters/index.js.map +1 -1
  108. package/dist/components/auth/authorize/adapters/scoped-casbin/adapter.d.ts +93 -0
  109. package/dist/components/auth/authorize/adapters/scoped-casbin/adapter.d.ts.map +1 -0
  110. package/dist/components/auth/authorize/adapters/{scoped-casbin.adapter.js → scoped-casbin/adapter.js} +95 -97
  111. package/dist/components/auth/authorize/adapters/scoped-casbin/adapter.js.map +1 -0
  112. package/dist/components/auth/authorize/adapters/scoped-casbin/common/constants.d.ts +2 -0
  113. package/dist/components/auth/authorize/adapters/scoped-casbin/common/constants.d.ts.map +1 -0
  114. package/dist/components/auth/authorize/adapters/scoped-casbin/common/constants.js +5 -0
  115. package/dist/components/auth/authorize/adapters/scoped-casbin/common/constants.js.map +1 -0
  116. package/dist/components/auth/authorize/adapters/scoped-casbin/common/index.d.ts +3 -0
  117. package/dist/components/auth/authorize/adapters/scoped-casbin/common/index.d.ts.map +1 -0
  118. package/dist/components/auth/authorize/adapters/scoped-casbin/common/index.js +19 -0
  119. package/dist/components/auth/authorize/adapters/scoped-casbin/common/index.js.map +1 -0
  120. package/dist/components/auth/authorize/adapters/scoped-casbin/common/types.d.ts +50 -0
  121. package/dist/components/auth/authorize/adapters/scoped-casbin/common/types.d.ts.map +1 -0
  122. package/dist/components/auth/authorize/adapters/scoped-casbin/common/types.js +3 -0
  123. package/dist/components/auth/authorize/adapters/scoped-casbin/common/types.js.map +1 -0
  124. package/dist/components/auth/authorize/adapters/scoped-casbin/index.d.ts +4 -0
  125. package/dist/components/auth/authorize/adapters/scoped-casbin/index.d.ts.map +1 -0
  126. package/dist/components/auth/authorize/adapters/scoped-casbin/index.js +19 -0
  127. package/dist/components/auth/authorize/adapters/scoped-casbin/index.js.map +1 -0
  128. package/dist/components/auth/authorize/adapters/scoped-casbin/policy-edges.d.ts +17 -0
  129. package/dist/components/auth/authorize/adapters/scoped-casbin/policy-edges.d.ts.map +1 -0
  130. package/dist/components/auth/authorize/adapters/scoped-casbin/policy-edges.js +11 -0
  131. package/dist/components/auth/authorize/adapters/scoped-casbin/policy-edges.js.map +1 -0
  132. package/dist/components/auth/authorize/component.d.ts.map +1 -1
  133. package/dist/components/auth/authorize/component.js +3 -0
  134. package/dist/components/auth/authorize/component.js.map +1 -1
  135. package/dist/components/auth/authorize/enforcers/casbin.enforcer.d.ts +7 -36
  136. package/dist/components/auth/authorize/enforcers/casbin.enforcer.d.ts.map +1 -1
  137. package/dist/components/auth/authorize/enforcers/casbin.enforcer.js +48 -117
  138. package/dist/components/auth/authorize/enforcers/casbin.enforcer.js.map +1 -1
  139. package/dist/components/auth/authorize/enforcers/index.d.ts +2 -1
  140. package/dist/components/auth/authorize/enforcers/index.d.ts.map +1 -1
  141. package/dist/components/auth/authorize/enforcers/index.js +2 -1
  142. package/dist/components/auth/authorize/enforcers/index.js.map +1 -1
  143. package/dist/components/auth/authorize/enforcers/policy-line-codec.d.ts +26 -0
  144. package/dist/components/auth/authorize/enforcers/policy-line-codec.d.ts.map +1 -0
  145. package/dist/components/auth/authorize/enforcers/policy-line-codec.js +57 -0
  146. package/dist/components/auth/authorize/enforcers/policy-line-codec.js.map +1 -0
  147. package/dist/components/auth/authorize/enforcers/user-policy-line-cache.d.ts +46 -0
  148. package/dist/components/auth/authorize/enforcers/user-policy-line-cache.d.ts.map +1 -0
  149. package/dist/components/auth/authorize/enforcers/user-policy-line-cache.js +98 -0
  150. package/dist/components/auth/authorize/enforcers/user-policy-line-cache.js.map +1 -0
  151. package/dist/components/auth/authorize/index.d.ts +1 -0
  152. package/dist/components/auth/authorize/index.d.ts.map +1 -1
  153. package/dist/components/auth/authorize/index.js +1 -0
  154. package/dist/components/auth/authorize/index.js.map +1 -1
  155. package/dist/components/auth/authorize/role-managers/base.d.ts +34 -0
  156. package/dist/components/auth/authorize/role-managers/base.d.ts.map +1 -0
  157. package/dist/components/auth/authorize/role-managers/base.js +76 -0
  158. package/dist/components/auth/authorize/role-managers/base.js.map +1 -0
  159. package/dist/components/auth/authorize/role-managers/domain-hierarchy.d.ts +28 -0
  160. package/dist/components/auth/authorize/role-managers/domain-hierarchy.d.ts.map +1 -0
  161. package/dist/components/auth/authorize/role-managers/domain-hierarchy.js +77 -0
  162. package/dist/components/auth/authorize/role-managers/domain-hierarchy.js.map +1 -0
  163. package/dist/components/auth/authorize/role-managers/index.d.ts +5 -0
  164. package/dist/components/auth/authorize/role-managers/index.d.ts.map +1 -0
  165. package/dist/components/auth/authorize/role-managers/index.js +21 -0
  166. package/dist/components/auth/authorize/role-managers/index.js.map +1 -0
  167. package/dist/components/auth/authorize/role-managers/membership.d.ts +21 -0
  168. package/dist/components/auth/authorize/role-managers/membership.d.ts.map +1 -0
  169. package/dist/components/auth/authorize/role-managers/membership.js +69 -0
  170. package/dist/components/auth/authorize/role-managers/membership.js.map +1 -0
  171. package/dist/components/auth/authorize/{enforcers/resource-role-manager.d.ts → role-managers/resource.d.ts} +3 -9
  172. package/dist/components/auth/authorize/role-managers/resource.d.ts.map +1 -0
  173. package/dist/components/auth/authorize/{enforcers/resource-role-manager.js → role-managers/resource.js} +9 -21
  174. package/dist/components/auth/authorize/role-managers/resource.js.map +1 -0
  175. package/dist/components/auth/models/entities/policy-definition.model.d.ts +49 -14
  176. package/dist/components/auth/models/entities/policy-definition.model.d.ts.map +1 -1
  177. package/dist/components/auth/models/entities/policy-definition.model.js +45 -11
  178. package/dist/components/auth/models/entities/policy-definition.model.js.map +1 -1
  179. package/dist/components/auth/models/entities/user.model.d.ts +2 -2
  180. package/dist/components/health-check/common/constants.d.ts +5 -0
  181. package/dist/components/health-check/common/constants.d.ts.map +1 -0
  182. package/dist/components/health-check/common/constants.js +9 -0
  183. package/dist/components/health-check/common/constants.js.map +1 -0
  184. package/dist/components/health-check/common/index.d.ts +1 -0
  185. package/dist/components/health-check/common/index.d.ts.map +1 -1
  186. package/dist/components/health-check/common/index.js +1 -0
  187. package/dist/components/health-check/common/index.js.map +1 -1
  188. package/dist/components/health-check/common/keys.d.ts +2 -0
  189. package/dist/components/health-check/common/keys.d.ts.map +1 -1
  190. package/dist/components/health-check/common/keys.js +2 -0
  191. package/dist/components/health-check/common/keys.js.map +1 -1
  192. package/dist/components/health-check/common/rest-paths.d.ts +1 -0
  193. package/dist/components/health-check/common/rest-paths.d.ts.map +1 -1
  194. package/dist/components/health-check/common/rest-paths.js +1 -0
  195. package/dist/components/health-check/common/rest-paths.js.map +1 -1
  196. package/dist/components/health-check/common/types.d.ts +22 -0
  197. package/dist/components/health-check/common/types.d.ts.map +1 -1
  198. package/dist/components/health-check/component.d.ts +9 -3
  199. package/dist/components/health-check/component.d.ts.map +1 -1
  200. package/dist/components/health-check/component.js +38 -1
  201. package/dist/components/health-check/component.js.map +1 -1
  202. package/dist/components/health-check/controller.d.ts +10 -2
  203. package/dist/components/health-check/controller.d.ts.map +1 -1
  204. package/dist/components/health-check/controller.js +79 -13
  205. package/dist/components/health-check/controller.js.map +1 -1
  206. package/dist/components/health-check/index.d.ts +1 -0
  207. package/dist/components/health-check/index.d.ts.map +1 -1
  208. package/dist/components/health-check/index.js +1 -0
  209. package/dist/components/health-check/index.js.map +1 -1
  210. package/dist/components/health-check/reporter.d.ts +98 -0
  211. package/dist/components/health-check/reporter.d.ts.map +1 -0
  212. package/dist/components/health-check/reporter.js +138 -0
  213. package/dist/components/health-check/reporter.js.map +1 -0
  214. package/dist/components/mail/common/constants.d.ts +8 -0
  215. package/dist/components/mail/common/constants.d.ts.map +1 -1
  216. package/dist/components/mail/common/constants.js +9 -1
  217. package/dist/components/mail/common/constants.js.map +1 -1
  218. package/dist/components/mail/common/types/index.d.ts +6 -0
  219. package/dist/components/mail/common/types/index.d.ts.map +1 -0
  220. package/dist/components/mail/common/types/index.js +22 -0
  221. package/dist/components/mail/common/types/index.js.map +1 -0
  222. package/dist/components/mail/common/types/message.d.ts +49 -0
  223. package/dist/components/mail/common/types/message.d.ts.map +1 -0
  224. package/dist/components/mail/common/types/message.js +3 -0
  225. package/dist/components/mail/common/types/message.js.map +1 -0
  226. package/dist/components/mail/common/types/options.d.ts +65 -0
  227. package/dist/components/mail/common/types/options.d.ts.map +1 -0
  228. package/dist/components/mail/common/types/options.js +3 -0
  229. package/dist/components/mail/common/types/options.js.map +1 -0
  230. package/dist/components/mail/common/types/queue.d.ts +53 -0
  231. package/dist/components/mail/common/types/queue.d.ts.map +1 -0
  232. package/dist/components/mail/common/types/queue.js +3 -0
  233. package/dist/components/mail/common/types/queue.js.map +1 -0
  234. package/dist/components/mail/common/types/template.d.ts +33 -0
  235. package/dist/components/mail/common/types/template.d.ts.map +1 -0
  236. package/dist/components/mail/common/types/template.js +3 -0
  237. package/dist/components/mail/common/types/template.js.map +1 -0
  238. package/dist/components/mail/common/types/verification.d.ts +26 -0
  239. package/dist/components/mail/common/types/verification.d.ts.map +1 -0
  240. package/dist/components/mail/common/types/verification.js +3 -0
  241. package/dist/components/mail/common/types/verification.js.map +1 -0
  242. package/dist/components/mail/component.d.ts +4 -1
  243. package/dist/components/mail/component.d.ts.map +1 -1
  244. package/dist/components/mail/component.js +12 -0
  245. package/dist/components/mail/component.js.map +1 -1
  246. package/dist/components/mail/helpers/transporters/amazon-ses-transporter.helper.d.ts +19 -0
  247. package/dist/components/mail/helpers/transporters/amazon-ses-transporter.helper.d.ts.map +1 -0
  248. package/dist/components/mail/helpers/transporters/amazon-ses-transporter.helper.js +111 -0
  249. package/dist/components/mail/helpers/transporters/amazon-ses-transporter.helper.js.map +1 -0
  250. package/dist/components/mail/helpers/transporters/index.d.ts +2 -1
  251. package/dist/components/mail/helpers/transporters/index.d.ts.map +1 -1
  252. package/dist/components/mail/helpers/transporters/index.js +2 -1
  253. package/dist/components/mail/helpers/transporters/index.js.map +1 -1
  254. package/dist/components/mail/providers/mail-transporter.provider.d.ts +2 -0
  255. package/dist/components/mail/providers/mail-transporter.provider.d.ts.map +1 -1
  256. package/dist/components/mail/providers/mail-transporter.provider.js +17 -0
  257. package/dist/components/mail/providers/mail-transporter.provider.js.map +1 -1
  258. package/dist/components/mail/services/generators/index.d.ts +4 -0
  259. package/dist/components/mail/services/generators/index.d.ts.map +1 -0
  260. package/dist/components/mail/services/generators/index.js +20 -0
  261. package/dist/components/mail/services/generators/index.js.map +1 -0
  262. package/dist/components/mail/services/generators/numeric-code.d.ts +7 -0
  263. package/dist/components/mail/services/generators/numeric-code.d.ts.map +1 -0
  264. package/dist/components/mail/services/generators/numeric-code.js +20 -0
  265. package/dist/components/mail/services/generators/numeric-code.js.map +1 -0
  266. package/dist/components/mail/services/generators/random-token.d.ts +7 -0
  267. package/dist/components/mail/services/generators/random-token.d.ts.map +1 -0
  268. package/dist/components/mail/services/generators/random-token.js +18 -0
  269. package/dist/components/mail/services/generators/random-token.js.map +1 -0
  270. package/dist/components/mail/services/generators/verification-data.d.ts +9 -0
  271. package/dist/components/mail/services/generators/verification-data.d.ts.map +1 -0
  272. package/dist/components/mail/services/{generator.service.js → generators/verification-data.js} +10 -25
  273. package/dist/components/mail/services/generators/verification-data.js.map +1 -0
  274. package/dist/components/mail/services/index.d.ts +1 -1
  275. package/dist/components/mail/services/index.d.ts.map +1 -1
  276. package/dist/components/mail/services/index.js +1 -1
  277. package/dist/components/mail/services/index.js.map +1 -1
  278. package/dist/components/mail/utilities/address.utility.d.ts +9 -0
  279. package/dist/components/mail/utilities/address.utility.d.ts.map +1 -0
  280. package/dist/components/mail/utilities/address.utility.js +36 -0
  281. package/dist/components/mail/utilities/address.utility.js.map +1 -0
  282. package/dist/components/mail/utilities/index.d.ts +2 -0
  283. package/dist/components/mail/utilities/index.d.ts.map +1 -1
  284. package/dist/components/mail/utilities/index.js +2 -0
  285. package/dist/components/mail/utilities/index.js.map +1 -1
  286. package/dist/components/mail/utilities/mime.utility.d.ts +19 -0
  287. package/dist/components/mail/utilities/mime.utility.d.ts.map +1 -0
  288. package/dist/components/mail/utilities/mime.utility.js +412 -0
  289. package/dist/components/mail/utilities/mime.utility.js.map +1 -0
  290. package/dist/components/static-asset/common/commit-token.d.ts +23 -0
  291. package/dist/components/static-asset/common/commit-token.d.ts.map +1 -0
  292. package/dist/components/static-asset/common/commit-token.js +40 -0
  293. package/dist/components/static-asset/common/commit-token.js.map +1 -0
  294. package/dist/components/static-asset/common/constants.d.ts +13 -1
  295. package/dist/components/static-asset/common/constants.d.ts.map +1 -1
  296. package/dist/components/static-asset/common/constants.js +29 -2
  297. package/dist/components/static-asset/common/constants.js.map +1 -1
  298. package/dist/components/static-asset/common/errors.d.ts +34 -0
  299. package/dist/components/static-asset/common/errors.d.ts.map +1 -1
  300. package/dist/components/static-asset/common/errors.js +28 -0
  301. package/dist/components/static-asset/common/errors.js.map +1 -1
  302. package/dist/components/static-asset/common/index.d.ts +1 -0
  303. package/dist/components/static-asset/common/index.d.ts.map +1 -1
  304. package/dist/components/static-asset/common/index.js +1 -0
  305. package/dist/components/static-asset/common/index.js.map +1 -1
  306. package/dist/components/static-asset/common/keys.d.ts +1 -0
  307. package/dist/components/static-asset/common/keys.d.ts.map +1 -1
  308. package/dist/components/static-asset/common/keys.js +1 -0
  309. package/dist/components/static-asset/common/keys.js.map +1 -1
  310. package/dist/components/static-asset/common/types.d.ts +87 -30
  311. package/dist/components/static-asset/common/types.d.ts.map +1 -1
  312. package/dist/components/static-asset/component.d.ts +4 -1
  313. package/dist/components/static-asset/component.d.ts.map +1 -1
  314. package/dist/components/static-asset/component.js +19 -9
  315. package/dist/components/static-asset/component.js.map +1 -1
  316. package/dist/components/static-asset/controller/base.definition.d.ts +27 -554
  317. package/dist/components/static-asset/controller/base.definition.d.ts.map +1 -1
  318. package/dist/components/static-asset/controller/base.definition.js +250 -285
  319. package/dist/components/static-asset/controller/base.definition.js.map +1 -1
  320. package/dist/components/static-asset/controller/factory.d.ts +68 -6
  321. package/dist/components/static-asset/controller/factory.d.ts.map +1 -1
  322. package/dist/components/static-asset/controller/factory.js +561 -138
  323. package/dist/components/static-asset/controller/factory.js.map +1 -1
  324. package/dist/components/static-asset/index.d.ts +1 -0
  325. package/dist/components/static-asset/index.d.ts.map +1 -1
  326. package/dist/components/static-asset/index.js +1 -0
  327. package/dist/components/static-asset/index.js.map +1 -1
  328. package/dist/components/static-asset/ingest.d.ts +58 -0
  329. package/dist/components/static-asset/ingest.d.ts.map +1 -0
  330. package/dist/components/static-asset/ingest.js +82 -0
  331. package/dist/components/static-asset/ingest.js.map +1 -0
  332. package/dist/components/static-asset/models/base.model.d.ts +44 -6
  333. package/dist/components/static-asset/models/base.model.d.ts.map +1 -1
  334. package/dist/components/static-asset/models/base.model.js +7 -1
  335. package/dist/components/static-asset/models/base.model.js.map +1 -1
  336. package/dist/index.d.ts +1 -1
  337. package/dist/index.d.ts.map +1 -1
  338. package/package.json +27 -23
  339. package/dist/base/applications/types.d.ts.map +0 -1
  340. package/dist/base/applications/types.js.map +0 -1
  341. package/dist/components/api-reference/ui-factory.d.ts +0 -21
  342. package/dist/components/api-reference/ui-factory.d.ts.map +0 -1
  343. package/dist/components/api-reference/ui-factory.js.map +0 -1
  344. package/dist/components/auth/authenticate/strategies/jwks.strategy.d.ts.map +0 -1
  345. package/dist/components/auth/authenticate/strategies/jwks.strategy.js.map +0 -1
  346. package/dist/components/auth/authorize/adapters/scoped-casbin.adapter.d.ts +0 -121
  347. package/dist/components/auth/authorize/adapters/scoped-casbin.adapter.d.ts.map +0 -1
  348. package/dist/components/auth/authorize/adapters/scoped-casbin.adapter.js.map +0 -1
  349. package/dist/components/auth/authorize/adapters/types.d.ts.map +0 -1
  350. package/dist/components/auth/authorize/adapters/types.js.map +0 -1
  351. package/dist/components/auth/authorize/enforcers/resource-role-manager.d.ts.map +0 -1
  352. package/dist/components/auth/authorize/enforcers/resource-role-manager.js.map +0 -1
  353. package/dist/components/mail/common/types.d.ts +0 -201
  354. package/dist/components/mail/common/types.d.ts.map +0 -1
  355. package/dist/components/mail/common/types.js +0 -10
  356. package/dist/components/mail/common/types.js.map +0 -1
  357. package/dist/components/mail/services/generator.service.d.ts +0 -14
  358. package/dist/components/mail/services/generator.service.d.ts.map +0 -1
  359. package/dist/components/mail/services/generator.service.js.map +0 -1
  360. /package/dist/base/applications/{types.js → common/types.js} +0 -0
  361. /package/dist/components/auth/authorize/adapters/{types.js → common/types.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/health-check/component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAsD;AACtD,wDAAsD;AACtD,8CAAqD;AACrD,wDAAqD;AAErD,qCAAuE;AACvE,6CAAqD;AACrD,wDAAgD;AAEhD,MAAM,iBAAiB,GAAG,SAAS,CAAC;AACpC,MAAM,eAAe,GAAwB;IAC3C,WAAW,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE;CACzC,CAAC;AAEF,IAAa,oBAAoB,4BAAjC,MAAa,oBAAqB,SAAQ,4BAAa;IACrD,YAC8D,WAA4B;QAExF,KAAK,CAAC;YACJ,KAAK,EAAE,sBAAoB,CAAC,IAAI;YAChC,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE;YACrD,QAAQ,EAAE;gBACR,CAAC,+BAAsB,CAAC,oBAAoB,CAAC,EA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CAAC,OAAO,CAAC,IAAI,CAAC;iBACtB,IAAI,CACH,4NAA4N,EAC5N,IAAI,EACJ,2BAAW,CAAC,OAAO,IAAI,OAAO,CAC/B,CAAC;QACN,CAAC;QAED,0FAA0F;QAC1F,2EAA2E;QAC3E,IAAI,CAAC,WAAW;aACb,IAAI,CAAmB,EAAE,GAAG,EAAE,+BAAsB,CAAC,gBAAgB,EAAE,CAAC;aACxE,OAAO,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC;QAEhD,+FAA+F;QAC/F,8FAA8F;QAC9F,2FAA2F;QAC3F,6FAA6F;QAC7F,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAA,qBAAU,EAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,kCAAqB,CAAC,CAAC;QAChE,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,kCAAqB,CAAC,CAAC;IACrD,CAAC;CACF,CAAA;AAvEY,oDAAoB;+BAApB,oBAAoB;IAE5B,WAAA,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,2BAAY,CAAC,oBAAoB,EAAE,CAAC,CAAA;qCAAsB,8BAAe;GAF/E,oBAAoB,CAuEhC"}
@@ -1,7 +1,15 @@
1
- import { BaseRestController, IControllerOptions, TRouteContext } from '../../base/controllers';
1
+ import { BaseRestController, TRouteContext } from '../../base/controllers';
2
+ import type { IApplicationInfo } from '@venizia/ignis-kernel';
2
3
  import { ValueOrPromise } from '@venizia/ignis-helpers/common';
4
+ import { type IHealthCheckOptions } from './common';
3
5
  export declare class HealthCheckController extends BaseRestController {
4
- constructor(opts: IControllerOptions);
6
+ private readonly healthOptions;
7
+ private readonly appInfo?;
8
+ /**
9
+ * Both dependencies arrive through the container, so two applications in one process each get
10
+ * their own gate - a static field would let the last one to boot decide for every other.
11
+ */
12
+ constructor(healthOptions?: IHealthCheckOptions, appInfo?: IApplicationInfo | undefined);
5
13
  binding(): ValueOrPromise<void>;
6
14
  pingPong(context: TRouteContext): import("@venizia/ignis-kernel").TJsonResponse<unknown, 200>;
7
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/components/health-check/controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAI3F,OAAO,EAAQ,cAAc,EAAE,MAAM,+BAA+B,CAAC;AA2CrE,qBAAa,qBAAsB,SAAQ,kBAAkB;gBAC/C,IAAI,EAAE,kBAAkB;IAU3B,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC;IAcxC,QAAQ,CAAC,OAAO,EAAE,aAAa;CAShC"}
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/components/health-check/controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAQ,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,UAAU,CAAC;AA+ElB,qBAAa,qBAAsB,SAAQ,kBAAkB;IAOzD,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IAR3B;;;OAGG;gBAGgB,aAAa,GAAE,mBAAwB,EAEvC,OAAO,CAAC,EAAE,gBAAgB,YAAA;IAQpC,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC;IAuCxC,QAAQ,CAAC,OAAO,EAAE,aAAa;CAShC"}
@@ -8,6 +8,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var HealthCheckController_1;
11
15
  Object.defineProperty(exports, "__esModule", { value: true });
12
16
  exports.HealthCheckController = void 0;
13
17
  const controllers_1 = require("../../base/controllers");
@@ -16,18 +20,54 @@ const ignis_kernel_1 = require("@venizia/ignis-kernel");
16
20
  const zod_openapi_1 = require("@hono/zod-openapi");
17
21
  const common_1 = require("@venizia/ignis-helpers/common");
18
22
  const common_2 = require("./common");
23
+ const reporter_1 = require("./reporter");
19
24
  const RouteConfigs = {
20
25
  ROOT: {
21
26
  method: common_1.HTTP.Methods.GET,
22
27
  path: common_2.HealthCheckRestPaths.ROOT,
23
28
  responses: (0, ignis_kernel_1.jsonResponse)({
24
- schema: zod_openapi_1.z.object({ status: zod_openapi_1.z.string() }).openapi({
29
+ schema: zod_openapi_1.z.object({ status: zod_openapi_1.z.string(), timestamp: zod_openapi_1.z.iso.datetime() }).openapi({
25
30
  description: 'HealthCheck Schema',
26
- examples: [{ status: 'ok' }],
31
+ examples: [{ status: 'ok', timestamp: new Date().toISOString() }],
27
32
  }),
28
33
  description: 'Health check status',
29
34
  }),
30
35
  },
36
+ STATS: {
37
+ method: common_1.HTTP.Methods.GET,
38
+ path: common_2.HealthCheckRestPaths.STATS,
39
+ request: {
40
+ headers: zod_openapi_1.z.object({
41
+ [common_2.HealthCheckHeaders.SECRET_KEY]: zod_openapi_1.z.string().optional().openapi({
42
+ description: 'The stats key',
43
+ }),
44
+ }),
45
+ },
46
+ responses: (0, ignis_kernel_1.jsonResponse)({
47
+ schema: zod_openapi_1.z
48
+ .object({
49
+ status: zod_openapi_1.z.string(),
50
+ timestamp: zod_openapi_1.z.iso.datetime(),
51
+ build: zod_openapi_1.z.object({
52
+ service: zod_openapi_1.z.string(),
53
+ version: zod_openapi_1.z.string(),
54
+ commit: zod_openapi_1.z.string(),
55
+ branch: zod_openapi_1.z.string(),
56
+ builtAt: zod_openapi_1.z.string(),
57
+ }),
58
+ process: zod_openapi_1.z.object({
59
+ pid: zod_openapi_1.z.number(),
60
+ uptime: zod_openapi_1.z.number(),
61
+ uptimeHuman: zod_openapi_1.z.string(),
62
+ runtime: zod_openapi_1.z.string(),
63
+ environment: zod_openapi_1.z.string(),
64
+ }),
65
+ memory: zod_openapi_1.z.object({ rss: zod_openapi_1.z.string(), heapUsed: zod_openapi_1.z.string(), heapTotal: zod_openapi_1.z.string() }),
66
+ })
67
+ .openapi({ description: 'HealthCheck Stats Schema' }),
68
+ description: 'Build stamp, process and memory - closed outside the development environments unless enabled',
69
+ }),
70
+ },
31
71
  PING: {
32
72
  method: common_1.HTTP.Methods.POST,
33
73
  path: common_2.HealthCheckRestPaths.PING,
@@ -55,24 +95,45 @@ const RouteConfigs = {
55
95
  }),
56
96
  },
57
97
  };
58
- class HealthCheckController extends controllers_1.BaseRestController {
59
- constructor(opts) {
60
- super({
61
- ...opts,
62
- scope: HealthCheckController.name,
63
- });
98
+ let HealthCheckController = HealthCheckController_1 = class HealthCheckController extends controllers_1.BaseRestController {
99
+ /**
100
+ * Both dependencies arrive through the container, so two applications in one process each get
101
+ * their own gate - a static field would let the last one to boot decide for every other.
102
+ */
103
+ constructor(healthOptions = {}, appInfo) {
104
+ super({ scope: HealthCheckController_1.name });
105
+ this.healthOptions = healthOptions;
106
+ this.appInfo = appInfo;
64
107
  // Note: This is optional declare internal controller route definitions
65
108
  this.definitions = RouteConfigs;
66
109
  }
67
110
  binding() {
68
- // Method 1: Using 'bindRoute' to create a controller route
111
+ // Public liveness probe: status and clock only. Nothing here names a runtime or a version.
69
112
  this.bindRoute({ configs: RouteConfigs.ROOT }).to({
70
113
  handler: context => {
71
- return context.json({ status: 'ok' }, common_1.HTTP.ResultCodes.RS_2.Ok);
114
+ return context.json(reporter_1.HealthCheckReporter.buildSummary(), common_1.HTTP.ResultCodes.RS_2.Ok);
115
+ },
116
+ });
117
+ if (!reporter_1.HealthCheckReporter.isStatsEnabled({ options: this.healthOptions })) {
118
+ this.logger
119
+ .for(this.binding.name)
120
+ .debug('Stats route disabled | path: %s', common_2.HealthCheckRestPaths.STATS);
121
+ return;
122
+ }
123
+ this.bindRoute({ configs: RouteConfigs.STATS }).to({
124
+ handler: context => {
125
+ // `context.notFound()`, not a thrown 404: it runs the application's own notFound handler,
126
+ // so the refusal is byte-identical to the answer for a route that was never mounted. A
127
+ // thrown `ApplicationError` serializes a different body and would confirm the route exists.
128
+ if (!reporter_1.HealthCheckReporter.isStatsAuthorized({
129
+ options: this.healthOptions,
130
+ header: context.req.header(common_2.HealthCheckHeaders.SECRET_KEY),
131
+ })) {
132
+ return context.notFound();
133
+ }
134
+ return context.json(reporter_1.HealthCheckReporter.buildStats({ options: this.healthOptions, appInfo: this.appInfo }), common_1.HTTP.ResultCodes.RS_2.Ok);
72
135
  },
73
136
  });
74
- // Method 2: Using 'defineRoute' to create a controller route
75
- /* this.defineRoute({ configs: RouteConfigs.ROOT, handler: context => context.json({ status: 'ok' }, HTTP.ResultCodes.RS_2.Ok) }); */
76
137
  }
77
138
  // Method 3: Using 'decorators' to create a controller route, with an explicit type assertion for the validated request data
78
139
  pingPong(context) {
@@ -80,7 +141,7 @@ class HealthCheckController extends controllers_1.BaseRestController {
80
141
  // Return type is automatically validated against the response schema
81
142
  return context.json({ type: 'PONG', date: new Date().toISOString(), message }, common_1.HTTP.ResultCodes.RS_2.Ok);
82
143
  }
83
- }
144
+ };
84
145
  exports.HealthCheckController = HealthCheckController;
85
146
  __decorate([
86
147
  (0, metadata_1.api)({ configs: RouteConfigs.PING }),
@@ -88,4 +149,9 @@ __decorate([
88
149
  __metadata("design:paramtypes", [Object]),
89
150
  __metadata("design:returntype", void 0)
90
151
  ], HealthCheckController.prototype, "pingPong", null);
152
+ exports.HealthCheckController = HealthCheckController = HealthCheckController_1 = __decorate([
153
+ __param(0, (0, metadata_1.inject)({ key: common_2.HealthCheckBindingKeys.HEALTH_CHECK_OPTIONS, isOptional: true })),
154
+ __param(1, (0, metadata_1.inject)({ key: common_2.HealthCheckBindingKeys.APPLICATION_INFO, isOptional: true })),
155
+ __metadata("design:paramtypes", [Object, Object])
156
+ ], HealthCheckController);
91
157
  //# sourceMappingURL=controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"controller.js","sourceRoot":"","sources":["../../../src/components/health-check/controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2F;AAC3F,8CAAsC;AACtC,wDAAkE;AAClE,mDAAsC;AACtC,0DAAqE;AACrE,qCAAgD;AAEhD,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE;QACJ,MAAM,EAAE,aAAI,CAAC,OAAO,CAAC,GAAG;QACxB,IAAI,EAAE,6BAAoB,CAAC,IAAI;QAC/B,SAAS,EAAE,IAAA,2BAAY,EAAC;YACtB,MAAM,EAAE,eAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,eAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC;gBAC/C,WAAW,EAAE,oBAAoB;gBACjC,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;aAC7B,CAAC;YACF,WAAW,EAAE,qBAAqB;SACnC,CAAC;KACH;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,aAAI,CAAC,OAAO,CAAC,IAAI;QACzB,IAAI,EAAE,6BAAoB,CAAC,IAAI;QAC/B,OAAO,EAAE;YACP,IAAI,EAAE,IAAA,0BAAW,EAAC;gBAChB,WAAW,EAAE,qBAAqB;gBAClC,MAAM,EAAE,eAAC,CAAC,MAAM,CAAC;oBACf,IAAI,EAAE,eAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;oBAC3C,OAAO,EAAE,eAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;iBACpC,CAAC;aACH,CAAC;SACH;QACD,SAAS,EAAE,IAAA,2BAAY,EAAC;YACtB,M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AE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,EACzD,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CACzB,CAAC;IACJ,CAAC;CACF;AAlCD,sDAkCC;AATC;IADC,IAAA,cAAG,EAAC,EAAE,OAAO,EAAE,YAAY,CAAC,IAAI,EAAE,CAAC;;;;qDASnC"}
1
+ {"version":3,"file":"controller.js","sourceRoot":"","sources":["../../../src/components/health-check/controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAuE;AACvE,8CAA8C;AAC9C,wDAAkE;AAElE,mDAAsC;AACtC,0DAAqE;AACrE,qCAKkB;AAClB,yCAAiD;AAEjD,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE;QACJ,MAAM,EAAE,aAAI,CAAC,OAAO,CAAC,GAAG;QACxB,IAAI,EAAE,6BAAoB,CAAC,IAAI;QAC/B,SAAS,EAAE,IAAA,2BAAY,EAAC;YACtB,MAAM,EAAE,eAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,eAAC,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,eAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC;gBAC5E,WAAW,EAAE,oBAAoB;gBACjC,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;aAClE,CAAC;YACF,WAAW,EAAE,qBAAqB;SACnC,CAAC;KACH;IACD,KAAK,EAAE;QACL,MAAM,EAAE,aAAI,CAAC,OAAO,CAAC,GAAG;QACxB,IAAI,EAAE,6BAAoB,CAAC,KAAK;QAChC,OAAO,EAAE;YACP,OAAO,EAAE,eAAC,CAAC,MAAM,CAAC;gBAChB,CAAC,2BAAkB,CAAC,UAAU,CAAC,EAAE,eAAC,CAAC,MAAM,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Q,CAAC,OAAsB;QAC7B,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAqC,MAAM,CAAC,CAAC;QAElF,qEAAqE;QACrE,OAAO,OAAO,CAAC,IAAI,CACjB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,EACzD,aAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CACzB,CAAC;IACJ,CAAC;CACF,CAAA;AAjEY,sDAAqB;AAwDhC;IADC,IAAA,cAAG,EAAC,EAAE,OAAO,EAAE,YAAY,CAAC,IAAI,EAAE,CAAC;;;;qDASnC;gCAhEU,qBAAqB;IAM7B,WAAA,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,+BAAsB,CAAC,oBAAoB,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAA;IAE9E,WAAA,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,+BAAsB,CAAC,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAA;;GARlE,qBAAqB,CAiEjC"}
@@ -1,4 +1,5 @@
1
1
  export * from './common';
2
2
  export * from './component';
3
3
  export * from './controller';
4
+ export * from './reporter';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/health-check/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/health-check/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./common"), exports);
18
18
  __exportStar(require("./component"), exports);
19
19
  __exportStar(require("./controller"), exports);
20
+ __exportStar(require("./reporter"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/health-check/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,8CAA4B;AAC5B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/health-check/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B"}
@@ -0,0 +1,98 @@
1
+ import { type TBuildInfoRecord } from '@venizia/ignis-helpers/core';
2
+ import type { IApplicationInfo } from '@venizia/ignis-kernel';
3
+ import type { IHealthCheckOptions } from './common';
4
+ /**
5
+ * Assembles what `GET /health` and `GET /health/stats` answer.
6
+ *
7
+ * Never reads the filesystem and never spawns `git`: the build stamp is PUSHED in at the
8
+ * entrypoint through {@link BuildInfoRegistry} (or the component's own options), so a
9
+ * `bun build --compile` binary and a Distroless image - neither of which has `node_modules`,
10
+ * `.git` or a readable `package.json` - report exactly what a dev machine does.
11
+ */
12
+ export declare class HealthCheckReporter {
13
+ private static readonly BYTES_PER_MB;
14
+ /** Public liveness answer: liveness and the server clock, nothing a probe cannot already see. */
15
+ static buildSummary(): {
16
+ status: string;
17
+ timestamp: string;
18
+ };
19
+ /**
20
+ * Fail-closed, copying `AppErrorMiddleware.isProduction`: the default is MEMBERSHIP in
21
+ * `DEVELOPMENT_ENVS`, never inequality against `production`. `staging`, `uat`, `alpha` and a
22
+ * typo all keep this route shut, because the runtime and release it names are what picks an
23
+ * exploit. `ambient`, not `current`: an unset `NODE_ENV` is a host that cannot prove it is a dev
24
+ * machine, and `current` would mask it as `development`.
25
+ *
26
+ * `enable` is compared to `true`/`false` rather than read through `??`: this binding is
27
+ * env/config driven, and a JSON-derived `"false"` is truthy - an operator who wrote false would
28
+ * otherwise get the route mounted.
29
+ */
30
+ static isStatsEnabled(opts: {
31
+ options: IHealthCheckOptions;
32
+ /** Reads the ambient environment; injected by tests so nothing has to write `process.env`. */
33
+ environment?: () => string | undefined;
34
+ }): boolean;
35
+ /**
36
+ * No `secretKey` configured leaves the route open to whatever can reach the port - stated, not
37
+ * implied. Anything that is not a non-blank string fails CLOSED: a blank or config-derived
38
+ * non-string key is a pipeline that lost the variable, and reading it as "no key" would publish
39
+ * the route the operator meant to lock.
40
+ *
41
+ * The comparison is a plain `===`: a remote timing attack on a header compare is not practical
42
+ * through an HTTP stack, and a constant-time digest compare would buy nothing here.
43
+ */
44
+ /**
45
+ * Whether the stats route is mounted, unauthenticated, and on a host that cannot be shown to be a
46
+ * development one. That combination stays LEGAL - on a cluster-internal port it is often the right
47
+ * call - so this reports rather than refuses, and the component turns it into one warning at boot.
48
+ *
49
+ * It exists because `enable: true` bypasses the environment gate entirely: an operator who sets it
50
+ * for a local run and ships the same code publishes the runtime version, the release and the
51
+ * memory profile to whatever can reach the port. A blank `secretKey` is NOT unguarded - that fails
52
+ * closed in {@link isStatsAuthorized}.
53
+ */
54
+ static isStatsUnguarded(opts: {
55
+ options: IHealthCheckOptions;
56
+ environment?: () => string | undefined;
57
+ }): boolean;
58
+ static isStatsAuthorized(opts: {
59
+ options: IHealthCheckOptions;
60
+ header?: string;
61
+ }): boolean;
62
+ /** The slot is a process-wide `globalThis` entry any dependency can write, and `IBuildInfo` types it without checking - so a non-string never reaches the response schema, which declares `z.string()`. */
63
+ private static extractText;
64
+ /**
65
+ * Explicit options win over the registry, and the application's own `getAppInfo()` fills what
66
+ * neither carries - so a host that ran no generator still reports its real name and version.
67
+ */
68
+ static resolveBuildInfo(opts: {
69
+ options: IHealthCheckOptions;
70
+ appInfo?: IApplicationInfo;
71
+ }): TBuildInfoRecord;
72
+ /** `3661` -> `1h 1m 1s`: an operator reads a restart out of this faster than out of a float. */
73
+ static toHumanUptime(opts: {
74
+ seconds: number;
75
+ }): string;
76
+ private static toMegabytes;
77
+ static buildStats(opts: {
78
+ options: IHealthCheckOptions;
79
+ appInfo?: IApplicationInfo;
80
+ }): {
81
+ build: Required<import("@venizia/ignis-helpers").IBuildInfo>;
82
+ process: {
83
+ pid: number;
84
+ uptime: number;
85
+ uptimeHuman: string;
86
+ runtime: string;
87
+ environment: string;
88
+ };
89
+ memory: {
90
+ rss: string;
91
+ heapUsed: string;
92
+ heapTotal: string;
93
+ };
94
+ status: string;
95
+ timestamp: string;
96
+ };
97
+ }
98
+ //# sourceMappingURL=reporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../../../src/components/health-check/reporter.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD;;;;;;;GAOG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAe;IAEnD,iGAAiG;IACjG,MAAM,CAAC,YAAY,IAAI;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IAI5D;;;;;;;;;;OAUG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE;QAC1B,OAAO,EAAE,mBAAmB,CAAC;QAC7B,8FAA8F;QAC9F,WAAW,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;KACxC,GAAG,OAAO;IAcX;;;;;;;;OAQG;IACH;;;;;;;;;OASG;IACH,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE;QAC5B,OAAO,EAAE,mBAAmB,CAAC;QAC7B,WAAW,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;KACxC,GAAG,OAAO;IAiBX,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,mBAAmB,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO;IAa1F,2MAA2M;IAC3M,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE;QAC5B,OAAO,EAAE,mBAAmB,CAAC;QAC7B,OAAO,CAAC,EAAE,gBAAgB,CAAC;KAC5B,GAAG,gBAAgB;IAepB,gGAAgG;IAChG,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;IASvD,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,mBAAmB,CAAC;QAAC,OAAO,CAAC,EAAE,gBAAgB,CAAA;KAAE;;;;;;;;;;;;;;gBA9HnD,MAAM;mBAAa,MAAM;;CAqJ3D"}
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HealthCheckReporter = void 0;
4
+ const ignis_helpers_1 = require("@venizia/ignis-helpers");
5
+ const core_1 = require("@venizia/ignis-helpers/core");
6
+ /**
7
+ * Assembles what `GET /health` and `GET /health/stats` answer.
8
+ *
9
+ * Never reads the filesystem and never spawns `git`: the build stamp is PUSHED in at the
10
+ * entrypoint through {@link BuildInfoRegistry} (or the component's own options), so a
11
+ * `bun build --compile` binary and a Distroless image - neither of which has `node_modules`,
12
+ * `.git` or a readable `package.json` - report exactly what a dev machine does.
13
+ */
14
+ class HealthCheckReporter {
15
+ static { this.BYTES_PER_MB = 1024 * 1024; }
16
+ /** Public liveness answer: liveness and the server clock, nothing a probe cannot already see. */
17
+ static buildSummary() {
18
+ return { status: 'ok', timestamp: new Date().toISOString() };
19
+ }
20
+ /**
21
+ * Fail-closed, copying `AppErrorMiddleware.isProduction`: the default is MEMBERSHIP in
22
+ * `DEVELOPMENT_ENVS`, never inequality against `production`. `staging`, `uat`, `alpha` and a
23
+ * typo all keep this route shut, because the runtime and release it names are what picks an
24
+ * exploit. `ambient`, not `current`: an unset `NODE_ENV` is a host that cannot prove it is a dev
25
+ * machine, and `current` would mask it as `development`.
26
+ *
27
+ * `enable` is compared to `true`/`false` rather than read through `??`: this binding is
28
+ * env/config driven, and a JSON-derived `"false"` is truthy - an operator who wrote false would
29
+ * otherwise get the route mounted.
30
+ */
31
+ static isStatsEnabled(opts) {
32
+ const { enable } = opts.options.stats ?? {};
33
+ if (typeof enable === 'boolean') {
34
+ return enable;
35
+ }
36
+ const ambient = opts.environment ? opts.environment() : ignis_helpers_1.Environment.ambient;
37
+ if (ambient === undefined) {
38
+ return false;
39
+ }
40
+ return ignis_helpers_1.Environment.DEVELOPMENT_ENVS.has(ambient.toLowerCase());
41
+ }
42
+ /**
43
+ * No `secretKey` configured leaves the route open to whatever can reach the port - stated, not
44
+ * implied. Anything that is not a non-blank string fails CLOSED: a blank or config-derived
45
+ * non-string key is a pipeline that lost the variable, and reading it as "no key" would publish
46
+ * the route the operator meant to lock.
47
+ *
48
+ * The comparison is a plain `===`: a remote timing attack on a header compare is not practical
49
+ * through an HTTP stack, and a constant-time digest compare would buy nothing here.
50
+ */
51
+ /**
52
+ * Whether the stats route is mounted, unauthenticated, and on a host that cannot be shown to be a
53
+ * development one. That combination stays LEGAL - on a cluster-internal port it is often the right
54
+ * call - so this reports rather than refuses, and the component turns it into one warning at boot.
55
+ *
56
+ * It exists because `enable: true` bypasses the environment gate entirely: an operator who sets it
57
+ * for a local run and ships the same code publishes the runtime version, the release and the
58
+ * memory profile to whatever can reach the port. A blank `secretKey` is NOT unguarded - that fails
59
+ * closed in {@link isStatsAuthorized}.
60
+ */
61
+ static isStatsUnguarded(opts) {
62
+ if (!HealthCheckReporter.isStatsEnabled(opts)) {
63
+ return false;
64
+ }
65
+ if (opts.options.stats?.secretKey !== undefined) {
66
+ return false;
67
+ }
68
+ const ambient = opts.environment ? opts.environment() : ignis_helpers_1.Environment.ambient;
69
+ if (ambient === undefined) {
70
+ return true;
71
+ }
72
+ return !ignis_helpers_1.Environment.DEVELOPMENT_ENVS.has(ambient.toLowerCase());
73
+ }
74
+ static isStatsAuthorized(opts) {
75
+ const secretKey = opts.options.stats?.secretKey;
76
+ if (secretKey === undefined) {
77
+ return true;
78
+ }
79
+ if (typeof secretKey !== 'string' || secretKey.trim().length === 0) {
80
+ return false;
81
+ }
82
+ return opts.header === secretKey;
83
+ }
84
+ /** The slot is a process-wide `globalThis` entry any dependency can write, and `IBuildInfo` types it without checking - so a non-string never reaches the response schema, which declares `z.string()`. */
85
+ static extractText(opts) {
86
+ return typeof opts.value === 'string' && opts.value.length > 0 ? opts.value : undefined;
87
+ }
88
+ /**
89
+ * Explicit options win over the registry, and the application's own `getAppInfo()` fills what
90
+ * neither carries - so a host that ran no generator still reports its real name and version.
91
+ */
92
+ static resolveBuildInfo(opts) {
93
+ const stamp = opts.options.stats?.buildInfo ?? core_1.BuildInfoRegistry.get() ?? {};
94
+ const extract = HealthCheckReporter.extractText;
95
+ return {
96
+ service: extract({ value: stamp.service }) ?? opts.appInfo?.name ?? core_1.BuildInfoRegistry.UNSPECIFIED,
97
+ version: extract({ value: stamp.version }) ?? opts.appInfo?.version ?? core_1.BuildInfoRegistry.UNSPECIFIED,
98
+ commit: extract({ value: stamp.commit }) ?? core_1.BuildInfoRegistry.UNSPECIFIED,
99
+ branch: extract({ value: stamp.branch }) ?? core_1.BuildInfoRegistry.UNSPECIFIED,
100
+ builtAt: extract({ value: stamp.builtAt }) ?? core_1.BuildInfoRegistry.UNSPECIFIED,
101
+ };
102
+ }
103
+ /** `3661` -> `1h 1m 1s`: an operator reads a restart out of this faster than out of a float. */
104
+ static toHumanUptime(opts) {
105
+ const total = Math.floor(opts.seconds);
106
+ const hours = Math.floor(total / 3600);
107
+ const minutes = Math.floor((total % 3600) / 60);
108
+ const seconds = total % 60;
109
+ return `${hours}h ${minutes}m ${seconds}s`;
110
+ }
111
+ static toMegabytes(opts) {
112
+ return `${(opts.bytes / HealthCheckReporter.BYTES_PER_MB).toFixed(1)} MB`;
113
+ }
114
+ static buildStats(opts) {
115
+ const memory = process.memoryUsage();
116
+ const uptime = process.uptime();
117
+ return {
118
+ ...HealthCheckReporter.buildSummary(),
119
+ build: HealthCheckReporter.resolveBuildInfo(opts),
120
+ process: {
121
+ pid: process.pid,
122
+ uptime,
123
+ uptimeHuman: HealthCheckReporter.toHumanUptime({ seconds: uptime }),
124
+ // `versions.node` carries no `v` prefix, so both runtimes read `<name> <semver>`.
125
+ runtime: ignis_helpers_1.RuntimeModules.isBun() ? `bun ${Bun.version}` : `node ${process.versions.node}`,
126
+ // `ambient`, not `current`: an unset `NODE_ENV` is reported as such, never dressed up as `development`.
127
+ environment: ignis_helpers_1.Environment.ambient ?? core_1.BuildInfoRegistry.UNSPECIFIED,
128
+ },
129
+ memory: {
130
+ rss: HealthCheckReporter.toMegabytes({ bytes: memory.rss }),
131
+ heapUsed: HealthCheckReporter.toMegabytes({ bytes: memory.heapUsed }),
132
+ heapTotal: HealthCheckReporter.toMegabytes({ bytes: memory.heapTotal }),
133
+ },
134
+ };
135
+ }
136
+ }
137
+ exports.HealthCheckReporter = HealthCheckReporter;
138
+ //# sourceMappingURL=reporter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../../src/components/health-check/reporter.ts"],"names":[],"mappings":";;;AAAA,0DAAqE;AACrE,sDAAuF;AAIvF;;;;;;;GAOG;AACH,MAAa,mBAAmB;aACN,iBAAY,GAAG,IAAI,GAAG,IAAI,CAAC;IAEnD,iGAAiG;IACjG,MAAM,CAAC,YAAY;QACjB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;IAC/D,CAAC;I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OAAO,EAAE,CAAC,CAAC,CAAC,QAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE;gBACxF,wGAAwG;gBACxG,WAAW,EAAE,2BAAW,CAAC,OAAO,IAAI,wBAAiB,CAAC,WAAW;aAClE;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,mBAAmB,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC;gBAC3D,QAAQ,EAAE,mBAAmB,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACrE,SAAS,EAAE,mBAAmB,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC;aACxE;SACF,CAAC;IACJ,CAAC;;AAxJH,kDAyJC"}
@@ -1,3 +1,4 @@
1
+ import type { TConstValue } from '@venizia/ignis-helpers/common';
1
2
  export declare class MailDefaults {
2
3
  static readonly BATCH_CONCURRENCY = 5;
3
4
  static readonly FALLBACK_FROM = "noreply@example.com";
@@ -28,4 +29,11 @@ export declare class BullMQExecutorModes {
28
29
  static readonly MODE_SET: Set<string>;
29
30
  static isValid(value: string): boolean;
30
31
  }
32
+ export declare class MailProviders {
33
+ static readonly NODEMAILER = "nodemailer";
34
+ static readonly MAILGUN = "mailgun";
35
+ static readonly CUSTOM = "custom";
36
+ static readonly AMAZON_SES = "amazon-ses";
37
+ }
38
+ export type TMailProvider = TConstValue<typeof MailProviders>;
31
39
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/mail/common/constants.ts"],"names":[],"mappings":"AAEA,qBAAa,YAAY;IACvB,MAAM,CAAC,QAAQ,CAAC,iBAAiB,KAAK;IACtC,MAAM,CAAC,QAAQ,CAAC,aAAa,yBAAyB;CACvD;AAED,yKAAyK;AACzK,qBAAa,cAAc;IACzB,MAAM,CAAC,QAAQ,CAAC,qB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,SAAiE;IAC5F,MAAM,CAAC,QAAQ,CAAC,mBAAmB,SAEhC;IACH,MAAM,CAAC,QAAQ,CAAC,iBAAiB,SAE9B;IACH,MAAM,CAAC,QAAQ,CAAC,iBAAiB,SAE9B;IACH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,SAE/B;CACJ;AAED,qBAAa,kBAAkB;IAC7B,MAAM,CAAC,QAAQ,CAAC,iBAAiB,mDAAmD;CACrF;AAED,qBAAa,sBAAsB;IACjC,MAAM,CAAC,QAAQ,CAAC,MAAM,YAAY;IAClC,MAAM,CAAC,QAAQ,CAAC,cAAc,oBAAoB;IAClD,MAAM,CAAC,QAAQ,CAAC,MAAM,YAAY;IAElC,MAAM,CAAC,QAAQ,CAAC,UAAU,cAAoE;IAC9F,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGvC;AAED,qBAAa,mBAAmB;IAC9B,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAAgB;IAC1C,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAiB;IAC5C,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAE9B,MAAM,CAAC,QAAQ,CAAC,QAAQ,cAAmE;IAC3F,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGvC;AAED,qBAAa,aAAa;IACxB,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAAgB;IAC1C,MAAM,CAAC,QAAQ,CAAC,OAAO,aAAa;IACpC,MAAM,CAAC,QAAQ,CAAC,MAAM,YAAY;IAElC,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAAgB;CAC3C;AAED,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BullMQExecutorModes = exports.MailQueueExecutorTypes = exports.MailExecutorErrors = exports.MailErrorCodes = exports.MailDefaults = void 0;
3
+ exports.MailProviders = exports.BullMQExecutorModes = exports.MailQueueExecutorTypes = exports.MailExecutorErrors = exports.MailErrorCodes = exports.MailDefaults = void 0;
4
4
  const core_1 = require("@venizia/ignis-helpers/core");
5
5
  class MailDefaults {
6
6
  static { this.BATCH_CONCURRENCY = 5; }
@@ -51,4 +51,12 @@ class BullMQExecutorModes {
51
51
  }
52
52
  }
53
53
  exports.BullMQExecutorModes = BullMQExecutorModes;
54
+ class MailProviders {
55
+ static { this.NODEMAILER = 'nodemailer'; }
56
+ static { this.MAILGUN = 'mailgun'; }
57
+ static { this.CUSTOM = 'custom'; }
58
+ // Amazon SES supports both SMTP and HTTPS - this provider is the HTTPS API path; SMTP goes through NODEMAILER instead.
59
+ static { this.AMAZON_SES = 'amazon-ses'; }
60
+ }
61
+ exports.MailProviders = MailProviders;
54
62
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/components/mail/common/constants.ts"],"names":[],"mappings":";;;AAAA,sDAA0D;AAE1D,MAAa,YAAY;aACP,sBAAiB,GAAG,CAAC,CAAC;aACtB,kBAAa,GAAG,qBAAqB,CAAC;;AAFxD,oCAGC;AAED,yKAAyK;AACzK,MAAa,cAAc;aACT,0BAAqB,GAAG,kBAAW,CAAC,KAAK,CAAC;QACxD,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,uBAAuB,CAAC;KACjD,CAAC,CAAC;aACa,gBAAW,GAAG,kBAAW,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC;aAC5E,wBAAmB,GAAG,kBAAW,CAAC,KAAK,CAAC;QACtD,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,qBAAqB,CAAC;KAC/C,CAAC,CAAC;aACa,sBAAiB,GAAG,kBAAW,CAAC,KAAK,CAAC;QACpD,KAAK,EAAE,CAAC,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,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,wDASC;AAED,MAAa,mBAAmB;aACd,eAAU,GAAG,YAAY,CAAC;aAC1B,gBAAW,GAAG,aAAa,CAAC;aAC5B,SAAI,GAAG,MAAM,CAAC;aAEd,aAAQ,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3F,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;;AARH,kDASC;AAED,MAAa,aAAa;aACR,eAAU,GAAG,YAAY,CAAC;aAC1B,YAAO,GAAG,SAAS,CAAC;aACpB,WAAM,GAAG,QAAQ,CAAC;IAClC,uHAAuH;aACvG,eAAU,GAAG,YAAY,CAAC;;AAL5C,sCAMC"}
@@ -0,0 +1,6 @@
1
+ export * from './message';
2
+ export * from './options';
3
+ export * from './queue';
4
+ export * from './template';
5
+ export * from './verification';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/mail/common/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./message"), exports);
18
+ __exportStar(require("./options"), exports);
19
+ __exportStar(require("./queue"), exports);
20
+ __exportStar(require("./template"), exports);
21
+ __exportStar(require("./verification"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/mail/common/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,4CAA0B;AAC1B,0CAAwB;AACxB,6CAA2B;AAC3B,iDAA+B"}
@@ -0,0 +1,49 @@
1
+ import type { Readable } from 'node:stream';
2
+ export interface IMailAttachment {
3
+ filename?: string;
4
+ contentType?: string;
5
+ path?: string;
6
+ content?: string | Buffer | Readable;
7
+ encoding?: BufferEncoding;
8
+ cid?: string;
9
+ [key: string]: any;
10
+ }
11
+ export interface IMailMessage {
12
+ from?: string;
13
+ to: string | string[];
14
+ cc?: string | string[];
15
+ bcc?: string | string[];
16
+ replyTo?: string;
17
+ subject: string;
18
+ text?: string;
19
+ html?: string;
20
+ attachments?: IMailAttachment[];
21
+ headers?: Record<string, string>;
22
+ requireValidate?: boolean;
23
+ [key: string]: any;
24
+ }
25
+ export interface IMailSendResult {
26
+ success: boolean;
27
+ messageId?: string;
28
+ response?: any;
29
+ error?: string;
30
+ }
31
+ export interface IMailTransport {
32
+ send(message: IMailMessage): Promise<IMailSendResult>;
33
+ verify(): Promise<boolean>;
34
+ close?(): Promise<void>;
35
+ }
36
+ export interface IMailService {
37
+ send(message: IMailMessage): Promise<IMailSendResult>;
38
+ sendBatch(messages: IMailMessage[], options?: {
39
+ concurrency?: number;
40
+ }): Promise<IMailSendResult[]>;
41
+ sendTemplate(opts: {
42
+ templateName: string;
43
+ data: Record<string, any>;
44
+ recipients: string | string[];
45
+ options?: Partial<IMailMessage>;
46
+ }): Promise<IMailSendResult>;
47
+ verify(): Promise<boolean>;
48
+ }
49
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../src/components/mail/common/types/message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IACrC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,CAAC,GAAG,EAAE,MAA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