@ductape/sdk 0.0.4-v9 → 0.0.4-v90

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