@ductape/sdk 0.1.8 → 0.1.10

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