@ductape/sdk 0.0.4-v6 → 0.0.4-v60

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 +3239 -285
  343. package/dist/index.js +4705 -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
package/dist/index.d.ts CHANGED
@@ -1,12 +1,264 @@
1
- import { ImportDocsTypes, IApp, IAppConstants, IAppEnv, IAppVariables, IAppWebhook, IAppWebhookEvent, ICreateAppBuilder, IProduct, IProductApp, IProductCache, IProductDatabase, IProductDatabaseAction, IProductEnv, IProductFeature, IProductJobs, IProductStorage, IProcessorInput, IActionProcessorInput, IDBActionProcessorInput, IProductMessageBroker, IProductNotification, INotificationProcessorInput, IProductNotificationTemplate, IStorageProcessorInput, IParsedSample, IRegisterWebhook, IGenerateWebhookLink, IAppAuth, IMessageBrokerPublishInput, IMessageBrokerSubscribeInput, IProductMessageBrokerTopic, IAppAction, IProductDatabaseMigration, LogQueryParams, IProductQuota, FetchRemoteCachePayload, IFileReadResult, IProductSession, ISessionInput, IActionUpdate, IProductFallback, IFetchFilesFilter, ISessionPayload } from './types';
1
+ import { ImportDocsTypes, IApp, IAppConstants, IAppEnv, IAppVariables, IAppWebhook, IAppWebhookEvent, ICreateAppBuilder, IProduct, IProductApp, IProductCache, IProductDatabase, IProductEnv, IProductJobs, IProductStorage, IActionProcessorInput, IProductMessageBroker, IProductNotification, INotificationProcessorInput, IProductNotificationTemplate, IStorageProcessorInput, IParsedSample, IRegisterWebhook, IGenerateWebhookLink, IAppAuth, IProductMessageBrokerTopic, IAppAction, LogQueryParams, IProductQuota, FetchRemoteCachePayload, IFileReadResult, IProductSession, IActionUpdate, IProductFallback, IFetchUsersPayload, IActionDispatchInput, INotificationDispatchInput, IStorageDispatchInput, IPublishDispatchInput, IDispatchResult, IDispatchSchedule } from './types';
2
2
  import { IDuctapeInit } from './types/index.types';
3
3
  import { PublicStates } from './types/enums';
4
+ import { DatabaseService, IActionCreateOptions, IActionUpdateOptions, ISimpleSchemaDefinition, ISimpleCreateOptions, ISimpleDropOptions, ISimpleFieldDefinition, SimpleFieldType, ISimpleIndexOptions, ISchemaOperationResult, IIndexFieldDefinition, ITableSchema, IIndexInfo } from './database';
5
+ import { IConstraintDefinition as IMigrationConstraintDefinition } from './database/types/migration.interface';
6
+ import { IDBActionDispatchInput } from './types/processor.types';
7
+ import { GraphService, IGraphConfig } from './graph';
8
+ import { WorkflowService } from './workflows';
9
+ import { IHealthcheckDefineOptions, IDefinedHealthcheck, IQuotaDefineOptions, IDefinedQuota, IFallbackDefineOptions, IDefinedFallback } from './resilience';
10
+ import { AgentsService } from './agents';
11
+ import { ModelService } from './models';
12
+ import { ICreateVectorDbOptions, VectorDatabaseService } from './vector';
13
+ import { IShareCredentialsConfig } from './apps/utils/credential-manager';
14
+ import { IOAuthConfig } from './apps/utils/oauth-manager';
15
+ import { JobsService, JobStatus, IJobListOptions, ICancelOptions, IRetryOptions, IRescheduleOptions, IJobWebhookConfig } from './jobs';
16
+ import { SecretsService, ICreateSecretInput, IUpdateSecretInput, ISecretMetadata, ISecret, IResolveSecretsOptions } from './secrets';
17
+ /**
18
+ * @typedef {Object} IProduct
19
+ * @property {string} tag - Unique product tag.
20
+ * @property {string} name - Product name.
21
+ * @property {string} [description] - Optional product description.
22
+ * @property {Array<IProductApp>} [apps] - Associated apps.
23
+ * @property {Array<IProductSession>} [sessions] - Product sessions.
24
+ * @property {Array<IProductFeature>} [features] - Product features.
25
+ * @property {Array<IProductQuota>} [quotas] - Product quotas.
26
+ * @property {Array<IProductFallback>} [fallbacks] - Product fallbacks.
27
+ * @property {Array<IProductEnv>} [environments] - Product environments.
28
+ * @property {Array<IProductStorage>} [storages] - Product storages.
29
+ * @property {Array<IProductMessageBroker>} [messageBrokers] - Product message brokers.
30
+ * @property {Array<IProductNotification>} [notifications] - Product notifications.
31
+ * @property {Array<IProductDatabase>} [databases] - Product databases.
32
+ * @property {Array<IProductJobs>} [jobs] - Product jobs.
33
+ * @property {Array<IProductCache>} [caches] - Product caches.
34
+ * @property {Array<IProductFunction>} [functions] - Product functions.
35
+ * @see ts/src/types/productsBuilder.types.ts
36
+ */
37
+ /**
38
+ * @typedef {Object} IApp
39
+ * @property {string} tag - Unique app tag.
40
+ * @property {string} name - App name.
41
+ * @property {string} [description] - Optional app description.
42
+ * @property {Array<IAppVariables>} [variables] - App variables.
43
+ * @property {Array<IAppConstants>} [constants] - App constants.
44
+ * @property {Array<IAppWebhook>} [webhooks] - App webhooks.
45
+ * @property {Array<IAppEnv>} [environments] - App environments.
46
+ * @property {Array<IAppAction>} [actions] - App actions.
47
+ * @property {Array<IAppAuth>} [auths] - App authentication configs.
48
+ * @see ts/src/types/appBuilder.types.ts
49
+ */
50
+ /**
51
+ * @typedef {Object} IProductSession
52
+ * @property {string} tag - Session tag.
53
+ * @property {string} token - Session token.
54
+ * @property {string} [user_id] - Associated user ID.
55
+ * @property {string} [product_tag] - Associated product tag.
56
+ * @property {Record<string, unknown>} [data] - Session data.
57
+ * @see ts/src/types/productsBuilder.types.ts
58
+ */
59
+ /**
60
+ * @typedef {Object} IProductApp
61
+ * @property {string} tag - App tag.
62
+ * @property {string} name - App name.
63
+ * @property {string} [description] - App description.
64
+ * @property {Array<IAppEnv>} [environments] - App environments.
65
+ * @see ts/src/types/productsBuilder.types.ts
66
+ */
67
+ /**
68
+ * @typedef {Object} IProductFeature
69
+ * @property {string} tag - Feature tag.
70
+ * @property {string} name - Feature name.
71
+ * @property {string} [description] - Feature description.
72
+ * @property {Array<any>} [actions] - Feature actions.
73
+ * @see ts/src/types/productsBuilder.types.ts
74
+ */
75
+ /**
76
+ * @typedef {Object} IProductQuota
77
+ * @property {string} tag - Quota tag.
78
+ * @property {string} name - Quota name.
79
+ * @property {number} [limit] - Quota limit.
80
+ * @property {string} [period] - Quota period.
81
+ * @see ts/src/types/productsBuilder.types.ts
82
+ */
83
+ /**
84
+ * @typedef {Object} IProductFallback
85
+ * @property {string} tag - Fallback tag.
86
+ * @property {string} name - Fallback name.
87
+ * @property {string} [description] - Fallback description.
88
+ * @see ts/src/types/productsBuilder.types.ts
89
+ */
90
+ /**
91
+ * @typedef {Object} IProductEnv
92
+ * @property {string} slug - Environment slug.
93
+ * @property {string} [name] - Environment name.
94
+ * @property {string} [description] - Environment description.
95
+ * @see ts/src/types/productsBuilder.types.ts
96
+ */
97
+ /**
98
+ * @typedef {Object} IProductStorage
99
+ * @property {string} tag - Storage tag.
100
+ * @property {string} name - Storage name.
101
+ * @property {string} [description] - Storage description.
102
+ * @see ts/src/types/productsBuilder.types.ts
103
+ */
104
+ /**
105
+ * @typedef {Object} IProductMessageBroker
106
+ * @property {string} tag - Message broker tag.
107
+ * @property {string} name - Message broker name.
108
+ * @property {string} [description] - Message broker description.
109
+ * @property {Array<IProductMessageBrokerTopic>} [topics] - Message broker topics.
110
+ * @see ts/src/types/productsBuilder.types.ts
111
+ */
112
+ /**
113
+ * @typedef {Object} IProductNotification
114
+ * @property {string} tag - Notification tag.
115
+ * @property {string} name - Notification name.
116
+ * @property {string} [description] - Notification description.
117
+ * @property {Array<IProductNotificationTemplate>} [messages] - Notification messages.
118
+ * @see ts/src/types/productsBuilder.types.ts
119
+ */
120
+ /**
121
+ * @typedef {Object} IProductDatabase
122
+ * @property {string} tag - Database tag.
123
+ * @property {string} name - Database name.
124
+ * @property {string} [description] - Database description.
125
+ * @property {Array<IProductDatabaseAction>} [actions] - Database actions.
126
+ * @property {Array<IProductDatabaseMigration>} [migrations] - Database migrations.
127
+ * @see ts/src/types/productsBuilder.types.ts
128
+ */
129
+ /**
130
+ * @typedef {Object} IProductJobs
131
+ * @property {string} tag - Job tag.
132
+ * @property {string} name - Job name.
133
+ * @property {string} [description] - Job description.
134
+ * @see ts/src/types/productsBuilder.types.ts
135
+ */
136
+ /**
137
+ * @typedef {Object} IProductCache
138
+ * @property {string} tag - Cache tag.
139
+ * @property {string} name - Cache name.
140
+ * @property {string} [description] - Cache description.
141
+ * @see ts/src/types/productsBuilder.types.ts
142
+ */
143
+ /**
144
+ * @typedef {Object} IProductFunction
145
+ * @property {string} tag - Function tag.
146
+ * @property {string} name - Function name.
147
+ * @property {string} [description] - Function description.
148
+ * @see ts/src/types/productsBuilder.types.ts
149
+ */
150
+ /**
151
+ * @typedef {Object} IAppVariables
152
+ * @property {string} tag - Variable tag.
153
+ * @property {string} name - Variable name.
154
+ * @property {string} [description] - Variable description.
155
+ * @see ts/src/types/appBuilder.types.ts
156
+ */
157
+ /**
158
+ * @typedef {Object} IAppConstants
159
+ * @property {string} tag - Constant tag.
160
+ * @property {string} name - Constant name.
161
+ * @property {string} [description] - Constant description.
162
+ * @see ts/src/types/appBuilder.types.ts
163
+ */
164
+ /**
165
+ * @typedef {Object} IAppWebhook
166
+ * @property {string} tag - Webhook tag.
167
+ * @property {string} url - Webhook URL.
168
+ * @property {string} [description] - Webhook description.
169
+ * @property {Array<IAppWebhookEvent>} [events] - Webhook events.
170
+ * @see ts/src/types/appBuilder.types.ts
171
+ */
172
+ /**
173
+ * @typedef {Object} IAppWebhookEvent
174
+ * @property {string} tag - Webhook event tag.
175
+ * @property {string} name - Webhook event name.
176
+ * @property {string} [description] - Webhook event description.
177
+ * @see ts/src/types/appBuilder.types.ts
178
+ */
179
+ /**
180
+ * @typedef {Object} IAppEnv
181
+ * @property {string} slug - Environment slug.
182
+ * @property {string} [name] - Environment name.
183
+ * @property {string} [description] - Environment description.
184
+ * @see ts/src/types/appBuilder.types.ts
185
+ */
186
+ /**
187
+ * @typedef {Object} IAppAction
188
+ * @property {string} tag - Action tag.
189
+ * @property {string} name - Action name.
190
+ * @property {string} [description] - Action description.
191
+ * @see ts/src/types/appBuilder.types.ts
192
+ */
193
+ /**
194
+ * @typedef {Object} IAppAuth
195
+ * @property {string} tag - Auth tag.
196
+ * @property {string} name - Auth name.
197
+ * @property {string} [description] - Auth description.
198
+ * @see ts/src/types/appBuilder.types.ts
199
+ */
200
+ /**
201
+ * @typedef {Object} IProductAppHealth
202
+ * @property {string} name - Health check name.
203
+ * @property {string} description - Health check description.
204
+ * @property {string} tag - Health check tag.
205
+ * @property {string} app - App access tag.
206
+ * @property {string} action - Action to execute for health check.
207
+ * @property {number} checkIntervals - Interval between health checks in milliseconds.
208
+ * @property {number} retries - Number of retry attempts.
209
+ * @property {Array<CheckEnvStatus>} envs - Environment-specific health check configurations.
210
+ * @see ts/src/types/productsBuilder.types.ts
211
+ */
212
+ /**
213
+ * @typedef {Object} CheckEnvStatus
214
+ * @property {string} slug - Environment slug.
215
+ * @property {string} [status] - Current health status.
216
+ * @property {string} [lastAvailable] - Last available timestamp.
217
+ * @property {string} [lastChecked] - Last check timestamp.
218
+ * @property {string} [lastLatency] - Last response latency.
219
+ * @property {string} [averageLatency] - Average response latency.
220
+ * @property {any} input - Health check input data.
221
+ * @see ts/src/types/productsBuilder.types.ts
222
+ */
223
+ export { GraphService } from './graph';
224
+ export { GraphType, TraversalDirection, NodeIndexType, NodeConstraintType, GraphIsolationLevel, GraphTransactionStatus, GraphErrorType, GraphFeature, GraphSortOrder, } from './graph';
225
+ export type { IGraphEnvConfig, IGraphConfig, IGraphConnectionConfig, IGraphConnectionOptions, IGraphConnectionResult, IGraphConnectionContext, IGraphServiceConfig, IGraphTestConnectionResult, IGraphFilterOperator, IGraphWhereClause, IRawQueryOptions, IRawQueryResult, ICountNodesOptions, ICountNodesResult, ICountRelationshipsOptions, ICountRelationshipsResult, IGraphStatistics, IFullTextSearchOptions, IFullTextSearchResult, IVectorSearchOptions, IVectorSearchResult, NodeProperties, INode, ICreateNodeOptions, ICreateNodeResult, IFindNodesOptions, IGraphOrderBy, IFindNodesResult, IUpdateNodeOptions, INodePropertyUpdate, IUpdateNodeResult, IDeleteNodeOptions, IDeleteNodeResult, IMergeNodeOptions, IMergeNodeResult, INodeFilter, RelationshipProperties, IRelationship, ICreateRelationshipOptions, ICreateRelationshipResult, IFindRelationshipsOptions, IFindRelationshipsResult, IUpdateRelationshipOptions, IRelationshipPropertyUpdate, IUpdateRelationshipResult, IDeleteRelationshipOptions, IDeleteRelationshipResult, IMergeRelationshipOptions, IMergeRelationshipResult, IRelationshipFilter, ICreateRelationshipIndexOptions, IPath, ITraverseOptions, ITraverseResult, IShortestPathOptions, IShortestPathResult, IAllPathsOptions, IAllPathsResult, INeighborhoodOptions, INeighborhoodResult, IConnectedComponentsOptions, IConnectedComponent, IConnectedComponentsResult, IGraphTransaction, IGraphTransactionOptions, TransactionCallback, IGraphTransactionResult, ICreateNodeIndexOptions, ICreateNodeConstraintOptions, IGraphIndex, IGraphConstraint, IListIndexesResult, IListConstraintsResult, ICreateIndexResult, ICreateConstraintResult, IDropIndexResult, IDropConstraintResult, GraphPropertyType, IGraphLabelProperty, IGraphLabel, IListLabelsResult, IGraphRelationshipType, IListRelationshipTypesResult, GraphActionParameterType, IGraphActionParameter, IGraphAction, ICreateGraphActionOptions, IUpdateGraphActionOptions, IExecuteGraphActionOptions, IExecuteGraphActionResult, IListGraphActionsResult, } from './graph';
226
+ export { GraphError } from './graph';
227
+ export { BaseGraphAdapter, Neo4jAdapter, NeptuneAdapter, ArangoDBAdapter, MemgraphAdapter, GraphAdapterFactory, } from './graph';
228
+ export type { IAdapterConnectionOptions } from './graph';
229
+ export { WorkflowService, WorkflowError, workflowService } from './workflows';
230
+ export { WorkflowBuilder, createWorkflow } from './workflows';
231
+ export type { IWorkflowServiceConfig, IWorkflowConfig, IWorkflowContext, IWorkflowContextMeta, IDefineWorkflowOptions, IExecuteWorkflowOptions, IWorkflowExecutionResult, IWorkflowDispatchInput, IWorkflowDispatchResult, IWorkflowSchedule, ISendSignalOptions, IQueryWorkflowOptions, IWorkflowActionContext, IWorkflowDatabaseContext, IWorkflowGraphContext, IWorkflowNotificationContext, IWorkflowStorageContext, IWorkflowPublishContext, IWorkflowFeatureContext, IWorkflowQuotaContext, IWorkflowFallbackContext, IWorkflowHealthcheckContext, WorkflowHandler, IStepBuilder, IRollbackBuilder, IWorkflowBuilder, } from './workflows';
232
+ export { AgentsService, AgentError, agentsService } from './agents';
233
+ export { AgentExecutor, AgentContext, ToolRegistry, MemoryManager, createLLMProvider, AnthropicProvider, OpenAIProvider, VectorServiceAdapter, createVectorStoreAdapter, createPineconeAdapter, createQdrantAdapter, createWeaviateAdapter, createMemoryAdapter, } from './agents';
234
+ export type { IAgentServiceConfig, IDefineAgentOptions, IDefinedAgent, IRunAgentOptions, IAgentExecutionResult, IDispatchAgentOptions, IDispatchAgentResult, ISendAgentSignalOptions, IAgentStatusOptions, IAgentState, IListAgentExecutionsOptions, IAgentExecutionListResult, IAgentTool, IAgentToolSchema, IToolParam, IToolCallResult, ILLMConfig, LLMProvider, IAgentMemoryConfig, IAgentTerminationConfig, IAgentStreamEvent, IAgentToolContext, IConversationMessage, ITokenUsage, AgentStatus, IHumanInLoopConfig, IApprovalRequest, IApprovalResponse, IMultiAgentWorkflow, MultiAgentMode, } from './agents';
235
+ export { StorageService, StorageError } from './storage';
236
+ export { uploadBlobToCloud, downloadBlobFromCloud, deleteBlobFromCloud, listBlobsInCloud, generateSignedUrl, } from './storage';
237
+ export type { IStorageServiceConfig, IUploadOptions, IDownloadOptions, IDeleteOptions, IListFilesOptions, ISignedUrlOptions, IStorageResult, IDownloadResult, IDeleteResult as IStorageDeleteResult, IListFilesResult, ISignedUrlResult, IStorageDispatchOptions, IStorageDispatchResult, IStorageProviderConfig, IStorageFileInfo, } from './storage';
238
+ export { SessionsService, SessionError } from './sessions';
239
+ export type { ISessionServiceConfig, ICreateSessionOptions, IRefreshSessionOptions, IVerifySessionOptions, IRevokeSessionOptions, IListSessionsOptions, IDefineSessionOptions, ISessionResult, IVerifyResult, IListSessionsResult, ISessionInfo, ISessionSchema, ISessionSchemaField, ISessionContext, IDefinedSession, } from './sessions';
240
+ export { CacheService, CacheError } from './cache';
241
+ export type { ICacheServiceConfig, ICacheValue, IFetchCacheValuesOptions, IFetchCacheValuesResult, IFetchCacheDashboardOptions, ICacheDashboardMetrics, IClearCacheValueOptions, IClearCacheValuesOptions, IClearCacheValuesResult, ISetCacheValueOptions, IGetCacheValueOptions, IDeleteCacheValueOptions, IDeleteCacheValuesOptions, IDeleteCacheValuesResult, } from './cache';
242
+ export { BrokersService, BrokerError } from './brokers';
243
+ export { RabbitMQService, KafkaService, SQSService, RedisService, GooglePubSubService, loadBrokerService, parseEventString, isValidSqsUrl, getSqsQueueUrl, } from './brokers';
244
+ export type { IBrokerServiceConfig, IPublishOptions, ISubscribeOptions, IPublishResult, ISubscribeResult, IMessageBrokerService, BrokerConfig, IBrokerBootstrapData, IBrokerDispatchOptions, } from './brokers';
245
+ export { NotificationsService, notificationsService } from './notifications';
246
+ export { NotificationChannelType, PushNotificationProvider, SmsProvider } from './notifications';
247
+ export type { IFirebaseCredential, IPushNotificationHandler, IPushNotificationInput, IPushOptions, IEmailHandler, IEmailInput, IEmailOptions, ISmsHandler, ISmsInput, ISmsOptions, ICallbackHandler, ICallbackInput, ICallbackOptions, INotificationTemplate, INotificationEnvConfig, INotificationDefinition, INotificationsServiceConfig, INotificationResult, IMultiChannelNotificationResult, INotificationOptions, } from './notifications';
248
+ export { VectorDatabaseService, VectorService, createVectorService, createMemoryVectorService, VectorError, } from './vector';
249
+ export type { IVectorDatabaseServiceConfig, ICreateVectorDbOptions, IVectorDbEnvConfig, IUpdateVectorDbOptions, IFetchVectorOptions, IDeleteVectorConfigOptions, IProductVectorQueryOptions, IProductVectorUpsertOptions, IProductVectorFetchOptions, IProductVectorDeleteOptions, } from './vector';
250
+ export { BaseVectorAdapter, PineconeAdapter, QdrantAdapter, WeaviateAdapter, MemoryAdapter } from './vector';
251
+ export { VectorDBType, DistanceMetric, VectorIndexType, VectorErrorType, VectorFeature } from './vector';
252
+ export type { IVectorServiceOptions, IAdapterConnectionOptions as IVectorAdapterConnectionOptions, IVectorEnvConfig, IVectorConfig, IVectorConnectionConfig, IVectorConnectionOptions, IVectorConnectionResult, IVectorConnectionContext, IVectorServiceConfig, IVectorTestConnectionResult, VectorMetadata, IVector, ISparseVector, IUpsertVectorsOptions, IUpsertVectorsResult, IMetadataFilter, MetadataFilterOperator, IMetadataFilterGroup, IQueryVectorsOptions, IQueryMatch, IQueryVectorsResult, IFetchVectorsOptions, IFetchVectorsResult, IUpdateVectorOptions, IUpdateVectorResult, IDeleteVectorsOptions, IDeleteVectorsResult, IListVectorsOptions, IListVectorsResult, INamespaceInfo, IListNamespacesResult, IVectorIndexInfo, ICreateIndexOptions as IVectorCreateIndexOptions, ICreateIndexResult as IVectorCreateIndexResult, IDeleteIndexOptions as IVectorDeleteIndexOptions, IDeleteIndexResult as IVectorDeleteIndexResult, IVectorIndexStats, EmbeddingProvider, IEmbeddingModelConfig, IEmbedOptions, IEmbeddingResult, IBatchEmbeddingResult, IEmbeddingProvider, IOpenAIEmbeddingConfig, ICohereEmbeddingConfig, IVoyageEmbeddingConfig, IJinaEmbeddingConfig, IHuggingFaceEmbeddingConfig, ILocalEmbeddingConfig, } from './vector';
253
+ export { SecretsService } from './secrets';
254
+ export { SECRET_PATTERN, SECRET_PATTERN_GLOBAL, SecretNotFoundError, SecretScopeError, SecretEnvironmentError, SecretExpiredError, SecretRevokedError, SecretResolutionError, isSecretReference, containsSecretReferences, extractSecretKeys, findAllSecretReferences, mightContainSecrets, } from './secrets';
255
+ export type { SecretTokenType, ICreateSecretInput, IUpdateSecretInput, ISecretMetadata, ISecret, ISecretCheck, IResolveSecretsOptions, ISecretResolutionResult, ISecretsServiceConfig, ISecretsService, } from './secrets';
4
256
  export interface IDuctape {
5
257
  }
