@hed-hog/core 0.0.386 → 0.0.390

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 (556) hide show
  1. package/README.md +12 -11
  2. package/dist/access-log/access-log.interceptor.d.ts.map +1 -1
  3. package/dist/access-log/access-log.interceptor.js +4 -2
  4. package/dist/access-log/access-log.interceptor.js.map +1 -1
  5. package/dist/ai/ai-attachment.fragments.d.ts +23 -0
  6. package/dist/ai/ai-attachment.fragments.d.ts.map +1 -0
  7. package/dist/ai/ai-attachment.fragments.js +34 -0
  8. package/dist/ai/ai-attachment.fragments.js.map +1 -0
  9. package/dist/ai/ai.controller.d.ts +7 -16
  10. package/dist/ai/ai.controller.d.ts.map +1 -1
  11. package/dist/ai/ai.prompts.d.ts +16 -0
  12. package/dist/ai/ai.prompts.d.ts.map +1 -0
  13. package/dist/ai/ai.prompts.js +37 -0
  14. package/dist/ai/ai.prompts.js.map +1 -0
  15. package/dist/ai/ai.service.d.ts +63 -12
  16. package/dist/ai/ai.service.d.ts.map +1 -1
  17. package/dist/ai/ai.service.js +215 -88
  18. package/dist/ai/ai.service.js.map +1 -1
  19. package/dist/ai/dto/chat.dto.d.ts +4 -1
  20. package/dist/ai/dto/chat.dto.d.ts.map +1 -1
  21. package/dist/ai/dto/chat.dto.js +23 -1
  22. package/dist/ai/dto/chat.dto.js.map +1 -1
  23. package/dist/ai/dto/create-agent.dto.d.ts +1 -1
  24. package/dist/ai/dto/create-agent.dto.d.ts.map +1 -1
  25. package/dist/ai/dto/create-agent.dto.js +1 -1
  26. package/dist/ai/dto/create-agent.dto.js.map +1 -1
  27. package/dist/ai/dto/update-agent.dto.d.ts +1 -1
  28. package/dist/ai/dto/update-agent.dto.d.ts.map +1 -1
  29. package/dist/ai/dto/update-agent.dto.js +1 -1
  30. package/dist/ai/dto/update-agent.dto.js.map +1 -1
  31. package/dist/ai-instruction/ai-instruction.controller.d.ts +61 -7
  32. package/dist/ai-instruction/ai-instruction.controller.d.ts.map +1 -1
  33. package/dist/ai-instruction/ai-instruction.controller.js +63 -20
  34. package/dist/ai-instruction/ai-instruction.controller.js.map +1 -1
  35. package/dist/ai-instruction/ai-instruction.module.d.ts.map +1 -1
  36. package/dist/ai-instruction/ai-instruction.module.js +13 -2
  37. package/dist/ai-instruction/ai-instruction.module.js.map +1 -1
  38. package/dist/ai-instruction/ai-instruction.service.d.ts +131 -6
  39. package/dist/ai-instruction/ai-instruction.service.d.ts.map +1 -1
  40. package/dist/ai-instruction/ai-instruction.service.js +533 -60
  41. package/dist/ai-instruction/ai-instruction.service.js.map +1 -1
  42. package/dist/ai-instruction/ai-prompt-builder.service.d.ts +8 -0
  43. package/dist/ai-instruction/ai-prompt-builder.service.d.ts.map +1 -1
  44. package/dist/ai-instruction/ai-prompt-builder.service.js +10 -1
  45. package/dist/ai-instruction/ai-prompt-builder.service.js.map +1 -1
  46. package/dist/ai-instruction/ai-prompt-registry.d.ts +45 -0
  47. package/dist/ai-instruction/ai-prompt-registry.d.ts.map +1 -0
  48. package/dist/ai-instruction/ai-prompt-registry.js +49 -0
  49. package/dist/ai-instruction/ai-prompt-registry.js.map +1 -0
  50. package/dist/ai-instruction/ai-prompt-resolver.service.d.ts +89 -0
  51. package/dist/ai-instruction/ai-prompt-resolver.service.d.ts.map +1 -0
  52. package/dist/ai-instruction/ai-prompt-resolver.service.js +222 -0
  53. package/dist/ai-instruction/ai-prompt-resolver.service.js.map +1 -0
  54. package/dist/ai-instruction/ai-prompt-template.util.d.ts +70 -0
  55. package/dist/ai-instruction/ai-prompt-template.util.d.ts.map +1 -0
  56. package/dist/ai-instruction/ai-prompt-template.util.js +154 -0
  57. package/dist/ai-instruction/ai-prompt-template.util.js.map +1 -0
  58. package/dist/ai-instruction/dto/create-ai-instruction.dto.d.ts +5 -0
  59. package/dist/ai-instruction/dto/create-ai-instruction.dto.d.ts.map +1 -1
  60. package/dist/ai-instruction/dto/create-ai-instruction.dto.js +27 -1
  61. package/dist/ai-instruction/dto/create-ai-instruction.dto.js.map +1 -1
  62. package/dist/ai-instruction/dto/preview-ai-instruction.dto.d.ts +14 -0
  63. package/dist/ai-instruction/dto/preview-ai-instruction.dto.d.ts.map +1 -0
  64. package/dist/ai-instruction/dto/preview-ai-instruction.dto.js +42 -0
  65. package/dist/ai-instruction/dto/preview-ai-instruction.dto.js.map +1 -0
  66. package/dist/ai-instruction/dto/update-ai-instruction.dto.d.ts +11 -0
  67. package/dist/ai-instruction/dto/update-ai-instruction.dto.d.ts.map +1 -1
  68. package/dist/ai-instruction/dto/update-ai-instruction.dto.js +34 -0
  69. package/dist/ai-instruction/dto/update-ai-instruction.dto.js.map +1 -1
  70. package/dist/ai-instruction/types/ai-instruction.types.d.ts +13 -1
  71. package/dist/ai-instruction/types/ai-instruction.types.d.ts.map +1 -1
  72. package/dist/ai-instruction/types/ai-instruction.types.js +10 -0
  73. package/dist/ai-instruction/types/ai-instruction.types.js.map +1 -1
  74. package/dist/auth/auth.controller.d.ts +26 -10
  75. package/dist/auth/auth.controller.d.ts.map +1 -1
  76. package/dist/auth/auth.controller.js +49 -21
  77. package/dist/auth/auth.controller.js.map +1 -1
  78. package/dist/auth/auth.service.d.ts +35 -9
  79. package/dist/auth/auth.service.d.ts.map +1 -1
  80. package/dist/auth/auth.service.js +78 -29
  81. package/dist/auth/auth.service.js.map +1 -1
  82. package/dist/captcha/captcha.module.d.ts +3 -0
  83. package/dist/captcha/captcha.module.d.ts.map +1 -0
  84. package/dist/captcha/captcha.module.js +23 -0
  85. package/dist/captcha/captcha.module.js.map +1 -0
  86. package/dist/captcha/captcha.service.d.ts +38 -0
  87. package/dist/captcha/captcha.service.d.ts.map +1 -0
  88. package/dist/captcha/captcha.service.js +144 -0
  89. package/dist/captcha/captcha.service.js.map +1 -0
  90. package/dist/challenge/challenge.service.d.ts +16 -7
  91. package/dist/challenge/challenge.service.d.ts.map +1 -1
  92. package/dist/challenge/challenge.service.js +64 -16
  93. package/dist/challenge/challenge.service.js.map +1 -1
  94. package/dist/core.module.d.ts +3 -1
  95. package/dist/core.module.d.ts.map +1 -1
  96. package/dist/core.module.js +29 -2
  97. package/dist/core.module.js.map +1 -1
  98. package/dist/dashboard/dashboard/dashboard.controller.d.ts +15 -15
  99. package/dist/dashboard/dashboard/dashboard.service.d.ts +15 -15
  100. package/dist/dashboard/dashboard-component/dashboard-component.controller.d.ts +6 -6
  101. package/dist/dashboard/dashboard-component/dashboard-component.service.d.ts +6 -6
  102. package/dist/dashboard/dashboard-component-role/dashboard-component-role.controller.d.ts +20 -20
  103. package/dist/dashboard/dashboard-component-role/dashboard-component-role.service.d.ts +20 -20
  104. package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +1 -1
  105. package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +1 -1
  106. package/dist/dashboard/dashboard-role/dashboard-role.controller.d.ts +13 -13
  107. package/dist/dashboard/dashboard-role/dashboard-role.service.d.ts +13 -13
  108. package/dist/file/file.service.d.ts +6 -0
  109. package/dist/file/file.service.d.ts.map +1 -1
  110. package/dist/file/file.service.js +44 -4
  111. package/dist/file/file.service.js.map +1 -1
  112. package/dist/incident/incident-notifier.service.d.ts +36 -0
  113. package/dist/incident/incident-notifier.service.d.ts.map +1 -0
  114. package/dist/incident/incident-notifier.service.js +208 -0
  115. package/dist/incident/incident-notifier.service.js.map +1 -0
  116. package/dist/incident/incident.controller.d.ts +23 -0
  117. package/dist/incident/incident.controller.d.ts.map +1 -0
  118. package/dist/incident/incident.controller.js +75 -0
  119. package/dist/incident/incident.controller.js.map +1 -0
  120. package/dist/incident/incident.module.d.ts +7 -0
  121. package/dist/incident/incident.module.d.ts.map +1 -0
  122. package/dist/incident/incident.module.js +32 -0
  123. package/dist/incident/incident.module.js.map +1 -0
  124. package/dist/incident/incident.service.d.ts +72 -0
  125. package/dist/incident/incident.service.d.ts.map +1 -0
  126. package/dist/incident/incident.service.js +184 -0
  127. package/dist/incident/incident.service.js.map +1 -0
  128. package/dist/index.d.ts +27 -0
  129. package/dist/index.d.ts.map +1 -1
  130. package/dist/index.js +31 -0
  131. package/dist/index.js.map +1 -1
  132. package/dist/integration-profile/dto/test.dto.d.ts +13 -0
  133. package/dist/integration-profile/dto/test.dto.d.ts.map +1 -0
  134. package/dist/integration-profile/dto/test.dto.js +26 -0
  135. package/dist/integration-profile/dto/test.dto.js.map +1 -0
  136. package/dist/integration-profile/integration-profile.controller.d.ts +12 -1
  137. package/dist/integration-profile/integration-profile.controller.d.ts.map +1 -1
  138. package/dist/integration-profile/integration-profile.controller.js +9 -1
  139. package/dist/integration-profile/integration-profile.controller.js.map +1 -1
  140. package/dist/integration-profile/integration-profile.module.d.ts +6 -1
  141. package/dist/integration-profile/integration-profile.module.d.ts.map +1 -1
  142. package/dist/integration-profile/integration-profile.module.js +26 -3
  143. package/dist/integration-profile/integration-profile.module.js.map +1 -1
  144. package/dist/integration-profile/integration-profile.secrets.d.ts.map +1 -1
  145. package/dist/integration-profile/integration-profile.secrets.js +12 -2
  146. package/dist/integration-profile/integration-profile.secrets.js.map +1 -1
  147. package/dist/integration-profile/integration-profile.service.d.ts +28 -2
  148. package/dist/integration-profile/integration-profile.service.d.ts.map +1 -1
  149. package/dist/integration-profile/integration-profile.service.js +105 -31
  150. package/dist/integration-profile/integration-profile.service.js.map +1 -1
  151. package/dist/integration-profile/integration-profile.utils.d.ts +31 -1
  152. package/dist/integration-profile/integration-profile.utils.d.ts.map +1 -1
  153. package/dist/integration-profile/integration-profile.utils.js +35 -4
  154. package/dist/integration-profile/integration-profile.utils.js.map +1 -1
  155. package/dist/integration-profile/testers/ai.testers.d.ts +3 -0
  156. package/dist/integration-profile/testers/ai.testers.d.ts.map +1 -0
  157. package/dist/integration-profile/testers/ai.testers.js +125 -0
  158. package/dist/integration-profile/testers/ai.testers.js.map +1 -0
  159. package/dist/integration-profile/testers/captcha.testers.d.ts +3 -0
  160. package/dist/integration-profile/testers/captcha.testers.d.ts.map +1 -0
  161. package/dist/integration-profile/testers/captcha.testers.js +121 -0
  162. package/dist/integration-profile/testers/captcha.testers.js.map +1 -0
  163. package/dist/integration-profile/testers/email.testers.d.ts +3 -0
  164. package/dist/integration-profile/testers/email.testers.d.ts.map +1 -0
  165. package/dist/integration-profile/testers/email.testers.js +128 -0
  166. package/dist/integration-profile/testers/email.testers.js.map +1 -0
  167. package/dist/integration-profile/testers/http-probe.d.ts +57 -0
  168. package/dist/integration-profile/testers/http-probe.d.ts.map +1 -0
  169. package/dist/integration-profile/testers/http-probe.js +140 -0
  170. package/dist/integration-profile/testers/http-probe.js.map +1 -0
  171. package/dist/integration-profile/testers/index.d.ts +12 -0
  172. package/dist/integration-profile/testers/index.d.ts.map +1 -0
  173. package/dist/integration-profile/testers/index.js +45 -0
  174. package/dist/integration-profile/testers/index.js.map +1 -0
  175. package/dist/integration-profile/testers/infrastructure.testers.d.ts +3 -0
  176. package/dist/integration-profile/testers/infrastructure.testers.d.ts.map +1 -0
  177. package/dist/integration-profile/testers/infrastructure.testers.js +105 -0
  178. package/dist/integration-profile/testers/infrastructure.testers.js.map +1 -0
  179. package/dist/integration-profile/testers/integration-tester.registry.d.ts +17 -0
  180. package/dist/integration-profile/testers/integration-tester.registry.d.ts.map +1 -0
  181. package/dist/integration-profile/testers/integration-tester.registry.js +52 -0
  182. package/dist/integration-profile/testers/integration-tester.registry.js.map +1 -0
  183. package/dist/integration-profile/testers/integration-tester.types.d.ts +55 -0
  184. package/dist/integration-profile/testers/integration-tester.types.d.ts.map +1 -0
  185. package/dist/integration-profile/testers/integration-tester.types.js +16 -0
  186. package/dist/integration-profile/testers/integration-tester.types.js.map +1 -0
  187. package/dist/integration-profile/testers/messaging.testers.d.ts +3 -0
  188. package/dist/integration-profile/testers/messaging.testers.d.ts.map +1 -0
  189. package/dist/integration-profile/testers/messaging.testers.js +70 -0
  190. package/dist/integration-profile/testers/messaging.testers.js.map +1 -0
  191. package/dist/integration-profile/testers/oauth.testers.d.ts +3 -0
  192. package/dist/integration-profile/testers/oauth.testers.d.ts.map +1 -0
  193. package/dist/integration-profile/testers/oauth.testers.js +285 -0
  194. package/dist/integration-profile/testers/oauth.testers.js.map +1 -0
  195. package/dist/integration-profile/testers/payment.testers.d.ts +3 -0
  196. package/dist/integration-profile/testers/payment.testers.d.ts.map +1 -0
  197. package/dist/integration-profile/testers/payment.testers.js +169 -0
  198. package/dist/integration-profile/testers/payment.testers.js.map +1 -0
  199. package/dist/integration-profile/testers/storage.testers.d.ts +3 -0
  200. package/dist/integration-profile/testers/storage.testers.d.ts.map +1 -0
  201. package/dist/integration-profile/testers/storage.testers.js +208 -0
  202. package/dist/integration-profile/testers/storage.testers.js.map +1 -0
  203. package/dist/language/en.json +4 -2
  204. package/dist/language/pt.json +4 -2
  205. package/dist/leaked-password/leaked-password.controller.d.ts +24 -0
  206. package/dist/leaked-password/leaked-password.controller.d.ts.map +1 -0
  207. package/dist/leaked-password/leaked-password.controller.js +78 -0
  208. package/dist/leaked-password/leaked-password.controller.js.map +1 -0
  209. package/dist/leaked-password/leaked-password.module.d.ts +8 -0
  210. package/dist/leaked-password/leaked-password.module.d.ts.map +1 -0
  211. package/dist/leaked-password/leaked-password.module.js +31 -0
  212. package/dist/leaked-password/leaked-password.module.js.map +1 -0
  213. package/dist/leaked-password/leaked-password.service.d.ts +64 -0
  214. package/dist/leaked-password/leaked-password.service.d.ts.map +1 -0
  215. package/dist/leaked-password/leaked-password.service.js +218 -0
  216. package/dist/leaked-password/leaked-password.service.js.map +1 -0
  217. package/dist/locale/locale.controller.d.ts +1 -1
  218. package/dist/locale/locale.service.d.ts +1 -1
  219. package/dist/mail/dto/preview.dto.d.ts +18 -0
  220. package/dist/mail/dto/preview.dto.d.ts.map +1 -0
  221. package/dist/mail/dto/preview.dto.js +66 -0
  222. package/dist/mail/dto/preview.dto.js.map +1 -0
  223. package/dist/mail/dto/send.dto.d.ts +7 -0
  224. package/dist/mail/dto/send.dto.d.ts.map +1 -1
  225. package/dist/mail/dto/send.dto.js +10 -0
  226. package/dist/mail/dto/send.dto.js.map +1 -1
  227. package/dist/mail/mail.controller.d.ts +4 -0
  228. package/dist/mail/mail.controller.d.ts.map +1 -1
  229. package/dist/mail/mail.controller.js +16 -2
  230. package/dist/mail/mail.controller.js.map +1 -1
  231. package/dist/mail/mail.service.d.ts +23 -2
  232. package/dist/mail/mail.service.d.ts.map +1 -1
  233. package/dist/mail/mail.service.js +102 -13
  234. package/dist/mail/mail.service.js.map +1 -1
  235. package/dist/mail-layout/dto/update.dto.d.ts +17 -0
  236. package/dist/mail-layout/dto/update.dto.d.ts.map +1 -0
  237. package/dist/mail-layout/dto/update.dto.js +27 -0
  238. package/dist/mail-layout/dto/update.dto.js.map +1 -0
  239. package/dist/mail-layout/mail-layout.controller.d.ts +15 -0
  240. package/dist/mail-layout/mail-layout.controller.d.ts.map +1 -0
  241. package/dist/mail-layout/mail-layout.controller.js +71 -0
  242. package/dist/mail-layout/mail-layout.controller.js.map +1 -0
  243. package/dist/mail-layout/mail-layout.module.d.ts +3 -0
  244. package/dist/mail-layout/mail-layout.module.d.ts.map +1 -0
  245. package/dist/mail-layout/mail-layout.module.js +35 -0
  246. package/dist/mail-layout/mail-layout.module.js.map +1 -0
  247. package/dist/mail-layout/mail-layout.service.d.ts +27 -0
  248. package/dist/mail-layout/mail-layout.service.d.ts.map +1 -0
  249. package/dist/mail-layout/mail-layout.service.js +80 -0
  250. package/dist/mail-layout/mail-layout.service.js.map +1 -0
  251. package/dist/mcp-chat/mcp-chat.controller.d.ts +2 -2
  252. package/dist/mcp-chat/mcp-chat.service.d.ts +24 -2
  253. package/dist/mcp-chat/mcp-chat.service.d.ts.map +1 -1
  254. package/dist/mcp-chat/mcp-chat.service.js +80 -24
  255. package/dist/mcp-chat/mcp-chat.service.js.map +1 -1
  256. package/dist/menu/menu.controller.d.ts +3 -3
  257. package/dist/menu/menu.service.d.ts +3 -3
  258. package/dist/notification/notification.controller.d.ts +12 -12
  259. package/dist/notification/notification.service.d.ts +12 -12
  260. package/dist/oauth/oauth-token-broker.service.d.ts +72 -0
  261. package/dist/oauth/oauth-token-broker.service.d.ts.map +1 -0
  262. package/dist/oauth/oauth-token-broker.service.js +258 -0
  263. package/dist/oauth/oauth-token-broker.service.js.map +1 -0
  264. package/dist/oauth/oauth.module.d.ts.map +1 -1
  265. package/dist/oauth/oauth.module.js +3 -1
  266. package/dist/oauth/oauth.module.js.map +1 -1
  267. package/dist/oauth/oauth.service.d.ts +2 -0
  268. package/dist/oauth/oauth.service.d.ts.map +1 -1
  269. package/dist/oauth/oauth.service.js +6 -3
  270. package/dist/oauth/oauth.service.js.map +1 -1
  271. package/dist/pdf/pdf.service.d.ts +8 -0
  272. package/dist/pdf/pdf.service.d.ts.map +1 -1
  273. package/dist/pdf/pdf.service.js +52 -0
  274. package/dist/pdf/pdf.service.js.map +1 -1
  275. package/dist/presence/presence.controller.d.ts +16 -0
  276. package/dist/presence/presence.controller.d.ts.map +1 -0
  277. package/dist/presence/presence.controller.js +60 -0
  278. package/dist/presence/presence.controller.js.map +1 -0
  279. package/dist/presence/presence.listener.d.ts +29 -0
  280. package/dist/presence/presence.listener.d.ts.map +1 -0
  281. package/dist/presence/presence.listener.js +82 -0
  282. package/dist/presence/presence.listener.js.map +1 -0
  283. package/dist/presence/presence.module.d.ts +3 -0
  284. package/dist/presence/presence.module.d.ts.map +1 -0
  285. package/dist/presence/presence.module.js +32 -0
  286. package/dist/presence/presence.module.js.map +1 -0
  287. package/dist/presence/presence.service.d.ts +42 -0
  288. package/dist/presence/presence.service.d.ts.map +1 -0
  289. package/dist/presence/presence.service.js +147 -0
  290. package/dist/presence/presence.service.js.map +1 -0
  291. package/dist/profile/dto/delete-account.dto.d.ts +8 -0
  292. package/dist/profile/dto/delete-account.dto.d.ts.map +1 -0
  293. package/dist/profile/dto/delete-account.dto.js +22 -0
  294. package/dist/profile/dto/delete-account.dto.js.map +1 -0
  295. package/dist/profile/events/profile-account-deleted.event.d.ts +12 -0
  296. package/dist/profile/events/profile-account-deleted.event.d.ts.map +1 -0
  297. package/dist/profile/events/profile-account-deleted.event.js +17 -0
  298. package/dist/profile/events/profile-account-deleted.event.js.map +1 -0
  299. package/dist/profile/profile.controller.d.ts +24 -17
  300. package/dist/profile/profile.controller.d.ts.map +1 -1
  301. package/dist/profile/profile.controller.js +75 -46
  302. package/dist/profile/profile.controller.js.map +1 -1
  303. package/dist/profile/profile.service.d.ts +34 -21
  304. package/dist/profile/profile.service.d.ts.map +1 -1
  305. package/dist/profile/profile.service.js +113 -37
  306. package/dist/profile/profile.service.js.map +1 -1
  307. package/dist/realtime/realtime.gateway.d.ts +48 -0
  308. package/dist/realtime/realtime.gateway.d.ts.map +1 -0
  309. package/dist/realtime/realtime.gateway.js +156 -0
  310. package/dist/realtime/realtime.gateway.js.map +1 -0
  311. package/dist/realtime/realtime.module.d.ts +8 -0
  312. package/dist/realtime/realtime.module.d.ts.map +1 -0
  313. package/dist/realtime/realtime.module.js +29 -0
  314. package/dist/realtime/realtime.module.js.map +1 -0
  315. package/dist/realtime/realtime.service.d.ts +51 -0
  316. package/dist/realtime/realtime.service.d.ts.map +1 -0
  317. package/dist/realtime/realtime.service.js +177 -0
  318. package/dist/realtime/realtime.service.js.map +1 -0
  319. package/dist/redis/redis-pubsub.d.ts +27 -0
  320. package/dist/redis/redis-pubsub.d.ts.map +1 -0
  321. package/dist/redis/redis-pubsub.js +140 -0
  322. package/dist/redis/redis-pubsub.js.map +1 -0
  323. package/dist/role/role.controller.d.ts +3 -3
  324. package/dist/role/role.service.d.ts +3 -3
  325. package/dist/setting/dto/create.dto.d.ts.map +1 -1
  326. package/dist/setting/dto/create.dto.js +9 -2
  327. package/dist/setting/dto/create.dto.js.map +1 -1
  328. package/dist/setting/setting.controller.d.ts +5 -5
  329. package/dist/setting/setting.service.d.ts +8 -5
  330. package/dist/setting/setting.service.d.ts.map +1 -1
  331. package/dist/setting/setting.service.js +25 -1
  332. package/dist/setting/setting.service.js.map +1 -1
  333. package/dist/user/dto/create-with-email-and-password.dto.d.ts +2 -0
  334. package/dist/user/dto/create-with-email-and-password.dto.d.ts.map +1 -1
  335. package/dist/user/dto/create-with-email-and-password.dto.js +5 -0
  336. package/dist/user/dto/create-with-email-and-password.dto.js.map +1 -1
  337. package/dist/user/dto/query-user-mail-list.dto.d.ts +5 -0
  338. package/dist/user/dto/query-user-mail-list.dto.d.ts.map +1 -0
  339. package/dist/user/dto/query-user-mail-list.dto.js +25 -0
  340. package/dist/user/dto/query-user-mail-list.dto.js.map +1 -0
  341. package/dist/user/user-credential.util.d.ts +19 -0
  342. package/dist/user/user-credential.util.d.ts.map +1 -0
  343. package/dist/user/user-credential.util.js +32 -0
  344. package/dist/user/user-credential.util.js.map +1 -0
  345. package/dist/user/user.controller.d.ts +17 -5
  346. package/dist/user/user.controller.d.ts.map +1 -1
  347. package/dist/user/user.controller.js +18 -3
  348. package/dist/user/user.controller.js.map +1 -1
  349. package/dist/user/user.service.d.ts +28 -6
  350. package/dist/user/user.service.d.ts.map +1 -1
  351. package/dist/user/user.service.js +204 -13
  352. package/dist/user/user.service.js.map +1 -1
  353. package/dist/validators/is-strong-password-with-settings.validator.d.ts.map +1 -1
  354. package/dist/validators/is-strong-password-with-settings.validator.js +11 -0
  355. package/dist/validators/is-strong-password-with-settings.validator.js.map +1 -1
  356. package/dist/validators/service-locator.d.ts +9 -0
  357. package/dist/validators/service-locator.d.ts.map +1 -1
  358. package/dist/validators/service-locator.js +12 -0
  359. package/dist/validators/service-locator.js.map +1 -1
  360. package/dist/webhook-integration/webhook-integration.controller.d.ts +5 -8
  361. package/dist/webhook-integration/webhook-integration.controller.d.ts.map +1 -1
  362. package/dist/webhook-integration/webhook-integration.controller.js +31 -8
  363. package/dist/webhook-integration/webhook-integration.controller.js.map +1 -1
  364. package/dist/webhook-integration/webhook-integration.module.d.ts.map +1 -1
  365. package/dist/webhook-integration/webhook-integration.module.js +5 -0
  366. package/dist/webhook-integration/webhook-integration.module.js.map +1 -1
  367. package/dist/webhook-integration/webhook-integration.service.d.ts +33 -1
  368. package/dist/webhook-integration/webhook-integration.service.d.ts.map +1 -1
  369. package/dist/webhook-integration/webhook-integration.service.js +109 -4
  370. package/dist/webhook-integration/webhook-integration.service.js.map +1 -1
  371. package/dist/webhook-integration/webhook-protocol.registry.d.ts +63 -0
  372. package/dist/webhook-integration/webhook-protocol.registry.d.ts.map +1 -0
  373. package/dist/webhook-integration/webhook-protocol.registry.js +51 -0
  374. package/dist/webhook-integration/webhook-protocol.registry.js.map +1 -0
  375. package/dist/whatsapp-sender/whatsapp-sender.module.d.ts +3 -0
  376. package/dist/whatsapp-sender/whatsapp-sender.module.d.ts.map +1 -0
  377. package/dist/whatsapp-sender/whatsapp-sender.module.js +23 -0
  378. package/dist/whatsapp-sender/whatsapp-sender.module.js.map +1 -0
  379. package/dist/whatsapp-sender/whatsapp-sender.service.d.ts +50 -0
  380. package/dist/whatsapp-sender/whatsapp-sender.service.d.ts.map +1 -0
  381. package/dist/whatsapp-sender/whatsapp-sender.service.js +224 -0
  382. package/dist/whatsapp-sender/whatsapp-sender.service.js.map +1 -0
  383. package/hedhog/data/integration_provider.yaml +16 -0
  384. package/hedhog/data/mail.yaml +88 -61
  385. package/hedhog/data/mail_layout.yaml +188 -0
  386. package/hedhog/data/menu.yaml +67 -3
  387. package/hedhog/data/route.yaml +135 -0
  388. package/hedhog/data/setting_group.yaml +139 -1
  389. package/hedhog/frontend/app/account/components/mfa-setup-dialog.tsx.ejs +36 -0
  390. package/hedhog/frontend/app/account/components/two-factor-auth.tsx.ejs +2 -0
  391. package/hedhog/frontend/app/account/hooks/use-mfa-setup.ts.ejs +10 -7
  392. package/hedhog/frontend/app/ai_agent/page.tsx.ejs +7 -4
  393. package/hedhog/frontend/app/ai_instruction/_components/ai-instruction-form.tsx.ejs +580 -0
  394. package/hedhog/frontend/app/ai_instruction/_components/ai-instruction-preview.tsx.ejs +150 -0
  395. package/hedhog/frontend/app/ai_instruction/_components/ai-instruction-versions.tsx.ejs +199 -0
  396. package/hedhog/frontend/app/ai_instruction/_components/prompt-diff.tsx.ejs +63 -0
  397. package/hedhog/frontend/app/ai_instruction/_lib/line-diff.spec.ts.ejs +59 -0
  398. package/hedhog/frontend/app/ai_instruction/_lib/line-diff.ts.ejs +72 -0
  399. package/hedhog/frontend/app/ai_instruction/_lib/prompt-template.spec.ts.ejs +170 -0
  400. package/hedhog/frontend/app/ai_instruction/_lib/prompt-template.ts.ejs +167 -0
  401. package/hedhog/frontend/app/ai_instruction/_lib/types.ts.ejs +99 -0
  402. package/hedhog/frontend/app/ai_instruction/page.tsx.ejs +422 -0
  403. package/hedhog/frontend/app/configurations/[slug]/components/setting-field.tsx.ejs +51 -4
  404. package/hedhog/frontend/app/incidents/page.tsx.ejs +400 -0
  405. package/hedhog/frontend/app/integration/profiles/page.tsx.ejs +169 -92
  406. package/hedhog/frontend/app/mail/layout/page.tsx.ejs +344 -0
  407. package/hedhog/frontend/app/mail/template/page.tsx.ejs +155 -121
  408. package/hedhog/frontend/app/mcp_chat/page.tsx.ejs +129 -17
  409. package/hedhog/frontend/app/pages/_components/page-delete-dialog.tsx.ejs +343 -0
  410. package/hedhog/frontend/app/pages/_components/page-detail-sheet.tsx.ejs +438 -0
  411. package/hedhog/frontend/app/pages/_components/page-wizard-sheet.tsx.ejs +1009 -0
  412. package/hedhog/frontend/app/pages/_components/system-page-types.ts.ejs +56 -0
  413. package/hedhog/frontend/app/pages/_components/use-system-pages.ts.ejs +171 -0
  414. package/hedhog/frontend/app/pages/page.tsx.ejs +514 -0
  415. package/hedhog/frontend/app/users/page.tsx.ejs +119 -13
  416. package/hedhog/frontend/app/users/user-activity-timeline.tsx.ejs +231 -0
  417. package/hedhog/frontend/app/users/user-mails.tsx.ejs +399 -0
  418. package/hedhog/frontend/app/users/user-sheet.tsx.ejs +60 -75
  419. package/hedhog/frontend/messages/en.json +521 -3
  420. package/hedhog/frontend/messages/pt.json +521 -3
  421. package/hedhog/table/ai_agent.yaml +1 -0
  422. package/hedhog/table/ai_instruction.yaml +15 -0
  423. package/hedhog/table/leaked_password.yaml +18 -0
  424. package/hedhog/table/mail_layout.yaml +35 -0
  425. package/hedhog/table/mail_var.yaml +4 -0
  426. package/hedhog/table/setting.yaml +1 -0
  427. package/hedhog/table/system_incident.yaml +59 -0
  428. package/hedhog/table/user_presence.yaml +36 -0
  429. package/hedhog/table/webhook_integration.yaml +64 -43
  430. package/package.json +8 -4
  431. package/src/access-log/access-log.interceptor.ts +4 -2
  432. package/src/ai/ai-attachment.fragments.spec.ts +319 -0
  433. package/src/ai/ai-attachment.fragments.ts +35 -0
  434. package/src/ai/ai.prompts.ts +38 -0
  435. package/src/ai/ai.service.spec.ts +280 -0
  436. package/src/ai/ai.service.ts +338 -82
  437. package/src/ai/dto/chat.dto.ts +33 -3
  438. package/src/ai/dto/create-agent.dto.ts +2 -2
  439. package/src/ai/dto/update-agent.dto.ts +2 -2
  440. package/src/ai-instruction/ai-instruction.controller.ts +40 -9
  441. package/src/ai-instruction/ai-instruction.module.ts +13 -2
  442. package/src/ai-instruction/ai-instruction.service.spec.ts +658 -0
  443. package/src/ai-instruction/ai-instruction.service.ts +661 -62
  444. package/src/ai-instruction/ai-prompt-builder.service.ts +10 -1
  445. package/src/ai-instruction/ai-prompt-registry.ts +87 -0
  446. package/src/ai-instruction/ai-prompt-resolver.service.spec.ts +375 -0
  447. package/src/ai-instruction/ai-prompt-resolver.service.ts +295 -0
  448. package/src/ai-instruction/ai-prompt-template.util.spec.ts +162 -0
  449. package/src/ai-instruction/ai-prompt-template.util.ts +199 -0
  450. package/src/ai-instruction/dto/create-ai-instruction.dto.ts +39 -3
  451. package/src/ai-instruction/dto/preview-ai-instruction.dto.ts +26 -0
  452. package/src/ai-instruction/dto/update-ai-instruction.dto.ts +42 -1
  453. package/src/ai-instruction/types/ai-instruction.types.ts +24 -1
  454. package/src/auth/auth.controller.ts +33 -6
  455. package/src/auth/auth.service.spec.ts +3 -1
  456. package/src/auth/auth.service.ts +103 -37
  457. package/src/captcha/captcha.module.ts +10 -0
  458. package/src/captcha/captcha.service.spec.ts +210 -0
  459. package/src/captcha/captcha.service.ts +191 -0
  460. package/src/challenge/challenge.service.spec.ts +39 -4
  461. package/src/challenge/challenge.service.ts +72 -17
  462. package/src/core.module.ts +27 -1
  463. package/src/file/file.service.spec.ts +105 -0
  464. package/src/file/file.service.ts +60 -3
  465. package/src/incident/incident-notifier.service.spec.ts +205 -0
  466. package/src/incident/incident-notifier.service.ts +241 -0
  467. package/src/incident/incident.controller.ts +38 -0
  468. package/src/incident/incident.module.ts +19 -0
  469. package/src/incident/incident.service.spec.ts +150 -0
  470. package/src/incident/incident.service.ts +209 -0
  471. package/src/index.ts +38 -0
  472. package/src/integration-profile/dto/test.dto.ts +19 -0
  473. package/src/integration-profile/integration-profile.controller.ts +10 -1
  474. package/src/integration-profile/integration-profile.module.spec.ts +51 -0
  475. package/src/integration-profile/integration-profile.module.ts +23 -4
  476. package/src/integration-profile/integration-profile.secrets.ts +12 -2
  477. package/src/integration-profile/integration-profile.service.spec.ts +279 -0
  478. package/src/integration-profile/integration-profile.service.ts +132 -29
  479. package/src/integration-profile/integration-profile.utils.spec.ts +97 -0
  480. package/src/integration-profile/integration-profile.utils.ts +79 -3
  481. package/src/integration-profile/testers/ai.testers.ts +165 -0
  482. package/src/integration-profile/testers/captcha.testers.spec.ts +92 -0
  483. package/src/integration-profile/testers/captcha.testers.ts +139 -0
  484. package/src/integration-profile/testers/email.testers.ts +161 -0
  485. package/src/integration-profile/testers/http-probe.spec.ts +153 -0
  486. package/src/integration-profile/testers/http-probe.ts +171 -0
  487. package/src/integration-profile/testers/index.ts +30 -0
  488. package/src/integration-profile/testers/infrastructure.testers.ts +122 -0
  489. package/src/integration-profile/testers/integration-tester.registry.spec.ts +75 -0
  490. package/src/integration-profile/testers/integration-tester.registry.ts +43 -0
  491. package/src/integration-profile/testers/integration-tester.types.ts +61 -0
  492. package/src/integration-profile/testers/messaging.testers.ts +102 -0
  493. package/src/integration-profile/testers/oauth.testers.spec.ts +220 -0
  494. package/src/integration-profile/testers/oauth.testers.ts +305 -0
  495. package/src/integration-profile/testers/payment.testers.ts +185 -0
  496. package/src/integration-profile/testers/remaining.testers.spec.ts +401 -0
  497. package/src/integration-profile/testers/storage.testers.spec.ts +185 -0
  498. package/src/integration-profile/testers/storage.testers.ts +226 -0
  499. package/src/integration-profile/testers/tester-coverage.spec.ts +58 -0
  500. package/src/language/en.json +4 -2
  501. package/src/language/pt.json +4 -2
  502. package/src/leaked-password/README.md +83 -0
  503. package/src/leaked-password/leaked-password.controller.ts +52 -0
  504. package/src/leaked-password/leaked-password.module.ts +18 -0
  505. package/src/leaked-password/leaked-password.service.ts +242 -0
  506. package/src/leaked-password/seed/build-seed-sql.mjs +180 -0
  507. package/src/leaked-password/seed/common-passwords.txt +335 -0
  508. package/src/mail/dto/preview.dto.ts +50 -0
  509. package/src/mail/dto/send.dto.ts +14 -1
  510. package/src/mail/mail-template.spec.ts +197 -0
  511. package/src/mail/mail.controller.ts +9 -2
  512. package/src/mail/mail.service.spec.ts +116 -1
  513. package/src/mail/mail.service.ts +118 -12
  514. package/src/mail-layout/dto/update.dto.ts +19 -0
  515. package/src/mail-layout/mail-layout.controller.ts +47 -0
  516. package/src/mail-layout/mail-layout.module.ts +22 -0
  517. package/src/mail-layout/mail-layout.service.ts +94 -0
  518. package/src/mcp-chat/mcp-chat.service.spec.ts +236 -0
  519. package/src/mcp-chat/mcp-chat.service.ts +122 -26
  520. package/src/oauth/oauth-token-broker.service.spec.ts +172 -0
  521. package/src/oauth/oauth-token-broker.service.ts +363 -0
  522. package/src/oauth/oauth.module.ts +3 -1
  523. package/src/oauth/oauth.service.ts +8 -2
  524. package/src/pdf/pdf.service.ts +75 -0
  525. package/src/presence/presence.controller.ts +29 -0
  526. package/src/presence/presence.listener.ts +53 -0
  527. package/src/presence/presence.module.ts +19 -0
  528. package/src/presence/presence.service.spec.ts +97 -0
  529. package/src/presence/presence.service.ts +160 -0
  530. package/src/profile/dto/delete-account.dto.ts +11 -0
  531. package/src/profile/events/profile-account-deleted.event.ts +13 -0
  532. package/src/profile/profile.controller.ts +52 -36
  533. package/src/profile/profile.service.ts +143 -41
  534. package/src/realtime/realtime.gateway.ts +138 -0
  535. package/src/realtime/realtime.module.ts +16 -0
  536. package/src/realtime/realtime.service.spec.ts +50 -0
  537. package/src/realtime/realtime.service.ts +187 -0
  538. package/src/redis/redis-pubsub.ts +179 -0
  539. package/src/setting/dto/create.dto.ts +13 -2
  540. package/src/setting/setting.service.spec.ts +56 -0
  541. package/src/setting/setting.service.ts +29 -1
  542. package/src/user/dto/create-with-email-and-password.dto.ts +6 -1
  543. package/src/user/dto/query-user-mail-list.dto.ts +10 -0
  544. package/src/user/user-credential.util.ts +35 -0
  545. package/src/user/user.controller.ts +17 -2
  546. package/src/user/user.service.spec.ts +153 -0
  547. package/src/user/user.service.ts +255 -12
  548. package/src/validators/is-strong-password-with-settings.validator.ts +12 -0
  549. package/src/validators/service-locator.ts +15 -0
  550. package/src/webhook-integration/webhook-integration.controller.ts +40 -2
  551. package/src/webhook-integration/webhook-integration.module.ts +5 -0
  552. package/src/webhook-integration/webhook-integration.service.ts +133 -0
  553. package/src/webhook-integration/webhook-protocol.registry.spec.ts +70 -0
  554. package/src/webhook-integration/webhook-protocol.registry.ts +93 -0
  555. package/src/whatsapp-sender/whatsapp-sender.module.ts +10 -0
  556. package/src/whatsapp-sender/whatsapp-sender.service.ts +313 -0
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pass = pass;
4
+ exports.fail = fail;
5
+ exports.requireFields = requireFields;
6
+ exports.str = str;
7
+ exports.assertHttpUrl = assertHttpUrl;
8
+ exports.probeJson = probeJson;
9
+ exports.redactSecrets = redactSecrets;
10
+ exports.sanitizeTesterError = sanitizeTesterError;
11
+ exports.describeHttpError = describeHttpError;
12
+ /** Tamanho máximo de uma mensagem devolvida à UI (ela também é persistida no config). */
13
+ const MAX_ERROR_LENGTH = 300;
14
+ /** Atalho para um veredito de sucesso. */
15
+ function pass(info, warning) {
16
+ return Object.assign(Object.assign({ ok: true }, (info ? { info } : {})), (warning ? { warning } : {}));
17
+ }
18
+ /** Atalho para um veredito de falha. */
19
+ function fail(error) {
20
+ return { ok: false, error };
21
+ }
22
+ /**
23
+ * Exige que um campo esteja preenchido. Devolve `null` quando está tudo certo, ou o
24
+ * veredito de falha pronto — evita repetir o mesmo `if` em 31 testers.
25
+ */
26
+ function requireFields(config, fields) {
27
+ var _a;
28
+ for (const [key, label] of fields) {
29
+ if (!String((_a = config[key]) !== null && _a !== void 0 ? _a : '').trim()) {
30
+ return fail(`${label} is required.`);
31
+ }
32
+ }
33
+ return null;
34
+ }
35
+ /** Lê uma chave do config como string já trimada. */
36
+ function str(config, key) {
37
+ var _a;
38
+ return String((_a = config[key]) !== null && _a !== void 0 ? _a : '').trim();
39
+ }
40
+ /**
41
+ * Valida uma URL fornecida pelo usuário (host do Evolution, api_server do k8s,
42
+ * endpoint S3-compatible, base da ADN).
43
+ *
44
+ * Ranges privados são PERMITIDOS de propósito: k8s e Evolution self-hosted vivem em
45
+ * rede interna, e bloqueá-los quebraria o caso de uso principal. O que barramos são
46
+ * esquemas fora de http/https (file:, gopher:, etc.).
47
+ */
48
+ function assertHttpUrl(raw, field) {
49
+ let url;
50
+ try {
51
+ url = new URL(raw);
52
+ }
53
+ catch (_a) {
54
+ throw new Error(`${field} is not a valid URL.`);
55
+ }
56
+ if (url.protocol !== 'http:' && url.protocol !== 'https:') {
57
+ throw new Error(`${field} must use http or https.`);
58
+ }
59
+ return url;
60
+ }
61
+ /**
62
+ * `fetch` que não lança em status != 2xx — o status faz parte do veredito na maioria
63
+ * dos testers (401 vs 404 vs 403 dizem coisas diferentes).
64
+ */
65
+ async function probeJson(url, init, signal) {
66
+ const response = await fetch(url, Object.assign(Object.assign({}, init), { signal }));
67
+ const text = (await response.text().catch(() => '')).slice(0, 2000);
68
+ let body = {};
69
+ try {
70
+ body = text ? JSON.parse(text) : {};
71
+ }
72
+ catch (_a) {
73
+ body = {};
74
+ }
75
+ return { ok: response.ok, status: response.status, body, text };
76
+ }
77
+ /** Remove qualquer ocorrência dos segredos do texto. */
78
+ function redactSecrets(text, secretValues) {
79
+ let out = text;
80
+ for (const secret of secretValues) {
81
+ // Segredos muito curtos (ex.: uma senha de 3 letras) casariam com palavras comuns
82
+ // e transformariam a mensagem em ruído; o risco real está nos tokens longos.
83
+ if (secret && secret.length >= 6) {
84
+ out = out.split(secret).join('***');
85
+ }
86
+ }
87
+ return out;
88
+ }
89
+ /**
90
+ * Converte qualquer erro em mensagem segura para a UI e para o config do perfil.
91
+ *
92
+ * Ordem importa: timeout e falha de DNS/conexão precisam de texto PRÓPRIO, senão o
93
+ * operador de um cluster sem saída para a internet lê "não foi possível validar" e
94
+ * conclui que a credencial está errada.
95
+ */
96
+ function sanitizeTesterError(error, secretValues, host) {
97
+ var _a, _b;
98
+ const target = host ? ` (${host})` : '';
99
+ const name = (_a = error === null || error === void 0 ? void 0 : error.name) !== null && _a !== void 0 ? _a : '';
100
+ const code = String((_b = error === null || error === void 0 ? void 0 : error.code) !== null && _b !== void 0 ? _b : '');
101
+ const raw = error instanceof Error ? error.message : String(error !== null && error !== void 0 ? error : '');
102
+ if (name === 'AbortError' || name === 'TimeoutError' || code === 'ABORT_ERR') {
103
+ return `Timed out while contacting the provider${target}. Check the server's outbound network access.`;
104
+ }
105
+ const networkCode = [code, raw].join(' ');
106
+ if (/ENOTFOUND|EAI_AGAIN/.test(networkCode)) {
107
+ return `Host not found${target}. Check the address you typed.`;
108
+ }
109
+ if (/ECONNREFUSED/.test(networkCode)) {
110
+ return `Connection refused${target}. Check the address, the port and the firewall.`;
111
+ }
112
+ if (/ECONNRESET|EPIPE|ETIMEDOUT/.test(networkCode)) {
113
+ return `Connection interrupted${target}. Check the server's outbound network access.`;
114
+ }
115
+ if (/CERT_HAS_EXPIRED/.test(networkCode)) {
116
+ return `The provider's TLS certificate has expired${target}.`;
117
+ }
118
+ if (/DEPTH_ZERO_SELF_SIGNED_CERT|SELF_SIGNED_CERT_IN_CHAIN|UNABLE_TO_VERIFY_LEAF_SIGNATURE/.test(networkCode)) {
119
+ return `The provider's TLS certificate could not be verified${target}.`;
120
+ }
121
+ // Só a mensagem — nunca o objeto de erro inteiro nem o stack.
122
+ const message = redactSecrets(raw || 'Unexpected error.', secretValues).trim();
123
+ return message.length > MAX_ERROR_LENGTH
124
+ ? `${message.slice(0, MAX_ERROR_LENGTH - 1)}…`
125
+ : message;
126
+ }
127
+ /**
128
+ * Mensagem curta a partir de uma resposta HTTP de erro, procurando o campo de mensagem
129
+ * nos formatos mais comuns (`error.message`, `error_description`, `message`, `error`).
130
+ */
131
+ function describeHttpError(result, fallback) {
132
+ var _a, _b, _c, _d, _e, _f, _g;
133
+ const body = (_a = result.body) !== null && _a !== void 0 ? _a : {};
134
+ const candidate = (_f = (_e = (_d = (_c = (_b = body === null || body === void 0 ? void 0 : body.error) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : body === null || body === void 0 ? void 0 : body.error_description) !== null && _d !== void 0 ? _d : body === null || body === void 0 ? void 0 : body.message) !== null && _e !== void 0 ? _e : (typeof (body === null || body === void 0 ? void 0 : body.error) === 'string' ? body.error : null)) !== null && _f !== void 0 ? _f : (_g = body === null || body === void 0 ? void 0 : body.error) === null || _g === void 0 ? void 0 : _g.error_user_msg;
135
+ const message = String(candidate !== null && candidate !== void 0 ? candidate : '').trim();
136
+ if (message)
137
+ return message;
138
+ return `${fallback} (HTTP ${result.status})`;
139
+ }
140
+ //# sourceMappingURL=http-probe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-probe.js","sourceRoot":"","sources":["../../../src/integration-profile/testers/http-probe.ts"],"names":[],"mappings":";;AAaA,oBAEC;AAGD,oBAEC;AAMD,sCAUC;AAGD,kBAEC;AAUD,sCAWC;AAeD,8BAgBC;AAGD,sCAUC;AASD,kDAoCC;AAMD,8CAaC;AAjKD,yFAAyF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AM,GAAG,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { IntegrationTester } from './integration-tester.types';
2
+ /**
3
+ * Testadores que o core registra sozinho no boot.
4
+ *
5
+ * Providers de outras libraries (nfse-national, da `fiscal`) se registram no próprio
6
+ * módulo, via IntegrationTesterRegistry.
7
+ */
8
+ export declare const BUILTIN_INTEGRATION_TESTERS: IntegrationTester[];
9
+ export * from './http-probe';
10
+ export * from './integration-tester.registry';
11
+ export * from './integration-tester.types';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integration-profile/testers/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAM/D;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,iBAAiB,EAS1D,CAAC;AAEF,cAAc,cAAc,CAAC;AAC7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,45 @@
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
+ exports.BUILTIN_INTEGRATION_TESTERS = void 0;
18
+ const ai_testers_1 = require("./ai.testers");
19
+ const captcha_testers_1 = require("./captcha.testers");
20
+ const email_testers_1 = require("./email.testers");
21
+ const infrastructure_testers_1 = require("./infrastructure.testers");
22
+ const messaging_testers_1 = require("./messaging.testers");
23
+ const oauth_testers_1 = require("./oauth.testers");
24
+ const payment_testers_1 = require("./payment.testers");
25
+ const storage_testers_1 = require("./storage.testers");
26
+ /**
27
+ * Testadores que o core registra sozinho no boot.
28
+ *
29
+ * Providers de outras libraries (nfse-national, da `fiscal`) se registram no próprio
30
+ * módulo, via IntegrationTesterRegistry.
31
+ */
32
+ exports.BUILTIN_INTEGRATION_TESTERS = [
33
+ ...email_testers_1.EMAIL_TESTERS,
34
+ ...messaging_testers_1.MESSAGING_TESTERS,
35
+ ...storage_testers_1.STORAGE_TESTERS,
36
+ ...ai_testers_1.AI_TESTERS,
37
+ ...oauth_testers_1.OAUTH_TESTERS,
38
+ ...payment_testers_1.PAYMENT_TESTERS,
39
+ ...captcha_testers_1.CAPTCHA_TESTERS,
40
+ ...infrastructure_testers_1.INFRASTRUCTURE_TESTERS,
41
+ ];
42
+ __exportStar(require("./http-probe"), exports);
43
+ __exportStar(require("./integration-tester.registry"), exports);
44
+ __exportStar(require("./integration-tester.types"), exports);
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integration-profile/testers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAA0C;AAC1C,uDAAoD;AACpD,mDAAgD;AAChD,qEAAkE;AAElE,2DAAwD;AACxD,mDAAgD;AAChD,uDAAoD;AACpD,uDAAoD;AAEpD;;;;;GAKG;AACU,QAAA,2BAA2B,GAAwB;IAC9D,GAAG,6BAAa;IAChB,GAAG,qCAAiB;IACpB,GAAG,iCAAe;IAClB,GAAG,uBAAU;IACb,GAAG,6BAAa;IAChB,GAAG,iCAAe;IAClB,GAAG,iCAAe;IAClB,GAAG,+CAAsB;CAC1B,CAAC;AAEF,+CAA6B;AAC7B,gEAA8C;AAC9C,6DAA2C"}
@@ -0,0 +1,3 @@
1
+ import { IntegrationTester } from './integration-tester.types';
2
+ export declare const INFRASTRUCTURE_TESTERS: IntegrationTester[];
3
+ //# sourceMappingURL=infrastructure.testers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infrastructure.testers.d.ts","sourceRoot":"","sources":["../../../src/integration-profile/testers/infrastructure.testers.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AA2G/D,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,EAGrD,CAAC"}
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.INFRASTRUCTURE_TESTERS = void 0;
7
+ const axios_1 = __importDefault(require("axios"));
8
+ const node_https_1 = require("node:https");
9
+ const http_probe_1 = require("./http-probe");
10
+ /**
11
+ * Testadores dos providers de infraestrutura (autoscaling).
12
+ *
13
+ * DUPLICAÇÃO INTENCIONAL: `libraries/queue/src/scaling/{digital-ocean,kubernetes-scaler}
14
+ * .service.ts` têm um `testCredentials` equivalente, batendo nos mesmos endpoints.
15
+ * Não dá para reaproveitar: `@hed-hog-pro/queue` depende do core, então o core não pode
16
+ * importá-lo de volta — e os providers `digitalocean`/`kubernetes` são semeados por uma
17
+ * migration do core, existindo mesmo em instalações sem o pacote da fila. Registrar o
18
+ * tester pela queue deixaria o botão quebrado nessas instalações. Se mudar um endpoint
19
+ * aqui, olhe o outro lado também.
20
+ */
21
+ const digitalOceanTester = {
22
+ providerSlug: 'digitalocean',
23
+ test: async (config, ctx) => {
24
+ var _a, _b, _c, _d, _e;
25
+ const missing = (0, http_probe_1.requireFields)(config, [
26
+ ['api_token', 'API token'],
27
+ ['cluster_id', 'Cluster ID'],
28
+ ]);
29
+ if (missing)
30
+ return missing;
31
+ const token = String((_a = config.api_token) !== null && _a !== void 0 ? _a : '');
32
+ const clusterId = (0, http_probe_1.str)(config, 'cluster_id');
33
+ const result = await (0, http_probe_1.probeJson)(`https://api.digitalocean.com/v2/kubernetes/clusters/${encodeURIComponent(clusterId)}`, { headers: { Authorization: `Bearer ${token}` } }, ctx.signal);
34
+ if (result.status === 401)
35
+ return (0, http_probe_1.fail)('Invalid DigitalOcean API token.');
36
+ if (result.status === 403) {
37
+ return (0, http_probe_1.fail)('This token has no permission to read Kubernetes clusters.');
38
+ }
39
+ if (result.status === 404) {
40
+ return (0, http_probe_1.fail)(`Cluster "${clusterId}" was not found in this account.`);
41
+ }
42
+ if (!result.ok) {
43
+ return (0, http_probe_1.fail)((0, http_probe_1.describeHttpError)(result, 'DigitalOcean rejected the request.'));
44
+ }
45
+ const cluster = (_c = (_b = result.body) === null || _b === void 0 ? void 0 : _b.kubernetes_cluster) !== null && _c !== void 0 ? _c : {};
46
+ const label = `${(_d = cluster.name) !== null && _d !== void 0 ? _d : clusterId} (${(_e = cluster.region) !== null && _e !== void 0 ? _e : (0, http_probe_1.str)(config, 'region')})`;
47
+ // O pool de vídeo é escolhido por nome; se ele sumiu do cluster, o autoscaling
48
+ // falha silenciosamente depois — melhor avisar agora.
49
+ const poolName = (0, http_probe_1.str)(config, 'video_node_pool_name');
50
+ if (poolName) {
51
+ const pools = Array.isArray(cluster.node_pools)
52
+ ? cluster.node_pools
53
+ : [];
54
+ if (pools.length > 0 && !pools.some((pool) => pool.name === poolName)) {
55
+ return (0, http_probe_1.pass)(label, `The node pool "${poolName}" no longer exists in this cluster.`);
56
+ }
57
+ }
58
+ return (0, http_probe_1.pass)(label);
59
+ },
60
+ };
61
+ const kubernetesTester = {
62
+ providerSlug: 'kubernetes',
63
+ test: async (config, ctx) => {
64
+ var _a, _b, _c, _d;
65
+ const missing = (0, http_probe_1.requireFields)(config, [
66
+ ['api_server', 'API server'],
67
+ ['token', 'Token'],
68
+ ]);
69
+ if (missing)
70
+ return missing;
71
+ const apiServer = (0, http_probe_1.assertHttpUrl)((0, http_probe_1.str)(config, 'api_server'), 'API server');
72
+ const caCert = String((_a = config.ca_cert) !== null && _a !== void 0 ? _a : '').trim();
73
+ // Não usamos `fetch` aqui: o CA do cluster é quase sempre privado e a API de fetch
74
+ // não aceita um contexto TLS customizado.
75
+ const httpsAgent = new node_https_1.Agent(caCert ? { ca: caCert } : { rejectUnauthorized: false });
76
+ try {
77
+ const response = await axios_1.default.get(`${apiServer.origin}/version`, {
78
+ headers: { Authorization: `Bearer ${String((_b = config.token) !== null && _b !== void 0 ? _b : '')}` },
79
+ httpsAgent,
80
+ signal: ctx.signal,
81
+ validateStatus: () => true,
82
+ });
83
+ if (response.status === 401)
84
+ return (0, http_probe_1.fail)('The Kubernetes token was rejected.');
85
+ if (response.status === 403) {
86
+ return (0, http_probe_1.fail)('This token has no permission to read the cluster version.');
87
+ }
88
+ if (response.status >= 400) {
89
+ return (0, http_probe_1.fail)(`The Kubernetes API returned HTTP ${response.status}.`);
90
+ }
91
+ const version = String((_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.gitVersion) !== null && _d !== void 0 ? _d : '').trim();
92
+ return caCert
93
+ ? (0, http_probe_1.pass)(`${apiServer.host}${version ? ` — ${version}` : ''}`)
94
+ : (0, http_probe_1.pass)(`${apiServer.host}${version ? ` — ${version}` : ''}`, 'No CA certificate provided: the TLS certificate was not verified.');
95
+ }
96
+ finally {
97
+ httpsAgent.destroy();
98
+ }
99
+ },
100
+ };
101
+ exports.INFRASTRUCTURE_TESTERS = [
102
+ digitalOceanTester,
103
+ kubernetesTester,
104
+ ];
105
+ //# sourceMappingURL=infrastructure.testers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infrastructure.testers.js","sourceRoot":"","sources":["../../../src/integration-profile/testers/infrastructure.testers.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,2CAAmC;AACnC,6CAQsB;AAGtB;;;;;;;;;;GAUG;AAEH,MAAM,kBAAkB,GAAsB;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5D,CAAC,CAAC,IAAA,iBAAI,EACF,GAAG,SAAS,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EACpD,mEAAmE,CACpE,CAAC;QACR,CAAC;gBAAS,CAAC;YACT,UAAU,CAAC,OAAO,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;CACF,CAAC;AAEW,QAAA,sBAAsB,GAAwB;IACzD,kBAAkB;IAClB,gBAAgB;CACjB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { IntegrationTester } from './integration-tester.types';
2
+ /**
3
+ * Registro dos testadores de conexão, no mesmo padrão do WebhookProtocolRegistry e do
4
+ * FiscalProviderRegistry: os testers embutidos entram no boot do IntegrationProfileModule
5
+ * e libraries externas registram os seus (é assim que a `fiscal` pluga o nfse-national,
6
+ * que precisa abrir o certificado A1 — código que não pode viver no core).
7
+ */
8
+ export declare class IntegrationTesterRegistry {
9
+ private readonly logger;
10
+ private readonly testers;
11
+ register(tester: IntegrationTester): void;
12
+ find(providerSlug: string | null | undefined): IntegrationTester | null;
13
+ has(providerSlug: string | null | undefined): boolean;
14
+ /** Providers com teste disponível (para a UI decidir se mostra o botão). */
15
+ list(): string[];
16
+ }
17
+ //# sourceMappingURL=integration-tester.registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-tester.registry.d.ts","sourceRoot":"","sources":["../../../src/integration-profile/testers/integration-tester.registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;;;GAKG;AACH,qBACa,yBAAyB;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8C;IACrE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwC;IAEhE,QAAQ,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAWzC,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,iBAAiB,GAAG,IAAI;IAKvE,GAAG,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO;IAIrD,4EAA4E;IAC5E,IAAI,IAAI,MAAM,EAAE;CAGjB"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ 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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var IntegrationTesterRegistry_1;
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.IntegrationTesterRegistry = void 0;
11
+ const common_1 = require("@nestjs/common");
12
+ /**
13
+ * Registro dos testadores de conexão, no mesmo padrão do WebhookProtocolRegistry e do
14
+ * FiscalProviderRegistry: os testers embutidos entram no boot do IntegrationProfileModule
15
+ * e libraries externas registram os seus (é assim que a `fiscal` pluga o nfse-national,
16
+ * que precisa abrir o certificado A1 — código que não pode viver no core).
17
+ */
18
+ let IntegrationTesterRegistry = IntegrationTesterRegistry_1 = class IntegrationTesterRegistry {
19
+ constructor() {
20
+ this.logger = new common_1.Logger(IntegrationTesterRegistry_1.name);
21
+ this.testers = new Map();
22
+ }
23
+ register(tester) {
24
+ const key = normalizeSlug(tester === null || tester === void 0 ? void 0 : tester.providerSlug);
25
+ if (!key)
26
+ throw new Error('Integration tester requires a providerSlug.');
27
+ if (this.testers.has(key)) {
28
+ this.logger.warn(`Integration tester for provider "${key}" was overwritten.`);
29
+ }
30
+ this.testers.set(key, tester);
31
+ }
32
+ find(providerSlug) {
33
+ var _a;
34
+ const key = normalizeSlug(providerSlug);
35
+ return key ? ((_a = this.testers.get(key)) !== null && _a !== void 0 ? _a : null) : null;
36
+ }
37
+ has(providerSlug) {
38
+ return this.find(providerSlug) !== null;
39
+ }
40
+ /** Providers com teste disponível (para a UI decidir se mostra o botão). */
41
+ list() {
42
+ return [...this.testers.keys()].sort();
43
+ }
44
+ };
45
+ exports.IntegrationTesterRegistry = IntegrationTesterRegistry;
46
+ exports.IntegrationTesterRegistry = IntegrationTesterRegistry = IntegrationTesterRegistry_1 = __decorate([
47
+ (0, common_1.Injectable)()
48
+ ], IntegrationTesterRegistry);
49
+ function normalizeSlug(slug) {
50
+ return String(slug !== null && slug !== void 0 ? slug : '').trim().toLowerCase();
51
+ }
52
+ //# sourceMappingURL=integration-tester.registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-tester.registry.js","sourceRoot":"","sources":["../../../src/integration-profile/testers/integration-tester.registry.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AAGpD;;;;;GAKG;AAEI,IAAM,yBAAyB,iCAA/B,MAAM,yBAAyB;IAA/B;QACY,WAAM,GAAG,IAAI,eAAM,CAAC,2BAAyB,CAAC,IAAI,CAAC,CAAC;QACpD,YAAO,GAAG,IAAI,GAAG,EAA6B,CAAC;IA0BlE,CAAC;IAxBC,QAAQ,CAAC,MAAyB;QAChC,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,YAAY,CAAC,CAAC;QAChD,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QAEzE,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,GAAG,oBAAoB,CAAC,CAAC;QAChF,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,IAAI,CAAC,YAAuC;;QAC1C,MAAM,GAAG,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;QACxC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACtD,CAAC;IAED,GAAG,CAAC,YAAuC;QACzC,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAC1C,CAAC;IAED,4EAA4E;IAC5E,IAAI;QACF,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACzC,CAAC;CACF,CAAA;AA5BY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;GACA,yBAAyB,CA4BrC;AAED,SAAS,aAAa,CAAC,IAA+B;IACpD,OAAO,MAAM,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACjD,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Contrato dos testadores de conexão dos Perfis de Integração.
3
+ *
4
+ * Cada provider (smtp, s3, stripe, google-oauth, …) implementa um `IntegrationTester`
5
+ * que faz uma chamada verificável contra o serviço real e devolve um veredito. O
6
+ * `IntegrationProfileService.test()` só despacha; nenhum `if (provider === 'x')` sobra lá.
7
+ *
8
+ * Os testers são objetos literais sem estado (mesmo estilo de integration-profile.utils.ts),
9
+ * não providers do Nest: assim cada spec é um teste puro de função com `fetch` mockado.
10
+ */
11
+ /** Timeout padrão de um teste de conexão. */
12
+ export declare const INTEGRATION_TEST_TIMEOUT_MS = 10000;
13
+ export type IntegrationTestOutcome = {
14
+ ok: boolean;
15
+ /**
16
+ * Evidência legível do que foi verificado (nome do bucket, da conta, do cluster…).
17
+ * NUNCA pode conter segredo: vai para a UI e é gravada no config do perfil.
18
+ */
19
+ info?: string;
20
+ /** Motivo legível da falha. NUNCA contém segredo nem stack trace. */
21
+ error?: string;
22
+ /**
23
+ * Credencial válida, mas algo secundário não pôde ser comprovado (domínio não
24
+ * verificado, service account sem acesso ao app, pool inexistente). Não reprova.
25
+ */
26
+ warning?: string;
27
+ };
28
+ export type IntegrationTestContext = {
29
+ /** Já combinado com o timeout do tester. Repassar a TODA chamada de rede. */
30
+ signal: AbortSignal;
31
+ /** Slug do integration_type (email, storage, oauth, …). */
32
+ typeSlug: string;
33
+ /** Slug do provider sendo testado. */
34
+ providerSlug: string;
35
+ /**
36
+ * Valores dos segredos deste perfil, usados só para redigir mensagens de erro
37
+ * (algumas APIs ecoam a entrada de volta). Nunca logar nem devolver.
38
+ */
39
+ secretValues: string[];
40
+ };
41
+ export interface IntegrationTester {
42
+ /** Slug do integration_provider que esta implementação atende. */
43
+ readonly providerSlug: string;
44
+ /** Timeout específico deste provider (default INTEGRATION_TEST_TIMEOUT_MS). */
45
+ readonly timeoutMs?: number;
46
+ /**
47
+ * `config` chega DECIFRADO e já mesclado com os segredos armazenados
48
+ * ("deixe em branco para manter"), então o tester nunca vê a máscara.
49
+ *
50
+ * Não deve lançar: devolve `{ ok: false, error }`. Exceções que escaparem viram
51
+ * `ok: false` com a mensagem sanitizada no dispatcher.
52
+ */
53
+ test(config: Record<string, unknown>, ctx: IntegrationTestContext): Promise<IntegrationTestOutcome>;
54
+ }
55
+ //# sourceMappingURL=integration-tester.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-tester.types.d.ts","sourceRoot":"","sources":["../../../src/integration-profile/testers/integration-tester.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,6CAA6C;AAC7C,eAAO,MAAM,2BAA2B,QAAS,CAAC;AAElD,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,OAAO,CAAC;IACZ;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,6EAA6E;IAC7E,MAAM,EAAE,WAAW,CAAC;IACpB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,+EAA+E;IAC/E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;OAMG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,GAAG,EAAE,sBAAsB,GAC1B,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACpC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * Contrato dos testadores de conexão dos Perfis de Integração.
4
+ *
5
+ * Cada provider (smtp, s3, stripe, google-oauth, …) implementa um `IntegrationTester`
6
+ * que faz uma chamada verificável contra o serviço real e devolve um veredito. O
7
+ * `IntegrationProfileService.test()` só despacha; nenhum `if (provider === 'x')` sobra lá.
8
+ *
9
+ * Os testers são objetos literais sem estado (mesmo estilo de integration-profile.utils.ts),
10
+ * não providers do Nest: assim cada spec é um teste puro de função com `fetch` mockado.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.INTEGRATION_TEST_TIMEOUT_MS = void 0;
14
+ /** Timeout padrão de um teste de conexão. */
15
+ exports.INTEGRATION_TEST_TIMEOUT_MS = 10000;
16
+ //# sourceMappingURL=integration-tester.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-tester.types.js","sourceRoot":"","sources":["../../../src/integration-profile/testers/integration-tester.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,6CAA6C;AAChC,QAAA,2BAA2B,GAAG,KAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { IntegrationTester } from './integration-tester.types';
2
+ export declare const MESSAGING_TESTERS: IntegrationTester[];
3
+ //# sourceMappingURL=messaging.testers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messaging.testers.d.ts","sourceRoot":"","sources":["../../../src/integration-profile/testers/messaging.testers.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAwF/D,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,EAGhD,CAAC"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MESSAGING_TESTERS = void 0;
4
+ const integration_profile_utils_1 = require("../integration-profile.utils");
5
+ const http_probe_1 = require("./http-probe");
6
+ const evolutionApiTester = {
7
+ providerSlug: 'evolution-api',
8
+ test: async (config, ctx) => {
9
+ var _a, _b, _c, _d, _e, _f;
10
+ const missing = (0, http_probe_1.requireFields)(config, [
11
+ ['host', 'Evolution API host'],
12
+ ['token', 'Evolution API token'],
13
+ ['instance_name', 'Instance name'],
14
+ ]);
15
+ if (missing)
16
+ return missing;
17
+ const base = (0, http_probe_1.assertHttpUrl)((0, http_probe_1.str)(config, 'host'), 'Evolution API host');
18
+ const instance = (0, http_probe_1.str)(config, 'instance_name');
19
+ const url = `${base.origin}/instance/connectionState/${encodeURIComponent(instance)}`;
20
+ const result = await (0, http_probe_1.probeJson)(url, { headers: { apikey: String((_a = config.token) !== null && _a !== void 0 ? _a : '') } }, ctx.signal);
21
+ if (result.status === 401 || result.status === 403) {
22
+ return (0, http_probe_1.fail)('Invalid Evolution API token.');
23
+ }
24
+ if (result.status === 404) {
25
+ return (0, http_probe_1.fail)(`Instance "${instance}" was not found on this Evolution API server.`);
26
+ }
27
+ if (!result.ok) {
28
+ return (0, http_probe_1.fail)((0, http_probe_1.describeHttpError)(result, 'Evolution API rejected the request.'));
29
+ }
30
+ const state = String((_f = (_d = (_c = (_b = result.body) === null || _b === void 0 ? void 0 : _b.instance) === null || _c === void 0 ? void 0 : _c.state) !== null && _d !== void 0 ? _d : (_e = result.body) === null || _e === void 0 ? void 0 : _e.state) !== null && _f !== void 0 ? _f : '').trim();
31
+ // Credencial válida mas sessão desconectada: o perfil está certo e o QR code é
32
+ // outro problema — avisar sem reprovar.
33
+ if (state && state !== 'open') {
34
+ return (0, http_probe_1.pass)(`${instance} — ${state}`, `The instance is not connected (state: ${state}). Scan the QR code in Evolution API.`);
35
+ }
36
+ return (0, http_probe_1.pass)(`${instance}${state ? ` — ${state}` : ''}`);
37
+ },
38
+ };
39
+ /**
40
+ * Valida um perfil whatsapp-official contra a Graph API (lê o WABA com o token).
41
+ * Nunca devolve o token/secret na resposta.
42
+ */
43
+ const whatsappOfficialTester = {
44
+ providerSlug: 'whatsapp-official',
45
+ test: async (config, ctx) => {
46
+ var _a, _b;
47
+ const cfg = (0, integration_profile_utils_1.buildWhatsappOfficialConfigFromIntegration)(config);
48
+ if (!cfg.accessToken)
49
+ return (0, http_probe_1.fail)('WhatsApp access token is required.');
50
+ if (!cfg.wabaId)
51
+ return (0, http_probe_1.fail)('WhatsApp Business Account ID is required.');
52
+ if (!cfg.appSecret) {
53
+ return (0, http_probe_1.fail)('Meta App Secret is required to validate webhook signatures.');
54
+ }
55
+ if (!cfg.verifyToken)
56
+ return (0, http_probe_1.fail)('Webhook verify token is required.');
57
+ const url = `https://graph.facebook.com/${cfg.graphApiVersion}/${encodeURIComponent(cfg.wabaId)}?fields=id,name`;
58
+ const result = await (0, http_probe_1.probeJson)(url, { headers: { Authorization: `Bearer ${cfg.accessToken}` } }, ctx.signal);
59
+ if (!result.ok) {
60
+ // A mensagem da Meta não contém o token; ainda assim só propagamos o texto dela.
61
+ return (0, http_probe_1.fail)(`WhatsApp validation failed: ${(0, http_probe_1.describeHttpError)(result, 'Graph API rejected the request.')}`);
62
+ }
63
+ return (0, http_probe_1.pass)(String((_b = (_a = result.body) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : '') || cfg.wabaId);
64
+ },
65
+ };
66
+ exports.MESSAGING_TESTERS = [
67
+ evolutionApiTester,
68
+ whatsappOfficialTester,
69
+ ];
70
+ //# sourceMappingURL=messaging.testers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messaging.testers.js","sourceRoot":"","sources":["../../../src/integration-profile/testers/messaging.testers.ts"],"names":[],"mappings":";;;AAAA,4EAA0F;AAC1F,6CAQsB;AAGtB,MAAM,kBAAkB,GAAsB;IAC5C,YAAY,EAAE,eAAe;IAC7B,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE;;QAC1B,MAAM,OAAO,GAAG,IAAA,0BAAa,EAAC,MAAM,EAAE;YACpC,CAAC,MAAM,EAAE,oBAAoB,CAAC;YAC9B,CAAC,OAAO,EAAE,qBAAqB,CAAC;YAChC,CAAC,eAAe,EAAE,eAAe,CAAC;SACnC,CAAC,CAAC;QACH,IAAI,OAAO;YAAE,OAAO,OAAO,CAAC;QAE5B,MAAM,IAAI,GAAG,IAAA,0BAAa,EAAC,IAAA,gBAAG,EAAC,MAAM,EAAE,MAAM,CAAC,EAAE,oBAAoB,CAAC,CAAC;QACtE,MAAM,QAAQ,GAAG,IAAA,gBAAG,EAAC,MAAM,EAAE,eAAe,CAAC,CAAC;QAC9C,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,6BAA6B,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;QAEtF,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAS,EAC5B,GAAG,EACH,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAA,MAAM,CAAC,KAAK,mCAAI,EAAE,CAAC,EAAE,EAAE,EACnD,GAAG,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AW;YAAE,OAAO,IAAA,iBAAI,EAAC,oCAAoC,CAAC,CAAC;QACxE,IAAI,CAAC,GAAG,CAAC,MAAM;YAAE,OAAO,IAAA,iBAAI,EAAC,2CAA2C,CAAC,CAAC;QAC1E,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;YACnB,OAAO,IAAA,iBAAI,EAAC,6DAA6D,CAAC,CAAC;QAC7E,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,WAAW;YAAE,OAAO,IAAA,iBAAI,EAAC,mCAAmC,CAAC,CAAC;QAEvE,MAAM,GAAG,GAAG,8BAA8B,GAAG,CAAC,eAAe,IAAI,kBAAkB,CACjF,GAAG,CAAC,MAAM,CACX,iBAAiB,CAAC;QAEnB,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAS,EAC5B,GAAG,EACH,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,GAAG,CAAC,WAAW,EAAE,EAAE,EAAE,EAC3D,GAAG,CAAC,MAAM,CACX,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,iFAAiF;YACjF,OAAO,IAAA,iBAAI,EACT,+BAA+B,IAAA,8BAAiB,EAC9C,MAAM,EACN,iCAAiC,CAClC,EAAE,CACJ,CAAC;QACJ,CAAC;QAED,OAAO,IAAA,iBAAI,EAAC,MAAM,CAAC,MAAA,MAAA,MAAM,CAAC,IAAI,0CAAE,IAAI,mCAAI,EAAE,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7D,CAAC;CACF,CAAC;AAEW,QAAA,iBAAiB,GAAwB;IACpD,kBAAkB;IAClB,sBAAsB;CACvB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { IntegrationTester } from './integration-tester.types';
2
+ export declare const OAUTH_TESTERS: IntegrationTester[];
3
+ //# sourceMappingURL=oauth.testers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth.testers.d.ts","sourceRoot":"","sources":["../../../src/integration-profile/testers/oauth.testers.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AA+R/D,eAAO,MAAM,aAAa,EAAE,iBAAiB,EAQ5C,CAAC"}