@ductape/sdk 0.0.4-v9 → 0.0.4-v91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (998) hide show
  1. package/dist/agents/agent-context.d.ts +98 -0
  2. package/dist/agents/agent-context.js +588 -0
  3. package/dist/agents/agent-context.js.map +1 -0
  4. package/dist/agents/agent-executor.d.ts +180 -0
  5. package/dist/agents/agent-executor.js +715 -0
  6. package/dist/agents/agent-executor.js.map +1 -0
  7. package/dist/agents/agents.service.d.ts +310 -0
  8. package/dist/agents/agents.service.js +1249 -0
  9. package/dist/agents/agents.service.js.map +1 -0
  10. package/dist/agents/index.d.ts +55 -0
  11. package/dist/agents/index.js +110 -0
  12. package/dist/agents/index.js.map +1 -0
  13. package/dist/agents/memory-manager.d.ts +182 -0
  14. package/dist/agents/memory-manager.js +383 -0
  15. package/dist/agents/memory-manager.js.map +1 -0
  16. package/dist/agents/tool-registry.d.ts +141 -0
  17. package/dist/agents/tool-registry.js +355 -0
  18. package/dist/agents/tool-registry.js.map +1 -0
  19. package/dist/agents/types/agents.types.d.ts +1227 -0
  20. package/dist/agents/types/agents.types.js +12 -0
  21. package/dist/agents/types/agents.types.js.map +1 -0
  22. package/dist/agents/types/index.d.ts +6 -0
  23. package/dist/agents/types/index.js +23 -0
  24. package/dist/agents/types/index.js.map +1 -0
  25. package/dist/agents/vector-store-adapter.d.ts +108 -0
  26. package/dist/agents/vector-store-adapter.js +213 -0
  27. package/dist/agents/vector-store-adapter.js.map +1 -0
  28. package/dist/api/services/appApi.service.d.ts +51 -5
  29. package/dist/api/services/appApi.service.js +101 -3
  30. package/dist/api/services/appApi.service.js.map +1 -1
  31. package/dist/api/services/pricingApi.service.d.ts +10 -0
  32. package/dist/api/services/pricingApi.service.js +34 -0
  33. package/dist/api/services/pricingApi.service.js.map +1 -0
  34. package/dist/api/services/processorApi.service.d.ts +322 -0
  35. package/dist/api/services/processorApi.service.js +252 -0
  36. package/dist/api/services/processorApi.service.js.map +1 -1
  37. package/dist/api/services/productsApi.service.d.ts +105 -0
  38. package/dist/api/services/productsApi.service.js +139 -3
  39. package/dist/api/services/productsApi.service.js.map +1 -1
  40. package/dist/api/services/resilienceApi.service.d.ts +106 -0
  41. package/dist/api/services/resilienceApi.service.js +224 -0
  42. package/dist/api/services/resilienceApi.service.js.map +1 -0
  43. package/dist/api/services/secretsApi.service.d.ts +50 -0
  44. package/dist/api/services/secretsApi.service.js +124 -0
  45. package/dist/api/services/secretsApi.service.js.map +1 -0
  46. package/dist/api/services/workflowApi.service.d.ts +199 -0
  47. package/dist/api/services/workflowApi.service.js +183 -0
  48. package/dist/api/services/workflowApi.service.js.map +1 -0
  49. package/dist/api/services/workspaceApi.service.d.ts +8 -0
  50. package/dist/api/services/workspaceApi.service.js +20 -0
  51. package/dist/api/services/workspaceApi.service.js.map +1 -1
  52. package/dist/api/urls.d.ts +62 -0
  53. package/dist/api/urls.js +87 -17
  54. package/dist/api/urls.js.map +1 -1
  55. package/dist/api/utils/auth.utils.d.ts +1 -3
  56. package/dist/api/utils/auth.utils.js.map +1 -1
  57. package/dist/api/utils/cache.utils.d.ts +1 -1
  58. package/dist/api/utils/cache.utils.js +2 -2
  59. package/dist/api/utils/cache.utils.js.map +1 -1
  60. package/dist/api/utils/strings.utils.d.ts +2 -0
  61. package/dist/api/utils/strings.utils.js +14 -0
  62. package/dist/api/utils/strings.utils.js.map +1 -1
  63. package/dist/apps/services/app.service.d.ts +41 -33
  64. package/dist/apps/services/app.service.js +472 -184
  65. package/dist/apps/services/app.service.js.map +1 -1
  66. package/dist/apps/utils/auth-context-manager.d.ts +137 -0
  67. package/dist/apps/utils/auth-context-manager.js +248 -0
  68. package/dist/apps/utils/auth-context-manager.js.map +1 -0
  69. package/dist/apps/utils/credential-manager.d.ts +128 -0
  70. package/dist/apps/utils/credential-manager.js +199 -0
  71. package/dist/apps/utils/credential-manager.js.map +1 -0
  72. package/dist/apps/utils/index.d.ts +10 -0
  73. package/dist/apps/utils/index.js +54 -0
  74. package/dist/apps/utils/index.js.map +1 -0
  75. package/dist/apps/utils/input-helpers.d.ts +67 -0
  76. package/dist/apps/utils/input-helpers.js +185 -0
  77. package/dist/apps/utils/input-helpers.js.map +1 -0
  78. package/dist/apps/utils/input-resolver.d.ts +165 -0
  79. package/dist/apps/utils/input-resolver.js +477 -0
  80. package/dist/apps/utils/input-resolver.js.map +1 -0
  81. package/dist/apps/utils/oauth-manager.d.ts +196 -0
  82. package/dist/apps/utils/oauth-manager.js +429 -0
  83. package/dist/apps/utils/oauth-manager.js.map +1 -0
  84. package/dist/apps/validators/joi-validators/create.appAction.validator.d.ts +1 -2
  85. package/dist/apps/validators/joi-validators/create.appAction.validator.js +21 -2
  86. package/dist/apps/validators/joi-validators/create.appAction.validator.js.map +1 -1
  87. package/dist/apps/validators/joi-validators/update.appAction.validator.js +11 -1
  88. package/dist/apps/validators/joi-validators/update.appAction.validator.js.map +1 -1
  89. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.d.ts +1 -1
  90. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js +34 -1
  91. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js.map +1 -1
  92. package/dist/bin.d.ts +26 -0
  93. package/dist/bin.js +28 -0
  94. package/dist/bin.js.map +1 -0
  95. package/dist/brokers/brokers.service.d.ts +297 -0
  96. package/dist/brokers/brokers.service.js +797 -0
  97. package/dist/brokers/brokers.service.js.map +1 -0
  98. package/dist/brokers/index.d.ts +46 -0
  99. package/dist/brokers/index.js +83 -0
  100. package/dist/brokers/index.js.map +1 -0
  101. package/dist/brokers/types/index.d.ts +316 -0
  102. package/dist/brokers/types/index.js +8 -0
  103. package/dist/brokers/types/index.js.map +1 -0
  104. package/dist/brokers/utils/broker.util.d.ts +33 -0
  105. package/dist/brokers/utils/broker.util.js +125 -0
  106. package/dist/brokers/utils/broker.util.js.map +1 -0
  107. package/dist/brokers/utils/providers/aws-sqs.service.d.ts +16 -0
  108. package/dist/brokers/utils/providers/aws-sqs.service.js +71 -0
  109. package/dist/brokers/utils/providers/aws-sqs.service.js.map +1 -0
  110. package/dist/brokers/utils/providers/google-pubsub.service.d.ts +16 -0
  111. package/dist/brokers/utils/providers/google-pubsub.service.js +43 -0
  112. package/dist/brokers/utils/providers/google-pubsub.service.js.map +1 -0
  113. package/dist/brokers/utils/providers/index.d.ts +6 -0
  114. package/dist/brokers/utils/providers/index.js +16 -0
  115. package/dist/brokers/utils/providers/index.js.map +1 -0
  116. package/dist/brokers/utils/providers/kafka.service.d.ts +23 -0
  117. package/dist/brokers/utils/providers/kafka.service.js +131 -0
  118. package/dist/brokers/utils/providers/kafka.service.js.map +1 -0
  119. package/dist/brokers/utils/providers/nats.service.d.ts +18 -0
  120. package/dist/brokers/utils/providers/nats.service.js +63 -0
  121. package/dist/brokers/utils/providers/nats.service.js.map +1 -0
  122. package/dist/brokers/utils/providers/rabbitmq.service.d.ts +15 -0
  123. package/dist/brokers/utils/providers/rabbitmq.service.js +151 -0
  124. package/dist/brokers/utils/providers/rabbitmq.service.js.map +1 -0
  125. package/dist/brokers/utils/providers/redis.service.d.ts +18 -0
  126. package/dist/brokers/utils/providers/redis.service.js +93 -0
  127. package/dist/brokers/utils/providers/redis.service.js.map +1 -0
  128. package/dist/cache/cache.manager.d.ts +229 -0
  129. package/dist/cache/cache.manager.js +460 -0
  130. package/dist/cache/cache.manager.js.map +1 -0
  131. package/dist/cache/cache.service.d.ts +186 -0
  132. package/dist/cache/cache.service.js +437 -0
  133. package/dist/cache/cache.service.js.map +1 -0
  134. package/dist/cache/index.d.ts +52 -0
  135. package/dist/cache/index.js +79 -0
  136. package/dist/cache/index.js.map +1 -0
  137. package/dist/cache/types/index.d.ts +106 -0
  138. package/dist/cache/types/index.js +6 -0
  139. package/dist/cache/types/index.js.map +1 -0
  140. package/dist/clients/pricing.client.d.ts +3 -0
  141. package/dist/clients/pricing.client.js +33 -0
  142. package/dist/clients/pricing.client.js.map +1 -0
  143. package/dist/database/actions/action-manager.d.ts +170 -0
  144. package/dist/database/actions/action-manager.js +465 -0
  145. package/dist/database/actions/action-manager.js.map +1 -0
  146. package/dist/database/actions/index.d.ts +6 -0
  147. package/dist/database/actions/index.js +13 -0
  148. package/dist/database/actions/index.js.map +1 -0
  149. package/dist/database/adapters/adapter.factory.d.ts +62 -0
  150. package/dist/database/adapters/adapter.factory.js +97 -0
  151. package/dist/database/adapters/adapter.factory.js.map +1 -0
  152. package/dist/database/adapters/base.adapter.d.ts +423 -0
  153. package/dist/database/adapters/base.adapter.js +260 -0
  154. package/dist/database/adapters/base.adapter.js.map +1 -0
  155. package/dist/database/adapters/cassandra.adapter.d.ts +92 -0
  156. package/dist/database/adapters/cassandra.adapter.js +1091 -0
  157. package/dist/database/adapters/cassandra.adapter.js.map +1 -0
  158. package/dist/database/adapters/dynamodb.adapter.d.ts +110 -0
  159. package/dist/database/adapters/dynamodb.adapter.js +1564 -0
  160. package/dist/database/adapters/dynamodb.adapter.js.map +1 -0
  161. package/dist/database/adapters/index.d.ts +11 -0
  162. package/dist/database/adapters/index.js +27 -0
  163. package/dist/database/adapters/index.js.map +1 -0
  164. package/dist/database/adapters/mariadb.adapter.d.ts +100 -0
  165. package/dist/database/adapters/mariadb.adapter.js +247 -0
  166. package/dist/database/adapters/mariadb.adapter.js.map +1 -0
  167. package/dist/database/adapters/mongodb.adapter.d.ts +121 -0
  168. package/dist/database/adapters/mongodb.adapter.js +1284 -0
  169. package/dist/database/adapters/mongodb.adapter.js.map +1 -0
  170. package/dist/database/adapters/mysql.adapter.d.ts +86 -0
  171. package/dist/database/adapters/mysql.adapter.js +1371 -0
  172. package/dist/database/adapters/mysql.adapter.js.map +1 -0
  173. package/dist/database/adapters/postgresql.adapter.d.ts +90 -0
  174. package/dist/database/adapters/postgresql.adapter.js +1487 -0
  175. package/dist/database/adapters/postgresql.adapter.js.map +1 -0
  176. package/dist/database/databases.service.d.ts +1408 -0
  177. package/dist/database/databases.service.js +2953 -0
  178. package/dist/database/databases.service.js.map +1 -0
  179. package/dist/database/index.d.ts +46 -0
  180. package/dist/database/index.js +109 -0
  181. package/dist/database/index.js.map +1 -0
  182. package/dist/database/migrations/index.d.ts +6 -0
  183. package/dist/database/migrations/index.js +12 -0
  184. package/dist/database/migrations/index.js.map +1 -0
  185. package/dist/database/migrations/migration-engine.d.ts +136 -0
  186. package/dist/database/migrations/migration-engine.js +1421 -0
  187. package/dist/database/migrations/migration-engine.js.map +1 -0
  188. package/dist/database/operators/aggregation-builder.d.ts +67 -0
  189. package/dist/database/operators/aggregation-builder.js +841 -0
  190. package/dist/database/operators/aggregation-builder.js.map +1 -0
  191. package/dist/database/operators/index.d.ts +7 -0
  192. package/dist/database/operators/index.js +15 -0
  193. package/dist/database/operators/index.js.map +1 -0
  194. package/dist/database/operators/query-builder.d.ts +69 -0
  195. package/dist/database/operators/query-builder.js +447 -0
  196. package/dist/database/operators/query-builder.js.map +1 -0
  197. package/dist/database/presave/decrypt.d.ts +25 -0
  198. package/dist/database/presave/decrypt.js +146 -0
  199. package/dist/database/presave/decrypt.js.map +1 -0
  200. package/dist/database/presave/index.d.ts +9 -0
  201. package/dist/database/presave/index.js +18 -0
  202. package/dist/database/presave/index.js.map +1 -0
  203. package/dist/database/presave/presave-processor.d.ts +148 -0
  204. package/dist/database/presave/presave-processor.js +702 -0
  205. package/dist/database/presave/presave-processor.js.map +1 -0
  206. package/dist/database/schema/index.d.ts +7 -0
  207. package/dist/database/schema/index.js +13 -0
  208. package/dist/database/schema/index.js.map +1 -0
  209. package/dist/database/schema/schema-manager.d.ts +258 -0
  210. package/dist/database/schema/schema-manager.js +638 -0
  211. package/dist/database/schema/schema-manager.js.map +1 -0
  212. package/dist/database/transactions/index.d.ts +6 -0
  213. package/dist/database/transactions/index.js +13 -0
  214. package/dist/database/transactions/index.js.map +1 -0
  215. package/dist/database/transactions/transaction-manager.d.ts +113 -0
  216. package/dist/database/transactions/transaction-manager.js +344 -0
  217. package/dist/database/transactions/transaction-manager.js.map +1 -0
  218. package/dist/database/triggers/index.d.ts +7 -0
  219. package/dist/database/triggers/index.js +14 -0
  220. package/dist/database/triggers/index.js.map +1 -0
  221. package/dist/database/triggers/trigger-processor.d.ts +239 -0
  222. package/dist/database/triggers/trigger-processor.js +1034 -0
  223. package/dist/database/triggers/trigger-processor.js.map +1 -0
  224. package/dist/database/types/action.interface.d.ts +148 -0
  225. package/dist/database/types/action.interface.js +6 -0
  226. package/dist/database/types/action.interface.js.map +1 -0
  227. package/dist/database/types/aggregation.interface.d.ts +185 -0
  228. package/dist/database/types/aggregation.interface.js +6 -0
  229. package/dist/database/types/aggregation.interface.js.map +1 -0
  230. package/dist/database/types/connection.interface.d.ts +137 -0
  231. package/dist/database/types/connection.interface.js +6 -0
  232. package/dist/database/types/connection.interface.js.map +1 -0
  233. package/dist/database/types/enums.d.ts +195 -0
  234. package/dist/database/types/enums.js +244 -0
  235. package/dist/database/types/enums.js.map +1 -0
  236. package/dist/database/types/index.d.ts +14 -0
  237. package/dist/database/types/index.js +31 -0
  238. package/dist/database/types/index.js.map +1 -0
  239. package/dist/database/types/migration.interface.d.ts +686 -0
  240. package/dist/database/types/migration.interface.js +9 -0
  241. package/dist/database/types/migration.interface.js.map +1 -0
  242. package/dist/database/types/presave.interface.d.ts +292 -0
  243. package/dist/database/types/presave.interface.js +60 -0
  244. package/dist/database/types/presave.interface.js.map +1 -0
  245. package/dist/database/types/query.interface.d.ts +205 -0
  246. package/dist/database/types/query.interface.js +6 -0
  247. package/dist/database/types/query.interface.js.map +1 -0
  248. package/dist/database/types/schema.interface.d.ts +412 -0
  249. package/dist/database/types/schema.interface.js +6 -0
  250. package/dist/database/types/schema.interface.js.map +1 -0
  251. package/dist/database/types/transaction.interface.d.ts +84 -0
  252. package/dist/database/types/transaction.interface.js +6 -0
  253. package/dist/database/types/transaction.interface.js.map +1 -0
  254. package/dist/database/types/trigger.interface.d.ts +612 -0
  255. package/dist/database/types/trigger.interface.js +121 -0
  256. package/dist/database/types/trigger.interface.js.map +1 -0
  257. package/dist/database/types/write.interface.d.ts +216 -0
  258. package/dist/database/types/write.interface.js +6 -0
  259. package/dist/database/types/write.interface.js.map +1 -0
  260. package/dist/database/utils/database-error.d.ts +96 -0
  261. package/dist/database/utils/database-error.js +221 -0
  262. package/dist/database/utils/database-error.js.map +1 -0
  263. package/dist/database/utils/index.d.ts +6 -0
  264. package/dist/database/utils/index.js +11 -0
  265. package/dist/database/utils/index.js.map +1 -0
  266. package/dist/graph/adapters/adapter.factory.d.ts +47 -0
  267. package/dist/graph/adapters/adapter.factory.js +77 -0
  268. package/dist/graph/adapters/adapter.factory.js.map +1 -0
  269. package/dist/graph/adapters/arangodb.adapter.d.ts +86 -0
  270. package/dist/graph/adapters/arangodb.adapter.js +1588 -0
  271. package/dist/graph/adapters/arangodb.adapter.js.map +1 -0
  272. package/dist/graph/adapters/base.adapter.d.ts +264 -0
  273. package/dist/graph/adapters/base.adapter.js +156 -0
  274. package/dist/graph/adapters/base.adapter.js.map +1 -0
  275. package/dist/graph/adapters/index.d.ts +11 -0
  276. package/dist/graph/adapters/index.js +21 -0
  277. package/dist/graph/adapters/index.js.map +1 -0
  278. package/dist/graph/adapters/memgraph.adapter.d.ts +110 -0
  279. package/dist/graph/adapters/memgraph.adapter.js +1452 -0
  280. package/dist/graph/adapters/memgraph.adapter.js.map +1 -0
  281. package/dist/graph/adapters/neo4j.adapter.d.ts +81 -0
  282. package/dist/graph/adapters/neo4j.adapter.js +1317 -0
  283. package/dist/graph/adapters/neo4j.adapter.js.map +1 -0
  284. package/dist/graph/adapters/neptune.adapter.d.ts +82 -0
  285. package/dist/graph/adapters/neptune.adapter.js +1369 -0
  286. package/dist/graph/adapters/neptune.adapter.js.map +1 -0
  287. package/dist/graph/graphs.service.d.ts +568 -0
  288. package/dist/graph/graphs.service.js +1948 -0
  289. package/dist/graph/graphs.service.js.map +1 -0
  290. package/dist/graph/index.d.ts +57 -0
  291. package/dist/graph/index.js +77 -0
  292. package/dist/graph/index.js.map +1 -0
  293. package/dist/graph/transactions/index.d.ts +4 -0
  294. package/dist/graph/transactions/index.js +9 -0
  295. package/dist/graph/transactions/index.js.map +1 -0
  296. package/dist/graph/transactions/transaction-manager.d.ts +61 -0
  297. package/dist/graph/transactions/transaction-manager.js +126 -0
  298. package/dist/graph/transactions/transaction-manager.js.map +1 -0
  299. package/dist/graph/types/connection.interface.d.ts +149 -0
  300. package/dist/graph/types/connection.interface.js +9 -0
  301. package/dist/graph/types/connection.interface.js.map +1 -0
  302. package/dist/graph/types/enums.d.ts +101 -0
  303. package/dist/graph/types/enums.js +114 -0
  304. package/dist/graph/types/enums.js.map +1 -0
  305. package/dist/graph/types/index.d.ts +13 -0
  306. package/dist/graph/types/index.js +20 -0
  307. package/dist/graph/types/index.js.map +1 -0
  308. package/dist/graph/types/node.interface.d.ts +248 -0
  309. package/dist/graph/types/node.interface.js +9 -0
  310. package/dist/graph/types/node.interface.js.map +1 -0
  311. package/dist/graph/types/query.interface.d.ts +175 -0
  312. package/dist/graph/types/query.interface.js +9 -0
  313. package/dist/graph/types/query.interface.js.map +1 -0
  314. package/dist/graph/types/relationship.interface.d.ts +207 -0
  315. package/dist/graph/types/relationship.interface.js +9 -0
  316. package/dist/graph/types/relationship.interface.js.map +1 -0
  317. package/dist/graph/types/schema.interface.d.ts +295 -0
  318. package/dist/graph/types/schema.interface.js +9 -0
  319. package/dist/graph/types/schema.interface.js.map +1 -0
  320. package/dist/graph/types/transaction.interface.d.ts +55 -0
  321. package/dist/graph/types/transaction.interface.js +9 -0
  322. package/dist/graph/types/transaction.interface.js.map +1 -0
  323. package/dist/graph/types/traversal.interface.d.ts +181 -0
  324. package/dist/graph/types/traversal.interface.js +9 -0
  325. package/dist/graph/types/traversal.interface.js.map +1 -0
  326. package/dist/graph/utils/graph-error.d.ts +71 -0
  327. package/dist/graph/utils/graph-error.js +142 -0
  328. package/dist/graph/utils/graph-error.js.map +1 -0
  329. package/dist/graph/utils/index.d.ts +4 -0
  330. package/dist/graph/utils/index.js +9 -0
  331. package/dist/graph/utils/index.js.map +1 -0
  332. package/dist/imports/imports.service.d.ts +3 -3
  333. package/dist/imports/imports.service.js +8 -7
  334. package/dist/imports/imports.service.js.map +1 -1
  335. package/dist/imports/imports.types.d.ts +8 -0
  336. package/dist/imports/repos/openApi.repo.d.ts +1 -1
  337. package/dist/imports/repos/openApi.repo.js +414 -47
  338. package/dist/imports/repos/openApi.repo.js.map +1 -1
  339. package/dist/imports/repos/postmanV21.repo.d.ts +1 -1
  340. package/dist/imports/repos/postmanV21.repo.js +126 -83
  341. package/dist/imports/repos/postmanV21.repo.js.map +1 -1
  342. package/dist/index.d.ts +3654 -289
  343. package/dist/index.js +5066 -669
  344. package/dist/index.js.map +1 -1
  345. package/dist/init.interface.d.ts +407 -0
  346. package/dist/init.interface.js +3 -0
  347. package/dist/init.interface.js.map +1 -0
  348. package/dist/inputs/inputs.service.d.ts +1 -1
  349. package/dist/inputs/utils/inputs.utils.create.js +1 -1
  350. package/dist/inputs/utils/inputs.utils.create.js.map +1 -1
  351. package/dist/jobs/index.d.ts +38 -0
  352. package/dist/jobs/index.js +50 -0
  353. package/dist/jobs/index.js.map +1 -0
  354. package/dist/jobs/jobs.service.d.ts +154 -0
  355. package/dist/jobs/jobs.service.js +491 -0
  356. package/dist/jobs/jobs.service.js.map +1 -0
  357. package/dist/jobs/jobs.state.d.ts +113 -0
  358. package/dist/jobs/jobs.state.js +447 -0
  359. package/dist/jobs/jobs.state.js.map +1 -0
  360. package/dist/jobs/types.d.ts +449 -0
  361. package/dist/jobs/types.js +74 -0
  362. package/dist/jobs/types.js.map +1 -0
  363. package/dist/logs/logs.service.js +6 -2
  364. package/dist/logs/logs.service.js.map +1 -1
  365. package/dist/logs/logs.types.d.ts +19 -1
  366. package/dist/logs/logs.types.js +6 -0
  367. package/dist/logs/logs.types.js.map +1 -1
  368. package/dist/models/index.d.ts +6 -0
  369. package/dist/models/index.js +11 -0
  370. package/dist/models/index.js.map +1 -0
  371. package/dist/models/models.service.d.ts +137 -0
  372. package/dist/models/models.service.js +195 -0
  373. package/dist/models/models.service.js.map +1 -0
  374. package/dist/notifications/index.d.ts +13 -0
  375. package/dist/notifications/index.js +26 -0
  376. package/dist/notifications/index.js.map +1 -0
  377. package/dist/notifications/notifications.service.d.ts +265 -0
  378. package/dist/notifications/notifications.service.js +862 -0
  379. package/dist/notifications/notifications.service.js.map +1 -0
  380. package/dist/notifications/types/index.d.ts +4 -0
  381. package/dist/notifications/types/index.js +21 -0
  382. package/dist/notifications/types/index.js.map +1 -0
  383. package/dist/notifications/types/notifications.types.d.ts +402 -0
  384. package/dist/notifications/types/notifications.types.js +49 -0
  385. package/dist/notifications/types/notifications.types.js.map +1 -0
  386. package/dist/parsers/index.d.ts +3 -0
  387. package/dist/parsers/index.js +27 -0
  388. package/dist/parsers/index.js.map +1 -0
  389. package/dist/parsers/pipelines/postman.pipelines.d.ts +15 -0
  390. package/dist/parsers/pipelines/postman.pipelines.js +103 -0
  391. package/dist/parsers/pipelines/postman.pipelines.js.map +1 -0
  392. package/dist/parsers/types/postman.types.d.ts +200 -0
  393. package/dist/parsers/types/postman.types.js +3 -0
  394. package/dist/parsers/types/postman.types.js.map +1 -0
  395. package/dist/parsers/utils/postman.utils.d.ts +12 -0
  396. package/dist/parsers/utils/postman.utils.js +116 -0
  397. package/dist/parsers/utils/postman.utils.js.map +1 -0
  398. package/dist/parsers/validators/postman-auth.validators.d.ts +10 -0
  399. package/dist/parsers/validators/postman-auth.validators.js +127 -0
  400. package/dist/parsers/validators/postman-auth.validators.js.map +1 -0
  401. package/dist/parsers/validators/postman-request.validators.d.ts +13 -0
  402. package/dist/parsers/validators/postman-request.validators.js +139 -0
  403. package/dist/parsers/validators/postman-request.validators.js.map +1 -0
  404. package/dist/parsers/validators/postman-response.validators.d.ts +13 -0
  405. package/dist/parsers/validators/postman-response.validators.js +150 -0
  406. package/dist/parsers/validators/postman-response.validators.js.map +1 -0
  407. package/dist/parsers/validators/postman-variable.validators.d.ts +14 -0
  408. package/dist/parsers/validators/postman-variable.validators.js +163 -0
  409. package/dist/parsers/validators/postman-variable.validators.js.map +1 -0
  410. package/dist/pricing/pricing.repo.js +1 -0
  411. package/dist/pricing/pricing.repo.js.map +1 -0
  412. package/dist/pricing/pricing.service.d.ts +24 -0
  413. package/dist/pricing/pricing.service.js +51 -0
  414. package/dist/pricing/pricing.service.js.map +1 -0
  415. package/dist/pricing/pricing.types.d.ts +76 -0
  416. package/dist/pricing/pricing.types.js +21 -0
  417. package/dist/pricing/pricing.types.js.map +1 -0
  418. package/dist/pricing/utils/string.utils.d.ts +1 -0
  419. package/dist/pricing/utils/string.utils.js +9 -0
  420. package/dist/pricing/utils/string.utils.js.map +1 -0
  421. package/dist/processor/services/processor.service.d.ts +117 -73
  422. package/dist/processor/services/processor.service.js +1557 -1276
  423. package/dist/processor/services/processor.service.js.map +1 -1
  424. package/dist/processor/services/request.service.d.ts +36 -0
  425. package/dist/processor/services/request.service.js +304 -0
  426. package/dist/processor/services/request.service.js.map +1 -0
  427. package/dist/processor/types/request.types.d.ts +14 -0
  428. package/dist/processor/types/request.types.js +3 -0
  429. package/dist/processor/types/request.types.js.map +1 -0
  430. package/dist/processor/utils/processor.utils.js +32 -20
  431. package/dist/processor/utils/processor.utils.js.map +1 -1
  432. package/dist/processor/utils/request.utils.d.ts +20 -0
  433. package/dist/processor/utils/request.utils.js +113 -0
  434. package/dist/processor/utils/request.utils.js.map +1 -0
  435. package/dist/products/services/products.service.d.ts +365 -75
  436. package/dist/products/services/products.service.js +2809 -414
  437. package/dist/products/services/products.service.js.map +1 -1
  438. package/dist/products/utils/string.utils.d.ts +1 -1
  439. package/dist/products/utils/string.utils.js +14 -2
  440. package/dist/products/utils/string.utils.js.map +1 -1
  441. package/dist/products/validators/index.d.ts +7 -1
  442. package/dist/products/validators/index.js +16 -1
  443. package/dist/products/validators/index.js.map +1 -1
  444. package/dist/products/validators/joi-validators/create.productAgent.validator.d.ts +3 -0
  445. package/dist/products/validators/joi-validators/create.productAgent.validator.js +266 -0
  446. package/dist/products/validators/joi-validators/create.productAgent.validator.js.map +1 -0
  447. package/dist/products/validators/joi-validators/create.productDatabase.validator.js +5 -0
  448. package/dist/products/validators/joi-validators/create.productDatabase.validator.js.map +1 -1
  449. package/dist/products/validators/joi-validators/create.productEnv.validator.js +1 -0
  450. package/dist/products/validators/joi-validators/create.productEnv.validator.js.map +1 -1
  451. package/dist/products/validators/joi-validators/create.productGraph.validator.js +89 -0
  452. package/dist/products/validators/joi-validators/create.productGraph.validator.js.map +1 -0
  453. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.d.ts +4 -0
  454. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js +58 -0
  455. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js.map +1 -0
  456. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js +81 -25
  457. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js.map +1 -1
  458. package/dist/products/validators/joi-validators/create.productModel.validator.d.ts +3 -0
  459. package/dist/products/validators/joi-validators/create.productModel.validator.js +132 -0
  460. package/dist/products/validators/joi-validators/create.productModel.validator.js.map +1 -0
  461. package/dist/products/validators/joi-validators/create.productNotification.validator.js +133 -45
  462. package/dist/products/validators/joi-validators/create.productNotification.validator.js.map +1 -1
  463. package/dist/products/validators/joi-validators/create.productStorage.validator.js +77 -18
  464. package/dist/products/validators/joi-validators/create.productStorage.validator.js.map +1 -1
  465. package/dist/products/validators/joi-validators/create.productVector.validator.d.ts +3 -0
  466. package/dist/products/validators/joi-validators/create.productVector.validator.js +135 -0
  467. package/dist/products/validators/joi-validators/create.productVector.validator.js.map +1 -0
  468. package/dist/products/validators/joi-validators/update.dataValue.validator.js +1 -0
  469. package/dist/products/validators/joi-validators/update.dataValue.validator.js.map +1 -1
  470. package/dist/products/validators/joi-validators/update.productDatabase.validator.js +5 -0
  471. package/dist/products/validators/joi-validators/update.productDatabase.validator.js.map +1 -1
  472. package/dist/products/validators/joi-validators/update.productEnv.validator.js +3 -0
  473. package/dist/products/validators/joi-validators/update.productEnv.validator.js.map +1 -1
  474. package/dist/products/validators/joi-validators/update.productGraph.validator.js +88 -0
  475. package/dist/products/validators/joi-validators/update.productGraph.validator.js.map +1 -0
  476. package/dist/resilience/fallback.service.d.ts +140 -0
  477. package/dist/resilience/fallback.service.js +764 -0
  478. package/dist/resilience/fallback.service.js.map +1 -0
  479. package/dist/resilience/healthcheck.service.d.ts +159 -0
  480. package/dist/resilience/healthcheck.service.js +943 -0
  481. package/dist/resilience/healthcheck.service.js.map +1 -0
  482. package/dist/resilience/index.d.ts +104 -0
  483. package/dist/resilience/index.js +140 -0
  484. package/dist/resilience/index.js.map +1 -0
  485. package/dist/resilience/quota.service.d.ts +82 -0
  486. package/dist/resilience/quota.service.js +516 -0
  487. package/dist/resilience/quota.service.js.map +1 -0
  488. package/dist/resilience/resilience.service.d.ts +98 -0
  489. package/dist/resilience/resilience.service.js +560 -0
  490. package/dist/resilience/resilience.service.js.map +1 -0
  491. package/dist/resilience/types/index.d.ts +513 -0
  492. package/dist/resilience/types/index.js +29 -0
  493. package/dist/resilience/types/index.js.map +1 -0
  494. package/dist/secrets/index.d.ts +10 -0
  495. package/dist/secrets/index.js +33 -0
  496. package/dist/secrets/index.js.map +1 -0
  497. package/dist/secrets/secrets.resolver.d.ts +52 -0
  498. package/dist/secrets/secrets.resolver.js +233 -0
  499. package/dist/secrets/secrets.resolver.js.map +1 -0
  500. package/dist/secrets/secrets.service.d.ts +93 -0
  501. package/dist/secrets/secrets.service.js +258 -0
  502. package/dist/secrets/secrets.service.js.map +1 -0
  503. package/dist/secrets/secrets.types.d.ts +188 -0
  504. package/dist/secrets/secrets.types.js +87 -0
  505. package/dist/secrets/secrets.types.js.map +1 -0
  506. package/dist/sessions/index.d.ts +50 -0
  507. package/dist/sessions/index.js +93 -0
  508. package/dist/sessions/index.js.map +1 -0
  509. package/dist/sessions/sessions.helper.d.ts +68 -0
  510. package/dist/sessions/sessions.helper.js +116 -0
  511. package/dist/sessions/sessions.helper.js.map +1 -0
  512. package/dist/sessions/sessions.resolver.d.ts +157 -0
  513. package/dist/sessions/sessions.resolver.js +374 -0
  514. package/dist/sessions/sessions.resolver.js.map +1 -0
  515. package/dist/sessions/sessions.service.d.ts +178 -0
  516. package/dist/sessions/sessions.service.js +923 -0
  517. package/dist/sessions/sessions.service.js.map +1 -0
  518. package/dist/sessions/types/index.d.ts +298 -0
  519. package/dist/sessions/types/index.js +6 -0
  520. package/dist/sessions/types/index.js.map +1 -0
  521. package/dist/storage/index.d.ts +66 -0
  522. package/dist/storage/index.js +99 -0
  523. package/dist/storage/index.js.map +1 -0
  524. package/dist/storage/storage.service.d.ts +174 -0
  525. package/dist/storage/storage.service.js +757 -0
  526. package/dist/storage/storage.service.js.map +1 -0
  527. package/dist/storage/types/index.d.ts +267 -0
  528. package/dist/storage/types/index.js +6 -0
  529. package/dist/storage/types/index.js.map +1 -0
  530. package/dist/storage/utils/storage.util.d.ts +62 -0
  531. package/dist/storage/utils/storage.util.js +593 -0
  532. package/dist/storage/utils/storage.util.js.map +1 -0
  533. package/dist/test/index.d.ts +3 -0
  534. package/dist/test/index.js +11 -0
  535. package/dist/test/index.js.map +1 -0
  536. package/dist/test/test.appBuilder.d.ts +0 -1
  537. package/dist/test/test.appBuilder.js +0 -15
  538. package/dist/test/test.appBuilder.js.map +1 -1
  539. package/dist/test/test.broker.kafka.js +172 -0
  540. package/dist/test/test.broker.kafka.js.map +1 -0
  541. package/dist/test/test.broker.nats.js +193 -0
  542. package/dist/test/test.broker.nats.js.map +1 -0
  543. package/dist/test/test.broker.pubsub.js +171 -0
  544. package/dist/test/test.broker.pubsub.js.map +1 -0
  545. package/dist/test/test.broker.rabbitmq.js +164 -0
  546. package/dist/test/test.broker.rabbitmq.js.map +1 -0
  547. package/dist/test/test.broker.redis.js +168 -0
  548. package/dist/test/test.broker.redis.js.map +1 -0
  549. package/dist/test/test.broker.sqs.d.ts +1 -0
  550. package/dist/test/test.broker.sqs.js +158 -0
  551. package/dist/test/test.broker.sqs.js.map +1 -0
  552. package/dist/test/test.caches.d.ts +1 -0
  553. package/dist/test/test.caches.js +231 -0
  554. package/dist/test/test.caches.js.map +1 -0
  555. package/dist/test/test.database.d.ts +1 -0
  556. package/dist/test/test.database.dynamo.d.ts +1 -0
  557. package/dist/test/test.database.dynamo.js +265 -0
  558. package/dist/test/test.database.dynamo.js.map +1 -0
  559. package/dist/test/test.database.js +140 -0
  560. package/dist/test/test.database.js.map +1 -0
  561. package/dist/test/test.database.mongo.d.ts +1 -0
  562. package/dist/test/test.database.mongo.js +371 -0
  563. package/dist/test/test.database.mongo.js.map +1 -0
  564. package/dist/test/test.database.mysql.d.ts +1 -0
  565. package/dist/test/test.database.mysql.js +415 -0
  566. package/dist/test/test.database.mysql.js.map +1 -0
  567. package/dist/test/test.database.postgres.d.ts +1 -0
  568. package/dist/test/test.database.postgres.js +412 -0
  569. package/dist/test/test.database.postgres.js.map +1 -0
  570. package/dist/test/test.email.brevo.d.ts +1 -0
  571. package/dist/test/test.email.brevo.js +326 -0
  572. package/dist/test/test.email.brevo.js.map +1 -0
  573. package/dist/test/test.email.mailgun.d.ts +1 -0
  574. package/dist/test/test.email.mailgun.js +352 -0
  575. package/dist/test/test.email.mailgun.js.map +1 -0
  576. package/dist/test/test.email.postmark.d.ts +1 -0
  577. package/dist/test/test.email.postmark.js +316 -0
  578. package/dist/test/test.email.postmark.js.map +1 -0
  579. package/dist/test/test.email.sendgrid.d.ts +1 -0
  580. package/dist/test/test.email.sendgrid.js +365 -0
  581. package/dist/test/test.email.sendgrid.js.map +1 -0
  582. package/dist/test/test.email.smtp.d.ts +1 -0
  583. package/dist/test/test.email.smtp.js +323 -0
  584. package/dist/test/test.email.smtp.js.map +1 -0
  585. package/dist/test/test.graph.arangodb.d.ts +1 -0
  586. package/dist/test/test.graph.arangodb.js +358 -0
  587. package/dist/test/test.graph.arangodb.js.map +1 -0
  588. package/dist/test/test.graph.memgraph.d.ts +1 -0
  589. package/dist/test/test.graph.memgraph.js +320 -0
  590. package/dist/test/test.graph.memgraph.js.map +1 -0
  591. package/dist/test/test.graph.neo4j.d.ts +1 -0
  592. package/dist/test/test.graph.neo4j.js +218 -0
  593. package/dist/test/test.graph.neo4j.js.map +1 -0
  594. package/dist/test/test.graph.neptune.d.ts +1 -0
  595. package/dist/test/test.graph.neptune.js +331 -0
  596. package/dist/test/test.graph.neptune.js.map +1 -0
  597. package/dist/test/test.health.js +1 -0
  598. package/dist/test/test.health.js.map +1 -0
  599. package/dist/test/test.import.d.ts +0 -1
  600. package/dist/test/test.import.js +0 -1459
  601. package/dist/test/test.import.js.map +1 -1
  602. package/dist/test/test.import.openapi.d.ts +0 -1
  603. package/dist/test/test.import.openapi.js +0 -75
  604. package/dist/test/test.import.openapi.js.map +1 -1
  605. package/dist/test/test.imports.js +14 -55
  606. package/dist/test/test.imports.js.map +1 -1
  607. package/dist/test/test.logs.d.ts +0 -1
  608. package/dist/test/test.logs.js +0 -17
  609. package/dist/test/test.logs.js.map +1 -1
  610. package/dist/test/test.notifications.d.ts +1 -0
  611. package/dist/test/test.notifications.js +198 -0
  612. package/dist/test/test.notifications.js.map +1 -0
  613. package/dist/test/test.notifiers.js +1 -0
  614. package/dist/test/test.notifiers.js.map +1 -0
  615. package/dist/test/test.processor.d.ts +0 -1
  616. package/dist/test/test.processor.js +0 -122
  617. package/dist/test/test.processor.js.map +1 -1
  618. package/dist/test/test.productBuilder.d.ts +0 -1
  619. package/dist/test/test.productBuilder.js +0 -660
  620. package/dist/test/test.productBuilder.js.map +1 -1
  621. package/dist/test/test.products.js +1 -0
  622. package/dist/test/test.products.js.map +1 -0
  623. package/dist/test/test.push.expo.d.ts +1 -0
  624. package/dist/test/test.push.expo.js +442 -0
  625. package/dist/test/test.push.expo.js.map +1 -0
  626. package/dist/test/test.push.firebase.d.ts +1 -0
  627. package/dist/test/test.push.firebase.js +409 -0
  628. package/dist/test/test.push.firebase.js.map +1 -0
  629. package/dist/test/test.session.d.ts +1 -0
  630. package/dist/test/test.session.js +299 -0
  631. package/dist/test/test.session.js.map +1 -0
  632. package/dist/test/test.sms.nexmo.d.ts +1 -0
  633. package/dist/test/test.sms.nexmo.js +278 -0
  634. package/dist/test/test.sms.nexmo.js.map +1 -0
  635. package/dist/test/test.sms.twilio.d.ts +1 -0
  636. package/dist/test/test.sms.twilio.js +275 -0
  637. package/dist/test/test.sms.twilio.js.map +1 -0
  638. package/dist/test/test.storage.d.ts +1 -0
  639. package/dist/test/test.storage.js +202 -0
  640. package/dist/test/test.storage.js.map +1 -0
  641. package/dist/test/test.triggers.d.ts +1 -0
  642. package/dist/test/test.triggers.js +314 -0
  643. package/dist/test/test.triggers.js.map +1 -0
  644. package/dist/test/test.vector.pinecone.d.ts +1 -0
  645. package/dist/test/test.vector.pinecone.js +238 -0
  646. package/dist/test/test.vector.pinecone.js.map +1 -0
  647. package/dist/test/test.vector.qdrant.d.ts +1 -0
  648. package/dist/test/test.vector.qdrant.js +307 -0
  649. package/dist/test/test.vector.qdrant.js.map +1 -0
  650. package/dist/test/test.vector.weaviate.d.ts +1 -0
  651. package/dist/test/test.vector.weaviate.js +325 -0
  652. package/dist/test/test.vector.weaviate.js.map +1 -0
  653. package/dist/types/appBuilder.types.d.ts +9 -2
  654. package/dist/types/enums.d.ts +11 -1
  655. package/dist/types/enums.js +10 -0
  656. package/dist/types/enums.js.map +1 -1
  657. package/dist/types/index.types.d.ts +4 -7
  658. package/dist/types/index.types.js +0 -1
  659. package/dist/types/index.types.js.map +1 -1
  660. package/dist/types/inputs.types.js +1 -1
  661. package/dist/types/inputs.types.js.map +1 -1
  662. package/dist/types/pricing.types.d.ts +4 -0
  663. package/dist/types/pricing.types.js +3 -0
  664. package/dist/types/pricing.types.js.map +1 -0
  665. package/dist/types/processor.types.d.ts +214 -33
  666. package/dist/types/processor.types.js +9 -1
  667. package/dist/types/processor.types.js.map +1 -1
  668. package/dist/types/productsBuilder.types.d.ts +978 -23
  669. package/dist/types/productsBuilder.types.js +210 -3
  670. package/dist/types/productsBuilder.types.js.map +1 -1
  671. package/dist/types/request-tracker.interface.js +1 -0
  672. package/dist/types/request-tracker.interface.js.map +1 -0
  673. package/dist/types/requests.types.d.ts +2 -0
  674. package/dist/utils/constants.d.ts +1 -0
  675. package/dist/utils/constants.js +5 -0
  676. package/dist/utils/constants.js.map +1 -0
  677. package/dist/utils/index.d.ts +0 -2
  678. package/dist/utils/index.js +24 -52
  679. package/dist/utils/index.js.map +1 -1
  680. package/dist/vector/actions/action-manager.d.ts +140 -0
  681. package/dist/vector/actions/action-manager.js +356 -0
  682. package/dist/vector/actions/action-manager.js.map +1 -0
  683. package/dist/vector/adapters/base.adapter.d.ts +169 -0
  684. package/dist/vector/adapters/base.adapter.js +218 -0
  685. package/dist/vector/adapters/base.adapter.js.map +1 -0
  686. package/dist/vector/adapters/index.d.ts +10 -0
  687. package/dist/vector/adapters/index.js +19 -0
  688. package/dist/vector/adapters/index.js.map +1 -0
  689. package/dist/vector/adapters/memory.adapter.d.ts +85 -0
  690. package/dist/vector/adapters/memory.adapter.js +505 -0
  691. package/dist/vector/adapters/memory.adapter.js.map +1 -0
  692. package/dist/vector/adapters/pinecone.adapter.d.ts +52 -0
  693. package/dist/vector/adapters/pinecone.adapter.js +433 -0
  694. package/dist/vector/adapters/pinecone.adapter.js.map +1 -0
  695. package/dist/vector/adapters/qdrant.adapter.d.ts +56 -0
  696. package/dist/vector/adapters/qdrant.adapter.js +442 -0
  697. package/dist/vector/adapters/qdrant.adapter.js.map +1 -0
  698. package/dist/vector/adapters/weaviate.adapter.d.ts +68 -0
  699. package/dist/vector/adapters/weaviate.adapter.js +645 -0
  700. package/dist/vector/adapters/weaviate.adapter.js.map +1 -0
  701. package/dist/vector/index.d.ts +36 -0
  702. package/dist/vector/index.js +70 -0
  703. package/dist/vector/index.js.map +1 -0
  704. package/dist/vector/types/action.interface.d.ts +195 -0
  705. package/dist/vector/types/action.interface.js +100 -0
  706. package/dist/vector/types/action.interface.js.map +1 -0
  707. package/dist/vector/types/connection.interface.d.ts +151 -0
  708. package/dist/vector/types/connection.interface.js +8 -0
  709. package/dist/vector/types/connection.interface.js.map +1 -0
  710. package/dist/vector/types/embedding.interface.d.ts +144 -0
  711. package/dist/vector/types/embedding.interface.js +8 -0
  712. package/dist/vector/types/embedding.interface.js.map +1 -0
  713. package/dist/vector/types/enums.d.ts +104 -0
  714. package/dist/vector/types/enums.js +113 -0
  715. package/dist/vector/types/enums.js.map +1 -0
  716. package/dist/vector/types/index.d.ts +11 -0
  717. package/dist/vector/types/index.js +23 -0
  718. package/dist/vector/types/index.js.map +1 -0
  719. package/dist/vector/types/vector.interface.d.ts +315 -0
  720. package/dist/vector/types/vector.interface.js +8 -0
  721. package/dist/vector/types/vector.interface.js.map +1 -0
  722. package/dist/vector/utils/index.d.ts +6 -0
  723. package/dist/vector/utils/index.js +11 -0
  724. package/dist/vector/utils/index.js.map +1 -0
  725. package/dist/vector/utils/vector-error.d.ts +69 -0
  726. package/dist/vector/utils/vector-error.js +116 -0
  727. package/dist/vector/utils/vector-error.js.map +1 -0
  728. package/dist/vector/vector-database.service.d.ts +474 -0
  729. package/dist/vector/vector-database.service.js +850 -0
  730. package/dist/vector/vector-database.service.js.map +1 -0
  731. package/dist/vector/vector.service.d.ts +283 -0
  732. package/dist/vector/vector.service.js +544 -0
  733. package/dist/vector/vector.service.js.map +1 -0
  734. package/dist/warehouse/executor/index.d.ts +5 -0
  735. package/dist/warehouse/executor/index.js +12 -0
  736. package/dist/warehouse/executor/index.js.map +1 -0
  737. package/dist/warehouse/executor/joins/index.d.ts +5 -0
  738. package/dist/warehouse/executor/joins/index.js +11 -0
  739. package/dist/warehouse/executor/joins/index.js.map +1 -0
  740. package/dist/warehouse/executor/joins/join-executor.d.ts +101 -0
  741. package/dist/warehouse/executor/joins/join-executor.js +493 -0
  742. package/dist/warehouse/executor/joins/join-executor.js.map +1 -0
  743. package/dist/warehouse/executor/joins/semantic-join.d.ts +64 -0
  744. package/dist/warehouse/executor/joins/semantic-join.js +241 -0
  745. package/dist/warehouse/executor/joins/semantic-join.js.map +1 -0
  746. package/dist/warehouse/executor/single-source-executor.d.ts +155 -0
  747. package/dist/warehouse/executor/single-source-executor.js +573 -0
  748. package/dist/warehouse/executor/single-source-executor.js.map +1 -0
  749. package/dist/warehouse/index.d.ts +79 -0
  750. package/dist/warehouse/index.js +111 -0
  751. package/dist/warehouse/index.js.map +1 -0
  752. package/dist/warehouse/parser/index.d.ts +4 -0
  753. package/dist/warehouse/parser/index.js +10 -0
  754. package/dist/warehouse/parser/index.js.map +1 -0
  755. package/dist/warehouse/parser/query-parser.d.ts +181 -0
  756. package/dist/warehouse/parser/query-parser.js +415 -0
  757. package/dist/warehouse/parser/query-parser.js.map +1 -0
  758. package/dist/warehouse/registry/data-source-registry.d.ts +207 -0
  759. package/dist/warehouse/registry/data-source-registry.js +396 -0
  760. package/dist/warehouse/registry/data-source-registry.js.map +1 -0
  761. package/dist/warehouse/registry/index.d.ts +4 -0
  762. package/dist/warehouse/registry/index.js +9 -0
  763. package/dist/warehouse/registry/index.js.map +1 -0
  764. package/dist/warehouse/transactions/index.d.ts +4 -0
  765. package/dist/warehouse/transactions/index.js +9 -0
  766. package/dist/warehouse/transactions/index.js.map +1 -0
  767. package/dist/warehouse/transactions/saga-orchestrator.d.ts +92 -0
  768. package/dist/warehouse/transactions/saga-orchestrator.js +383 -0
  769. package/dist/warehouse/transactions/saga-orchestrator.js.map +1 -0
  770. package/dist/warehouse/types/index.d.ts +9 -0
  771. package/dist/warehouse/types/index.js +33 -0
  772. package/dist/warehouse/types/index.js.map +1 -0
  773. package/dist/warehouse/types/join.interface.d.ts +225 -0
  774. package/dist/warehouse/types/join.interface.js +87 -0
  775. package/dist/warehouse/types/join.interface.js.map +1 -0
  776. package/dist/warehouse/types/query.interface.d.ts +232 -0
  777. package/dist/warehouse/types/query.interface.js +9 -0
  778. package/dist/warehouse/types/query.interface.js.map +1 -0
  779. package/dist/warehouse/types/transaction.interface.d.ts +236 -0
  780. package/dist/warehouse/types/transaction.interface.js +74 -0
  781. package/dist/warehouse/types/transaction.interface.js.map +1 -0
  782. package/dist/warehouse/types/where.interface.d.ts +208 -0
  783. package/dist/warehouse/types/where.interface.js +89 -0
  784. package/dist/warehouse/types/where.interface.js.map +1 -0
  785. package/dist/warehouse/warehouse.service.d.ts +200 -0
  786. package/dist/warehouse/warehouse.service.js +470 -0
  787. package/dist/warehouse/warehouse.service.js.map +1 -0
  788. package/dist/workflows/index.d.ts +30 -0
  789. package/dist/workflows/index.js +64 -0
  790. package/dist/workflows/index.js.map +1 -0
  791. package/dist/workflows/types/index.d.ts +6 -0
  792. package/dist/workflows/types/index.js +23 -0
  793. package/dist/workflows/types/index.js.map +1 -0
  794. package/dist/workflows/types/workflows.types.d.ts +1037 -0
  795. package/dist/workflows/types/workflows.types.js +13 -0
  796. package/dist/workflows/types/workflows.types.js.map +1 -0
  797. package/dist/workflows/workflow-builder.d.ts +70 -0
  798. package/dist/workflows/workflow-builder.js +338 -0
  799. package/dist/workflows/workflow-builder.js.map +1 -0
  800. package/dist/workflows/workflow-executor.d.ts +208 -0
  801. package/dist/workflows/workflow-executor.js +1194 -0
  802. package/dist/workflows/workflow-executor.js.map +1 -0
  803. package/dist/workflows/workflows.service.d.ts +410 -0
  804. package/dist/workflows/workflows.service.js +1724 -0
  805. package/dist/workflows/workflows.service.js.map +1 -0
  806. package/package.json +65 -12
  807. package/dist/actions/actions.repo.js +0 -13
  808. package/dist/actions/actions.repo.js.map +0 -1
  809. package/dist/actions/actions.service.js +0 -24
  810. package/dist/actions/actions.service.js.map +0 -1
  811. package/dist/actions/utils/actions.util.read.js +0 -427
  812. package/dist/actions/utils/actions.util.read.js.map +0 -1
  813. package/dist/api/services/integrationsApi.service.d.ts +0 -18
  814. package/dist/api/services/integrationsApi.service.js +0 -80
  815. package/dist/api/services/integrationsApi.service.js.map +0 -1
  816. package/dist/appBuilder/services/app.service.d.ts +0 -111
  817. package/dist/appBuilder/services/app.service.js +0 -737
  818. package/dist/appBuilder/services/app.service.js.map +0 -1
  819. package/dist/appBuilder/services/appBuilder.service.d.ts +0 -111
  820. package/dist/appBuilder/services/appBuilder.service.js +0 -662
  821. package/dist/appBuilder/services/appBuilder.service.js.map +0 -1
  822. package/dist/appBuilder/utils/objects.utils.d.ts +0 -3
  823. package/dist/appBuilder/utils/objects.utils.js +0 -9
  824. package/dist/appBuilder/utils/objects.utils.js.map +0 -1
  825. package/dist/appBuilder/utils/string.utils.d.ts +0 -2
  826. package/dist/appBuilder/utils/string.utils.js +0 -57
  827. package/dist/appBuilder/utils/string.utils.js.map +0 -1
  828. package/dist/appBuilder/validators/index.d.ts +0 -19
  829. package/dist/appBuilder/validators/index.js +0 -40
  830. package/dist/appBuilder/validators/index.js.map +0 -1
  831. package/dist/appBuilder/validators/joi-validators/create.app.validator.js +0 -10
  832. package/dist/appBuilder/validators/joi-validators/create.app.validator.js.map +0 -1
  833. package/dist/appBuilder/validators/joi-validators/create.appAction.validator.d.ts +0 -4
  834. package/dist/appBuilder/validators/joi-validators/create.appAction.validator.js +0 -20
  835. package/dist/appBuilder/validators/joi-validators/create.appAction.validator.js.map +0 -1
  836. package/dist/appBuilder/validators/joi-validators/create.appActionResponse.validator.d.ts +0 -7
  837. package/dist/appBuilder/validators/joi-validators/create.appActionResponse.validator.js +0 -44
  838. package/dist/appBuilder/validators/joi-validators/create.appActionResponse.validator.js.map +0 -1
  839. package/dist/appBuilder/validators/joi-validators/create.appAuth.validator.d.ts +0 -3
  840. package/dist/appBuilder/validators/joi-validators/create.appAuth.validator.js +0 -31
  841. package/dist/appBuilder/validators/joi-validators/create.appAuth.validator.js.map +0 -1
  842. package/dist/appBuilder/validators/joi-validators/create.appBody.validators.d.ts +0 -4
  843. package/dist/appBuilder/validators/joi-validators/create.appBody.validators.js +0 -11
  844. package/dist/appBuilder/validators/joi-validators/create.appBody.validators.js.map +0 -1
  845. package/dist/appBuilder/validators/joi-validators/create.appConstants.validator.d.ts +0 -4
  846. package/dist/appBuilder/validators/joi-validators/create.appConstants.validator.js +0 -12
  847. package/dist/appBuilder/validators/joi-validators/create.appConstants.validator.js.map +0 -1
  848. package/dist/appBuilder/validators/joi-validators/create.appEnv.validator.d.ts +0 -4
  849. package/dist/appBuilder/validators/joi-validators/create.appEnv.validator.js +0 -17
  850. package/dist/appBuilder/validators/joi-validators/create.appEnv.validator.js.map +0 -1
  851. package/dist/appBuilder/validators/joi-validators/create.appEvent.validator.d.ts +0 -5
  852. package/dist/appBuilder/validators/joi-validators/create.appEvent.validator.js +0 -30
  853. package/dist/appBuilder/validators/joi-validators/create.appEvent.validator.js.map +0 -1
  854. package/dist/appBuilder/validators/joi-validators/create.appVariable.validator.d.ts +0 -4
  855. package/dist/appBuilder/validators/joi-validators/create.appVariable.validator.js +0 -14
  856. package/dist/appBuilder/validators/joi-validators/create.appVariable.validator.js.map +0 -1
  857. package/dist/appBuilder/validators/joi-validators/sample.validator.d.ts +0 -5
  858. package/dist/appBuilder/validators/joi-validators/sample.validator.js +0 -26
  859. package/dist/appBuilder/validators/joi-validators/sample.validator.js.map +0 -1
  860. package/dist/appBuilder/validators/joi-validators/update.app.validator.d.ts +0 -4
  861. package/dist/appBuilder/validators/joi-validators/update.app.validator.js +0 -34
  862. package/dist/appBuilder/validators/joi-validators/update.app.validator.js.map +0 -1
  863. package/dist/appBuilder/validators/joi-validators/update.appAction.validator.d.ts +0 -4
  864. package/dist/appBuilder/validators/joi-validators/update.appAction.validator.js +0 -23
  865. package/dist/appBuilder/validators/joi-validators/update.appAction.validator.js.map +0 -1
  866. package/dist/appBuilder/validators/joi-validators/update.appActionResponse.validator.d.ts +0 -3
  867. package/dist/appBuilder/validators/joi-validators/update.appActionResponse.validator.js +0 -21
  868. package/dist/appBuilder/validators/joi-validators/update.appActionResponse.validator.js.map +0 -1
  869. package/dist/appBuilder/validators/joi-validators/update.appAuth.validator.d.ts +0 -4
  870. package/dist/appBuilder/validators/joi-validators/update.appAuth.validator.js +0 -19
  871. package/dist/appBuilder/validators/joi-validators/update.appAuth.validator.js.map +0 -1
  872. package/dist/appBuilder/validators/joi-validators/update.appConstants.validator.d.ts +0 -4
  873. package/dist/appBuilder/validators/joi-validators/update.appConstants.validator.js +0 -12
  874. package/dist/appBuilder/validators/joi-validators/update.appConstants.validator.js.map +0 -1
  875. package/dist/appBuilder/validators/joi-validators/update.appEnv.validator.d.ts +0 -4
  876. package/dist/appBuilder/validators/joi-validators/update.appEnv.validator.js +0 -17
  877. package/dist/appBuilder/validators/joi-validators/update.appEnv.validator.js.map +0 -1
  878. package/dist/appBuilder/validators/joi-validators/update.appEvent.validator.d.ts +0 -4
  879. package/dist/appBuilder/validators/joi-validators/update.appEvent.validator.js +0 -16
  880. package/dist/appBuilder/validators/joi-validators/update.appEvent.validator.js.map +0 -1
  881. package/dist/appBuilder/validators/joi-validators/update.appVariables.validator.d.ts +0 -4
  882. package/dist/appBuilder/validators/joi-validators/update.appVariables.validator.js +0 -14
  883. package/dist/appBuilder/validators/joi-validators/update.appVariables.validator.js.map +0 -1
  884. package/dist/appBuilder/validators/joi-validators/update.validation.entityData.validator.js +0 -27
  885. package/dist/appBuilder/validators/joi-validators/update.validation.entityData.validator.js.map +0 -1
  886. package/dist/apps/validators/joi-validators/create.appEvent.validator.d.ts +0 -5
  887. package/dist/apps/validators/joi-validators/create.appEvent.validator.js +0 -30
  888. package/dist/apps/validators/joi-validators/create.appEvent.validator.js.map +0 -1
  889. package/dist/apps/validators/joi-validators/update.appEvent.validator.d.ts +0 -4
  890. package/dist/apps/validators/joi-validators/update.appEvent.validator.js +0 -16
  891. package/dist/apps/validators/joi-validators/update.appEvent.validator.js.map +0 -1
  892. package/dist/clients/integrations.client.d.ts +0 -2
  893. package/dist/clients/integrations.client.js +0 -26
  894. package/dist/clients/integrations.client.js.map +0 -1
  895. package/dist/integrationsBuilder/services/integration.service.d.ts +0 -138
  896. package/dist/integrationsBuilder/services/integration.service.js +0 -1148
  897. package/dist/integrationsBuilder/services/integration.service.js.map +0 -1
  898. package/dist/integrationsBuilder/services/integrationBuilder.service.d.ts +0 -130
  899. package/dist/integrationsBuilder/services/integrationBuilder.service.js +0 -1017
  900. package/dist/integrationsBuilder/services/integrationBuilder.service.js.map +0 -1
  901. package/dist/integrationsBuilder/utils/objects.utils.d.ts +0 -2
  902. package/dist/integrationsBuilder/utils/objects.utils.js +0 -48
  903. package/dist/integrationsBuilder/utils/objects.utils.js.map +0 -1
  904. package/dist/integrationsBuilder/utils/string.utils.d.ts +0 -1
  905. package/dist/integrationsBuilder/utils/string.utils.js +0 -9
  906. package/dist/integrationsBuilder/utils/string.utils.js.map +0 -1
  907. package/dist/integrationsBuilder/validators/index.d.ts +0 -18
  908. package/dist/integrationsBuilder/validators/index.js +0 -38
  909. package/dist/integrationsBuilder/validators/index.js.map +0 -1
  910. package/dist/integrationsBuilder/validators/joi-validators/create.integration.validator.d.ts +0 -3
  911. package/dist/integrationsBuilder/validators/joi-validators/create.integration.validator.js +0 -10
  912. package/dist/integrationsBuilder/validators/joi-validators/create.integration.validator.js.map +0 -1
  913. package/dist/integrationsBuilder/validators/joi-validators/create.integrationApp.validator.d.ts +0 -4
  914. package/dist/integrationsBuilder/validators/joi-validators/create.integrationApp.validator.js +0 -26
  915. package/dist/integrationsBuilder/validators/joi-validators/create.integrationApp.validator.js.map +0 -1
  916. package/dist/integrationsBuilder/validators/joi-validators/create.integrationCache.validator.d.ts +0 -3
  917. package/dist/integrationsBuilder/validators/joi-validators/create.integrationCache.validator.js +0 -8
  918. package/dist/integrationsBuilder/validators/joi-validators/create.integrationCache.validator.js.map +0 -1
  919. package/dist/integrationsBuilder/validators/joi-validators/create.integrationDatabase.validator.d.ts +0 -3
  920. package/dist/integrationsBuilder/validators/joi-validators/create.integrationDatabase.validator.js +0 -8
  921. package/dist/integrationsBuilder/validators/joi-validators/create.integrationDatabase.validator.js.map +0 -1
  922. package/dist/integrationsBuilder/validators/joi-validators/create.integrationEnv.validator.d.ts +0 -3
  923. package/dist/integrationsBuilder/validators/joi-validators/create.integrationEnv.validator.js +0 -10
  924. package/dist/integrationsBuilder/validators/joi-validators/create.integrationEnv.validator.js.map +0 -1
  925. package/dist/integrationsBuilder/validators/joi-validators/create.integrationFeature.validator.d.ts +0 -3
  926. package/dist/integrationsBuilder/validators/joi-validators/create.integrationFeature.validator.js +0 -60
  927. package/dist/integrationsBuilder/validators/joi-validators/create.integrationFeature.validator.js.map +0 -1
  928. package/dist/integrationsBuilder/validators/joi-validators/create.integrationFunction.validator.d.ts +0 -3
  929. package/dist/integrationsBuilder/validators/joi-validators/create.integrationFunction.validator.js +0 -8
  930. package/dist/integrationsBuilder/validators/joi-validators/create.integrationFunction.validator.js.map +0 -1
  931. package/dist/integrationsBuilder/validators/joi-validators/create.integrationJob.validator.d.ts +0 -3
  932. package/dist/integrationsBuilder/validators/joi-validators/create.integrationJob.validator.js +0 -8
  933. package/dist/integrationsBuilder/validators/joi-validators/create.integrationJob.validator.js.map +0 -1
  934. package/dist/integrationsBuilder/validators/joi-validators/create.integrationNotification.validator.d.ts +0 -3
  935. package/dist/integrationsBuilder/validators/joi-validators/create.integrationNotification.validator.js +0 -8
  936. package/dist/integrationsBuilder/validators/joi-validators/create.integrationNotification.validator.js.map +0 -1
  937. package/dist/integrationsBuilder/validators/joi-validators/update.integrationApp.validator.d.ts +0 -3
  938. package/dist/integrationsBuilder/validators/joi-validators/update.integrationApp.validator.js +0 -9
  939. package/dist/integrationsBuilder/validators/joi-validators/update.integrationApp.validator.js.map +0 -1
  940. package/dist/integrationsBuilder/validators/joi-validators/update.integrationCache.validator.d.ts +0 -3
  941. package/dist/integrationsBuilder/validators/joi-validators/update.integrationCache.validator.js +0 -8
  942. package/dist/integrationsBuilder/validators/joi-validators/update.integrationCache.validator.js.map +0 -1
  943. package/dist/integrationsBuilder/validators/joi-validators/update.integrationDatabase.validator.d.ts +0 -3
  944. package/dist/integrationsBuilder/validators/joi-validators/update.integrationDatabase.validator.js +0 -8
  945. package/dist/integrationsBuilder/validators/joi-validators/update.integrationDatabase.validator.js.map +0 -1
  946. package/dist/integrationsBuilder/validators/joi-validators/update.integrationEnv.validator.d.ts +0 -3
  947. package/dist/integrationsBuilder/validators/joi-validators/update.integrationEnv.validator.js +0 -8
  948. package/dist/integrationsBuilder/validators/joi-validators/update.integrationEnv.validator.js.map +0 -1
  949. package/dist/integrationsBuilder/validators/joi-validators/update.integrationFeature.validator.d.ts +0 -3
  950. package/dist/integrationsBuilder/validators/joi-validators/update.integrationFeature.validator.js +0 -8
  951. package/dist/integrationsBuilder/validators/joi-validators/update.integrationFeature.validator.js.map +0 -1
  952. package/dist/integrationsBuilder/validators/joi-validators/update.integrationFunction.validator copy.d.ts +0 -3
  953. package/dist/integrationsBuilder/validators/joi-validators/update.integrationFunction.validator copy.js +0 -8
  954. package/dist/integrationsBuilder/validators/joi-validators/update.integrationFunction.validator copy.js.map +0 -1
  955. package/dist/integrationsBuilder/validators/joi-validators/update.integrationJob.validator.d.ts +0 -3
  956. package/dist/integrationsBuilder/validators/joi-validators/update.integrationJob.validator.js +0 -8
  957. package/dist/integrationsBuilder/validators/joi-validators/update.integrationJob.validator.js.map +0 -1
  958. package/dist/integrationsBuilder/validators/joi-validators/update.integrationNotification.validator.d.ts +0 -3
  959. package/dist/integrationsBuilder/validators/joi-validators/update.integrationNotification.validator.js +0 -8
  960. package/dist/integrationsBuilder/validators/joi-validators/update.integrationNotification.validator.js.map +0 -1
  961. package/dist/postman.d.ts +0 -1
  962. package/dist/postman.js +0 -21674
  963. package/dist/postman.js.map +0 -1
  964. package/dist/processor/utils/mongo.util.js +0 -152
  965. package/dist/processor/utils/mongo.util.js.map +0 -1
  966. package/dist/processor/utils/postgres.util.d.ts +0 -14
  967. package/dist/processor/utils/postgres.util.js +0 -83
  968. package/dist/processor/utils/postgres.util.js.map +0 -1
  969. package/dist/products/validators/joi-validators/create.product.validator.d.ts +0 -3
  970. package/dist/products/validators/joi-validators/create.product.validator.js +0 -10
  971. package/dist/products/validators/joi-validators/create.product.validator.js.map +0 -1
  972. package/dist/test.appBuilder.js +0 -14
  973. package/dist/test.appBuilder.js.map +0 -1
  974. package/dist/test.import.js +0 -24
  975. package/dist/test.import.js.map +0 -1
  976. package/dist/test.imports.js +0 -28
  977. package/dist/test.imports.js.map +0 -1
  978. package/dist/test.integrationBuilder.js +0 -276
  979. package/dist/test.integrationBuilder.js.map +0 -1
  980. package/dist/test.processor.js +0 -23
  981. package/dist/test.processor.js.map +0 -1
  982. package/dist/test.utils.js +0 -25
  983. package/dist/test.utils.js.map +0 -1
  984. package/dist/types/integrationsBuilder.types.d.ts +0 -276
  985. package/dist/types/integrationsBuilder.types.js +0 -51
  986. package/dist/types/integrationsBuilder.types.js.map +0 -1
  987. /package/dist/{actions/actions.repo.d.ts → pricing/pricing.repo.d.ts} +0 -0
  988. /package/dist/{appBuilder/validators/joi-validators/create.app.validator.d.ts → products/validators/joi-validators/create.productGraph.validator.d.ts} +0 -0
  989. /package/dist/{appBuilder/validators/joi-validators/update.validation.entityData.validator.d.ts → products/validators/joi-validators/update.productGraph.validator.d.ts} +0 -0
  990. /package/dist/{test.appBuilder.d.ts → test/test.broker.kafka.d.ts} +0 -0
  991. /package/dist/{test.imports.d.ts → test/test.broker.nats.d.ts} +0 -0
  992. /package/dist/{test.integrationBuilder.d.ts → test/test.broker.pubsub.d.ts} +0 -0
  993. /package/dist/{test.processor.d.ts → test/test.broker.rabbitmq.d.ts} +0 -0
  994. /package/dist/{test.utils.d.ts → test/test.broker.redis.d.ts} +0 -0
  995. /package/dist/{actions/actions.service.d.ts → test/test.health.d.ts} +0 -0
  996. /package/dist/{actions/utils/actions.util.read.d.ts → test/test.notifiers.d.ts} +0 -0
  997. /package/dist/{processor/utils/mongo.util.d.ts → test/test.products.d.ts} +0 -0
  998. /package/dist/{test.import.d.ts → types/request-tracker.interface.d.ts} +0 -0