6
258
  export default class Ductape implements IDuctape {
7
259
  private user_id;
8
260
  private workspace_id;
9
- private private_key;
261
+ private accessKey;
10
262
  private public_key;
11
263
  private session;
12
264
  private token;
@@ -16,320 +268,2947 @@ export default class Ductape implements IDuctape {
16
268
  private appApi;
17
269
  private productsApi;
18
270
  private workspaceApi;
19
- private productBuilder;
271
+ private productBuilders;
272
+ private appBuilders;
273
+ private _databaseService;
274
+ private _graphService;
275
+ private _workflowService;
276
+ private _agentsService;
277
+ private _modelService;
278
+ private _vectorService;
279
+ private _cacheService;
280
+ private _jobsService;
281
+ private _secretsService;
282
+ private _privateKey;
283
+ private _quotaService;
284
+ private _fallbackService;
285
+ private _healthcheckService;
20
286
  private loggerService;
21
- private appBuilder;
22
287
  private importService;
23
- private productInit;
24
- private appInit;
25
288
  private environment;
26
289
  private redis_url;
27
290
  private redisClient?;
291
+ private jobsQueue;
292
+ private healthCheckQueue;
293
+ private healthCheckUpdaterQueue;
294
+ jobsWorker: any;
295
+ healthCheckWorker: any;
296
+ healthCheckUpdaterWorker: any;
28
297
  private loadRedis;
29
- constructor({ workspace_id, private_key, user_id, env_type, redis_url }: IDuctapeInit);
30
- connectRedis(): Promise<void>;
298
+ constructor({ accessKey, env_type, redis_url }: IDuctapeInit);
299
+ private loadBullMQ;
300
+ /**
301
+ * Connects to Redis and initializes job and health check queues and workers.
302
+ * @throws {Error} If called in a browser environment or if Redis URL is missing.
303
+ * @returns {Promise<void>} Resolves when Redis and queues are initialized.
304
+ */
305
+ monitor(): Promise<void>;
306
+ /**
307
+ * Schedules all healthcheck jobs for all products and environments.
308
+ */
309
+ private scheduleAllHealthcheckJobs;
310
+ /**
311
+ * Schedules a single healthcheck job with the given interval (ms).
312
+ * If interval is not provided, defaults to 60s.
313
+ */
314
+ private scheduleHealthcheckJob;
315
+ /**
316
+ * Sets the authentication token for API requests.
317
+ * @param {string} token - The authentication token.
318
+ */
31
319
  setToken(token: string): void;
320
+ /**
321
+ * Sets the public key for API requests.
322
+ * @param {string} public_key - The public key.
323
+ */
32
324
  setPublicKey(public_key: string): void;
33
- private initProduct;
34
- private initApp;
35
- private checkProductInit;
36
- private checkAppInit;
325
+ private getProductBuilder;
326
+ private getAppBuilder;
327
+ private initProductBuilder;
328
+ private initAppBuilder;
329
+ /**
330
+ * Product-related operations for managing products.
331
+ */
37
332
  product: {
333
+ /**
334
+ * Creates a new product.
335
+ * @param {IProduct} data - The product data.
336
+ * @returns {Promise<void>} Resolves when the product is created. Throws on error.
337
+ */
38
338
  create: (data: IProduct) => Promise<void>;
339
+ /**
340
+ * Fetches a product by tag.
341
+ * @param {string} tag - The product tag.
342
+ * @returns {Promise<IProduct|null>} The fetched product, or null if not found.
343
+ */
39
344
  fetch: (tag: string) => Promise<IProduct>;
345
+ /**
346
+ * Updates a product by tag.
347
+ * @param {string} tag - The product tag.
348
+ * @param {Partial<IProduct>} data - The product data to update.
349
+ * @returns {Promise<void>} Resolves when the product is updated. Throws on error.
350
+ */
40
351
  update: (tag: string, data: Partial<IProduct>) => Promise<void>;
41
- init: (productTag: string) => Promise<void>;
42
- sessions: {
43
- create: (payload: IProductSession) => Promise<void>;
44
- update: (tag: string, payload: Partial<IProductSession>) => Promise<void>;
45
- fetchAll: () => IProductSession[];
46
- fetch: (tag: string) => IProductSession;
352
+ /**
353
+ * Initializes a product by tag (pre-loads builder into cache).
354
+ * @param {string} product - The product tag.
355
+ * @returns {Promise<void>} Resolves when initialization is complete. Throws on error.
356
+ */
357
+ init: (product: string) => Promise<void>;
358
+ /**
359
+ * Updates data validation for a product.
360
+ * @param {string} product - The product tag.
361
+ * @param {string} tag - The validation tag.
362
+ * @param {Partial<IParsedSample>} update - The update data.
363
+ * @returns {Promise<void>} Resolves when the validation is updated. Throws on error.
364
+ */
365
+ updateValidation: (product: string, tag: string, update: Partial<IParsedSample>) => Promise<boolean>;
366
+ environments: {
367
+ /**
368
+ * Creates an environment for a product.
369
+ * @param {string} product - The product tag.
370
+ * @param {IProductEnv} data - The environment data.
371
+ * @returns {Promise<void>} Resolves when the environment is created. Throws on error.
372
+ */
373
+ create: (product: string, data: IProductEnv) => Promise<void>;
374
+ /**
375
+ * Fetches all environments for a product.
376
+ * @param {string} product - The product tag.
377
+ * @returns {IAppEnv[]} The list of environments.
378
+ */
379
+ list: (product: string) => Promise<IProductEnv[]>;
380
+ /**
381
+ * Fetches an environment by slug.
382
+ * @param {string} product - The product tag.
383
+ * @param {string} slug - The environment slug.
384
+ * @returns {IAppEnv|null} The fetched environment, or null if not found.
385
+ */
386
+ fetch: (product: string, slug: string) => Promise<IProductEnv>;
387
+ /**
388
+ * Updates an environment by slug.
389
+ * @param {string} product - The product tag.
390
+ * @param {string} slug - The environment slug.
391
+ * @param {Partial<IProductEnv>} data - The environment data to update.
392
+ * @returns {Promise<void>} Resolves when the environment is updated. Throws on error.
393
+ */
394
+ update: (product: string, slug: string, data: Partial<IProductEnv>) => Promise<void>;
47
395
  };
48
396
  apps: {
49
- connect: (appTag: string) => Promise<import("./types").IAppAccess>;
50
- add: (app: IProductApp) => Promise<void>;
51
- fetchAll: () => Promise<IProductApp[]>;
52
- fetch: (tag: string) => Promise<IProductApp>;
53
- update: (accessTag: string, data: Partial<IProductApp>) => Promise<void>;
397
+ /**
398
+ * Connects an app to a product by app tag.
399
+ * @param {string} product - The product tag.
400
+ * @param {string} appTag - The app tag.
401
+ * @returns {Promise<IAppAccess>} The result of the connection.
402
+ */
403
+ connect: (product: string, appTag: string) => Promise<import("./types").IAppAccess>;
404
+ /**
405
+ * Adds an app to a product.
406
+ * @param {string} product - The product tag.
407
+ * @param {IProductApp} app - The app data.
408
+ * @returns {Promise<void>} Resolves when the app is added. Throws on error.
409
+ */
410
+ add: (product: string, app: IProductApp) => Promise<void>;
411
+ /**
412
+ * Fetches all apps for a product.
413
+ * @param {string} product - The product tag.
414
+ * @returns {IProductApp[]} The list of apps.
415
+ */
416
+ list: (product: string) => Promise<IProductApp[]>;
417
+ /**
418
+ * Fetches an app by tag.
419
+ * @param {string} product - The product tag.
420
+ * @param {string} tag - The app tag.
421
+ * @returns {IProductApp|null} The fetched app, or null if not found.
422
+ */
423
+ fetch: (product: string, tag: string) => Promise<IProductApp>;
424
+ /**
425
+ * Updates an app by access tag.
426
+ * @param {string} product - The product tag.
427
+ * @param {string} accessTag - The app access tag.
428
+ * @param {Partial<IProductApp>} data - The app data to update.
429
+ * @returns {Promise<void>} Resolves when the app is updated. Throws on error.
430
+ */
431
+ update: (product: string, accessTag: string, data: Partial<IProductApp>) => Promise<void>;
54
432
  webhooks: {
55
- fetchAll: (accessTag: string) => Promise<IAppWebhook[]>;
433
+ /**
434
+ * Fetches all webhooks for an app by access tag.
435
+ * @param {string} product - The product tag.
436
+ * @param {string} accessTag - The app access tag.
437
+ * @returns {Promise<IAppWebhook[]>} The list of webhooks.
438
+ */
439
+ list: (product: string, accessTag: string) => Promise<IAppWebhook[]>;
440
+ /**
441
+ * Enables a webhook for an app.
442
+ * @param {IRegisterWebhook} data - The webhook registration data.
443
+ * @returns {Promise<void>} Resolves when the webhook is enabled. Throws on error.
444
+ */
56
445
  enable: (data: IRegisterWebhook) => Promise<void>;
446
+ /**
447
+ * Generates a webhook link for an app.
448
+ * @param {IGenerateWebhookLink} data - The webhook link data.
449
+ * @returns {Promise<string>} The generated webhook link.
450
+ */
57
451
  generateLink: (data: IGenerateWebhookLink) => Promise<string>;
58
452
  };
59
453
  };
60
- quota: {
61
- create: (data: Partial<IProductQuota>) => Promise<void>;
62
- fetch: (tag: string) => IProductQuota;
63
- fetchAll: () => IProductQuota[];
64
- update: (tag: string, data: Partial<IProductQuota>) => Promise<void>;
65
- };
66
- fallback: {
67
- create: (data: Partial<IProductFallback>) => Promise<void>;
68
- fetch: (tag: string) => IProductFallback;
69
- fetchAll: () => IProductFallback[];
70
- update: (tag: string, data: Partial<IProductFallback>) => Promise<void>;
71
- };
72
- updateValidation: (tag: string, update: Partial<IParsedSample>) => Promise<boolean>;
73
- environments: {
74
- create: (data: IProductEnv) => Promise<void>;
75
- fetchAll: () => IProductEnv[];
76
- fetch: (slug: string) => IProductEnv;
77
- update: (slug: string, data: Partial<IProductEnv>) => Promise<void>;
78
- };
79
- storage: {
80
- create: (data: IProductStorage) => Promise<void>;
81
- fetchAll: () => IProductStorage[];
82
- fetch: (tag: string) => IProductStorage;
83
- update: (tag: string, data: Partial<IProductStorage>) => Promise<void>;
84
- files: (data: IFetchFilesFilter) => Promise<import("./types").IFileURLPayload[]>;
85
- };
86
- messageBrokers: {
87
- create: (data: Partial<IProductMessageBroker>) => Promise<void>;
88
- fetchAll: () => IProductMessageBroker[];
89
- fetch: (tag: string) => IProductMessageBroker;
90
- update: (tag: string, data: Partial<IProductMessageBroker>) => Promise<void>;
91
- topics: {
92
- create: (data: IProductMessageBrokerTopic) => Promise<void>;
93
- fetchAll: (messageBrokerTag: string) => IProductMessageBrokerTopic[];
94
- fetch: (tag: string) => IProductMessageBrokerTopic;
95
- update: (tag: string, data: Partial<IProductMessageBrokerTopic>) => Promise<void>;
96
- };
97
- };
98
- notifications: {
99
- create: (data: IProductNotification) => Promise<void>;
100
- fetchAll: () => IProductNotification[];
101
- fetch: (tag: string) => IProductNotification;
102
- update: (tag: string, data: Partial<IProductNotification>) => Promise<void>;
103
- messages: {
104
- create: (data: IProductNotificationTemplate) => Promise<void>;
105
- fetchAll: (notificationTag: string) => IProductNotificationTemplate[];
106
- fetch: (tag: string) => IProductNotificationTemplate;
107
- update: (tag: string, data: Partial<IProductNotificationTemplate>) => Promise<void>;
108
- };
109
- };
110
- databases: {
111
- create: (data: IProductDatabase) => Promise<void>;
112
- fetchAll: () => IProductDatabase[];
113
- fetch: (tag: string) => IProductDatabase;
114
- update: (tag: string, data: Partial<IProductDatabase>) => Promise<void>;
115
- actions: {
116
- create: (data: IProductDatabaseAction) => Promise<void>;
117
- fetchAll: (databaseTag: string) => IProductDatabaseAction[];
118
- fetch: (tag: string) => IProductDatabaseAction;
119
- update: (tag: string, data: Partial<IProductDatabaseAction>) => Promise<void>;
120
- };
121
- migrations: {
122
- create: (data: IProductDatabaseMigration) => Promise<void>;
123
- fetchAll: (databaseTag: string) => IProductDatabaseMigration[];
124
- fetch: (tag: string) => IProductDatabaseMigration;
125
- update: (tag: string, data: Partial<IProductDatabaseMigration>) => Promise<void>;
126
- };
127
- };
128
- jobs: {
129
- create: (data: Partial<IProductJobs>) => Promise<void>;
130
- fetchAll: () => IProductJobs[];
131
- fetch: (tag: string) => IProductJobs;
132
- update: (tag: string, data: Partial<IProductJobs>) => Promise<void>;
133
- };
134
- caches: {
135
- create: (data: IProductCache) => Promise<void>;
136
- fetchAll: () => IProductCache[];
137
- fetch: (tag: string) => IProductCache;
138
- update: (tag: string, data: Partial<IProductCache>) => Promise<void>;
139
- values: (data: FetchRemoteCachePayload) => Promise<import("./types").IRemoteCache[]>;
140
- };
141
- features: {
142
- create: (data: Partial<IProductFeature>) => Promise<void>;
143
- fetchAll: () => IProductFeature[];
144
- fetch: (tag: string) => IProductFeature;
145
- update: (tag: string, data: Partial<IProductCache>) => Promise<void>;
146
- };
147
454
  };
148
- app: {
149
- create: (data: ICreateAppBuilder) => Promise<{
150
- app_id: string;
455
+ /**
456
+ * Session-related operations for managing product sessions.
457
+ */
458
+ sessions: {
459
+ /**
460
+ * Creates a new product session.
461
+ * @param {string} product - The product tag.
462
+ * @param {IProductSession} payload - The session payload.
463
+ * @returns {Promise<void>} Resolves when the session is created. Throws on error.
464
+ */
465
+ create: (product: string, payload: IProductSession) => Promise<void>;
466
+ /**
467
+ * Updates a product session by tag.
468
+ * @param {string} product - The product tag.
469
+ * @param {string} tag - The session tag.
470
+ * @param {Partial<IProductSession>} payload - The session data to update.
471
+ * @returns {Promise<void>} Resolves when the session is updated. Throws on error.
472
+ */
473
+ update: (product: string, tag: string, payload: Partial<IProductSession>) => Promise<void>;
474
+ /**
475
+ * Fetches all product sessions.
476
+ * @param {string} product - The product tag.
477
+ * @returns {IProductSession[]} The list of sessions.
478
+ */
479
+ list: (product: string) => Promise<IProductSession[]>;
480
+ /**
481
+ * Fetches a product session by tag.
482
+ * @param {string} product - The product tag.
483
+ * @param {string} tag - The session tag.
484
+ * @returns {IProductSession|null} The fetched session, or null if not found.
485
+ */
486
+ fetch: (product: string, tag: string) => Promise<IProductSession>;
487
+ /**
488
+ * Fetches users for a session.
489
+ * @param {string} product - The product tag.
490
+ * @param {IFetchUsersPayload} data - The user fetch payload.
491
+ * @returns {Promise<any[]>} The users for the session.
492
+ */
493
+ users: (product: string, data: IFetchUsersPayload) => Promise<import("./types").IFileURLPayload[]>;
494
+ /**
495
+ * Deletes a product session by tag.
496
+ * @param {string} product - The product tag.
497
+ * @param {string} tag - The session tag.
498
+ * @returns {Promise<void>} Resolves when the session is deleted. Throws on error.
499
+ */
500
+ delete: (product: string, tag: string) => Promise<void>;
501
+ /**
502
+ * Starts a new session and generates session tokens.
503
+ * @param data - The session input data.
504
+ * @returns The generated session tokens.
505
+ */
506
+ start: (data: {
507
+ product: string;
508
+ env: string;
509
+ tag: string;
510
+ data: Record<string, unknown>;
511
+ }) => Promise<import("./sessions").ISessionResult>;
512
+ /**
513
+ * Verifies a session token.
514
+ * @param data - The session verification payload.
515
+ * @returns The verification result with session data.
516
+ */
517
+ verify: (data: {
518
+ product: string;
519
+ env: string;
520
+ tag: string;
521
+ token: string;
522
+ }) => Promise<import("./sessions").IVerifyResult>;
523
+ /**
524
+ * Refreshes a session using the refresh token.
525
+ * @param data - The session refresh payload.
526
+ * @returns The new session tokens.
527
+ */
528
+ refresh: (data: {
529
+ product: string;
530
+ env: string;
531
+ tag: string;
532
+ refreshToken: string;
533
+ }) => Promise<import("./sessions").ISessionResult>;
534
+ /**
535
+ * Revokes a session.
536
+ * @param data - The session revocation payload.
537
+ * @returns The revocation result.
538
+ */
539
+ revoke: (data: {
540
+ product: string;
541
+ env: string;
542
+ tag: string;
543
+ sessionId?: string;
544
+ identifier?: string;
545
+ }) => Promise<void>;
546
+ /**
547
+ * Lists active sessions with pagination.
548
+ * @param data - The list sessions payload.
549
+ * @returns The list of sessions with pagination info.
550
+ */
551
+ listActive: (data: {
552
+ product: string;
553
+ env: string;
554
+ tag: string;
555
+ identifier?: string;
556
+ page?: number;
557
+ limit?: number;
558
+ }) => Promise<import("./sessions").IListSessionsResult>;
559
+ };
560
+ /**
561
+ * Quota-related operations for managing product quotas with weighted distribution.
562
+ */
563
+ quota: {
564
+ /**
565
+ * Defines a quota using code-first API.
566
+ * @param {IQuotaDefineOptions} options - The quota definition options.
567
+ * @param {string} [options.product] - The product tag (if provided, registers immediately).
568
+ * @param {string} options.tag - The quota tag.
569
+ * @param {string} [options.name] - The quota name.
570
+ * @param {string} [options.description] - The quota description.
571
+ * @param {Object} [options.input] - The input schema definition.
572
+ * @param {Function} options.handler - The handler function to configure the quota.
573
+ * @returns {Promise<IDefinedQuota>} The defined quota.
574
+ */
575
+ define: (options: IQuotaDefineOptions) => Promise<IDefinedQuota>;
576
+ /**
577
+ * Creates a quota for a product.
578
+ * @param {string} product - The product tag.
579
+ * @param {any} data - The quota data (schema or defined quota).
580
+ * @returns {Promise<any>} The created quota schema.
581
+ */
582
+ create: (product: string, data: any) => Promise<IProductQuota>;
583
+ /**
584
+ * Fetches a quota by tag.
585
+ * @param {string} product - The product tag.
586
+ * @param {string} tag - The quota tag.
587
+ * @returns {Promise<any>} The fetched quota.
588
+ */
589
+ fetch: (product: string, tag: string) => Promise<IProductQuota>;
590
+ /**
591
+ * Fetches all quotas for a product.
592
+ * @param {string} product - The product tag.
593
+ * @returns {Promise<any[]>} The list of quotas.
594
+ */
595
+ list: (product: string) => Promise<IProductQuota[]>;
596
+ /**
597
+ * Updates a quota by tag.
598
+ * @param {string} product - The product tag.
599
+ * @param {string} tag - The quota tag.
600
+ * @param {any} data - The quota data to update.
601
+ * @returns {Promise<any>} The updated quota schema.
602
+ */
603
+ update: (product: string, tag: string, data: any) => Promise<void>;
604
+ /**
605
+ * Deletes a quota by tag.
606
+ * @param {string} product - The product tag.
607
+ * @param {string} tag - The quota tag.
608
+ * @returns {Promise<void>} Resolves when the quota is deleted.
609
+ */
610
+ delete: (product: string, tag: string) => Promise<void>;
611
+ /**
612
+ * Runs a quota with weighted distribution.
613
+ * @param {Object} data - The quota run input.
614
+ * @param {string} data.product - The product tag.
615
+ * @param {string} data.env - The environment slug.
616
+ * @param {string} data.tag - The quota tag.
617
+ * @param {Record<string, unknown>} data.input - The input data for the quota.
618
+ * @returns {Promise<any>} The result of the quota execution.
619
+ */
620
+ run: (data: {
621
+ product: string;
622
+ env: string;
623
+ tag: string;
624
+ input: Record<string, unknown>;
625
+ }) => Promise<import("./resilience/quota.service").IQuotaRunResult<unknown>>;
626
+ /**
627
+ * Dispatches a quota for deferred execution.
628
+ * @param {Object} data - The quota dispatch input.
629
+ * @param {string} data.product - The product tag.
630
+ * @param {string} data.env - The environment slug.
631
+ * @param {string} data.tag - The quota tag.
632
+ * @param {Record<string, unknown>} data.input - The input data for the quota.
633
+ * @param {IDispatchSchedule} [data.schedule] - Optional schedule for deferred execution.
634
+ * @returns {Promise<{ jobId: string }>} The dispatch result with job ID.
635
+ */
636
+ dispatch: (data: {
637
+ product: string;
638
+ env: string;
639
+ tag: string;
640
+ input: Record<string, unknown>;
641
+ schedule?: IDispatchSchedule;
642
+ }) => Promise<{
643
+ jobId: string;
151
644
  }>;
152
- fetch: (tag: string) => Promise<IApp>;
153
- update: (tag: string, data: Partial<IApp>) => Promise<void>;
154
- init: (appTag: string) => Promise<void>;
155
- variables: {
156
- create: (data: IAppVariables) => Promise<void>;
157
- fetchAll: () => IAppVariables[];
158
- fetch: (tag: string) => IAppVariables;
159
- update: (tag: string, data: Partial<IAppVariables>) => Promise<void>;
160
- };
161
- constants: {
162
- create: (data: IAppConstants) => Promise<void>;
163
- fetchAll: () => IAppConstants[];
164
- fetch: (tag: string) => IAppConstants;
165
- update: (tag: string, data: Partial<IAppVariables>) => Promise<void>;
166
- };
167
- actions: {
168
- import: ({ file, type, version, appTag, updateIfExists, }: {
169
- file: Buffer;
170
- type: ImportDocsTypes;
171
- version: string;
172
- appTag?: string;
173
- updateIfExists?: boolean;
174
- }) => Promise<void>;
175
- update: (tag: string, data: Partial<IActionUpdate>) => Promise<void>;
176
- fetchAll: () => IAppAction[];
177
- fetch: (tag: string) => IAppAction;
178
- };
179
- auths: {
180
- create: (data: IAppAuth) => Promise<void>;
181
- fetchAll: () => IAppAuth[];
182
- fetch: (tag: string) => IAppAuth;
183
- update: (tag: string, data: Partial<IAppAuth>) => Promise<void>;
184
- };
185
- webhooks: {
186
- create: (data: Partial<IAppWebhook>) => Promise<void>;
187
- fetchAll: () => IAppWebhook[];
188
- fetch: (tag: string) => IAppWebhook;
189
- update: (tag: string, data: Partial<IAppWebhook>) => Promise<void>;
190
- events: {
191
- create: (data: IAppWebhookEvent) => Promise<void>;
192
- fetchAll: (webhookTag: string) => IAppWebhookEvent[];
193
- fetch: (tag: string) => IAppWebhookEvent;
194
- update: (tag: string, data: Partial<IAppWebhookEvent>) => Promise<void>;
195
- };
196
- };
197
- environments: {
198
- create: (data: IAppEnv) => Promise<void>;
199
- fetchAll: () => IAppEnv[];
200
- fetch: (slug: string) => IAppEnv;
201
- update: (slug: string, data: Partial<IAppEnv>) => Promise<void>;
202
- };
203
- validation: (selector: string, update: Partial<IParsedSample>) => Promise<void>;
204
645
  };
205
- processor: {
206
- job: {
207
- schedule: (data: IProduct) => Promise<void>;
208
- };
209
- action: {
210
- run: (data: IActionProcessorInput) => Promise<any>;
211
- };
212
- db: {
213
- execute: (data: IDBActionProcessorInput) => Promise<any>;
214
- migration: {
215
- run: ({ migration, env, product }: {
216
- migration: string;
217
- env: string;
218
- product: string;
219
- }) => Promise<{
220
- process_id: string;
221
- }>;
222
- rollback: ({ migration, env, product }: {
223
- migration: string;
224
- env: string;
225
- product: string;
226
- }) => Promise<{
227
- process_id: string;
228
- }>;
229
- };
230
- };
231
- sessions: {
232
- generate: (data: ISessionInput) => Promise<import("./types").ISessionOutput>;
233
- decrypt: (data: ISessionPayload) => Promise<void>;
234
- };
235
- feature: {
236
- run: (data: IProcessorInput) => Promise<{
237
- process_id: string;
238
- }>;
239
- output: (process_id: string) => Promise<{
240
- process_id: string;
241
- status: import("./types").LogEventStatus;
242
- data: Record<string, unknown>;
243
- errors?: undefined;
244
- } | {
245
- process_id: string;
246
- status: import("./types").LogEventStatus;
247
- errors: string[];
248
- data?: undefined;
249
- } | {
250
- process_id: string;
251
- status: import("./types").LogEventStatus;
252
- data?: undefined;
253
- errors?: undefined;
254
- }>;
255
- replay: (process_id: string) => Promise<{
256
- process_id: string;
257
- }>;
258
- resume: (process_id: string) => Promise<{
259
- process_id: string;
260
- }>;
261
- };
262
- quota: {
263
- run: (data: IProcessorInput) => Promise<any>;
264
- };
265
- fallback: {
266
- run: (data: IProcessorInput) => Promise<any>;
267
- };
268
- notification: {
269
- send: (data: INotificationProcessorInput) => Promise<{
270
- process_id: string;
271
- }>;
272
- };
273
- storage: {
274
- readFile: (path: string) => Promise<IFileReadResult>;
275
- save: (data: IStorageProcessorInput) => Promise<any>;
276
- };
277
- messageBroker: {
278
- publish: (data: IMessageBrokerPublishInput) => Promise<void | {
279
- process_id: string;
280
- }>;
281
- subcribe: (data: IMessageBrokerSubscribeInput) => Promise<void | {
282
- process_id: string;
283
- }>;
284
- };
646
+ /**
647
+ * Fallback-related operations for managing product fallbacks with sequential failover.
648
+ */
649
+ fallback: {
650
+ /**
651
+ * Defines a fallback using code-first API.
652
+ * @param {IFallbackDefineOptions} options - The fallback definition options.
653
+ * @param {string} [options.product] - The product tag (if provided, registers immediately).
654
+ * @param {string} options.tag - The fallback tag.
655
+ * @param {string} [options.name] - The fallback name.
656
+ * @param {string} [options.description] - The fallback description.
657
+ * @param {Object} [options.input] - The input schema definition.
658
+ * @param {Function} options.handler - The handler function to configure the fallback.
659
+ * @returns {Promise<IDefinedFallback>} The defined fallback.
660
+ */
661
+ define: (options: IFallbackDefineOptions) => Promise<IDefinedFallback>;
662
+ /**
663
+ * Creates a fallback for a product.
664
+ * @param {string} product - The product tag.
665
+ * @param {any} data - The fallback data (schema or defined fallback).
666
+ * @returns {Promise<any>} The created fallback schema.
667
+ */
668
+ create: (product: string, data: any) => Promise<IProductFallback>;
669
+ /**
670
+ * Fetches a fallback by tag.
671
+ * @param {string} product - The product tag.
672
+ * @param {string} tag - The fallback tag.
673
+ * @returns {Promise<any>} The fetched fallback.
674
+ */
675
+ fetch: (product: string, tag: string) => Promise<IProductFallback>;
676
+ /**
677
+ * Fetches all fallbacks for a product.
678
+ * @param {string} product - The product tag.
679
+ * @returns {Promise<any[]>} The list of fallbacks.
680
+ */
681
+ list: (product: string) => Promise<IProductFallback[]>;
682
+ /**
683
+ * Updates a fallback by tag.
684
+ * @param {string} product - The product tag.
685
+ * @param {string} tag - The fallback tag.
686
+ * @param {any} data - The fallback data to update.
687
+ * @returns {Promise<any>} The updated fallback schema.
688
+ */
689
+ update: (product: string, tag: string, data: any) => Promise<void>;
690
+ /**
691
+ * Deletes a fallback by tag.
692
+ * @param {string} product - The product tag.
693
+ * @param {string} tag - The fallback tag.
694
+ * @returns {Promise<void>} Resolves when the fallback is deleted.
695
+ */
696
+ delete: (product: string, tag: string) => Promise<void>;
697
+ /**
698
+ * Runs a fallback with sequential failover.
699
+ * @param {Object} data - The fallback run input.
700
+ * @param {string} data.product - The product tag.
701
+ * @param {string} data.env - The environment slug.
702
+ * @param {string} data.tag - The fallback tag.
703
+ * @param {Record<string, unknown>} data.input - The input data for the fallback.
704
+ * @returns {Promise<any>} The result of the fallback execution.
705
+ */
706
+ run: (data: {
707
+ product: string;
708
+ env: string;
709
+ tag: string;
710
+ input: Record<string, unknown>;
711
+ }) => Promise<import("./resilience/fallback.service").IFallbackRunResult<unknown>>;
712
+ /**
713
+ * Dispatches a fallback for deferred execution.
714
+ * @param {Object} data - The fallback dispatch input.
715
+ * @param {string} data.product - The product tag.
716
+ * @param {string} data.env - The environment slug.
717
+ * @param {string} data.tag - The fallback tag.
718
+ * @param {Record<string, unknown>} data.input - The input data for the fallback.
719
+ * @param {IDispatchSchedule} [data.schedule] - Optional schedule for deferred execution.
720
+ * @returns {Promise<{ jobId: string }>} The dispatch result with job ID.
721
+ */
722
+ dispatch: (data: {
723
+ product: string;
724
+ env: string;
725
+ tag: string;
726
+ input: Record<string, unknown>;
727
+ schedule?: IDispatchSchedule;
728
+ }) => Promise<{
729
+ jobId: string;
730
+ }>;
285
731
  };
286
- logs: {
287
- init: (productTag?: string, appTag?: string) => Promise<void>;
288
- add: () => Promise<void>;
732
+ /**
733
+ * Healthcheck-related operations for managing product healthchecks.
734
+ */
735
+ health: {
289
736
  /**
290
- * Fetches logs based on provded query parameters.
291
- *
292
- * @param params.component - Required. Specifies the component type ('app' or 'product')
293
- * @param params.type - Optional. Type of analysis ('apps', 'process', 'feature', 'integrations', etc.)
294
- * @param params.groupBy - Optional. Time period for grouping ('day', 'week', 'month', 'year')
295
- * @param params.search - Optional. Search term for filtering logs
296
- * @param params.page - Optional. Page number for pagination (≥ 1)
297
- * @param params.limit - Optional. Number of items per page (≥ 1)
298
- * @param params.status - Optional. Filter by status ('success', 'processing', 'fail')
299
- *
300
- * For component='app':
301
- * @param params.tag - Optional. Tag identifier (only valid when type='actions')
302
- * @param params.env - Optional. Environment filter
303
- * @param params.name - Optional. Name filter
304
- * @param params.action - Optional. Specific action filter
305
- *
306
- * For component='product':
307
- * @param params.env - Optional. Environment filter
308
- * @param params.name - Optional. Name filter
309
- * @param params.action - Optional. Specific action filter
310
- *
311
- * @throws {Error} If logger service is not initialized
312
- * @throws {Error} If required parameters are missing or invalid
313
- * @throws {Error} If API request fails
737
+ * Defines a healthcheck using code-first API.
738
+ * @param {IHealthcheckDefineOptions} options - The healthcheck definition options.
739
+ * @param {string} [options.product] - The product tag (if provided, registers immediately).
740
+ * @param {string} options.tag - The healthcheck tag.
741
+ * @param {string} [options.name] - The healthcheck name.
742
+ * @param {string} [options.description] - The healthcheck description.
743
+ * @param {Function} options.handler - The handler function to configure the healthcheck.
744
+ * @returns {Promise<IDefinedHealthcheck>} The defined healthcheck.
745
+ */
746
+ define: (options: IHealthcheckDefineOptions) => Promise<IDefinedHealthcheck>;
747
+ /**
748
+ * Creates a healthcheck for a product.
749
+ * @param {string} product - The product tag.
750
+ * @param {Object} data - The healthcheck data (schema or defined healthcheck).
751
+ * @returns {Promise<IHealthcheckSchema>} The created healthcheck schema.
752
+ */
753
+ create: (product: string, data: any) => Promise<import("./resilience").IHealthcheckSchema>;
754
+ /**
755
+ * Fetches a healthcheck by tag.
756
+ * @param {string} product - The product tag.
757
+ * @param {string} tag - The healthcheck tag.
758
+ * @returns {Promise<IHealthcheckSchema>} The fetched healthcheck.
759
+ */
760
+ fetch: (product: string, tag: string) => Promise<import("./resilience").IHealthcheckSchema>;
761
+ /**
762
+ * Fetches all healthchecks for a product.
763
+ * @param {string} product - The product tag.
764
+ * @returns {Promise<IHealthcheckSchema[]>} The list of healthchecks.
765
+ */
766
+ list: (product: string) => Promise<import("./resilience").IHealthcheckSchema[]>;
767
+ /**
768
+ * Updates a healthcheck by tag.
769
+ * @param {string} product - The product tag.
770
+ * @param {string} tag - The healthcheck tag.
771
+ * @param {Object} data - The healthcheck data to update.
772
+ * @returns {Promise<IHealthcheckSchema>} The updated healthcheck schema.
773
+ */
774
+ update: (product: string, tag: string, data: any) => Promise<import("./resilience").IHealthcheckSchema>;
775
+ /**
776
+ * Deletes a healthcheck by tag.
777
+ * @param {string} product - The product tag.
778
+ * @param {string} tag - The healthcheck tag.
779
+ * @returns {Promise<void>} Resolves when the healthcheck is deleted.
780
+ */
781
+ delete: (product: string, tag: string) => Promise<void>;
782
+ /**
783
+ * Gets the current status of a healthcheck.
784
+ * @param {Object} options - The status check options.
785
+ * @param {string} options.product - The product tag.
786
+ * @param {string} options.env - The environment slug.
787
+ * @param {string} options.tag - The healthcheck tag.
788
+ * @returns {Promise<IHealthcheckStatus>} The healthcheck status.
789
+ */
790
+ status: (options: {
791
+ product: string;
792
+ env: string;
793
+ tag: string;
794
+ }) => Promise<import("./resilience").IHealthcheckStatus>;
795
+ /**
796
+ * Manually triggers a healthcheck run.
797
+ * @param {Object} options - The run options.
798
+ * @param {string} options.product - The product tag.
799
+ * @param {string} options.env - The environment slug.
800
+ * @param {string} options.tag - The healthcheck tag.
801
+ * @returns {Promise<IHealthcheckRunResult>} The result of the healthcheck run.
802
+ */
803
+ run: (options: {
804
+ product: string;
805
+ env: string;
806
+ tag: string;
807
+ }) => Promise<import("./resilience").IHealthcheckRunResult>;
808
+ /**
809
+ * Checks the health of a service (alias for status).
810
+ * @param {Object} options - The check options.
811
+ * @param {string} options.product - The product tag.
812
+ * @param {string} options.env - The environment slug.
813
+ * @param {string} options.tag - The healthcheck tag.
814
+ * @returns {Promise<IHealthcheckStatus>} The healthcheck status.
815
+ */
816
+ check: (options: {
817
+ product: string;
818
+ env: string;
819
+ tag: string;
820
+ }) => Promise<import("./resilience").IHealthcheckStatus>;
821
+ };
822
+ /**
823
+ * Storage-related operations for managing product storages.
824
+ */
825
+ storage: {
826
+ /**
827
+ * Creates a storage for a product.
828
+ * @param {string} product - The product tag.
829
+ * @param {IProductStorage} data - The storage data.
830
+ * @returns {Promise<void>} Resolves when the storage is created. Throws on error.
831
+ */
832
+ create: (data: IProductStorage & {
833
+ product: string;
834
+ }) => Promise<void>;
835
+ /**
836
+ * Creates a storage for a product (alternative method).
837
+ const builder = await this.getProductBuilder(product);
838
+ return builder.createStorage(data);
839
+ },
840
+ /**
841
+ * Fetches all storages for a product.
842
+ * @param {string} product - The product tag.
843
+ * @returns {IProductStorage[]} The list of storages.
844
+ */
845
+ list: (product: string) => Promise<IProductStorage[]>;
846
+ /**
847
+ * Fetches a storage by tag.
848
+ * @param {string} product - The product tag.
849
+ * @param {string} tag - The storage tag.
850
+ * @returns {IProductStorage|null} The fetched storage, or null if not found.
851
+ */
852
+ fetch: (product: string, tag: string) => Promise<IProductStorage>;
853
+ /**
854
+ * Updates a storage by tag.
855
+ * @param {string} product - The product tag.
856
+ * @param {string} tag - The storage tag.
857
+ * @param {Partial<IProductStorage>} data - The storage data to update.
858
+ * @returns {Promise<void>} Resolves when the storage is updated. Throws on error.
859
+ */
860
+ update: (product: string, tag: string, data: Partial<IProductStorage>) => Promise<void>;
861
+ /**
862
+ * Fetches storage files for a product.
863
+ * @param {string} product - The product tag.
864
+ * @param {IFetchFilesPayload} data - The fetch files payload.
865
+ * @returns {Promise<void>} Resolves when the storage files are fetched. Throws on error.
866
+ */
867
+ /**
868
+ * Deletes a storage by tag.
869
+ * @param {string} product - The product tag.
870
+ * @param {string} tag - The storage tag.
871
+ * @returns {Promise<void>} Resolves when the storage is deleted. Throws on error.
872
+ */
873
+ delete: (product: string, tag: string) => Promise<void>;
874
+ /**
875
+ * Reads a file from local storage.
876
+ * @param {string} path - The file path.
877
+ * @returns {Promise<IFileReadResult>} The file read result.
878
+ */
879
+ readFile: (path: string) => Promise<IFileReadResult>;
880
+ /**
881
+ * Saves data to storage using the storage processor.
882
+ * @param {IStorageProcessorInput} data - The storage processor input.
883
+ * @returns {Promise<any>} The result of the storage processing.
884
+ * @example
885
+ * await ductape.storage.save({
886
+ * product: 'my-product',
887
+ * env: 'production',
888
+ * event: 'upload-file',
889
+ * input: { buffer: fileData, fileName: 'report.pdf', mimeType: 'application/pdf' }
890
+ * });
891
+ * @deprecated Use upload() instead for direct cloud storage operations
892
+ */
893
+ save: (data: IStorageProcessorInput) => Promise<any>;
894
+ /**
895
+ * Uploads a file to cloud storage.
896
+ * @param {Object} data - The upload options.
897
+ * @returns {Promise<IStorageResult>} The upload result with file URL.
898
+ * @example
899
+ * await ductape.storage.upload({
900
+ * product: 'my-product',
901
+ * env: 'production',
902
+ * storage: 's3-bucket',
903
+ * fileName: 'documents/report.pdf',
904
+ * buffer: fileBuffer,
905
+ * mimeType: 'application/pdf'
906
+ * });
907
+ */
908
+ upload: (data: {
909
+ product: string;
910
+ env: string;
911
+ storage: string;
912
+ fileName: string;
913
+ buffer: string | Buffer;
914
+ mimeType?: string;
915
+ }) => Promise<import("./storage").IStorageResult>;
916
+ /**
917
+ * Downloads a file from cloud storage.
918
+ * @param data - The download options.
919
+ * @returns The download result with file data.
920
+ * @example
921
+ * const result = await ductape.storage.download({
922
+ * product: 'my-product',
923
+ * env: 'production',
924
+ * storage: 's3-bucket',
925
+ * fileName: 'documents/report.pdf'
926
+ * });
927
+ */
928
+ download: (data: {
929
+ product: string;
930
+ env: string;
931
+ storage: string;
932
+ fileName: string;
933
+ }) => Promise<import("./storage").IDownloadResult>;
934
+ /**
935
+ * Removes a file from cloud storage.
936
+ * @param data - The delete options.
937
+ * @returns The delete result.
938
+ * @example
939
+ * await ductape.storage.remove({
940
+ * product: 'my-product',
941
+ * env: 'production',
942
+ * storage: 's3-bucket',
943
+ * fileName: 'documents/report.pdf'
944
+ * });
945
+ */
946
+ remove: (data: {
947
+ product: string;
948
+ env: string;
949
+ storage: string;
950
+ fileName: string;
951
+ }) => Promise<import("./storage").IDeleteResult>;
952
+ /**
953
+ * Lists files in cloud storage with pagination.
954
+ * @param data - The list options.
955
+ * @returns The list result with files and pagination info.
956
+ * @example
957
+ * const result = await ductape.storage.list({
958
+ * product: 'my-product',
959
+ * env: 'production',
960
+ * storage: 's3-bucket',
961
+ * prefix: 'documents/',
962
+ * limit: 100
963
+ * });
964
+ */
965
+ files: (data: {
966
+ product: string;
967
+ env: string;
968
+ storage: string;
969
+ prefix?: string;
970
+ limit?: number;
971
+ continuationToken?: string;
972
+ }) => Promise<import("./storage").IListFilesResult>;
973
+ /**
974
+ * Generates a signed URL for temporary file access.
975
+ * @param data - The signed URL options.
976
+ * @returns The signed URL result.
977
+ * @example
978
+ * const result = await ductape.storage.getSignedUrl({
979
+ * product: 'my-product',
980
+ * env: 'production',
981
+ * storage: 's3-bucket',
982
+ * fileName: 'documents/report.pdf',
983
+ * expiresIn: 3600,
984
+ * action: 'read'
985
+ * });
986
+ */
987
+ getSignedUrl: (data: {
988
+ product: string;
989
+ env: string;
990
+ storage: string;
991
+ fileName: string;
992
+ expiresIn?: number;
993
+ action?: "read" | "write";
994
+ }) => Promise<import("./storage").ISignedUrlResult>;
995
+ /**
996
+ * Dispatches a storage operation to run as a scheduled job.
997
+ * @param {IStorageDispatchInput} data - The storage dispatch input.
998
+ * @returns {Promise<IDispatchResult>} The dispatch result with job ID and status.
999
+ * @example
1000
+ * // Schedule a file backup in 6 hours
1001
+ * await ductape.storage.dispatch({
1002
+ * product: 'my-product',
1003
+ * env: 'production',
1004
+ * storage: 's3-storage',
1005
+ * event: 'backup-files',
1006
+ * input: { buffer: fileData, fileName: 'backup.zip', mimeType: 'application/zip' },
1007
+ * schedule: { start_at: Date.now() + 21600000 }
1008
+ * });
314
1009
  *
315
- * @returns {Promise<any>} The fetched log data
1010
+ * // Run daily backups
1011
+ * await ductape.storage.dispatch({
1012
+ * product: 'my-product',
1013
+ * env: 'production',
1014
+ * storage: 's3-storage',
1015
+ * event: 'daily-backup',
1016
+ * input: { buffer: fileData, fileName: 'daily.zip', mimeType: 'application/zip' },
1017
+ * schedule: { cron: '0 2 * * *' } // Daily at 2 AM
1018
+ * });
1019
+ */
1020
+ dispatch: (data: IStorageDispatchInput) => Promise<IDispatchResult>;
1021
+ };
1022
+ /**
1023
+ * Events-related operations for managing product events (message brokers).
1024
+ */
1025
+ messaging: {
1026
+ /**
1027
+ * Creates a message broker for a product.
1028
+ * @param {string} product - The product tag.
1029
+ * @param {Partial<IProductMessageBroker>} data - The message broker data.
1030
+ * @returns {Promise<void>} Resolves when the message broker is created. Throws on error.
1031
+ */
1032
+ create: (data: Partial<IProductMessageBroker> & {
1033
+ product: string;
1034
+ }) => Promise<void>;
1035
+ /**
1036
+ * Fetches all message brokers for a product.
1037
+ * @param {string} product - The product tag.
1038
+ * @returns {IProductMessageBroker[]} The list of message brokers.
1039
+ */
1040
+ list: (product: string) => Promise<IProductMessageBroker[]>;
1041
+ /**
1042
+ * Fetches a message broker by tag.
1043
+ * @param {string} product - The product tag.
1044
+ * @param {string} tag - The message broker tag.
1045
+ * @returns {IProductMessageBroker|null} The fetched message broker, or null if not found.
1046
+ */
1047
+ fetch: (product: string, tag: string) => Promise<IProductMessageBroker>;
1048
+ /**
1049
+ * Updates a message broker by tag.
1050
+ * @param {string} product - The product tag.
1051
+ * @param {string} tag - The message broker tag.
1052
+ * @param {Partial<IProductMessageBroker>} data - The message broker data to update.
1053
+ * @returns {Promise<void>} Resolves when the message broker is updated. Throws on error.
1054
+ */
1055
+ update: (product: string, tag: string, data: Partial<IProductMessageBroker>) => Promise<void>;
1056
+ /**
1057
+ * Deletes a message broker by tag.
1058
+ * @param {string} product - The product tag.
1059
+ * @param {string} tag - The message broker tag.
1060
+ * @returns {Promise<void>} Resolves when the message broker is deleted. Throws on error.
1061
+ */
1062
+ delete: (product: string, tag: string) => Promise<void>;
1063
+ topics: {
1064
+ /**
1065
+ * Creates a message broker topic for a product.
1066
+ * @param {string} product - The product tag.
1067
+ * @param {IProductMessageBrokerTopic} data - The message broker topic data.
1068
+ * @returns {Promise<void>} Resolves when the message broker topic is created. Throws on error.
1069
+ */
1070
+ create: (product: string, data: IProductMessageBrokerTopic) => Promise<void>;
1071
+ /**
1072
+ * Fetches all message broker topics for a message broker by tag.
1073
+ * @param {string} product - The product tag.
1074
+ * @param {string} messageBrokerTag - The message broker tag.
1075
+ * @returns {IProductMessageBrokerTopic[]} The list of message broker topics.
1076
+ */
1077
+ list: (product: string, messageBrokerTag: string) => Promise<IProductMessageBrokerTopic[]>;
1078
+ /**
1079
+ * Fetches a message broker topic by tag.
1080
+ * @param {string} product - The product tag.
1081
+ * @param {string} tag - The message broker topic tag.
1082
+ * @returns {IProductMessageBrokerTopic|null} The fetched message broker topic, or null if not found.
1083
+ */
1084
+ fetch: (product: string, tag: string) => Promise<IProductMessageBrokerTopic>;
1085
+ /**
1086
+ * Updates a message broker topic by tag.
1087
+ * @param {string} product - The product tag.
1088
+ * @param {string} tag - The message broker topic tag.
1089
+ * @param {Partial<IProductMessageBrokerTopic>} data - The message broker topic data to update.
1090
+ * @returns {Promise<void>} Resolves when the message broker topic is updated. Throws on error.
1091
+ */
1092
+ update: (product: string, tag: string, data: Partial<IProductMessageBrokerTopic>) => Promise<void>;
1093
+ };
1094
+ /**
1095
+ * Publishes a message using the BrokersService.
1096
+ * @param data - The publish input.
1097
+ * @returns The result of the publish operation.
1098
+ * @example
1099
+ * await ductape.events.publish({
1100
+ * product: 'my-product',
1101
+ * env: 'production',
1102
+ * event: 'broker-tag:topic-tag',
1103
+ * message: { orderId: '123', status: 'pending' }
1104
+ * });
1105
+ */
1106
+ produce: (data: {
1107
+ product: string;
1108
+ env: string;
1109
+ event: string;
1110
+ message: Record<string, unknown>;
1111
+ }) => Promise<import("./brokers").IPublishResult>;
1112
+ /**
1113
+ * consume to a message broker topic.
1114
+ * @param data - The subscribe input.
1115
+ * @returns The result of the subscribe operation.
1116
+ * @example
1117
+ * await ductape.events.consume({
1118
+ * product: 'my-product',
1119
+ * env: 'production',
1120
+ * event: 'broker-tag:topic-tag',
1121
+ * callback: async (message) => console.log(message)
1122
+ * });
1123
+ */
1124
+ consume: (data: {
1125
+ product: string;
1126
+ env: string;
1127
+ event: string;
1128
+ callback: (message: object) => Promise<void>;
1129
+ }) => Promise<import("./brokers").ISubscribeResult>;
1130
+ /**
1131
+ * Dispatches a publish operation to run as a scheduled job.
1132
+ * @param {IPublishDispatchInput} data - The publish dispatch input.
1133
+ * @returns {Promise<IDispatchResult>} The dispatch result with job ID and status.
1134
+ * @example
1135
+ * // Schedule a message to be published in 15 minutes
1136
+ * await ductape.events.dispatch({
1137
+ * product: 'my-product',
1138
+ * env: 'production',
1139
+ * broker: 'kafka-broker',
1140
+ * event: 'order-created',
1141
+ * input: { message: { orderId: '123', status: 'pending' } },
1142
+ * schedule: { start_at: Date.now() + 900000 }
1143
+ * });
316
1144
  *
1145
+ * // Publish messages at regular intervals
1146
+ * await ductape.events.dispatch({
1147
+ * product: 'my-product',
1148
+ * env: 'production',
1149
+ * broker: 'redis-broker',
1150
+ * event: 'heartbeat',
1151
+ * input: { message: { ping: true } },
1152
+ * schedule: { every: 60000 } // Every minute
1153
+ * });
1154
+ */
1155
+ dispatch: (data: IPublishDispatchInput) => Promise<IDispatchResult>;
1156
+ };
1157
+ /**
1158
+ * Notification-related operations for managing product notifications.
1159
+ */
1160
+ notifications: {
1161
+ /**
1162
+ * Creates a notification for a product.
1163
+ * @param {string} product - The product tag.
1164
+ * @param {IProductNotification} data - The notification data.
1165
+ * @returns {Promise<void>} Resolves when the notification is created. Throws on error.
1166
+ */
1167
+ create: (product: string, data: IProductNotification) => Promise<void>;
1168
+ /**
1169
+ * Fetches all notifications for a product.
1170
+ * @param {string} product - The product tag.
1171
+ * @returns {IProductNotification[]} The list of notifications.
1172
+ */
1173
+ list: (product: string) => Promise<IProductNotification[]>;
1174
+ /**
1175
+ * Fetches a notification by tag.
1176
+ * @param {string} product - The product tag.
1177
+ * @param {string} tag - The notification tag.
1178
+ * @returns {IProductNotification|null} The fetched notification, or null if not found.
1179
+ */
1180
+ fetch: (product: string, tag: string) => Promise<IProductNotification>;
1181
+ /**
1182
+ * Updates a notification by tag.
1183
+ * @param {string} product - The product tag.
1184
+ * @param {string} tag - The notification tag.
1185
+ * @param {Partial<IProductNotification>} data - The notification data to update.
1186
+ * @returns {Promise<void>} Resolves when the notification is updated. Throws on error.
1187
+ */
1188
+ update: (product: string, tag: string, data: Partial<IProductNotification>) => Promise<void>;
1189
+ /**
1190
+ * Deletes a notification by tag.
1191
+ * @param {string} product - The product tag.
1192
+ * @param {string} tag - The notification tag.
1193
+ * @returns {Promise<void>} Resolves when the notification is deleted. Throws on error.
1194
+ */
1195
+ delete: (product: string, tag: string) => Promise<void>;
1196
+ messages: {
1197
+ /**
1198
+ * Creates a notification message for a product.
1199
+ * @param {string} product - The product tag.
1200
+ * @param {IProductNotificationTemplate} data - The notification message data.
1201
+ * @returns {Promise<void>} Resolves when the notification message is created. Throws on error.
1202
+ */
1203
+ create: (product: string, data: IProductNotificationTemplate) => Promise<void>;
1204
+ /**
1205
+ * Fetches all notification messages for a notification by tag.
1206
+ * @param {string} product - The product tag.
1207
+ * @param {string} notificationTag - The notification tag.
1208
+ * @returns {IProductNotificationTemplate[]} The list of notification messages.
1209
+ */
1210
+ list: (product: string, notificationTag: string) => Promise<IProductNotificationTemplate[]>;
1211
+ /**
1212
+ * Fetches a notification message by tag.
1213
+ * @param {string} product - The product tag.
1214
+ * @param {string} tag - The notification message tag.
1215
+ * @returns {IProductNotificationTemplate|null} The fetched notification message, or null if not found.
1216
+ */
1217
+ fetch: (product: string, tag: string) => Promise<IProductNotificationTemplate>;
1218
+ /**
1219
+ * Updates a notification message by tag.
1220
+ * @param {string} product - The product tag.
1221
+ * @param {string} tag - The notification message tag.
1222
+ * @param {Partial<IProductNotificationTemplate>} data - The notification message data to update.
1223
+ * @returns {Promise<void>} Resolves when the notification message is updated. Throws on error.
1224
+ */
1225
+ update: (product: string, tag: string, data: Partial<IProductNotificationTemplate>) => Promise<void>;
1226
+ };
1227
+ /**
1228
+ * Sends a notification immediately using the notification processor.
1229
+ * @param {INotificationProcessorInput} data - The notification processor input.
1230
+ * @returns {Promise<any>} The result of the notification processing.
1231
+ * @example
1232
+ * await ductape.notifications.send({
1233
+ * product: 'my-product',
1234
+ * env: 'production',
1235
+ * event: 'welcome-email',
1236
+ * input: { email: { recipients: ['user@example.com'], subject: { name: 'John' } } }
1237
+ * });
1238
+ */
1239
+ send: (data: INotificationProcessorInput) => Promise<{
1240
+ process_id: string;
1241
+ }>;
1242
+ /**
1243
+ * Dispatches a notification to be sent as a scheduled job.
1244
+ * @param {INotificationDispatchInput} data - The notification dispatch input.
1245
+ * @returns {Promise<IDispatchResult>} The dispatch result with job ID and status.
317
1246
  * @example
318
- * // Fetch app logs
319
- * const appLogs = await logs.fetch({
320
- * component: 'app',
321
- * type: 'actions',
322
- * groupBy: 'day',
323
- * limit: 20
1247
+ * // Schedule a notification to be sent in 1 hour
1248
+ * await ductape.notifications.dispatch({
1249
+ * product: 'my-product',
1250
+ * env: 'production',
1251
+ * notification: 'user-notifications',
1252
+ * event: 'welcome-email',
1253
+ * input: { email: { to: 'user@example.com' } },
1254
+ * schedule: { start_at: Date.now() + 3600000 }
324
1255
  * });
325
1256
  *
326
- * // Fetch product logs
327
- * const productLogs = await logs.fetch({
328
- * component: 'product',
329
- * type: 'database',
330
- * status: 'success'
1257
+ * // Send recurring notifications
1258
+ * await ductape.notifications.dispatch({
1259
+ * product: 'my-product',
1260
+ * env: 'production',
1261
+ * notification: 'digest',
1262
+ * event: 'weekly-digest',
1263
+ * input: { email: { to: 'user@example.com' } },
1264
+ * schedule: { cron: '0 9 * * 1' } // Weekly on Monday at 9 AM
331
1265
  * });
332
1266
  */
1267
+ dispatch: (data: INotificationDispatchInput) => Promise<IDispatchResult>;
1268
+ };
1269
+ /**
1270
+ * Database operations service.
1271
+ * Provides a unified API for database CRUD operations, schema management, queries, and migrations.
1272
+ *
1273
+ * @example
1274
+ * // Register a new database
1275
+ * await ductape.databases.create({
1276
+ * product: 'my-product',
1277
+ * name: 'User Database',
1278
+ * tag: 'users-db',
1279
+ * type: DatabaseType.POSTGRESQL,
1280
+ * envs: [{ slug: 'dev', connection_url: 'postgresql://localhost/mydb' }],
1281
+ * });
1282
+ *
1283
+ * // Connect to database
1284
+ * await ductape.databases.connect({ env: 'dev', product: 'my-product', database: 'users-db' });
1285
+ */
1286
+ databases: {
1287
+ /**
1288
+ * Create/register a new database configuration
1289
+ */
1290
+ create: (config: Parameters<DatabaseService["create"]>[0]) => Promise<void>;
1291
+ /**
1292
+ * Register a database for a product (alias for create with product)
1293
+ */
1294
+ register: (product: string, data: IProductDatabase) => Promise<void>;
1295
+ /**
1296
+ * Fetch all databases for a product
1297
+ */
1298
+ list: (product: string) => Promise<IProductDatabase[]>;
1299
+ /**
1300
+ * Fetch a specific database
1301
+ */
1302
+ fetch: (product: string, database: string) => Promise<IProductDatabase>;
1303
+ /**
1304
+ * Update a database configuration
1305
+ */
1306
+ update: (product: string, database: string, data: Partial<IProductDatabase>) => Promise<void>;
1307
+ /**
1308
+ * Update local database configuration
1309
+ */
1310
+ updateLocalConfig: (tag: string, updates: Parameters<DatabaseService["updateLocalConfig"]>[1]) => Promise<void>;
1311
+ /**
1312
+ * Connect to a database
1313
+ */
1314
+ connect: (config: Parameters<DatabaseService["connect"]>[0]) => Promise<import("./database").DatabaseConnection>;
1315
+ /**
1316
+ * Test database connection
1317
+ */
1318
+ testConnection: (config: Parameters<DatabaseService["testConnection"]>[0]) => Promise<import("./database").IConnectionResult>;
1319
+ /**
1320
+ * Disconnect from the current database
1321
+ */
1322
+ disconnect: () => Promise<void>;
1323
+ /**
1324
+ * Close all database connections
1325
+ */
1326
+ closeAll: () => Promise<void>;
1327
+ /**
1328
+ * Get current connection context
1329
+ */
1330
+ getCurrentContext: () => Promise<import("./database").IConnectionContext>;
1331
+ /**
1332
+ * Get a connection-scoped interface for a specific database/environment
1333
+ */
1334
+ connection: (database: string, env: string) => Promise<import("./database").DatabaseConnection>;
1335
+ /**
1336
+ * Query records from a table
1337
+ */
1338
+ query: <T = any>(options: Parameters<DatabaseService["query"]>[0]) => Promise<import("./database").IQueryResult<T>>;
1339
+ /**
1340
+ * Insert records into a table
1341
+ */
1342
+ insert: <T = any>(options: Parameters<DatabaseService["insert"]>[0]) => Promise<import("./database").IInsertResult<T>>;
1343
+ /**
1344
+ * Update records in a table
1345
+ */
1346
+ updateRecords: <T = any>(options: Parameters<DatabaseService["update"]>[0]) => Promise<import("./database").IUpdateResult<T>>;
1347
+ /**
1348
+ * Delete records from a table
1349
+ */
1350
+ delete: (options: Parameters<DatabaseService["delete"]>[0]) => Promise<import("./database").IDeleteResult>;
1351
+ /**
1352
+ * Insert or update a record based on conflict keys
1353
+ */
1354
+ upsert: <T = any>(options: Parameters<DatabaseService["upsert"]>[0]) => Promise<import("./database").IUpsertResult<T>>;
1355
+ /**
1356
+ * Count records
1357
+ */
1358
+ count: (options: Parameters<DatabaseService["count"]>[0]) => Promise<number>;
1359
+ /**
1360
+ * Sum values of a column
1361
+ */
1362
+ sum: (options: Parameters<DatabaseService["sum"]>[0]) => Promise<number>;
1363
+ /**
1364
+ * Calculate average of a column
1365
+ */
1366
+ avg: (options: Parameters<DatabaseService["avg"]>[0]) => Promise<number>;
1367
+ /**
1368
+ * Get minimum value of a column
1369
+ */
1370
+ min: (options: Parameters<DatabaseService["min"]>[0]) => Promise<any>;
1371
+ /**
1372
+ * Get maximum value of a column
1373
+ */
1374
+ max: (options: Parameters<DatabaseService["max"]>[0]) => Promise<any>;
1375
+ /**
1376
+ * Perform multiple aggregations in one query
1377
+ */
1378
+ aggregate: (options: Parameters<DatabaseService["aggregate"]>[0]) => Promise<import("./database").IAggregateResult>;
1379
+ /**
1380
+ * Begin a database transaction
1381
+ */
1382
+ beginTransaction: (options: Parameters<DatabaseService["beginTransaction"]>[0]) => Promise<import("./database").ITransaction>;
1383
+ /**
1384
+ * Schema operations sub-object - provides a simplified Mongoose-style API for schema management.
1385
+ * These operations work on the currently connected database context.
1386
+ */
1387
+ schema: {
1388
+ /**
1389
+ * Create a collection/table with Mongoose-style schema definition
1390
+ * @example
1391
+ * await ductape.databases.schema.create('users', {
1392
+ * name: 'string',
1393
+ * email: { type: 'string', unique: true },
1394
+ * age: 'number',
1395
+ * createdAt: 'date',
1396
+ * });
1397
+ */
1398
+ create: (name: string, definition: ISimpleSchemaDefinition, options?: ISimpleCreateOptions) => Promise<ISchemaOperationResult>;
1399
+ /**
1400
+ * Drop a collection/table
1401
+ */
1402
+ drop: (name: string, options?: ISimpleDropOptions) => Promise<ISchemaOperationResult>;
1403
+ /**
1404
+ * Add a field to a collection
1405
+ */
1406
+ addField: (collection: string, fieldName: string, definition: SimpleFieldType | ISimpleFieldDefinition) => Promise<ISchemaOperationResult>;
1407
+ /**
1408
+ * Drop a field from a collection
1409
+ */
1410
+ dropField: (collection: string, fieldName: string) => Promise<ISchemaOperationResult>;
1411
+ /**
1412
+ * Rename a field in a collection
1413
+ */
1414
+ renameField: (collection: string, oldName: string, newName: string) => Promise<ISchemaOperationResult>;
1415
+ /**
1416
+ * Modify a field's definition
1417
+ */
1418
+ modifyField: (collection: string, fieldName: string, changes: Partial<ISimpleFieldDefinition>) => Promise<ISchemaOperationResult>;
1419
+ /**
1420
+ * Create an index on a collection
1421
+ */
1422
+ createIndex: (collection: string, fields: string[] | IIndexFieldDefinition[], options?: ISimpleIndexOptions) => Promise<ISchemaOperationResult>;
1423
+ /**
1424
+ * Drop an index from a collection
1425
+ */
1426
+ dropIndex: (collection: string, indexName: string) => Promise<ISchemaOperationResult>;
1427
+ /**
1428
+ * Add a constraint (SQL databases only)
1429
+ */
1430
+ addConstraint: (collection: string, constraint: IMigrationConstraintDefinition) => Promise<ISchemaOperationResult>;
1431
+ /**
1432
+ * Drop a constraint (SQL databases only)
1433
+ */
1434
+ dropConstraint: (collection: string, constraintName: string) => Promise<ISchemaOperationResult>;
1435
+ /**
1436
+ * Rename a collection/table
1437
+ */
1438
+ rename: (oldName: string, newName: string) => Promise<ISchemaOperationResult>;
1439
+ /**
1440
+ * Check if a collection/table exists
1441
+ */
1442
+ exists: (name: string) => Promise<boolean>;
1443
+ /**
1444
+ * List all collections/tables
1445
+ */
1446
+ list: (schemaName?: string) => Promise<string[]>;
1447
+ /**
1448
+ * Get detailed schema information for a collection
1449
+ */
1450
+ describe: (name: string) => Promise<ITableSchema>;
1451
+ /**
1452
+ * List indexes on a collection
1453
+ */
1454
+ indexes: (collection: string) => Promise<IIndexInfo[]>;
1455
+ };
1456
+ /**
1457
+ * Migration CRUD sub-object
1458
+ */
1459
+ migration: {
1460
+ create: (options: {
1461
+ product: string;
1462
+ database: string;
1463
+ data: {
1464
+ name: string;
1465
+ tag: string;
1466
+ description?: string;
1467
+ value: {
1468
+ up: string[];
1469
+ down: string[];
1470
+ };
1471
+ };
1472
+ }) => Promise<void>;
1473
+ update: (options: {
1474
+ product: string;
1475
+ tag: string;
1476
+ data: {
1477
+ name?: string;
1478
+ description?: string;
1479
+ value?: {
1480
+ up: string[];
1481
+ down: string[];
1482
+ };
1483
+ };
1484
+ }) => Promise<void>;
1485
+ fetch: (options: {
1486
+ product: string;
1487
+ tag: string;
1488
+ }) => Promise<any>;
1489
+ list: (options: {
1490
+ product: string;
1491
+ database: string;
1492
+ }) => Promise<any[]>;
1493
+ delete: (options: {
1494
+ product: string;
1495
+ tag: string;
1496
+ }) => Promise<void>;
1497
+ /**
1498
+ * Run a migration
1499
+ */
1500
+ run: (migrations: Parameters<DatabaseService["runMigration"]>[0], options?: Parameters<DatabaseService["runMigration"]>[1]) => Promise<Map<string, import("./database").IMigrationResult>>;
1501
+ /**
1502
+ * Rollback migrations
1503
+ */
1504
+ rollback: (migrations: Parameters<DatabaseService["rollbackMigration"]>[0], count?: number) => Promise<Map<string, import("./database").IMigrationResult>>;
1505
+ /**
1506
+ * Get migration history
1507
+ */
1508
+ history: () => Promise<import("./database").IMigrationHistory[]>;
1509
+ /**
1510
+ * Get migration status
1511
+ */
1512
+ status: (migrations: Parameters<DatabaseService["getMigrationStatus"]>[0]) => Promise<import("./database").IMigrationStatusResult>;
1513
+ };
1514
+ /**
1515
+ * Action CRUD sub-object
1516
+ */
1517
+ action: {
1518
+ create: (options: IActionCreateOptions) => Promise<void>;
1519
+ update: (options: IActionUpdateOptions) => Promise<void>;
1520
+ fetch: (tag: string) => Promise<import("./database").IActionDefinition>;
1521
+ list: (databaseTag: string) => Promise<import("./database").IActionDefinition[]>;
1522
+ delete: (tag: string) => Promise<void>;
1523
+ dispatch: (data: IDBActionDispatchInput) => Promise<IDispatchResult>;
1524
+ };
1525
+ /**
1526
+ * Dispatch a database operation as a scheduled job
1527
+ */
1528
+ dispatch: (data: Parameters<DatabaseService["dispatch"]>[0]) => Promise<IDispatchResult>;
1529
+ /**
1530
+ * Get the adapter for the current connection
1531
+ */
1532
+ getAdapter: (options?: Parameters<DatabaseService["getAdapter"]>[0]) => Promise<import("./database").BaseAdapter>;
1533
+ /**
1534
+ * Get the underlying DatabaseService instance (for advanced usage)
1535
+ */
1536
+ getService: () => Promise<DatabaseService>;
1537
+ };
1538
+ /**
1539
+ * Graph database operations service.
1540
+ * Provides a unified API for graph database operations including nodes, relationships,
1541
+ * traversals, and transactions.
1542
+ *
1543
+ * @example
1544
+ * // Register a new graph database
1545
+ * await ductape.graph.create({
1546
+ * name: 'Social Graph',
1547
+ * tag: 'social-graph',
1548
+ * type: 'neo4j',
1549
+ * envs: [{ slug: 'dev', connection_url: 'bolt://localhost:7687' }],
1550
+ * });
1551
+ */
1552
+ graph: {
1553
+ /**
1554
+ * Get the underlying GraphService instance for advanced operations.
1555
+ * @returns {Promise<GraphService>} The graph service instance.
1556
+ */
1557
+ getService: () => Promise<GraphService>;
1558
+ /**
1559
+ * Creates a graph configuration for a product.
1560
+ * @param {any} graphConfig - The graph configuration.
1561
+ * @param {string} [productTag] - The product tag.
1562
+ * @returns {Promise<void>} Resolves when the graph is created.
1563
+ */
1564
+ create: (graphConfig: IGraphConfig & {
1565
+ product: string;
1566
+ }) => Promise<void>;
1567
+ /**
1568
+ * Fetches a graph configuration by tag.
1569
+ * @param {string} [productTag] - The product tag.
1570
+ * @param {string} graphTag - The graph tag.
1571
+ * @returns {Promise<any>} The fetched graph configuration.
1572
+ */
1573
+ fetch: (productTag: string, graphTag: string) => Promise<IGraphConfig>;
1574
+ /**
1575
+ * Fetches all graph configurations for a product.
1576
+ * @param {string} [productTag] - The product tag.
1577
+ * @returns {Promise<any[]>} The list of graph configurations.
1578
+ */
1579
+ list: (productTag?: string) => Promise<IGraphConfig[]>;
1580
+ /**
1581
+ * Updates a graph configuration by tag.
1582
+ * @param {string} [productTag] - The product tag.
1583
+ * @param {string} graphTag - The graph tag.
1584
+ * @param {any} updates - The updates to apply.
1585
+ * @returns {Promise<void>} Resolves when the graph is updated.
1586
+ */
1587
+ update: (productTag: string, graphTag: string, updates: Partial<IGraphConfig>) => Promise<void>;
1588
+ /**
1589
+ * Deletes a graph configuration by tag.
1590
+ * @param {string} graphTag - The graph tag.
1591
+ * @param {string} [productTag] - The product tag.
1592
+ * @returns {Promise<void>} Resolves when the graph is deleted.
1593
+ */
1594
+ delete: (graphTag: string, productTag?: string) => Promise<void>;
1595
+ /**
1596
+ * Connects to a graph database.
1597
+ * @param {any} config - The connection configuration.
1598
+ * @returns {Promise<any>} The connection result.
1599
+ */
1600
+ connect: (config: any) => Promise<import("./graph").IGraphConnectionResult>;
1601
+ /**
1602
+ * Disconnects from the current graph database.
1603
+ * @returns {Promise<void>} Resolves when disconnected.
1604
+ */
1605
+ disconnect: () => Promise<void>;
1606
+ /**
1607
+ * Closes all graph database connections.
1608
+ * @returns {Promise<void>} Resolves when all connections are closed.
1609
+ */
1610
+ closeAll: () => Promise<void>;
1611
+ /**
1612
+ * Tests a connection to a graph database without persisting.
1613
+ * @param {any} config - The connection configuration.
1614
+ * @returns {Promise<any>} The test connection result.
1615
+ */
1616
+ testConnection: (config: any) => Promise<import("./graph").IGraphTestConnectionResult>;
1617
+ /**
1618
+ * Creates a node in the graph.
1619
+ * @param {any} options - The node creation options.
1620
+ * @param {any} [transaction] - Optional transaction.
1621
+ * @returns {Promise<any>} The created node result.
1622
+ */
1623
+ createNode: (options: any, transaction?: any) => Promise<import("./graph").ICreateNodeResult<any>>;
1624
+ /**
1625
+ * Finds nodes by criteria.
1626
+ * @param {any} options - The find options.
1627
+ * @param {any} [transaction] - Optional transaction.
1628
+ * @returns {Promise<any>} The found nodes result.
1629
+ */
1630
+ findNodes: (options: any, transaction?: any) => Promise<import("./graph").IFindNodesResult<any>>;
1631
+ /**
1632
+ * Finds a node by ID.
1633
+ * @param {string | number} id - The node ID.
1634
+ * @param {any} [transaction] - Optional transaction.
1635
+ * @returns {Promise<any>} The found node or null.
1636
+ */
1637
+ findNodeById: (id: string | number, transaction?: any) => Promise<import("./graph").INode<any>>;
1638
+ /**
1639
+ * Updates a node.
1640
+ * @param {any} options - The update options.
1641
+ * @param {any} [transaction] - Optional transaction.
1642
+ * @returns {Promise<any>} The updated node result.
1643
+ */
1644
+ updateNode: (options: any, transaction?: any) => Promise<import("./graph").IUpdateNodeResult<any>>;
1645
+ /**
1646
+ * Deletes a node.
1647
+ * @param {any} options - The delete options.
1648
+ * @param {any} [transaction] - Optional transaction.
1649
+ * @returns {Promise<any>} The delete result.
1650
+ */
1651
+ deleteNode: (options: any, transaction?: any) => Promise<import("./graph").IDeleteNodeResult>;
1652
+ /**
1653
+ * Merges a node (create or update).
1654
+ * @param {any} options - The merge options.
1655
+ * @param {any} [transaction] - Optional transaction.
1656
+ * @returns {Promise<any>} The merge result.
1657
+ */
1658
+ mergeNode: (options: any, transaction?: any) => Promise<import("./graph").IMergeNodeResult<any>>;
1659
+ /**
1660
+ * Adds labels to an existing node.
1661
+ * @param {any} options - The add labels options (id, labels).
1662
+ * @param {any} [transaction] - Optional transaction.
1663
+ * @returns {Promise<any>} The result with added labels.
1664
+ */
1665
+ addLabels: (options: any, transaction?: any) => Promise<import("./graph").IAddLabelsResult<any>>;
1666
+ /**
1667
+ * Removes labels from an existing node.
1668
+ * @param {any} options - The remove labels options (id, labels).
1669
+ * @param {any} [transaction] - Optional transaction.
1670
+ * @returns {Promise<any>} The result with removed labels.
1671
+ */
1672
+ removeLabels: (options: any, transaction?: any) => Promise<import("./graph").IRemoveLabelsResult<any>>;
1673
+ /**
1674
+ * Sets labels on a node (replaces all existing labels).
1675
+ * @param {any} options - The set labels options (id, labels).
1676
+ * @param {any} [transaction] - Optional transaction.
1677
+ * @returns {Promise<any>} The result with previous and new labels.
1678
+ */
1679
+ setLabels: (options: any, transaction?: any) => Promise<import("./graph").ISetLabelsResult<any>>;
1680
+ /**
1681
+ * Creates a relationship between nodes.
1682
+ * @param {any} options - The relationship creation options.
1683
+ * @param {any} [transaction] - Optional transaction.
1684
+ * @returns {Promise<any>} The created relationship result.
1685
+ */
1686
+ createRelationship: (options: any, transaction?: any) => Promise<import("./graph").ICreateRelationshipResult<any>>;
1687
+ /**
1688
+ * Finds relationships by criteria.
1689
+ * @param {any} options - The find options.
1690
+ * @param {any} [transaction] - Optional transaction.
1691
+ * @returns {Promise<any>} The found relationships result.
1692
+ */
1693
+ findRelationships: (options: any, transaction?: any) => Promise<import("./graph").IFindRelationshipsResult<any>>;
1694
+ /**
1695
+ * Finds a relationship by ID.
1696
+ * @param {string | number} id - The relationship ID.
1697
+ * @param {any} [transaction] - Optional transaction.
1698
+ * @returns {Promise<any>} The found relationship or null.
1699
+ */
1700
+ findRelationshipById: (id: string | number, transaction?: any) => Promise<import("./graph").IRelationship<any>>;
1701
+ /**
1702
+ * Updates a relationship.
1703
+ * @param {any} options - The update options.
1704
+ * @param {any} [transaction] - Optional transaction.
1705
+ * @returns {Promise<any>} The updated relationship result.
1706
+ */
1707
+ updateRelationship: (options: any, transaction?: any) => Promise<import("./graph").IUpdateRelationshipResult<any>>;
1708
+ /**
1709
+ * Deletes a relationship.
1710
+ * @param {any} options - The delete options.
1711
+ * @param {any} [transaction] - Optional transaction.
1712
+ * @returns {Promise<any>} The delete result.
1713
+ */
1714
+ deleteRelationship: (options: any, transaction?: any) => Promise<import("./graph").IDeleteRelationshipResult>;
1715
+ /**
1716
+ * Merges a relationship (create or update).
1717
+ * @param {any} options - The merge options.
1718
+ * @param {any} [transaction] - Optional transaction.
1719
+ * @returns {Promise<any>} The merge result.
1720
+ */
1721
+ mergeRelationship: (options: any, transaction?: any) => Promise<import("./graph").IMergeRelationshipResult<any>>;
1722
+ /**
1723
+ * Traverses the graph from a starting node.
1724
+ * @param {any} options - The traversal options.
1725
+ * @param {any} [transaction] - Optional transaction.
1726
+ * @returns {Promise<any>} The traversal result.
1727
+ */
1728
+ traverse: (options: any, transaction?: any) => Promise<import("./graph").ITraverseResult<any, any>>;
1729
+ /**
1730
+ * Finds the shortest path between two nodes.
1731
+ * @param {any} options - The shortest path options.
1732
+ * @param {any} [transaction] - Optional transaction.
1733
+ * @returns {Promise<any>} The shortest path result.
1734
+ */
1735
+ shortestPath: (options: any, transaction?: any) => Promise<import("./graph").IShortestPathResult<any, any>>;
1736
+ /**
1737
+ * Finds all paths between two nodes.
1738
+ * @param {any} options - The all paths options.
1739
+ * @param {any} [transaction] - Optional transaction.
1740
+ * @returns {Promise<any>} The all paths result.
1741
+ */
1742
+ allPaths: (options: any, transaction?: any) => Promise<import("./graph").IAllPathsResult<any, any>>;
1743
+ /**
1744
+ * Gets the neighborhood of a node.
1745
+ * @param {any} options - The neighborhood options.
1746
+ * @param {any} [transaction] - Optional transaction.
1747
+ * @returns {Promise<any>} The neighborhood result.
1748
+ */
1749
+ getNeighborhood: (options: any, transaction?: any) => Promise<import("./graph").INeighborhoodResult<any, any>>;
1750
+ /**
1751
+ * Finds connected components in the graph.
1752
+ * @param {any} options - The connected components options.
1753
+ * @param {any} [transaction] - Optional transaction.
1754
+ * @returns {Promise<any>} The connected components result.
1755
+ */
1756
+ findConnectedComponents: (options: any, transaction?: any) => Promise<import("./graph").IConnectedComponentsResult<any>>;
1757
+ /**
1758
+ * Executes a raw Cypher query against the graph database.
1759
+ * @param {string} query - The Cypher query string.
1760
+ * @param {Record<string, any>} [params] - Query parameters.
1761
+ * @param {any} [transaction] - Optional transaction.
1762
+ * @returns {Promise<any>} The query result.
1763
+ */
1764
+ query: (query: string, params?: Record<string, any>, transaction?: any) => Promise<import("./graph").IRawQueryResult<any>>;
1765
+ /**
1766
+ * Gets graph statistics.
1767
+ * @param {any} [transaction] - Optional transaction.
1768
+ * @returns {Promise<any>} The graph statistics.
1769
+ */
1770
+ getStatistics: (transaction?: any) => Promise<import("./graph").IGraphStatistics>;
1771
+ /**
1772
+ * Counts nodes matching criteria.
1773
+ * @param {string[]} [labels] - Node labels to filter by.
1774
+ * @param {any} [where] - Where clause for filtering.
1775
+ * @param {any} [transaction] - Optional transaction.
1776
+ * @returns {Promise<any>} The count result.
1777
+ */
1778
+ countNodes: (labels?: string[], where?: any, transaction?: any) => Promise<import("./graph").ICountNodesResult>;
1779
+ /**
1780
+ * Counts relationships matching criteria.
1781
+ * @param {string[]} [types] - Relationship types to filter by.
1782
+ * @param {any} [where] - Where clause for filtering.
1783
+ * @param {any} [transaction] - Optional transaction.
1784
+ * @returns {Promise<any>} The count result.
1785
+ */
1786
+ countRelationships: (types?: string[], where?: any, transaction?: any) => Promise<import("./graph").ICountRelationshipsResult>;
1787
+ /**
1788
+ * Performs full-text search.
1789
+ * @param {any} options - The search options.
1790
+ * @param {any} [transaction] - Optional transaction.
1791
+ * @returns {Promise<any>} The search result.
1792
+ */
1793
+ fullTextSearch: (options: any, transaction?: any) => Promise<import("./graph").IFullTextSearchResult<any>>;
1794
+ /**
1795
+ * Performs vector similarity search.
1796
+ * @param {any} options - The search options.
1797
+ * @param {any} [transaction] - Optional transaction.
1798
+ * @returns {Promise<any>} The search result.
1799
+ */
1800
+ vectorSearch: (options: any, transaction?: any) => Promise<import("./graph").IVectorSearchResult<any>>;
1801
+ /**
1802
+ * Creates a node index.
1803
+ * @param {any} options - The index creation options.
1804
+ * @returns {Promise<any>} The index creation result.
1805
+ */
1806
+ createNodeIndex: (options: any) => Promise<import("./graph").ICreateIndexResult>;
1807
+ /**
1808
+ * Creates a node constraint.
1809
+ * @param {any} options - The constraint creation options.
1810
+ * @returns {Promise<any>} The constraint creation result.
1811
+ */
1812
+ createNodeConstraint: (options: any) => Promise<import("./graph").ICreateConstraintResult>;
1813
+ /**
1814
+ * Creates a relationship index.
1815
+ * @param {any} options - The index creation options.
1816
+ * @returns {Promise<any>} The index creation result.
1817
+ */
1818
+ createRelationshipIndex: (options: any) => Promise<import("./graph").ICreateIndexResult>;
1819
+ /**
1820
+ * Lists all indexes.
1821
+ * @returns {Promise<any>} The list of indexes.
1822
+ */
1823
+ listIndexes: () => Promise<import("./graph").IListIndexesResult>;
1824
+ /**
1825
+ * Lists all constraints.
1826
+ * @returns {Promise<any>} The list of constraints.
1827
+ */
1828
+ listConstraints: () => Promise<import("./graph").IListConstraintsResult>;
1829
+ /**
1830
+ * Drops an index by name.
1831
+ * @param {string} name - The index name.
1832
+ * @returns {Promise<any>} The drop result.
1833
+ */
1834
+ dropIndex: (name: string) => Promise<import("./graph").IDropIndexResult>;
1835
+ /**
1836
+ * Drops a constraint by name.
1837
+ * @param {string} name - The constraint name.
1838
+ * @returns {Promise<any>} The drop result.
1839
+ */
1840
+ dropConstraint: (name: string) => Promise<import("./graph").IDropConstraintResult>;
1841
+ /**
1842
+ * Lists all node labels.
1843
+ * @returns {Promise<any>} The list of labels.
1844
+ */
1845
+ listLabels: () => Promise<import("./graph").IListLabelsResult>;
1846
+ /**
1847
+ * Lists all relationship types.
1848
+ * @returns {Promise<any>} The list of relationship types.
1849
+ */
1850
+ listRelationshipTypes: () => Promise<import("./graph").IListRelationshipTypesResult>;
1851
+ /**
1852
+ * Creates a graph action.
1853
+ * @param {any} options - The action creation options.
1854
+ * @param {string} [productTag] - The product tag.
1855
+ * @returns {Promise<any>} The created action.
1856
+ */
1857
+ createAction: (options: any, productTag?: string) => Promise<import("./graph").IGraphAction>;
1858
+ /**
1859
+ * Lists graph actions.
1860
+ * @param {string} [graphTag] - The graph tag.
1861
+ * @param {string} [productTag] - The product tag.
1862
+ * @returns {Promise<any>} The list of actions.
1863
+ */
1864
+ listActions: (graphTag?: string, productTag?: string) => Promise<import("./graph").IListGraphActionsResult>;
1865
+ /**
1866
+ * Gets a graph action by tag.
1867
+ * @param {string} actionTag - The action tag.
1868
+ * @param {string} [graphTag] - The graph tag.
1869
+ * @param {string} [productTag] - The product tag.
1870
+ * @returns {Promise<any>} The action or null.
1871
+ */
1872
+ getAction: (actionTag: string, graphTag?: string, productTag?: string) => Promise<import("./graph").IGraphAction>;
1873
+ /**
1874
+ * Updates a graph action.
1875
+ * @param {string} actionTag - The action tag.
1876
+ * @param {any} updates - The updates to apply.
1877
+ * @param {string} [graphTag] - The graph tag.
1878
+ * @param {string} [productTag] - The product tag.
1879
+ * @returns {Promise<any>} The updated action.
1880
+ */
1881
+ updateAction: (actionTag: string, updates: any, graphTag?: string, productTag?: string) => Promise<import("./graph").IGraphAction>;
1882
+ /**
1883
+ * Deletes a graph action.
1884
+ * @param {string} actionTag - The action tag.
1885
+ * @param {string} [graphTag] - The graph tag.
1886
+ * @param {string} [productTag] - The product tag.
1887
+ * @returns {Promise<void>} Resolves when the action is deleted.
1888
+ */
1889
+ deleteAction: (actionTag: string, graphTag?: string, productTag?: string) => Promise<void>;
1890
+ /**
1891
+ * Begins a new transaction.
1892
+ * @param {any} [options] - Transaction options.
1893
+ * @returns {Promise<any>} The transaction object.
1894
+ */
1895
+ beginTransaction: (options?: any) => Promise<import("./graph").IGraphTransaction>;
1896
+ /**
1897
+ * Commits a transaction.
1898
+ * @param {any} transaction - The transaction to commit.
1899
+ * @returns {Promise<void>} Resolves when committed.
1900
+ */
1901
+ commitTransaction: (transaction: any) => Promise<void>;
1902
+ /**
1903
+ * Rolls back a transaction.
1904
+ * @param {any} transaction - The transaction to rollback.
1905
+ * @returns {Promise<void>} Resolves when rolled back.
1906
+ */
1907
+ rollbackTransaction: (transaction: any) => Promise<void>;
1908
+ /**
1909
+ * Dispatches a graph operation for deferred execution.
1910
+ * @param {any} data - The dispatch input.
1911
+ * @returns {Promise<any>} The dispatch result.
1912
+ */
1913
+ dispatch: (data: any) => Promise<IDispatchResult>;
1914
+ };
1915
+ /**
1916
+ * Workflow service for building and executing durable workflows.
1917
+ *
1918
+ * @example
1919
+ * // Create a workflow from JSON schema
1920
+ * await ductape.workflows.create('my-product', {
1921
+ * tag: 'order-fulfillment',
1922
+ * name: 'Order Fulfillment',
1923
+ * steps: [...],
1924
+ * });
1925
+ */
1926
+ workflows: {
1927
+ /**
1928
+ * Get the underlying WorkflowService instance
1929
+ */
1930
+ getService: () => Promise<WorkflowService>;
1931
+ };
1932
+ /**
1933
+ * Agents service for building and executing AI-driven agentic workflows.
1934
+ *
1935
+ * @example
1936
+ * // Define an agent
1937
+ * await ductape.agents.define({
1938
+ * tag: 'customer-support',
1939
+ * name: 'Customer Support Agent',
1940
+ * model: { provider: 'anthropic', model: 'claude-sonnet-4-20250514' },
1941
+ * });
1942
+ */
1943
+ agents: {
1944
+ /**
1945
+ * Get the underlying AgentsService instance
1946
+ */
1947
+ getService: () => Promise<AgentsService>;
1948
+ };
1949
+ /**
1950
+ * LLM Model operations for managing model configurations.
1951
+ *
1952
+ * @example
1953
+ * // Create a model configuration
1954
+ * await ductape.models.create({
1955
+ * product: 'my-product',
1956
+ * tag: 'claude-sonnet',
1957
+ * name: 'Claude Sonnet',
1958
+ * provider: 'anthropic',
1959
+ * });
1960
+ */
1961
+ models: {
1962
+ /**
1963
+ * Get the underlying ModelService instance
1964
+ */
1965
+ getService: () => Promise<ModelService>;
1966
+ };
1967
+ /**
1968
+ * Vector database operations service.
1969
+ *
1970
+ * @example
1971
+ * // Create a vector database configuration
1972
+ * await ductape.vector.create({
1973
+ * product: 'my-product',
1974
+ * tag: 'embeddings',
1975
+ * name: 'Document Embeddings',
1976
+ * });
1977
+ */
1978
+ vector: {
1979
+ /**
1980
+ * Get the underlying VectorDatabaseService instance for advanced operations.
1981
+ * @returns {Promise<VectorDatabaseService>} The vector database service instance.
1982
+ */
1983
+ getService: () => Promise<VectorDatabaseService>;
1984
+ /**
1985
+ * Creates a vector database configuration for a product.
1986
+ * @param {ICreateVectorDbOptions} options - The vector configuration options.
1987
+ * @returns {Promise<void>} Resolves when the vector config is created.
1988
+ */
1989
+ create: (options: ICreateVectorDbOptions) => Promise<void>;
1990
+ /**
1991
+ * Fetches a vector database configuration by tag.
1992
+ * @param {IFetchVectorOptions} options - The fetch options.
1993
+ * @returns {Promise<IProductVector | null>} The fetched vector configuration.
1994
+ */
1995
+ fetch: (options: import("./vector/vector-database.service").IFetchVectorOptions) => Promise<import("./types").IProductVector>;
1996
+ /**
1997
+ * Fetches all vector database configurations for a product.
1998
+ * @param {object} options - The fetch options containing product tag.
1999
+ * @returns {Promise<IProductVector[]>} The list of vector configurations.
2000
+ */
2001
+ list: (options: {
2002
+ product: string;
2003
+ }) => Promise<import("./types").IProductVector[]>;
2004
+ /**
2005
+ * Updates a vector database configuration.
2006
+ * @param {IUpdateVectorDbOptions} options - The update options.
2007
+ * @returns {Promise<void>} Resolves when the vector config is updated.
2008
+ */
2009
+ update: (options: import("./vector/vector-database.service").IUpdateVectorDbOptions) => Promise<void>;
2010
+ /**
2011
+ * Deletes a vector database configuration.
2012
+ * @param {IDeleteVectorConfigOptions} options - The delete options.
2013
+ * @returns {Promise<void>} Resolves when the vector config is deleted.
2014
+ */
2015
+ delete: (options: import("./vector/vector-database.service").IDeleteVectorConfigOptions) => Promise<void>;
2016
+ /**
2017
+ * Connects to a vector database.
2018
+ * @param {object} options - Connection options with product, env, and vector.
2019
+ * @returns {Promise<VectorService>} The connected vector service.
2020
+ */
2021
+ connect: (options: {
2022
+ product: string;
2023
+ env: string;
2024
+ vector: string;
2025
+ }) => Promise<import("./vector").VectorService>;
2026
+ /**
2027
+ * Disconnects from a specific vector database.
2028
+ * @param {object} options - Disconnect options with product, env, and vector.
2029
+ * @returns {Promise<void>} Resolves when disconnected.
2030
+ */
2031
+ disconnect: (options: {
2032
+ product: string;
2033
+ env: string;
2034
+ vector: string;
2035
+ }) => Promise<void>;
2036
+ /**
2037
+ * Disconnects all cached vector database connections.
2038
+ * @returns {Promise<void>} Resolves when all connections are closed.
2039
+ */
2040
+ disconnectAll: () => Promise<void>;
2041
+ /**
2042
+ * Query vectors by similarity.
2043
+ * @param {IProductVectorQueryOptions} options - The query options.
2044
+ * @returns {Promise<IQueryVectorsResult>} The query results.
2045
+ */
2046
+ query: (options: import("./vector/vector-database.service").IProductVectorQueryOptions) => Promise<import("./vector").IQueryVectorsResult>;
2047
+ /**
2048
+ * Upsert vectors (insert or update).
2049
+ * @param {IProductVectorUpsertOptions} options - The upsert options.
2050
+ * @returns {Promise<IUpsertVectorsResult>} The upsert result.
2051
+ */
2052
+ upsert: (options: import("./vector/vector-database.service").IProductVectorUpsertOptions) => Promise<import("./vector").IUpsertVectorsResult>;
2053
+ /**
2054
+ * Fetch vectors by IDs.
2055
+ * @param {IProductVectorFetchOptions} options - The fetch options.
2056
+ * @returns {Promise<IFetchVectorsResult>} The fetched vectors.
2057
+ */
2058
+ fetchVectors: (options: import("./vector/vector-database.service").IProductVectorFetchOptions) => Promise<import("./vector").IFetchVectorsResult>;
2059
+ /**
2060
+ * Delete vectors by IDs.
2061
+ * @param {IProductVectorDeleteOptions} options - The delete options.
2062
+ * @returns {Promise<IDeleteVectorsResult>} The delete result.
2063
+ */
2064
+ deleteVectors: (options: import("./vector/vector-database.service").IProductVectorDeleteOptions) => Promise<import("./vector").IDeleteVectorsResult>;
2065
+ /**
2066
+ * Find similar vectors to a given vector.
2067
+ * @param {object} options - Find similar options with product, env, tag, vector, and topK.
2068
+ * @returns {Promise<IQueryVectorsResult>} The similar vectors.
2069
+ */
2070
+ findSimilar: (options: {
2071
+ product: string;
2072
+ env: string;
2073
+ vector: string;
2074
+ values: number[];
2075
+ topK?: number;
2076
+ filter?: any;
2077
+ namespace?: string;
2078
+ includeValues?: boolean;
2079
+ includeMetadata?: boolean;
2080
+ }) => Promise<import("./vector").IQueryVectorsResult>;
2081
+ /**
2082
+ * Upsert a single vector.
2083
+ * @param {object} options - Single vector upsert options.
2084
+ * @returns {Promise<IUpsertVectorsResult>} The upsert result.
2085
+ */
2086
+ upsertOne: (options: {
2087
+ product: string;
2088
+ env: string;
2089
+ tag: string;
2090
+ id: string;
2091
+ values: number[];
2092
+ metadata?: Record<string, unknown>;
2093
+ namespace?: string;
2094
+ }) => Promise<import("./vector").IUpsertVectorsResult>;
2095
+ /**
2096
+ * Fetch a single vector by ID.
2097
+ * @param {object} options - Single vector fetch options.
2098
+ * @returns {Promise<IVector | null>} The fetched vector or null.
2099
+ */
2100
+ fetchOne: (options: {
2101
+ product: string;
2102
+ env: string;
2103
+ vector: string;
2104
+ id: string;
2105
+ namespace?: string;
2106
+ }) => Promise<import("./vector").IVector>;
2107
+ /**
2108
+ * Update a single vector.
2109
+ * @param {object} options - Update options.
2110
+ * @returns {Promise<IUpdateVectorResult>} The update result.
2111
+ */
2112
+ updateVector: (options: {
2113
+ product: string;
2114
+ env: string;
2115
+ vector: string;
2116
+ id: string;
2117
+ values?: number[];
2118
+ setMetadata?: Record<string, unknown>;
2119
+ mergeMetadata?: Record<string, unknown>;
2120
+ namespace?: string;
2121
+ }) => Promise<import("./vector").IUpdateVectorResult>;
2122
+ /**
2123
+ * Update vector metadata.
2124
+ * @param {object} options - Update metadata options.
2125
+ * @returns {Promise<IUpdateVectorResult>} The update result.
2126
+ */
2127
+ updateMetadata: (options: {
2128
+ product: string;
2129
+ env: string;
2130
+ vector: string;
2131
+ id: string;
2132
+ metadata: Record<string, unknown>;
2133
+ merge?: boolean;
2134
+ namespace?: string;
2135
+ }) => Promise<import("./vector").IUpdateVectorResult>;
2136
+ /**
2137
+ * Delete vectors by IDs (convenience method).
2138
+ * @param {object} options - Delete by IDs options.
2139
+ * @returns {Promise<IDeleteVectorsResult>} The delete result.
2140
+ */
2141
+ deleteByIds: (options: {
2142
+ product: string;
2143
+ env: string;
2144
+ vector: string;
2145
+ ids: string[];
2146
+ namespace?: string;
2147
+ }) => Promise<import("./vector").IDeleteVectorsResult>;
2148
+ /**
2149
+ * Delete all vectors in a namespace.
2150
+ * @param {object} options - Delete all options.
2151
+ * @returns {Promise<IDeleteVectorsResult>} The delete result.
2152
+ */
2153
+ deleteAll: (options: {
2154
+ product: string;
2155
+ env: string;
2156
+ vector: string;
2157
+ namespace?: string;
2158
+ }) => Promise<import("./vector").IDeleteVectorsResult>;
2159
+ /**
2160
+ * List vector IDs.
2161
+ * @param {object} options - List options.
2162
+ * @returns {Promise<IListVectorsResult>} The list result.
2163
+ */
2164
+ listVectors: (options: {
2165
+ product: string;
2166
+ env: string;
2167
+ vector: string;
2168
+ namespace?: string;
2169
+ prefix?: string;
2170
+ limit?: number;
2171
+ cursor?: string;
2172
+ }) => Promise<import("./vector").IListVectorsResult>;
2173
+ /**
2174
+ * List all vector IDs (paginated).
2175
+ * @param {object} options - List all options.
2176
+ * @returns {Promise<string[]>} All vector IDs.
2177
+ */
2178
+ listAllVectors: (options: {
2179
+ product: string;
2180
+ env: string;
2181
+ vector: string;
2182
+ namespace?: string;
2183
+ prefix?: string;
2184
+ }) => Promise<string[]>;
2185
+ /**
2186
+ * List available namespaces.
2187
+ * @param {object} options - Namespace list options.
2188
+ * @returns {Promise<IListNamespacesResult>} The namespaces.
2189
+ */
2190
+ listNamespaces: (options: {
2191
+ product: string;
2192
+ env: string;
2193
+ vector: string;
2194
+ }) => Promise<import("./vector").IListNamespacesResult>;
2195
+ /**
2196
+ * Delete a namespace.
2197
+ * @param {object} options - Namespace delete options.
2198
+ * @returns {Promise<void>} Resolves when deleted.
2199
+ */
2200
+ deleteNamespace: (options: {
2201
+ product: string;
2202
+ env: string;
2203
+ vector: string;
2204
+ namespace: string;
2205
+ }) => Promise<void>;
2206
+ /**
2207
+ * Describe the current index.
2208
+ * @param {object} options - Index describe options.
2209
+ * @returns {Promise<IVectorIndexInfo>} The index info.
2210
+ */
2211
+ describeIndex: (options: {
2212
+ product: string;
2213
+ env: string;
2214
+ vector: string;
2215
+ }) => Promise<import("./vector").IVectorIndexInfo>;
2216
+ /**
2217
+ * Get index statistics.
2218
+ * @param {object} options - Stats options.
2219
+ * @returns {Promise<IVectorIndexStats>} The index stats.
2220
+ */
2221
+ getStats: (options: {
2222
+ product: string;
2223
+ env: string;
2224
+ vector: string;
2225
+ }) => Promise<import("./vector").IVectorIndexStats>;
2226
+ /**
2227
+ * Create a new index.
2228
+ * @param {object} options - Create index options.
2229
+ * @returns {Promise<ICreateIndexResult>} The create result.
2230
+ */
2231
+ createIndex: (options: {
2232
+ product: string;
2233
+ env: string;
2234
+ vector: string;
2235
+ name: string;
2236
+ dimensions: number;
2237
+ metric?: import("./vector").DistanceMetric;
2238
+ replicas?: number;
2239
+ shards?: number;
2240
+ }) => Promise<import("./vector").ICreateIndexResult>;
2241
+ /**
2242
+ * Delete an index.
2243
+ * @param {object} options - Delete index options.
2244
+ * @returns {Promise<IDeleteIndexResult>} The delete result.
2245
+ */
2246
+ deleteIndex: (options: {
2247
+ product: string;
2248
+ env: string;
2249
+ vector: string;
2250
+ name: string;
2251
+ }) => Promise<import("./vector").IDeleteIndexResult>;
2252
+ /**
2253
+ * List all indexes.
2254
+ * @param {object} options - List indexes options.
2255
+ * @returns {Promise<IVectorIndexInfo[]>} The list of indexes.
2256
+ */
2257
+ listIndexes: (options: {
2258
+ product: string;
2259
+ env: string;
2260
+ vector: string;
2261
+ }) => Promise<import("./vector").IVectorIndexInfo[]>;
2262
+ /**
2263
+ * Count vectors in the index.
2264
+ * @param {object} options - Count options.
2265
+ * @returns {Promise<number>} The vector count.
2266
+ */
2267
+ count: (options: {
2268
+ product: string;
2269
+ env: string;
2270
+ vector: string;
2271
+ namespace?: string;
2272
+ }) => Promise<number>;
2273
+ /**
2274
+ * Check if a vector exists.
2275
+ * @param {object} options - Exists check options.
2276
+ * @returns {Promise<boolean>} True if exists.
2277
+ */
2278
+ exists: (options: {
2279
+ product: string;
2280
+ env: string;
2281
+ vector: string;
2282
+ id: string;
2283
+ namespace?: string;
2284
+ }) => Promise<boolean>;
2285
+ /**
2286
+ * Test connection to a vector database.
2287
+ * @param {object} options - Test connection options.
2288
+ * @returns {Promise<boolean>} True if connection is healthy.
2289
+ */
2290
+ testConnection: (options: {
2291
+ product: string;
2292
+ env: string;
2293
+ vector: string;
2294
+ }) => Promise<boolean>;
2295
+ /**
2296
+ * Check if a feature is supported.
2297
+ * @param {object} options - Feature check options.
2298
+ * @returns {Promise<boolean>} True if supported.
2299
+ */
2300
+ supportsFeature: (options: {
2301
+ product: string;
2302
+ env: string;
2303
+ vector: string;
2304
+ feature: import("./vector").VectorFeature;
2305
+ }) => Promise<boolean>;
2306
+ /**
2307
+ * Get all supported features.
2308
+ * @param {object} options - Get features options.
2309
+ * @returns {Promise<VectorFeature[]>} The supported features.
2310
+ */
2311
+ getSupportedFeatures: (options: {
2312
+ product: string;
2313
+ env: string;
2314
+ vector: string;
2315
+ }) => Promise<import("./vector").VectorFeature[]>;
2316
+ };
2317
+ /**
2318
+ * Job-related operations for managing product jobs.
2319
+ */
2320
+ jobs: {
2321
+ /**
2322
+ * Creates a job for a product.
2323
+ * @param {string} product - The product tag.
2324
+ * @param {Partial<IProductJobs>} data - The job data.
2325
+ * @returns {Promise<void>} Resolves when the job is created. Throws on error.
2326
+ */
2327
+ create: (product: string, data: Partial<IProductJobs>) => Promise<void>;
2328
+ /**
2329
+ * Fetches all jobs for a product.
2330
+ * @param {string} product - The product tag.
2331
+ * @returns {IProductJobs[]} The list of jobs.
2332
+ */
2333
+ list: (product: string) => Promise<IProductJobs[]>;
2334
+ /**
2335
+ * Fetches a job by tag.
2336
+ * @param {string} product - The product tag.
2337
+ * @param {string} tag - The job tag.
2338
+ * @returns {IProductJobs|null} The fetched job, or null if not found.
2339
+ */
2340
+ fetch: (product: string, tag: string) => Promise<IProductJobs>;
2341
+ /**
2342
+ * Updates a job by tag.
2343
+ * @param {string} product - The product tag.
2344
+ * @param {string} tag - The job tag.
2345
+ * @param {Partial<IProductJobs>} data - The job data to update.
2346
+ * @returns {Promise<void>} Resolves when the job is updated. Throws on error.
2347
+ */
2348
+ update: (product: string, tag: string, data: Partial<IProductJobs>) => Promise<void>;
2349
+ /**
2350
+ * Deletes a job by tag.
2351
+ * @param {string} product - The product tag.
2352
+ * @param {string} tag - The job tag.
2353
+ * @returns {Promise<void>} Resolves when the job is deleted. Throws on error.
2354
+ */
2355
+ delete: (product: string, tag: string) => Promise<void>;
2356
+ /**
2357
+ * Get a scheduled/running job by ID
2358
+ * @param jobId - The job ID
2359
+ * @returns The job details or null if not found
2360
+ * @example
2361
+ * const job = await ductape.jobs.get('job_abc123');
2362
+ * console.log(job.status); // 'scheduled', 'running', 'completed', etc.
2363
+ */
2364
+ get: (jobId: string) => Promise<import("./jobs").IJob>;
2365
+ /**
2366
+ * List jobs with filtering options
2367
+ * @param options - Filter options
2368
+ * @returns Paginated list of jobs
2369
+ * @example
2370
+ * const { jobs, total } = await ductape.jobs.listJobs({
2371
+ * product: 'my-product',
2372
+ * status: JobStatus.SCHEDULED,
2373
+ * limit: 20,
2374
+ * });
2375
+ */
2376
+ listJobs: (options?: IJobListOptions) => Promise<import("./jobs").IJobListResult>;
2377
+ /**
2378
+ * Cancel a scheduled or running job
2379
+ * @param jobId - The job ID
2380
+ * @param options - Cancel options
2381
+ * @returns The cancelled job or null
2382
+ * @example
2383
+ * await ductape.jobs.cancel('job_abc123', { reason: 'User requested' });
2384
+ */
2385
+ cancel: (jobId: string, options?: ICancelOptions) => Promise<import("./jobs").IJob>;
2386
+ /**
2387
+ * Cancel multiple jobs matching a filter
2388
+ * @param filter - Filter to match jobs
2389
+ * @returns Count of cancelled jobs
2390
+ */
2391
+ cancelMany: (filter: {
2392
+ product?: string;
2393
+ status?: JobStatus;
2394
+ }) => Promise<{
2395
+ count: number;
2396
+ }>;
2397
+ /**
2398
+ * Pause a recurring job
2399
+ * @param jobId - The job ID
2400
+ * @returns The paused job or null
2401
+ * @example
2402
+ * await ductape.jobs.pause('job_abc123');
2403
+ */
2404
+ pause: (jobId: string) => Promise<import("./jobs").IJob>;
2405
+ /**
2406
+ * Pause multiple jobs matching a filter
2407
+ * @param filter - Filter to match jobs
2408
+ * @returns Count of paused jobs
2409
+ */
2410
+ pauseMany: (filter: {
2411
+ product?: string;
2412
+ recurring?: boolean;
2413
+ }) => Promise<{
2414
+ count: number;
2415
+ }>;
2416
+ /**
2417
+ * Resume a paused job
2418
+ * @param jobId - The job ID
2419
+ * @returns The resumed job or null
2420
+ * @example
2421
+ * await ductape.jobs.resume('job_abc123');
2422
+ */
2423
+ resume: (jobId: string) => Promise<import("./jobs").IJob>;
2424
+ /**
2425
+ * Resume multiple jobs matching a filter
2426
+ * @param filter - Filter to match jobs
2427
+ * @returns Count of resumed jobs
2428
+ */
2429
+ resumeMany: (filter: {
2430
+ product?: string;
2431
+ status?: JobStatus;
2432
+ }) => Promise<{
2433
+ count: number;
2434
+ }>;
2435
+ /**
2436
+ * Retry a failed job
2437
+ * @param jobId - The job ID
2438
+ * @param options - Retry options
2439
+ * @returns The retried job or null
2440
+ * @example
2441
+ * await ductape.jobs.retry('job_abc123', { delay: 5000 });
2442
+ */
2443
+ retry: (jobId: string, options?: IRetryOptions) => Promise<import("./jobs").IJob>;
2444
+ /**
2445
+ * Retry multiple failed jobs matching a filter
2446
+ * @param filter - Filter to match jobs
2447
+ * @returns Count of retried jobs
2448
+ */
2449
+ retryMany: (filter: {
2450
+ status?: JobStatus;
2451
+ from?: number | string;
2452
+ }) => Promise<{
2453
+ count: number;
2454
+ }>;
2455
+ /**
2456
+ * Reschedule a job for a different time
2457
+ * @param jobId - The job ID
2458
+ * @param options - Reschedule options
2459
+ * @returns The rescheduled job or null
2460
+ * @example
2461
+ * await ductape.jobs.reschedule('job_abc123', {
2462
+ * start_at: Date.now() + 3600000, // 1 hour from now
2463
+ * });
2464
+ */
2465
+ reschedule: (jobId: string, options: IRescheduleOptions) => Promise<import("./jobs").IJob>;
2466
+ /**
2467
+ * Get job execution history
2468
+ * @param jobId - The job ID
2469
+ * @param options - Options (limit)
2470
+ * @returns Execution history
2471
+ * @example
2472
+ * const history = await ductape.jobs.getHistory('job_abc123');
2473
+ * console.log(history.executions); // Array of past executions
2474
+ */
2475
+ getHistory: (jobId: string, options?: {
2476
+ limit?: number;
2477
+ }) => Promise<import("./jobs").IJobHistory>;
2478
+ /**
2479
+ * Get job statistics
2480
+ * @param options - Filter options
2481
+ * @returns Job statistics
2482
+ * @example
2483
+ * const stats = await ductape.jobs.getStats({ product: 'my-product' });
2484
+ * console.log(stats.total, stats.completed, stats.failed);
2485
+ */
2486
+ getStats: (options?: {
2487
+ product?: string;
2488
+ env?: string;
2489
+ from?: number;
2490
+ to?: number;
2491
+ }) => Promise<import("./jobs").IJobStats>;
2492
+ /**
2493
+ * Set a webhook for job events
2494
+ * @param config - Webhook configuration
2495
+ * @returns Promise<void>
2496
+ * @example
2497
+ * await ductape.jobs.setWebhook({
2498
+ * url: 'https://api.example.com/webhooks/jobs',
2499
+ * events: ['completed', 'failed'],
2500
+ * secret: 'webhook-secret',
2501
+ * });
2502
+ */
2503
+ setWebhook: (config: IJobWebhookConfig) => Promise<void>;
2504
+ /**
2505
+ * Get the underlying JobsService instance (for advanced usage)
2506
+ */
2507
+ getService: () => Promise<JobsService>;
2508
+ };
2509
+ /**
2510
+ * Secrets management for workspace secrets.
2511
+ *
2512
+ * Secrets allow you to store sensitive values (API keys, passwords, etc.) securely
2513
+ * and reference them in configurations using the $Secret{key} syntax.
2514
+ *
2515
+ * @example
2516
+ * // Create a secret
2517
+ * await ductape.secrets.create({
2518
+ * key: 'STRIPE_API_KEY',
2519
+ * value: 'sk_live_51ABC123...',
2520
+ * description: 'Production Stripe API key',
2521
+ * scope: ['payment_app'],
2522
+ * envs: ['prd'],
2523
+ * });
2524
+ *
2525
+ * // Use secret in database config
2526
+ * await ductape.databases.create({
2527
+ * tag: 'main-db',
2528
+ * name: 'Main Database',
2529
+ * type: 'mongodb',
2530
+ * envs: [{
2531
+ * slug: 'prd',
2532
+ * connection_url: '$Secret{MONGODB_CONNECTION_URL}'
2533
+ * }]
2534
+ * });
2535
+ */
2536
+ secrets: {
2537
+ /**
2538
+ * Create a new secret in the workspace
2539
+ * @param input - Secret creation input
2540
+ * @returns The created secret metadata (without value)
2541
+ * @example
2542
+ * const secret = await ductape.secrets.create({
2543
+ * key: 'STRIPE_API_KEY',
2544
+ * value: 'sk_live_51ABC123...',
2545
+ * description: 'Production Stripe API key',
2546
+ * token_type: 'api',
2547
+ * scope: ['payment_app'],
2548
+ * envs: ['prd'],
2549
+ * expires_at: Math.floor(Date.now() / 1000) + (365 * 24 * 60 * 60)
2550
+ * });
2551
+ */
2552
+ create: (input: ICreateSecretInput) => Promise<ISecretMetadata>;
2553
+ /**
2554
+ * Fetch all secrets in the workspace (metadata only, no values)
2555
+ * @returns Array of secret metadata
2556
+ * @example
2557
+ * const secrets = await ductape.secrets.fetchAll();
2558
+ * secrets.forEach(s => console.log(s.key, s.description));
2559
+ */
2560
+ list: () => Promise<ISecretMetadata[]>;
2561
+ /**
2562
+ * Fetch a single secret with its decrypted value
2563
+ * @param key - The secret key
2564
+ * @returns The full secret including decrypted value
2565
+ * @example
2566
+ * const secret = await ductape.secrets.fetch('STRIPE_API_KEY');
2567
+ * console.log(secret.value); // sk_live_51ABC123...
2568
+ */
2569
+ fetch: (key: string) => Promise<ISecret>;
2570
+ /**
2571
+ * Update an existing secret
2572
+ * @param key - The secret key to update
2573
+ * @param input - Update data
2574
+ * @returns Updated secret metadata
2575
+ * @example
2576
+ * await ductape.secrets.update('STRIPE_API_KEY', {
2577
+ * value: 'sk_live_NEW_KEY...',
2578
+ * description: 'Rotated Stripe API key'
2579
+ * });
2580
+ */
2581
+ update: (key: string, input: IUpdateSecretInput) => Promise<ISecretMetadata>;
2582
+ /**
2583
+ * Delete a secret permanently
2584
+ * @param key - The secret key to delete
2585
+ * @returns true if deleted successfully
2586
+ * @example
2587
+ * await ductape.secrets.delete('OLD_API_KEY');
2588
+ */
2589
+ delete: (key: string) => Promise<boolean>;
2590
+ /**
2591
+ * Revoke a secret (disable without deleting)
2592
+ * @param key - The secret key to revoke
2593
+ * @returns true if revoked successfully
2594
+ * @example
2595
+ * await ductape.secrets.revoke('COMPROMISED_KEY');
2596
+ */
2597
+ revoke: (key: string) => Promise<boolean>;
2598
+ /**
2599
+ * Check if a secret exists
2600
+ * @param key - The secret key to check
2601
+ * @returns true if the secret exists
2602
+ * @example
2603
+ * if (await ductape.secrets.exists('MY_SECRET')) {
2604
+ * console.log('Secret exists');
2605
+ * }
2606
+ */
2607
+ exists: (key: string) => Promise<boolean>;
2608
+ /**
2609
+ * Resolve all $Secret{key} references in a value
2610
+ * Works with strings, objects, and arrays
2611
+ * @param value - The value containing secret references
2612
+ * @param options - Resolution options (app, env for scope/env validation)
2613
+ * @returns Resolved value with secrets replaced
2614
+ * @example
2615
+ * const config = {
2616
+ * apiKey: '$Secret{API_KEY}',
2617
+ * dbUrl: '$Secret{DB_URL}'
2618
+ * };
2619
+ * const resolved = await ductape.secrets.resolve(config, { env: 'prd' });
2620
+ */
2621
+ resolve: <T>(value: T, options?: IResolveSecretsOptions) => Promise<import("./secrets").ISecretResolutionResult<T>>;
2622
+ /**
2623
+ * Validate that all $Secret{key} references in a value exist
2624
+ * @param value - The value containing secret references
2625
+ * @returns Validation result with existing and missing keys
2626
+ * @example
2627
+ * const result = await ductape.secrets.validate({
2628
+ * url: '$Secret{API_URL}',
2629
+ * key: '$Secret{MISSING_KEY}'
2630
+ * });
2631
+ * if (!result.valid) {
2632
+ * console.error('Missing secrets:', result.missingKeys);
2633
+ * }
2634
+ */
2635
+ validate: (value: unknown) => Promise<{
2636
+ valid: boolean;
2637
+ missingKeys: string[];
2638
+ existingKeys: string[];
2639
+ }>;
2640
+ /**
2641
+ * Get the underlying SecretsService instance (for advanced usage)
2642
+ */
2643
+ getService: () => Promise<SecretsService>;
2644
+ };
2645
+ /**
2646
+ * Cache-related operations for managing product caches.
2647
+ */
2648
+ caches: {
2649
+ /**
2650
+ * Creates a cache for a product.
2651
+ * @param {string} product - The product tag.
2652
+ * @param {IProductCache} data - The cache data.
2653
+ * @returns {Promise<void>} Resolves when the cache is created. Throws on error.
2654
+ */
2655
+ create: (data: IProductCache & {
2656
+ product: string;
2657
+ }) => Promise<void>;
2658
+ /**
2659
+ * Fetches all caches for a product.
2660
+ * @param {string} product - The product tag.
2661
+ * @returns {IProductCache[]} The list of caches.
2662
+ */
2663
+ list: (product: string) => Promise<IProductCache[]>;
2664
+ /**
2665
+ * Fetches a cache by tag.
2666
+ * @param {string} product - The product tag.
2667
+ * @param {string} tag - The cache tag.
2668
+ * @returns {IProductCache|null} The fetched cache, or null if not found.
2669
+ */
2670
+ fetch: (product: string, tag: string) => Promise<IProductCache>;
2671
+ /**
2672
+ * Updates a cache by tag.
2673
+ * @param {string} product - The product tag.
2674
+ * @param {string} tag - The cache tag.
2675
+ * @param {Partial<IProductCache>} data - The cache data to update.
2676
+ * @returns {Promise<void>} Resolves when the cache is updated. Throws on error.
2677
+ */
2678
+ update: (product: string, tag: string, data: Partial<IProductCache>) => Promise<void>;
2679
+ /**
2680
+ * Deletes a cache by tag.
2681
+ * @param {string} product - The product tag.
2682
+ * @param {string} tag - The cache tag.
2683
+ * @returns {Promise<void>} Resolves when the cache is deleted. Throws on error.
2684
+ */
2685
+ delete: (product: string, tag: string) => Promise<void>;
2686
+ values: (data: FetchRemoteCachePayload) => Promise<import("./types").IRemoteCache[]>;
2687
+ /**
2688
+ * Fetch paginated cache values with filtering options.
2689
+ * @param options - Options for fetching cache values
2690
+ * @returns Paginated cache values result
2691
+ * @example
2692
+ * ```ts
2693
+ * const result = await ductape.caches.fetchValues({
2694
+ * product: 'my-product',
2695
+ * cache: 'user-cache',
2696
+ * page: 1,
2697
+ * limit: 20,
2698
+ * });
2699
+ * ```
2700
+ */
2701
+ fetchValues: (options: {
2702
+ product: string;
2703
+ cache: string;
2704
+ env?: string;
2705
+ page?: number;
2706
+ limit?: number;
2707
+ }) => Promise<import("./cache").IFetchCacheValuesResult>;
2708
+ /**
2709
+ * Fetch cache dashboard metrics.
2710
+ * @param options - Options for fetching dashboard
2711
+ * @returns Cache dashboard metrics
2712
+ * @example
2713
+ * ```ts
2714
+ * const dashboard = await ductape.caches.fetchDashboard({
2715
+ * product: 'my-product',
2716
+ * cache: 'user-cache',
2717
+ * });
2718
+ * ```
2719
+ */
2720
+ fetchDashboard: (options: {
2721
+ product: string;
2722
+ cache: string;
2723
+ env?: string;
2724
+ }) => Promise<import("./cache").ICacheDashboardMetrics>;
2725
+ /**
2726
+ * Get a cache value by key.
2727
+ * @param options - Options containing the key
2728
+ * @returns The cache value or null if not found
2729
+ * @example
2730
+ * ```ts
2731
+ * const value = await ductape.caches.get({ key: 'user:123' });
2732
+ * ```
2733
+ */
2734
+ get: (options: {
2735
+ key: string;
2736
+ }) => Promise<import("./cache").ICacheValue>;
2737
+ /**
2738
+ * Set a cache value.
2739
+ * @param options - Options for setting the cache value
2740
+ * @returns Boolean indicating success
2741
+ * @example
2742
+ * ```ts
2743
+ * await ductape.caches.set({
2744
+ * product: 'my-product',
2745
+ * cache: 'user-cache',
2746
+ * key: 'user:123',
2747
+ * value: JSON.stringify({ name: 'John' }),
2748
+ * });
2749
+ * ```
2750
+ */
2751
+ set: (options: {
2752
+ product: string;
2753
+ cache: string;
2754
+ key: string;
2755
+ value: string;
2756
+ componentTag?: string;
2757
+ componentType?: string;
2758
+ expiry?: Date;
2759
+ }) => Promise<boolean>;
2760
+ /**
2761
+ * Clear a cache value by key.
2762
+ * @param options - Options containing the key
2763
+ * @returns Boolean indicating success
2764
+ * @example
2765
+ * ```ts
2766
+ * await ductape.caches.clear({ key: 'user:123' });
2767
+ * ```
2768
+ */
2769
+ clear: (options: {
2770
+ key: string;
2771
+ }) => Promise<boolean>;
2772
+ /**
2773
+ * Clear all cache values for a product/cache combination.
2774
+ * @param options - Options for clearing cache values
2775
+ * @returns Object with cleared count
2776
+ * @example
2777
+ * ```ts
2778
+ * const result = await ductape.caches.clearAll({
2779
+ * product: 'my-product',
2780
+ * cache: 'user-cache',
2781
+ * });
2782
+ * console.log('Cleared:', result.cleared);
2783
+ * ```
2784
+ */
2785
+ clearAll: (options: {
2786
+ product: string;
2787
+ cache: string;
2788
+ env?: string;
2789
+ }) => Promise<import("./cache").IClearCacheValuesResult>;
2790
+ };
2791
+ /**
2792
+ * App-related operations for managing apps.
2793
+ */
2794
+ app: {
2795
+ /**
2796
+ * Creates a new app.
2797
+ * @param {ICreateAppBuilder} data - The app data.
2798
+ * @returns {Promise<{ app_id: string }>} The ID of the created app.
2799
+ */
2800
+ create: (data: ICreateAppBuilder) => Promise<{
2801
+ app_id: string;
2802
+ }>;
2803
+ /**
2804
+ * Fetches an app by tag.
2805
+ * @param {string} tag - The app tag.
2806
+ * @returns {Promise<IApp|null>} The fetched app, or null if not found.
2807
+ */
2808
+ fetch: (tag: string) => Promise<IApp>;
2809
+ /**
2810
+ * Updates an app by tag.
2811
+ * @param {string} tag - The app tag.
2812
+ * @param {Partial<IApp>} data - The app data to update.
2813
+ * @returns {Promise<void>} Resolves when the app is updated. Throws on error.
2814
+ */
2815
+ update: (tag: string, data: Partial<IApp>) => Promise<void>;
2816
+ /**
2817
+ * Initializes an app by tag (pre-loads builder into cache).
2818
+ * @param {string} appTag - The app tag.
2819
+ * @returns {Promise<void>} Resolves when initialization is complete. Throws on error.
2820
+ */
2821
+ init: (appTag: string) => Promise<void>;
2822
+ /**
2823
+ * Updates data validation for an app.
2824
+ * @param {string} appTag - The app tag.
2825
+ * @param {string} selector - The selector for the data validation.
2826
+ * @param {Partial<IParsedSample>} update - The update data.
2827
+ * @returns {Promise<void>} Resolves when the validation is updated. Throws on error.
2828
+ */
2829
+ validation: (appTag: string, selector: string, update: Partial<IParsedSample>) => Promise<void>;
2830
+ environments: {
2831
+ /**
2832
+ * Creates an environment for an app.
2833
+ * @param {string} appTag - The app tag.
2834
+ * @param {IAppEnv} data - The environment data.
2835
+ * @returns {Promise<void>} Resolves when the environment is created. Throws on error.
2836
+ */
2837
+ create: (appTag: string, data: IAppEnv) => Promise<void>;
2838
+ /**
2839
+ * Fetches all environments for an app.
2840
+ * @param {string} appTag - The app tag.
2841
+ * @returns {IAppEnv[]} The list of environments.
2842
+ */
2843
+ list: (appTag: string) => Promise<IAppEnv[]>;
2844
+ /**
2845
+ * Fetches an environment by slug.
2846
+ * @param {string} appTag - The app tag.
2847
+ * @param {string} slug - The environment slug.
2848
+ * @returns {IAppEnv|null} The fetched environment, or null if not found.
2849
+ */
2850
+ fetch: (appTag: string, slug: string) => Promise<IAppEnv>;
2851
+ /**
2852
+ * Updates an environment by slug.
2853
+ * @param {string} appTag - The app tag.
2854
+ * @param {string} slug - The environment slug.
2855
+ * @param {Partial<IAppEnv>} data - The environment data to update.
2856
+ * @returns {Promise<void>} Resolves when the environment is updated. Throws on error.
2857
+ */
2858
+ update: (appTag: string, slug: string, data: Partial<IAppEnv>) => Promise<void>;
2859
+ };
2860
+ };
2861
+ /**
2862
+ * Variable-related operations for managing app variables.
2863
+ */
2864
+ variables: {
2865
+ /**
2866
+ * Creates a variable for an app.
2867
+ * @param {string} appTag - The app tag.
2868
+ * @param {IAppVariables} data - The variable data.
2869
+ * @returns {Promise<void>} Resolves when the variable is created. Throws on error.
2870
+ */
2871
+ create: (appTag: string, data: IAppVariables) => Promise<void>;
2872
+ /**
2873
+ * Fetches all variables for an app.
2874
+ * @param {string} appTag - The app tag.
2875
+ * @returns {IAppVariables[]} The list of variables.
2876
+ */
2877
+ list: (appTag: string) => Promise<IAppVariables[]>;
2878
+ /**
2879
+ * Fetches a variable by tag.
2880
+ * @param {string} appTag - The app tag.
2881
+ * @param {string} tag - The variable tag.
2882
+ * @returns {IAppVariables|null} The fetched variable, or null if not found.
2883
+ */
2884
+ fetch: (appTag: string, tag: string) => Promise<IAppVariables>;
2885
+ /**
2886
+ * Updates a variable by tag.
2887
+ * @param {string} appTag - The app tag.
2888
+ * @param {string} tag - The variable tag.
2889
+ * @param {Partial<IAppVariables>} data - The variable data to update.
2890
+ * @returns {Promise<void>} Resolves when the variable is updated. Throws on error.
2891
+ */
2892
+ update: (appTag: string, tag: string, data: Partial<IAppVariables>) => Promise<void>;
2893
+ };
2894
+ /**
2895
+ * Constant-related operations for managing app constants.
2896
+ */
2897
+ constants: {
2898
+ /**
2899
+ * Creates a constant for an app.
2900
+ * @param {string} appTag - The app tag.
2901
+ * @param {IAppConstants} data - The constant data.
2902
+ * @returns {Promise<void>} Resolves when the constant is created. Throws on error.
2903
+ */
2904
+ create: (appTag: string, data: IAppConstants) => Promise<void>;
2905
+ /**
2906
+ * Fetches all constants for an app.
2907
+ * @param {string} appTag - The app tag.
2908
+ * @returns {IAppConstants[]} The list of constants.
2909
+ */
2910
+ list: (appTag: string) => Promise<IAppConstants[]>;
2911
+ /**
2912
+ * Fetches a constant by tag.
2913
+ * @param {string} appTag - The app tag.
2914
+ * @param {string} tag - The constant tag.
2915
+ * @returns {IAppConstants|null} The fetched constant, or null if not found.
2916
+ */
2917
+ fetch: (appTag: string, tag: string) => Promise<IAppConstants>;
2918
+ /**
2919
+ * Updates a constant by tag.
2920
+ * @param {string} appTag - The app tag.
2921
+ * @param {string} tag - The constant tag.
2922
+ * @param {Partial<IAppVariables>} data - The constant data to update.
2923
+ * @returns {Promise<void>} Resolves when the constant is updated. Throws on error.
2924
+ */
2925
+ update: (appTag: string, tag: string, data: Partial<IAppVariables>) => Promise<void>;
2926
+ };
2927
+ /**
2928
+ * Action-related operations for managing app actions.
2929
+ */
2930
+ actions: {
2931
+ /**
2932
+ * Imports actions for an app from a file.
2933
+ * @param {Object} params - The import parameters.
2934
+ * @param {Buffer} params.file - The file buffer.
2935
+ * @param {ImportDocsTypes} params.type - The import type.
2936
+ * @param {string} params.version - The version.
2937
+ * @param {string} [params.appTag] - The app tag (optional).
2938
+ * @param {boolean} [params.updateIfExists] - Whether to update if actions exist (optional).
2939
+ * @returns {Promise<void>} Resolves when the import is complete. Throws on error.
2940
+ */
2941
+ import: ({ file, type, version, appTag, updateIfExists, isAdminImport, }: {
2942
+ file: Buffer;
2943
+ type: ImportDocsTypes;
2944
+ version: string;
2945
+ appTag?: string;
2946
+ updateIfExists?: boolean;
2947
+ isAdminImport?: boolean;
2948
+ }) => Promise<void>;
2949
+ /**
2950
+ * Updates an action by tag.
2951
+ * @param {string} appTag - The app tag.
2952
+ * @param {string} tag - The action tag.
2953
+ * @param {Partial<IActionUpdate>} data - The action data to update.
2954
+ * @returns {Promise<void>} Resolves when the action is updated. Throws on error.
2955
+ */
2956
+ update: (appTag: string, tag: string, data: Partial<IActionUpdate>) => Promise<void>;
2957
+ /**
2958
+ * Creates an action.
2959
+ * @param {string} appTag - The app tag.
2960
+ * @param {Partial<IActionUpdate> & { tag: string; name: string; resource: string; method: string }} data - The action data.
2961
+ * @returns {Promise<void>} Resolves when the action is created. Throws on error.
2962
+ */
2963
+ create: (appTag: string, data: Partial<IActionUpdate> & {
2964
+ tag: string;
2965
+ name: string;
2966
+ resource: string;
2967
+ method: string;
2968
+ }) => Promise<void>;
2969
+ /**
2970
+ * Fetches all actions for an app.
2971
+ * @param {string} appTag - The app tag.
2972
+ * @returns {IAppAction[]} The list of actions.
2973
+ */
2974
+ list: (appTag: string) => Promise<IAppAction[]>;
2975
+ /**
2976
+ * Fetches an action by tag.
2977
+ * @param {string} appTag - The app tag.
2978
+ * @param {string} tag - The action tag.
2979
+ * @returns {IAppAction|null} The fetched action, or null if not found.
2980
+ */
2981
+ fetch: (appTag: string, tag: string) => Promise<IAppAction>;
2982
+ /**
2983
+ * Runs an action processor immediately.
2984
+ * @param {IActionProcessorInput} data - The action processor input.
2985
+ * @returns {Promise<any>} The result of the action processing.
2986
+ * @example
2987
+ * await ductape.actions.run({
2988
+ * product: 'my-product',
2989
+ * env: 'production',
2990
+ * app: 'stripe',
2991
+ * action: 'charge',
2992
+ * input: { amount: 1000, currency: 'usd' }
2993
+ * });
2994
+ */
2995
+ run: (data: IActionProcessorInput) => Promise<any>;
2996
+ /**
2997
+ * Dispatches an action to run as a scheduled job.
2998
+ * @param {IActionDispatchInput} data - The action dispatch input with scheduling options.
2999
+ * @returns {Promise<IDispatchResult>} The dispatch result with job ID and status.
3000
+ * @example
3001
+ * // Run once at a specific time
3002
+ * await ductape.actions.dispatch({
3003
+ * product: 'my-product',
3004
+ * env: 'production',
3005
+ * app: 'stripe',
3006
+ * event: 'charge',
3007
+ * input: { amount: 1000 },
3008
+ * schedule: { start_at: Date.now() + 3600000 } // 1 hour from now
3009
+ * });
3010
+ *
3011
+ * // Run on a cron schedule
3012
+ * await ductape.actions.dispatch({
3013
+ * product: 'my-product',
3014
+ * env: 'production',
3015
+ * app: 'analytics',
3016
+ * event: 'daily-report',
3017
+ * input: {},
3018
+ * schedule: { cron: '0 9 * * *', tz: 'America/New_York' } // 9 AM daily
3019
+ * });
3020
+ */
3021
+ dispatch: (data: IActionDispatchInput) => Promise<IDispatchResult>;
3022
+ /**
3023
+ * Set shared configuration (credentials) for a product/app/env combination.
3024
+ * Credentials are automatically merged into action inputs before resolution.
3025
+ * @param {IShareCredentialsConfig} config - The credential configuration.
3026
+ * @example
3027
+ * // Define app configuration and set credentials
3028
+ * const stripeConfig = { product: 'my-product', app: 'stripe', env: 'prd' };
3029
+ *
3030
+ * ductape.actions.config({
3031
+ * ...stripeConfig,
3032
+ * credentials: {
3033
+ * 'headers:Authorization': '$Secret{StripeApiKey}',
3034
+ * }
3035
+ * });
3036
+ *
3037
+ * // Now all stripe actions automatically include the Authorization header
3038
+ * await ductape.actions.run({
3039
+ * ...stripeConfig,
3040
+ * action: 'create-charge',
3041
+ * input: { amount: 1000, currency: 'usd' }
3042
+ * });
3043
+ */
3044
+ config: (config: IShareCredentialsConfig) => void;
3045
+ /**
3046
+ * Set up OAuth configuration with automatic token refresh for a product/app/env combination.
3047
+ * Tokens are stored securely using $Secret{} and automatically refreshed when expired.
3048
+ * @param {IOAuthConfig} config - The OAuth configuration.
3049
+ * @example
3050
+ * // Set up OAuth with automatic refresh using ductape.actions.run
3051
+ * await ductape.actions.oauth({
3052
+ * product: 'my-product',
3053
+ * app: 'salesforce',
3054
+ * env: 'prd',
3055
+ * tokens: {
3056
+ * accessToken: initialAccessToken,
3057
+ * refreshToken: initialRefreshToken,
3058
+ * },
3059
+ * expiresAt: tokenExpiry,
3060
+ * credentials: (tokens) => ({
3061
+ * 'headers:Authorization': `Bearer ${tokens.accessToken}`
3062
+ * }),
3063
+ * onExpiry: async (currentTokens) => {
3064
+ * // Use ductape.actions.run to call your refresh token action
3065
+ * const response = await ductape.actions.run({
3066
+ * product: 'my-product',
3067
+ * app: 'salesforce',
3068
+ * env: 'prd',
3069
+ * action: 'refresh-token',
3070
+ * input: {
3071
+ * 'body:grant_type': 'refresh_token',
3072
+ * 'body:refresh_token': currentTokens.refreshToken,
3073
+ * }
3074
+ * });
3075
+ * return {
3076
+ * tokens: {
3077
+ * accessToken: response.access_token,
3078
+ * refreshToken: response.refresh_token || currentTokens.refreshToken
3079
+ * },
3080
+ * expiresIn: response.expires_in
3081
+ * };
3082
+ * }
3083
+ * });
3084
+ *
3085
+ * // Now all salesforce actions automatically include OAuth tokens
3086
+ * // and refresh automatically when expired
3087
+ * await ductape.actions.run({
3088
+ * product: 'my-product',
3089
+ * app: 'salesforce',
3090
+ * env: 'prd',
3091
+ * action: 'get-contacts',
3092
+ * input: { limit: 10 }
3093
+ * });
3094
+ */
3095
+ oauth: (config: IOAuthConfig) => Promise<void>;
3096
+ };
3097
+ /**
3098
+ * Auth-related operations for managing app auths.
3099
+ */
3100
+ auths: {
3101
+ /**
3102
+ * Creates an auth for an app.
3103
+ * @param {string} appTag - The app tag.
3104
+ * @param {IAppAuth} data - The auth data.
3105
+ * @returns {Promise<void>} Resolves when the auth is created. Throws on error.
3106
+ */
3107
+ create: (appTag: string, data: IAppAuth) => Promise<void>;
3108
+ /**
3109
+ * Fetches all auths for an app.
3110
+ * @param {string} appTag - The app tag.
3111
+ * @returns {IAppAuth[]} The list of auths.
3112
+ */
3113
+ list: (appTag: string) => Promise<IAppAuth[]>;
3114
+ /**
3115
+ * Fetches an auth by tag.
3116
+ * @param {string} appTag - The app tag.
3117
+ * @param {string} tag - The auth tag.
3118
+ * @returns {IAppAuth|null} The fetched auth, or null if not found.
3119
+ */
3120
+ fetch: (appTag: string, tag: string) => Promise<IAppAuth>;
3121
+ /**
3122
+ * Updates an auth by tag.
3123
+ * @param {string} appTag - The app tag.
3124
+ * @param {string} tag - The auth tag.
3125
+ * @param {Partial<IAppAuth>} data - The auth data to update.
3126
+ * @returns {Promise<void>} Resolves when the auth is updated. Throws on error.
3127
+ */
3128
+ update: (appTag: string, tag: string, data: Partial<IAppAuth>) => Promise<void>;
3129
+ };
3130
+ /**
3131
+ * Webhook-related operations for managing app webhooks.
3132
+ */
3133
+ webhooks: {
3134
+ /**
3135
+ * Creates a webhook for an app.
3136
+ * @param {string} appTag - The app tag.
3137
+ * @param {Partial<IAppWebhook>} data - The webhook data.
3138
+ * @returns {Promise<void>} Resolves when the webhook is created. Throws on error.
3139
+ */
3140
+ create: (appTag: string, data: Partial<IAppWebhook>) => Promise<void>;
3141
+ /**
3142
+ * Fetches all webhooks for an app.
3143
+ * @param {string} appTag - The app tag.
3144
+ * @returns {IAppWebhook[]} The list of webhooks.
3145
+ */
3146
+ list: (appTag: string) => Promise<IAppWebhook[]>;
3147
+ /**
3148
+ * Fetches a webhook by tag.
3149
+ * @param {string} appTag - The app tag.
3150
+ * @param {string} tag - The webhook tag.
3151
+ * @returns {IAppWebhook|null} The fetched webhook, or null if not found.
3152
+ */
3153
+ fetch: (appTag: string, tag: string) => Promise<IAppWebhook>;
3154
+ /**
3155
+ * Updates a webhook by tag.
3156
+ * @param {string} appTag - The app tag.
3157
+ * @param {string} tag - The webhook tag.
3158
+ * @param {Partial<IAppWebhook>} data - The webhook data to update.
3159
+ * @returns {Promise<void>} Resolves when the webhook is updated. Throws on error.
3160
+ */
3161
+ update: (appTag: string, tag: string, data: Partial<IAppWebhook>) => Promise<void>;
3162
+ events: {
3163
+ /**
3164
+ * Creates a webhook event for an app.
3165
+ * @param {string} appTag - The app tag.
3166
+ * @param {IAppWebhookEvent} data - The webhook event data.
3167
+ * @returns {Promise<void>} Resolves when the webhook event is created. Throws on error.
3168
+ */
3169
+ create: (appTag: string, data: IAppWebhookEvent) => Promise<void>;
3170
+ /**
3171
+ * Fetches all webhook events for a webhook by tag.
3172
+ * @param {string} appTag - The app tag.
3173
+ * @param {string} webhookTag - The webhook tag.
3174
+ * @returns {IAppWebhookEvent[]} The list of webhook events.
3175
+ */
3176
+ list: (appTag: string, webhookTag: string) => Promise<IAppWebhookEvent[]>;
3177
+ /**
3178
+ * Fetches a webhook event by tag.
3179
+ * @param {string} appTag - The app tag.
3180
+ * @param {string} tag - The webhook event tag.
3181
+ * @returns {IAppWebhookEvent|null} The fetched webhook event, or null if not found.
3182
+ */
3183
+ fetch: (appTag: string, tag: string) => Promise<IAppWebhookEvent>;
3184
+ /**
3185
+ * Updates a webhook event by tag.
3186
+ * @param {string} appTag - The app tag.
3187
+ * @param {string} tag - The webhook event tag.
3188
+ * @param {Partial<IAppWebhookEvent>} data - The webhook event data to update.
3189
+ * @returns {Promise<void>} Resolves when the webhook event is updated. Throws on error.
3190
+ */
3191
+ update: (appTag: string, tag: string, data: Partial<IAppWebhookEvent>) => Promise<void>;
3192
+ };
3193
+ };
3194
+ /**
3195
+ * Logs-related operations for initializing and fetching logs.
3196
+ */
3197
+ logs: {
3198
+ /**
3199
+ * Initializes the logger service for a product or app.
3200
+ * @param {string} [product] - The product tag (optional).
3201
+ * @param {string} [app] - The app tag (optional).
3202
+ * @throws {Error} If neither productTag nor appTag is provided.
3203
+ * @returns {Promise<void>} Resolves when logger is initialized.
3204
+ */
3205
+ init: (product?: string, app?: string) => Promise<void>;
3206
+ add: () => Promise<void>;
3207
+ /**
3208
+ * Fetches logs based on provided query parameters.
3209
+ * @param {LogQueryParams} params - The log query parameters.
3210
+ * @returns {Promise<any>} The fetched log data.
3211
+ */
333
3212
  fetch: (params: LogQueryParams) => Promise<any>;
334
3213
  publish: () => Promise<void>;
335
3214
  };
@@ -339,10 +3218,85 @@ export default class Ductape implements IDuctape {
339
3218
  private createNewProcessor;
340
3219
  private createNewImporter;
341
3220
  private createNewAppBuilder;
3221
+ /**
3222
+ * Create a new DatabaseService instance with authenticated config
3223
+ * @returns DatabaseService instance
3224
+ */
3225
+ private createNewDatabaseService;
3226
+ /**
3227
+ * Create a new GraphService instance with authenticated config
3228
+ * @returns GraphService instance
3229
+ */
3230
+ private createNewGraphService;
3231
+ /**
3232
+ * Create a new WorkflowService instance with authenticated config
3233
+ * @returns WorkflowService instance
3234
+ */
3235
+ private createNewWorkflowService;
3236
+ /**
3237
+ * Create a new AgentsService instance with authenticated config
3238
+ * @returns AgentsService instance
3239
+ */
3240
+ private createNewAgentsService;
3241
+ /**
3242
+ * Create a new ModelService instance with authenticated config
3243
+ * @returns ModelService instance
3244
+ */
3245
+ private createNewModelService;
3246
+ /**
3247
+ * Create a new VectorDatabaseService instance with authenticated config
3248
+ * @returns VectorDatabaseService instance
3249
+ */
3250
+ private createNewVectorService;
3251
+ /**
3252
+ * Create a new CacheService instance with authenticated config
3253
+ * @returns CacheService instance
3254
+ */
3255
+ private createNewCacheService;
3256
+ /**
3257
+ * Create a new JobsService instance with authenticated config
3258
+ * @returns JobsService instance
3259
+ */
3260
+ private createNewJobsService;
3261
+ private createNewSecretsService;
3262
+ /**
3263
+ * Create a new SessionsService instance with authenticated config
3264
+ * @returns SessionsService instance
3265
+ */
3266
+ private createNewSessionsService;
3267
+ /**
3268
+ * Create a new StorageService instance with authenticated config
3269
+ * @returns StorageService instance
3270
+ */
3271
+ private createNewStorageService;
3272
+ /**
3273
+ * Create a new BrokersService instance with authenticated config
3274
+ * @returns BrokersService instance
3275
+ */
3276
+ private createNewBrokersService;
3277
+ /**
3278
+ * Create a new QuotaService instance with authenticated config
3279
+ * @returns QuotaService instance (cached)
3280
+ */
3281
+ private createNewQuotaService;
3282
+ /**
3283
+ * Create a new FallbackService instance with authenticated config
3284
+ * @returns FallbackService instance (cached)
3285
+ */
3286
+ private createNewFallbackService;
3287
+ /**
3288
+ * Create a new HealthcheckService instance with authenticated config
3289
+ * @returns HealthcheckService instance (cached)
3290
+ */
3291
+ private createNewHealthcheckService;
342
3292
  private fetchSession;
343
3293
  private validateWorkspace;
344
3294
  private createNewAppBuilderSession;
345
3295
  private refreshUserAccessToken;
346
3296
  fetchWorkspaceApps(status: PublicStates): Promise<Array<IApp>>;
347
3297
  fetchWorkspaceProjects(status: PublicStates): Promise<Array<IProduct>>;
3298
+ /**
3299
+ * Fetches the latest healthcheck status for a product/env from Redis cache via processor service.
3300
+ */
3301
+ getHealthcheckStatus(product: string, envSlug: string): Promise<any>;
348
3302
  }