@ductape/sdk 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (973) hide show
  1. package/package.json +4 -2
  2. package/dist/agents/agent-context.d.ts +0 -100
  3. package/dist/agents/agent-context.js +0 -604
  4. package/dist/agents/agent-context.js.map +0 -1
  5. package/dist/agents/agent-executor.d.ts +0 -180
  6. package/dist/agents/agent-executor.js +0 -715
  7. package/dist/agents/agent-executor.js.map +0 -1
  8. package/dist/agents/agents.service.d.ts +0 -310
  9. package/dist/agents/agents.service.js +0 -1255
  10. package/dist/agents/agents.service.js.map +0 -1
  11. package/dist/agents/index.d.ts +0 -55
  12. package/dist/agents/index.js +0 -110
  13. package/dist/agents/index.js.map +0 -1
  14. package/dist/agents/memory-manager.d.ts +0 -182
  15. package/dist/agents/memory-manager.js +0 -383
  16. package/dist/agents/memory-manager.js.map +0 -1
  17. package/dist/agents/tool-registry.d.ts +0 -141
  18. package/dist/agents/tool-registry.js +0 -355
  19. package/dist/agents/tool-registry.js.map +0 -1
  20. package/dist/agents/types/agents.types.d.ts +0 -1240
  21. package/dist/agents/types/agents.types.js +0 -12
  22. package/dist/agents/types/agents.types.js.map +0 -1
  23. package/dist/agents/types/index.d.ts +0 -6
  24. package/dist/agents/types/index.js +0 -23
  25. package/dist/agents/types/index.js.map +0 -1
  26. package/dist/agents/vector-store-adapter.d.ts +0 -108
  27. package/dist/agents/vector-store-adapter.js +0 -213
  28. package/dist/agents/vector-store-adapter.js.map +0 -1
  29. package/dist/api/services/appApi.service.d.ts +0 -78
  30. package/dist/api/services/appApi.service.js +0 -303
  31. package/dist/api/services/appApi.service.js.map +0 -1
  32. package/dist/api/services/logsApi.service.d.ts +0 -62
  33. package/dist/api/services/logsApi.service.js +0 -67
  34. package/dist/api/services/logsApi.service.js.map +0 -1
  35. package/dist/api/services/pricingApi.service.d.ts +0 -10
  36. package/dist/api/services/pricingApi.service.js +0 -34
  37. package/dist/api/services/pricingApi.service.js.map +0 -1
  38. package/dist/api/services/processorApi.service.d.ts +0 -927
  39. package/dist/api/services/processorApi.service.js +0 -787
  40. package/dist/api/services/processorApi.service.js.map +0 -1
  41. package/dist/api/services/productsApi.service.d.ts +0 -150
  42. package/dist/api/services/productsApi.service.js +0 -279
  43. package/dist/api/services/productsApi.service.js.map +0 -1
  44. package/dist/api/services/resilienceApi.service.d.ts +0 -106
  45. package/dist/api/services/resilienceApi.service.js +0 -224
  46. package/dist/api/services/resilienceApi.service.js.map +0 -1
  47. package/dist/api/services/secretsApi.service.d.ts +0 -51
  48. package/dist/api/services/secretsApi.service.js +0 -126
  49. package/dist/api/services/secretsApi.service.js.map +0 -1
  50. package/dist/api/services/userApi.service.d.ts +0 -10
  51. package/dist/api/services/userApi.service.js +0 -20
  52. package/dist/api/services/userApi.service.js.map +0 -1
  53. package/dist/api/services/webhooksApi.service.d.ts +0 -14
  54. package/dist/api/services/webhooksApi.service.js +0 -65
  55. package/dist/api/services/webhooksApi.service.js.map +0 -1
  56. package/dist/api/services/workflowApi.service.d.ts +0 -199
  57. package/dist/api/services/workflowApi.service.js +0 -201
  58. package/dist/api/services/workflowApi.service.js.map +0 -1
  59. package/dist/api/services/workspaceApi.service.d.ts +0 -20
  60. package/dist/api/services/workspaceApi.service.js +0 -54
  61. package/dist/api/services/workspaceApi.service.js.map +0 -1
  62. package/dist/api/urls.d.ts +0 -136
  63. package/dist/api/urls.js +0 -185
  64. package/dist/api/urls.js.map +0 -1
  65. package/dist/api/utils/auth.utils.d.ts +0 -10
  66. package/dist/api/utils/auth.utils.js +0 -24
  67. package/dist/api/utils/auth.utils.js.map +0 -1
  68. package/dist/api/utils/cache.utils.d.ts +0 -3
  69. package/dist/api/utils/cache.utils.js +0 -18
  70. package/dist/api/utils/cache.utils.js.map +0 -1
  71. package/dist/api/utils/strings.utils.d.ts +0 -7
  72. package/dist/api/utils/strings.utils.js +0 -64
  73. package/dist/api/utils/strings.utils.js.map +0 -1
  74. package/dist/apps/services/app.service.d.ts +0 -126
  75. package/dist/apps/services/app.service.js +0 -1436
  76. package/dist/apps/services/app.service.js.map +0 -1
  77. package/dist/apps/utils/auth-context-manager.d.ts +0 -137
  78. package/dist/apps/utils/auth-context-manager.js +0 -248
  79. package/dist/apps/utils/auth-context-manager.js.map +0 -1
  80. package/dist/apps/utils/credential-manager.d.ts +0 -128
  81. package/dist/apps/utils/credential-manager.js +0 -199
  82. package/dist/apps/utils/credential-manager.js.map +0 -1
  83. package/dist/apps/utils/index.d.ts +0 -10
  84. package/dist/apps/utils/index.js +0 -54
  85. package/dist/apps/utils/index.js.map +0 -1
  86. package/dist/apps/utils/input-helpers.d.ts +0 -67
  87. package/dist/apps/utils/input-helpers.js +0 -185
  88. package/dist/apps/utils/input-helpers.js.map +0 -1
  89. package/dist/apps/utils/input-resolver.d.ts +0 -165
  90. package/dist/apps/utils/input-resolver.js +0 -477
  91. package/dist/apps/utils/input-resolver.js.map +0 -1
  92. package/dist/apps/utils/oauth-manager.d.ts +0 -196
  93. package/dist/apps/utils/oauth-manager.js +0 -429
  94. package/dist/apps/utils/oauth-manager.js.map +0 -1
  95. package/dist/apps/utils/objects.utils.d.ts +0 -4
  96. package/dist/apps/utils/objects.utils.js +0 -59
  97. package/dist/apps/utils/objects.utils.js.map +0 -1
  98. package/dist/apps/utils/string.utils.d.ts +0 -9
  99. package/dist/apps/utils/string.utils.js +0 -89
  100. package/dist/apps/utils/string.utils.js.map +0 -1
  101. package/dist/apps/validators/index.d.ts +0 -17
  102. package/dist/apps/validators/index.js +0 -39
  103. package/dist/apps/validators/index.js.map +0 -1
  104. package/dist/apps/validators/joi-validators/create.app.validator.d.ts +0 -3
  105. package/dist/apps/validators/joi-validators/create.app.validator.js +0 -43
  106. package/dist/apps/validators/joi-validators/create.app.validator.js.map +0 -1
  107. package/dist/apps/validators/joi-validators/create.appAction.validator.d.ts +0 -3
  108. package/dist/apps/validators/joi-validators/create.appAction.validator.js +0 -72
  109. package/dist/apps/validators/joi-validators/create.appAction.validator.js.map +0 -1
  110. package/dist/apps/validators/joi-validators/create.appActionResponse.validator.d.ts +0 -7
  111. package/dist/apps/validators/joi-validators/create.appActionResponse.validator.js +0 -81
  112. package/dist/apps/validators/joi-validators/create.appActionResponse.validator.js.map +0 -1
  113. package/dist/apps/validators/joi-validators/create.appAuth.validator.d.ts +0 -3
  114. package/dist/apps/validators/joi-validators/create.appAuth.validator.js +0 -64
  115. package/dist/apps/validators/joi-validators/create.appAuth.validator.js.map +0 -1
  116. package/dist/apps/validators/joi-validators/create.appBody.validators.d.ts +0 -4
  117. package/dist/apps/validators/joi-validators/create.appBody.validators.js +0 -44
  118. package/dist/apps/validators/joi-validators/create.appBody.validators.js.map +0 -1
  119. package/dist/apps/validators/joi-validators/create.appConstants.validator.d.ts +0 -4
  120. package/dist/apps/validators/joi-validators/create.appConstants.validator.js +0 -45
  121. package/dist/apps/validators/joi-validators/create.appConstants.validator.js.map +0 -1
  122. package/dist/apps/validators/joi-validators/create.appEnv.validator.d.ts +0 -4
  123. package/dist/apps/validators/joi-validators/create.appEnv.validator.js +0 -50
  124. package/dist/apps/validators/joi-validators/create.appEnv.validator.js.map +0 -1
  125. package/dist/apps/validators/joi-validators/create.appVariable.validator.d.ts +0 -4
  126. package/dist/apps/validators/joi-validators/create.appVariable.validator.js +0 -47
  127. package/dist/apps/validators/joi-validators/create.appVariable.validator.js.map +0 -1
  128. package/dist/apps/validators/joi-validators/create.appWebhook.validator.d.ts +0 -4
  129. package/dist/apps/validators/joi-validators/create.appWebhook.validator.js +0 -60
  130. package/dist/apps/validators/joi-validators/create.appWebhook.validator.js.map +0 -1
  131. package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.d.ts +0 -3
  132. package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.js +0 -48
  133. package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.js.map +0 -1
  134. package/dist/apps/validators/joi-validators/sample.validator.d.ts +0 -6
  135. package/dist/apps/validators/joi-validators/sample.validator.js +0 -65
  136. package/dist/apps/validators/joi-validators/sample.validator.js.map +0 -1
  137. package/dist/apps/validators/joi-validators/update.app.validator.d.ts +0 -4
  138. package/dist/apps/validators/joi-validators/update.app.validator.js +0 -66
  139. package/dist/apps/validators/joi-validators/update.app.validator.js.map +0 -1
  140. package/dist/apps/validators/joi-validators/update.appAction.validator.d.ts +0 -4
  141. package/dist/apps/validators/joi-validators/update.appAction.validator.js +0 -76
  142. package/dist/apps/validators/joi-validators/update.appAction.validator.js.map +0 -1
  143. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.d.ts +0 -3
  144. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js +0 -57
  145. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js.map +0 -1
  146. package/dist/apps/validators/joi-validators/update.appAuth.validator.d.ts +0 -4
  147. package/dist/apps/validators/joi-validators/update.appAuth.validator.js +0 -52
  148. package/dist/apps/validators/joi-validators/update.appAuth.validator.js.map +0 -1
  149. package/dist/apps/validators/joi-validators/update.appConstants.validator.d.ts +0 -4
  150. package/dist/apps/validators/joi-validators/update.appConstants.validator.js +0 -45
  151. package/dist/apps/validators/joi-validators/update.appConstants.validator.js.map +0 -1
  152. package/dist/apps/validators/joi-validators/update.appEnv.validator.d.ts +0 -4
  153. package/dist/apps/validators/joi-validators/update.appEnv.validator.js +0 -50
  154. package/dist/apps/validators/joi-validators/update.appEnv.validator.js.map +0 -1
  155. package/dist/apps/validators/joi-validators/update.appVariables.validator.d.ts +0 -4
  156. package/dist/apps/validators/joi-validators/update.appVariables.validator.js +0 -47
  157. package/dist/apps/validators/joi-validators/update.appVariables.validator.js.map +0 -1
  158. package/dist/apps/validators/joi-validators/update.appWebhook.validator.d.ts +0 -4
  159. package/dist/apps/validators/joi-validators/update.appWebhook.validator.js +0 -59
  160. package/dist/apps/validators/joi-validators/update.appWebhook.validator.js.map +0 -1
  161. package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.d.ts +0 -3
  162. package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.js +0 -48
  163. package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.js.map +0 -1
  164. package/dist/apps/validators/joi-validators/update.validation.entityData.validator.d.ts +0 -3
  165. package/dist/apps/validators/joi-validators/update.validation.entityData.validator.js +0 -60
  166. package/dist/apps/validators/joi-validators/update.validation.entityData.validator.js.map +0 -1
  167. package/dist/bin.d.ts +0 -26
  168. package/dist/bin.js +0 -28
  169. package/dist/bin.js.map +0 -1
  170. package/dist/brokers/brokers.service.d.ts +0 -438
  171. package/dist/brokers/brokers.service.js +0 -1294
  172. package/dist/brokers/brokers.service.js.map +0 -1
  173. package/dist/brokers/index.d.ts +0 -46
  174. package/dist/brokers/index.js +0 -83
  175. package/dist/brokers/index.js.map +0 -1
  176. package/dist/brokers/types/index.d.ts +0 -569
  177. package/dist/brokers/types/index.js +0 -8
  178. package/dist/brokers/types/index.js.map +0 -1
  179. package/dist/brokers/utils/broker.util.d.ts +0 -33
  180. package/dist/brokers/utils/broker.util.js +0 -125
  181. package/dist/brokers/utils/broker.util.js.map +0 -1
  182. package/dist/brokers/utils/providers/aws-sqs.service.d.ts +0 -16
  183. package/dist/brokers/utils/providers/aws-sqs.service.js +0 -71
  184. package/dist/brokers/utils/providers/aws-sqs.service.js.map +0 -1
  185. package/dist/brokers/utils/providers/google-pubsub.service.d.ts +0 -16
  186. package/dist/brokers/utils/providers/google-pubsub.service.js +0 -43
  187. package/dist/brokers/utils/providers/google-pubsub.service.js.map +0 -1
  188. package/dist/brokers/utils/providers/index.d.ts +0 -6
  189. package/dist/brokers/utils/providers/index.js +0 -16
  190. package/dist/brokers/utils/providers/index.js.map +0 -1
  191. package/dist/brokers/utils/providers/kafka.service.d.ts +0 -23
  192. package/dist/brokers/utils/providers/kafka.service.js +0 -131
  193. package/dist/brokers/utils/providers/kafka.service.js.map +0 -1
  194. package/dist/brokers/utils/providers/nats.service.d.ts +0 -18
  195. package/dist/brokers/utils/providers/nats.service.js +0 -63
  196. package/dist/brokers/utils/providers/nats.service.js.map +0 -1
  197. package/dist/brokers/utils/providers/rabbitmq.service.d.ts +0 -25
  198. package/dist/brokers/utils/providers/rabbitmq.service.js +0 -138
  199. package/dist/brokers/utils/providers/rabbitmq.service.js.map +0 -1
  200. package/dist/brokers/utils/providers/redis.service.d.ts +0 -18
  201. package/dist/brokers/utils/providers/redis.service.js +0 -93
  202. package/dist/brokers/utils/providers/redis.service.js.map +0 -1
  203. package/dist/cache/cache.manager.d.ts +0 -308
  204. package/dist/cache/cache.manager.js +0 -900
  205. package/dist/cache/cache.manager.js.map +0 -1
  206. package/dist/cache/cache.service.d.ts +0 -192
  207. package/dist/cache/cache.service.js +0 -596
  208. package/dist/cache/cache.service.js.map +0 -1
  209. package/dist/cache/index.d.ts +0 -52
  210. package/dist/cache/index.js +0 -81
  211. package/dist/cache/index.js.map +0 -1
  212. package/dist/cache/types/index.d.ts +0 -112
  213. package/dist/cache/types/index.js +0 -6
  214. package/dist/cache/types/index.js.map +0 -1
  215. package/dist/clients/apps.client.d.ts +0 -4
  216. package/dist/clients/apps.client.js +0 -31
  217. package/dist/clients/apps.client.js.map +0 -1
  218. package/dist/clients/email.client.d.ts +0 -4
  219. package/dist/clients/email.client.js +0 -29
  220. package/dist/clients/email.client.js.map +0 -1
  221. package/dist/clients/expo.client.d.ts +0 -3
  222. package/dist/clients/expo.client.js +0 -28
  223. package/dist/clients/expo.client.js.map +0 -1
  224. package/dist/clients/function.client.d.ts +0 -3
  225. package/dist/clients/function.client.js +0 -27
  226. package/dist/clients/function.client.js.map +0 -1
  227. package/dist/clients/http.client.d.ts +0 -3
  228. package/dist/clients/http.client.js +0 -27
  229. package/dist/clients/http.client.js.map +0 -1
  230. package/dist/clients/logs.client.d.ts +0 -4
  231. package/dist/clients/logs.client.js +0 -34
  232. package/dist/clients/logs.client.js.map +0 -1
  233. package/dist/clients/pricing.client.d.ts +0 -4
  234. package/dist/clients/pricing.client.js +0 -34
  235. package/dist/clients/pricing.client.js.map +0 -1
  236. package/dist/clients/products.client.d.ts +0 -3
  237. package/dist/clients/products.client.js +0 -32
  238. package/dist/clients/products.client.js.map +0 -1
  239. package/dist/clients/users.client.d.ts +0 -4
  240. package/dist/clients/users.client.js +0 -34
  241. package/dist/clients/users.client.js.map +0 -1
  242. package/dist/clients/webhooks.client.d.ts +0 -4
  243. package/dist/clients/webhooks.client.js +0 -34
  244. package/dist/clients/webhooks.client.js.map +0 -1
  245. package/dist/clients/workspace.client.d.ts +0 -7
  246. package/dist/clients/workspace.client.js +0 -39
  247. package/dist/clients/workspace.client.js.map +0 -1
  248. package/dist/database/actions/action-manager.d.ts +0 -170
  249. package/dist/database/actions/action-manager.js +0 -465
  250. package/dist/database/actions/action-manager.js.map +0 -1
  251. package/dist/database/actions/index.d.ts +0 -6
  252. package/dist/database/actions/index.js +0 -13
  253. package/dist/database/actions/index.js.map +0 -1
  254. package/dist/database/adapters/adapter.factory.d.ts +0 -62
  255. package/dist/database/adapters/adapter.factory.js +0 -97
  256. package/dist/database/adapters/adapter.factory.js.map +0 -1
  257. package/dist/database/adapters/base.adapter.d.ts +0 -423
  258. package/dist/database/adapters/base.adapter.js +0 -260
  259. package/dist/database/adapters/base.adapter.js.map +0 -1
  260. package/dist/database/adapters/cassandra.adapter.d.ts +0 -92
  261. package/dist/database/adapters/cassandra.adapter.js +0 -1091
  262. package/dist/database/adapters/cassandra.adapter.js.map +0 -1
  263. package/dist/database/adapters/dynamodb.adapter.d.ts +0 -110
  264. package/dist/database/adapters/dynamodb.adapter.js +0 -1564
  265. package/dist/database/adapters/dynamodb.adapter.js.map +0 -1
  266. package/dist/database/adapters/index.d.ts +0 -11
  267. package/dist/database/adapters/index.js +0 -27
  268. package/dist/database/adapters/index.js.map +0 -1
  269. package/dist/database/adapters/mariadb.adapter.d.ts +0 -100
  270. package/dist/database/adapters/mariadb.adapter.js +0 -247
  271. package/dist/database/adapters/mariadb.adapter.js.map +0 -1
  272. package/dist/database/adapters/mongodb.adapter.d.ts +0 -121
  273. package/dist/database/adapters/mongodb.adapter.js +0 -1284
  274. package/dist/database/adapters/mongodb.adapter.js.map +0 -1
  275. package/dist/database/adapters/mysql.adapter.d.ts +0 -86
  276. package/dist/database/adapters/mysql.adapter.js +0 -1371
  277. package/dist/database/adapters/mysql.adapter.js.map +0 -1
  278. package/dist/database/adapters/postgresql.adapter.d.ts +0 -90
  279. package/dist/database/adapters/postgresql.adapter.js +0 -1487
  280. package/dist/database/adapters/postgresql.adapter.js.map +0 -1
  281. package/dist/database/databases.service.d.ts +0 -1496
  282. package/dist/database/databases.service.js +0 -3294
  283. package/dist/database/databases.service.js.map +0 -1
  284. package/dist/database/index.d.ts +0 -46
  285. package/dist/database/index.js +0 -109
  286. package/dist/database/index.js.map +0 -1
  287. package/dist/database/migrations/index.d.ts +0 -6
  288. package/dist/database/migrations/index.js +0 -12
  289. package/dist/database/migrations/index.js.map +0 -1
  290. package/dist/database/migrations/migration-engine.d.ts +0 -136
  291. package/dist/database/migrations/migration-engine.js +0 -1421
  292. package/dist/database/migrations/migration-engine.js.map +0 -1
  293. package/dist/database/operators/aggregation-builder.d.ts +0 -67
  294. package/dist/database/operators/aggregation-builder.js +0 -841
  295. package/dist/database/operators/aggregation-builder.js.map +0 -1
  296. package/dist/database/operators/index.d.ts +0 -7
  297. package/dist/database/operators/index.js +0 -15
  298. package/dist/database/operators/index.js.map +0 -1
  299. package/dist/database/operators/query-builder.d.ts +0 -69
  300. package/dist/database/operators/query-builder.js +0 -447
  301. package/dist/database/operators/query-builder.js.map +0 -1
  302. package/dist/database/presave/decrypt.d.ts +0 -25
  303. package/dist/database/presave/decrypt.js +0 -146
  304. package/dist/database/presave/decrypt.js.map +0 -1
  305. package/dist/database/presave/index.d.ts +0 -9
  306. package/dist/database/presave/index.js +0 -18
  307. package/dist/database/presave/index.js.map +0 -1
  308. package/dist/database/presave/presave-processor.d.ts +0 -148
  309. package/dist/database/presave/presave-processor.js +0 -702
  310. package/dist/database/presave/presave-processor.js.map +0 -1
  311. package/dist/database/schema/index.d.ts +0 -7
  312. package/dist/database/schema/index.js +0 -13
  313. package/dist/database/schema/index.js.map +0 -1
  314. package/dist/database/schema/schema-manager.d.ts +0 -258
  315. package/dist/database/schema/schema-manager.js +0 -638
  316. package/dist/database/schema/schema-manager.js.map +0 -1
  317. package/dist/database/transactions/index.d.ts +0 -6
  318. package/dist/database/transactions/index.js +0 -13
  319. package/dist/database/transactions/index.js.map +0 -1
  320. package/dist/database/transactions/transaction-manager.d.ts +0 -113
  321. package/dist/database/transactions/transaction-manager.js +0 -344
  322. package/dist/database/transactions/transaction-manager.js.map +0 -1
  323. package/dist/database/triggers/index.d.ts +0 -7
  324. package/dist/database/triggers/index.js +0 -14
  325. package/dist/database/triggers/index.js.map +0 -1
  326. package/dist/database/triggers/trigger-processor.d.ts +0 -239
  327. package/dist/database/triggers/trigger-processor.js +0 -1034
  328. package/dist/database/triggers/trigger-processor.js.map +0 -1
  329. package/dist/database/types/action.interface.d.ts +0 -148
  330. package/dist/database/types/action.interface.js +0 -6
  331. package/dist/database/types/action.interface.js.map +0 -1
  332. package/dist/database/types/aggregation.interface.d.ts +0 -185
  333. package/dist/database/types/aggregation.interface.js +0 -6
  334. package/dist/database/types/aggregation.interface.js.map +0 -1
  335. package/dist/database/types/connection.interface.d.ts +0 -137
  336. package/dist/database/types/connection.interface.js +0 -6
  337. package/dist/database/types/connection.interface.js.map +0 -1
  338. package/dist/database/types/dashboard.interface.d.ts +0 -74
  339. package/dist/database/types/dashboard.interface.js +0 -7
  340. package/dist/database/types/dashboard.interface.js.map +0 -1
  341. package/dist/database/types/enums.d.ts +0 -195
  342. package/dist/database/types/enums.js +0 -244
  343. package/dist/database/types/enums.js.map +0 -1
  344. package/dist/database/types/index.d.ts +0 -15
  345. package/dist/database/types/index.js +0 -31
  346. package/dist/database/types/index.js.map +0 -1
  347. package/dist/database/types/migration.interface.d.ts +0 -686
  348. package/dist/database/types/migration.interface.js +0 -9
  349. package/dist/database/types/migration.interface.js.map +0 -1
  350. package/dist/database/types/presave.interface.d.ts +0 -292
  351. package/dist/database/types/presave.interface.js +0 -60
  352. package/dist/database/types/presave.interface.js.map +0 -1
  353. package/dist/database/types/query.interface.d.ts +0 -205
  354. package/dist/database/types/query.interface.js +0 -6
  355. package/dist/database/types/query.interface.js.map +0 -1
  356. package/dist/database/types/schema.interface.d.ts +0 -412
  357. package/dist/database/types/schema.interface.js +0 -6
  358. package/dist/database/types/schema.interface.js.map +0 -1
  359. package/dist/database/types/transaction.interface.d.ts +0 -84
  360. package/dist/database/types/transaction.interface.js +0 -6
  361. package/dist/database/types/transaction.interface.js.map +0 -1
  362. package/dist/database/types/trigger.interface.d.ts +0 -612
  363. package/dist/database/types/trigger.interface.js +0 -121
  364. package/dist/database/types/trigger.interface.js.map +0 -1
  365. package/dist/database/types/write.interface.d.ts +0 -216
  366. package/dist/database/types/write.interface.js +0 -6
  367. package/dist/database/types/write.interface.js.map +0 -1
  368. package/dist/database/utils/database-error.d.ts +0 -96
  369. package/dist/database/utils/database-error.js +0 -221
  370. package/dist/database/utils/database-error.js.map +0 -1
  371. package/dist/database/utils/index.d.ts +0 -6
  372. package/dist/database/utils/index.js +0 -11
  373. package/dist/database/utils/index.js.map +0 -1
  374. package/dist/graph/adapters/adapter.factory.d.ts +0 -47
  375. package/dist/graph/adapters/adapter.factory.js +0 -77
  376. package/dist/graph/adapters/adapter.factory.js.map +0 -1
  377. package/dist/graph/adapters/arangodb.adapter.d.ts +0 -86
  378. package/dist/graph/adapters/arangodb.adapter.js +0 -1588
  379. package/dist/graph/adapters/arangodb.adapter.js.map +0 -1
  380. package/dist/graph/adapters/base.adapter.d.ts +0 -264
  381. package/dist/graph/adapters/base.adapter.js +0 -156
  382. package/dist/graph/adapters/base.adapter.js.map +0 -1
  383. package/dist/graph/adapters/index.d.ts +0 -11
  384. package/dist/graph/adapters/index.js +0 -21
  385. package/dist/graph/adapters/index.js.map +0 -1
  386. package/dist/graph/adapters/memgraph.adapter.d.ts +0 -110
  387. package/dist/graph/adapters/memgraph.adapter.js +0 -1452
  388. package/dist/graph/adapters/memgraph.adapter.js.map +0 -1
  389. package/dist/graph/adapters/neo4j.adapter.d.ts +0 -81
  390. package/dist/graph/adapters/neo4j.adapter.js +0 -1317
  391. package/dist/graph/adapters/neo4j.adapter.js.map +0 -1
  392. package/dist/graph/adapters/neptune.adapter.d.ts +0 -82
  393. package/dist/graph/adapters/neptune.adapter.js +0 -1369
  394. package/dist/graph/adapters/neptune.adapter.js.map +0 -1
  395. package/dist/graph/graphs.service.d.ts +0 -617
  396. package/dist/graph/graphs.service.js +0 -2594
  397. package/dist/graph/graphs.service.js.map +0 -1
  398. package/dist/graph/index.d.ts +0 -57
  399. package/dist/graph/index.js +0 -77
  400. package/dist/graph/index.js.map +0 -1
  401. package/dist/graph/transactions/index.d.ts +0 -4
  402. package/dist/graph/transactions/index.js +0 -9
  403. package/dist/graph/transactions/index.js.map +0 -1
  404. package/dist/graph/transactions/transaction-manager.d.ts +0 -61
  405. package/dist/graph/transactions/transaction-manager.js +0 -126
  406. package/dist/graph/transactions/transaction-manager.js.map +0 -1
  407. package/dist/graph/types/connection.interface.d.ts +0 -149
  408. package/dist/graph/types/connection.interface.js +0 -9
  409. package/dist/graph/types/connection.interface.js.map +0 -1
  410. package/dist/graph/types/enums.d.ts +0 -101
  411. package/dist/graph/types/enums.js +0 -114
  412. package/dist/graph/types/enums.js.map +0 -1
  413. package/dist/graph/types/index.d.ts +0 -13
  414. package/dist/graph/types/index.js +0 -20
  415. package/dist/graph/types/index.js.map +0 -1
  416. package/dist/graph/types/node.interface.d.ts +0 -248
  417. package/dist/graph/types/node.interface.js +0 -9
  418. package/dist/graph/types/node.interface.js.map +0 -1
  419. package/dist/graph/types/query.interface.d.ts +0 -175
  420. package/dist/graph/types/query.interface.js +0 -9
  421. package/dist/graph/types/query.interface.js.map +0 -1
  422. package/dist/graph/types/relationship.interface.d.ts +0 -207
  423. package/dist/graph/types/relationship.interface.js +0 -9
  424. package/dist/graph/types/relationship.interface.js.map +0 -1
  425. package/dist/graph/types/schema.interface.d.ts +0 -295
  426. package/dist/graph/types/schema.interface.js +0 -9
  427. package/dist/graph/types/schema.interface.js.map +0 -1
  428. package/dist/graph/types/transaction.interface.d.ts +0 -55
  429. package/dist/graph/types/transaction.interface.js +0 -9
  430. package/dist/graph/types/transaction.interface.js.map +0 -1
  431. package/dist/graph/types/traversal.interface.d.ts +0 -181
  432. package/dist/graph/types/traversal.interface.js +0 -9
  433. package/dist/graph/types/traversal.interface.js.map +0 -1
  434. package/dist/graph/utils/graph-error.d.ts +0 -71
  435. package/dist/graph/utils/graph-error.js +0 -142
  436. package/dist/graph/utils/graph-error.js.map +0 -1
  437. package/dist/graph/utils/index.d.ts +0 -4
  438. package/dist/graph/utils/index.js +0 -9
  439. package/dist/graph/utils/index.js.map +0 -1
  440. package/dist/imports/imports.repo.d.ts +0 -0
  441. package/dist/imports/imports.repo.js +0 -1
  442. package/dist/imports/imports.repo.js.map +0 -1
  443. package/dist/imports/imports.service.d.ts +0 -23
  444. package/dist/imports/imports.service.js +0 -71
  445. package/dist/imports/imports.service.js.map +0 -1
  446. package/dist/imports/imports.types.d.ts +0 -350
  447. package/dist/imports/imports.types.js +0 -33
  448. package/dist/imports/imports.types.js.map +0 -1
  449. package/dist/imports/openAPI3.0.types.d.ts +0 -52
  450. package/dist/imports/openAPI3.0.types.js +0 -3
  451. package/dist/imports/openAPI3.0.types.js.map +0 -1
  452. package/dist/imports/repos/openApi.repo.d.ts +0 -6
  453. package/dist/imports/repos/openApi.repo.js +0 -422
  454. package/dist/imports/repos/openApi.repo.js.map +0 -1
  455. package/dist/imports/repos/postmanV21.repo.d.ts +0 -14
  456. package/dist/imports/repos/postmanV21.repo.js +0 -257
  457. package/dist/imports/repos/postmanV21.repo.js.map +0 -1
  458. package/dist/imports/utils/imports.utils.d.ts +0 -80
  459. package/dist/imports/utils/imports.utils.js +0 -114
  460. package/dist/imports/utils/imports.utils.js.map +0 -1
  461. package/dist/imports/validators/index.d.ts +0 -0
  462. package/dist/imports/validators/index.js +0 -1
  463. package/dist/imports/validators/index.js.map +0 -1
  464. package/dist/imports/validators/joi-validators/postmanV21.validator.d.ts +0 -5
  465. package/dist/imports/validators/joi-validators/postmanV21.validator.js +0 -96
  466. package/dist/imports/validators/joi-validators/postmanV21.validator.js.map +0 -1
  467. package/dist/index.d.ts +0 -4021
  468. package/dist/index.js +0 -5895
  469. package/dist/index.js.map +0 -1
  470. package/dist/init.interface.d.ts +0 -407
  471. package/dist/init.interface.js +0 -3
  472. package/dist/init.interface.js.map +0 -1
  473. package/dist/inputs/inputs.repo.d.ts +0 -7
  474. package/dist/inputs/inputs.repo.js +0 -16
  475. package/dist/inputs/inputs.repo.js.map +0 -1
  476. package/dist/inputs/inputs.service.d.ts +0 -61
  477. package/dist/inputs/inputs.service.js +0 -468
  478. package/dist/inputs/inputs.service.js.map +0 -1
  479. package/dist/inputs/utils/inputs.utils.create.d.ts +0 -11
  480. package/dist/inputs/utils/inputs.utils.create.js +0 -273
  481. package/dist/inputs/utils/inputs.utils.create.js.map +0 -1
  482. package/dist/inputs/validators/inputs.validator.parse.d.ts +0 -4
  483. package/dist/inputs/validators/inputs.validator.parse.js +0 -53
  484. package/dist/inputs/validators/inputs.validator.parse.js.map +0 -1
  485. package/dist/jobs/index.d.ts +0 -38
  486. package/dist/jobs/index.js +0 -50
  487. package/dist/jobs/index.js.map +0 -1
  488. package/dist/jobs/jobs.service.d.ts +0 -154
  489. package/dist/jobs/jobs.service.js +0 -491
  490. package/dist/jobs/jobs.service.js.map +0 -1
  491. package/dist/jobs/jobs.state.d.ts +0 -113
  492. package/dist/jobs/jobs.state.js +0 -447
  493. package/dist/jobs/jobs.state.js.map +0 -1
  494. package/dist/jobs/types.d.ts +0 -449
  495. package/dist/jobs/types.js +0 -74
  496. package/dist/jobs/types.js.map +0 -1
  497. package/dist/logs/logs.repo.d.ts +0 -6
  498. package/dist/logs/logs.repo.js +0 -12
  499. package/dist/logs/logs.repo.js.map +0 -1
  500. package/dist/logs/logs.service.d.ts +0 -30
  501. package/dist/logs/logs.service.js +0 -89
  502. package/dist/logs/logs.service.js.map +0 -1
  503. package/dist/logs/logs.types.d.ts +0 -85
  504. package/dist/logs/logs.types.js +0 -52
  505. package/dist/logs/logs.types.js.map +0 -1
  506. package/dist/logs/utils/logs.utils.create.d.ts +0 -0
  507. package/dist/logs/utils/logs.utils.create.js +0 -1
  508. package/dist/logs/utils/logs.utils.create.js.map +0 -1
  509. package/dist/logs/utils/logs.utils.errors.d.ts +0 -2
  510. package/dist/logs/utils/logs.utils.errors.js +0 -8
  511. package/dist/logs/utils/logs.utils.errors.js.map +0 -1
  512. package/dist/models/index.d.ts +0 -6
  513. package/dist/models/index.js +0 -11
  514. package/dist/models/index.js.map +0 -1
  515. package/dist/models/models.service.d.ts +0 -137
  516. package/dist/models/models.service.js +0 -195
  517. package/dist/models/models.service.js.map +0 -1
  518. package/dist/notifications/index.d.ts +0 -13
  519. package/dist/notifications/index.js +0 -26
  520. package/dist/notifications/index.js.map +0 -1
  521. package/dist/notifications/notifications.service.d.ts +0 -268
  522. package/dist/notifications/notifications.service.js +0 -907
  523. package/dist/notifications/notifications.service.js.map +0 -1
  524. package/dist/notifications/types/index.d.ts +0 -4
  525. package/dist/notifications/types/index.js +0 -21
  526. package/dist/notifications/types/index.js.map +0 -1
  527. package/dist/notifications/types/notifications.types.d.ts +0 -454
  528. package/dist/notifications/types/notifications.types.js +0 -51
  529. package/dist/notifications/types/notifications.types.js.map +0 -1
  530. package/dist/parsers/index.d.ts +0 -3
  531. package/dist/parsers/index.js +0 -27
  532. package/dist/parsers/index.js.map +0 -1
  533. package/dist/parsers/pipelines/postman.pipelines.d.ts +0 -15
  534. package/dist/parsers/pipelines/postman.pipelines.js +0 -103
  535. package/dist/parsers/pipelines/postman.pipelines.js.map +0 -1
  536. package/dist/parsers/types/postman.types.d.ts +0 -200
  537. package/dist/parsers/types/postman.types.js +0 -3
  538. package/dist/parsers/types/postman.types.js.map +0 -1
  539. package/dist/parsers/utils/postman.utils.d.ts +0 -12
  540. package/dist/parsers/utils/postman.utils.js +0 -116
  541. package/dist/parsers/utils/postman.utils.js.map +0 -1
  542. package/dist/parsers/validators/postman-auth.validators.d.ts +0 -10
  543. package/dist/parsers/validators/postman-auth.validators.js +0 -127
  544. package/dist/parsers/validators/postman-auth.validators.js.map +0 -1
  545. package/dist/parsers/validators/postman-request.validators.d.ts +0 -13
  546. package/dist/parsers/validators/postman-request.validators.js +0 -139
  547. package/dist/parsers/validators/postman-request.validators.js.map +0 -1
  548. package/dist/parsers/validators/postman-response.validators.d.ts +0 -13
  549. package/dist/parsers/validators/postman-response.validators.js +0 -150
  550. package/dist/parsers/validators/postman-response.validators.js.map +0 -1
  551. package/dist/parsers/validators/postman-variable.validators.d.ts +0 -14
  552. package/dist/parsers/validators/postman-variable.validators.js +0 -163
  553. package/dist/parsers/validators/postman-variable.validators.js.map +0 -1
  554. package/dist/pricing/pricing.repo.d.ts +0 -0
  555. package/dist/pricing/pricing.repo.js +0 -1
  556. package/dist/pricing/pricing.repo.js.map +0 -1
  557. package/dist/pricing/pricing.service.d.ts +0 -24
  558. package/dist/pricing/pricing.service.js +0 -51
  559. package/dist/pricing/pricing.service.js.map +0 -1
  560. package/dist/pricing/pricing.types.d.ts +0 -76
  561. package/dist/pricing/pricing.types.js +0 -21
  562. package/dist/pricing/pricing.types.js.map +0 -1
  563. package/dist/pricing/utils/string.utils.d.ts +0 -1
  564. package/dist/pricing/utils/string.utils.js +0 -9
  565. package/dist/pricing/utils/string.utils.js.map +0 -1
  566. package/dist/processor/repos/mongo.repo.d.ts +0 -39
  567. package/dist/processor/repos/mongo.repo.js +0 -260
  568. package/dist/processor/repos/mongo.repo.js.map +0 -1
  569. package/dist/processor/repos/postgres.repo.d.ts +0 -31
  570. package/dist/processor/repos/postgres.repo.js +0 -185
  571. package/dist/processor/repos/postgres.repo.js.map +0 -1
  572. package/dist/processor/repos/sms.repo.d.ts +0 -39
  573. package/dist/processor/repos/sms.repo.js +0 -124
  574. package/dist/processor/repos/sms.repo.js.map +0 -1
  575. package/dist/processor/services/processor.service.d.ts +0 -465
  576. package/dist/processor/services/processor.service.js +0 -5343
  577. package/dist/processor/services/processor.service.js.map +0 -1
  578. package/dist/processor/services/request.service.d.ts +0 -36
  579. package/dist/processor/services/request.service.js +0 -304
  580. package/dist/processor/services/request.service.js.map +0 -1
  581. package/dist/processor/types/request.types.d.ts +0 -14
  582. package/dist/processor/types/request.types.js +0 -3
  583. package/dist/processor/types/request.types.js.map +0 -1
  584. package/dist/processor/utils/processor.utils.d.ts +0 -104
  585. package/dist/processor/utils/processor.utils.js +0 -1066
  586. package/dist/processor/utils/processor.utils.js.map +0 -1
  587. package/dist/processor/utils/request.utils.d.ts +0 -20
  588. package/dist/processor/utils/request.utils.js +0 -113
  589. package/dist/processor/utils/request.utils.js.map +0 -1
  590. package/dist/processor/utils/storage.util.d.ts +0 -8
  591. package/dist/processor/utils/storage.util.js +0 -106
  592. package/dist/processor/utils/storage.util.js.map +0 -1
  593. package/dist/products/services/products.service.d.ts +0 -577
  594. package/dist/products/services/products.service.js +0 -5845
  595. package/dist/products/services/products.service.js.map +0 -1
  596. package/dist/products/utils/crypt.utils.d.ts +0 -1
  597. package/dist/products/utils/crypt.utils.js +0 -17
  598. package/dist/products/utils/crypt.utils.js.map +0 -1
  599. package/dist/products/utils/functions.utils.d.ts +0 -13
  600. package/dist/products/utils/functions.utils.js +0 -294
  601. package/dist/products/utils/functions.utils.js.map +0 -1
  602. package/dist/products/utils/objects.utils.d.ts +0 -13
  603. package/dist/products/utils/objects.utils.js +0 -89
  604. package/dist/products/utils/objects.utils.js.map +0 -1
  605. package/dist/products/utils/string.utils.d.ts +0 -12
  606. package/dist/products/utils/string.utils.js +0 -168
  607. package/dist/products/utils/string.utils.js.map +0 -1
  608. package/dist/products/validators/index.d.ts +0 -33
  609. package/dist/products/validators/index.js +0 -75
  610. package/dist/products/validators/index.js.map +0 -1
  611. package/dist/products/validators/joi-validators/create.html.validator.d.ts +0 -2
  612. package/dist/products/validators/joi-validators/create.html.validator.js +0 -55
  613. package/dist/products/validators/joi-validators/create.html.validator.js.map +0 -1
  614. package/dist/products/validators/joi-validators/create.productAgent.validator.d.ts +0 -3
  615. package/dist/products/validators/joi-validators/create.productAgent.validator.js +0 -266
  616. package/dist/products/validators/joi-validators/create.productAgent.validator.js.map +0 -1
  617. package/dist/products/validators/joi-validators/create.productApp.validator.d.ts +0 -4
  618. package/dist/products/validators/joi-validators/create.productApp.validator.js +0 -61
  619. package/dist/products/validators/joi-validators/create.productApp.validator.js.map +0 -1
  620. package/dist/products/validators/joi-validators/create.productCache.validator.d.ts +0 -3
  621. package/dist/products/validators/joi-validators/create.productCache.validator.js +0 -46
  622. package/dist/products/validators/joi-validators/create.productCache.validator.js.map +0 -1
  623. package/dist/products/validators/joi-validators/create.productDatabase.validator.d.ts +0 -3
  624. package/dist/products/validators/joi-validators/create.productDatabase.validator.js +0 -77
  625. package/dist/products/validators/joi-validators/create.productDatabase.validator.js.map +0 -1
  626. package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.d.ts +0 -7
  627. package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js +0 -194
  628. package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js.map +0 -1
  629. package/dist/products/validators/joi-validators/create.productDatabaseMigration.validator.d.ts +0 -4
  630. package/dist/products/validators/joi-validators/create.productDatabaseMigration.validator.js +0 -63
  631. package/dist/products/validators/joi-validators/create.productDatabaseMigration.validator.js.map +0 -1
  632. package/dist/products/validators/joi-validators/create.productEnv.validator.d.ts +0 -3
  633. package/dist/products/validators/joi-validators/create.productEnv.validator.js +0 -45
  634. package/dist/products/validators/joi-validators/create.productEnv.validator.js.map +0 -1
  635. package/dist/products/validators/joi-validators/create.productFallback.validator.d.ts +0 -3
  636. package/dist/products/validators/joi-validators/create.productFallback.validator.js +0 -64
  637. package/dist/products/validators/joi-validators/create.productFallback.validator.js.map +0 -1
  638. package/dist/products/validators/joi-validators/create.productFeature.validator.d.ts +0 -14
  639. package/dist/products/validators/joi-validators/create.productFeature.validator.js +0 -140
  640. package/dist/products/validators/joi-validators/create.productFeature.validator.js.map +0 -1
  641. package/dist/products/validators/joi-validators/create.productFunction.validator.d.ts +0 -3
  642. package/dist/products/validators/joi-validators/create.productFunction.validator.js +0 -57
  643. package/dist/products/validators/joi-validators/create.productFunction.validator.js.map +0 -1
  644. package/dist/products/validators/joi-validators/create.productGraph.validator.d.ts +0 -3
  645. package/dist/products/validators/joi-validators/create.productGraph.validator.js +0 -89
  646. package/dist/products/validators/joi-validators/create.productGraph.validator.js.map +0 -1
  647. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.d.ts +0 -4
  648. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js +0 -58
  649. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js.map +0 -1
  650. package/dist/products/validators/joi-validators/create.productJob.validator.d.ts +0 -12
  651. package/dist/products/validators/joi-validators/create.productJob.validator.js +0 -60
  652. package/dist/products/validators/joi-validators/create.productJob.validator.js.map +0 -1
  653. package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.d.ts +0 -3
  654. package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js +0 -52
  655. package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js.map +0 -1
  656. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.d.ts +0 -3
  657. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js +0 -193
  658. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js.map +0 -1
  659. package/dist/products/validators/joi-validators/create.productModel.validator.d.ts +0 -3
  660. package/dist/products/validators/joi-validators/create.productModel.validator.js +0 -132
  661. package/dist/products/validators/joi-validators/create.productModel.validator.js.map +0 -1
  662. package/dist/products/validators/joi-validators/create.productNotification.validator.d.ts +0 -4
  663. package/dist/products/validators/joi-validators/create.productNotification.validator.js +0 -241
  664. package/dist/products/validators/joi-validators/create.productNotification.validator.js.map +0 -1
  665. package/dist/products/validators/joi-validators/create.productNotificationMessage.validator.d.ts +0 -3
  666. package/dist/products/validators/joi-validators/create.productNotificationMessage.validator.js +0 -57
  667. package/dist/products/validators/joi-validators/create.productNotificationMessage.validator.js.map +0 -1
  668. package/dist/products/validators/joi-validators/create.productNotifications.validator.d.ts +0 -0
  669. package/dist/products/validators/joi-validators/create.productNotifications.validator.js +0 -1
  670. package/dist/products/validators/joi-validators/create.productNotifications.validator.js.map +0 -1
  671. package/dist/products/validators/joi-validators/create.productQuota.validator.d.ts +0 -3
  672. package/dist/products/validators/joi-validators/create.productQuota.validator.js +0 -67
  673. package/dist/products/validators/joi-validators/create.productQuota.validator.js.map +0 -1
  674. package/dist/products/validators/joi-validators/create.productStorage.validator.d.ts +0 -3
  675. package/dist/products/validators/joi-validators/create.productStorage.validator.js +0 -158
  676. package/dist/products/validators/joi-validators/create.productStorage.validator.js.map +0 -1
  677. package/dist/products/validators/joi-validators/create.productVector.validator.d.ts +0 -3
  678. package/dist/products/validators/joi-validators/create.productVector.validator.js +0 -136
  679. package/dist/products/validators/joi-validators/create.productVector.validator.js.map +0 -1
  680. package/dist/products/validators/joi-validators/create.products.validator.d.ts +0 -3
  681. package/dist/products/validators/joi-validators/create.products.validator.js +0 -43
  682. package/dist/products/validators/joi-validators/create.products.validator.js.map +0 -1
  683. package/dist/products/validators/joi-validators/create.requestAction.validator.d.ts +0 -2
  684. package/dist/products/validators/joi-validators/create.requestAction.validator.js +0 -45
  685. package/dist/products/validators/joi-validators/create.requestAction.validator.js.map +0 -1
  686. package/dist/products/validators/joi-validators/create.userAuth.validator.d.ts +0 -3
  687. package/dist/products/validators/joi-validators/create.userAuth.validator.js +0 -48
  688. package/dist/products/validators/joi-validators/create.userAuth.validator.js.map +0 -1
  689. package/dist/products/validators/joi-validators/register.productWebhooks.validator.d.ts +0 -3
  690. package/dist/products/validators/joi-validators/register.productWebhooks.validator.js +0 -48
  691. package/dist/products/validators/joi-validators/register.productWebhooks.validator.js.map +0 -1
  692. package/dist/products/validators/joi-validators/update.dataValue.validator.d.ts +0 -3
  693. package/dist/products/validators/joi-validators/update.dataValue.validator.js +0 -103
  694. package/dist/products/validators/joi-validators/update.dataValue.validator.js.map +0 -1
  695. package/dist/products/validators/joi-validators/update.productApp.validator.d.ts +0 -3
  696. package/dist/products/validators/joi-validators/update.productApp.validator.js +0 -42
  697. package/dist/products/validators/joi-validators/update.productApp.validator.js.map +0 -1
  698. package/dist/products/validators/joi-validators/update.productCache.validator.d.ts +0 -3
  699. package/dist/products/validators/joi-validators/update.productCache.validator.js +0 -45
  700. package/dist/products/validators/joi-validators/update.productCache.validator.js.map +0 -1
  701. package/dist/products/validators/joi-validators/update.productDatabase.validator.d.ts +0 -3
  702. package/dist/products/validators/joi-validators/update.productDatabase.validator.js +0 -76
  703. package/dist/products/validators/joi-validators/update.productDatabase.validator.js.map +0 -1
  704. package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.d.ts +0 -3
  705. package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js +0 -79
  706. package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js.map +0 -1
  707. package/dist/products/validators/joi-validators/update.productDatabaseMigration.validator.d.ts +0 -4
  708. package/dist/products/validators/joi-validators/update.productDatabaseMigration.validator.js +0 -64
  709. package/dist/products/validators/joi-validators/update.productDatabaseMigration.validator.js.map +0 -1
  710. package/dist/products/validators/joi-validators/update.productEnv.validator.d.ts +0 -3
  711. package/dist/products/validators/joi-validators/update.productEnv.validator.js +0 -46
  712. package/dist/products/validators/joi-validators/update.productEnv.validator.js.map +0 -1
  713. package/dist/products/validators/joi-validators/update.productFallback.validator.d.ts +0 -3
  714. package/dist/products/validators/joi-validators/update.productFallback.validator.js +0 -60
  715. package/dist/products/validators/joi-validators/update.productFallback.validator.js.map +0 -1
  716. package/dist/products/validators/joi-validators/update.productFeature.validator.d.ts +0 -3
  717. package/dist/products/validators/joi-validators/update.productFeature.validator.js +0 -53
  718. package/dist/products/validators/joi-validators/update.productFeature.validator.js.map +0 -1
  719. package/dist/products/validators/joi-validators/update.productFunction.validator.d.ts +0 -3
  720. package/dist/products/validators/joi-validators/update.productFunction.validator.js +0 -41
  721. package/dist/products/validators/joi-validators/update.productFunction.validator.js.map +0 -1
  722. package/dist/products/validators/joi-validators/update.productGraph.validator.d.ts +0 -3
  723. package/dist/products/validators/joi-validators/update.productGraph.validator.js +0 -88
  724. package/dist/products/validators/joi-validators/update.productGraph.validator.js.map +0 -1
  725. package/dist/products/validators/joi-validators/update.productJob.validator.d.ts +0 -3
  726. package/dist/products/validators/joi-validators/update.productJob.validator.js +0 -50
  727. package/dist/products/validators/joi-validators/update.productJob.validator.js.map +0 -1
  728. package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.d.ts +0 -3
  729. package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js +0 -52
  730. package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js.map +0 -1
  731. package/dist/products/validators/joi-validators/update.productNotification.validator.d.ts +0 -3
  732. package/dist/products/validators/joi-validators/update.productNotification.validator.js +0 -47
  733. package/dist/products/validators/joi-validators/update.productNotification.validator.js.map +0 -1
  734. package/dist/products/validators/joi-validators/update.productNotificationMessage.validator.d.ts +0 -3
  735. package/dist/products/validators/joi-validators/update.productNotificationMessage.validator.js +0 -58
  736. package/dist/products/validators/joi-validators/update.productNotificationMessage.validator.js.map +0 -1
  737. package/dist/products/validators/joi-validators/update.productQuota.validator.d.ts +0 -3
  738. package/dist/products/validators/joi-validators/update.productQuota.validator.js +0 -64
  739. package/dist/products/validators/joi-validators/update.productQuota.validator.js.map +0 -1
  740. package/dist/products/validators/joi-validators/update.userAuth.validator.d.ts +0 -3
  741. package/dist/products/validators/joi-validators/update.userAuth.validator.js +0 -48
  742. package/dist/products/validators/joi-validators/update.userAuth.validator.js.map +0 -1
  743. package/dist/resilience/fallback.service.d.ts +0 -141
  744. package/dist/resilience/fallback.service.js +0 -766
  745. package/dist/resilience/fallback.service.js.map +0 -1
  746. package/dist/resilience/healthcheck.service.d.ts +0 -163
  747. package/dist/resilience/healthcheck.service.js +0 -1012
  748. package/dist/resilience/healthcheck.service.js.map +0 -1
  749. package/dist/resilience/index.d.ts +0 -104
  750. package/dist/resilience/index.js +0 -140
  751. package/dist/resilience/index.js.map +0 -1
  752. package/dist/resilience/quota.service.d.ts +0 -83
  753. package/dist/resilience/quota.service.js +0 -518
  754. package/dist/resilience/quota.service.js.map +0 -1
  755. package/dist/resilience/resilience.service.d.ts +0 -98
  756. package/dist/resilience/resilience.service.js +0 -560
  757. package/dist/resilience/resilience.service.js.map +0 -1
  758. package/dist/resilience/types/index.d.ts +0 -513
  759. package/dist/resilience/types/index.js +0 -29
  760. package/dist/resilience/types/index.js.map +0 -1
  761. package/dist/secrets/index.d.ts +0 -10
  762. package/dist/secrets/index.js +0 -33
  763. package/dist/secrets/index.js.map +0 -1
  764. package/dist/secrets/secrets.resolver.d.ts +0 -52
  765. package/dist/secrets/secrets.resolver.js +0 -236
  766. package/dist/secrets/secrets.resolver.js.map +0 -1
  767. package/dist/secrets/secrets.service.d.ts +0 -93
  768. package/dist/secrets/secrets.service.js +0 -246
  769. package/dist/secrets/secrets.service.js.map +0 -1
  770. package/dist/secrets/secrets.types.d.ts +0 -188
  771. package/dist/secrets/secrets.types.js +0 -87
  772. package/dist/secrets/secrets.types.js.map +0 -1
  773. package/dist/sessions/index.d.ts +0 -50
  774. package/dist/sessions/index.js +0 -96
  775. package/dist/sessions/index.js.map +0 -1
  776. package/dist/sessions/sessions.helper.d.ts +0 -88
  777. package/dist/sessions/sessions.helper.js +0 -190
  778. package/dist/sessions/sessions.helper.js.map +0 -1
  779. package/dist/sessions/sessions.resolver.d.ts +0 -188
  780. package/dist/sessions/sessions.resolver.js +0 -603
  781. package/dist/sessions/sessions.resolver.js.map +0 -1
  782. package/dist/sessions/sessions.service.d.ts +0 -194
  783. package/dist/sessions/sessions.service.js +0 -988
  784. package/dist/sessions/sessions.service.js.map +0 -1
  785. package/dist/sessions/types/index.d.ts +0 -344
  786. package/dist/sessions/types/index.js +0 -6
  787. package/dist/sessions/types/index.js.map +0 -1
  788. package/dist/storage/index.d.ts +0 -66
  789. package/dist/storage/index.js +0 -99
  790. package/dist/storage/index.js.map +0 -1
  791. package/dist/storage/storage.service.d.ts +0 -177
  792. package/dist/storage/storage.service.js +0 -905
  793. package/dist/storage/storage.service.js.map +0 -1
  794. package/dist/storage/types/index.d.ts +0 -270
  795. package/dist/storage/types/index.js +0 -6
  796. package/dist/storage/types/index.js.map +0 -1
  797. package/dist/storage/utils/storage.util.d.ts +0 -62
  798. package/dist/storage/utils/storage.util.js +0 -593
  799. package/dist/storage/utils/storage.util.js.map +0 -1
  800. package/dist/types/actions.types.d.ts +0 -0
  801. package/dist/types/actions.types.js +0 -1
  802. package/dist/types/actions.types.js.map +0 -1
  803. package/dist/types/appBuilder.types.d.ts +0 -316
  804. package/dist/types/appBuilder.types.js +0 -3
  805. package/dist/types/appBuilder.types.js.map +0 -1
  806. package/dist/types/database.types.d.ts +0 -9
  807. package/dist/types/database.types.js +0 -3
  808. package/dist/types/database.types.js.map +0 -1
  809. package/dist/types/enums.d.ts +0 -231
  810. package/dist/types/enums.js +0 -261
  811. package/dist/types/enums.js.map +0 -1
  812. package/dist/types/index.d.ts +0 -12
  813. package/dist/types/index.js +0 -29
  814. package/dist/types/index.js.map +0 -1
  815. package/dist/types/index.types.d.ts +0 -30
  816. package/dist/types/index.types.js +0 -9
  817. package/dist/types/index.types.js.map +0 -1
  818. package/dist/types/inputs.types.d.ts +0 -114
  819. package/dist/types/inputs.types.js +0 -44
  820. package/dist/types/inputs.types.js.map +0 -1
  821. package/dist/types/logs.types.d.ts +0 -19
  822. package/dist/types/logs.types.js +0 -8
  823. package/dist/types/logs.types.js.map +0 -1
  824. package/dist/types/pricing.types.d.ts +0 -4
  825. package/dist/types/pricing.types.js +0 -3
  826. package/dist/types/pricing.types.js.map +0 -1
  827. package/dist/types/processor.types.d.ts +0 -602
  828. package/dist/types/processor.types.js +0 -19
  829. package/dist/types/processor.types.js.map +0 -1
  830. package/dist/types/productsBuilder.types.d.ts +0 -1566
  831. package/dist/types/productsBuilder.types.js +0 -303
  832. package/dist/types/productsBuilder.types.js.map +0 -1
  833. package/dist/types/request-tracker.interface.d.ts +0 -0
  834. package/dist/types/request-tracker.interface.js +0 -1
  835. package/dist/types/request-tracker.interface.js.map +0 -1
  836. package/dist/types/requests.types.d.ts +0 -8
  837. package/dist/types/requests.types.js +0 -3
  838. package/dist/types/requests.types.js.map +0 -1
  839. package/dist/types/workspaces.types.d.ts +0 -28
  840. package/dist/types/workspaces.types.js +0 -4
  841. package/dist/types/workspaces.types.js.map +0 -1
  842. package/dist/utils/constants.d.ts +0 -1
  843. package/dist/utils/constants.js +0 -5
  844. package/dist/utils/constants.js.map +0 -1
  845. package/dist/utils/index.d.ts +0 -2
  846. package/dist/utils/index.js +0 -109
  847. package/dist/utils/index.js.map +0 -1
  848. package/dist/vector/actions/action-manager.d.ts +0 -140
  849. package/dist/vector/actions/action-manager.js +0 -356
  850. package/dist/vector/actions/action-manager.js.map +0 -1
  851. package/dist/vector/adapters/base.adapter.d.ts +0 -169
  852. package/dist/vector/adapters/base.adapter.js +0 -218
  853. package/dist/vector/adapters/base.adapter.js.map +0 -1
  854. package/dist/vector/adapters/index.d.ts +0 -10
  855. package/dist/vector/adapters/index.js +0 -19
  856. package/dist/vector/adapters/index.js.map +0 -1
  857. package/dist/vector/adapters/memory.adapter.d.ts +0 -85
  858. package/dist/vector/adapters/memory.adapter.js +0 -505
  859. package/dist/vector/adapters/memory.adapter.js.map +0 -1
  860. package/dist/vector/adapters/pinecone.adapter.d.ts +0 -52
  861. package/dist/vector/adapters/pinecone.adapter.js +0 -433
  862. package/dist/vector/adapters/pinecone.adapter.js.map +0 -1
  863. package/dist/vector/adapters/qdrant.adapter.d.ts +0 -56
  864. package/dist/vector/adapters/qdrant.adapter.js +0 -442
  865. package/dist/vector/adapters/qdrant.adapter.js.map +0 -1
  866. package/dist/vector/adapters/weaviate.adapter.d.ts +0 -68
  867. package/dist/vector/adapters/weaviate.adapter.js +0 -661
  868. package/dist/vector/adapters/weaviate.adapter.js.map +0 -1
  869. package/dist/vector/index.d.ts +0 -36
  870. package/dist/vector/index.js +0 -70
  871. package/dist/vector/index.js.map +0 -1
  872. package/dist/vector/types/action.interface.d.ts +0 -195
  873. package/dist/vector/types/action.interface.js +0 -100
  874. package/dist/vector/types/action.interface.js.map +0 -1
  875. package/dist/vector/types/connection.interface.d.ts +0 -151
  876. package/dist/vector/types/connection.interface.js +0 -8
  877. package/dist/vector/types/connection.interface.js.map +0 -1
  878. package/dist/vector/types/embedding.interface.d.ts +0 -144
  879. package/dist/vector/types/embedding.interface.js +0 -8
  880. package/dist/vector/types/embedding.interface.js.map +0 -1
  881. package/dist/vector/types/enums.d.ts +0 -104
  882. package/dist/vector/types/enums.js +0 -113
  883. package/dist/vector/types/enums.js.map +0 -1
  884. package/dist/vector/types/index.d.ts +0 -11
  885. package/dist/vector/types/index.js +0 -23
  886. package/dist/vector/types/index.js.map +0 -1
  887. package/dist/vector/types/vector.interface.d.ts +0 -315
  888. package/dist/vector/types/vector.interface.js +0 -8
  889. package/dist/vector/types/vector.interface.js.map +0 -1
  890. package/dist/vector/utils/index.d.ts +0 -6
  891. package/dist/vector/utils/index.js +0 -11
  892. package/dist/vector/utils/index.js.map +0 -1
  893. package/dist/vector/utils/vector-error.d.ts +0 -69
  894. package/dist/vector/utils/vector-error.js +0 -116
  895. package/dist/vector/utils/vector-error.js.map +0 -1
  896. package/dist/vector/vector-database.service.d.ts +0 -484
  897. package/dist/vector/vector-database.service.js +0 -1002
  898. package/dist/vector/vector-database.service.js.map +0 -1
  899. package/dist/vector/vector.service.d.ts +0 -283
  900. package/dist/vector/vector.service.js +0 -544
  901. package/dist/vector/vector.service.js.map +0 -1
  902. package/dist/warehouse/executor/index.d.ts +0 -5
  903. package/dist/warehouse/executor/index.js +0 -12
  904. package/dist/warehouse/executor/index.js.map +0 -1
  905. package/dist/warehouse/executor/joins/index.d.ts +0 -5
  906. package/dist/warehouse/executor/joins/index.js +0 -11
  907. package/dist/warehouse/executor/joins/index.js.map +0 -1
  908. package/dist/warehouse/executor/joins/join-executor.d.ts +0 -101
  909. package/dist/warehouse/executor/joins/join-executor.js +0 -493
  910. package/dist/warehouse/executor/joins/join-executor.js.map +0 -1
  911. package/dist/warehouse/executor/joins/semantic-join.d.ts +0 -64
  912. package/dist/warehouse/executor/joins/semantic-join.js +0 -241
  913. package/dist/warehouse/executor/joins/semantic-join.js.map +0 -1
  914. package/dist/warehouse/executor/single-source-executor.d.ts +0 -155
  915. package/dist/warehouse/executor/single-source-executor.js +0 -573
  916. package/dist/warehouse/executor/single-source-executor.js.map +0 -1
  917. package/dist/warehouse/index.d.ts +0 -79
  918. package/dist/warehouse/index.js +0 -111
  919. package/dist/warehouse/index.js.map +0 -1
  920. package/dist/warehouse/parser/index.d.ts +0 -4
  921. package/dist/warehouse/parser/index.js +0 -10
  922. package/dist/warehouse/parser/index.js.map +0 -1
  923. package/dist/warehouse/parser/query-parser.d.ts +0 -181
  924. package/dist/warehouse/parser/query-parser.js +0 -415
  925. package/dist/warehouse/parser/query-parser.js.map +0 -1
  926. package/dist/warehouse/registry/data-source-registry.d.ts +0 -207
  927. package/dist/warehouse/registry/data-source-registry.js +0 -396
  928. package/dist/warehouse/registry/data-source-registry.js.map +0 -1
  929. package/dist/warehouse/registry/index.d.ts +0 -4
  930. package/dist/warehouse/registry/index.js +0 -9
  931. package/dist/warehouse/registry/index.js.map +0 -1
  932. package/dist/warehouse/transactions/index.d.ts +0 -4
  933. package/dist/warehouse/transactions/index.js +0 -9
  934. package/dist/warehouse/transactions/index.js.map +0 -1
  935. package/dist/warehouse/transactions/saga-orchestrator.d.ts +0 -92
  936. package/dist/warehouse/transactions/saga-orchestrator.js +0 -383
  937. package/dist/warehouse/transactions/saga-orchestrator.js.map +0 -1
  938. package/dist/warehouse/types/index.d.ts +0 -9
  939. package/dist/warehouse/types/index.js +0 -33
  940. package/dist/warehouse/types/index.js.map +0 -1
  941. package/dist/warehouse/types/join.interface.d.ts +0 -225
  942. package/dist/warehouse/types/join.interface.js +0 -87
  943. package/dist/warehouse/types/join.interface.js.map +0 -1
  944. package/dist/warehouse/types/query.interface.d.ts +0 -232
  945. package/dist/warehouse/types/query.interface.js +0 -9
  946. package/dist/warehouse/types/query.interface.js.map +0 -1
  947. package/dist/warehouse/types/transaction.interface.d.ts +0 -236
  948. package/dist/warehouse/types/transaction.interface.js +0 -74
  949. package/dist/warehouse/types/transaction.interface.js.map +0 -1
  950. package/dist/warehouse/types/where.interface.d.ts +0 -208
  951. package/dist/warehouse/types/where.interface.js +0 -89
  952. package/dist/warehouse/types/where.interface.js.map +0 -1
  953. package/dist/warehouse/warehouse.service.d.ts +0 -200
  954. package/dist/warehouse/warehouse.service.js +0 -470
  955. package/dist/warehouse/warehouse.service.js.map +0 -1
  956. package/dist/workflows/index.d.ts +0 -30
  957. package/dist/workflows/index.js +0 -64
  958. package/dist/workflows/index.js.map +0 -1
  959. package/dist/workflows/types/index.d.ts +0 -6
  960. package/dist/workflows/types/index.js +0 -23
  961. package/dist/workflows/types/index.js.map +0 -1
  962. package/dist/workflows/types/workflows.types.d.ts +0 -1095
  963. package/dist/workflows/types/workflows.types.js +0 -13
  964. package/dist/workflows/types/workflows.types.js.map +0 -1
  965. package/dist/workflows/workflow-builder.d.ts +0 -70
  966. package/dist/workflows/workflow-builder.js +0 -353
  967. package/dist/workflows/workflow-builder.js.map +0 -1
  968. package/dist/workflows/workflow-executor.d.ts +0 -289
  969. package/dist/workflows/workflow-executor.js +0 -2467
  970. package/dist/workflows/workflow-executor.js.map +0 -1
  971. package/dist/workflows/workflows.service.d.ts +0 -412
  972. package/dist/workflows/workflows.service.js +0 -2233
  973. package/dist/workflows/workflows.service.js.map +0 -1
