@ductape/sdk 0.1.6 → 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 +5 -9
  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,1452 +0,0 @@
1
- "use strict";
2
- /**
3
- * Memgraph Graph Database Adapter
4
- *
5
- * Implements the BaseGraphAdapter for Memgraph.
6
- * Memgraph is a high-performance, in-memory graph database
7
- * that is fully compatible with Neo4j's Bolt protocol and Cypher query language.
8
- *
9
- * Key features:
10
- * - Cypher query language compatibility
11
- * - Bolt protocol support
12
- * - In-memory performance
13
- * - Triggers and streams support
14
- * - MAGE graph algorithms library
15
- */
16
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- var desc = Object.getOwnPropertyDescriptor(m, k);
19
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
20
- desc = { enumerable: true, get: function() { return m[k]; } };
21
- }
22
- Object.defineProperty(o, k2, desc);
23
- }) : (function(o, m, k, k2) {
24
- if (k2 === undefined) k2 = k;
25
- o[k2] = m[k];
26
- }));
27
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
28
- Object.defineProperty(o, "default", { enumerable: true, value: v });
29
- }) : function(o, v) {
30
- o["default"] = v;
31
- });
32
- var __importStar = (this && this.__importStar) || (function () {
33
- var ownKeys = function(o) {
34
- ownKeys = Object.getOwnPropertyNames || function (o) {
35
- var ar = [];
36
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
37
- return ar;
38
- };
39
- return ownKeys(o);
40
- };
41
- return function (mod) {
42
- if (mod && mod.__esModule) return mod;
43
- var result = {};
44
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
45
- __setModuleDefault(result, mod);
46
- return result;
47
- };
48
- })();
49
- Object.defineProperty(exports, "__esModule", { value: true });
50
- exports.MemgraphAdapter = void 0;
51
- const base_adapter_1 = require("./base.adapter");
52
- const enums_1 = require("../types/enums");
53
- const graph_error_1 = require("../utils/graph-error");
54
- /**
55
- * Memgraph adapter - Cypher-compatible graph database
56
- * Uses the neo4j-driver package as Memgraph supports the Bolt protocol
57
- */
58
- class MemgraphAdapter extends base_adapter_1.BaseGraphAdapter {
59
- constructor() {
60
- super(...arguments);
61
- this.graphType = enums_1.GraphType.MEMGRAPH;
62
- this.supportedFeatures = new Set([
63
- enums_1.GraphFeature.TRANSACTIONS,
64
- enums_1.GraphFeature.SCHEMA_INDEXES,
65
- enums_1.GraphFeature.TRIGGERS,
66
- enums_1.GraphFeature.CHANGE_STREAMS,
67
- enums_1.GraphFeature.GRAPH_ALGORITHMS,
68
- ]);
69
- this.driver = null;
70
- this.session = null;
71
- }
72
- // ==================== CONNECTION MANAGEMENT ====================
73
- async connect(options) {
74
- var _a, _b;
75
- try {
76
- // Store connection options for reconnection
77
- this.connectionOptions = options;
78
- // Memgraph uses the Bolt protocol, compatible with neo4j-driver
79
- const neo4j = await Promise.resolve().then(() => __importStar(require('neo4j-driver')));
80
- const auth = options.auth
81
- ? neo4j.auth.basic(options.auth.username, options.auth.password)
82
- : neo4j.auth.basic('', ''); // Memgraph can run without auth
83
- // Check if encryption is already specified in the URL scheme
84
- // bolt+s:// and bolt+ssc:// indicate encryption is configured via URL
85
- const urlHasEncryption = options.connectionUrl.startsWith('bolt+s://') ||
86
- options.connectionUrl.startsWith('bolt+ssc://') ||
87
- options.connectionUrl.startsWith('neo4j+s://') ||
88
- options.connectionUrl.startsWith('neo4j+ssc://');
89
- // Build driver config - only set encrypted if URL doesn't already specify it
90
- const driverConfig = Object.assign({}, options.options);
91
- if (!urlHasEncryption) {
92
- // Only set encrypted option when URL doesn't already configure it
93
- driverConfig.encrypted = (_b = (_a = options.options) === null || _a === void 0 ? void 0 : _a.encrypted) !== null && _b !== void 0 ? _b : false;
94
- }
95
- else {
96
- // Remove any conflicting encryption settings when URL specifies encryption
97
- delete driverConfig.encrypted;
98
- delete driverConfig.trust;
99
- }
100
- this.driver = neo4j.driver(options.connectionUrl, auth, driverConfig);
101
- // Verify connection
102
- await this.driver.verifyConnectivity();
103
- this.connected = true;
104
- this.connectionUrl = options.connectionUrl;
105
- return {
106
- connected: true,
107
- type: enums_1.GraphType.MEMGRAPH,
108
- latency: 0,
109
- };
110
- }
111
- catch (error) {
112
- this.connected = false;
113
- throw graph_error_1.GraphError.connectionError(`Failed to connect to Memgraph: ${error.message}`, error);
114
- }
115
- }
116
- async testConnection(options) {
117
- try {
118
- const neo4j = await Promise.resolve().then(() => __importStar(require('neo4j-driver')));
119
- const startTime = Date.now();
120
- const auth = options.auth
121
- ? neo4j.auth.basic(options.auth.username, options.auth.password)
122
- : neo4j.auth.basic('', '');
123
- // Check if encryption is already specified in the URL scheme
124
- const urlHasEncryption = options.connectionUrl.startsWith('bolt+s://') ||
125
- options.connectionUrl.startsWith('bolt+ssc://') ||
126
- options.connectionUrl.startsWith('neo4j+s://') ||
127
- options.connectionUrl.startsWith('neo4j+ssc://');
128
- // Build driver config - avoid conflicting encryption settings
129
- const driverConfig = Object.assign(Object.assign({}, options.options), { connectionTimeout: 5000 });
130
- if (urlHasEncryption) {
131
- delete driverConfig.encrypted;
132
- delete driverConfig.trust;
133
- }
134
- const testDriver = neo4j.driver(options.connectionUrl, auth, driverConfig);
135
- await testDriver.verifyConnectivity();
136
- // Get Memgraph version
137
- const session = testDriver.session();
138
- const result = await session.run('CALL mg.info() YIELD key, value WHERE key = "version" RETURN value');
139
- const version = result.records.length > 0 ? result.records[0].get('value') : 'unknown';
140
- await session.close();
141
- await testDriver.close();
142
- return {
143
- connected: true,
144
- type: enums_1.GraphType.MEMGRAPH,
145
- version,
146
- latency: Date.now() - startTime,
147
- };
148
- }
149
- catch (error) {
150
- return {
151
- connected: false,
152
- type: enums_1.GraphType.MEMGRAPH,
153
- error: error.message,
154
- };
155
- }
156
- }
157
- async disconnect() {
158
- if (this.session) {
159
- await this.session.close();
160
- this.session = null;
161
- }
162
- if (this.driver) {
163
- await this.driver.close();
164
- this.driver = null;
165
- }
166
- this.connected = false;
167
- }
168
- getSession(transaction) {
169
- if (transaction === null || transaction === void 0 ? void 0 : transaction.client) {
170
- return transaction.client;
171
- }
172
- if (!this.session) {
173
- this.ensureConnected();
174
- this.session = this.driver.session();
175
- }
176
- return this.session;
177
- }
178
- // ==================== NODE OPERATIONS ====================
179
- async createNode(options, transaction) {
180
- this.ensureConnected();
181
- return this.executeWithRetry(async () => {
182
- const labels = options.labels.join(':');
183
- const query = `CREATE (n:${labels} $props) RETURN n, id(n) as nodeId`;
184
- const session = this.getSession(transaction);
185
- const result = await session.run(query, { props: options.properties });
186
- const record = result.records[0];
187
- const node = record.get('n');
188
- const nodeId = record.get('nodeId');
189
- return {
190
- node: this.mapMemgraphNode(node, nodeId),
191
- created: true,
192
- };
193
- });
194
- }
195
- async findNodes(options, transaction) {
196
- this.ensureConnected();
197
- return this.executeWithRetry(async () => {
198
- var _a, _b;
199
- const labels = ((_a = options.labels) === null || _a === void 0 ? void 0 : _a.join(':')) || '';
200
- const labelClause = labels ? `:${labels}` : '';
201
- let query = `MATCH (n${labelClause})`;
202
- const params = {};
203
- if (options.where) {
204
- const { clause, params: whereParams } = this.buildWhereClause(options.where, 'n');
205
- query += ` WHERE ${clause}`;
206
- Object.assign(params, whereParams);
207
- }
208
- query += ' RETURN n, id(n) as nodeId';
209
- if ((_b = options.orderBy) === null || _b === void 0 ? void 0 : _b.length) {
210
- const orderClauses = options.orderBy.map(o => `n.${o.property} ${o.direction.toUpperCase()}`);
211
- query += ` ORDER BY ${orderClauses.join(', ')}`;
212
- }
213
- if (options.skip) {
214
- query += ` SKIP ${options.skip}`;
215
- }
216
- if (options.limit) {
217
- query += ` LIMIT ${options.limit}`;
218
- }
219
- const session = this.getSession(transaction);
220
- const result = await session.run(query, params);
221
- const nodes = result.records.map((record) => this.mapMemgraphNode(record.get('n'), record.get('nodeId')));
222
- return {
223
- nodes,
224
- count: nodes.length,
225
- };
226
- });
227
- }
228
- async findNodeById(id, transaction) {
229
- this.ensureConnected();
230
- return this.executeWithRetry(async () => {
231
- // Memgraph uses internal id() function
232
- const query = `MATCH (n) WHERE id(n) = $id RETURN n, id(n) as nodeId`;
233
- const session = this.getSession(transaction);
234
- const result = await session.run(query, {
235
- id: typeof id === 'number' ? id : parseInt(id, 10),
236
- });
237
- if (result.records.length === 0) {
238
- return null;
239
- }
240
- return this.mapMemgraphNode(result.records[0].get('n'), result.records[0].get('nodeId'));
241
- });
242
- }
243
- async updateNode(options, transaction) {
244
- this.ensureConnected();
245
- return this.executeWithRetry(async () => {
246
- var _a;
247
- let query;
248
- const params = { props: options.properties };
249
- if (options.id) {
250
- query = `MATCH (n) WHERE id(n) = $id SET n += $props RETURN n, id(n) as nodeId`;
251
- params.id = typeof options.id === 'number' ? options.id : parseInt(options.id, 10);
252
- }
253
- else {
254
- const labels = ((_a = options.labels) === null || _a === void 0 ? void 0 : _a.join(':')) || '';
255
- const labelClause = labels ? `:${labels}` : '';
256
- query = `MATCH (n${labelClause})`;
257
- if (options.where) {
258
- const { clause, params: whereParams } = this.buildWhereClause(options.where, 'n');
259
- query += ` WHERE ${clause}`;
260
- Object.assign(params, whereParams);
261
- }
262
- query += ' SET n += $props RETURN n, id(n) as nodeId';
263
- }
264
- const session = this.getSession(transaction);
265
- const result = await session.run(query, params);
266
- const nodes = result.records.map((record) => this.mapMemgraphNode(record.get('n'), record.get('nodeId')));
267
- return {
268
- node: nodes.length === 1 ? nodes[0] : undefined,
269
- nodes: nodes.length > 1 ? nodes : undefined,
270
- updatedCount: nodes.length,
271
- updated: nodes.length > 0,
272
- };
273
- });
274
- }
275
- async deleteNode(options, transaction) {
276
- this.ensureConnected();
277
- return this.executeWithRetry(async () => {
278
- var _a;
279
- let query;
280
- const params = {};
281
- const detach = options.detach ? 'DETACH ' : '';
282
- if (options.id) {
283
- query = `MATCH (n) WHERE id(n) = $id ${detach}DELETE n`;
284
- params.id = typeof options.id === 'number' ? options.id : parseInt(options.id, 10);
285
- }
286
- else {
287
- const labels = ((_a = options.labels) === null || _a === void 0 ? void 0 : _a.join(':')) || '';
288
- const labelClause = labels ? `:${labels}` : '';
289
- query = `MATCH (n${labelClause})`;
290
- if (options.where) {
291
- const { clause, params: whereParams } = this.buildWhereClause(options.where, 'n');
292
- query += ` WHERE ${clause}`;
293
- Object.assign(params, whereParams);
294
- }
295
- query += ` ${detach}DELETE n`;
296
- }
297
- const session = this.getSession(transaction);
298
- await session.run(query, params);
299
- return {
300
- deleted: true,
301
- deletedCount: 1,
302
- };
303
- });
304
- }
305
- async mergeNode(options, transaction) {
306
- this.ensureConnected();
307
- return this.executeWithRetry(async () => {
308
- const labels = options.labels.join(':');
309
- const matchProps = Object.entries(options.matchProperties)
310
- .map(([key]) => `${key}: $match_${key}`)
311
- .join(', ');
312
- let query = `MERGE (n:${labels} {${matchProps}})`;
313
- const params = {};
314
- // Add match properties to params
315
- Object.entries(options.matchProperties).forEach(([key, value]) => {
316
- params[`match_${key}`] = value;
317
- });
318
- if (options.onCreate) {
319
- query += ' ON CREATE SET n += $onCreateProps';
320
- params.onCreateProps = options.onCreate;
321
- }
322
- if (options.onMatch) {
323
- query += ' ON MATCH SET n += $onMatchProps';
324
- params.onMatchProps = options.onMatch;
325
- }
326
- query += ' RETURN n, id(n) as nodeId';
327
- const session = this.getSession(transaction);
328
- const result = await session.run(query, params);
329
- const record = result.records[0];
330
- const node = this.mapMemgraphNode(record.get('n'), record.get('nodeId'));
331
- return {
332
- node,
333
- created: true, // Memgraph doesn't easily tell us if it was created or matched
334
- merged: true,
335
- };
336
- });
337
- }
338
- // ==================== LABEL MANAGEMENT ====================
339
- async addLabels(options, transaction) {
340
- this.ensureConnected();
341
- return this.executeWithRetry(async () => {
342
- const labels = options.labels.map(l => `:\`${l}\``).join('');
343
- const query = `
344
- MATCH (n)
345
- WHERE id(n) = $id
346
- SET n${labels}
347
- RETURN n, id(n) as nodeId
348
- `;
349
- const params = {
350
- id: typeof options.id === 'number' ? options.id : parseInt(options.id, 10),
351
- };
352
- const session = this.getSession(transaction);
353
- const result = await session.run(query, params);
354
- if (result.records.length === 0) {
355
- throw graph_error_1.GraphError.notFoundError(`Node with ID ${options.id} not found`);
356
- }
357
- const record = result.records[0];
358
- const node = this.mapMemgraphNode(record.get('n'), record.get('nodeId'));
359
- return {
360
- node,
361
- addedLabels: options.labels,
362
- };
363
- });
364
- }
365
- async removeLabels(options, transaction) {
366
- this.ensureConnected();
367
- return this.executeWithRetry(async () => {
368
- const labels = options.labels.map(l => `:\`${l}\``).join('');
369
- const query = `
370
- MATCH (n)
371
- WHERE id(n) = $id
372
- REMOVE n${labels}
373
- RETURN n, id(n) as nodeId
374
- `;
375
- const params = {
376
- id: typeof options.id === 'number' ? options.id : parseInt(options.id, 10),
377
- };
378
- const session = this.getSession(transaction);
379
- const result = await session.run(query, params);
380
- if (result.records.length === 0) {
381
- throw graph_error_1.GraphError.notFoundError(`Node with ID ${options.id} not found`);
382
- }
383
- const record = result.records[0];
384
- const node = this.mapMemgraphNode(record.get('n'), record.get('nodeId'));
385
- return {
386
- node,
387
- removedLabels: options.labels,
388
- };
389
- });
390
- }
391
- async setLabels(options, transaction) {
392
- this.ensureConnected();
393
- return this.executeWithRetry(async () => {
394
- // First get current labels
395
- const getQuery = `
396
- MATCH (n)
397
- WHERE id(n) = $id
398
- RETURN labels(n) as currentLabels
399
- `;
400
- const params = {
401
- id: typeof options.id === 'number' ? options.id : parseInt(options.id, 10),
402
- };
403
- const session = this.getSession(transaction);
404
- const getResult = await session.run(getQuery, params);
405
- if (getResult.records.length === 0) {
406
- throw graph_error_1.GraphError.notFoundError(`Node with ID ${options.id} not found`);
407
- }
408
- const previousLabels = getResult.records[0].get('currentLabels');
409
- // Remove all existing labels and add new ones
410
- const removeLabels = previousLabels.map(l => `:\`${l}\``).join('');
411
- const addLabels = options.labels.map(l => `:\`${l}\``).join('');
412
- const setQuery = `
413
- MATCH (n)
414
- WHERE id(n) = $id
415
- REMOVE n${removeLabels}
416
- SET n${addLabels}
417
- RETURN n, id(n) as nodeId
418
- `;
419
- const result = await session.run(setQuery, params);
420
- const node = this.mapMemgraphNode(result.records[0].get('n'), result.records[0].get('nodeId'));
421
- return {
422
- node,
423
- previousLabels,
424
- newLabels: options.labels,
425
- };
426
- });
427
- }
428
- // ==================== RELATIONSHIP OPERATIONS ====================
429
- async createRelationship(options, transaction) {
430
- this.ensureConnected();
431
- return this.executeWithRetry(async () => {
432
- const query = `
433
- MATCH (a), (b)
434
- WHERE id(a) = $startId AND id(b) = $endId
435
- CREATE (a)-[r:${options.type} $props]->(b)
436
- RETURN r, id(r) as relId, id(a) as startId, id(b) as endId
437
- `;
438
- const params = {
439
- startId: typeof options.startNodeId === 'number' ? options.startNodeId : parseInt(options.startNodeId, 10),
440
- endId: typeof options.endNodeId === 'number' ? options.endNodeId : parseInt(options.endNodeId, 10),
441
- props: options.properties || {},
442
- };
443
- const session = this.getSession(transaction);
444
- const result = await session.run(query, params);
445
- const record = result.records[0];
446
- const rel = record.get('r');
447
- return {
448
- relationship: this.mapMemgraphRelationship(rel, record.get('relId'), record.get('startId'), record.get('endId')),
449
- created: true,
450
- };
451
- });
452
- }
453
- async findRelationships(options, transaction) {
454
- this.ensureConnected();
455
- return this.executeWithRetry(async () => {
456
- const types = options.type
457
- ? (Array.isArray(options.type) ? options.type.join('|') : options.type)
458
- : (options.types ? options.types.join('|') : '');
459
- const typeClause = types ? `:${types}` : '';
460
- let query = `MATCH (a)-[r${typeClause}]->(b)`;
461
- const params = {};
462
- const conditions = [];
463
- if (options.startNodeId) {
464
- conditions.push('id(a) = $startId');
465
- params.startId = typeof options.startNodeId === 'number' ? options.startNodeId : parseInt(options.startNodeId, 10);
466
- }
467
- if (options.endNodeId) {
468
- conditions.push('id(b) = $endId');
469
- params.endId = typeof options.endNodeId === 'number' ? options.endNodeId : parseInt(options.endNodeId, 10);
470
- }
471
- if (options.where) {
472
- const { clause, params: whereParams } = this.buildWhereClause(options.where, 'r');
473
- conditions.push(clause);
474
- Object.assign(params, whereParams);
475
- }
476
- if (conditions.length > 0) {
477
- query += ` WHERE ${conditions.join(' AND ')}`;
478
- }
479
- query += ' RETURN r, id(r) as relId, id(a) as startId, id(b) as endId';
480
- if (options.skip) {
481
- query += ` SKIP ${options.skip}`;
482
- }
483
- if (options.limit) {
484
- query += ` LIMIT ${options.limit}`;
485
- }
486
- const session = this.getSession(transaction);
487
- const result = await session.run(query, params);
488
- const relationships = result.records.map((record) => this.mapMemgraphRelationship(record.get('r'), record.get('relId'), record.get('startId'), record.get('endId')));
489
- return {
490
- relationships,
491
- count: relationships.length,
492
- };
493
- });
494
- }
495
- async findRelationshipById(id, transaction) {
496
- this.ensureConnected();
497
- return this.executeWithRetry(async () => {
498
- const query = `
499
- MATCH (a)-[r]->(b)
500
- WHERE id(r) = $id
501
- RETURN r, id(r) as relId, id(a) as startId, id(b) as endId
502
- `;
503
- const session = this.getSession(transaction);
504
- const result = await session.run(query, {
505
- id: typeof id === 'number' ? id : parseInt(id, 10),
506
- });
507
- if (result.records.length === 0) {
508
- return null;
509
- }
510
- const record = result.records[0];
511
- return this.mapMemgraphRelationship(record.get('r'), record.get('relId'), record.get('startId'), record.get('endId'));
512
- });
513
- }
514
- async updateRelationship(options, transaction) {
515
- this.ensureConnected();
516
- return this.executeWithRetry(async () => {
517
- let query;
518
- const params = { props: options.properties };
519
- if (options.id) {
520
- query = `
521
- MATCH (a)-[r]->(b)
522
- WHERE id(r) = $id
523
- SET r += $props
524
- RETURN r, id(r) as relId, id(a) as startId, id(b) as endId
525
- `;
526
- params.id = typeof options.id === 'number' ? options.id : parseInt(options.id, 10);
527
- }
528
- else {
529
- const typeClause = options.type ? `:${options.type}` : '';
530
- query = `MATCH (a)-[r${typeClause}]->(b)`;
531
- if (options.where) {
532
- const { clause, params: whereParams } = this.buildWhereClause(options.where, 'r');
533
- query += ` WHERE ${clause}`;
534
- Object.assign(params, whereParams);
535
- }
536
- query += ' SET r += $props RETURN r, id(r) as relId, id(a) as startId, id(b) as endId';
537
- }
538
- const session = this.getSession(transaction);
539
- const result = await session.run(query, params);
540
- const relationships = result.records.map((record) => this.mapMemgraphRelationship(record.get('r'), record.get('relId'), record.get('startId'), record.get('endId')));
541
- return {
542
- relationship: relationships.length === 1 ? relationships[0] : undefined,
543
- relationships: relationships.length > 1 ? relationships : undefined,
544
- updatedCount: relationships.length,
545
- updated: relationships.length > 0,
546
- };
547
- });
548
- }
549
- async deleteRelationship(options, transaction) {
550
- this.ensureConnected();
551
- return this.executeWithRetry(async () => {
552
- var _a;
553
- let query;
554
- const params = {};
555
- if (options.id) {
556
- query = `MATCH ()-[r]->() WHERE id(r) = $id DELETE r RETURN count(r) as count`;
557
- params.id = typeof options.id === 'number' ? options.id : parseInt(options.id, 10);
558
- }
559
- else {
560
- const typeClause = options.type ? `:${options.type}` : '';
561
- query = `MATCH (a)-[r${typeClause}]->(b)`;
562
- const conditions = [];
563
- if (options.startNodeId) {
564
- conditions.push('id(a) = $startId');
565
- params.startId = typeof options.startNodeId === 'number' ? options.startNodeId : parseInt(options.startNodeId, 10);
566
- }
567
- if (options.endNodeId) {
568
- conditions.push('id(b) = $endId');
569
- params.endId = typeof options.endNodeId === 'number' ? options.endNodeId : parseInt(options.endNodeId, 10);
570
- }
571
- if (options.where) {
572
- const { clause, params: whereParams } = this.buildWhereClause(options.where, 'r');
573
- conditions.push(clause);
574
- Object.assign(params, whereParams);
575
- }
576
- if (conditions.length > 0) {
577
- query += ` WHERE ${conditions.join(' AND ')}`;
578
- }
579
- query += ' DELETE r RETURN count(r) as count';
580
- }
581
- const session = this.getSession(transaction);
582
- const result = await session.run(query, params);
583
- const count = this.toNumber((_a = result.records[0]) === null || _a === void 0 ? void 0 : _a.get('count')) || 0;
584
- return {
585
- deleted: count > 0,
586
- deletedCount: count,
587
- };
588
- });
589
- }
590
- async mergeRelationship(options, transaction) {
591
- this.ensureConnected();
592
- return this.executeWithRetry(async () => {
593
- let matchPropsClause = '';
594
- const params = {
595
- startId: typeof options.startNodeId === 'number' ? options.startNodeId : parseInt(options.startNodeId, 10),
596
- endId: typeof options.endNodeId === 'number' ? options.endNodeId : parseInt(options.endNodeId, 10),
597
- };
598
- if (options.matchProperties) {
599
- const matchProps = Object.entries(options.matchProperties)
600
- .map(([key]) => `${key}: $match_${key}`)
601
- .join(', ');
602
- matchPropsClause = ` {${matchProps}}`;
603
- Object.entries(options.matchProperties).forEach(([key, value]) => {
604
- params[`match_${key}`] = value;
605
- });
606
- }
607
- let query = `
608
- MATCH (a), (b)
609
- WHERE id(a) = $startId AND id(b) = $endId
610
- MERGE (a)-[r:${options.type}${matchPropsClause}]->(b)
611
- `;
612
- if (options.onCreate) {
613
- query += ' ON CREATE SET r += $onCreateProps';
614
- params.onCreateProps = options.onCreate;
615
- }
616
- if (options.onMatch) {
617
- query += ' ON MATCH SET r += $onMatchProps';
618
- params.onMatchProps = options.onMatch;
619
- }
620
- query += ' RETURN r, id(r) as relId, id(a) as startId, id(b) as endId';
621
- const session = this.getSession(transaction);
622
- const result = await session.run(query, params);
623
- const record = result.records[0];
624
- const relationship = this.mapMemgraphRelationship(record.get('r'), record.get('relId'), record.get('startId'), record.get('endId'));
625
- return {
626
- relationship,
627
- created: true,
628
- merged: true,
629
- };
630
- });
631
- }
632
- // ==================== TRAVERSAL OPERATIONS ====================
633
- async traverse(options, transaction) {
634
- this.ensureConnected();
635
- return this.executeWithRetry(async () => {
636
- var _a;
637
- const direction = this.getDirectionArrow(options.direction);
638
- const relTypes = ((_a = options.relationshipTypes) === null || _a === void 0 ? void 0 : _a.join('|')) || '';
639
- const relClause = relTypes ? `:${relTypes}` : '';
640
- const minDepth = options.minDepth || 1;
641
- const maxDepth = options.maxDepth || 3;
642
- const query = `
643
- MATCH path = (start)${direction.left}[${relClause}*${minDepth}..${maxDepth}]${direction.right}(end)
644
- WHERE id(start) = $startId
645
- RETURN path
646
- ${options.limit ? `LIMIT ${options.limit}` : ''}
647
- `;
648
- const params = {
649
- startId: typeof options.startNodeId === 'number' ? options.startNodeId : parseInt(options.startNodeId, 10),
650
- };
651
- const session = this.getSession(transaction);
652
- const result = await session.run(query, params);
653
- const paths = result.records.map((record) => this.mapMemgraphPath(record.get('path')));
654
- // Collect unique nodes and relationships
655
- const nodesMap = new Map();
656
- const relsMap = new Map();
657
- paths.forEach(path => {
658
- path.nodes.forEach(node => nodesMap.set(String(node.id), node));
659
- path.relationships.forEach(rel => relsMap.set(String(rel.id), rel));
660
- });
661
- return {
662
- paths,
663
- nodes: Array.from(nodesMap.values()),
664
- relationships: Array.from(relsMap.values()),
665
- count: paths.length,
666
- };
667
- });
668
- }
669
- async shortestPath(options, transaction) {
670
- this.ensureConnected();
671
- return this.executeWithRetry(async () => {
672
- var _a;
673
- const relTypes = ((_a = options.relationshipTypes) === null || _a === void 0 ? void 0 : _a.join('|')) || '';
674
- const relClause = relTypes ? `:${relTypes}` : '';
675
- const maxDepth = options.maxDepth || 15;
676
- // Use BFS for shortest path in Memgraph
677
- const query = `
678
- MATCH (start), (end)
679
- WHERE id(start) = $startId AND id(end) = $endId
680
- MATCH path = shortestPath((start)-[${relClause}*..${maxDepth}]-(end))
681
- RETURN path
682
- `;
683
- const params = {
684
- startId: typeof options.startNodeId === 'number' ? options.startNodeId : parseInt(options.startNodeId, 10),
685
- endId: typeof options.endNodeId === 'number' ? options.endNodeId : parseInt(options.endNodeId, 10),
686
- };
687
- const session = this.getSession(transaction);
688
- const result = await session.run(query, params);
689
- if (result.records.length === 0) {
690
- return { path: null, found: false };
691
- }
692
- const path = this.mapMemgraphPath(result.records[0].get('path'));
693
- return {
694
- path,
695
- length: path.length,
696
- found: true,
697
- totalWeight: options.weightProperty
698
- ? path.relationships.reduce((sum, r) => sum + (r.properties[options.weightProperty] || 0), 0)
699
- : undefined,
700
- };
701
- });
702
- }
703
- async allPaths(options, transaction) {
704
- this.ensureConnected();
705
- return this.executeWithRetry(async () => {
706
- var _a;
707
- const relTypes = ((_a = options.relationshipTypes) === null || _a === void 0 ? void 0 : _a.join('|')) || '';
708
- const relClause = relTypes ? `:${relTypes}` : '';
709
- const minDepth = options.minDepth || 1;
710
- const maxDepth = options.maxDepth || 5;
711
- const limit = options.limit || options.maxPaths;
712
- const query = `
713
- MATCH (start), (end)
714
- WHERE id(start) = $startId AND id(end) = $endId
715
- MATCH path = (start)-[${relClause}*${minDepth}..${maxDepth}]-(end)
716
- RETURN path
717
- ${limit ? `LIMIT ${limit}` : ''}
718
- `;
719
- const params = {
720
- startId: typeof options.startNodeId === 'number' ? options.startNodeId : parseInt(options.startNodeId, 10),
721
- endId: typeof options.endNodeId === 'number' ? options.endNodeId : parseInt(options.endNodeId, 10),
722
- };
723
- const session = this.getSession(transaction);
724
- const result = await session.run(query, params);
725
- const paths = result.records.map((record) => this.mapMemgraphPath(record.get('path')));
726
- return {
727
- paths,
728
- count: paths.length,
729
- total: paths.length,
730
- };
731
- });
732
- }
733
- async getNeighborhood(options, transaction) {
734
- this.ensureConnected();
735
- return this.executeWithRetry(async () => {
736
- var _a;
737
- const direction = this.getDirectionArrow(options.direction);
738
- const relTypes = ((_a = options.relationshipTypes) === null || _a === void 0 ? void 0 : _a.join('|')) || '';
739
- const relClause = relTypes ? `:${relTypes}` : '';
740
- const depth = options.depth || 1;
741
- const limit = options.limit;
742
- const query = `
743
- MATCH (start)
744
- WHERE id(start) = $nodeId
745
- MATCH path = (start)${direction.left}[r${relClause}*1..${depth}]${direction.right}(neighbor)
746
- RETURN DISTINCT neighbor, id(neighbor) as neighborId, r
747
- ${limit ? `LIMIT ${limit}` : ''}
748
- `;
749
- const params = {
750
- nodeId: typeof options.nodeId === 'number' ? options.nodeId : parseInt(options.nodeId, 10),
751
- };
752
- const session = this.getSession(transaction);
753
- const result = await session.run(query, params);
754
- const nodesMap = new Map();
755
- const relationshipsSet = [];
756
- result.records.forEach((record) => {
757
- const neighbor = record.get('neighbor');
758
- const neighborId = record.get('neighborId');
759
- const nodeKey = String(this.toNumber(neighborId));
760
- if (!nodesMap.has(nodeKey)) {
761
- nodesMap.set(nodeKey, this.mapMemgraphNode(neighbor, neighborId));
762
- }
763
- const rels = record.get('r');
764
- if (Array.isArray(rels)) {
765
- rels.forEach((rel) => {
766
- relationshipsSet.push(this.mapMemgraphRelationship(rel, rel.identity, rel.start, rel.end));
767
- });
768
- }
769
- });
770
- return {
771
- nodes: Array.from(nodesMap.values()),
772
- relationships: relationshipsSet,
773
- depth,
774
- };
775
- });
776
- }
777
- async findConnectedComponents(options, transaction) {
778
- this.ensureConnected();
779
- return this.executeWithRetry(async () => {
780
- var _a;
781
- // Memgraph has MAGE library for graph algorithms
782
- // Use weakly connected components algorithm
783
- const labels = ((_a = options.labels) === null || _a === void 0 ? void 0 : _a.join(':')) || '';
784
- const labelClause = labels ? `:${labels}` : '';
785
- try {
786
- // Try using MAGE library first (if installed)
787
- const query = `
788
- CALL weakly_connected_components.get()
789
- YIELD node, component_id
790
- WITH component_id, collect(node) as nodes
791
- RETURN nodes, size(nodes) as size, component_id
792
- ORDER BY size DESC
793
- `;
794
- const session = this.getSession(transaction);
795
- const result = await session.run(query, {});
796
- const components = result.records.map((record) => ({
797
- nodes: record.get('nodes').map((n) => this.mapMemgraphNode(n, n.identity)),
798
- size: this.toNumber(record.get('size')),
799
- }));
800
- return {
801
- components,
802
- count: components.length,
803
- };
804
- }
805
- catch (_b) {
806
- // Fallback to basic Cypher implementation
807
- const query = `
808
- MATCH (n${labelClause})
809
- WITH collect(n) as allNodes
810
- UNWIND allNodes as node
811
- MATCH path = (node)-[*]-(connected)
812
- WITH node, collect(DISTINCT connected) + [node] as component
813
- WITH collect(DISTINCT component) as allComponents
814
- UNWIND allComponents as comp
815
- WITH comp, size(comp) as compSize
816
- RETURN comp as nodes, compSize as size
817
- ORDER BY size DESC
818
- `;
819
- const session = this.getSession(transaction);
820
- const result = await session.run(query, {});
821
- const components = result.records.map((record) => ({
822
- nodes: record.get('nodes').map((n) => this.mapMemgraphNode(n, n.identity)),
823
- size: this.toNumber(record.get('size')),
824
- }));
825
- return {
826
- components,
827
- count: components.length,
828
- };
829
- }
830
- });
831
- }
832
- // ==================== AGGREGATION OPERATIONS ====================
833
- async countNodes(labels, where, transaction) {
834
- this.ensureConnected();
835
- return this.executeWithRetry(async () => {
836
- var _a;
837
- const labelClause = (labels === null || labels === void 0 ? void 0 : labels.length) ? `:${labels.join(':')}` : '';
838
- let query = `MATCH (n${labelClause})`;
839
- const params = {};
840
- if (where) {
841
- const { clause, params: whereParams } = this.buildWhereClause(where, 'n');
842
- query += ` WHERE ${clause}`;
843
- Object.assign(params, whereParams);
844
- }
845
- query += ' RETURN count(n) as count';
846
- const session = this.getSession(transaction);
847
- const result = await session.run(query, params);
848
- return {
849
- count: this.toNumber((_a = result.records[0]) === null || _a === void 0 ? void 0 : _a.get('count')) || 0,
850
- };
851
- });
852
- }
853
- async countRelationships(types, where, transaction) {
854
- this.ensureConnected();
855
- return this.executeWithRetry(async () => {
856
- var _a;
857
- const typeClause = (types === null || types === void 0 ? void 0 : types.length) ? `:${types.join('|')}` : '';
858
- let query = `MATCH ()-[r${typeClause}]->()`;
859
- const params = {};
860
- if (where) {
861
- const { clause, params: whereParams } = this.buildWhereClause(where, 'r');
862
- query += ` WHERE ${clause}`;
863
- Object.assign(params, whereParams);
864
- }
865
- query += ' RETURN count(r) as count';
866
- const session = this.getSession(transaction);
867
- const result = await session.run(query, params);
868
- return {
869
- count: this.toNumber((_a = result.records[0]) === null || _a === void 0 ? void 0 : _a.get('count')) || 0,
870
- };
871
- });
872
- }
873
- async getStatistics(transaction) {
874
- this.ensureConnected();
875
- return this.executeWithRetry(async () => {
876
- var _a, _b;
877
- const session = this.getSession(transaction);
878
- const nodeCountResult = await session.run('MATCH (n) RETURN count(n) as count');
879
- const relCountResult = await session.run('MATCH ()-[r]->() RETURN count(r) as count');
880
- return {
881
- nodeCount: this.toNumber((_a = nodeCountResult.records[0]) === null || _a === void 0 ? void 0 : _a.get('count')) || 0,
882
- relationshipCount: this.toNumber((_b = relCountResult.records[0]) === null || _b === void 0 ? void 0 : _b.get('count')) || 0,
883
- };
884
- });
885
- }
886
- // ==================== SEARCH OPERATIONS ====================
887
- async fullTextSearch(options, transaction) {
888
- this.ensureConnected();
889
- return this.executeWithRetry(async () => {
890
- // Memgraph supports text search through MAGE text_search module
891
- // Use the index name to search
892
- const query = `
893
- CALL text_search.search($indexName, $searchQuery, $limit)
894
- YIELD node, score
895
- RETURN node, id(node) as nodeId, score
896
- `;
897
- const session = this.getSession(transaction);
898
- const result = await session.run(query, {
899
- indexName: options.indexName,
900
- searchQuery: options.query,
901
- limit: options.limit || 100,
902
- });
903
- const nodes = result.records.map((r) => this.mapMemgraphNode(r.get('node'), r.get('nodeId')));
904
- const scores = result.records.map((r) => r.get('score') || 1.0);
905
- return {
906
- nodes,
907
- scores,
908
- };
909
- });
910
- }
911
- async vectorSearch(_options, _transaction) {
912
- // Memgraph doesn't natively support vector search yet
913
- // This would require a custom implementation or external service
914
- throw graph_error_1.GraphError.unsupportedOperationError('Vector search is not natively supported in Memgraph. Consider using an external vector database.', this.graphType);
915
- }
916
- // ==================== RAW QUERY ====================
917
- async query(options, transaction) {
918
- this.ensureConnected();
919
- return this.executeWithRetry(async () => {
920
- var _a, _b;
921
- const session = this.getSession(transaction);
922
- const result = await session.run(options.query, options.params || {});
923
- return {
924
- records: result.records.map((r) => r.toObject()),
925
- summary: {
926
- resultAvailableAfter: this.toNumber((_a = result.summary) === null || _a === void 0 ? void 0 : _a.resultAvailableAfter),
927
- resultConsumedAfter: this.toNumber((_b = result.summary) === null || _b === void 0 ? void 0 : _b.resultConsumedAfter),
928
- },
929
- };
930
- });
931
- }
932
- // ==================== SCHEMA OPERATIONS ====================
933
- async createNodeIndex(options) {
934
- this.ensureConnected();
935
- return this.executeWithRetry(async () => {
936
- // Memgraph uses CREATE INDEX ON :Label(property)
937
- const query = `CREATE INDEX ON :${options.label}(${options.properties.join(', ')})`;
938
- const session = this.getSession();
939
- await session.run(query);
940
- return { created: true, name: options.name };
941
- });
942
- }
943
- async createNodeConstraint(options) {
944
- this.ensureConnected();
945
- return this.executeWithRetry(async () => {
946
- let query;
947
- const property = options.property || (options.properties && options.properties[0]);
948
- switch (options.type) {
949
- case 'UNIQUE':
950
- // Memgraph uses CREATE CONSTRAINT ON (n:Label) ASSERT n.property IS UNIQUE
951
- query = `CREATE CONSTRAINT ON (n:${options.label}) ASSERT n.${property} IS UNIQUE`;
952
- break;
953
- case 'EXISTS':
954
- query = `CREATE CONSTRAINT ON (n:${options.label}) ASSERT EXISTS (n.${property})`;
955
- break;
956
- default:
957
- throw graph_error_1.GraphError.validationError(`Unsupported constraint type: ${options.type}`);
958
- }
959
- const session = this.getSession();
960
- await session.run(query);
961
- return { created: true, name: options.name };
962
- });
963
- }
964
- async createRelationshipIndex(options) {
965
- this.ensureConnected();
966
- return this.executeWithRetry(async () => {
967
- // Memgraph relationship indexes
968
- const query = `CREATE INDEX ON :${options.type}(${options.properties.join(', ')})`;
969
- const session = this.getSession();
970
- await session.run(query);
971
- return { created: true, name: options.name };
972
- });
973
- }
974
- async listIndexes() {
975
- this.ensureConnected();
976
- return this.executeWithRetry(async () => {
977
- const query = 'SHOW INDEX INFO';
978
- const session = this.getSession();
979
- const result = await session.run(query);
980
- const indexes = result.records.map((r) => ({
981
- name: r.get('index name') || '',
982
- labelOrType: r.get('label') || '',
983
- properties: [r.get('property') || ''],
984
- unique: false, // Memgraph doesn't distinguish in SHOW INDEX INFO
985
- type: r.get('index type') || 'BTREE',
986
- state: 'ONLINE',
987
- }));
988
- return { indexes };
989
- });
990
- }
991
- async listConstraints() {
992
- this.ensureConnected();
993
- return this.executeWithRetry(async () => {
994
- const query = 'SHOW CONSTRAINT INFO';
995
- const session = this.getSession();
996
- const result = await session.run(query);
997
- const constraints = result.records.map((r) => ({
998
- name: `constraint_${r.get('label')}_${r.get('property')}`,
999
- label: r.get('label') || '',
1000
- property: r.get('property') || '',
1001
- type: r.get('constraint type') || 'UNIQUE',
1002
- }));
1003
- return { constraints };
1004
- });
1005
- }
1006
- async dropIndex(name) {
1007
- this.ensureConnected();
1008
- return this.executeWithRetry(async () => {
1009
- // In Memgraph, we need label and property to drop index
1010
- // This is a simplified version
1011
- const query = `DROP INDEX ON :${name}`;
1012
- const session = this.getSession();
1013
- try {
1014
- await session.run(query);
1015
- return { dropped: true };
1016
- }
1017
- catch (_a) {
1018
- return { dropped: false };
1019
- }
1020
- });
1021
- }
1022
- async dropConstraint(name) {
1023
- this.ensureConnected();
1024
- return this.executeWithRetry(async () => {
1025
- // Memgraph requires the full constraint definition to drop
1026
- // This is a simplified version that might need adjustment
1027
- const query = `DROP CONSTRAINT ON (n:${name}) ASSERT n.id IS UNIQUE`;
1028
- const session = this.getSession();
1029
- try {
1030
- await session.run(query);
1031
- return { dropped: true };
1032
- }
1033
- catch (_a) {
1034
- return { dropped: false };
1035
- }
1036
- });
1037
- }
1038
- // ==================== SCHEMA INTROSPECTION ====================
1039
- async listLabels() {
1040
- this.ensureConnected();
1041
- return this.executeWithRetry(async () => {
1042
- var _a, _b, _c, _d;
1043
- const session = this.getSession();
1044
- // Get all labels using Memgraph's CALL mg.labels()
1045
- const labelsResult = await session.run('CALL mg.labels() YIELD label RETURN label');
1046
- const labelNames = labelsResult.records.map((r) => r.get('label'));
1047
- const labels = [];
1048
- for (const labelName of labelNames) {
1049
- // Get count for each label
1050
- const countResult = await session.run(`MATCH (n:\`${labelName}\`) RETURN count(n) as count`);
1051
- const count = ((_c = (_b = (_a = countResult.records[0]) === null || _a === void 0 ? void 0 : _a.get('count')) === null || _b === void 0 ? void 0 : _b.toNumber) === null || _c === void 0 ? void 0 : _c.call(_b)) ||
1052
- ((_d = countResult.records[0]) === null || _d === void 0 ? void 0 : _d.get('count')) || 0;
1053
- // Get properties for a sample of nodes with this label
1054
- const propsResult = await session.run(`MATCH (n:\`${labelName}\`) WITH n LIMIT 100
1055
- UNWIND keys(n) as key
1056
- RETURN DISTINCT key`);
1057
- const properties = propsResult.records.map((r) => ({
1058
- name: r.get('key'),
1059
- type: 'unknown',
1060
- }));
1061
- labels.push({
1062
- name: labelName,
1063
- count: typeof count === 'number' ? count : Number(count),
1064
- properties,
1065
- });
1066
- }
1067
- return { labels };
1068
- });
1069
- }
1070
- async listRelationshipTypes() {
1071
- this.ensureConnected();
1072
- return this.executeWithRetry(async () => {
1073
- var _a, _b, _c, _d;
1074
- const session = this.getSession();
1075
- // Get all relationship types using Memgraph's CALL mg.relationship_types()
1076
- const typesResult = await session.run('CALL mg.relationship_types() YIELD relationshipType RETURN relationshipType');
1077
- const typeNames = typesResult.records.map((r) => r.get('relationshipType'));
1078
- const types = [];
1079
- for (const typeName of typeNames) {
1080
- // Get count for each type
1081
- const countResult = await session.run(`MATCH ()-[r:\`${typeName}\`]->() RETURN count(r) as count`);
1082
- const count = ((_c = (_b = (_a = countResult.records[0]) === null || _a === void 0 ? void 0 : _a.get('count')) === null || _b === void 0 ? void 0 : _b.toNumber) === null || _c === void 0 ? void 0 : _c.call(_b)) ||
1083
- ((_d = countResult.records[0]) === null || _d === void 0 ? void 0 : _d.get('count')) || 0;
1084
- // Get source and target label information
1085
- const endpointsResult = await session.run(`MATCH (a)-[r:\`${typeName}\`]->(b)
1086
- WITH labels(a) as fromLabels, labels(b) as toLabels
1087
- RETURN DISTINCT fromLabels[0] as fromLabel, toLabels[0] as toLabel
1088
- LIMIT 10`);
1089
- const fromLabelsArray = endpointsResult.records
1090
- .map((r) => r.get('fromLabel'))
1091
- .filter((l) => Boolean(l));
1092
- const fromLabels = [...new Set(fromLabelsArray)];
1093
- const toLabelsArray = endpointsResult.records
1094
- .map((r) => r.get('toLabel'))
1095
- .filter((l) => Boolean(l));
1096
- const toLabels = [...new Set(toLabelsArray)];
1097
- // Get properties for relationships of this type
1098
- const propsResult = await session.run(`MATCH ()-[r:\`${typeName}\`]->() WITH r LIMIT 100
1099
- UNWIND keys(r) as key
1100
- RETURN DISTINCT key`);
1101
- const properties = propsResult.records.map((r) => ({
1102
- name: r.get('key'),
1103
- type: 'unknown',
1104
- }));
1105
- types.push({
1106
- type: typeName,
1107
- count: typeof count === 'number' ? count : Number(count),
1108
- fromLabels,
1109
- toLabels,
1110
- properties: properties.length > 0 ? properties : undefined,
1111
- });
1112
- }
1113
- return { types };
1114
- });
1115
- }
1116
- // ==================== TRANSACTION OPERATIONS ====================
1117
- async beginTransaction(_options) {
1118
- this.ensureConnected();
1119
- return this.executeWithRetry(async () => {
1120
- const session = this.driver.session();
1121
- const tx = session.beginTransaction();
1122
- return {
1123
- id: `tx_${Date.now()}`,
1124
- status: enums_1.GraphTransactionStatus.ACTIVE,
1125
- client: tx,
1126
- nativeTransaction: tx,
1127
- startTime: new Date(),
1128
- commit: async () => {
1129
- await tx.commit();
1130
- await session.close();
1131
- },
1132
- rollback: async () => {
1133
- await tx.rollback();
1134
- await session.close();
1135
- },
1136
- };
1137
- });
1138
- }
1139
- async commitTransaction(transaction) {
1140
- if (transaction.commit) {
1141
- await transaction.commit();
1142
- }
1143
- }
1144
- async rollbackTransaction(transaction) {
1145
- if (transaction.rollback) {
1146
- await transaction.rollback();
1147
- }
1148
- }
1149
- // ==================== MEMGRAPH-SPECIFIC FEATURES ====================
1150
- /**
1151
- * Create a trigger in Memgraph
1152
- */
1153
- async createTrigger(name, event, target, procedure) {
1154
- this.ensureConnected();
1155
- return this.executeWithRetry(async () => {
1156
- const eventClause = `${event === 'CREATE' ? 'CREATED' : event === 'UPDATE' ? 'UPDATED' : 'DELETED'}`;
1157
- const targetClause = target === 'NODE' ? 'VERTEX' : 'EDGE';
1158
- const query = `
1159
- CREATE TRIGGER ${name}
1160
- ON ${eventClause} ${targetClause}
1161
- EXECUTE ${procedure}
1162
- `;
1163
- const session = this.getSession();
1164
- await session.run(query);
1165
- });
1166
- }
1167
- /**
1168
- * Drop a trigger in Memgraph
1169
- */
1170
- async dropTrigger(name) {
1171
- this.ensureConnected();
1172
- return this.executeWithRetry(async () => {
1173
- const query = `DROP TRIGGER ${name}`;
1174
- const session = this.getSession();
1175
- await session.run(query);
1176
- });
1177
- }
1178
- /**
1179
- * List all triggers in Memgraph
1180
- */
1181
- async listTriggers() {
1182
- this.ensureConnected();
1183
- return this.executeWithRetry(async () => {
1184
- const query = 'SHOW TRIGGERS';
1185
- const session = this.getSession();
1186
- const result = await session.run(query);
1187
- return result.records.map((r) => ({
1188
- name: r.get('trigger name'),
1189
- statement: r.get('statement'),
1190
- }));
1191
- });
1192
- }
1193
- /**
1194
- * Create a stream consumer in Memgraph
1195
- */
1196
- async createStream(name, type, topics, transformationProcedure, config) {
1197
- this.ensureConnected();
1198
- return this.executeWithRetry(async () => {
1199
- const configStr = Object.entries(config)
1200
- .map(([k, v]) => `${k} = '${v}'`)
1201
- .join(', ');
1202
- const query = `
1203
- CREATE ${type} STREAM ${name}
1204
- TOPICS ${topics.join(', ')}
1205
- TRANSFORM ${transformationProcedure}
1206
- ${configStr ? `CONFIGS { ${configStr} }` : ''}
1207
- `;
1208
- const session = this.getSession();
1209
- await session.run(query);
1210
- });
1211
- }
1212
- /**
1213
- * Run a MAGE algorithm (if installed)
1214
- */
1215
- async runMageAlgorithm(algorithm, params = {}) {
1216
- this.ensureConnected();
1217
- return this.executeWithRetry(async () => {
1218
- const paramsList = Object.entries(params)
1219
- .map(([k]) => `${k}: $${k}`)
1220
- .join(', ');
1221
- const query = `CALL ${algorithm}(${paramsList ? `{${paramsList}}` : ''}) YIELD *`;
1222
- const session = this.getSession();
1223
- const result = await session.run(query, params);
1224
- return result.records.map((r) => r.toObject());
1225
- });
1226
- }
1227
- // ==================== UTILITY METHODS ====================
1228
- buildWhereClause(where, alias = 'n') {
1229
- const conditions = [];
1230
- const params = {};
1231
- let paramIndex = 0;
1232
- const processCondition = (key, value, prefix = '') => {
1233
- const fullKey = prefix ? `${prefix}_${key}` : key;
1234
- const paramName = `param_${paramIndex++}`;
1235
- // Normalize key to lowercase for comparison
1236
- const normalizedKey = key.toLowerCase();
1237
- if (normalizedKey === '$and') {
1238
- const subConditions = [];
1239
- if (Array.isArray(value)) {
1240
- value.forEach((v) => {
1241
- Object.entries(v).forEach(([k, val]) => {
1242
- processCondition(k, val, fullKey);
1243
- subConditions.push(conditions.pop());
1244
- });
1245
- });
1246
- }
1247
- else {
1248
- Object.entries(value).forEach(([k, v]) => {
1249
- processCondition(k, v, fullKey);
1250
- subConditions.push(conditions.pop());
1251
- });
1252
- }
1253
- conditions.push(`(${subConditions.join(' AND ')})`);
1254
- return;
1255
- }
1256
- if (normalizedKey === '$or') {
1257
- const subConditions = [];
1258
- if (Array.isArray(value)) {
1259
- value.forEach((v) => {
1260
- Object.entries(v).forEach(([k, val]) => {
1261
- processCondition(k, val, fullKey);
1262
- subConditions.push(conditions.pop());
1263
- });
1264
- });
1265
- }
1266
- else {
1267
- Object.entries(value).forEach(([k, v]) => {
1268
- processCondition(k, v, fullKey);
1269
- subConditions.push(conditions.pop());
1270
- });
1271
- }
1272
- conditions.push(`(${subConditions.join(' OR ')})`);
1273
- return;
1274
- }
1275
- if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
1276
- Object.entries(value).forEach(([op, opValue]) => {
1277
- const normalizedOp = op.toLowerCase();
1278
- const opParamName = `${paramName}_${normalizedOp}`;
1279
- switch (normalizedOp) {
1280
- case '$gt':
1281
- conditions.push(`${alias}.${key} > $${opParamName}`);
1282
- params[opParamName] = opValue;
1283
- break;
1284
- case '$gte':
1285
- conditions.push(`${alias}.${key} >= $${opParamName}`);
1286
- params[opParamName] = opValue;
1287
- break;
1288
- case '$lt':
1289
- conditions.push(`${alias}.${key} < $${opParamName}`);
1290
- params[opParamName] = opValue;
1291
- break;
1292
- case '$lte':
1293
- conditions.push(`${alias}.${key} <= $${opParamName}`);
1294
- params[opParamName] = opValue;
1295
- break;
1296
- case '$ne':
1297
- conditions.push(`${alias}.${key} <> $${opParamName}`);
1298
- params[opParamName] = opValue;
1299
- break;
1300
- case '$in':
1301
- conditions.push(`${alias}.${key} IN $${opParamName}`);
1302
- params[opParamName] = opValue;
1303
- break;
1304
- case '$nin':
1305
- case '$not_in':
1306
- conditions.push(`NOT ${alias}.${key} IN $${opParamName}`);
1307
- params[opParamName] = opValue;
1308
- break;
1309
- case '$contains':
1310
- conditions.push(`${alias}.${key} CONTAINS $${opParamName}`);
1311
- params[opParamName] = opValue;
1312
- break;
1313
- case '$startswith':
1314
- case '$starts_with':
1315
- conditions.push(`${alias}.${key} STARTS WITH $${opParamName}`);
1316
- params[opParamName] = opValue;
1317
- break;
1318
- case '$endswith':
1319
- case '$ends_with':
1320
- conditions.push(`${alias}.${key} ENDS WITH $${opParamName}`);
1321
- params[opParamName] = opValue;
1322
- break;
1323
- case '$exists':
1324
- if (opValue) {
1325
- conditions.push(`${alias}.${key} IS NOT NULL`);
1326
- }
1327
- else {
1328
- conditions.push(`${alias}.${key} IS NULL`);
1329
- }
1330
- break;
1331
- case '$regex':
1332
- conditions.push(`${alias}.${key} =~ $${opParamName}`);
1333
- params[opParamName] = opValue;
1334
- break;
1335
- }
1336
- });
1337
- }
1338
- else {
1339
- conditions.push(`${alias}.${key} = $${paramName}`);
1340
- params[paramName] = value;
1341
- }
1342
- };
1343
- Object.entries(where).forEach(([key, value]) => {
1344
- processCondition(key, value);
1345
- });
1346
- return {
1347
- clause: conditions.join(' AND ') || 'true',
1348
- params,
1349
- };
1350
- }
1351
- parseError(error) {
1352
- if (error instanceof graph_error_1.GraphError) {
1353
- return error;
1354
- }
1355
- return graph_error_1.GraphError.queryError(String(error));
1356
- }
1357
- // ==================== PRIVATE HELPER METHODS ====================
1358
- mapMemgraphNode(node, nodeId) {
1359
- const id = nodeId !== undefined ? this.toNumber(nodeId) : this.toNumber(node.identity);
1360
- return {
1361
- id: String(id),
1362
- labels: node.labels || [],
1363
- properties: this.convertProperties(node.properties || {}),
1364
- };
1365
- }
1366
- mapMemgraphRelationship(rel, relId, startId, endId) {
1367
- const id = relId !== undefined ? this.toNumber(relId) : this.toNumber(rel.identity);
1368
- const start = startId !== undefined ? this.toNumber(startId) : this.toNumber(rel.start);
1369
- const end = endId !== undefined ? this.toNumber(endId) : this.toNumber(rel.end);
1370
- return {
1371
- id: String(id),
1372
- type: rel.type,
1373
- startNodeId: String(start),
1374
- endNodeId: String(end),
1375
- properties: this.convertProperties(rel.properties || {}),
1376
- };
1377
- }
1378
- mapMemgraphPath(path) {
1379
- const nodes = [];
1380
- const relationships = [];
1381
- if (path.segments) {
1382
- path.segments.forEach((segment, index) => {
1383
- if (index === 0) {
1384
- nodes.push(this.mapMemgraphNode(segment.start, segment.start.identity));
1385
- }
1386
- nodes.push(this.mapMemgraphNode(segment.end, segment.end.identity));
1387
- relationships.push(this.mapMemgraphRelationship(segment.relationship, segment.relationship.identity, segment.start.identity, segment.end.identity));
1388
- });
1389
- }
1390
- return {
1391
- nodes,
1392
- relationships,
1393
- length: relationships.length,
1394
- };
1395
- }
1396
- convertProperties(props) {
1397
- const result = {};
1398
- for (const [key, value] of Object.entries(props)) {
1399
- result[key] = this.convertValue(value);
1400
- }
1401
- return result;
1402
- }
1403
- convertValue(value) {
1404
- var _a, _b, _c;
1405
- if (value === null || value === undefined) {
1406
- return value;
1407
- }
1408
- // Handle Integer type (from neo4j-driver)
1409
- if (typeof value === 'object' && ((_a = value.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Integer') {
1410
- return this.toNumber(value);
1411
- }
1412
- // Handle Date types
1413
- if (typeof value === 'object' && (((_b = value.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'Date' || ((_c = value.constructor) === null || _c === void 0 ? void 0 : _c.name) === 'DateTime')) {
1414
- return new Date(value.toString());
1415
- }
1416
- if (Array.isArray(value)) {
1417
- return value.map(v => this.convertValue(v));
1418
- }
1419
- return value;
1420
- }
1421
- toNumber(value) {
1422
- if (value === null || value === undefined) {
1423
- return 0;
1424
- }
1425
- if (typeof value === 'number') {
1426
- return value;
1427
- }
1428
- if (typeof value === 'object' && typeof value.toNumber === 'function') {
1429
- return value.toNumber();
1430
- }
1431
- if (typeof value === 'object' && typeof value.toInt === 'function') {
1432
- return value.toInt();
1433
- }
1434
- return parseInt(String(value), 10) || 0;
1435
- }
1436
- getDirectionArrow(direction) {
1437
- switch (direction) {
1438
- case enums_1.TraversalDirection.OUTGOING:
1439
- case 'OUTGOING':
1440
- return { left: '-', right: '->' };
1441
- case enums_1.TraversalDirection.INCOMING:
1442
- case 'INCOMING':
1443
- return { left: '<-', right: '-' };
1444
- case enums_1.TraversalDirection.BOTH:
1445
- case 'BOTH':
1446
- default:
1447
- return { left: '-', right: '-' };
1448
- }
1449
- }
1450
- }
1451
- exports.MemgraphAdapter = MemgraphAdapter;
1452
- //# sourceMappingURL=memgraph.adapter.js.map