@@ -0,0 +1,1408 @@
1
+ /**
2
+ * DatabaseService - Main ORM Service Class
3
+ *
4
+ * This is the primary entry point for all database operations in the Ductape SDK.
5
+ * It provides a unified interface for querying, writing, transactions, schema management,
6
+ * migrations, and database actions across multiple database types.
7
+ *
8
+ * Supported databases: PostgreSQL, MySQL, MongoDB, DynamoDB, MariaDB, Cassandra
9
+ */
10
+ import { IConnectionConfig, IConnectionResult, IConnectionContext, IDatabaseConfig } from './types/connection.interface';
11
+ import { IQueryOptions, IQueryResult, IRawQueryOptions, IRawQueryResult } from './types/query.interface';
12
+ import { IInsertOptions, IInsertResult, IUpdateOptions, IUpdateResult, IDeleteOptions, IDeleteResult, IUpsertOptions, IUpsertResult } from './types/write.interface';
13
+ import { ITransactionOptions, ITransaction, ITransactionCallback } from './types/transaction.interface';
14
+ import { IAggregateOptions, IAggregateResult, ICountOptions, ISumOptions, IAvgOptions, IMinMaxOptions, IGroupByOptions, IGroupByResult } from './types/aggregation.interface';
15
+ import { ICreateTableOptions, ITableDefinition, IAlterTableOperation, ITableSchema, ITableInfo, ICreateIndexOptions, IDropIndexOptions, IListIndexesOptions, IIndexInfo, IIndexStatistics, SimpleFieldType, ISimpleFieldDefinition, ISimpleSchemaDefinition, ISimpleCreateOptions, ISimpleDropOptions, ISimpleIndexOptions } from './types/schema.interface';
16
+ import { IIndexFieldDefinition, IConstraintDefinition as IMigrationConstraintDefinition, IMigration, IMigrationHistory, IMigrationStatusResult, IMigrationResult } from './types/migration.interface';
17
+ import { ISchemaOperationResult } from './schema/schema-manager';
18
+ import { IActionDefinition, IActionCreateOptions, IActionUpdateOptions, IActionExecuteOptions } from './types/action.interface';
19
+ import { BaseAdapter } from './adapters/base.adapter';
20
+ import { TriggerProcessor } from './triggers/trigger-processor';
21
+ import { TriggerEvent, TriggerTiming, TriggerActionType, ITriggerDefinition, ITriggerContext, ITriggerResult } from './types/trigger.interface';
22
+ import { IProductDatabase, IProductDatabaseTrigger } from '../types';
23
+ import { RedisClientType } from 'redis';
24
+ import { IDBActionDispatchInput, IDBOperationDispatchInput, IDispatchResult } from '../types/processor.types';
25
+ /**
26
+ * Configuration options for DatabaseService initialization
27
+ */
28
+ export interface IDatabaseServiceConfig {
29
+ /** Workspace ID */
30
+ workspace_id: string;
31
+ /** Public key for authentication */
32
+ public_key: string;
33
+ /** User ID */
34
+ user_id: string;
35
+ /** Authentication token */
36
+ token: string;
37
+ /** Environment type (staging, production, local) */
38
+ env_type: string;
39
+ private_key: string;
40
+ /** Optional Redis client for caching */
41
+ redis_client?: RedisClientType;
42
+ }
43
+ /**
44
+ * Main Database Service class
45
+ * Provides unified ORM interface for all supported databases
46
+ */
47
+ export declare class DatabaseService {
48
+ private adapters;
49
+ private connectionContexts;
50
+ private currentContext;
51
+ private adapterFactory;
52
+ private transactionManager;
53
+ private schemaManagers;
54
+ private migrationEngines;
55
+ private actionManager;
56
+ private _privateKey;
57
+ /** Service configuration */
58
+ private config;
59
+ /** ProductBuilder instances cache (keyed by product tag) */
60
+ private productBuilders;
61
+ /** LogService instance for logging operations */
62
+ private logService;
63
+ /** Current product ID for logging */
64
+ private productId;
65
+ /** CacheManager for two-tier caching (Redis + remote) */
66
+ private cacheManager;
67
+ /** Private keys cache for products (keyed by product tag) */
68
+ private privateKeys;
69
+ /**
70
+ * Create a new DatabaseService instance
71
+ * @param config - Optional configuration for authentication and workspace context
72
+ */
73
+ constructor(config?: IDatabaseServiceConfig & {
74
+ access_key: string;
75
+ });
76
+ /**
77
+ * Get or create a SchemaManager for the given adapter key or current context
78
+ */
79
+ private getSchemaManager;
80
+ /**
81
+ * Get or create a MigrationEngine for the given adapter key or current context
82
+ */
83
+ private getMigrationEngine;
84
+ /**
85
+ * Create a new ProductBuilder instance
86
+ */
87
+ private createNewProductBuilder;
88
+ /**
89
+ * Get or create a ProductBuilder instance for the given product tag
90
+ */
91
+ private getProductBuilder;
92
+ /**
93
+ * Initialize logging service
94
+ */
95
+ private initializeLogService;
96
+ /**
97
+ * Create a new ProcessorService instance for job scheduling
98
+ */
99
+ private createNewProcessor;
100
+ /**
101
+ * Register a new database configuration for a product
102
+ * @param productTag - The product tag
103
+ * @param data - The database configuration data
104
+ */
105
+ registerDatabase(productTag: string, data: IProductDatabase): Promise<void>;
106
+ /**
107
+ * Fetch all databases for a product
108
+ * @param productTag - The product tag
109
+ * @returns Array of database configurations
110
+ */
111
+ fetchAllDatabases(productTag: string): Promise<IProductDatabase[]>;
112
+ /**
113
+ * Fetch a specific database by tag
114
+ * @param productTag - The product tag
115
+ * @param databaseTag - The database tag
116
+ * @returns The database configuration or null if not found
117
+ */
118
+ fetchDatabase(productTag: string, databaseTag: string): Promise<IProductDatabase | null>;
119
+ /**
120
+ * Update a database configuration
121
+ * @param productTag - The product tag
122
+ * @param databaseTag - The database tag
123
+ * @param data - The data to update
124
+ */
125
+ updateDatabase(productTag: string, databaseTag: string, data: Partial<IProductDatabase>): Promise<void>;
126
+ /**
127
+ * Create a database trigger
128
+ * @param productTag - The product tag
129
+ * @param data - The trigger configuration
130
+ */
131
+ createTrigger(productTag: string, data: Partial<IProductDatabaseTrigger>): Promise<void>;
132
+ /**
133
+ * Update a database trigger
134
+ * @param productTag - The product tag
135
+ * @param data - The trigger configuration
136
+ */
137
+ updateTrigger(productTag: string, data: Partial<IProductDatabaseTrigger>): Promise<void>;
138
+ /**
139
+ * Fetch a database trigger
140
+ * @param productTag - The product tag
141
+ * @param tag - The trigger tag (format: database_tag:trigger_tag)
142
+ */
143
+ fetchTrigger(productTag: string, tag: string): Promise<IProductDatabaseTrigger | null>;
144
+ /**
145
+ * Fetch all triggers for a database
146
+ * @param productTag - The product tag
147
+ * @param databaseTag - The database tag
148
+ */
149
+ fetchTriggers(productTag: string, databaseTag: string): Promise<IProductDatabaseTrigger[]>;
150
+ /**
151
+ * Delete a database trigger
152
+ * @param productTag - The product tag
153
+ * @param tag - The trigger tag (format: database_tag:trigger_tag)
154
+ */
155
+ deleteTrigger(productTag: string, tag: string): Promise<void>;
156
+ /**
157
+ * Get the current service configuration
158
+ */
159
+ getConfig(): IDatabaseServiceConfig | null;
160
+ /**
161
+ * Update the service configuration (used after auth is complete)
162
+ */
163
+ updateConfig(config: Partial<IDatabaseServiceConfig>): void;
164
+ /**
165
+ * Get workspace ID from config
166
+ */
167
+ getWorkspaceId(): string | null;
168
+ /**
169
+ * Get user ID from config
170
+ */
171
+ getUserId(): string | null;
172
+ /**
173
+ * Get authentication token from config
174
+ */
175
+ getToken(): string | null;
176
+ /**
177
+ * Get environment type from config
178
+ */
179
+ getEnvType(): string | null;
180
+ /**
181
+ * Create/register a new database configuration
182
+ *
183
+ * @example
184
+ * // Persist to product
185
+ * await ductape.database.create({
186
+ * product: 'my-product',
187
+ * name: 'User Database',
188
+ * tag: 'users-db',
189
+ * type: 'postgresql',
190
+ * description: 'Stores user accounts and profiles',
191
+ * envs: [
192
+ * { slug: 'dev', connection_url: 'postgresql://localhost:5432/myapp_dev' },
193
+ * { slug: 'prd', connection_url: 'postgresql://prod-host:5432/myapp_prod' },
194
+ * ],
195
+ * });
196
+ *
197
+ * // Local only (not persisted)
198
+ * await ductape.database.create({
199
+ * name: 'Temp Database',
200
+ * tag: 'temp-db',
201
+ * type: 'postgresql',
202
+ * envs: [{ slug: 'dev', connection_url: 'postgresql://localhost:5432/temp' }],
203
+ * });
204
+ */
205
+ create(config: IDatabaseConfig): Promise<void>;
206
+ /**
207
+ * Create local adapter and connection context for a database configuration.
208
+ * This is a lightweight operation that only sets up local state without API calls.
209
+ * Use this when the database config is already fetched/decrypted from the API.
210
+ *
211
+ * @param config - The database configuration (already decrypted if from API)
212
+ */
213
+ private createAdapter;
214
+ /**
215
+ * Generate a secret key for database connection URLs
216
+ * Format: DB_{PRODUCT}_{ASSET_TAG}_{ENV}_{KEY}
217
+ *
218
+ * Where:
219
+ * - PRODUCT = productTag.split('.')[1] (second part after workspace)
220
+ * - ASSET_TAG = if dbTag starts with same workspace prefix, use second part; otherwise sanitize full tag
221
+ * - All parts are automatically capitalized
222
+ */
223
+ private generateDbSecretKey;
224
+ /**
225
+ * Connect to a database
226
+ *
227
+ * @example
228
+ * const result = await ductape.database.connect({
229
+ * env: 'dev',
230
+ * product: 'my-app',
231
+ * database: 'users-db',
232
+ * });
233
+ * console.log('Connected:', result.connected);
234
+ * console.log('Database Version:', result.version);
235
+ * console.log('Latency:', result.latency, 'ms');
236
+ *
237
+ * // With the returned connection object, you can use scoped operations:
238
+ * const db = await ductape.databases.connect({ env: 'dev', product: 'my-app', database: 'users-db' });
239
+ * await db.triggers.create({ tag: 'my-trigger', ... });
240
+ */
241
+ connect(config: IConnectionConfig): Promise<DatabaseConnection>;
242
+ /**
243
+ * Test database connection without establishing persistent connection
244
+ *
245
+ * @example
246
+ * const result = await ductape.database.testConnection({
247
+ * env: 'dev',
248
+ * product: 'my-app',
249
+ * database: 'users-db',
250
+ * });
251
+ * if (result.connected) {
252
+ * console.log('Connection successful!');
253
+ * } else {
254
+ * console.error('Connection failed:', result.error);
255
+ * }
256
+ */
257
+ testConnection(config: IConnectionConfig): Promise<IConnectionResult>;
258
+ /**
259
+ * Disconnect from the current database
260
+ */
261
+ disconnect(): Promise<void>;
262
+ /**
263
+ * Close all database connections
264
+ *
265
+ * @example
266
+ * await ductape.database.closeAll();
267
+ */
268
+ closeAll(): Promise<void>;
269
+ /**
270
+ * Fetch all registered databases
271
+ *
272
+ * @example
273
+ * const databases = await ductape.database.fetchAll();
274
+ * databases.forEach((db) => {
275
+ * console.log(`${db.name} (${db.tag}): ${db.type}`);
276
+ * });
277
+ */
278
+ fetchAll(product: string): Promise<IDatabaseConfig[]>;
279
+ /**
280
+ * Fetch a specific database configuration
281
+ *
282
+ * @example
283
+ * const usersDb = await ductape.database.fetch('users-db');
284
+ * console.log('Database:', usersDb.name);
285
+ * console.log('Type:', usersDb.type);
286
+ * console.log('Environments:', usersDb.envs);
287
+ */
288
+ fetch(product: string, database: string): Promise<IDatabaseConfig | null>;
289
+ /**
290
+ * Update a local database configuration
291
+ *
292
+ * @example
293
+ * await ductape.database.updateLocalConfig('users-db', {
294
+ * name: 'User Database v2',
295
+ * description: 'Updated user storage',
296
+ * envs: [
297
+ * { slug: 'dev', connection_url: 'postgresql://new-dev-host:5432/myapp' },
298
+ * ],
299
+ * });
300
+ */
301
+ updateLocalConfig(tag: string, updates: Partial<IDatabaseConfig>): Promise<void>;
302
+ /**
303
+ * Query records from a table
304
+ *
305
+ * @example
306
+ * // With established connection
307
+ * const result = await ductape.database.query({
308
+ * table: 'users',
309
+ * where: { status: 'active' },
310
+ * orderBy: { column: 'created_at', order: 'DESC' },
311
+ * limit: 10,
312
+ * });
313
+ *
314
+ * // With explicit connection params
315
+ * const result = await ductape.database.query({
316
+ * env: 'prd',
317
+ * product: 'my-app',
318
+ * database: 'main-db',
319
+ * table: 'users',
320
+ * });
321
+ */
322
+ query<T = any>(options: IQueryOptions): Promise<IQueryResult<T>>;
323
+ /**
324
+ * Execute a raw query
325
+ *
326
+ * @example
327
+ * // PostgreSQL
328
+ * const result = await ductape.database.raw({
329
+ * query: 'SELECT * FROM users WHERE created_at > $1 AND status = $2',
330
+ * params: [new Date('2024-01-01'), 'active'],
331
+ * });
332
+ *
333
+ * // MySQL
334
+ * const result = await ductape.database.raw({
335
+ * query: 'SELECT * FROM users WHERE created_at > ? AND status = ?',
336
+ * params: [new Date('2024-01-01'), 'active'],
337
+ * });
338
+ *
339
+ * // MongoDB
340
+ * const result = await ductape.database.raw({
341
+ * query: { status: 'active', created_at: { $gte: new Date('2024-01-01') } },
342
+ * collection: 'users',
343
+ * });
344
+ */
345
+ raw<T = any>(options: IRawQueryOptions): Promise<IRawQueryResult<T>>;
346
+ /**
347
+ * Insert one or more records
348
+ *
349
+ * @example
350
+ * // Single record
351
+ * const result = await ductape.database.insert({
352
+ * table: 'users',
353
+ * data: {
354
+ * name: 'Jane Doe',
355
+ * email: 'jane@example.com',
356
+ * status: 'active',
357
+ * },
358
+ * returning: true,
359
+ * });
360
+ *
361
+ * // Multiple records
362
+ * const result = await ductape.database.insert({
363
+ * table: 'users',
364
+ * data: [
365
+ * { name: 'User 1', email: 'user1@example.com' },
366
+ * { name: 'User 2', email: 'user2@example.com' },
367
+ * ],
368
+ * });
369
+ *
370
+ * // With conflict handling (upsert)
371
+ * const result = await ductape.database.insert({
372
+ * table: 'users',
373
+ * data: { email: 'john@example.com', name: 'John' },
374
+ * onConflict: {
375
+ * columns: ['email'],
376
+ * action: 'update',
377
+ * update: ['name'],
378
+ * },
379
+ * });
380
+ */
381
+ insert<T = any>(options: IInsertOptions): Promise<IInsertResult<T>>;
382
+ /**
383
+ * Update records matching conditions
384
+ *
385
+ * @example
386
+ * // Simple update
387
+ * const result = await ductape.database.update({
388
+ * table: 'users',
389
+ * data: { status: 'inactive' },
390
+ * where: { last_login: { $LT: new Date('2023-01-01') } },
391
+ * });
392
+ *
393
+ * // With increment/decrement
394
+ * await ductape.database.update({
395
+ * table: 'products',
396
+ * data: { stock: { $inc: 10 } },
397
+ * where: { id: productId },
398
+ * });
399
+ */
400
+ update<T = any>(options: IUpdateOptions): Promise<IUpdateResult<T>>;
401
+ /**
402
+ * Delete records matching conditions
403
+ *
404
+ * @example
405
+ * const result = await ductape.database.delete({
406
+ * table: 'users',
407
+ * where: { status: 'deleted' },
408
+ * });
409
+ * console.log('Deleted count:', result.count);
410
+ */
411
+ delete(options: IDeleteOptions): Promise<IDeleteResult>;
412
+ /**
413
+ * Insert or update a record based on conflict keys
414
+ *
415
+ * @example
416
+ * const result = await ductape.database.upsert({
417
+ * table: 'user_preferences',
418
+ * data: {
419
+ * user_id: 123,
420
+ * theme: 'dark',
421
+ * language: 'en',
422
+ * },
423
+ * conflictKeys: ['user_id'],
424
+ * });
425
+ * console.log('Operation:', result.operation); // 'inserted' or 'updated'
426
+ */
427
+ upsert<T = any>(options: IUpsertOptions): Promise<IUpsertResult<T>>;
428
+ /**
429
+ * Count records
430
+ *
431
+ * @example
432
+ * const count = await ductape.database.count({
433
+ * table: 'users',
434
+ * where: { status: 'active' },
435
+ * });
436
+ */
437
+ count(options: ICountOptions): Promise<number>;
438
+ /**
439
+ * Sum values of a column
440
+ *
441
+ * @example
442
+ * const totalRevenue = await ductape.database.sum({
443
+ * table: 'orders',
444
+ * column: 'total',
445
+ * where: { status: 'completed' },
446
+ * });
447
+ */
448
+ sum(options: ISumOptions): Promise<number>;
449
+ /**
450
+ * Calculate average of a column
451
+ *
452
+ * @example
453
+ * const avgOrderValue = await ductape.database.avg({
454
+ * table: 'orders',
455
+ * column: 'total',
456
+ * });
457
+ */
458
+ avg(options: IAvgOptions): Promise<number>;
459
+ /**
460
+ * Get minimum value of a column
461
+ *
462
+ * @example
463
+ * const minPrice = await ductape.database.min({
464
+ * table: 'products',
465
+ * column: 'price',
466
+ * });
467
+ */
468
+ min(options: IMinMaxOptions): Promise<any>;
469
+ /**
470
+ * Get maximum value of a column
471
+ *
472
+ * @example
473
+ * const maxPrice = await ductape.database.max({
474
+ * table: 'products',
475
+ * column: 'price',
476
+ * });
477
+ */
478
+ max(options: IMinMaxOptions): Promise<any>;
479
+ /**
480
+ * Perform multiple aggregations in one query
481
+ *
482
+ * @example
483
+ * const stats = await ductape.database.aggregate({
484
+ * table: 'orders',
485
+ * operations: {
486
+ * total_revenue: { $SUM: 'total' },
487
+ * order_count: { $COUNT: '*' },
488
+ * avg_order_value: { $AVG: 'total' },
489
+ * },
490
+ * where: { status: 'completed' },
491
+ * });
492
+ */
493
+ aggregate(options: IAggregateOptions): Promise<IAggregateResult>;
494
+ /**
495
+ * Group records and perform aggregations
496
+ *
497
+ * @example
498
+ * const salesByCategory = await ductape.database.groupBy({
499
+ * table: 'products',
500
+ * groupBy: ['category'],
501
+ * operations: {
502
+ * total_sales: { $SUM: 'sales_count' },
503
+ * avg_price: { $AVG: 'price' },
504
+ * },
505
+ * having: {
506
+ * total_sales: { $GT: 100 },
507
+ * },
508
+ * });
509
+ */
510
+ groupBy<T = any>(options: IGroupByOptions): Promise<IGroupByResult<T>[]>;
511
+ /**
512
+ * Execute operations within a transaction (callback API - recommended)
513
+ *
514
+ * @example
515
+ * const order = await ductape.database.transaction({
516
+ * env: 'prd',
517
+ * product: 'my-app',
518
+ * database: 'main-db',
519
+ * }, async (transaction) => {
520
+ * const order = await ductape.database.insert({
521
+ * table: 'orders',
522
+ * data: { customer_id: 123, total: 99.99 },
523
+ * transaction,
524
+ * });
525
+ *
526
+ * await ductape.database.insert({
527
+ * table: 'order_items',
528
+ * data: items.map(item => ({ order_id: order.insertedIds[0], ...item })),
529
+ * transaction,
530
+ * });
531
+ *
532
+ * return order;
533
+ * });
534
+ */
535
+ transaction<T>(options: ITransactionOptions, callback: ITransactionCallback<T>): Promise<T>;
536
+ /**
537
+ * Begin a transaction manually
538
+ *
539
+ * @example
540
+ * const transaction = await ductape.database.beginTransaction({
541
+ * env: 'prd',
542
+ * product: 'my-app',
543
+ * database: 'main-db',
544
+ * isolationLevel: 'REPEATABLE_READ',
545
+ * });
546
+ *
547
+ * try {
548
+ * await ductape.database.insert({ table: 'accounts', data: {...}, transaction });
549
+ * await transaction.commit();
550
+ * } catch (error) {
551
+ * await transaction.rollback();
552
+ * throw error;
553
+ * }
554
+ */
555
+ beginTransaction(options: ITransactionOptions): Promise<ITransaction>;
556
+ /**
557
+ * Create a new table
558
+ *
559
+ * @example
560
+ * import { SchemaHelpers } from '@ductape/sdk';
561
+ *
562
+ * await ductape.database.createTable(
563
+ * { env: 'dev', product: 'my-app', database: 'main-db' },
564
+ * {
565
+ * name: 'products',
566
+ * columns: [
567
+ * SchemaHelpers.id(),
568
+ * SchemaHelpers.string('name', 255, false),
569
+ * SchemaHelpers.decimal('price', 10, 2),
570
+ * ...SchemaHelpers.timestamps(),
571
+ * ],
572
+ * },
573
+ * { ifNotExists: true }
574
+ * );
575
+ */
576
+ createTable(connectionConfigOrDefinition: IConnectionConfig | ITableDefinition, tableDefinitionOrOptions?: ITableDefinition | ICreateTableOptions, options?: ICreateTableOptions): Promise<void>;
577
+ /**
578
+ * Alter an existing table
579
+ *
580
+ * @example
581
+ * import { ColumnAlterationType, ColumnType } from '@ductape/sdk';
582
+ *
583
+ * // Add column
584
+ * await ductape.database.alterTable(
585
+ * { env: 'dev', product: 'my-app', database: 'main-db' },
586
+ * 'products',
587
+ * [{ type: ColumnAlterationType.ADD, column: { name: 'sku', type: ColumnType.STRING, length: 50 } }]
588
+ * );
589
+ *
590
+ * // Drop column
591
+ * await ductape.database.alterTable(
592
+ * { env: 'dev', product: 'my-app', database: 'main-db' },
593
+ * 'products',
594
+ * [{ type: ColumnAlterationType.DROP, columnName: 'old_field' }]
595
+ * );
596
+ *
597
+ * // Rename column
598
+ * await ductape.database.alterTable(
599
+ * { env: 'dev', product: 'my-app', database: 'main-db' },
600
+ * 'products',
601
+ * [{ type: ColumnAlterationType.RENAME, oldName: 'old_name', newName: 'new_name' }]
602
+ * );
603
+ */
604
+ alterTable(connectionConfigOrTableName: IConnectionConfig | string, tableNameOrAlterations: string | IAlterTableOperation[], alterations?: IAlterTableOperation[]): Promise<void>;
605
+ /**
606
+ * Drop a table
607
+ *
608
+ * @example
609
+ * await ductape.database.dropTable(
610
+ * { env: 'dev', product: 'my-app', database: 'main-db' },
611
+ * 'old_table'
612
+ * );
613
+ */
614
+ dropTable(connectionConfigOrTableName: IConnectionConfig | string, tableName?: string): Promise<void>;
615
+ /**
616
+ * List all tables in the database
617
+ *
618
+ * @example
619
+ * const tables = await ductape.database.listTables({
620
+ * env: 'dev',
621
+ * product: 'my-app',
622
+ * database: 'main-db',
623
+ * });
624
+ */
625
+ listTables(connectionConfig?: IConnectionConfig): Promise<string[]>;
626
+ /**
627
+ * List all tables with basic information including estimated row counts
628
+ *
629
+ * @example
630
+ * const tables = await ductape.database.listTablesWithInfo({
631
+ * env: 'dev',
632
+ * product: 'my-app',
633
+ * database: 'main-db',
634
+ * });
635
+ * // Returns: [{ name: 'users', estimatedRowCount: 1247, schema: 'public' }, ...]
636
+ */
637
+ listTablesWithInfo(connectionConfig?: IConnectionConfig): Promise<ITableInfo[]>;
638
+ /**
639
+ * Check if a table exists
640
+ *
641
+ * @example
642
+ * const exists = await ductape.database.tableExists(
643
+ * { env: 'dev', product: 'my-app', database: 'main-db' },
644
+ * 'users'
645
+ * );
646
+ */
647
+ tableExists(connectionConfigOrTableName: IConnectionConfig | string, tableName?: string): Promise<boolean>;
648
+ /**
649
+ * Get the schema of a table
650
+ *
651
+ * @example
652
+ * const schema = await ductape.database.getTableSchema(
653
+ * { env: 'dev', product: 'my-app', database: 'main-db' },
654
+ * 'users'
655
+ * );
656
+ * console.log('Table:', schema.name);
657
+ * console.log('Columns:', schema.columns);
658
+ * console.log('Indexes:', schema.indexes);
659
+ */
660
+ getTableSchema(connectionConfigOrTableName: IConnectionConfig | string, tableName?: string): Promise<ITableSchema>;
661
+ /**
662
+ * Create an index
663
+ *
664
+ * @example
665
+ * await ductape.database.createIndex({
666
+ * env: 'dev',
667
+ * product: 'my-app',
668
+ * database: 'main-db',
669
+ * table: 'users',
670
+ * index: {
671
+ * name: 'idx_users_email',
672
+ * table: 'users',
673
+ * columns: [{ name: 'email' }],
674
+ * unique: true,
675
+ * },
676
+ * ifNotExists: true,
677
+ * concurrent: true, // PostgreSQL: create without locking
678
+ * });
679
+ */
680
+ createIndex(options: ICreateIndexOptions): Promise<void>;
681
+ /**
682
+ * Drop an index
683
+ *
684
+ * @example
685
+ * await ductape.database.dropIndex({
686
+ * env: 'dev',
687
+ * product: 'my-app',
688
+ * database: 'main-db',
689
+ * table: 'users',
690
+ * indexName: 'idx_users_old',
691
+ * ifExists: true,
692
+ * concurrent: true,
693
+ * });
694
+ */
695
+ dropIndex(options: IDropIndexOptions): Promise<void>;
696
+ /**
697
+ * List all indexes on a table
698
+ *
699
+ * @example
700
+ * const indexes = await ductape.database.listIndexes({
701
+ * env: 'dev',
702
+ * product: 'my-app',
703
+ * database: 'main-db',
704
+ * table: 'users',
705
+ * includeSystem: false,
706
+ * });
707
+ */
708
+ listIndexes(options: IListIndexesOptions): Promise<IIndexInfo[]>;
709
+ /**
710
+ * Get index statistics
711
+ *
712
+ * @example
713
+ * // All indexes on a table
714
+ * const stats = await ductape.database.getIndexStatistics(
715
+ * { env: 'prd', product: 'my-app', database: 'main-db' },
716
+ * 'users'
717
+ * );
718
+ *
719
+ * // Specific index
720
+ * const emailStats = await ductape.database.getIndexStatistics(
721
+ * { env: 'prd', product: 'my-app', database: 'main-db' },
722
+ * 'users',
723
+ * 'idx_users_email'
724
+ * );
725
+ */
726
+ getIndexStatistics(connectionConfig: IConnectionConfig, tableName: string, indexName?: string): Promise<IIndexStatistics[]>;
727
+ /**
728
+ * Run a migration
729
+ *
730
+ * @example
731
+ * const result = await ductape.database.runMigration([migration]);
732
+ * console.log('Migrated:', result.size);
733
+ */
734
+ runMigration(migrations: IMigration[], options?: {
735
+ dryRun?: boolean;
736
+ appliedBy?: string;
737
+ }): Promise<Map<string, IMigrationResult>>;
738
+ /**
739
+ * Rollback migrations
740
+ *
741
+ * @example
742
+ * const result = await ductape.database.rollbackMigration([migration], 1);
743
+ * console.log('Rolled back:', result.size);
744
+ */
745
+ rollbackMigration(migrations: IMigration[], count?: number): Promise<Map<string, IMigrationResult>>;
746
+ /**
747
+ * Get migration history (applied migrations)
748
+ *
749
+ * @example
750
+ * const history = await ductape.database.getMigrationHistory();
751
+ * history.forEach((entry) => {
752
+ * console.log('Tag:', entry.tag);
753
+ * console.log('Applied at:', entry.appliedAt);
754
+ * });
755
+ */
756
+ getMigrationHistory(): Promise<IMigrationHistory[]>;
757
+ /**
758
+ * Get status of all migrations
759
+ *
760
+ * @example
761
+ * const status = await ductape.database.getMigrationStatus(allMigrations);
762
+ * console.log('Pending:', status.pending);
763
+ */
764
+ getMigrationStatus(migrations: IMigration[]): Promise<IMigrationStatusResult>;
765
+ /**
766
+ * Migration management sub-object
767
+ * Provides CRUD operations for database migrations via ProductBuilder
768
+ */
769
+ get migration(): {
770
+ /**
771
+ * Create a new database migration
772
+ *
773
+ * @example
774
+ * await ductape.database.migration.create({
775
+ * product: 'my-product',
776
+ * database: 'main-db',
777
+ * data: {
778
+ * name: 'Add users table',
779
+ * tag: 'main-db:add-users-table',
780
+ * value: {
781
+ * up: ['CREATE TABLE users (id SERIAL PRIMARY KEY, email VARCHAR(255))'],
782
+ * down: ['DROP TABLE users'],
783
+ * },
784
+ * },
785
+ * });
786
+ */
787
+ create: (options: {
788
+ product: string;
789
+ database: string;
790
+ data: {
791
+ name: string;
792
+ tag: string;
793
+ description?: string;
794
+ value: {
795
+ up: string[];
796
+ down: string[];
797
+ };
798
+ };
799
+ }) => Promise<void>;
800
+ /**
801
+ * Update an existing database migration
802
+ *
803
+ * @example
804
+ * await ductape.database.migration.update({
805
+ * product: 'my-product',
806
+ * tag: 'main-db:add-users-table',
807
+ * data: {
808
+ * description: 'Updated description',
809
+ * },
810
+ * });
811
+ */
812
+ update: (options: {
813
+ product: string;
814
+ tag: string;
815
+ data: {
816
+ name?: string;
817
+ description?: string;
818
+ value?: {
819
+ up: string[];
820
+ down: string[];
821
+ };
822
+ };
823
+ }) => Promise<void>;
824
+ /**
825
+ * Fetch a specific database migration
826
+ *
827
+ * @example
828
+ * const migration = await ductape.database.migration.fetch({
829
+ * product: 'my-product',
830
+ * tag: 'main-db:add-users-table',
831
+ * });
832
+ */
833
+ fetch: (options: {
834
+ product: string;
835
+ tag: string;
836
+ }) => Promise<any>;
837
+ /**
838
+ * Fetch all database migrations for a database
839
+ *
840
+ * @example
841
+ * const migrations = await ductape.database.migration.fetchAll({
842
+ * product: 'my-product',
843
+ * database: 'main-db',
844
+ * });
845
+ */
846
+ fetchAll: (options: {
847
+ product: string;
848
+ database: string;
849
+ }) => Promise<any[]>;
850
+ /**
851
+ * Delete a database migration
852
+ *
853
+ * @example
854
+ * await ductape.database.migration.delete({
855
+ * product: 'my-product',
856
+ * tag: 'main-db:add-users-table',
857
+ * });
858
+ */
859
+ delete: (options: {
860
+ product: string;
861
+ tag: string;
862
+ }) => Promise<void>;
863
+ /**
864
+ * Run a database migration (up)
865
+ * @deprecated Migration execution has been deprecated
866
+ */
867
+ run: (_options: {
868
+ product: string;
869
+ migration: string;
870
+ env: string;
871
+ }) => Promise<any>;
872
+ /**
873
+ * Rollback a database migration (down)
874
+ * @deprecated Migration execution has been deprecated
875
+ */
876
+ rollback: (_options: {
877
+ product: string;
878
+ migration: string;
879
+ env: string;
880
+ }) => Promise<any>;
881
+ };
882
+ /**
883
+ * Action management sub-object
884
+ */
885
+ get action(): {
886
+ /**
887
+ * Create a new database action
888
+ *
889
+ * @example
890
+ * await ductape.database.action.create({
891
+ * name: 'Get Users Paginated',
892
+ * tag: 'postgresdb:get-users-paginated',
893
+ * tableName: 'users',
894
+ * operation: DatabaseActionTypes.QUERY,
895
+ * template: {
896
+ * where: { is_active: true },
897
+ * limit: '{{limit}}',
898
+ * offset: '{{offset}}',
899
+ * },
900
+ * });
901
+ */
902
+ create: (options: IActionCreateOptions) => Promise<void>;
903
+ /**
904
+ * Update an existing action
905
+ *
906
+ * @example
907
+ * await ductape.database.action.update({
908
+ * tag: 'postgresdb:get-users',
909
+ * template: { where: { status: '{{status}}' } },
910
+ * });
911
+ */
912
+ update: (options: IActionUpdateOptions) => Promise<void>;
913
+ /**
914
+ * Fetch a specific action
915
+ *
916
+ * @example
917
+ * const action = await ductape.database.action.fetch('postgresdb:get-users');
918
+ */
919
+ fetch: (tag: string) => Promise<IActionDefinition | null>;
920
+ /**
921
+ * Fetch all actions for a database
922
+ *
923
+ * @example
924
+ * const actions = await ductape.database.action.fetchAll('postgresdb');
925
+ */
926
+ fetchAll: (databaseTag: string) => Promise<IActionDefinition[]>;
927
+ /**
928
+ * Delete a database action
929
+ *
930
+ * @example
931
+ * await ductape.database.action.delete('postgresdb:get-users');
932
+ */
933
+ delete: (tag: string) => Promise<void>;
934
+ /**
935
+ * Dispatches a database action to run as a scheduled job.
936
+ * @param {IDBActionDispatchInput} data - The database action dispatch input.
937
+ * @returns {Promise<IDispatchResult>} The dispatch result with job ID and status.
938
+ * @example
939
+ * // Schedule a database action to run in 1 hour
940
+ * await ductape.databases.action.dispatch({
941
+ * product: 'my-product',
942
+ * env: 'production',
943
+ * database: 'users-db',
944
+ * event: 'cleanup-inactive',
945
+ * input: { query: { inactive: true } },
946
+ * schedule: { start_at: Date.now() + 3600000 }
947
+ * });
948
+ *
949
+ * // Run on a cron schedule
950
+ * await ductape.databases.action.dispatch({
951
+ * product: 'my-product',
952
+ * env: 'production',
953
+ * database: 'analytics-db',
954
+ * event: 'aggregate-daily',
955
+ * input: { query: {} },
956
+ * schedule: { cron: '0 0 * * *' } // Daily at midnight
957
+ * });
958
+ */
959
+ dispatch: (data: IDBActionDispatchInput) => Promise<IDispatchResult>;
960
+ };
961
+ /**
962
+ * Execute a database action
963
+ *
964
+ * @example
965
+ * const users = await ductape.database.execute({
966
+ * product: 'my-product',
967
+ * env: 'prd',
968
+ * database: 'postgresdb',
969
+ * action: 'get-users-paginated',
970
+ * input: {
971
+ * limit: 25,
972
+ * offset: 0,
973
+ * },
974
+ * });
975
+ */
976
+ execute<T = any>(options: IActionExecuteOptions): Promise<T>;
977
+ /**
978
+ * Dispatches a database operation to run as a scheduled job.
979
+ * Use this for direct database operations (query, insert, update, delete, etc.).
980
+ * @param {IDBOperationDispatchInput} data - The database operation dispatch input.
981
+ * @returns {Promise<IDispatchResult>} The dispatch result with job ID and status.
982
+ * @example
983
+ * // Schedule a database operation to run in 1 hour
984
+ * await ductape.databases.dispatch({
985
+ * product: 'my-product',
986
+ * env: 'production',
987
+ * database: 'users-db',
988
+ * operation: 'deleteMany',
989
+ * input: { filter: { inactive: true, lastLogin: { $lt: '2024-01-01' } } },
990
+ * schedule: { start_at: Date.now() + 3600000 }
991
+ * });
992
+ *
993
+ * // Run daily database cleanup
994
+ * await ductape.databases.dispatch({
995
+ * product: 'my-product',
996
+ * env: 'production',
997
+ * database: 'logs-db',
998
+ * operation: 'deleteMany',
999
+ * input: { filter: { createdAt: { $lt: '$DateAdd($Now(), -30, "days")' } } },
1000
+ * schedule: { cron: '0 3 * * *' } // Daily at 3 AM
1001
+ * });
1002
+ */
1003
+ dispatch(data: IDBOperationDispatchInput): Promise<IDispatchResult>;
1004
+ /**
1005
+ * Get the appropriate adapter for the operation
1006
+ */
1007
+ getAdapter(options?: {
1008
+ env?: string;
1009
+ database?: string;
1010
+ }): BaseAdapter;
1011
+ /**
1012
+ * Get the current connection context
1013
+ */
1014
+ getCurrentContext(): IConnectionContext | null;
1015
+ /**
1016
+ * Get a connection-scoped interface for a specific database/environment.
1017
+ * This ensures schema operations are isolated to a specific connection.
1018
+ *
1019
+ * @example
1020
+ * const usersDb = db.connection('users-db', 'dev');
1021
+ * await usersDb.schema.create('users', { ... });
1022
+ *
1023
+ * const ordersDb = db.connection('orders-db', 'dev');
1024
+ * await ordersDb.schema.create('orders', { ... }); // Different connection
1025
+ */
1026
+ connection(database: string, env: string, product?: string): DatabaseConnection;
1027
+ /**
1028
+ * Build a context key from database and environment
1029
+ */
1030
+ private buildContextKey;
1031
+ /**
1032
+ * Convert DatabaseTypes (from product API) to DatabaseType (ORM internal)
1033
+ */
1034
+ private convertDatabaseType;
1035
+ /**
1036
+ * Simplified schema operations API (Mongoose-style)
1037
+ *
1038
+ * @example
1039
+ * await db.connect({ env: 'dev', product: 'my-app', database: 'users-db' });
1040
+ *
1041
+ * // Create a table with Mongoose-style schema
1042
+ * await db.schema.create('users', {
1043
+ * id: { type: 'uuid', primaryKey: true },
1044
+ * email: { type: 'string', length: 255, required: true, unique: true },
1045
+ * name: { type: 'string', length: 100 },
1046
+ * age: 'integer', // Shorthand
1047
+ * status: { type: 'enum', enum: ['active', 'inactive'], default: 'active' },
1048
+ * }, { timestamps: true });
1049
+ */
1050
+ get schema(): {
1051
+ /**
1052
+ * Create a collection/table with Mongoose-style schema definition
1053
+ */
1054
+ create: (name: string, definition: ISimpleSchemaDefinition, options?: ISimpleCreateOptions) => Promise<ISchemaOperationResult>;
1055
+ /**
1056
+ * Drop a collection/table
1057
+ */
1058
+ drop: (name: string, options?: ISimpleDropOptions) => Promise<ISchemaOperationResult>;
1059
+ /**
1060
+ * Add a field to a collection
1061
+ */
1062
+ addField: (collection: string, fieldName: string, definition: SimpleFieldType | ISimpleFieldDefinition) => Promise<ISchemaOperationResult>;
1063
+ /**
1064
+ * Drop a field from a collection
1065
+ */
1066
+ dropField: (collection: string, fieldName: string) => Promise<ISchemaOperationResult>;
1067
+ /**
1068
+ * Rename a field in a collection
1069
+ */
1070
+ renameField: (collection: string, oldName: string, newName: string) => Promise<ISchemaOperationResult>;
1071
+ /**
1072
+ * Modify a field's definition
1073
+ */
1074
+ modifyField: (collection: string, fieldName: string, changes: Partial<ISimpleFieldDefinition>) => Promise<ISchemaOperationResult>;
1075
+ /**
1076
+ * Create an index on a collection
1077
+ */
1078
+ createIndex: (collection: string, fields: string[] | IIndexFieldDefinition[], options?: ISimpleIndexOptions) => Promise<ISchemaOperationResult>;
1079
+ /**
1080
+ * Drop an index from a collection
1081
+ */
1082
+ dropIndex: (collection: string, indexName: string) => Promise<ISchemaOperationResult>;
1083
+ /**
1084
+ * Add a constraint (SQL databases only)
1085
+ */
1086
+ addConstraint: (collection: string, constraint: IMigrationConstraintDefinition) => Promise<ISchemaOperationResult>;
1087
+ /**
1088
+ * Drop a constraint (SQL databases only)
1089
+ */
1090
+ dropConstraint: (collection: string, constraintName: string) => Promise<ISchemaOperationResult>;
1091
+ /**
1092
+ * Rename a collection/table
1093
+ */
1094
+ rename: (oldName: string, newName: string) => Promise<ISchemaOperationResult>;
1095
+ /**
1096
+ * Check if a collection/table exists
1097
+ */
1098
+ exists: (name: string) => Promise<boolean>;
1099
+ /**
1100
+ * List all collections/tables
1101
+ */
1102
+ list: (schemaName?: string) => Promise<string[]>;
1103
+ /**
1104
+ * Get detailed schema information for a collection
1105
+ */
1106
+ describe: (name: string) => Promise<ITableSchema>;
1107
+ /**
1108
+ * List indexes on a collection
1109
+ */
1110
+ indexes: (collection: string) => Promise<IIndexInfo[]>;
1111
+ };
1112
+ /**
1113
+ * Create a collection with Mongoose-style definition
1114
+ */
1115
+ private schemaCreate;
1116
+ /**
1117
+ * Drop a collection
1118
+ */
1119
+ private schemaDrop;
1120
+ /**
1121
+ * Add a field to a collection
1122
+ */
1123
+ private schemaAddField;
1124
+ /**
1125
+ * Drop a field from a collection
1126
+ */
1127
+ private schemaDropField;
1128
+ /**
1129
+ * Rename a field
1130
+ */
1131
+ private schemaRenameField;
1132
+ /**
1133
+ * Modify a field's definition
1134
+ */
1135
+ private schemaModifyField;
1136
+ /**
1137
+ * Create an index
1138
+ */
1139
+ private schemaCreateIndex;
1140
+ /**
1141
+ * Drop an index
1142
+ */
1143
+ private schemaDropIndex;
1144
+ /**
1145
+ * Add a constraint (SQL only)
1146
+ */
1147
+ private schemaAddConstraint;
1148
+ /**
1149
+ * Drop a constraint (SQL only)
1150
+ */
1151
+ private schemaDropConstraint;
1152
+ /**
1153
+ * Rename a collection
1154
+ */
1155
+ private schemaRename;
1156
+ /**
1157
+ * Check if collection exists
1158
+ */
1159
+ private schemaExists;
1160
+ /**
1161
+ * List all collections
1162
+ */
1163
+ private schemaList;
1164
+ /**
1165
+ * Describe a collection's schema
1166
+ */
1167
+ private schemaDescribe;
1168
+ /**
1169
+ * List indexes on a collection
1170
+ */
1171
+ private schemaListIndexes;
1172
+ /**
1173
+ * Convert Mongoose-style schema definition to IFieldDefinition array
1174
+ */
1175
+ private convertToFieldDefinitions;
1176
+ /**
1177
+ * Convert a single field definition
1178
+ */
1179
+ private convertFieldDefinition;
1180
+ /**
1181
+ * Normalize Mongoose-style type names to FieldType
1182
+ */
1183
+ private normalizeFieldType;
1184
+ /**
1185
+ * Normalize index fields to IIndexFieldDefinition array
1186
+ */
1187
+ private normalizeIndexFields;
1188
+ /**
1189
+ * Get adapter by context key (used by DatabaseConnection)
1190
+ * @internal
1191
+ */
1192
+ getAdapterByContextKey(contextKey: string): BaseAdapter;
1193
+ }
1194
+ /**
1195
+ * Connection-scoped database interface.
1196
+ * Provides isolated schema, query, and aggregation operations for a specific database/environment.
1197
+ */
1198
+ export declare class DatabaseConnection {
1199
+ private service;
1200
+ private _database;
1201
+ private _env;
1202
+ private _product;
1203
+ private contextKey;
1204
+ private triggerProcessor;
1205
+ constructor(service: DatabaseService, database: string, env: string, product: string);
1206
+ /** Database tag */
1207
+ get database(): string;
1208
+ /** Environment slug */
1209
+ get env(): string;
1210
+ /** Product tag */
1211
+ get product(): string;
1212
+ /** Get the adapter for this connection */
1213
+ getAdapter(): BaseAdapter;
1214
+ /**
1215
+ * Schema operations scoped to this connection
1216
+ */
1217
+ get schema(): {
1218
+ create: (name: string, definition: ISimpleSchemaDefinition, options?: ISimpleCreateOptions) => Promise<ISchemaOperationResult>;
1219
+ drop: (name: string, options?: ISimpleDropOptions) => Promise<ISchemaOperationResult>;
1220
+ addField: (collection: string, fieldName: string, definition: SimpleFieldType | ISimpleFieldDefinition) => Promise<ISchemaOperationResult>;
1221
+ dropField: (collection: string, fieldName: string) => Promise<ISchemaOperationResult>;
1222
+ renameField: (collection: string, oldName: string, newName: string) => Promise<ISchemaOperationResult>;
1223
+ modifyField: (collection: string, fieldName: string, changes: Partial<ISimpleFieldDefinition>) => Promise<ISchemaOperationResult>;
1224
+ createIndex: (collection: string, fields: string[] | IIndexFieldDefinition[], options?: ISimpleIndexOptions) => Promise<ISchemaOperationResult>;
1225
+ dropIndex: (collection: string, indexName: string) => Promise<ISchemaOperationResult>;
1226
+ addConstraint: (collection: string, constraint: IMigrationConstraintDefinition) => Promise<ISchemaOperationResult>;
1227
+ dropConstraint: (collection: string, constraintName: string) => Promise<ISchemaOperationResult>;
1228
+ rename: (oldName: string, newName: string) => Promise<ISchemaOperationResult>;
1229
+ exists: (name: string) => Promise<boolean>;
1230
+ list: (schemaName?: string) => Promise<string[]>;
1231
+ describe: (name: string) => Promise<ITableSchema>;
1232
+ indexes: (collection: string) => Promise<IIndexInfo[]>;
1233
+ };
1234
+ query<T = any>(options: Omit<IQueryOptions, 'database' | 'env'>): Promise<IQueryResult<T>>;
1235
+ insert<T = any>(options: Omit<IInsertOptions, 'database' | 'env'>): Promise<IInsertResult<T>>;
1236
+ update<T = any>(options: Omit<IUpdateOptions, 'database' | 'env'>): Promise<IUpdateResult<T>>;
1237
+ delete(options: Omit<IDeleteOptions, 'database' | 'env'>): Promise<IDeleteResult>;
1238
+ upsert<T = any>(options: Omit<IUpsertOptions, 'database' | 'env'>): Promise<IUpsertResult<T>>;
1239
+ raw<T = any>(options: Omit<IRawQueryOptions, 'database' | 'env'>): Promise<IRawQueryResult<T>>;
1240
+ count(options: Omit<ICountOptions, 'database' | 'env'>): Promise<number>;
1241
+ sum(options: Omit<ISumOptions, 'database' | 'env'>): Promise<number>;
1242
+ avg(options: Omit<IAvgOptions, 'database' | 'env'>): Promise<number>;
1243
+ min(options: Omit<IMinMaxOptions, 'database' | 'env'>): Promise<any>;
1244
+ max(options: Omit<IMinMaxOptions, 'database' | 'env'>): Promise<any>;
1245
+ aggregate(options: Omit<IAggregateOptions, 'database' | 'env'>): Promise<IAggregateResult>;
1246
+ groupBy<T = any>(options: Omit<IGroupByOptions, 'database' | 'env'>): Promise<IGroupByResult<T>[]>;
1247
+ /**
1248
+ * Trigger operations scoped to this connection
1249
+ */
1250
+ get triggers(): {
1251
+ /**
1252
+ * Create a trigger and store it on the backend
1253
+ * @param data - Trigger configuration (tag should be just the trigger name, database tag is added automatically)
1254
+ */
1255
+ create: (data: Partial<IProductDatabaseTrigger>) => Promise<void>;
1256
+ /**
1257
+ * Update an existing trigger on the backend
1258
+ * @param data - Trigger configuration
1259
+ */
1260
+ update: (data: Partial<IProductDatabaseTrigger>) => Promise<void>;
1261
+ /**
1262
+ * Fetch a specific trigger from the backend
1263
+ * @param triggerTag - The trigger tag (without database prefix)
1264
+ */
1265
+ fetch: (triggerTag: string) => Promise<IProductDatabaseTrigger | null>;
1266
+ /**
1267
+ * Fetch all triggers for this database from the backend
1268
+ * @deprecated Use list() instead
1269
+ */
1270
+ fetchAll: () => Promise<IProductDatabaseTrigger[]>;
1271
+ /**
1272
+ * List all triggers for this database from the backend
1273
+ * @param options - Optional filters (table, event, enabled)
1274
+ */
1275
+ list: (options?: {
1276
+ table?: string;
1277
+ event?: string;
1278
+ enabled?: boolean;
1279
+ }) => Promise<IProductDatabaseTrigger[]>;
1280
+ /**
1281
+ * Delete a trigger from the backend
1282
+ * @param triggerTag - The trigger tag (without database prefix)
1283
+ */
1284
+ delete: (triggerTag: string) => Promise<boolean>;
1285
+ /**
1286
+ * Register a trigger in memory for the current session (does not persist to backend)
1287
+ * @deprecated Use create() for persistent triggers
1288
+ */
1289
+ register: (table: string, trigger: ITriggerDefinition) => void;
1290
+ /**
1291
+ * Register multiple triggers in memory (does not persist to backend)
1292
+ * @deprecated Use create() for persistent triggers
1293
+ */
1294
+ registerAll: (triggers: Array<{
1295
+ table: string;
1296
+ trigger: ITriggerDefinition;
1297
+ }>) => void;
1298
+ /**
1299
+ * Unregister a trigger from memory
1300
+ */
1301
+ unregister: (table: string, triggerName: string) => boolean;
1302
+ /**
1303
+ * Get all triggers for a table and event
1304
+ */
1305
+ getTriggersForEvent: (table: string, event: TriggerEvent) => ITriggerDefinition[];
1306
+ /**
1307
+ * Execute all triggers for an event
1308
+ */
1309
+ execute: (event: TriggerEvent, context: Omit<ITriggerContext, "database" | "env">) => Promise<ITriggerResult[]>;
1310
+ /**
1311
+ * Load triggers from the backend and register them in memory
1312
+ */
1313
+ load: () => Promise<void>;
1314
+ /**
1315
+ * Set the Ductape instance for trigger actions
1316
+ */
1317
+ setDuctapeInstance: (instance: any) => void;
1318
+ /**
1319
+ * Get the trigger processor instance
1320
+ */
1321
+ getProcessor: () => TriggerProcessor;
1322
+ /**
1323
+ * Trigger action builders
1324
+ */
1325
+ Trigger: {
1326
+ database: {
1327
+ insert: (table: string, data: Record<string, any> | string) => import("./types/trigger.interface").ITriggerDatabaseAction;
1328
+ update: (table: string, data: Record<string, any> | string, where: Record<string, any> | string) => import("./types/trigger.interface").ITriggerDatabaseAction;
1329
+ delete: (table: string, where: Record<string, any> | string) => import("./types/trigger.interface").ITriggerDatabaseAction;
1330
+ query: (table: string, where: Record<string, any> | string) => import("./types/trigger.interface").ITriggerDatabaseAction;
1331
+ };
1332
+ storage: {
1333
+ upload: (storage: string, path: string, options?: Partial<import("./types/trigger.interface").ITriggerStorageAction>) => import("./types/trigger.interface").ITriggerStorageAction;
1334
+ delete: (storage: string, path: string) => import("./types/trigger.interface").ITriggerStorageAction;
1335
+ copy: (storage: string, sourcePath: string, destinationPath: string) => import("./types/trigger.interface").ITriggerStorageAction;
1336
+ };
1337
+ notification: {
1338
+ email: (notification: string, recipients: string | string[], options?: Partial<import("./types/trigger.interface").ITriggerNotificationAction>) => import("./types/trigger.interface").ITriggerNotificationAction;
1339
+ sms: (notification: string, recipients: string | string[], options?: Partial<import("./types/trigger.interface").ITriggerNotificationAction>) => import("./types/trigger.interface").ITriggerNotificationAction;
1340
+ push: (notification: string, recipients: string | string[], options?: Partial<import("./types/trigger.interface").ITriggerNotificationAction>) => import("./types/trigger.interface").ITriggerNotificationAction;
1341
+ callback: (notification: string, options?: Partial<import("./types/trigger.interface").ITriggerNotificationAction>) => import("./types/trigger.interface").ITriggerNotificationAction;
1342
+ };
1343
+ broker: {
1344
+ publish: (event: string, message: Record<string, any> | string, options?: Partial<import("./types/trigger.interface").ITriggerBrokerAction>) => import("./types/trigger.interface").ITriggerBrokerAction;
1345
+ };
1346
+ cache: {
1347
+ set: (cache: string, key: string, value: any, ttl?: number) => import("./types/trigger.interface").ITriggerCacheAction;
1348
+ invalidate: (cache: string, pattern: string) => import("./types/trigger.interface").ITriggerCacheAction;
1349
+ delete: (cache: string, key: string) => import("./types/trigger.interface").ITriggerCacheAction;
1350
+ };
1351
+ workflow: {
1352
+ execute: (workflow: string, input?: Record<string, any> | string) => import("./types/trigger.interface").ITriggerWorkflowAction;
1353
+ dispatch: (workflow: string, input?: Record<string, any> | string) => import("./types/trigger.interface").ITriggerWorkflowAction;
1354
+ };
1355
+ action: {
1356
+ execute: (app: string, action: string, input?: Record<string, any> | string) => import("./types/trigger.interface").ITriggerActionExecuteAction;
1357
+ };
1358
+ agent: {
1359
+ run: (agent: string, prompt?: string, input?: Record<string, any> | string) => import("./types/trigger.interface").ITriggerAgentAction;
1360
+ };
1361
+ log: {
1362
+ debug: (message: string, data?: Record<string, any> | string) => import("./types/trigger.interface").ITriggerLogAction;
1363
+ info: (message: string, data?: Record<string, any> | string) => import("./types/trigger.interface").ITriggerLogAction;
1364
+ warn: (message: string, data?: Record<string, any> | string) => import("./types/trigger.interface").ITriggerLogAction;
1365
+ error: (message: string, data?: Record<string, any> | string) => import("./types/trigger.interface").ITriggerLogAction;
1366
+ };
1367
+ http: {
1368
+ get: (url: string, options?: Partial<import("./types/trigger.interface").ITriggerHttpAction>) => import("./types/trigger.interface").ITriggerHttpAction;
1369
+ post: (url: string, body?: Record<string, any> | string, options?: Partial<import("./types/trigger.interface").ITriggerHttpAction>) => import("./types/trigger.interface").ITriggerHttpAction;
1370
+ put: (url: string, body?: Record<string, any> | string, options?: Partial<import("./types/trigger.interface").ITriggerHttpAction>) => import("./types/trigger.interface").ITriggerHttpAction;
1371
+ patch: (url: string, body?: Record<string, any> | string, options?: Partial<import("./types/trigger.interface").ITriggerHttpAction>) => import("./types/trigger.interface").ITriggerHttpAction;
1372
+ delete: (url: string, options?: Partial<import("./types/trigger.interface").ITriggerHttpAction>) => import("./types/trigger.interface").ITriggerHttpAction;
1373
+ };
1374
+ custom: (handler: (context: ITriggerContext) => Promise<any>) => import("./types/trigger.interface").ITriggerCustomAction;
1375
+ when: {
1376
+ field: (field: string) => {
1377
+ equals: (value: any) => import("./types/trigger.interface").IConditionClause;
1378
+ notEquals: (value: any) => import("./types/trigger.interface").IConditionClause;
1379
+ greaterThan: (value: any) => import("./types/trigger.interface").IConditionClause;
1380
+ lessThan: (value: any) => import("./types/trigger.interface").IConditionClause;
1381
+ in: (values: any[]) => import("./types/trigger.interface").IConditionClause;
1382
+ contains: (value: string) => import("./types/trigger.interface").IConditionClause;
1383
+ isNull: () => import("./types/trigger.interface").IConditionClause;
1384
+ isNotNull: () => import("./types/trigger.interface").IConditionClause;
1385
+ changed: () => import("./types/trigger.interface").IConditionClause;
1386
+ changedTo: (value: any) => import("./types/trigger.interface").IConditionClause;
1387
+ changedFrom: (value: any) => import("./types/trigger.interface").IConditionClause;
1388
+ };
1389
+ and: (...conditions: (import("./types/trigger.interface").IConditionClause | import("./types/trigger.interface").ITriggerCondition)[]) => import("./types/trigger.interface").ITriggerCondition;
1390
+ or: (...conditions: (import("./types/trigger.interface").IConditionClause | import("./types/trigger.interface").ITriggerCondition)[]) => import("./types/trigger.interface").ITriggerCondition;
1391
+ not: (condition: import("./types/trigger.interface").IConditionClause | import("./types/trigger.interface").ITriggerCondition) => import("./types/trigger.interface").ITriggerCondition;
1392
+ };
1393
+ };
1394
+ /**
1395
+ * Trigger events enum
1396
+ */
1397
+ TriggerEvent: typeof TriggerEvent;
1398
+ /**
1399
+ * Trigger timing enum
1400
+ */
1401
+ TriggerTiming: typeof TriggerTiming;
1402
+ /**
1403
+ * Trigger action types enum
1404
+ */
1405
+ TriggerActionType: typeof TriggerActionType;
1406
+ };
1407
+ }
1408
+ export declare const databaseService: DatabaseService;