@@ -1,1588 +0,0 @@
1
- "use strict";
2
- /**
3
- * ArangoDB Graph Database Adapter
4
- *
5
- * Implements the BaseGraphAdapter for ArangoDB.
6
- * ArangoDB is a multi-model database that supports documents, graphs, and key-value.
7
- * Uses AQL (ArangoDB Query Language) for graph operations.
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || (function () {
26
- var ownKeys = function(o) {
27
- ownKeys = Object.getOwnPropertyNames || function (o) {
28
- var ar = [];
29
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
- return ar;
31
- };
32
- return ownKeys(o);
33
- };
34
- return function (mod) {
35
- if (mod && mod.__esModule) return mod;
36
- var result = {};
37
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
- __setModuleDefault(result, mod);
39
- return result;
40
- };
41
- })();
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.ArangoDBAdapter = void 0;
44
- const base_adapter_1 = require("./base.adapter");
45
- const enums_1 = require("../types/enums");
46
- const graph_error_1 = require("../utils/graph-error");
47
- /**
48
- * ArangoDB adapter using arangojs
49
- */
50
- class ArangoDBAdapter extends base_adapter_1.BaseGraphAdapter {
51
- constructor() {
52
- super(...arguments);
53
- this.graphType = enums_1.GraphType.ARANGODB;
54
- this.supportedFeatures = new Set([
55
- enums_1.GraphFeature.TRANSACTIONS,
56
- enums_1.GraphFeature.SCHEMA_INDEXES,
57
- enums_1.GraphFeature.FULL_TEXT_SEARCH,
58
- enums_1.GraphFeature.MULTI_TENANCY,
59
- ]);
60
- this.db = null;
61
- this.graph = null;
62
- this.graphName = '';
63
- this.vertexCollections = [];
64
- this.edgeCollections = [];
65
- }
66
- /**
67
- * Connect to ArangoDB
68
- */
69
- async connect(options) {
70
- var _a;
71
- try {
72
- // Store connection options for reconnection
73
- this.connectionOptions = options;
74
- // Dynamically import arangojs
75
- const arangojs = await Promise.resolve().then(() => __importStar(require('arangojs')));
76
- const { Database } = arangojs;
77
- this.db = new Database({
78
- url: options.connectionUrl,
79
- databaseName: options.database || '_system',
80
- });
81
- // If graph name is provided, get the graph
82
- if (options.graphName) {
83
- this.graphName = options.graphName;
84
- this.graph = this.db.graph(options.graphName);
85
- // Get graph info
86
- const graphInfo = await this.graph.get();
87
- this.vertexCollections = graphInfo.orphanCollections || [];
88
- this.edgeCollections = ((_a = graphInfo.edgeDefinitions) === null || _a === void 0 ? void 0 : _a.map((ed) => ed.collection)) || [];
89
- // Add vertex collections from edge definitions
90
- for (const ed of graphInfo.edgeDefinitions || []) {
91
- this.vertexCollections.push(...ed.from, ...ed.to);
92
- }
93
- this.vertexCollections = [...new Set(this.vertexCollections)];
94
- }
95
- this.client = this.db;
96
- this.connected = true;
97
- return {
98
- connected: true,
99
- type: this.graphType,
100
- version: await this.getVersion(),
101
- };
102
- }
103
- catch (error) {
104
- this.connected = false;
105
- throw graph_error_1.GraphError.connectionError(`Failed to connect to ArangoDB: ${error.message}`);
106
- }
107
- }
108
- async getVersion() {
109
- try {
110
- const info = await this.db.version();
111
- return info.version;
112
- }
113
- catch (_a) {
114
- return 'unknown';
115
- }
116
- }
117
- /**
118
- * Disconnect from ArangoDB
119
- */
120
- async disconnect() {
121
- if (this.db) {
122
- this.db = null;
123
- this.graph = null;
124
- this.client = null;
125
- this.connected = false;
126
- }
127
- }
128
- /**
129
- * Test ArangoDB connection
130
- */
131
- async testConnection(options) {
132
- try {
133
- await this.connect(options);
134
- const startTime = Date.now();
135
- const version = await this.getVersion();
136
- const latency = Date.now() - startTime;
137
- await this.disconnect();
138
- return {
139
- connected: true,
140
- type: this.graphType,
141
- version,
142
- latency,
143
- features: ['aql', 'multi-model', 'transactions'],
144
- };
145
- }
146
- catch (error) {
147
- return {
148
- connected: false,
149
- type: this.graphType,
150
- error: error.message,
151
- };
152
- }
153
- }
154
- // ==================== NODE OPERATIONS ====================
155
- async createNode(options, transaction) {
156
- this.ensureConnected();
157
- return this.executeWithRetry(async () => {
158
- try {
159
- const collectionName = options.labels[0];
160
- const collection = this.db.collection(collectionName);
161
- const doc = Object.assign(Object.assign({}, options.properties), { _labels: options.labels });
162
- const result = await collection.save(doc, { returnNew: true });
163
- const node = {
164
- id: result._key,
165
- labels: options.labels,
166
- properties: result.new,
167
- elementId: result._id,
168
- };
169
- return { node, created: true };
170
- }
171
- catch (error) {
172
- throw graph_error_1.GraphError.queryError(`Failed to create node: ${error.message}`);
173
- }
174
- });
175
- }
176
- async findNodes(options, transaction) {
177
- this.ensureConnected();
178
- return this.executeWithRetry(async () => {
179
- var _a, _b, _c, _d, _e;
180
- try {
181
- let aql = 'FOR doc IN @@collection';
182
- const bindVars = {};
183
- const collectionName = ((_a = options.labels) === null || _a === void 0 ? void 0 : _a[0]) || this.vertexCollections[0];
184
- bindVars['@collection'] = collectionName;
185
- if (options.where) {
186
- const { filterStr, filterVars } = this.buildArangoWhereClause(options.where, 'doc');
187
- if (filterStr) {
188
- aql += ` FILTER ${filterStr}`;
189
- Object.assign(bindVars, filterVars);
190
- }
191
- }
192
- if ((_b = options.orderBy) === null || _b === void 0 ? void 0 : _b.length) {
193
- const sortParts = options.orderBy.map((o) => `doc.${o.property} ${o.direction || 'ASC'}`);
194
- aql += ` SORT ${sortParts.join(', ')}`;
195
- }
196
- const skipValue = (_d = (_c = options.skip) !== null && _c !== void 0 ? _c : options.offset) !== null && _d !== void 0 ? _d : 0;
197
- const limitValue = (_e = options.limit) !== null && _e !== void 0 ? _e : 100;
198
- aql += ` LIMIT ${skipValue}, ${limitValue}`;
199
- aql += ' RETURN doc';
200
- const cursor = await this.db.query(aql, bindVars);
201
- const docs = await cursor.all();
202
- const nodes = docs.map((doc) => ({
203
- id: doc._key,
204
- labels: doc._labels || [collectionName],
205
- properties: this.cleanArangoProps(doc),
206
- elementId: doc._id,
207
- }));
208
- const countAql = `RETURN LENGTH(FOR doc IN @@collection ${options.where ? `FILTER ${this.buildArangoWhereClause(options.where, 'doc').filterStr}` : ''} RETURN 1)`;
209
- const countCursor = await this.db.query(countAql, { '@collection': collectionName });
210
- const [total] = await countCursor.all();
211
- return { nodes, total };
212
- }
213
- catch (error) {
214
- throw graph_error_1.GraphError.queryError(`Failed to find nodes: ${error.message}`);
215
- }
216
- });
217
- }
218
- async findNodeById(id, transaction) {
219
- this.ensureConnected();
220
- return this.executeWithRetry(async () => {
221
- try {
222
- const docId = String(id).includes('/') ? id : null;
223
- if (!docId) {
224
- for (const collName of this.vertexCollections) {
225
- try {
226
- const collection = this.db.collection(collName);
227
- const doc = await collection.document(id);
228
- return {
229
- id: doc._key,
230
- labels: doc._labels || [collName],
231
- properties: this.cleanArangoProps(doc),
232
- elementId: doc._id,
233
- };
234
- }
235
- catch (_a) {
236
- continue;
237
- }
238
- }
239
- return null;
240
- }
241
- const [collName] = String(docId).split('/');
242
- const collection = this.db.collection(collName);
243
- const doc = await collection.document(docId);
244
- return {
245
- id: doc._key,
246
- labels: doc._labels || [collName],
247
- properties: this.cleanArangoProps(doc),
248
- elementId: doc._id,
249
- };
250
- }
251
- catch (error) {
252
- if (error.code === 404) {
253
- return null;
254
- }
255
- throw graph_error_1.GraphError.queryError(`Failed to find node by ID: ${error.message}`);
256
- }
257
- });
258
- }
259
- async updateNode(options, transaction) {
260
- this.ensureConnected();
261
- return this.executeWithRetry(async () => {
262
- try {
263
- const docId = String(options.id);
264
- const [collName] = docId.includes('/') ? docId.split('/') : [this.vertexCollections[0]];
265
- const collection = this.db.collection(collName);
266
- const key = docId.includes('/') ? docId.split('/')[1] : docId;
267
- let updateData = {};
268
- if (options.properties) {
269
- if ('$SET' in options.properties) {
270
- updateData = Object.assign(Object.assign({}, updateData), options.properties.$SET);
271
- }
272
- if ('$UNSET' in options.properties) {
273
- for (const prop of options.properties.$UNSET || []) {
274
- updateData[prop] = null;
275
- }
276
- }
277
- if ('$INCREMENT' in options.properties) {
278
- for (const [prop, value] of Object.entries(options.properties.$INCREMENT || {})) {
279
- const current = await collection.document(key);
280
- updateData[prop] = (current[prop] || 0) + value;
281
- }
282
- }
283
- if ('$APPEND' in options.properties) {
284
- for (const [prop, value] of Object.entries(options.properties.$APPEND || {})) {
285
- const current = await collection.document(key);
286
- updateData[prop] = [...(current[prop] || []), value];
287
- }
288
- }
289
- }
290
- const result = await collection.update(key, updateData, { returnNew: true });
291
- const node = {
292
- id: result._key,
293
- labels: result.new._labels || [collName],
294
- properties: this.cleanArangoProps(result.new),
295
- elementId: result._id,
296
- };
297
- return { node, updated: true };
298
- }
299
- catch (error) {
300
- throw graph_error_1.GraphError.queryError(`Failed to update node: ${error.message}`);
301
- }
302
- });
303
- }
304
- async deleteNode(options, transaction) {
305
- this.ensureConnected();
306
- return this.executeWithRetry(async () => {
307
- try {
308
- const docId = String(options.id);
309
- const [collName] = docId.includes('/') ? docId.split('/') : [this.vertexCollections[0]];
310
- const collection = this.db.collection(collName);
311
- const key = docId.includes('/') ? docId.split('/')[1] : docId;
312
- if (options.detach) {
313
- const fullId = docId.includes('/') ? docId : `${collName}/${key}`;
314
- for (const edgeCollName of this.edgeCollections) {
315
- await this.db.query(`FOR e IN @@collection FILTER e._from == @id OR e._to == @id REMOVE e IN @@collection`, { '@collection': edgeCollName, id: fullId });
316
- }
317
- }
318
- await collection.remove(key);
319
- return { deleted: true, id: options.id };
320
- }
321
- catch (error) {
322
- throw graph_error_1.GraphError.queryError(`Failed to delete node: ${error.message}`);
323
- }
324
- });
325
- }
326
- async mergeNode(options, transaction) {
327
- this.ensureConnected();
328
- return this.executeWithRetry(async () => {
329
- try {
330
- const collectionName = options.labels[0];
331
- const collection = this.db.collection(collectionName);
332
- const { filterStr, filterVars } = this.buildArangoWhereClause(options.matchProperties, 'doc');
333
- const findAql = `FOR doc IN @@collection FILTER ${filterStr} LIMIT 1 RETURN doc`;
334
- const cursor = await this.db.query(findAql, Object.assign({ '@collection': collectionName }, filterVars));
335
- const existing = await cursor.all();
336
- if (existing.length > 0) {
337
- const doc = existing[0];
338
- const updateData = options.onMatch || {};
339
- const result = await collection.update(doc._key, updateData, { returnNew: true });
340
- return {
341
- node: {
342
- id: result._key,
343
- labels: options.labels,
344
- properties: this.cleanArangoProps(result.new),
345
- elementId: result._id,
346
- },
347
- created: false,
348
- merged: true,
349
- };
350
- }
351
- else {
352
- const createData = Object.assign(Object.assign(Object.assign({}, options.matchProperties), (options.onCreate || {})), { _labels: options.labels });
353
- const result = await collection.save(createData, { returnNew: true });
354
- return {
355
- node: {
356
- id: result._key,
357
- labels: options.labels,
358
- properties: this.cleanArangoProps(result.new),
359
- elementId: result._id,
360
- },
361
- created: true,
362
- merged: true,
363
- };
364
- }
365
- }
366
- catch (error) {
367
- throw graph_error_1.GraphError.queryError(`Failed to merge node: ${error.message}`);
368
- }
369
- });
370
- }
371
- // ==================== LABEL MANAGEMENT ====================
372
- async addLabels(options, _transaction) {
373
- this.ensureConnected();
374
- return this.executeWithRetry(async () => {
375
- try {
376
- // In ArangoDB, we store labels in a _labels array property
377
- // First, find the document
378
- const docId = String(options.id);
379
- const isFullId = docId.includes('/');
380
- let doc;
381
- if (isFullId) {
382
- const [collectionName, key] = docId.split('/');
383
- const collection = this.db.collection(collectionName);
384
- doc = await collection.document(key);
385
- }
386
- else {
387
- // Search across vertex collections
388
- for (const collectionName of this.vertexCollections) {
389
- try {
390
- const collection = this.db.collection(collectionName);
391
- doc = await collection.document(docId);
392
- break;
393
- }
394
- catch (_a) {
395
- continue;
396
- }
397
- }
398
- }
399
- if (!doc) {
400
- throw graph_error_1.GraphError.notFoundError(`Node with ID ${options.id} not found`);
401
- }
402
- const existingLabels = doc._labels || [];
403
- const newLabels = [...new Set([...existingLabels, ...options.labels])];
404
- const [collectionName] = doc._id.split('/');
405
- const collection = this.db.collection(collectionName);
406
- const result = await collection.update(doc._key, { _labels: newLabels }, { returnNew: true });
407
- return {
408
- node: {
409
- id: result._key,
410
- labels: newLabels,
411
- properties: this.cleanArangoProps(result.new),
412
- elementId: result._id,
413
- },
414
- addedLabels: options.labels,
415
- };
416
- }
417
- catch (error) {
418
- if (error instanceof graph_error_1.GraphError)
419
- throw error;
420
- throw graph_error_1.GraphError.queryError(`Failed to add labels: ${error.message}`);
421
- }
422
- });
423
- }
424
- async removeLabels(options, _transaction) {
425
- this.ensureConnected();
426
- return this.executeWithRetry(async () => {
427
- try {
428
- const docId = String(options.id);
429
- const isFullId = docId.includes('/');
430
- let doc;
431
- if (isFullId) {
432
- const [collectionName, key] = docId.split('/');
433
- const collection = this.db.collection(collectionName);
434
- doc = await collection.document(key);
435
- }
436
- else {
437
- for (const collectionName of this.vertexCollections) {
438
- try {
439
- const collection = this.db.collection(collectionName);
440
- doc = await collection.document(docId);
441
- break;
442
- }
443
- catch (_a) {
444
- continue;
445
- }
446
- }
447
- }
448
- if (!doc) {
449
- throw graph_error_1.GraphError.notFoundError(`Node with ID ${options.id} not found`);
450
- }
451
- const existingLabels = doc._labels || [];
452
- const newLabels = existingLabels.filter(l => !options.labels.includes(l));
453
- const [collectionName] = doc._id.split('/');
454
- const collection = this.db.collection(collectionName);
455
- const result = await collection.update(doc._key, { _labels: newLabels }, { returnNew: true });
456
- return {
457
- node: {
458
- id: result._key,
459
- labels: newLabels,
460
- properties: this.cleanArangoProps(result.new),
461
- elementId: result._id,
462
- },
463
- removedLabels: options.labels,
464
- };
465
- }
466
- catch (error) {
467
- if (error instanceof graph_error_1.GraphError)
468
- throw error;
469
- throw graph_error_1.GraphError.queryError(`Failed to remove labels: ${error.message}`);
470
- }
471
- });
472
- }
473
- async setLabels(options, _transaction) {
474
- this.ensureConnected();
475
- return this.executeWithRetry(async () => {
476
- try {
477
- const docId = String(options.id);
478
- const isFullId = docId.includes('/');
479
- let doc;
480
- if (isFullId) {
481
- const [collectionName, key] = docId.split('/');
482
- const collection = this.db.collection(collectionName);
483
- doc = await collection.document(key);
484
- }
485
- else {
486
- for (const collectionName of this.vertexCollections) {
487
- try {
488
- const collection = this.db.collection(collectionName);
489
- doc = await collection.document(docId);
490
- break;
491
- }
492
- catch (_a) {
493
- continue;
494
- }
495
- }
496
- }
497
- if (!doc) {
498
- throw graph_error_1.GraphError.notFoundError(`Node with ID ${options.id} not found`);
499
- }
500
- const previousLabels = doc._labels || [];
501
- const [collectionName] = doc._id.split('/');
502
- const collection = this.db.collection(collectionName);
503
- const result = await collection.update(doc._key, { _labels: options.labels }, { returnNew: true });
504
- return {
505
- node: {
506
- id: result._key,
507
- labels: options.labels,
508
- properties: this.cleanArangoProps(result.new),
509
- elementId: result._id,
510
- },
511
- previousLabels,
512
- newLabels: options.labels,
513
- };
514
- }
515
- catch (error) {
516
- if (error instanceof graph_error_1.GraphError)
517
- throw error;
518
- throw graph_error_1.GraphError.queryError(`Failed to set labels: ${error.message}`);
519
- }
520
- });
521
- }
522
- // ==================== RELATIONSHIP OPERATIONS ====================
523
- async createRelationship(options, transaction) {
524
- this.ensureConnected();
525
- return this.executeWithRetry(async () => {
526
- try {
527
- const edgeCollectionName = options.type;
528
- const edgeCollection = this.db.collection(edgeCollectionName);
529
- const fromId = String(options.startNodeId).includes('/')
530
- ? options.startNodeId
531
- : await this.resolveNodeId(options.startNodeId);
532
- const toId = String(options.endNodeId).includes('/')
533
- ? options.endNodeId
534
- : await this.resolveNodeId(options.endNodeId);
535
- const edgeDoc = Object.assign({ _from: fromId, _to: toId }, options.properties);
536
- const result = await edgeCollection.save(edgeDoc, { returnNew: true });
537
- const relationship = {
538
- id: result._key,
539
- type: options.type,
540
- startNodeId: fromId,
541
- endNodeId: toId,
542
- properties: this.cleanArangoProps(result.new),
543
- elementId: result._id,
544
- };
545
- return { relationship, created: true };
546
- }
547
- catch (error) {
548
- throw graph_error_1.GraphError.queryError(`Failed to create relationship: ${error.message}`);
549
- }
550
- });
551
- }
552
- async findRelationships(options, transaction) {
553
- this.ensureConnected();
554
- return this.executeWithRetry(async () => {
555
- var _a, _b, _c, _d;
556
- try {
557
- const edgeCollectionName = ((_a = options.types) === null || _a === void 0 ? void 0 : _a[0]) || (Array.isArray(options.type) ? options.type[0] : options.type) || this.edgeCollections[0];
558
- let aql = 'FOR edge IN @@collection';
559
- const bindVars = { '@collection': edgeCollectionName };
560
- if (options.where) {
561
- const { filterStr, filterVars } = this.buildArangoWhereClause(options.where, 'edge');
562
- if (filterStr) {
563
- aql += ` FILTER ${filterStr}`;
564
- Object.assign(bindVars, filterVars);
565
- }
566
- }
567
- const skipValue = (_c = (_b = options.skip) !== null && _b !== void 0 ? _b : options.offset) !== null && _c !== void 0 ? _c : 0;
568
- const limitValue = (_d = options.limit) !== null && _d !== void 0 ? _d : 100;
569
- aql += ` LIMIT ${skipValue}, ${limitValue}`;
570
- aql += ' RETURN edge';
571
- const cursor = await this.db.query(aql, bindVars);
572
- const edges = await cursor.all();
573
- const relationships = edges.map((edge) => ({
574
- id: edge._key,
575
- type: edgeCollectionName,
576
- startNodeId: edge._from,
577
- endNodeId: edge._to,
578
- properties: this.cleanArangoProps(edge),
579
- elementId: edge._id,
580
- }));
581
- return { relationships, total: relationships.length };
582
- }
583
- catch (error) {
584
- throw graph_error_1.GraphError.queryError(`Failed to find relationships: ${error.message}`);
585
- }
586
- });
587
- }
588
- async findRelationshipById(id, transaction) {
589
- this.ensureConnected();
590
- return this.executeWithRetry(async () => {
591
- try {
592
- const docId = String(id);
593
- if (!docId.includes('/')) {
594
- for (const collName of this.edgeCollections) {
595
- try {
596
- const collection = this.db.collection(collName);
597
- const edge = await collection.document(id);
598
- return {
599
- id: edge._key,
600
- type: collName,
601
- startNodeId: edge._from,
602
- endNodeId: edge._to,
603
- properties: this.cleanArangoProps(edge),
604
- elementId: edge._id,
605
- };
606
- }
607
- catch (_a) {
608
- continue;
609
- }
610
- }
611
- return null;
612
- }
613
- const [collName] = docId.split('/');
614
- const collection = this.db.collection(collName);
615
- const edge = await collection.document(docId);
616
- return {
617
- id: edge._key,
618
- type: collName,
619
- startNodeId: edge._from,
620
- endNodeId: edge._to,
621
- properties: this.cleanArangoProps(edge),
622
- elementId: edge._id,
623
- };
624
- }
625
- catch (error) {
626
- if (error.code === 404) {
627
- return null;
628
- }
629
- throw graph_error_1.GraphError.queryError(`Failed to find relationship by ID: ${error.message}`);
630
- }
631
- });
632
- }
633
- async updateRelationship(options, transaction) {
634
- this.ensureConnected();
635
- return this.executeWithRetry(async () => {
636
- try {
637
- const docId = String(options.id);
638
- const [collName] = docId.includes('/') ? docId.split('/') : [this.edgeCollections[0]];
639
- const collection = this.db.collection(collName);
640
- const key = docId.includes('/') ? docId.split('/')[1] : docId;
641
- let updateData = {};
642
- if (options.properties) {
643
- if ('$SET' in options.properties) {
644
- updateData = Object.assign(Object.assign({}, updateData), options.properties.$SET);
645
- }
646
- }
647
- const result = await collection.update(key, updateData, { returnNew: true });
648
- const relationship = {
649
- id: result._key,
650
- type: collName,
651
- startNodeId: result.new._from,
652
- endNodeId: result.new._to,
653
- properties: this.cleanArangoProps(result.new),
654
- elementId: result._id,
655
- };
656
- return { relationship, updated: true };
657
- }
658
- catch (error) {
659
- throw graph_error_1.GraphError.queryError(`Failed to update relationship: ${error.message}`);
660
- }
661
- });
662
- }
663
- async deleteRelationship(options, transaction) {
664
- this.ensureConnected();
665
- return this.executeWithRetry(async () => {
666
- try {
667
- const docId = String(options.id);
668
- const [collName] = docId.includes('/') ? docId.split('/') : [this.edgeCollections[0]];
669
- const collection = this.db.collection(collName);
670
- const key = docId.includes('/') ? docId.split('/')[1] : docId;
671
- await collection.remove(key);
672
- return { deleted: true, id: options.id };
673
- }
674
- catch (error) {
675
- throw graph_error_1.GraphError.queryError(`Failed to delete relationship: ${error.message}`);
676
- }
677
- });
678
- }
679
- async mergeRelationship(options, transaction) {
680
- this.ensureConnected();
681
- return this.executeWithRetry(async () => {
682
- try {
683
- const edgeCollectionName = options.type;
684
- const fromId = String(options.startNodeId).includes('/')
685
- ? options.startNodeId
686
- : await this.resolveNodeId(options.startNodeId);
687
- const toId = String(options.endNodeId).includes('/')
688
- ? options.endNodeId
689
- : await this.resolveNodeId(options.endNodeId);
690
- let filterStr = 'edge._from == @from AND edge._to == @to';
691
- const bindVars = {
692
- '@collection': edgeCollectionName,
693
- from: fromId,
694
- to: toId,
695
- };
696
- if (options.matchProperties) {
697
- const { filterStr: matchFilter, filterVars } = this.buildArangoWhereClause(options.matchProperties, 'edge');
698
- if (matchFilter) {
699
- filterStr += ` AND ${matchFilter}`;
700
- Object.assign(bindVars, filterVars);
701
- }
702
- }
703
- const findAql = `FOR edge IN @@collection FILTER ${filterStr} LIMIT 1 RETURN edge`;
704
- const cursor = await this.db.query(findAql, bindVars);
705
- const existing = await cursor.all();
706
- if (existing.length > 0) {
707
- const edge = existing[0];
708
- const collection = this.db.collection(edgeCollectionName);
709
- const updateData = options.onMatch || {};
710
- const result = await collection.update(edge._key, updateData, { returnNew: true });
711
- return {
712
- relationship: {
713
- id: result._key,
714
- type: options.type,
715
- startNodeId: result.new._from,
716
- endNodeId: result.new._to,
717
- properties: this.cleanArangoProps(result.new),
718
- elementId: result._id,
719
- },
720
- created: false,
721
- merged: true,
722
- };
723
- }
724
- else {
725
- const createProps = Object.assign(Object.assign({}, options.matchProperties), (options.onCreate || {}));
726
- const result = await this.createRelationship({
727
- type: options.type,
728
- startNodeId: options.startNodeId,
729
- endNodeId: options.endNodeId,
730
- properties: createProps,
731
- });
732
- return { relationship: result.relationship, created: true, merged: true };
733
- }
734
- }
735
- catch (error) {
736
- throw graph_error_1.GraphError.queryError(`Failed to merge relationship: ${error.message}`);
737
- }
738
- });
739
- }
740
- // ==================== TRAVERSAL OPERATIONS ====================
741
- async traverse(options, transaction) {
742
- this.ensureConnected();
743
- return this.executeWithRetry(async () => {
744
- var _a;
745
- try {
746
- const startId = String(options.startNodeId).includes('/')
747
- ? options.startNodeId
748
- : await this.resolveNodeId(options.startNodeId);
749
- const direction = this.mapDirection(options.direction);
750
- const maxDepth = options.maxDepth || 3;
751
- const minDepth = 1;
752
- const edgeCollections = ((_a = options.relationshipTypes) === null || _a === void 0 ? void 0 : _a.length)
753
- ? options.relationshipTypes.join(', ')
754
- : this.edgeCollections.join(', ');
755
- const aql = `
756
- FOR v, e, p IN ${minDepth}..${maxDepth} ${direction} @startVertex
757
- ${edgeCollections}
758
- OPTIONS { bfs: true, uniqueVertices: 'global' }
759
- RETURN { vertex: v, edge: e, path: p }
760
- `;
761
- const cursor = await this.db.query(aql, { startVertex: startId });
762
- const results = await cursor.all();
763
- const nodesMap = new Map();
764
- const relationshipsMap = new Map();
765
- for (const result of results) {
766
- if (result.vertex) {
767
- const v = result.vertex;
768
- nodesMap.set(v._id, {
769
- id: v._key,
770
- labels: v._labels || [v._id.split('/')[0]],
771
- properties: this.cleanArangoProps(v),
772
- elementId: v._id,
773
- });
774
- }
775
- if (result.edge) {
776
- const e = result.edge;
777
- relationshipsMap.set(e._id, {
778
- id: e._key,
779
- type: e._id.split('/')[0],
780
- startNodeId: e._from,
781
- endNodeId: e._to,
782
- properties: this.cleanArangoProps(e),
783
- elementId: e._id,
784
- });
785
- }
786
- }
787
- return {
788
- nodes: Array.from(nodesMap.values()),
789
- relationships: Array.from(relationshipsMap.values()),
790
- paths: [],
791
- };
792
- }
793
- catch (error) {
794
- throw graph_error_1.GraphError.queryError(`Failed to traverse: ${error.message}`);
795
- }
796
- });
797
- }
798
- async shortestPath(options, transaction) {
799
- this.ensureConnected();
800
- return this.executeWithRetry(async () => {
801
- var _a;
802
- try {
803
- const startId = String(options.startNodeId).includes('/')
804
- ? options.startNodeId
805
- : await this.resolveNodeId(options.startNodeId);
806
- const endId = String(options.endNodeId).includes('/')
807
- ? options.endNodeId
808
- : await this.resolveNodeId(options.endNodeId);
809
- const edgeCollections = ((_a = options.relationshipTypes) === null || _a === void 0 ? void 0 : _a.length)
810
- ? options.relationshipTypes.join(', ')
811
- : this.edgeCollections.join(', ');
812
- let aql;
813
- if (options.weightProperty) {
814
- aql = `
815
- FOR v, e IN OUTBOUND SHORTEST_PATH @start TO @end
816
- ${edgeCollections}
817
- OPTIONS { weightAttribute: @weight }
818
- RETURN { vertex: v, edge: e }
819
- `;
820
- }
821
- else {
822
- aql = `
823
- FOR v, e IN OUTBOUND SHORTEST_PATH @start TO @end
824
- ${edgeCollections}
825
- RETURN { vertex: v, edge: e }
826
- `;
827
- }
828
- const cursor = await this.db.query(aql, {
829
- start: startId,
830
- end: endId,
831
- weight: options.weightProperty,
832
- });
833
- const results = await cursor.all();
834
- if (results.length === 0) {
835
- return { path: null, length: -1, found: false };
836
- }
837
- const nodes = [];
838
- const relationships = [];
839
- for (const result of results) {
840
- if (result.vertex) {
841
- nodes.push({
842
- id: result.vertex._key,
843
- labels: result.vertex._labels || [result.vertex._id.split('/')[0]],
844
- properties: this.cleanArangoProps(result.vertex),
845
- elementId: result.vertex._id,
846
- });
847
- }
848
- if (result.edge) {
849
- relationships.push({
850
- id: result.edge._key,
851
- type: result.edge._id.split('/')[0],
852
- startNodeId: result.edge._from,
853
- endNodeId: result.edge._to,
854
- properties: this.cleanArangoProps(result.edge),
855
- elementId: result.edge._id,
856
- });
857
- }
858
- }
859
- return {
860
- path: {
861
- nodes,
862
- relationships,
863
- length: relationships.length,
864
- },
865
- length: relationships.length,
866
- found: true,
867
- };
868
- }
869
- catch (error) {
870
- throw graph_error_1.GraphError.queryError(`Failed to find shortest path: ${error.message}`);
871
- }
872
- });
873
- }
874
- async allPaths(options, transaction) {
875
- this.ensureConnected();
876
- return this.executeWithRetry(async () => {
877
- var _a;
878
- try {
879
- const startId = String(options.startNodeId).includes('/')
880
- ? options.startNodeId
881
- : await this.resolveNodeId(options.startNodeId);
882
- const endId = String(options.endNodeId).includes('/')
883
- ? options.endNodeId
884
- : await this.resolveNodeId(options.endNodeId);
885
- const maxDepth = options.maxDepth || 5;
886
- const maxPaths = options.maxPaths || options.limit || 10;
887
- const edgeCollections = ((_a = options.relationshipTypes) === null || _a === void 0 ? void 0 : _a.length)
888
- ? options.relationshipTypes.join(', ')
889
- : this.edgeCollections.join(', ');
890
- const aql = `
891
- FOR p IN 1..@maxDepth OUTBOUND @start
892
- ${edgeCollections}
893
- PRUNE p.vertices[-1]._id == @end
894
- OPTIONS { bfs: false }
895
- FILTER p.vertices[-1]._id == @end
896
- LIMIT @maxPaths
897
- RETURN p
898
- `;
899
- const cursor = await this.db.query(aql, {
900
- start: startId,
901
- end: endId,
902
- maxDepth,
903
- maxPaths,
904
- });
905
- const pathResults = await cursor.all();
906
- const paths = pathResults.map((p) => {
907
- const nodes = p.vertices.map((v) => ({
908
- id: v._key,
909
- labels: v._labels || [v._id.split('/')[0]],
910
- properties: this.cleanArangoProps(v),
911
- elementId: v._id,
912
- }));
913
- const relationships = p.edges.map((e) => ({
914
- id: e._key,
915
- type: e._id.split('/')[0],
916
- startNodeId: e._from,
917
- endNodeId: e._to,
918
- properties: this.cleanArangoProps(e),
919
- elementId: e._id,
920
- }));
921
- return { nodes, relationships, length: relationships.length };
922
- });
923
- return { paths, total: paths.length };
924
- }
925
- catch (error) {
926
- throw graph_error_1.GraphError.queryError(`Failed to find all paths: ${error.message}`);
927
- }
928
- });
929
- }
930
- async getNeighborhood(options, transaction) {
931
- this.ensureConnected();
932
- return this.executeWithRetry(async () => {
933
- var _a;
934
- try {
935
- const nodeId = String(options.nodeId).includes('/')
936
- ? options.nodeId
937
- : await this.resolveNodeId(options.nodeId);
938
- const direction = this.mapDirection(options.direction);
939
- const depth = options.depth || 1;
940
- const edgeCollections = ((_a = options.relationshipTypes) === null || _a === void 0 ? void 0 : _a.length)
941
- ? options.relationshipTypes.join(', ')
942
- : this.edgeCollections.join(', ');
943
- let aql = `
944
- FOR v, e IN 1..@depth ${direction} @start
945
- ${edgeCollections}
946
- OPTIONS { uniqueVertices: 'global' }
947
- `;
948
- if (options.limit) {
949
- aql += ` LIMIT @limit`;
950
- }
951
- aql += ` RETURN { vertex: v, edge: e }`;
952
- const cursor = await this.db.query(aql, {
953
- start: nodeId,
954
- depth,
955
- limit: options.limit,
956
- });
957
- const results = await cursor.all();
958
- const nodesMap = new Map();
959
- const relationshipsMap = new Map();
960
- for (const result of results) {
961
- if (result.vertex) {
962
- nodesMap.set(result.vertex._id, {
963
- id: result.vertex._key,
964
- labels: result.vertex._labels || [result.vertex._id.split('/')[0]],
965
- properties: this.cleanArangoProps(result.vertex),
966
- elementId: result.vertex._id,
967
- });
968
- }
969
- if (result.edge) {
970
- relationshipsMap.set(result.edge._id, {
971
- id: result.edge._key,
972
- type: result.edge._id.split('/')[0],
973
- startNodeId: result.edge._from,
974
- endNodeId: result.edge._to,
975
- properties: this.cleanArangoProps(result.edge),
976
- elementId: result.edge._id,
977
- });
978
- }
979
- }
980
- return {
981
- nodes: Array.from(nodesMap.values()),
982
- relationships: Array.from(relationshipsMap.values()),
983
- depth,
984
- };
985
- }
986
- catch (error) {
987
- throw graph_error_1.GraphError.queryError(`Failed to get neighborhood: ${error.message}`);
988
- }
989
- });
990
- }
991
- async findConnectedComponents(options, transaction) {
992
- throw graph_error_1.GraphError.unsupportedOperationError('Connected components', 'ArangoDB (requires Pregel or SmartGraphs)');
993
- }
994
- // ==================== AGGREGATION ====================
995
- async countNodes(labels, where, transaction) {
996
- this.ensureConnected();
997
- return this.executeWithRetry(async () => {
998
- try {
999
- const collectionName = (labels === null || labels === void 0 ? void 0 : labels[0]) || this.vertexCollections[0];
1000
- let aql = 'RETURN LENGTH(FOR doc IN @@collection';
1001
- const bindVars = { '@collection': collectionName };
1002
- if (where) {
1003
- const { filterStr, filterVars } = this.buildArangoWhereClause(where, 'doc');
1004
- if (filterStr) {
1005
- aql += ` FILTER ${filterStr}`;
1006
- Object.assign(bindVars, filterVars);
1007
- }
1008
- }
1009
- aql += ' RETURN 1)';
1010
- const cursor = await this.db.query(aql, bindVars);
1011
- const [count] = await cursor.all();
1012
- return { count };
1013
- }
1014
- catch (error) {
1015
- throw graph_error_1.GraphError.queryError(`Failed to count nodes: ${error.message}`);
1016
- }
1017
- });
1018
- }
1019
- async countRelationships(types, where, transaction) {
1020
- this.ensureConnected();
1021
- return this.executeWithRetry(async () => {
1022
- try {
1023
- const collectionName = (types === null || types === void 0 ? void 0 : types[0]) || this.edgeCollections[0];
1024
- let aql = 'RETURN LENGTH(FOR edge IN @@collection';
1025
- const bindVars = { '@collection': collectionName };
1026
- if (where) {
1027
- const { filterStr, filterVars } = this.buildArangoWhereClause(where, 'edge');
1028
- if (filterStr) {
1029
- aql += ` FILTER ${filterStr}`;
1030
- Object.assign(bindVars, filterVars);
1031
- }
1032
- }
1033
- aql += ' RETURN 1)';
1034
- const cursor = await this.db.query(aql, bindVars);
1035
- const [count] = await cursor.all();
1036
- return { count };
1037
- }
1038
- catch (error) {
1039
- throw graph_error_1.GraphError.queryError(`Failed to count relationships: ${error.message}`);
1040
- }
1041
- });
1042
- }
1043
- async getStatistics(transaction) {
1044
- this.ensureConnected();
1045
- return this.executeWithRetry(async () => {
1046
- try {
1047
- let nodeCount = 0;
1048
- let relationshipCount = 0;
1049
- const nodesByLabel = {};
1050
- const relationshipsByType = {};
1051
- for (const collName of this.vertexCollections) {
1052
- const cursor = await this.db.query('RETURN LENGTH(FOR doc IN @@collection RETURN 1)', { '@collection': collName });
1053
- const [count] = await cursor.all();
1054
- nodesByLabel[collName] = count;
1055
- nodeCount += count;
1056
- }
1057
- for (const collName of this.edgeCollections) {
1058
- const cursor = await this.db.query('RETURN LENGTH(FOR edge IN @@collection RETURN 1)', { '@collection': collName });
1059
- const [count] = await cursor.all();
1060
- relationshipsByType[collName] = count;
1061
- relationshipCount += count;
1062
- }
1063
- return {
1064
- nodeCount,
1065
- relationshipCount,
1066
- nodesByLabel,
1067
- relationshipsByType,
1068
- };
1069
- }
1070
- catch (error) {
1071
- throw graph_error_1.GraphError.queryError(`Failed to get statistics: ${error.message}`);
1072
- }
1073
- });
1074
- }
1075
- // ==================== SEARCH ====================
1076
- async fullTextSearch(options, transaction) {
1077
- this.ensureConnected();
1078
- return this.executeWithRetry(async () => {
1079
- try {
1080
- const aql = `
1081
- FOR doc IN ${options.indexName}
1082
- SEARCH ANALYZER(doc.content IN TOKENS(@query, 'text_en'), 'text_en')
1083
- SORT BM25(doc) DESC
1084
- LIMIT @limit
1085
- RETURN doc
1086
- `;
1087
- const cursor = await this.db.query(aql, {
1088
- query: options.query,
1089
- limit: options.limit || 10,
1090
- });
1091
- const results = await cursor.all();
1092
- return {
1093
- nodes: results.map((doc) => ({
1094
- id: doc._key,
1095
- labels: doc._labels || [doc._id.split('/')[0]],
1096
- properties: this.cleanArangoProps(doc),
1097
- elementId: doc._id,
1098
- })),
1099
- };
1100
- }
1101
- catch (error) {
1102
- throw graph_error_1.GraphError.queryError(`Failed to perform full-text search: ${error.message}`);
1103
- }
1104
- });
1105
- }
1106
- async vectorSearch(options, transaction) {
1107
- throw graph_error_1.GraphError.unsupportedOperationError('Vector search', 'ArangoDB');
1108
- }
1109
- // ==================== RAW QUERY ====================
1110
- async query(options, transaction) {
1111
- this.ensureConnected();
1112
- return this.executeWithRetry(async () => {
1113
- try {
1114
- const cursor = await this.db.query(options.query, options.params || {});
1115
- const records = await cursor.all();
1116
- return {
1117
- records: records,
1118
- summary: {
1119
- database: this.db.name,
1120
- },
1121
- };
1122
- }
1123
- catch (error) {
1124
- throw graph_error_1.GraphError.queryError(`Failed to execute query: ${error.message}`);
1125
- }
1126
- });
1127
- }
1128
- // ==================== SCHEMA ====================
1129
- async createNodeIndex(options) {
1130
- this.ensureConnected();
1131
- return this.executeWithRetry(async () => {
1132
- var _a, _b;
1133
- try {
1134
- const collection = this.db.collection(options.label);
1135
- const indexOptions = {
1136
- type: this.mapIndexType(options.type),
1137
- fields: options.properties,
1138
- name: options.name,
1139
- };
1140
- if (((_a = options.options) === null || _a === void 0 ? void 0 : _a.sparse) !== undefined) {
1141
- indexOptions.sparse = options.options.sparse;
1142
- }
1143
- if (((_b = options.options) === null || _b === void 0 ? void 0 : _b.unique) !== undefined) {
1144
- indexOptions.unique = options.options.unique;
1145
- }
1146
- const result = await collection.ensureIndex(indexOptions);
1147
- return {
1148
- created: result.isNewlyCreated,
1149
- name: result.name,
1150
- };
1151
- }
1152
- catch (error) {
1153
- throw graph_error_1.GraphError.queryError(`Failed to create index: ${error.message}`);
1154
- }
1155
- });
1156
- }
1157
- async createNodeConstraint(options) {
1158
- this.ensureConnected();
1159
- return this.executeWithRetry(async () => {
1160
- try {
1161
- const collection = this.db.collection(options.label);
1162
- const fields = options.properties || (options.property ? [options.property] : []);
1163
- const result = await collection.ensureIndex({
1164
- type: 'persistent',
1165
- fields,
1166
- name: options.name,
1167
- unique: true,
1168
- });
1169
- return {
1170
- created: result.isNewlyCreated,
1171
- name: result.name,
1172
- };
1173
- }
1174
- catch (error) {
1175
- throw graph_error_1.GraphError.queryError(`Failed to create constraint: ${error.message}`);
1176
- }
1177
- });
1178
- }
1179
- async createRelationshipIndex(options) {
1180
- return this.createNodeIndex({
1181
- label: options.type,
1182
- properties: options.properties,
1183
- name: options.name,
1184
- type: options.type,
1185
- });
1186
- }
1187
- async listIndexes() {
1188
- this.ensureConnected();
1189
- return this.executeWithRetry(async () => {
1190
- try {
1191
- const indexes = [];
1192
- for (const collName of [...this.vertexCollections, ...this.edgeCollections]) {
1193
- const collection = this.db.collection(collName);
1194
- const collIndexes = await collection.indexes();
1195
- for (const idx of collIndexes) {
1196
- indexes.push({
1197
- name: idx.name,
1198
- labelOrType: collName,
1199
- properties: idx.fields || [],
1200
- type: idx.type,
1201
- unique: idx.unique || false,
1202
- });
1203
- }
1204
- }
1205
- return { indexes };
1206
- }
1207
- catch (error) {
1208
- throw graph_error_1.GraphError.queryError(`Failed to list indexes: ${error.message}`);
1209
- }
1210
- });
1211
- }
1212
- async listConstraints() {
1213
- this.ensureConnected();
1214
- return this.executeWithRetry(async () => {
1215
- try {
1216
- const constraints = [];
1217
- for (const collName of this.vertexCollections) {
1218
- const collection = this.db.collection(collName);
1219
- const indexes = await collection.indexes();
1220
- for (const idx of indexes) {
1221
- if (idx.unique) {
1222
- constraints.push({
1223
- name: idx.name,
1224
- label: collName,
1225
- property: (idx.fields || [])[0] || '',
1226
- type: 'UNIQUE',
1227
- });
1228
- }
1229
- }
1230
- }
1231
- return { constraints };
1232
- }
1233
- catch (error) {
1234
- throw graph_error_1.GraphError.queryError(`Failed to list constraints: ${error.message}`);
1235
- }
1236
- });
1237
- }
1238
- async dropIndex(name) {
1239
- this.ensureConnected();
1240
- return this.executeWithRetry(async () => {
1241
- try {
1242
- for (const collName of [...this.vertexCollections, ...this.edgeCollections]) {
1243
- const collection = this.db.collection(collName);
1244
- try {
1245
- await collection.dropIndex(name);
1246
- return { dropped: true };
1247
- }
1248
- catch (_a) {
1249
- continue;
1250
- }
1251
- }
1252
- return { dropped: false };
1253
- }
1254
- catch (error) {
1255
- throw graph_error_1.GraphError.queryError(`Failed to drop index: ${error.message}`);
1256
- }
1257
- });
1258
- }
1259
- async dropConstraint(name) {
1260
- const result = await this.dropIndex(name);
1261
- return { dropped: result.dropped };
1262
- }
1263
- // ==================== SCHEMA INTROSPECTION ====================
1264
- async listLabels() {
1265
- this.ensureConnected();
1266
- return this.executeWithRetry(async () => {
1267
- const labels = [];
1268
- // In ArangoDB, vertex collections act as "labels"
1269
- for (const collectionName of this.vertexCollections) {
1270
- try {
1271
- const collection = this.db.collection(collectionName);
1272
- // Get count
1273
- const countResult = await collection.count();
1274
- const count = countResult.count || 0;
1275
- // Get properties from a sample of documents
1276
- const cursor = await this.db.query(`
1277
- FOR doc IN \`${collectionName}\`
1278
- LIMIT 100
1279
- RETURN ATTRIBUTES(doc, true)
1280
- `);
1281
- const attributeArrays = await cursor.all();
1282
- // Flatten and dedupe property names
1283
- const propertyNames = new Set();
1284
- for (const attrs of attributeArrays) {
1285
- for (const attr of attrs) {
1286
- if (attr !== '_key' && attr !== '_id' && attr !== '_rev') {
1287
- propertyNames.add(attr);
1288
- }
1289
- }
1290
- }
1291
- const properties = Array.from(propertyNames).map(name => ({
1292
- name,
1293
- type: 'unknown',
1294
- }));
1295
- labels.push({
1296
- name: collectionName,
1297
- count,
1298
- properties,
1299
- });
1300
- }
1301
- catch (error) {
1302
- // Skip collections that don't exist or have errors
1303
- continue;
1304
- }
1305
- }
1306
- return { labels };
1307
- });
1308
- }
1309
- async listRelationshipTypes() {
1310
- this.ensureConnected();
1311
- return this.executeWithRetry(async () => {
1312
- const types = [];
1313
- // In ArangoDB, edge collections act as "relationship types"
1314
- for (const collectionName of this.edgeCollections) {
1315
- try {
1316
- const collection = this.db.collection(collectionName);
1317
- // Get count
1318
- const countResult = await collection.count();
1319
- const count = countResult.count || 0;
1320
- // Get source and target collection information
1321
- const endpointsCursor = await this.db.query(`
1322
- FOR edge IN \`${collectionName}\`
1323
- LIMIT 100
1324
- RETURN {
1325
- fromCollection: PARSE_IDENTIFIER(edge._from).collection,
1326
- toCollection: PARSE_IDENTIFIER(edge._to).collection
1327
- }
1328
- `);
1329
- const endpoints = await endpointsCursor.all();
1330
- const fromLabelsSet = new Set();
1331
- const toLabelsSet = new Set();
1332
- for (const ep of endpoints) {
1333
- if (ep.fromCollection)
1334
- fromLabelsSet.add(ep.fromCollection);
1335
- if (ep.toCollection)
1336
- toLabelsSet.add(ep.toCollection);
1337
- }
1338
- // Get properties from a sample of edges
1339
- const propsCursor = await this.db.query(`
1340
- FOR edge IN \`${collectionName}\`
1341
- LIMIT 100
1342
- RETURN ATTRIBUTES(edge, true)
1343
- `);
1344
- const attributeArrays = await propsCursor.all();
1345
- const propertyNames = new Set();
1346
- for (const attrs of attributeArrays) {
1347
- for (const attr of attrs) {
1348
- if (!['_key', '_id', '_rev', '_from', '_to'].includes(attr)) {
1349
- propertyNames.add(attr);
1350
- }
1351
- }
1352
- }
1353
- const properties = Array.from(propertyNames).map(name => ({
1354
- name,
1355
- type: 'unknown',
1356
- }));
1357
- types.push({
1358
- type: collectionName,
1359
- count,
1360
- fromLabels: Array.from(fromLabelsSet),
1361
- toLabels: Array.from(toLabelsSet),
1362
- properties: properties.length > 0 ? properties : undefined,
1363
- });
1364
- }
1365
- catch (error) {
1366
- // Skip collections that don't exist or have errors
1367
- continue;
1368
- }
1369
- }
1370
- return { types };
1371
- });
1372
- }
1373
- // ==================== TRANSACTIONS ====================
1374
- async beginTransaction() {
1375
- this.ensureConnected();
1376
- return this.executeWithRetry(async () => {
1377
- try {
1378
- const trx = await this.db.beginTransaction({
1379
- write: [...this.vertexCollections, ...this.edgeCollections],
1380
- read: [...this.vertexCollections, ...this.edgeCollections],
1381
- });
1382
- return {
1383
- id: trx.id,
1384
- status: enums_1.GraphTransactionStatus.ACTIVE,
1385
- startTime: new Date(),
1386
- nativeTransaction: trx,
1387
- };
1388
- }
1389
- catch (error) {
1390
- throw graph_error_1.GraphError.transactionError(`Failed to begin transaction: ${error.message}`);
1391
- }
1392
- });
1393
- }
1394
- async commitTransaction(transaction) {
1395
- try {
1396
- await transaction.nativeTransaction.commit();
1397
- transaction.status = enums_1.GraphTransactionStatus.COMMITTED;
1398
- }
1399
- catch (error) {
1400
- throw graph_error_1.GraphError.transactionError(`Failed to commit transaction: ${error.message}`);
1401
- }
1402
- }
1403
- async rollbackTransaction(transaction) {
1404
- try {
1405
- await transaction.nativeTransaction.abort();
1406
- transaction.status = enums_1.GraphTransactionStatus.ROLLED_BACK;
1407
- }
1408
- catch (error) {
1409
- throw graph_error_1.GraphError.transactionError(`Failed to rollback transaction: ${error.message}`);
1410
- }
1411
- }
1412
- // ==================== HELPERS ====================
1413
- mapDirection(direction) {
1414
- switch (direction) {
1415
- case enums_1.TraversalDirection.OUTGOING:
1416
- case 'OUTGOING':
1417
- return 'OUTBOUND';
1418
- case enums_1.TraversalDirection.INCOMING:
1419
- case 'INCOMING':
1420
- return 'INBOUND';
1421
- case enums_1.TraversalDirection.BOTH:
1422
- case 'BOTH':
1423
- default:
1424
- return 'ANY';
1425
- }
1426
- }
1427
- mapIndexType(type) {
1428
- switch (type) {
1429
- case 'fulltext':
1430
- return 'fulltext';
1431
- case 'geo':
1432
- case 'point':
1433
- return 'geo';
1434
- case 'ttl':
1435
- return 'ttl';
1436
- default:
1437
- return 'persistent';
1438
- }
1439
- }
1440
- buildWhereClause(where) {
1441
- return this.buildArangoWhereClause(where, 'doc');
1442
- }
1443
- parseError(error) {
1444
- if (error instanceof graph_error_1.GraphError) {
1445
- return error;
1446
- }
1447
- return graph_error_1.GraphError.queryError(String(error));
1448
- }
1449
- buildArangoWhereClause(where, varName) {
1450
- const conditions = [];
1451
- const filterVars = {};
1452
- let varCounter = 0;
1453
- for (const [key, value] of Object.entries(where)) {
1454
- // Normalize key to lowercase for comparison
1455
- const normalizedKey = key.toLowerCase();
1456
- if (normalizedKey === '$and') {
1457
- if (Array.isArray(value)) {
1458
- const subConditions = [];
1459
- for (const item of value) {
1460
- const { filterStr, filterVars: andVars } = this.buildArangoWhereClause(item, varName);
1461
- if (filterStr) {
1462
- subConditions.push(filterStr);
1463
- Object.assign(filterVars, andVars);
1464
- }
1465
- }
1466
- if (subConditions.length > 0) {
1467
- conditions.push(`(${subConditions.join(' AND ')})`);
1468
- }
1469
- }
1470
- else {
1471
- const { filterStr, filterVars: andVars } = this.buildArangoWhereClause(value, varName);
1472
- if (filterStr) {
1473
- conditions.push(`(${filterStr})`);
1474
- Object.assign(filterVars, andVars);
1475
- }
1476
- }
1477
- }
1478
- else if (normalizedKey === '$or') {
1479
- if (Array.isArray(value)) {
1480
- const subConditions = [];
1481
- for (const item of value) {
1482
- const { filterStr, filterVars: orVars } = this.buildArangoWhereClause(item, varName);
1483
- if (filterStr) {
1484
- subConditions.push(filterStr);
1485
- Object.assign(filterVars, orVars);
1486
- }
1487
- }
1488
- if (subConditions.length > 0) {
1489
- conditions.push(`(${subConditions.join(' OR ')})`);
1490
- }
1491
- }
1492
- else {
1493
- const { filterStr, filterVars: orVars } = this.buildArangoWhereClause(value, varName);
1494
- if (filterStr) {
1495
- conditions.push(`(${filterStr.replace(/ AND /g, ' OR ')})`);
1496
- Object.assign(filterVars, orVars);
1497
- }
1498
- }
1499
- }
1500
- else if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
1501
- for (const [op, opValue] of Object.entries(value)) {
1502
- const normalizedOp = op.toLowerCase();
1503
- const varKey = `v${varCounter++}`;
1504
- filterVars[varKey] = opValue;
1505
- switch (normalizedOp) {
1506
- case '$gt':
1507
- conditions.push(`${varName}.${key} > @${varKey}`);
1508
- break;
1509
- case '$gte':
1510
- conditions.push(`${varName}.${key} >= @${varKey}`);
1511
- break;
1512
- case '$lt':
1513
- conditions.push(`${varName}.${key} < @${varKey}`);
1514
- break;
1515
- case '$lte':
1516
- conditions.push(`${varName}.${key} <= @${varKey}`);
1517
- break;
1518
- case '$ne':
1519
- conditions.push(`${varName}.${key} != @${varKey}`);
1520
- break;
1521
- case '$in':
1522
- conditions.push(`${varName}.${key} IN @${varKey}`);
1523
- break;
1524
- case '$nin':
1525
- case '$not_in':
1526
- conditions.push(`${varName}.${key} NOT IN @${varKey}`);
1527
- break;
1528
- case '$contains':
1529
- conditions.push(`CONTAINS(${varName}.${key}, @${varKey})`);
1530
- break;
1531
- case '$startswith':
1532
- case '$starts_with':
1533
- conditions.push(`STARTS_WITH(${varName}.${key}, @${varKey})`);
1534
- break;
1535
- case '$endswith':
1536
- case '$ends_with':
1537
- conditions.push(`LIKE(${varName}.${key}, CONCAT('%', @${varKey}))`);
1538
- break;
1539
- case '$exists':
1540
- if (opValue) {
1541
- conditions.push(`${varName}.${key} != null`);
1542
- }
1543
- else {
1544
- conditions.push(`${varName}.${key} == null`);
1545
- }
1546
- break;
1547
- case '$regex':
1548
- conditions.push(`REGEX_TEST(${varName}.${key}, @${varKey})`);
1549
- break;
1550
- }
1551
- }
1552
- }
1553
- else {
1554
- const varKey = `v${varCounter++}`;
1555
- filterVars[varKey] = value;
1556
- conditions.push(`${varName}.${key} == @${varKey}`);
1557
- }
1558
- }
1559
- return {
1560
- filterStr: conditions.join(' AND '),
1561
- filterVars,
1562
- };
1563
- }
1564
- cleanArangoProps(doc) {
1565
- const result = {};
1566
- for (const [key, value] of Object.entries(doc)) {
1567
- if (!key.startsWith('_')) {
1568
- result[key] = value;
1569
- }
1570
- }
1571
- return result;
1572
- }
1573
- async resolveNodeId(id) {
1574
- for (const collName of this.vertexCollections) {
1575
- try {
1576
- const collection = this.db.collection(collName);
1577
- await collection.document(id);
1578
- return `${collName}/${id}`;
1579
- }
1580
- catch (_a) {
1581
- continue;
1582
- }
1583
- }
1584
- throw graph_error_1.GraphError.notFoundError(`Node with ID ${id} not found`);
1585
- }
1586
- }
1587
- exports.ArangoDBAdapter = ArangoDBAdapter;
1588
- //# sourceMappingURL=arangodb.adapter.js.map