@ductape/sdk 0.0.4-v6 → 0.0.4-v61

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