@ductape/sdk 0.1.7 → 0.1.8

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