@ductape/sdk 0.0.4-v6 → 0.0.4-v61

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 (937) hide show
  1. package/dist/agents/agent-context.d.ts +98 -0
  2. package/dist/agents/agent-context.js +588 -0
  3. package/dist/agents/agent-context.js.map +1 -0
  4. package/dist/agents/agent-executor.d.ts +180 -0
  5. package/dist/agents/agent-executor.js +715 -0
  6. package/dist/agents/agent-executor.js.map +1 -0
  7. package/dist/agents/agents.service.d.ts +310 -0
  8. package/dist/agents/agents.service.js +1249 -0
  9. package/dist/agents/agents.service.js.map +1 -0
  10. package/dist/agents/index.d.ts +55 -0
  11. package/dist/agents/index.js +110 -0
  12. package/dist/agents/index.js.map +1 -0
  13. package/dist/agents/memory-manager.d.ts +182 -0
  14. package/dist/agents/memory-manager.js +383 -0
  15. package/dist/agents/memory-manager.js.map +1 -0
  16. package/dist/agents/tool-registry.d.ts +141 -0
  17. package/dist/agents/tool-registry.js +355 -0
  18. package/dist/agents/tool-registry.js.map +1 -0
  19. package/dist/agents/types/agents.types.d.ts +1227 -0
  20. package/dist/agents/types/agents.types.js +12 -0
  21. package/dist/agents/types/agents.types.js.map +1 -0
  22. package/dist/agents/types/index.d.ts +6 -0
  23. package/dist/agents/types/index.js +23 -0
  24. package/dist/agents/types/index.js.map +1 -0
  25. package/dist/agents/vector-store-adapter.d.ts +108 -0
  26. package/dist/agents/vector-store-adapter.js +213 -0
  27. package/dist/agents/vector-store-adapter.js.map +1 -0
  28. package/dist/api/services/appApi.service.d.ts +51 -5
  29. package/dist/api/services/appApi.service.js +101 -3
  30. package/dist/api/services/appApi.service.js.map +1 -1
  31. package/dist/api/services/pricingApi.service.d.ts +10 -0
  32. package/dist/api/services/pricingApi.service.js +34 -0
  33. package/dist/api/services/pricingApi.service.js.map +1 -0
  34. package/dist/api/services/processorApi.service.d.ts +334 -2
  35. package/dist/api/services/processorApi.service.js +264 -2
  36. package/dist/api/services/processorApi.service.js.map +1 -1
  37. package/dist/api/services/productsApi.service.d.ts +108 -1
  38. package/dist/api/services/productsApi.service.js +150 -3
  39. package/dist/api/services/productsApi.service.js.map +1 -1
  40. package/dist/api/services/resilienceApi.service.d.ts +106 -0
  41. package/dist/api/services/resilienceApi.service.js +224 -0
  42. package/dist/api/services/resilienceApi.service.js.map +1 -0
  43. package/dist/api/services/secretsApi.service.d.ts +50 -0
  44. package/dist/api/services/secretsApi.service.js +124 -0
  45. package/dist/api/services/secretsApi.service.js.map +1 -0
  46. package/dist/api/services/workflowApi.service.d.ts +199 -0
  47. package/dist/api/services/workflowApi.service.js +183 -0
  48. package/dist/api/services/workflowApi.service.js.map +1 -0
  49. package/dist/api/services/workspaceApi.service.d.ts +8 -0
  50. package/dist/api/services/workspaceApi.service.js +20 -0
  51. package/dist/api/services/workspaceApi.service.js.map +1 -1
  52. package/dist/api/urls.d.ts +65 -1
  53. package/dist/api/urls.js +90 -18
  54. package/dist/api/urls.js.map +1 -1
  55. package/dist/api/utils/auth.utils.d.ts +1 -3
  56. package/dist/api/utils/auth.utils.js.map +1 -1
  57. package/dist/api/utils/cache.utils.d.ts +1 -1
  58. package/dist/api/utils/cache.utils.js +2 -2
  59. package/dist/api/utils/cache.utils.js.map +1 -1
  60. package/dist/api/utils/strings.utils.d.ts +2 -0
  61. package/dist/api/utils/strings.utils.js +14 -0
  62. package/dist/api/utils/strings.utils.js.map +1 -1
  63. package/dist/apps/services/app.service.d.ts +41 -33
  64. package/dist/apps/services/app.service.js +472 -184
  65. package/dist/apps/services/app.service.js.map +1 -1
  66. package/dist/apps/utils/auth-context-manager.d.ts +137 -0
  67. package/dist/apps/utils/auth-context-manager.js +248 -0
  68. package/dist/apps/utils/auth-context-manager.js.map +1 -0
  69. package/dist/apps/utils/credential-manager.d.ts +128 -0
  70. package/dist/apps/utils/credential-manager.js +199 -0
  71. package/dist/apps/utils/credential-manager.js.map +1 -0
  72. package/dist/apps/utils/index.d.ts +10 -0
  73. package/dist/apps/utils/index.js +54 -0
  74. package/dist/apps/utils/index.js.map +1 -0
  75. package/dist/apps/utils/input-helpers.d.ts +67 -0
  76. package/dist/apps/utils/input-helpers.js +185 -0
  77. package/dist/apps/utils/input-helpers.js.map +1 -0
  78. package/dist/apps/utils/input-resolver.d.ts +165 -0
  79. package/dist/apps/utils/input-resolver.js +477 -0
  80. package/dist/apps/utils/input-resolver.js.map +1 -0
  81. package/dist/apps/utils/oauth-manager.d.ts +196 -0
  82. package/dist/apps/utils/oauth-manager.js +429 -0
  83. package/dist/apps/utils/oauth-manager.js.map +1 -0
  84. package/dist/apps/validators/joi-validators/create.appAction.validator.d.ts +1 -2
  85. package/dist/apps/validators/joi-validators/create.appAction.validator.js +21 -2
  86. package/dist/apps/validators/joi-validators/create.appAction.validator.js.map +1 -1
  87. package/dist/apps/validators/joi-validators/update.appAction.validator.js +11 -1
  88. package/dist/apps/validators/joi-validators/update.appAction.validator.js.map +1 -1
  89. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.d.ts +1 -1
  90. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js +34 -1
  91. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js.map +1 -1
  92. package/dist/bin.d.ts +26 -0
  93. package/dist/bin.js +28 -0
  94. package/dist/bin.js.map +1 -0
  95. package/dist/brokers/brokers.service.d.ts +289 -0
  96. package/dist/brokers/brokers.service.js +722 -0
  97. package/dist/brokers/brokers.service.js.map +1 -0
  98. package/dist/brokers/index.d.ts +46 -0
  99. package/dist/brokers/index.js +83 -0
  100. package/dist/brokers/index.js.map +1 -0
  101. package/dist/brokers/types/index.d.ts +314 -0
  102. package/dist/brokers/types/index.js +8 -0
  103. package/dist/brokers/types/index.js.map +1 -0
  104. package/dist/brokers/utils/broker.util.d.ts +33 -0
  105. package/dist/brokers/utils/broker.util.js +125 -0
  106. package/dist/brokers/utils/broker.util.js.map +1 -0
  107. package/dist/brokers/utils/providers/aws-sqs.service.d.ts +16 -0
  108. package/dist/brokers/utils/providers/aws-sqs.service.js +71 -0
  109. package/dist/brokers/utils/providers/aws-sqs.service.js.map +1 -0
  110. package/dist/brokers/utils/providers/google-pubsub.service.d.ts +16 -0
  111. package/dist/brokers/utils/providers/google-pubsub.service.js +43 -0
  112. package/dist/brokers/utils/providers/google-pubsub.service.js.map +1 -0
  113. package/dist/brokers/utils/providers/index.d.ts +6 -0
  114. package/dist/brokers/utils/providers/index.js +16 -0
  115. package/dist/brokers/utils/providers/index.js.map +1 -0
  116. package/dist/brokers/utils/providers/kafka.service.d.ts +23 -0
  117. package/dist/brokers/utils/providers/kafka.service.js +131 -0
  118. package/dist/brokers/utils/providers/kafka.service.js.map +1 -0
  119. package/dist/brokers/utils/providers/nats.service.d.ts +18 -0
  120. package/dist/brokers/utils/providers/nats.service.js +63 -0
  121. package/dist/brokers/utils/providers/nats.service.js.map +1 -0
  122. package/dist/brokers/utils/providers/rabbitmq.service.d.ts +15 -0
  123. package/dist/brokers/utils/providers/rabbitmq.service.js +151 -0
  124. package/dist/brokers/utils/providers/rabbitmq.service.js.map +1 -0
  125. package/dist/brokers/utils/providers/redis.service.d.ts +18 -0
  126. package/dist/brokers/utils/providers/redis.service.js +93 -0
  127. package/dist/brokers/utils/providers/redis.service.js.map +1 -0
  128. package/dist/cache/cache.manager.d.ts +159 -0
  129. package/dist/cache/cache.manager.js +265 -0
  130. package/dist/cache/cache.manager.js.map +1 -0
  131. package/dist/cache/cache.service.d.ts +186 -0
  132. package/dist/cache/cache.service.js +437 -0
  133. package/dist/cache/cache.service.js.map +1 -0
  134. package/dist/cache/index.d.ts +52 -0
  135. package/dist/cache/index.js +79 -0
  136. package/dist/cache/index.js.map +1 -0
  137. package/dist/cache/types/index.d.ts +106 -0
  138. package/dist/cache/types/index.js +6 -0
  139. package/dist/cache/types/index.js.map +1 -0
  140. package/dist/clients/pricing.client.d.ts +3 -0
  141. package/dist/clients/pricing.client.js +33 -0
  142. package/dist/clients/pricing.client.js.map +1 -0
  143. package/dist/database/actions/action-manager.d.ts +170 -0
  144. package/dist/database/actions/action-manager.js +465 -0
  145. package/dist/database/actions/action-manager.js.map +1 -0
  146. package/dist/database/actions/index.d.ts +6 -0
  147. package/dist/database/actions/index.js +13 -0
  148. package/dist/database/actions/index.js.map +1 -0
  149. package/dist/database/adapters/adapter.factory.d.ts +62 -0
  150. package/dist/database/adapters/adapter.factory.js +97 -0
  151. package/dist/database/adapters/adapter.factory.js.map +1 -0
  152. package/dist/database/adapters/base.adapter.d.ts +393 -0
  153. package/dist/database/adapters/base.adapter.js +150 -0
  154. package/dist/database/adapters/base.adapter.js.map +1 -0
  155. package/dist/database/adapters/cassandra.adapter.d.ts +91 -0
  156. package/dist/database/adapters/cassandra.adapter.js +1075 -0
  157. package/dist/database/adapters/cassandra.adapter.js.map +1 -0
  158. package/dist/database/adapters/dynamodb.adapter.d.ts +109 -0
  159. package/dist/database/adapters/dynamodb.adapter.js +1534 -0
  160. package/dist/database/adapters/dynamodb.adapter.js.map +1 -0
  161. package/dist/database/adapters/index.d.ts +11 -0
  162. package/dist/database/adapters/index.js +27 -0
  163. package/dist/database/adapters/index.js.map +1 -0
  164. package/dist/database/adapters/mariadb.adapter.d.ts +100 -0
  165. package/dist/database/adapters/mariadb.adapter.js +247 -0
  166. package/dist/database/adapters/mariadb.adapter.js.map +1 -0
  167. package/dist/database/adapters/mongodb.adapter.d.ts +120 -0
  168. package/dist/database/adapters/mongodb.adapter.js +1253 -0
  169. package/dist/database/adapters/mongodb.adapter.js.map +1 -0
  170. package/dist/database/adapters/mysql.adapter.d.ts +85 -0
  171. package/dist/database/adapters/mysql.adapter.js +1313 -0
  172. package/dist/database/adapters/mysql.adapter.js.map +1 -0
  173. package/dist/database/adapters/postgresql.adapter.d.ts +88 -0
  174. package/dist/database/adapters/postgresql.adapter.js +1434 -0
  175. package/dist/database/adapters/postgresql.adapter.js.map +1 -0
  176. package/dist/database/databases.service.d.ts +1388 -0
  177. package/dist/database/databases.service.js +2821 -0
  178. package/dist/database/databases.service.js.map +1 -0
  179. package/dist/database/index.d.ts +46 -0
  180. package/dist/database/index.js +109 -0
  181. package/dist/database/index.js.map +1 -0
  182. package/dist/database/migrations/index.d.ts +6 -0
  183. package/dist/database/migrations/index.js +12 -0
  184. package/dist/database/migrations/index.js.map +1 -0
  185. package/dist/database/migrations/migration-engine.d.ts +132 -0
  186. package/dist/database/migrations/migration-engine.js +1356 -0
  187. package/dist/database/migrations/migration-engine.js.map +1 -0
  188. package/dist/database/operators/aggregation-builder.d.ts +67 -0
  189. package/dist/database/operators/aggregation-builder.js +841 -0
  190. package/dist/database/operators/aggregation-builder.js.map +1 -0
  191. package/dist/database/operators/index.d.ts +7 -0
  192. package/dist/database/operators/index.js +15 -0
  193. package/dist/database/operators/index.js.map +1 -0
  194. package/dist/database/operators/query-builder.d.ts +59 -0
  195. package/dist/database/operators/query-builder.js +397 -0
  196. package/dist/database/operators/query-builder.js.map +1 -0
  197. package/dist/database/presave/decrypt.d.ts +25 -0
  198. package/dist/database/presave/decrypt.js +146 -0
  199. package/dist/database/presave/decrypt.js.map +1 -0
  200. package/dist/database/presave/index.d.ts +9 -0
  201. package/dist/database/presave/index.js +18 -0
  202. package/dist/database/presave/index.js.map +1 -0
  203. package/dist/database/presave/presave-processor.d.ts +148 -0
  204. package/dist/database/presave/presave-processor.js +702 -0
  205. package/dist/database/presave/presave-processor.js.map +1 -0
  206. package/dist/database/schema/index.d.ts +7 -0
  207. package/dist/database/schema/index.js +13 -0
  208. package/dist/database/schema/index.js.map +1 -0
  209. package/dist/database/schema/schema-manager.d.ts +258 -0
  210. package/dist/database/schema/schema-manager.js +637 -0
  211. package/dist/database/schema/schema-manager.js.map +1 -0
  212. package/dist/database/transactions/index.d.ts +6 -0
  213. package/dist/database/transactions/index.js +13 -0
  214. package/dist/database/transactions/index.js.map +1 -0
  215. package/dist/database/transactions/transaction-manager.d.ts +113 -0
  216. package/dist/database/transactions/transaction-manager.js +344 -0
  217. package/dist/database/transactions/transaction-manager.js.map +1 -0
  218. package/dist/database/triggers/index.d.ts +7 -0
  219. package/dist/database/triggers/index.js +14 -0
  220. package/dist/database/triggers/index.js.map +1 -0
  221. package/dist/database/triggers/trigger-processor.d.ts +239 -0
  222. package/dist/database/triggers/trigger-processor.js +1034 -0
  223. package/dist/database/triggers/trigger-processor.js.map +1 -0
  224. package/dist/database/types/action.interface.d.ts +148 -0
  225. package/dist/database/types/action.interface.js +6 -0
  226. package/dist/database/types/action.interface.js.map +1 -0
  227. package/dist/database/types/aggregation.interface.d.ts +185 -0
  228. package/dist/database/types/aggregation.interface.js +6 -0
  229. package/dist/database/types/aggregation.interface.js.map +1 -0
  230. package/dist/database/types/connection.interface.d.ts +137 -0
  231. package/dist/database/types/connection.interface.js +6 -0
  232. package/dist/database/types/connection.interface.js.map +1 -0
  233. package/dist/database/types/enums.d.ts +195 -0
  234. package/dist/database/types/enums.js +244 -0
  235. package/dist/database/types/enums.js.map +1 -0
  236. package/dist/database/types/index.d.ts +14 -0
  237. package/dist/database/types/index.js +31 -0
  238. package/dist/database/types/index.js.map +1 -0
  239. package/dist/database/types/migration.interface.d.ts +686 -0
  240. package/dist/database/types/migration.interface.js +9 -0
  241. package/dist/database/types/migration.interface.js.map +1 -0
  242. package/dist/database/types/presave.interface.d.ts +292 -0
  243. package/dist/database/types/presave.interface.js +60 -0
  244. package/dist/database/types/presave.interface.js.map +1 -0
  245. package/dist/database/types/query.interface.d.ts +205 -0
  246. package/dist/database/types/query.interface.js +6 -0
  247. package/dist/database/types/query.interface.js.map +1 -0
  248. package/dist/database/types/schema.interface.d.ts +398 -0
  249. package/dist/database/types/schema.interface.js +6 -0
  250. package/dist/database/types/schema.interface.js.map +1 -0
  251. package/dist/database/types/transaction.interface.d.ts +84 -0
  252. package/dist/database/types/transaction.interface.js +6 -0
  253. package/dist/database/types/transaction.interface.js.map +1 -0
  254. package/dist/database/types/trigger.interface.d.ts +612 -0
  255. package/dist/database/types/trigger.interface.js +121 -0
  256. package/dist/database/types/trigger.interface.js.map +1 -0
  257. package/dist/database/types/write.interface.d.ts +216 -0
  258. package/dist/database/types/write.interface.js +6 -0
  259. package/dist/database/types/write.interface.js.map +1 -0
  260. package/dist/database/utils/database-error.d.ts +96 -0
  261. package/dist/database/utils/database-error.js +221 -0
  262. package/dist/database/utils/database-error.js.map +1 -0
  263. package/dist/database/utils/index.d.ts +6 -0
  264. package/dist/database/utils/index.js +11 -0
  265. package/dist/database/utils/index.js.map +1 -0
  266. package/dist/graph/adapters/adapter.factory.d.ts +47 -0
  267. package/dist/graph/adapters/adapter.factory.js +77 -0
  268. package/dist/graph/adapters/adapter.factory.js.map +1 -0
  269. package/dist/graph/adapters/arangodb.adapter.d.ts +86 -0
  270. package/dist/graph/adapters/arangodb.adapter.js +1522 -0
  271. package/dist/graph/adapters/arangodb.adapter.js.map +1 -0
  272. package/dist/graph/adapters/base.adapter.d.ts +245 -0
  273. package/dist/graph/adapters/base.adapter.js +64 -0
  274. package/dist/graph/adapters/base.adapter.js.map +1 -0
  275. package/dist/graph/adapters/index.d.ts +11 -0
  276. package/dist/graph/adapters/index.js +21 -0
  277. package/dist/graph/adapters/index.js.map +1 -0
  278. package/dist/graph/adapters/memgraph.adapter.d.ts +110 -0
  279. package/dist/graph/adapters/memgraph.adapter.js +1345 -0
  280. package/dist/graph/adapters/memgraph.adapter.js.map +1 -0
  281. package/dist/graph/adapters/neo4j.adapter.d.ts +81 -0
  282. package/dist/graph/adapters/neo4j.adapter.js +1198 -0
  283. package/dist/graph/adapters/neo4j.adapter.js.map +1 -0
  284. package/dist/graph/adapters/neptune.adapter.d.ts +82 -0
  285. package/dist/graph/adapters/neptune.adapter.js +1313 -0
  286. package/dist/graph/adapters/neptune.adapter.js.map +1 -0
  287. package/dist/graph/graphs.service.d.ts +546 -0
  288. package/dist/graph/graphs.service.js +1893 -0
  289. package/dist/graph/graphs.service.js.map +1 -0
  290. package/dist/graph/index.d.ts +57 -0
  291. package/dist/graph/index.js +77 -0
  292. package/dist/graph/index.js.map +1 -0
  293. package/dist/graph/transactions/index.d.ts +4 -0
  294. package/dist/graph/transactions/index.js +9 -0
  295. package/dist/graph/transactions/index.js.map +1 -0
  296. package/dist/graph/transactions/transaction-manager.d.ts +61 -0
  297. package/dist/graph/transactions/transaction-manager.js +126 -0
  298. package/dist/graph/transactions/transaction-manager.js.map +1 -0
  299. package/dist/graph/types/connection.interface.d.ts +149 -0
  300. package/dist/graph/types/connection.interface.js +9 -0
  301. package/dist/graph/types/connection.interface.js.map +1 -0
  302. package/dist/graph/types/enums.d.ts +101 -0
  303. package/dist/graph/types/enums.js +114 -0
  304. package/dist/graph/types/enums.js.map +1 -0
  305. package/dist/graph/types/index.d.ts +13 -0
  306. package/dist/graph/types/index.js +20 -0
  307. package/dist/graph/types/index.js.map +1 -0
  308. package/dist/graph/types/node.interface.d.ts +248 -0
  309. package/dist/graph/types/node.interface.js +9 -0
  310. package/dist/graph/types/node.interface.js.map +1 -0
  311. package/dist/graph/types/query.interface.d.ts +175 -0
  312. package/dist/graph/types/query.interface.js +9 -0
  313. package/dist/graph/types/query.interface.js.map +1 -0
  314. package/dist/graph/types/relationship.interface.d.ts +207 -0
  315. package/dist/graph/types/relationship.interface.js +9 -0
  316. package/dist/graph/types/relationship.interface.js.map +1 -0
  317. package/dist/graph/types/schema.interface.d.ts +295 -0
  318. package/dist/graph/types/schema.interface.js +9 -0
  319. package/dist/graph/types/schema.interface.js.map +1 -0
  320. package/dist/graph/types/transaction.interface.d.ts +55 -0
  321. package/dist/graph/types/transaction.interface.js +9 -0
  322. package/dist/graph/types/transaction.interface.js.map +1 -0
  323. package/dist/graph/types/traversal.interface.d.ts +181 -0
  324. package/dist/graph/types/traversal.interface.js +9 -0
  325. package/dist/graph/types/traversal.interface.js.map +1 -0
  326. package/dist/graph/utils/graph-error.d.ts +71 -0
  327. package/dist/graph/utils/graph-error.js +142 -0
  328. package/dist/graph/utils/graph-error.js.map +1 -0
  329. package/dist/graph/utils/index.d.ts +4 -0
  330. package/dist/graph/utils/index.js +9 -0
  331. package/dist/graph/utils/index.js.map +1 -0
  332. package/dist/imports/imports.service.d.ts +3 -3
  333. package/dist/imports/imports.service.js +8 -7
  334. package/dist/imports/imports.service.js.map +1 -1
  335. package/dist/imports/imports.types.d.ts +8 -0
  336. package/dist/imports/repos/openApi.repo.d.ts +1 -1
  337. package/dist/imports/repos/openApi.repo.js +414 -47
  338. package/dist/imports/repos/openApi.repo.js.map +1 -1
  339. package/dist/imports/repos/postmanV21.repo.d.ts +1 -1
  340. package/dist/imports/repos/postmanV21.repo.js +126 -83
  341. package/dist/imports/repos/postmanV21.repo.js.map +1 -1
  342. package/dist/index.d.ts +3241 -285
  343. package/dist/index.js +4711 -687
  344. package/dist/index.js.map +1 -1
  345. package/dist/init.interface.d.ts +407 -0
  346. package/dist/init.interface.js +3 -0
  347. package/dist/init.interface.js.map +1 -0
  348. package/dist/inputs/inputs.service.d.ts +1 -1
  349. package/dist/inputs/inputs.service.js +2 -2
  350. package/dist/inputs/inputs.service.js.map +1 -1
  351. package/dist/inputs/utils/inputs.utils.create.js +1 -1
  352. package/dist/inputs/utils/inputs.utils.create.js.map +1 -1
  353. package/dist/jobs/index.d.ts +38 -0
  354. package/dist/jobs/index.js +50 -0
  355. package/dist/jobs/index.js.map +1 -0
  356. package/dist/jobs/jobs.service.d.ts +154 -0
  357. package/dist/jobs/jobs.service.js +491 -0
  358. package/dist/jobs/jobs.service.js.map +1 -0
  359. package/dist/jobs/jobs.state.d.ts +113 -0
  360. package/dist/jobs/jobs.state.js +447 -0
  361. package/dist/jobs/jobs.state.js.map +1 -0
  362. package/dist/jobs/types.d.ts +449 -0
  363. package/dist/jobs/types.js +74 -0
  364. package/dist/jobs/types.js.map +1 -0
  365. package/dist/logs/logs.types.d.ts +16 -1
  366. package/dist/logs/logs.types.js +5 -0
  367. package/dist/logs/logs.types.js.map +1 -1
  368. package/dist/models/index.d.ts +6 -0
  369. package/dist/models/index.js +11 -0
  370. package/dist/models/index.js.map +1 -0
  371. package/dist/models/models.service.d.ts +137 -0
  372. package/dist/models/models.service.js +195 -0
  373. package/dist/models/models.service.js.map +1 -0
  374. package/dist/notifications/index.d.ts +13 -0
  375. package/dist/notifications/index.js +26 -0
  376. package/dist/notifications/index.js.map +1 -0
  377. package/dist/notifications/notifications.service.d.ts +257 -0
  378. package/dist/notifications/notifications.service.js +656 -0
  379. package/dist/notifications/notifications.service.js.map +1 -0
  380. package/dist/notifications/types/index.d.ts +4 -0
  381. package/dist/notifications/types/index.js +21 -0
  382. package/dist/notifications/types/index.js.map +1 -0
  383. package/dist/notifications/types/notifications.types.d.ts +400 -0
  384. package/dist/notifications/types/notifications.types.js +49 -0
  385. package/dist/notifications/types/notifications.types.js.map +1 -0
  386. package/dist/parsers/index.d.ts +3 -0
  387. package/dist/parsers/index.js +27 -0
  388. package/dist/parsers/index.js.map +1 -0
  389. package/dist/parsers/pipelines/postman.pipelines.d.ts +15 -0
  390. package/dist/parsers/pipelines/postman.pipelines.js +103 -0
  391. package/dist/parsers/pipelines/postman.pipelines.js.map +1 -0
  392. package/dist/parsers/types/postman.types.d.ts +200 -0
  393. package/dist/parsers/types/postman.types.js +3 -0
  394. package/dist/parsers/types/postman.types.js.map +1 -0
  395. package/dist/parsers/utils/postman.utils.d.ts +12 -0
  396. package/dist/parsers/utils/postman.utils.js +116 -0
  397. package/dist/parsers/utils/postman.utils.js.map +1 -0
  398. package/dist/parsers/validators/postman-auth.validators.d.ts +10 -0
  399. package/dist/parsers/validators/postman-auth.validators.js +127 -0
  400. package/dist/parsers/validators/postman-auth.validators.js.map +1 -0
  401. package/dist/parsers/validators/postman-request.validators.d.ts +13 -0
  402. package/dist/parsers/validators/postman-request.validators.js +139 -0
  403. package/dist/parsers/validators/postman-request.validators.js.map +1 -0
  404. package/dist/parsers/validators/postman-response.validators.d.ts +13 -0
  405. package/dist/parsers/validators/postman-response.validators.js +150 -0
  406. package/dist/parsers/validators/postman-response.validators.js.map +1 -0
  407. package/dist/parsers/validators/postman-variable.validators.d.ts +14 -0
  408. package/dist/parsers/validators/postman-variable.validators.js +163 -0
  409. package/dist/parsers/validators/postman-variable.validators.js.map +1 -0
  410. package/dist/pricing/pricing.repo.js +1 -0
  411. package/dist/pricing/pricing.repo.js.map +1 -0
  412. package/dist/pricing/pricing.service.d.ts +24 -0
  413. package/dist/pricing/pricing.service.js +51 -0
  414. package/dist/pricing/pricing.service.js.map +1 -0
  415. package/dist/pricing/pricing.types.d.ts +76 -0
  416. package/dist/pricing/pricing.types.js +21 -0
  417. package/dist/pricing/pricing.types.js.map +1 -0
  418. package/dist/pricing/utils/string.utils.d.ts +1 -0
  419. package/dist/pricing/utils/string.utils.js +9 -0
  420. package/dist/pricing/utils/string.utils.js.map +1 -0
  421. package/dist/processor/services/processor.service.d.ts +120 -73
  422. package/dist/processor/services/processor.service.js +1705 -1294
  423. package/dist/processor/services/processor.service.js.map +1 -1
  424. package/dist/processor/services/request.service.d.ts +36 -0
  425. package/dist/processor/services/request.service.js +304 -0
  426. package/dist/processor/services/request.service.js.map +1 -0
  427. package/dist/processor/types/request.types.d.ts +14 -0
  428. package/dist/processor/types/request.types.js +3 -0
  429. package/dist/processor/types/request.types.js.map +1 -0
  430. package/dist/processor/utils/processor.utils.d.ts +3 -0
  431. package/dist/processor/utils/processor.utils.js +87 -21
  432. package/dist/processor/utils/processor.utils.js.map +1 -1
  433. package/dist/processor/utils/request.utils.d.ts +20 -0
  434. package/dist/processor/utils/request.utils.js +113 -0
  435. package/dist/processor/utils/request.utils.js.map +1 -0
  436. package/dist/products/services/products.service.d.ts +330 -77
  437. package/dist/products/services/products.service.js +2586 -397
  438. package/dist/products/services/products.service.js.map +1 -1
  439. package/dist/products/utils/string.utils.d.ts +1 -1
  440. package/dist/products/utils/string.utils.js +14 -2
  441. package/dist/products/utils/string.utils.js.map +1 -1
  442. package/dist/products/validators/index.d.ts +7 -1
  443. package/dist/products/validators/index.js +16 -1
  444. package/dist/products/validators/index.js.map +1 -1
  445. package/dist/products/validators/joi-validators/create.productAgent.validator.d.ts +3 -0
  446. package/dist/products/validators/joi-validators/create.productAgent.validator.js +266 -0
  447. package/dist/products/validators/joi-validators/create.productAgent.validator.js.map +1 -0
  448. package/dist/products/validators/joi-validators/create.productDatabase.validator.js +5 -0
  449. package/dist/products/validators/joi-validators/create.productDatabase.validator.js.map +1 -1
  450. package/dist/products/validators/joi-validators/create.productEnv.validator.js +1 -0
  451. package/dist/products/validators/joi-validators/create.productEnv.validator.js.map +1 -1
  452. package/dist/products/validators/joi-validators/create.productGraph.validator.js +89 -0
  453. package/dist/products/validators/joi-validators/create.productGraph.validator.js.map +1 -0
  454. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.d.ts +4 -0
  455. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js +58 -0
  456. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js.map +1 -0
  457. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js +81 -25
  458. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js.map +1 -1
  459. package/dist/products/validators/joi-validators/create.productModel.validator.d.ts +3 -0
  460. package/dist/products/validators/joi-validators/create.productModel.validator.js +132 -0
  461. package/dist/products/validators/joi-validators/create.productModel.validator.js.map +1 -0
  462. package/dist/products/validators/joi-validators/create.productNotification.validator.js +133 -45
  463. package/dist/products/validators/joi-validators/create.productNotification.validator.js.map +1 -1
  464. package/dist/products/validators/joi-validators/create.productStorage.validator.js +77 -18
  465. package/dist/products/validators/joi-validators/create.productStorage.validator.js.map +1 -1
  466. package/dist/products/validators/joi-validators/create.productVector.validator.d.ts +3 -0
  467. package/dist/products/validators/joi-validators/create.productVector.validator.js +135 -0
  468. package/dist/products/validators/joi-validators/create.productVector.validator.js.map +1 -0
  469. package/dist/products/validators/joi-validators/update.dataValue.validator.js +1 -0
  470. package/dist/products/validators/joi-validators/update.dataValue.validator.js.map +1 -1
  471. package/dist/products/validators/joi-validators/update.productDatabase.validator.js +5 -0
  472. package/dist/products/validators/joi-validators/update.productDatabase.validator.js.map +1 -1
  473. package/dist/products/validators/joi-validators/update.productEnv.validator.js +3 -0
  474. package/dist/products/validators/joi-validators/update.productEnv.validator.js.map +1 -1
  475. package/dist/products/validators/joi-validators/update.productGraph.validator.js +88 -0
  476. package/dist/products/validators/joi-validators/update.productGraph.validator.js.map +1 -0
  477. package/dist/resilience/fallback.service.d.ts +140 -0
  478. package/dist/resilience/fallback.service.js +764 -0
  479. package/dist/resilience/fallback.service.js.map +1 -0
  480. package/dist/resilience/healthcheck.service.d.ts +159 -0
  481. package/dist/resilience/healthcheck.service.js +943 -0
  482. package/dist/resilience/healthcheck.service.js.map +1 -0
  483. package/dist/resilience/index.d.ts +104 -0
  484. package/dist/resilience/index.js +140 -0
  485. package/dist/resilience/index.js.map +1 -0
  486. package/dist/resilience/quota.service.d.ts +82 -0
  487. package/dist/resilience/quota.service.js +516 -0
  488. package/dist/resilience/quota.service.js.map +1 -0
  489. package/dist/resilience/resilience.service.d.ts +98 -0
  490. package/dist/resilience/resilience.service.js +560 -0
  491. package/dist/resilience/resilience.service.js.map +1 -0
  492. package/dist/resilience/types/index.d.ts +513 -0
  493. package/dist/resilience/types/index.js +29 -0
  494. package/dist/resilience/types/index.js.map +1 -0
  495. package/dist/secrets/index.d.ts +10 -0
  496. package/dist/secrets/index.js +33 -0
  497. package/dist/secrets/index.js.map +1 -0
  498. package/dist/secrets/secrets.resolver.d.ts +52 -0
  499. package/dist/secrets/secrets.resolver.js +233 -0
  500. package/dist/secrets/secrets.resolver.js.map +1 -0
  501. package/dist/secrets/secrets.service.d.ts +93 -0
  502. package/dist/secrets/secrets.service.js +258 -0
  503. package/dist/secrets/secrets.service.js.map +1 -0
  504. package/dist/secrets/secrets.types.d.ts +188 -0
  505. package/dist/secrets/secrets.types.js +87 -0
  506. package/dist/secrets/secrets.types.js.map +1 -0
  507. package/dist/sessions/index.d.ts +50 -0
  508. package/dist/sessions/index.js +93 -0
  509. package/dist/sessions/index.js.map +1 -0
  510. package/dist/sessions/sessions.helper.d.ts +68 -0
  511. package/dist/sessions/sessions.helper.js +116 -0
  512. package/dist/sessions/sessions.helper.js.map +1 -0
  513. package/dist/sessions/sessions.resolver.d.ts +150 -0
  514. package/dist/sessions/sessions.resolver.js +356 -0
  515. package/dist/sessions/sessions.resolver.js.map +1 -0
  516. package/dist/sessions/sessions.service.d.ts +170 -0
  517. package/dist/sessions/sessions.service.js +736 -0
  518. package/dist/sessions/sessions.service.js.map +1 -0
  519. package/dist/sessions/types/index.d.ts +290 -0
  520. package/dist/sessions/types/index.js +6 -0
  521. package/dist/sessions/types/index.js.map +1 -0
  522. package/dist/storage/index.d.ts +66 -0
  523. package/dist/storage/index.js +98 -0
  524. package/dist/storage/index.js.map +1 -0
  525. package/dist/storage/storage.service.d.ts +151 -0
  526. package/dist/storage/storage.service.js +522 -0
  527. package/dist/storage/storage.service.js.map +1 -0
  528. package/dist/storage/types/index.d.ts +207 -0
  529. package/dist/storage/types/index.js +6 -0
  530. package/dist/storage/types/index.js.map +1 -0
  531. package/dist/storage/utils/storage.util.d.ts +51 -0
  532. package/dist/storage/utils/storage.util.js +402 -0
  533. package/dist/storage/utils/storage.util.js.map +1 -0
  534. package/dist/test/index.d.ts +3 -0
  535. package/dist/test/index.js +11 -0
  536. package/dist/test/index.js.map +1 -0
  537. package/dist/test/test.appBuilder.d.ts +0 -1
  538. package/dist/test/test.appBuilder.js +0 -15
  539. package/dist/test/test.appBuilder.js.map +1 -1
  540. package/dist/test/test.broker.kafka.js +172 -0
  541. package/dist/test/test.broker.kafka.js.map +1 -0
  542. package/dist/test/test.broker.nats.js +193 -0
  543. package/dist/test/test.broker.nats.js.map +1 -0
  544. package/dist/test/test.broker.pubsub.js +171 -0
  545. package/dist/test/test.broker.pubsub.js.map +1 -0
  546. package/dist/test/test.broker.rabbitmq.js +164 -0
  547. package/dist/test/test.broker.rabbitmq.js.map +1 -0
  548. package/dist/test/test.broker.redis.js +168 -0
  549. package/dist/test/test.broker.redis.js.map +1 -0
  550. package/dist/test/test.broker.sqs.d.ts +1 -0
  551. package/dist/test/test.broker.sqs.js +158 -0
  552. package/dist/test/test.broker.sqs.js.map +1 -0
  553. package/dist/test/test.caches.d.ts +1 -0
  554. package/dist/test/test.caches.js +231 -0
  555. package/dist/test/test.caches.js.map +1 -0
  556. package/dist/test/test.database.d.ts +1 -0
  557. package/dist/test/test.database.dynamo.d.ts +1 -0
  558. package/dist/test/test.database.dynamo.js +265 -0
  559. package/dist/test/test.database.dynamo.js.map +1 -0
  560. package/dist/test/test.database.js +140 -0
  561. package/dist/test/test.database.js.map +1 -0
  562. package/dist/test/test.database.mongo.d.ts +1 -0
  563. package/dist/test/test.database.mongo.js +371 -0
  564. package/dist/test/test.database.mongo.js.map +1 -0
  565. package/dist/test/test.database.mysql.d.ts +1 -0
  566. package/dist/test/test.database.mysql.js +415 -0
  567. package/dist/test/test.database.mysql.js.map +1 -0
  568. package/dist/test/test.database.postgres.d.ts +1 -0
  569. package/dist/test/test.database.postgres.js +412 -0
  570. package/dist/test/test.database.postgres.js.map +1 -0
  571. package/dist/test/test.email.brevo.d.ts +1 -0
  572. package/dist/test/test.email.brevo.js +326 -0
  573. package/dist/test/test.email.brevo.js.map +1 -0
  574. package/dist/test/test.email.mailgun.d.ts +1 -0
  575. package/dist/test/test.email.mailgun.js +352 -0
  576. package/dist/test/test.email.mailgun.js.map +1 -0
  577. package/dist/test/test.email.postmark.d.ts +1 -0
  578. package/dist/test/test.email.postmark.js +316 -0
  579. package/dist/test/test.email.postmark.js.map +1 -0
  580. package/dist/test/test.email.sendgrid.d.ts +1 -0
  581. package/dist/test/test.email.sendgrid.js +365 -0
  582. package/dist/test/test.email.sendgrid.js.map +1 -0
  583. package/dist/test/test.email.smtp.d.ts +1 -0
  584. package/dist/test/test.email.smtp.js +323 -0
  585. package/dist/test/test.email.smtp.js.map +1 -0
  586. package/dist/test/test.graph.arangodb.d.ts +1 -0
  587. package/dist/test/test.graph.arangodb.js +358 -0
  588. package/dist/test/test.graph.arangodb.js.map +1 -0
  589. package/dist/test/test.graph.memgraph.d.ts +1 -0
  590. package/dist/test/test.graph.memgraph.js +320 -0
  591. package/dist/test/test.graph.memgraph.js.map +1 -0
  592. package/dist/test/test.graph.neo4j.d.ts +1 -0
  593. package/dist/test/test.graph.neo4j.js +218 -0
  594. package/dist/test/test.graph.neo4j.js.map +1 -0
  595. package/dist/test/test.graph.neptune.d.ts +1 -0
  596. package/dist/test/test.graph.neptune.js +331 -0
  597. package/dist/test/test.graph.neptune.js.map +1 -0
  598. package/dist/test/test.health.js +1 -0
  599. package/dist/test/test.health.js.map +1 -0
  600. package/dist/test/test.import.d.ts +0 -1
  601. package/dist/test/test.import.js +0 -1459
  602. package/dist/test/test.import.js.map +1 -1
  603. package/dist/test/test.import.openapi.d.ts +0 -1
  604. package/dist/test/test.import.openapi.js +0 -75
  605. package/dist/test/test.import.openapi.js.map +1 -1
  606. package/dist/test/test.imports.js +14 -55
  607. package/dist/test/test.imports.js.map +1 -1
  608. package/dist/test/test.logs.d.ts +0 -1
  609. package/dist/test/test.logs.js +0 -17
  610. package/dist/test/test.logs.js.map +1 -1
  611. package/dist/test/test.notifications.d.ts +1 -0
  612. package/dist/test/test.notifications.js +198 -0
  613. package/dist/test/test.notifications.js.map +1 -0
  614. package/dist/test/test.notifiers.js +1 -0
  615. package/dist/test/test.notifiers.js.map +1 -0
  616. package/dist/test/test.processor.d.ts +0 -1
  617. package/dist/test/test.processor.js +0 -122
  618. package/dist/test/test.processor.js.map +1 -1
  619. package/dist/test/test.productBuilder.d.ts +0 -1
  620. package/dist/test/test.productBuilder.js +0 -660
  621. package/dist/test/test.productBuilder.js.map +1 -1
  622. package/dist/test/test.products.js +1 -0
  623. package/dist/test/test.products.js.map +1 -0
  624. package/dist/test/test.push.expo.d.ts +1 -0
  625. package/dist/test/test.push.expo.js +442 -0
  626. package/dist/test/test.push.expo.js.map +1 -0
  627. package/dist/test/test.push.firebase.d.ts +1 -0
  628. package/dist/test/test.push.firebase.js +409 -0
  629. package/dist/test/test.push.firebase.js.map +1 -0
  630. package/dist/test/test.session.d.ts +1 -0
  631. package/dist/test/test.session.js +299 -0
  632. package/dist/test/test.session.js.map +1 -0
  633. package/dist/test/test.sms.nexmo.d.ts +1 -0
  634. package/dist/test/test.sms.nexmo.js +278 -0
  635. package/dist/test/test.sms.nexmo.js.map +1 -0
  636. package/dist/test/test.sms.twilio.d.ts +1 -0
  637. package/dist/test/test.sms.twilio.js +275 -0
  638. package/dist/test/test.sms.twilio.js.map +1 -0
  639. package/dist/test/test.storage.d.ts +1 -0
  640. package/dist/test/test.storage.js +202 -0
  641. package/dist/test/test.storage.js.map +1 -0
  642. package/dist/test/test.triggers.d.ts +1 -0
  643. package/dist/test/test.triggers.js +314 -0
  644. package/dist/test/test.triggers.js.map +1 -0
  645. package/dist/test/test.vector.pinecone.d.ts +1 -0
  646. package/dist/test/test.vector.pinecone.js +238 -0
  647. package/dist/test/test.vector.pinecone.js.map +1 -0
  648. package/dist/test/test.vector.qdrant.d.ts +1 -0
  649. package/dist/test/test.vector.qdrant.js +307 -0
  650. package/dist/test/test.vector.qdrant.js.map +1 -0
  651. package/dist/test/test.vector.weaviate.d.ts +1 -0
  652. package/dist/test/test.vector.weaviate.js +325 -0
  653. package/dist/test/test.vector.weaviate.js.map +1 -0
  654. package/dist/types/appBuilder.types.d.ts +10 -13
  655. package/dist/types/enums.d.ts +11 -1
  656. package/dist/types/enums.js +10 -0
  657. package/dist/types/enums.js.map +1 -1
  658. package/dist/types/index.types.d.ts +6 -4
  659. package/dist/types/index.types.js +0 -1
  660. package/dist/types/index.types.js.map +1 -1
  661. package/dist/types/pricing.types.d.ts +4 -0
  662. package/dist/types/pricing.types.js +3 -0
  663. package/dist/types/pricing.types.js.map +1 -0
  664. package/dist/types/processor.types.d.ts +245 -20
  665. package/dist/types/processor.types.js +9 -1
  666. package/dist/types/processor.types.js.map +1 -1
  667. package/dist/types/productsBuilder.types.d.ts +906 -24
  668. package/dist/types/productsBuilder.types.js +173 -2
  669. package/dist/types/productsBuilder.types.js.map +1 -1
  670. package/dist/types/request-tracker.interface.js +1 -0
  671. package/dist/types/request-tracker.interface.js.map +1 -0
  672. package/dist/types/requests.types.d.ts +2 -0
  673. package/dist/utils/constants.d.ts +1 -0
  674. package/dist/utils/constants.js +5 -0
  675. package/dist/utils/constants.js.map +1 -0
  676. package/dist/utils/index.d.ts +0 -2
  677. package/dist/utils/index.js +24 -52
  678. package/dist/utils/index.js.map +1 -1
  679. package/dist/vector/adapters/base.adapter.d.ts +152 -0
  680. package/dist/vector/adapters/base.adapter.js +137 -0
  681. package/dist/vector/adapters/base.adapter.js.map +1 -0
  682. package/dist/vector/adapters/index.d.ts +10 -0
  683. package/dist/vector/adapters/index.js +19 -0
  684. package/dist/vector/adapters/index.js.map +1 -0
  685. package/dist/vector/adapters/memory.adapter.d.ts +85 -0
  686. package/dist/vector/adapters/memory.adapter.js +505 -0
  687. package/dist/vector/adapters/memory.adapter.js.map +1 -0
  688. package/dist/vector/adapters/pinecone.adapter.d.ts +52 -0
  689. package/dist/vector/adapters/pinecone.adapter.js +400 -0
  690. package/dist/vector/adapters/pinecone.adapter.js.map +1 -0
  691. package/dist/vector/adapters/qdrant.adapter.d.ts +56 -0
  692. package/dist/vector/adapters/qdrant.adapter.js +392 -0
  693. package/dist/vector/adapters/qdrant.adapter.js.map +1 -0
  694. package/dist/vector/adapters/weaviate.adapter.d.ts +64 -0
  695. package/dist/vector/adapters/weaviate.adapter.js +478 -0
  696. package/dist/vector/adapters/weaviate.adapter.js.map +1 -0
  697. package/dist/vector/index.d.ts +47 -0
  698. package/dist/vector/index.js +72 -0
  699. package/dist/vector/index.js.map +1 -0
  700. package/dist/vector/types/connection.interface.d.ts +151 -0
  701. package/dist/vector/types/connection.interface.js +8 -0
  702. package/dist/vector/types/connection.interface.js.map +1 -0
  703. package/dist/vector/types/embedding.interface.d.ts +144 -0
  704. package/dist/vector/types/embedding.interface.js +8 -0
  705. package/dist/vector/types/embedding.interface.js.map +1 -0
  706. package/dist/vector/types/enums.d.ts +104 -0
  707. package/dist/vector/types/enums.js +113 -0
  708. package/dist/vector/types/enums.js.map +1 -0
  709. package/dist/vector/types/index.d.ts +9 -0
  710. package/dist/vector/types/index.js +16 -0
  711. package/dist/vector/types/index.js.map +1 -0
  712. package/dist/vector/types/vector.interface.d.ts +315 -0
  713. package/dist/vector/types/vector.interface.js +8 -0
  714. package/dist/vector/types/vector.interface.js.map +1 -0
  715. package/dist/vector/utils/index.d.ts +6 -0
  716. package/dist/vector/utils/index.js +11 -0
  717. package/dist/vector/utils/index.js.map +1 -0
  718. package/dist/vector/utils/vector-error.d.ts +69 -0
  719. package/dist/vector/utils/vector-error.js +116 -0
  720. package/dist/vector/utils/vector-error.js.map +1 -0
  721. package/dist/vector/vector-database.service.d.ts +408 -0
  722. package/dist/vector/vector-database.service.js +545 -0
  723. package/dist/vector/vector-database.service.js.map +1 -0
  724. package/dist/vector/vector.service.d.ts +245 -0
  725. package/dist/vector/vector.service.js +384 -0
  726. package/dist/vector/vector.service.js.map +1 -0
  727. package/dist/workflows/index.d.ts +30 -0
  728. package/dist/workflows/index.js +64 -0
  729. package/dist/workflows/index.js.map +1 -0
  730. package/dist/workflows/types/index.d.ts +6 -0
  731. package/dist/workflows/types/index.js +23 -0
  732. package/dist/workflows/types/index.js.map +1 -0
  733. package/dist/workflows/types/workflows.types.d.ts +1035 -0
  734. package/dist/workflows/types/workflows.types.js +13 -0
  735. package/dist/workflows/types/workflows.types.js.map +1 -0
  736. package/dist/workflows/workflow-builder.d.ts +70 -0
  737. package/dist/workflows/workflow-builder.js +338 -0
  738. package/dist/workflows/workflow-builder.js.map +1 -0
  739. package/dist/workflows/workflow-executor.d.ts +208 -0
  740. package/dist/workflows/workflow-executor.js +1194 -0
  741. package/dist/workflows/workflow-executor.js.map +1 -0
  742. package/dist/workflows/workflows.service.d.ts +404 -0
  743. package/dist/workflows/workflows.service.js +1620 -0
  744. package/dist/workflows/workflows.service.js.map +1 -0
  745. package/package.json +54 -11
  746. package/dist/actions/actions.repo.js +0 -13
  747. package/dist/actions/actions.repo.js.map +0 -1
  748. package/dist/actions/actions.service.js +0 -24
  749. package/dist/actions/actions.service.js.map +0 -1
  750. package/dist/actions/utils/actions.util.read.js +0 -427
  751. package/dist/actions/utils/actions.util.read.js.map +0 -1
  752. package/dist/api/services/integrationsApi.service.d.ts +0 -18
  753. package/dist/api/services/integrationsApi.service.js +0 -80
  754. package/dist/api/services/integrationsApi.service.js.map +0 -1
  755. package/dist/appBuilder/services/app.service.d.ts +0 -111
  756. package/dist/appBuilder/services/app.service.js +0 -737
  757. package/dist/appBuilder/services/app.service.js.map +0 -1
  758. package/dist/appBuilder/services/appBuilder.service.d.ts +0 -111
  759. package/dist/appBuilder/services/appBuilder.service.js +0 -662
  760. package/dist/appBuilder/services/appBuilder.service.js.map +0 -1
  761. package/dist/appBuilder/utils/objects.utils.d.ts +0 -3
  762. package/dist/appBuilder/utils/objects.utils.js +0 -9
  763. package/dist/appBuilder/utils/objects.utils.js.map +0 -1
  764. package/dist/appBuilder/utils/string.utils.d.ts +0 -2
  765. package/dist/appBuilder/utils/string.utils.js +0 -57
  766. package/dist/appBuilder/utils/string.utils.js.map +0 -1
  767. package/dist/appBuilder/validators/index.d.ts +0 -19
  768. package/dist/appBuilder/validators/index.js +0 -40
  769. package/dist/appBuilder/validators/index.js.map +0 -1
  770. package/dist/appBuilder/validators/joi-validators/create.app.validator.js +0 -10
  771. package/dist/appBuilder/validators/joi-validators/create.app.validator.js.map +0 -1
  772. package/dist/appBuilder/validators/joi-validators/create.appAction.validator.d.ts +0 -4
  773. package/dist/appBuilder/validators/joi-validators/create.appAction.validator.js +0 -20
  774. package/dist/appBuilder/validators/joi-validators/create.appAction.validator.js.map +0 -1
  775. package/dist/appBuilder/validators/joi-validators/create.appActionResponse.validator.d.ts +0 -7
  776. package/dist/appBuilder/validators/joi-validators/create.appActionResponse.validator.js +0 -44
  777. package/dist/appBuilder/validators/joi-validators/create.appActionResponse.validator.js.map +0 -1
  778. package/dist/appBuilder/validators/joi-validators/create.appAuth.validator.d.ts +0 -3
  779. package/dist/appBuilder/validators/joi-validators/create.appAuth.validator.js +0 -31
  780. package/dist/appBuilder/validators/joi-validators/create.appAuth.validator.js.map +0 -1
  781. package/dist/appBuilder/validators/joi-validators/create.appBody.validators.d.ts +0 -4
  782. package/dist/appBuilder/validators/joi-validators/create.appBody.validators.js +0 -11
  783. package/dist/appBuilder/validators/joi-validators/create.appBody.validators.js.map +0 -1
  784. package/dist/appBuilder/validators/joi-validators/create.appConstants.validator.d.ts +0 -4
  785. package/dist/appBuilder/validators/joi-validators/create.appConstants.validator.js +0 -12
  786. package/dist/appBuilder/validators/joi-validators/create.appConstants.validator.js.map +0 -1
  787. package/dist/appBuilder/validators/joi-validators/create.appEnv.validator.d.ts +0 -4
  788. package/dist/appBuilder/validators/joi-validators/create.appEnv.validator.js +0 -17
  789. package/dist/appBuilder/validators/joi-validators/create.appEnv.validator.js.map +0 -1
  790. package/dist/appBuilder/validators/joi-validators/create.appEvent.validator.d.ts +0 -5
  791. package/dist/appBuilder/validators/joi-validators/create.appEvent.validator.js +0 -30
  792. package/dist/appBuilder/validators/joi-validators/create.appEvent.validator.js.map +0 -1
  793. package/dist/appBuilder/validators/joi-validators/create.appVariable.validator.d.ts +0 -4
  794. package/dist/appBuilder/validators/joi-validators/create.appVariable.validator.js +0 -14
  795. package/dist/appBuilder/validators/joi-validators/create.appVariable.validator.js.map +0 -1
  796. package/dist/appBuilder/validators/joi-validators/sample.validator.d.ts +0 -5
  797. package/dist/appBuilder/validators/joi-validators/sample.validator.js +0 -26
  798. package/dist/appBuilder/validators/joi-validators/sample.validator.js.map +0 -1
  799. package/dist/appBuilder/validators/joi-validators/update.app.validator.d.ts +0 -4
  800. package/dist/appBuilder/validators/joi-validators/update.app.validator.js +0 -34
  801. package/dist/appBuilder/validators/joi-validators/update.app.validator.js.map +0 -1
  802. package/dist/appBuilder/validators/joi-validators/update.appAction.validator.d.ts +0 -4
  803. package/dist/appBuilder/validators/joi-validators/update.appAction.validator.js +0 -23
  804. package/dist/appBuilder/validators/joi-validators/update.appAction.validator.js.map +0 -1
  805. package/dist/appBuilder/validators/joi-validators/update.appActionResponse.validator.d.ts +0 -3
  806. package/dist/appBuilder/validators/joi-validators/update.appActionResponse.validator.js +0 -21
  807. package/dist/appBuilder/validators/joi-validators/update.appActionResponse.validator.js.map +0 -1
  808. package/dist/appBuilder/validators/joi-validators/update.appAuth.validator.d.ts +0 -4
  809. package/dist/appBuilder/validators/joi-validators/update.appAuth.validator.js +0 -19
  810. package/dist/appBuilder/validators/joi-validators/update.appAuth.validator.js.map +0 -1
  811. package/dist/appBuilder/validators/joi-validators/update.appConstants.validator.d.ts +0 -4
  812. package/dist/appBuilder/validators/joi-validators/update.appConstants.validator.js +0 -12
  813. package/dist/appBuilder/validators/joi-validators/update.appConstants.validator.js.map +0 -1
  814. package/dist/appBuilder/validators/joi-validators/update.appEnv.validator.d.ts +0 -4
  815. package/dist/appBuilder/validators/joi-validators/update.appEnv.validator.js +0 -17
  816. package/dist/appBuilder/validators/joi-validators/update.appEnv.validator.js.map +0 -1
  817. package/dist/appBuilder/validators/joi-validators/update.appEvent.validator.d.ts +0 -4
  818. package/dist/appBuilder/validators/joi-validators/update.appEvent.validator.js +0 -16
  819. package/dist/appBuilder/validators/joi-validators/update.appEvent.validator.js.map +0 -1
  820. package/dist/appBuilder/validators/joi-validators/update.appVariables.validator.d.ts +0 -4
  821. package/dist/appBuilder/validators/joi-validators/update.appVariables.validator.js +0 -14
  822. package/dist/appBuilder/validators/joi-validators/update.appVariables.validator.js.map +0 -1
  823. package/dist/appBuilder/validators/joi-validators/update.validation.entityData.validator.js +0 -27
  824. package/dist/appBuilder/validators/joi-validators/update.validation.entityData.validator.js.map +0 -1
  825. package/dist/apps/validators/joi-validators/create.appEvent.validator.d.ts +0 -5
  826. package/dist/apps/validators/joi-validators/create.appEvent.validator.js +0 -30
  827. package/dist/apps/validators/joi-validators/create.appEvent.validator.js.map +0 -1
  828. package/dist/apps/validators/joi-validators/update.appEvent.validator.d.ts +0 -4
  829. package/dist/apps/validators/joi-validators/update.appEvent.validator.js +0 -16
  830. package/dist/apps/validators/joi-validators/update.appEvent.validator.js.map +0 -1
  831. package/dist/clients/integrations.client.d.ts +0 -2
  832. package/dist/clients/integrations.client.js +0 -26
  833. package/dist/clients/integrations.client.js.map +0 -1
  834. package/dist/integrationsBuilder/services/integration.service.d.ts +0 -138
  835. package/dist/integrationsBuilder/services/integration.service.js +0 -1148
  836. package/dist/integrationsBuilder/services/integration.service.js.map +0 -1
  837. package/dist/integrationsBuilder/services/integrationBuilder.service.d.ts +0 -130
  838. package/dist/integrationsBuilder/services/integrationBuilder.service.js +0 -1017
  839. package/dist/integrationsBuilder/services/integrationBuilder.service.js.map +0 -1
  840. package/dist/integrationsBuilder/utils/objects.utils.d.ts +0 -2
  841. package/dist/integrationsBuilder/utils/objects.utils.js +0 -48
  842. package/dist/integrationsBuilder/utils/objects.utils.js.map +0 -1
  843. package/dist/integrationsBuilder/utils/string.utils.d.ts +0 -1
  844. package/dist/integrationsBuilder/utils/string.utils.js +0 -9
  845. package/dist/integrationsBuilder/utils/string.utils.js.map +0 -1
  846. package/dist/integrationsBuilder/validators/index.d.ts +0 -18
  847. package/dist/integrationsBuilder/validators/index.js +0 -38
  848. package/dist/integrationsBuilder/validators/index.js.map +0 -1
  849. package/dist/integrationsBuilder/validators/joi-validators/create.integration.validator.d.ts +0 -3
  850. package/dist/integrationsBuilder/validators/joi-validators/create.integration.validator.js +0 -10
  851. package/dist/integrationsBuilder/validators/joi-validators/create.integration.validator.js.map +0 -1
  852. package/dist/integrationsBuilder/validators/joi-validators/create.integrationApp.validator.d.ts +0 -4
  853. package/dist/integrationsBuilder/validators/joi-validators/create.integrationApp.validator.js +0 -26
  854. package/dist/integrationsBuilder/validators/joi-validators/create.integrationApp.validator.js.map +0 -1
  855. package/dist/integrationsBuilder/validators/joi-validators/create.integrationCache.validator.d.ts +0 -3
  856. package/dist/integrationsBuilder/validators/joi-validators/create.integrationCache.validator.js +0 -8
  857. package/dist/integrationsBuilder/validators/joi-validators/create.integrationCache.validator.js.map +0 -1
  858. package/dist/integrationsBuilder/validators/joi-validators/create.integrationDatabase.validator.d.ts +0 -3
  859. package/dist/integrationsBuilder/validators/joi-validators/create.integrationDatabase.validator.js +0 -8
  860. package/dist/integrationsBuilder/validators/joi-validators/create.integrationDatabase.validator.js.map +0 -1
  861. package/dist/integrationsBuilder/validators/joi-validators/create.integrationEnv.validator.d.ts +0 -3
  862. package/dist/integrationsBuilder/validators/joi-validators/create.integrationEnv.validator.js +0 -10
  863. package/dist/integrationsBuilder/validators/joi-validators/create.integrationEnv.validator.js.map +0 -1
  864. package/dist/integrationsBuilder/validators/joi-validators/create.integrationFeature.validator.d.ts +0 -3
  865. package/dist/integrationsBuilder/validators/joi-validators/create.integrationFeature.validator.js +0 -60
  866. package/dist/integrationsBuilder/validators/joi-validators/create.integrationFeature.validator.js.map +0 -1
  867. package/dist/integrationsBuilder/validators/joi-validators/create.integrationFunction.validator.d.ts +0 -3
  868. package/dist/integrationsBuilder/validators/joi-validators/create.integrationFunction.validator.js +0 -8
  869. package/dist/integrationsBuilder/validators/joi-validators/create.integrationFunction.validator.js.map +0 -1
  870. package/dist/integrationsBuilder/validators/joi-validators/create.integrationJob.validator.d.ts +0 -3
  871. package/dist/integrationsBuilder/validators/joi-validators/create.integrationJob.validator.js +0 -8
  872. package/dist/integrationsBuilder/validators/joi-validators/create.integrationJob.validator.js.map +0 -1
  873. package/dist/integrationsBuilder/validators/joi-validators/create.integrationNotification.validator.d.ts +0 -3
  874. package/dist/integrationsBuilder/validators/joi-validators/create.integrationNotification.validator.js +0 -8
  875. package/dist/integrationsBuilder/validators/joi-validators/create.integrationNotification.validator.js.map +0 -1
  876. package/dist/integrationsBuilder/validators/joi-validators/update.integrationApp.validator.d.ts +0 -3
  877. package/dist/integrationsBuilder/validators/joi-validators/update.integrationApp.validator.js +0 -9
  878. package/dist/integrationsBuilder/validators/joi-validators/update.integrationApp.validator.js.map +0 -1
  879. package/dist/integrationsBuilder/validators/joi-validators/update.integrationCache.validator.d.ts +0 -3
  880. package/dist/integrationsBuilder/validators/joi-validators/update.integrationCache.validator.js +0 -8
  881. package/dist/integrationsBuilder/validators/joi-validators/update.integrationCache.validator.js.map +0 -1
  882. package/dist/integrationsBuilder/validators/joi-validators/update.integrationDatabase.validator.d.ts +0 -3
  883. package/dist/integrationsBuilder/validators/joi-validators/update.integrationDatabase.validator.js +0 -8
  884. package/dist/integrationsBuilder/validators/joi-validators/update.integrationDatabase.validator.js.map +0 -1
  885. package/dist/integrationsBuilder/validators/joi-validators/update.integrationEnv.validator.d.ts +0 -3
  886. package/dist/integrationsBuilder/validators/joi-validators/update.integrationEnv.validator.js +0 -8
  887. package/dist/integrationsBuilder/validators/joi-validators/update.integrationEnv.validator.js.map +0 -1
  888. package/dist/integrationsBuilder/validators/joi-validators/update.integrationFeature.validator.d.ts +0 -3
  889. package/dist/integrationsBuilder/validators/joi-validators/update.integrationFeature.validator.js +0 -8
  890. package/dist/integrationsBuilder/validators/joi-validators/update.integrationFeature.validator.js.map +0 -1
  891. package/dist/integrationsBuilder/validators/joi-validators/update.integrationFunction.validator copy.d.ts +0 -3
  892. package/dist/integrationsBuilder/validators/joi-validators/update.integrationFunction.validator copy.js +0 -8
  893. package/dist/integrationsBuilder/validators/joi-validators/update.integrationFunction.validator copy.js.map +0 -1
  894. package/dist/integrationsBuilder/validators/joi-validators/update.integrationJob.validator.d.ts +0 -3
  895. package/dist/integrationsBuilder/validators/joi-validators/update.integrationJob.validator.js +0 -8
  896. package/dist/integrationsBuilder/validators/joi-validators/update.integrationJob.validator.js.map +0 -1
  897. package/dist/integrationsBuilder/validators/joi-validators/update.integrationNotification.validator.d.ts +0 -3
  898. package/dist/integrationsBuilder/validators/joi-validators/update.integrationNotification.validator.js +0 -8
  899. package/dist/integrationsBuilder/validators/joi-validators/update.integrationNotification.validator.js.map +0 -1
  900. package/dist/postman.d.ts +0 -1
  901. package/dist/postman.js +0 -21674
  902. package/dist/postman.js.map +0 -1
  903. package/dist/processor/utils/mongo.util.js +0 -152
  904. package/dist/processor/utils/mongo.util.js.map +0 -1
  905. package/dist/processor/utils/postgres.util.d.ts +0 -14
  906. package/dist/processor/utils/postgres.util.js +0 -83
  907. package/dist/processor/utils/postgres.util.js.map +0 -1
  908. package/dist/products/validators/joi-validators/create.product.validator.d.ts +0 -3
  909. package/dist/products/validators/joi-validators/create.product.validator.js +0 -10
  910. package/dist/products/validators/joi-validators/create.product.validator.js.map +0 -1
  911. package/dist/test.appBuilder.js +0 -14
  912. package/dist/test.appBuilder.js.map +0 -1
  913. package/dist/test.import.js +0 -24
  914. package/dist/test.import.js.map +0 -1
  915. package/dist/test.imports.js +0 -28
  916. package/dist/test.imports.js.map +0 -1
  917. package/dist/test.integrationBuilder.js +0 -276
  918. package/dist/test.integrationBuilder.js.map +0 -1
  919. package/dist/test.processor.js +0 -23
  920. package/dist/test.processor.js.map +0 -1
  921. package/dist/test.utils.js +0 -25
  922. package/dist/test.utils.js.map +0 -1
  923. package/dist/types/integrationsBuilder.types.d.ts +0 -276
  924. package/dist/types/integrationsBuilder.types.js +0 -51
  925. package/dist/types/integrationsBuilder.types.js.map +0 -1
  926. /package/dist/{actions/actions.repo.d.ts → pricing/pricing.repo.d.ts} +0 -0
  927. /package/dist/{appBuilder/validators/joi-validators/create.app.validator.d.ts → products/validators/joi-validators/create.productGraph.validator.d.ts} +0 -0
  928. /package/dist/{appBuilder/validators/joi-validators/update.validation.entityData.validator.d.ts → products/validators/joi-validators/update.productGraph.validator.d.ts} +0 -0
  929. /package/dist/{test.appBuilder.d.ts → test/test.broker.kafka.d.ts} +0 -0
  930. /package/dist/{test.imports.d.ts → test/test.broker.nats.d.ts} +0 -0
  931. /package/dist/{test.integrationBuilder.d.ts → test/test.broker.pubsub.d.ts} +0 -0
  932. /package/dist/{test.processor.d.ts → test/test.broker.rabbitmq.d.ts} +0 -0
  933. /package/dist/{test.utils.d.ts → test/test.broker.redis.d.ts} +0 -0
  934. /package/dist/{actions/actions.service.d.ts → test/test.health.d.ts} +0 -0
  935. /package/dist/{actions/utils/actions.util.read.d.ts → test/test.notifiers.d.ts} +0 -0
  936. /package/dist/{processor/utils/mongo.util.d.ts → test/test.products.d.ts} +0 -0
  937. /package/dist/{test.import.d.ts → types/request-tracker.interface.d.ts} +0 -0
@@ -0,0 +1,943 @@
1
+ "use strict";
2
+ /**
3
+ * Healthcheck Service
4
+ *
5
+ * Code-first API for defining and managing healthchecks.
6
+ */
7
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
+ if (k2 === undefined) k2 = k;
9
+ var desc = Object.getOwnPropertyDescriptor(m, k);
10
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11
+ desc = { enumerable: true, get: function() { return m[k]; } };
12
+ }
13
+ Object.defineProperty(o, k2, desc);
14
+ }) : (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ o[k2] = m[k];
17
+ }));
18
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
19
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
20
+ }) : function(o, v) {
21
+ o["default"] = v;
22
+ });
23
+ var __importStar = (this && this.__importStar) || (function () {
24
+ var ownKeys = function(o) {
25
+ ownKeys = Object.getOwnPropertyNames || function (o) {
26
+ var ar = [];
27
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
28
+ return ar;
29
+ };
30
+ return ownKeys(o);
31
+ };
32
+ return function (mod) {
33
+ if (mod && mod.__esModule) return mod;
34
+ var result = {};
35
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
36
+ __setModuleDefault(result, mod);
37
+ return result;
38
+ };
39
+ })();
40
+ var __importDefault = (this && this.__importDefault) || function (mod) {
41
+ return (mod && mod.__esModule) ? mod : { "default": mod };
42
+ };
43
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ exports.HealthcheckService = exports.HealthcheckError = void 0;
45
+ const types_1 = require("./types");
46
+ const resilienceApi_service_1 = require("../api/services/resilienceApi.service");
47
+ const processor_service_1 = __importDefault(require("../processor/services/processor.service"));
48
+ /**
49
+ * Error class for healthcheck operations
50
+ */
51
+ class HealthcheckError extends Error {
52
+ constructor(message, code, details) {
53
+ super(message);
54
+ this.code = code;
55
+ this.details = details;
56
+ this.name = 'HealthcheckError';
57
+ }
58
+ }
59
+ exports.HealthcheckError = HealthcheckError;
60
+ /**
61
+ * Recording context that captures healthcheck configuration during handler execution
62
+ */
63
+ class RecordingHealthcheckContext {
64
+ constructor() {
65
+ this._probe = null;
66
+ this._interval = 60000;
67
+ this._retries = 2;
68
+ this._envs = [];
69
+ this._onFailure = null;
70
+ }
71
+ probe() {
72
+ return new RecordingProbeBuilder(this);
73
+ }
74
+ setProbe(probe) {
75
+ this._probe = probe;
76
+ }
77
+ interval(ms) {
78
+ this._interval = ms;
79
+ }
80
+ retries(count) {
81
+ this._retries = count;
82
+ }
83
+ env(slug, options) {
84
+ const envConfig = Object.assign({ slug }, options);
85
+ this._envs.push(envConfig);
86
+ }
87
+ onFailure() {
88
+ if (!this._onFailure) {
89
+ this._onFailure = {
90
+ notifications: [],
91
+ webhooks: [],
92
+ emit: [],
93
+ };
94
+ }
95
+ return new RecordingFailureNotificationBuilder(this._onFailure);
96
+ }
97
+ auth(field) {
98
+ return `$Auth{${field}}`;
99
+ }
100
+ token(key) {
101
+ return `$Secret{${key}}`;
102
+ }
103
+ variable(app, key) {
104
+ return `$Variable{${app}}{${key}}`;
105
+ }
106
+ constant(app, key) {
107
+ return `$Constant{${app}}{${key}}`;
108
+ }
109
+ /**
110
+ * Build the healthcheck schema from recorded configuration
111
+ */
112
+ build(tag, name, description) {
113
+ if (!this._probe) {
114
+ throw new HealthcheckError('Healthcheck probe not configured', 'PROBE_NOT_CONFIGURED');
115
+ }
116
+ if (this._envs.length === 0) {
117
+ throw new HealthcheckError('At least one environment must be configured', 'NO_ENVS_CONFIGURED');
118
+ }
119
+ return {
120
+ tag,
121
+ name,
122
+ description,
123
+ probe: this._probe,
124
+ interval: this._interval,
125
+ retries: this._retries,
126
+ onFailure: this._onFailure || undefined,
127
+ envs: this._envs,
128
+ };
129
+ }
130
+ }
131
+ /**
132
+ * Probe builder that records probe configuration
133
+ */
134
+ class RecordingProbeBuilder {
135
+ constructor(ctx) {
136
+ this.ctx = ctx;
137
+ }
138
+ app(tag) {
139
+ return new RecordingAppProbeBuilder(this.ctx, tag);
140
+ }
141
+ database(tag) {
142
+ return new RecordingDatabaseProbeBuilder(this.ctx, tag);
143
+ }
144
+ workflow(tag) {
145
+ return new RecordingWorkflowProbeBuilder(this.ctx, tag);
146
+ }
147
+ graph(tag) {
148
+ return new RecordingGraphProbeBuilder(this.ctx, tag);
149
+ }
150
+ messageBroker(tag) {
151
+ return new RecordingMessageBrokerProbeBuilder(this.ctx, tag);
152
+ }
153
+ storage(tag) {
154
+ return new RecordingStorageProbeBuilder(this.ctx, tag);
155
+ }
156
+ }
157
+ class RecordingAppProbeBuilder {
158
+ constructor(ctx, appTag) {
159
+ this.ctx = ctx;
160
+ this.appTag = appTag;
161
+ }
162
+ action(event) {
163
+ return new RecordingAppProbeActionBuilder(this.ctx, this.appTag, event);
164
+ }
165
+ }
166
+ class RecordingAppProbeActionBuilder {
167
+ constructor(ctx, appTag, event) {
168
+ this.ctx = ctx;
169
+ this.appTag = appTag;
170
+ this.event = event;
171
+ // Set probe immediately (input is optional)
172
+ this.ctx.setProbe({
173
+ type: types_1.ProbeType.APP,
174
+ app: this.appTag,
175
+ event: this.event,
176
+ });
177
+ }
178
+ input(data) {
179
+ this.ctx.setProbe({
180
+ type: types_1.ProbeType.APP,
181
+ app: this.appTag,
182
+ event: this.event,
183
+ input: data,
184
+ });
185
+ }
186
+ }
187
+ class RecordingDatabaseProbeBuilder {
188
+ constructor(ctx, dbTag) {
189
+ this.ctx = ctx;
190
+ this.dbTag = dbTag;
191
+ }
192
+ action(event) {
193
+ return new RecordingDatabaseProbeActionBuilder(this.ctx, this.dbTag, event);
194
+ }
195
+ }
196
+ class RecordingDatabaseProbeActionBuilder {
197
+ constructor(ctx, dbTag, event) {
198
+ this.ctx = ctx;
199
+ this.dbTag = dbTag;
200
+ this.event = event;
201
+ // Set probe immediately (input is optional)
202
+ this.ctx.setProbe({
203
+ type: types_1.ProbeType.DATABASE,
204
+ database: this.dbTag,
205
+ event: this.event,
206
+ });
207
+ }
208
+ input(data) {
209
+ this.ctx.setProbe({
210
+ type: types_1.ProbeType.DATABASE,
211
+ database: this.dbTag,
212
+ event: this.event,
213
+ input: data,
214
+ });
215
+ }
216
+ }
217
+ class RecordingWorkflowProbeBuilder {
218
+ constructor(ctx, workflowTag) {
219
+ this.ctx = ctx;
220
+ this.workflowTag = workflowTag;
221
+ }
222
+ input(data) {
223
+ this.ctx.setProbe({
224
+ type: types_1.ProbeType.WORKFLOW,
225
+ workflow: this.workflowTag,
226
+ input: data,
227
+ });
228
+ }
229
+ }
230
+ class RecordingGraphProbeBuilder {
231
+ constructor(ctx, graphTag) {
232
+ this.ctx = ctx;
233
+ this.graphTag = graphTag;
234
+ }
235
+ action(event) {
236
+ return new RecordingGraphProbeActionBuilder(this.ctx, this.graphTag, event);
237
+ }
238
+ }
239
+ class RecordingGraphProbeActionBuilder {
240
+ constructor(ctx, graphTag, event) {
241
+ this.ctx = ctx;
242
+ this.graphTag = graphTag;
243
+ this.event = event;
244
+ // Set probe immediately (input is optional)
245
+ this.ctx.setProbe({
246
+ type: types_1.ProbeType.GRAPH,
247
+ graph: this.graphTag,
248
+ event: this.event,
249
+ });
250
+ }
251
+ input(data) {
252
+ this.ctx.setProbe({
253
+ type: types_1.ProbeType.GRAPH,
254
+ graph: this.graphTag,
255
+ event: this.event,
256
+ input: data,
257
+ });
258
+ }
259
+ }
260
+ class RecordingMessageBrokerProbeBuilder {
261
+ constructor(ctx, brokerTag) {
262
+ this.ctx = ctx;
263
+ this.brokerTag = brokerTag;
264
+ }
265
+ action(event) {
266
+ return new RecordingMessageBrokerProbeActionBuilder(this.ctx, this.brokerTag, event);
267
+ }
268
+ }
269
+ class RecordingMessageBrokerProbeActionBuilder {
270
+ constructor(ctx, brokerTag, event) {
271
+ this.ctx = ctx;
272
+ this.brokerTag = brokerTag;
273
+ this.event = event;
274
+ // Set probe immediately (input is optional)
275
+ this.ctx.setProbe({
276
+ type: types_1.ProbeType.MESSAGE_BROKER,
277
+ messageBroker: this.brokerTag,
278
+ event: this.event,
279
+ });
280
+ }
281
+ input(data) {
282
+ this.ctx.setProbe({
283
+ type: types_1.ProbeType.MESSAGE_BROKER,
284
+ messageBroker: this.brokerTag,
285
+ event: this.event,
286
+ input: data,
287
+ });
288
+ }
289
+ }
290
+ class RecordingStorageProbeBuilder {
291
+ constructor(ctx, storageTag) {
292
+ this.ctx = ctx;
293
+ this.storageTag = storageTag;
294
+ }
295
+ action(event) {
296
+ return new RecordingStorageProbeActionBuilder(this.ctx, this.storageTag, event);
297
+ }
298
+ }
299
+ class RecordingStorageProbeActionBuilder {
300
+ constructor(ctx, storageTag, event) {
301
+ this.ctx = ctx;
302
+ this.storageTag = storageTag;
303
+ this.event = event;
304
+ // Set probe immediately (input is optional)
305
+ this.ctx.setProbe({
306
+ type: types_1.ProbeType.STORAGE,
307
+ storage: this.storageTag,
308
+ event: this.event,
309
+ });
310
+ }
311
+ input(data) {
312
+ this.ctx.setProbe({
313
+ type: types_1.ProbeType.STORAGE,
314
+ storage: this.storageTag,
315
+ event: this.event,
316
+ input: data,
317
+ });
318
+ }
319
+ }
320
+ /**
321
+ * Failure notification builder
322
+ */
323
+ class RecordingFailureNotificationBuilder {
324
+ constructor(onFailure) {
325
+ this.onFailure = onFailure;
326
+ }
327
+ notification(tag) {
328
+ return new RecordingNotificationMessageBuilder(this.onFailure, tag);
329
+ }
330
+ webhook(config) {
331
+ this.onFailure.webhooks = this.onFailure.webhooks || [];
332
+ this.onFailure.webhooks.push(config);
333
+ return this;
334
+ }
335
+ emit(config) {
336
+ this.onFailure.emit = this.onFailure.emit || [];
337
+ this.onFailure.emit.push(config);
338
+ return this;
339
+ }
340
+ }
341
+ class RecordingNotificationMessageBuilder {
342
+ constructor(onFailure, notificationTag) {
343
+ this.onFailure = onFailure;
344
+ this.notificationTag = notificationTag;
345
+ }
346
+ message(event) {
347
+ return new RecordingNotificationChannelBuilder(this.onFailure, this.notificationTag, event);
348
+ }
349
+ }
350
+ class RecordingNotificationChannelBuilder {
351
+ constructor(onFailure, notificationTag, message) {
352
+ this.parentOnFailure = onFailure;
353
+ this.currentNotification = {
354
+ notification: notificationTag,
355
+ message,
356
+ channels: {},
357
+ };
358
+ this.parentOnFailure.notifications = this.parentOnFailure.notifications || [];
359
+ this.parentOnFailure.notifications.push(this.currentNotification);
360
+ }
361
+ notification(tag) {
362
+ return new RecordingNotificationMessageBuilder(this.parentOnFailure, tag);
363
+ }
364
+ webhook(config) {
365
+ this.parentOnFailure.webhooks = this.parentOnFailure.webhooks || [];
366
+ this.parentOnFailure.webhooks.push(config);
367
+ return this;
368
+ }
369
+ emit(config) {
370
+ this.parentOnFailure.emit = this.parentOnFailure.emit || [];
371
+ this.parentOnFailure.emit.push(config);
372
+ return this;
373
+ }
374
+ push(config) {
375
+ this.currentNotification.channels.push = config || {};
376
+ return this;
377
+ }
378
+ email(config) {
379
+ this.currentNotification.channels.email = config;
380
+ return this;
381
+ }
382
+ sms(config) {
383
+ this.currentNotification.channels.sms = config;
384
+ return this;
385
+ }
386
+ callback(config) {
387
+ this.currentNotification.channels.callback = config || {};
388
+ return this;
389
+ }
390
+ }
391
+ /**
392
+ * Healthcheck Service
393
+ *
394
+ * Provides code-first API for defining, creating, and managing healthchecks.
395
+ */
396
+ class HealthcheckService {
397
+ constructor(config) {
398
+ this.config = config;
399
+ this._privateKey = config.private_key;
400
+ this.apiService = new resilienceApi_service_1.ResilienceApiService({
401
+ token: config.token,
402
+ env_type: config.env_type,
403
+ base_url: config.base_url,
404
+ });
405
+ }
406
+ /**
407
+ * Creates a ProcessorService instance for local execution
408
+ */
409
+ createProcessor() {
410
+ return new processor_service_1.default({
411
+ workspace_id: this.config.workspace_id,
412
+ public_key: this.config.public_key,
413
+ user_id: this.config.user_id,
414
+ token: this.config.token,
415
+ env_type: this.config.env_type,
416
+ redis_client: this.config.redis_client,
417
+ queues: this.config.queues,
418
+ private_key: this._privateKey,
419
+ });
420
+ }
421
+ /**
422
+ * Define a healthcheck using code-first API
423
+ *
424
+ * @example
425
+ * ```ts
426
+ * const healthcheck = await healthcheckService.define({
427
+ * product: 'my-product',
428
+ * tag: 'stripe-health',
429
+ * name: 'Stripe API Health',
430
+ * handler: async (ctx) => {
431
+ * ctx.probe().app('stripe-app').action('health');
432
+ * ctx.interval(30000);
433
+ * ctx.retries(2);
434
+ * ctx.env('prd');
435
+ * ctx.env('stg');
436
+ * },
437
+ * });
438
+ * ```
439
+ */
440
+ async define(options) {
441
+ const ctx = new RecordingHealthcheckContext();
442
+ // Execute the handler to record the configuration
443
+ await options.handler(ctx);
444
+ // Build the schema
445
+ const schema = ctx.build(options.tag, options.name, options.description);
446
+ const definedHealthcheck = {
447
+ tag: options.tag,
448
+ name: options.name,
449
+ description: options.description,
450
+ compile: () => schema,
451
+ };
452
+ // If product is specified, register immediately
453
+ if (options.product) {
454
+ await this.create(options.product, definedHealthcheck);
455
+ }
456
+ return definedHealthcheck;
457
+ }
458
+ /**
459
+ * Create a healthcheck from a defined healthcheck or schema
460
+ */
461
+ async create(product, healthcheck) {
462
+ const schema = 'compile' in healthcheck ? healthcheck.compile() : healthcheck;
463
+ return await this.apiService.createHealthcheck(product, schema);
464
+ }
465
+ /**
466
+ * Update an existing healthcheck
467
+ */
468
+ async update(product, tag, healthcheck) {
469
+ if ('handler' in healthcheck && healthcheck.handler) {
470
+ const ctx = new RecordingHealthcheckContext();
471
+ await healthcheck.handler(ctx);
472
+ const schema = ctx.build(tag, healthcheck.name, healthcheck.description);
473
+ return await this.apiService.updateHealthcheck(product, tag, schema);
474
+ }
475
+ return await this.apiService.updateHealthcheck(product, tag, healthcheck);
476
+ }
477
+ /**
478
+ * Fetch a healthcheck by tag
479
+ */
480
+ async fetch(product, tag) {
481
+ return await this.apiService.getHealthcheck(product, tag);
482
+ }
483
+ /**
484
+ * Fetch all healthchecks for a product
485
+ */
486
+ async fetchAll(product) {
487
+ return await this.apiService.listHealthchecks(product);
488
+ }
489
+ /**
490
+ * Delete a healthcheck
491
+ */
492
+ async delete(product, tag) {
493
+ await this.apiService.deleteHealthcheck(product, tag);
494
+ }
495
+ /**
496
+ * Get the current status of a healthcheck
497
+ */
498
+ async getStatus(options) {
499
+ return await this.apiService.getHealthcheckStatus(options.product, options.tag, options.env);
500
+ }
501
+ /**
502
+ * Alias for getStatus - check the health of a service
503
+ *
504
+ * @example
505
+ * ```ts
506
+ * const status = await resilience.healthcheck.check({
507
+ * product: 'my-product',
508
+ * env: 'prd',
509
+ * tag: 'stripe-health',
510
+ * });
511
+ * console.log(status.status); // 'healthy' | 'unhealthy' | 'degraded'
512
+ * ```
513
+ */
514
+ async check(options) {
515
+ return await this.getStatus(options);
516
+ }
517
+ /**
518
+ * Manually trigger a healthcheck
519
+ *
520
+ * Executes the healthcheck locally using the ProcessorService and caches
521
+ * the result in Redis for status tracking. On failure, triggers configured
522
+ * notifications, webhooks, and event emissions.
523
+ *
524
+ * Supports the following probe types:
525
+ * - APP: Executes an app action (supports OAuth auto-refresh)
526
+ * - DATABASE: Tests database connection
527
+ * - GRAPH: Tests graph database connection
528
+ * - MESSAGE_BROKER: Tests message broker connection
529
+ * - STORAGE: Tests object storage connection
530
+ * - WORKFLOW: Executes a workflow and checks completion status
531
+ */
532
+ async run(options) {
533
+ var _a, _b, _c, _d, _e;
534
+ // Fetch the healthcheck configuration
535
+ const healthcheck = await this.fetch(options.product, options.tag);
536
+ // Find the environment configuration
537
+ const envConfig = (_a = healthcheck.envs) === null || _a === void 0 ? void 0 : _a.find((e) => e.slug === options.env);
538
+ // Execute via processor
539
+ const processor = this.createProcessor();
540
+ const startTime = Date.now();
541
+ // Determine probe type and execute accordingly
542
+ let result;
543
+ const probeType = ((_b = healthcheck.probe) === null || _b === void 0 ? void 0 : _b.type) || types_1.ProbeType.APP;
544
+ if (probeType === types_1.ProbeType.DATABASE) {
545
+ // Database healthcheck - test connection
546
+ result = await this.executeDatabaseProbe(healthcheck, options.product, options.env, startTime);
547
+ }
548
+ else if (probeType === types_1.ProbeType.GRAPH) {
549
+ // Graph healthcheck - test connection
550
+ result = await this.executeGraphProbe(healthcheck, options.product, options.env, startTime);
551
+ }
552
+ else if (probeType === types_1.ProbeType.MESSAGE_BROKER) {
553
+ // Message broker healthcheck - test connection
554
+ result = await this.executeMessageBrokerProbe(healthcheck, options.product, options.env, startTime);
555
+ }
556
+ else if (probeType === types_1.ProbeType.APP) {
557
+ // App healthcheck - execute app action
558
+ const actionData = {
559
+ env: options.env,
560
+ product: options.product,
561
+ app: ((_c = healthcheck.probe) === null || _c === void 0 ? void 0 : _c.app) || healthcheck.app,
562
+ input: (envConfig === null || envConfig === void 0 ? void 0 : envConfig.input) || ((_d = healthcheck.probe) === null || _d === void 0 ? void 0 : _d.input) || {},
563
+ action: ((_e = healthcheck.probe) === null || _e === void 0 ? void 0 : _e.event) || healthcheck.event,
564
+ retries: healthcheck.retries || 0,
565
+ };
566
+ result = await processor.processAction(actionData);
567
+ result = {
568
+ status: result ? 'available' : 'unavailable',
569
+ latency: Date.now() - startTime,
570
+ };
571
+ }
572
+ else if (probeType === types_1.ProbeType.WORKFLOW) {
573
+ // Workflow healthcheck - execute workflow
574
+ result = await this.executeWorkflowProbe(healthcheck, options.product, options.env, startTime);
575
+ }
576
+ else if (probeType === types_1.ProbeType.STORAGE) {
577
+ // Storage healthcheck - test connection
578
+ result = await this.executeStorageProbe(healthcheck, options.product, options.env, startTime);
579
+ }
580
+ // Build cache data with healthcheck tag for Redis key
581
+ const cacheData = {
582
+ healthcheck: options.tag,
583
+ env: options.env,
584
+ product: options.product,
585
+ };
586
+ // Determine if healthcheck failed
587
+ const isFailure = !result || result.status === 'unavailable' || result.status === 'error' || result.status === 'unknown';
588
+ // Write result to Redis cache
589
+ const healthcheckResult = Object.assign({ status: (result === null || result === void 0 ? void 0 : result.status) || 'unknown', checkedAt: new Date().toISOString(), latency: (result === null || result === void 0 ? void 0 : result.latency) || 0 }, result);
590
+ await processor.writeHealthcheckResultToCache(cacheData, healthcheckResult);
591
+ // Handle failure notifications if configured
592
+ if (isFailure && healthcheck.onFailure) {
593
+ await this.handleFailureNotifications(processor, healthcheck.onFailure, options, healthcheckResult);
594
+ }
595
+ return healthcheckResult;
596
+ }
597
+ /**
598
+ * Handles failure notifications for a healthcheck
599
+ */
600
+ async handleFailureNotifications(processor, onFailure, options, result) {
601
+ const failureContext = {
602
+ healthcheck: options.tag,
603
+ product: options.product,
604
+ env: options.env,
605
+ status: result.status,
606
+ timestamp: result.checkedAt,
607
+ };
608
+ // Process notifications via processor service
609
+ if (onFailure.notifications && onFailure.notifications.length > 0) {
610
+ for (const notification of onFailure.notifications) {
611
+ try {
612
+ // Build notification input with channel-specific recipients
613
+ const notificationInput = Object.assign({}, failureContext);
614
+ // Add channel-specific data
615
+ if (notification.channels.email) {
616
+ notificationInput.email = notification.channels.email;
617
+ }
618
+ if (notification.channels.sms) {
619
+ notificationInput.sms = notification.channels.sms;
620
+ }
621
+ if (notification.channels.push) {
622
+ notificationInput.push = notification.channels.push;
623
+ }
624
+ if (notification.channels.callback) {
625
+ notificationInput.callback = notification.channels.callback;
626
+ }
627
+ await processor.processNotification({
628
+ env: options.env,
629
+ product: options.product,
630
+ event: `${notification.notification}:${notification.message}`,
631
+ input: notificationInput,
632
+ retries: 2,
633
+ });
634
+ }
635
+ catch (error) {
636
+ // Log but don't throw - notification failures shouldn't break the healthcheck
637
+ console.error(`Failed to send notification for healthcheck ${options.tag}:`, error);
638
+ }
639
+ }
640
+ }
641
+ // Process webhooks
642
+ if (onFailure.webhooks && onFailure.webhooks.length > 0) {
643
+ for (const webhook of onFailure.webhooks) {
644
+ try {
645
+ const axios = (await Promise.resolve().then(() => __importStar(require('axios')))).default;
646
+ await axios({
647
+ method: webhook.method || 'POST',
648
+ url: webhook.url,
649
+ headers: webhook.headers,
650
+ data: Object.assign(Object.assign({}, failureContext), webhook.body),
651
+ timeout: 10000,
652
+ });
653
+ }
654
+ catch (error) {
655
+ // Log but don't throw - webhook failures shouldn't break the healthcheck
656
+ console.error(`Failed to call webhook for healthcheck ${options.tag}:`, error);
657
+ }
658
+ }
659
+ }
660
+ // Process event emissions (emit to message broker if configured)
661
+ if (onFailure.emit && onFailure.emit.length > 0) {
662
+ for (const emission of onFailure.emit) {
663
+ try {
664
+ // Emit events via message broker if available
665
+ await processor.processMessageBrokerPublish({
666
+ env: options.env,
667
+ product: options.product,
668
+ event: emission.event,
669
+ input: {
670
+ message: Object.assign(Object.assign({}, failureContext), emission.data),
671
+ },
672
+ });
673
+ }
674
+ catch (error) {
675
+ // Log but don't throw - emit failures shouldn't break the healthcheck
676
+ console.error(`Failed to emit event for healthcheck ${options.tag}:`, error);
677
+ }
678
+ }
679
+ }
680
+ }
681
+ /**
682
+ * Execute a database healthcheck probe by testing the connection
683
+ */
684
+ async executeDatabaseProbe(healthcheck, product, env, startTime) {
685
+ var _a;
686
+ const databaseTag = (_a = healthcheck.probe) === null || _a === void 0 ? void 0 : _a.database;
687
+ if (!databaseTag) {
688
+ throw new HealthcheckError('Database healthcheck requires a database tag in the probe configuration', 'MISSING_DATABASE_TAG');
689
+ }
690
+ try {
691
+ // Dynamically import DatabaseService to avoid circular dependencies
692
+ const { DatabaseService } = await Promise.resolve().then(() => __importStar(require('../database/databases.service')));
693
+ const dbService = new DatabaseService({
694
+ workspace_id: this.config.workspace_id,
695
+ public_key: this.config.public_key,
696
+ user_id: this.config.user_id,
697
+ token: this.config.token,
698
+ env_type: this.config.env_type,
699
+ private_key: this._privateKey,
700
+ access_key: this.config.access_key,
701
+ });
702
+ // Test the database connection
703
+ const connectionResult = await dbService.testConnection({
704
+ product,
705
+ env,
706
+ database: databaseTag,
707
+ });
708
+ const latency = Date.now() - startTime;
709
+ if (connectionResult.connected) {
710
+ return {
711
+ status: 'available',
712
+ latency,
713
+ };
714
+ }
715
+ else {
716
+ return {
717
+ status: 'unavailable',
718
+ latency,
719
+ };
720
+ }
721
+ }
722
+ catch (error) {
723
+ const latency = Date.now() - startTime;
724
+ return {
725
+ status: 'unavailable',
726
+ latency,
727
+ };
728
+ }
729
+ }
730
+ /**
731
+ * Execute a graph healthcheck probe by testing the connection
732
+ */
733
+ async executeGraphProbe(healthcheck, product, env, startTime) {
734
+ var _a;
735
+ const graphTag = (_a = healthcheck.probe) === null || _a === void 0 ? void 0 : _a.graph;
736
+ if (!graphTag) {
737
+ throw new HealthcheckError('Graph healthcheck requires a graph tag in the probe configuration', 'MISSING_GRAPH_TAG');
738
+ }
739
+ try {
740
+ // Dynamically import GraphService to avoid circular dependencies
741
+ const { GraphService } = await Promise.resolve().then(() => __importStar(require('../graph/graphs.service')));
742
+ const graphService = new GraphService({
743
+ workspace_id: this.config.workspace_id,
744
+ public_key: this.config.public_key,
745
+ user_id: this.config.user_id,
746
+ token: this.config.token,
747
+ env_type: this.config.env_type,
748
+ private_key: this._privateKey,
749
+ access_key: this.config.access_key,
750
+ });
751
+ // Test the graph connection
752
+ const connectionResult = await graphService.testConnection({
753
+ product,
754
+ env,
755
+ graph: graphTag,
756
+ });
757
+ const latency = Date.now() - startTime;
758
+ if (connectionResult.connected) {
759
+ return {
760
+ status: 'available',
761
+ latency,
762
+ };
763
+ }
764
+ else {
765
+ return {
766
+ status: 'unavailable',
767
+ latency,
768
+ };
769
+ }
770
+ }
771
+ catch (error) {
772
+ const latency = Date.now() - startTime;
773
+ return {
774
+ status: 'unavailable',
775
+ latency,
776
+ };
777
+ }
778
+ }
779
+ /**
780
+ * Execute a message broker healthcheck probe by testing the connection
781
+ */
782
+ async executeMessageBrokerProbe(healthcheck, product, env, startTime) {
783
+ var _a;
784
+ const brokerTag = (_a = healthcheck.probe) === null || _a === void 0 ? void 0 : _a.messageBroker;
785
+ if (!brokerTag) {
786
+ throw new HealthcheckError('Message broker healthcheck requires a messageBroker tag in the probe configuration', 'MISSING_MESSAGE_BROKER_TAG');
787
+ }
788
+ try {
789
+ // Dynamically import BrokersService to avoid circular dependencies
790
+ const { BrokersService } = await Promise.resolve().then(() => __importStar(require('../brokers/brokers.service')));
791
+ const brokersService = new BrokersService({
792
+ workspace_id: this.config.workspace_id,
793
+ public_key: this.config.public_key,
794
+ user_id: this.config.user_id,
795
+ token: this.config.token,
796
+ env_type: this.config.env_type,
797
+ });
798
+ // Test the broker connection by attempting to get broker config
799
+ // This validates broker exists and credentials are correct
800
+ const connectionResult = await brokersService.testConnection({
801
+ product,
802
+ env,
803
+ broker: brokerTag,
804
+ });
805
+ const latency = Date.now() - startTime;
806
+ if (connectionResult.connected) {
807
+ return {
808
+ status: 'available',
809
+ latency,
810
+ };
811
+ }
812
+ else {
813
+ return {
814
+ status: 'unavailable',
815
+ latency,
816
+ };
817
+ }
818
+ }
819
+ catch (error) {
820
+ const latency = Date.now() - startTime;
821
+ return {
822
+ status: 'unavailable',
823
+ latency,
824
+ };
825
+ }
826
+ }
827
+ /**
828
+ * Execute a workflow healthcheck probe by running the workflow
829
+ *
830
+ * Workflow healthchecks execute the workflow with the provided input
831
+ * and check if it completes successfully. This is useful for testing
832
+ * end-to-end workflow functionality.
833
+ */
834
+ async executeWorkflowProbe(healthcheck, product, env, startTime) {
835
+ var _a, _b;
836
+ const workflowTag = (_a = healthcheck.probe) === null || _a === void 0 ? void 0 : _a.workflow;
837
+ if (!workflowTag) {
838
+ throw new HealthcheckError('Workflow healthcheck requires a workflow tag in the probe configuration', 'MISSING_WORKFLOW_TAG');
839
+ }
840
+ try {
841
+ // Dynamically import WorkflowService to avoid circular dependencies
842
+ const { WorkflowService } = await Promise.resolve().then(() => __importStar(require('../workflows/workflows.service')));
843
+ const workflowService = new WorkflowService({
844
+ workspace_id: this.config.workspace_id,
845
+ public_key: this.config.public_key,
846
+ user_id: this.config.user_id,
847
+ token: this.config.token,
848
+ env_type: this.config.env_type,
849
+ private_key: this._privateKey,
850
+ access_key: this.config.access_key,
851
+ });
852
+ // Execute the workflow with the configured input
853
+ const input = ((_b = healthcheck.probe) === null || _b === void 0 ? void 0 : _b.input) || {};
854
+ const result = await workflowService.execute({
855
+ product,
856
+ env,
857
+ tag: workflowTag,
858
+ input,
859
+ });
860
+ const latency = Date.now() - startTime;
861
+ // Check if workflow completed successfully
862
+ if (result.status === 'completed') {
863
+ return {
864
+ status: 'available',
865
+ latency,
866
+ };
867
+ }
868
+ else {
869
+ return {
870
+ status: 'unavailable',
871
+ latency,
872
+ };
873
+ }
874
+ }
875
+ catch (error) {
876
+ const latency = Date.now() - startTime;
877
+ return {
878
+ status: 'unavailable',
879
+ latency,
880
+ };
881
+ }
882
+ }
883
+ /**
884
+ * Execute a storage healthcheck probe by testing the connection
885
+ *
886
+ * Storage healthchecks attempt to list objects (with limit 1) to verify
887
+ * connectivity and credentials are working correctly.
888
+ */
889
+ async executeStorageProbe(healthcheck, product, env, startTime) {
890
+ var _a;
891
+ const storageTag = (_a = healthcheck.probe) === null || _a === void 0 ? void 0 : _a.storage;
892
+ if (!storageTag) {
893
+ throw new HealthcheckError('Storage healthcheck requires a storage tag in the probe configuration', 'MISSING_STORAGE_TAG');
894
+ }
895
+ try {
896
+ // Dynamically import StorageService to avoid circular dependencies
897
+ const { StorageService } = await Promise.resolve().then(() => __importStar(require('../storage/storage.service')));
898
+ const storageService = new StorageService({
899
+ workspace_id: this.config.workspace_id,
900
+ public_key: this.config.public_key,
901
+ user_id: this.config.user_id,
902
+ token: this.config.token,
903
+ env_type: this.config.env_type,
904
+ private_key: this._privateKey,
905
+ });
906
+ // Test the storage connection
907
+ const connectionResult = await storageService.testConnection({
908
+ product,
909
+ env,
910
+ storage: storageTag,
911
+ });
912
+ const latency = Date.now() - startTime;
913
+ if (connectionResult.connected) {
914
+ return {
915
+ status: 'available',
916
+ latency,
917
+ };
918
+ }
919
+ else {
920
+ return {
921
+ status: 'unavailable',
922
+ latency,
923
+ };
924
+ }
925
+ }
926
+ catch (error) {
927
+ const latency = Date.now() - startTime;
928
+ return {
929
+ status: 'unavailable',
930
+ latency,
931
+ };
932
+ }
933
+ }
934
+ /**
935
+ * @deprecated Use run() instead
936
+ */
937
+ async runNow(options) {
938
+ return await this.run(options);
939
+ }
940
+ }
941
+ exports.HealthcheckService = HealthcheckService;
942
+ exports.default = HealthcheckService;
943
+ //# sourceMappingURL=healthcheck.service.js.map