@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.
- package/package.json +5 -9
- package/dist/agents/agent-context.d.ts +0 -100
- package/dist/agents/agent-context.js +0 -604
- package/dist/agents/agent-context.js.map +0 -1
- package/dist/agents/agent-executor.d.ts +0 -180
- package/dist/agents/agent-executor.js +0 -715
- package/dist/agents/agent-executor.js.map +0 -1
- package/dist/agents/agents.service.d.ts +0 -310
- package/dist/agents/agents.service.js +0 -1255
- package/dist/agents/agents.service.js.map +0 -1
- package/dist/agents/index.d.ts +0 -55
- package/dist/agents/index.js +0 -110
- package/dist/agents/index.js.map +0 -1
- package/dist/agents/memory-manager.d.ts +0 -182
- package/dist/agents/memory-manager.js +0 -383
- package/dist/agents/memory-manager.js.map +0 -1
- package/dist/agents/tool-registry.d.ts +0 -141
- package/dist/agents/tool-registry.js +0 -355
- package/dist/agents/tool-registry.js.map +0 -1
- package/dist/agents/types/agents.types.d.ts +0 -1240
- package/dist/agents/types/agents.types.js +0 -12
- package/dist/agents/types/agents.types.js.map +0 -1
- package/dist/agents/types/index.d.ts +0 -6
- package/dist/agents/types/index.js +0 -23
- package/dist/agents/types/index.js.map +0 -1
- package/dist/agents/vector-store-adapter.d.ts +0 -108
- package/dist/agents/vector-store-adapter.js +0 -213
- package/dist/agents/vector-store-adapter.js.map +0 -1
- package/dist/api/services/appApi.service.d.ts +0 -78
- package/dist/api/services/appApi.service.js +0 -303
- package/dist/api/services/appApi.service.js.map +0 -1
- package/dist/api/services/logsApi.service.d.ts +0 -62
- package/dist/api/services/logsApi.service.js +0 -67
- package/dist/api/services/logsApi.service.js.map +0 -1
- package/dist/api/services/pricingApi.service.d.ts +0 -10
- package/dist/api/services/pricingApi.service.js +0 -34
- package/dist/api/services/pricingApi.service.js.map +0 -1
- package/dist/api/services/processorApi.service.d.ts +0 -927
- package/dist/api/services/processorApi.service.js +0 -787
- package/dist/api/services/processorApi.service.js.map +0 -1
- package/dist/api/services/productsApi.service.d.ts +0 -150
- package/dist/api/services/productsApi.service.js +0 -279
- package/dist/api/services/productsApi.service.js.map +0 -1
- package/dist/api/services/resilienceApi.service.d.ts +0 -106
- package/dist/api/services/resilienceApi.service.js +0 -224
- package/dist/api/services/resilienceApi.service.js.map +0 -1
- package/dist/api/services/secretsApi.service.d.ts +0 -51
- package/dist/api/services/secretsApi.service.js +0 -126
- package/dist/api/services/secretsApi.service.js.map +0 -1
- package/dist/api/services/userApi.service.d.ts +0 -10
- package/dist/api/services/userApi.service.js +0 -20
- package/dist/api/services/userApi.service.js.map +0 -1
- package/dist/api/services/webhooksApi.service.d.ts +0 -14
- package/dist/api/services/webhooksApi.service.js +0 -65
- package/dist/api/services/webhooksApi.service.js.map +0 -1
- package/dist/api/services/workflowApi.service.d.ts +0 -199
- package/dist/api/services/workflowApi.service.js +0 -201
- package/dist/api/services/workflowApi.service.js.map +0 -1
- package/dist/api/services/workspaceApi.service.d.ts +0 -20
- package/dist/api/services/workspaceApi.service.js +0 -54
- package/dist/api/services/workspaceApi.service.js.map +0 -1
- package/dist/api/urls.d.ts +0 -136
- package/dist/api/urls.js +0 -185
- package/dist/api/urls.js.map +0 -1
- package/dist/api/utils/auth.utils.d.ts +0 -10
- package/dist/api/utils/auth.utils.js +0 -24
- package/dist/api/utils/auth.utils.js.map +0 -1
- package/dist/api/utils/cache.utils.d.ts +0 -3
- package/dist/api/utils/cache.utils.js +0 -18
- package/dist/api/utils/cache.utils.js.map +0 -1
- package/dist/api/utils/strings.utils.d.ts +0 -7
- package/dist/api/utils/strings.utils.js +0 -64
- package/dist/api/utils/strings.utils.js.map +0 -1
- package/dist/apps/services/app.service.d.ts +0 -126
- package/dist/apps/services/app.service.js +0 -1436
- package/dist/apps/services/app.service.js.map +0 -1
- package/dist/apps/utils/auth-context-manager.d.ts +0 -137
- package/dist/apps/utils/auth-context-manager.js +0 -248
- package/dist/apps/utils/auth-context-manager.js.map +0 -1
- package/dist/apps/utils/credential-manager.d.ts +0 -128
- package/dist/apps/utils/credential-manager.js +0 -199
- package/dist/apps/utils/credential-manager.js.map +0 -1
- package/dist/apps/utils/index.d.ts +0 -10
- package/dist/apps/utils/index.js +0 -54
- package/dist/apps/utils/index.js.map +0 -1
- package/dist/apps/utils/input-helpers.d.ts +0 -67
- package/dist/apps/utils/input-helpers.js +0 -185
- package/dist/apps/utils/input-helpers.js.map +0 -1
- package/dist/apps/utils/input-resolver.d.ts +0 -165
- package/dist/apps/utils/input-resolver.js +0 -477
- package/dist/apps/utils/input-resolver.js.map +0 -1
- package/dist/apps/utils/oauth-manager.d.ts +0 -196
- package/dist/apps/utils/oauth-manager.js +0 -429
- package/dist/apps/utils/oauth-manager.js.map +0 -1
- package/dist/apps/utils/objects.utils.d.ts +0 -4
- package/dist/apps/utils/objects.utils.js +0 -59
- package/dist/apps/utils/objects.utils.js.map +0 -1
- package/dist/apps/utils/string.utils.d.ts +0 -9
- package/dist/apps/utils/string.utils.js +0 -89
- package/dist/apps/utils/string.utils.js.map +0 -1
- package/dist/apps/validators/index.d.ts +0 -17
- package/dist/apps/validators/index.js +0 -39
- package/dist/apps/validators/index.js.map +0 -1
- package/dist/apps/validators/joi-validators/create.app.validator.d.ts +0 -3
- package/dist/apps/validators/joi-validators/create.app.validator.js +0 -43
- package/dist/apps/validators/joi-validators/create.app.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/create.appAction.validator.d.ts +0 -3
- package/dist/apps/validators/joi-validators/create.appAction.validator.js +0 -72
- package/dist/apps/validators/joi-validators/create.appAction.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/create.appActionResponse.validator.d.ts +0 -7
- package/dist/apps/validators/joi-validators/create.appActionResponse.validator.js +0 -81
- package/dist/apps/validators/joi-validators/create.appActionResponse.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/create.appAuth.validator.d.ts +0 -3
- package/dist/apps/validators/joi-validators/create.appAuth.validator.js +0 -64
- package/dist/apps/validators/joi-validators/create.appAuth.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/create.appBody.validators.d.ts +0 -4
- package/dist/apps/validators/joi-validators/create.appBody.validators.js +0 -44
- package/dist/apps/validators/joi-validators/create.appBody.validators.js.map +0 -1
- package/dist/apps/validators/joi-validators/create.appConstants.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/create.appConstants.validator.js +0 -45
- package/dist/apps/validators/joi-validators/create.appConstants.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/create.appEnv.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/create.appEnv.validator.js +0 -50
- package/dist/apps/validators/joi-validators/create.appEnv.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/create.appVariable.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/create.appVariable.validator.js +0 -47
- package/dist/apps/validators/joi-validators/create.appVariable.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.js +0 -60
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.d.ts +0 -3
- package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.js +0 -48
- package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/sample.validator.d.ts +0 -6
- package/dist/apps/validators/joi-validators/sample.validator.js +0 -65
- package/dist/apps/validators/joi-validators/sample.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/update.app.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/update.app.validator.js +0 -66
- package/dist/apps/validators/joi-validators/update.app.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/update.appAction.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/update.appAction.validator.js +0 -76
- package/dist/apps/validators/joi-validators/update.appAction.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/update.appActionResponse.validator.d.ts +0 -3
- package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js +0 -57
- package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/update.appAuth.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/update.appAuth.validator.js +0 -52
- package/dist/apps/validators/joi-validators/update.appAuth.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/update.appConstants.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/update.appConstants.validator.js +0 -45
- package/dist/apps/validators/joi-validators/update.appConstants.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/update.appEnv.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/update.appEnv.validator.js +0 -50
- package/dist/apps/validators/joi-validators/update.appEnv.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/update.appVariables.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/update.appVariables.validator.js +0 -47
- package/dist/apps/validators/joi-validators/update.appVariables.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.js +0 -59
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.d.ts +0 -3
- package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.js +0 -48
- package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/update.validation.entityData.validator.d.ts +0 -3
- package/dist/apps/validators/joi-validators/update.validation.entityData.validator.js +0 -60
- package/dist/apps/validators/joi-validators/update.validation.entityData.validator.js.map +0 -1
- package/dist/bin.d.ts +0 -26
- package/dist/bin.js +0 -28
- package/dist/bin.js.map +0 -1
- package/dist/brokers/brokers.service.d.ts +0 -438
- package/dist/brokers/brokers.service.js +0 -1294
- package/dist/brokers/brokers.service.js.map +0 -1
- package/dist/brokers/index.d.ts +0 -46
- package/dist/brokers/index.js +0 -83
- package/dist/brokers/index.js.map +0 -1
- package/dist/brokers/types/index.d.ts +0 -569
- package/dist/brokers/types/index.js +0 -8
- package/dist/brokers/types/index.js.map +0 -1
- package/dist/brokers/utils/broker.util.d.ts +0 -33
- package/dist/brokers/utils/broker.util.js +0 -125
- package/dist/brokers/utils/broker.util.js.map +0 -1
- package/dist/brokers/utils/providers/aws-sqs.service.d.ts +0 -16
- package/dist/brokers/utils/providers/aws-sqs.service.js +0 -71
- package/dist/brokers/utils/providers/aws-sqs.service.js.map +0 -1
- package/dist/brokers/utils/providers/google-pubsub.service.d.ts +0 -16
- package/dist/brokers/utils/providers/google-pubsub.service.js +0 -43
- package/dist/brokers/utils/providers/google-pubsub.service.js.map +0 -1
- package/dist/brokers/utils/providers/index.d.ts +0 -6
- package/dist/brokers/utils/providers/index.js +0 -16
- package/dist/brokers/utils/providers/index.js.map +0 -1
- package/dist/brokers/utils/providers/kafka.service.d.ts +0 -23
- package/dist/brokers/utils/providers/kafka.service.js +0 -131
- package/dist/brokers/utils/providers/kafka.service.js.map +0 -1
- package/dist/brokers/utils/providers/nats.service.d.ts +0 -18
- package/dist/brokers/utils/providers/nats.service.js +0 -63
- package/dist/brokers/utils/providers/nats.service.js.map +0 -1
- package/dist/brokers/utils/providers/rabbitmq.service.d.ts +0 -25
- package/dist/brokers/utils/providers/rabbitmq.service.js +0 -138
- package/dist/brokers/utils/providers/rabbitmq.service.js.map +0 -1
- package/dist/brokers/utils/providers/redis.service.d.ts +0 -18
- package/dist/brokers/utils/providers/redis.service.js +0 -93
- package/dist/brokers/utils/providers/redis.service.js.map +0 -1
- package/dist/cache/cache.manager.d.ts +0 -308
- package/dist/cache/cache.manager.js +0 -900
- package/dist/cache/cache.manager.js.map +0 -1
- package/dist/cache/cache.service.d.ts +0 -192
- package/dist/cache/cache.service.js +0 -596
- package/dist/cache/cache.service.js.map +0 -1
- package/dist/cache/index.d.ts +0 -52
- package/dist/cache/index.js +0 -81
- package/dist/cache/index.js.map +0 -1
- package/dist/cache/types/index.d.ts +0 -112
- package/dist/cache/types/index.js +0 -6
- package/dist/cache/types/index.js.map +0 -1
- package/dist/clients/apps.client.d.ts +0 -4
- package/dist/clients/apps.client.js +0 -31
- package/dist/clients/apps.client.js.map +0 -1
- package/dist/clients/email.client.d.ts +0 -4
- package/dist/clients/email.client.js +0 -29
- package/dist/clients/email.client.js.map +0 -1
- package/dist/clients/expo.client.d.ts +0 -3
- package/dist/clients/expo.client.js +0 -28
- package/dist/clients/expo.client.js.map +0 -1
- package/dist/clients/function.client.d.ts +0 -3
- package/dist/clients/function.client.js +0 -27
- package/dist/clients/function.client.js.map +0 -1
- package/dist/clients/http.client.d.ts +0 -3
- package/dist/clients/http.client.js +0 -27
- package/dist/clients/http.client.js.map +0 -1
- package/dist/clients/logs.client.d.ts +0 -4
- package/dist/clients/logs.client.js +0 -34
- package/dist/clients/logs.client.js.map +0 -1
- package/dist/clients/pricing.client.d.ts +0 -4
- package/dist/clients/pricing.client.js +0 -34
- package/dist/clients/pricing.client.js.map +0 -1
- package/dist/clients/products.client.d.ts +0 -3
- package/dist/clients/products.client.js +0 -32
- package/dist/clients/products.client.js.map +0 -1
- package/dist/clients/users.client.d.ts +0 -4
- package/dist/clients/users.client.js +0 -34
- package/dist/clients/users.client.js.map +0 -1
- package/dist/clients/webhooks.client.d.ts +0 -4
- package/dist/clients/webhooks.client.js +0 -34
- package/dist/clients/webhooks.client.js.map +0 -1
- package/dist/clients/workspace.client.d.ts +0 -7
- package/dist/clients/workspace.client.js +0 -39
- package/dist/clients/workspace.client.js.map +0 -1
- package/dist/database/actions/action-manager.d.ts +0 -170
- package/dist/database/actions/action-manager.js +0 -465
- package/dist/database/actions/action-manager.js.map +0 -1
- package/dist/database/actions/index.d.ts +0 -6
- package/dist/database/actions/index.js +0 -13
- package/dist/database/actions/index.js.map +0 -1
- package/dist/database/adapters/adapter.factory.d.ts +0 -62
- package/dist/database/adapters/adapter.factory.js +0 -97
- package/dist/database/adapters/adapter.factory.js.map +0 -1
- package/dist/database/adapters/base.adapter.d.ts +0 -423
- package/dist/database/adapters/base.adapter.js +0 -260
- package/dist/database/adapters/base.adapter.js.map +0 -1
- package/dist/database/adapters/cassandra.adapter.d.ts +0 -92
- package/dist/database/adapters/cassandra.adapter.js +0 -1091
- package/dist/database/adapters/cassandra.adapter.js.map +0 -1
- package/dist/database/adapters/dynamodb.adapter.d.ts +0 -110
- package/dist/database/adapters/dynamodb.adapter.js +0 -1564
- package/dist/database/adapters/dynamodb.adapter.js.map +0 -1
- package/dist/database/adapters/index.d.ts +0 -11
- package/dist/database/adapters/index.js +0 -27
- package/dist/database/adapters/index.js.map +0 -1
- package/dist/database/adapters/mariadb.adapter.d.ts +0 -100
- package/dist/database/adapters/mariadb.adapter.js +0 -247
- package/dist/database/adapters/mariadb.adapter.js.map +0 -1
- package/dist/database/adapters/mongodb.adapter.d.ts +0 -121
- package/dist/database/adapters/mongodb.adapter.js +0 -1284
- package/dist/database/adapters/mongodb.adapter.js.map +0 -1
- package/dist/database/adapters/mysql.adapter.d.ts +0 -86
- package/dist/database/adapters/mysql.adapter.js +0 -1371
- package/dist/database/adapters/mysql.adapter.js.map +0 -1
- package/dist/database/adapters/postgresql.adapter.d.ts +0 -90
- package/dist/database/adapters/postgresql.adapter.js +0 -1487
- package/dist/database/adapters/postgresql.adapter.js.map +0 -1
- package/dist/database/databases.service.d.ts +0 -1496
- package/dist/database/databases.service.js +0 -3294
- package/dist/database/databases.service.js.map +0 -1
- package/dist/database/index.d.ts +0 -46
- package/dist/database/index.js +0 -109
- package/dist/database/index.js.map +0 -1
- package/dist/database/migrations/index.d.ts +0 -6
- package/dist/database/migrations/index.js +0 -12
- package/dist/database/migrations/index.js.map +0 -1
- package/dist/database/migrations/migration-engine.d.ts +0 -136
- package/dist/database/migrations/migration-engine.js +0 -1421
- package/dist/database/migrations/migration-engine.js.map +0 -1
- package/dist/database/operators/aggregation-builder.d.ts +0 -67
- package/dist/database/operators/aggregation-builder.js +0 -841
- package/dist/database/operators/aggregation-builder.js.map +0 -1
- package/dist/database/operators/index.d.ts +0 -7
- package/dist/database/operators/index.js +0 -15
- package/dist/database/operators/index.js.map +0 -1
- package/dist/database/operators/query-builder.d.ts +0 -69
- package/dist/database/operators/query-builder.js +0 -447
- package/dist/database/operators/query-builder.js.map +0 -1
- package/dist/database/presave/decrypt.d.ts +0 -25
- package/dist/database/presave/decrypt.js +0 -146
- package/dist/database/presave/decrypt.js.map +0 -1
- package/dist/database/presave/index.d.ts +0 -9
- package/dist/database/presave/index.js +0 -18
- package/dist/database/presave/index.js.map +0 -1
- package/dist/database/presave/presave-processor.d.ts +0 -148
- package/dist/database/presave/presave-processor.js +0 -702
- package/dist/database/presave/presave-processor.js.map +0 -1
- package/dist/database/schema/index.d.ts +0 -7
- package/dist/database/schema/index.js +0 -13
- package/dist/database/schema/index.js.map +0 -1
- package/dist/database/schema/schema-manager.d.ts +0 -258
- package/dist/database/schema/schema-manager.js +0 -638
- package/dist/database/schema/schema-manager.js.map +0 -1
- package/dist/database/transactions/index.d.ts +0 -6
- package/dist/database/transactions/index.js +0 -13
- package/dist/database/transactions/index.js.map +0 -1
- package/dist/database/transactions/transaction-manager.d.ts +0 -113
- package/dist/database/transactions/transaction-manager.js +0 -344
- package/dist/database/transactions/transaction-manager.js.map +0 -1
- package/dist/database/triggers/index.d.ts +0 -7
- package/dist/database/triggers/index.js +0 -14
- package/dist/database/triggers/index.js.map +0 -1
- package/dist/database/triggers/trigger-processor.d.ts +0 -239
- package/dist/database/triggers/trigger-processor.js +0 -1034
- package/dist/database/triggers/trigger-processor.js.map +0 -1
- package/dist/database/types/action.interface.d.ts +0 -148
- package/dist/database/types/action.interface.js +0 -6
- package/dist/database/types/action.interface.js.map +0 -1
- package/dist/database/types/aggregation.interface.d.ts +0 -185
- package/dist/database/types/aggregation.interface.js +0 -6
- package/dist/database/types/aggregation.interface.js.map +0 -1
- package/dist/database/types/connection.interface.d.ts +0 -137
- package/dist/database/types/connection.interface.js +0 -6
- package/dist/database/types/connection.interface.js.map +0 -1
- package/dist/database/types/dashboard.interface.d.ts +0 -74
- package/dist/database/types/dashboard.interface.js +0 -7
- package/dist/database/types/dashboard.interface.js.map +0 -1
- package/dist/database/types/enums.d.ts +0 -195
- package/dist/database/types/enums.js +0 -244
- package/dist/database/types/enums.js.map +0 -1
- package/dist/database/types/index.d.ts +0 -15
- package/dist/database/types/index.js +0 -31
- package/dist/database/types/index.js.map +0 -1
- package/dist/database/types/migration.interface.d.ts +0 -686
- package/dist/database/types/migration.interface.js +0 -9
- package/dist/database/types/migration.interface.js.map +0 -1
- package/dist/database/types/presave.interface.d.ts +0 -292
- package/dist/database/types/presave.interface.js +0 -60
- package/dist/database/types/presave.interface.js.map +0 -1
- package/dist/database/types/query.interface.d.ts +0 -205
- package/dist/database/types/query.interface.js +0 -6
- package/dist/database/types/query.interface.js.map +0 -1
- package/dist/database/types/schema.interface.d.ts +0 -412
- package/dist/database/types/schema.interface.js +0 -6
- package/dist/database/types/schema.interface.js.map +0 -1
- package/dist/database/types/transaction.interface.d.ts +0 -84
- package/dist/database/types/transaction.interface.js +0 -6
- package/dist/database/types/transaction.interface.js.map +0 -1
- package/dist/database/types/trigger.interface.d.ts +0 -612
- package/dist/database/types/trigger.interface.js +0 -121
- package/dist/database/types/trigger.interface.js.map +0 -1
- package/dist/database/types/write.interface.d.ts +0 -216
- package/dist/database/types/write.interface.js +0 -6
- package/dist/database/types/write.interface.js.map +0 -1
- package/dist/database/utils/database-error.d.ts +0 -96
- package/dist/database/utils/database-error.js +0 -221
- package/dist/database/utils/database-error.js.map +0 -1
- package/dist/database/utils/index.d.ts +0 -6
- package/dist/database/utils/index.js +0 -11
- package/dist/database/utils/index.js.map +0 -1
- package/dist/graph/adapters/adapter.factory.d.ts +0 -47
- package/dist/graph/adapters/adapter.factory.js +0 -77
- package/dist/graph/adapters/adapter.factory.js.map +0 -1
- package/dist/graph/adapters/arangodb.adapter.d.ts +0 -86
- package/dist/graph/adapters/arangodb.adapter.js +0 -1588
- package/dist/graph/adapters/arangodb.adapter.js.map +0 -1
- package/dist/graph/adapters/base.adapter.d.ts +0 -264
- package/dist/graph/adapters/base.adapter.js +0 -156
- package/dist/graph/adapters/base.adapter.js.map +0 -1
- package/dist/graph/adapters/index.d.ts +0 -11
- package/dist/graph/adapters/index.js +0 -21
- package/dist/graph/adapters/index.js.map +0 -1
- package/dist/graph/adapters/memgraph.adapter.d.ts +0 -110
- package/dist/graph/adapters/memgraph.adapter.js +0 -1452
- package/dist/graph/adapters/memgraph.adapter.js.map +0 -1
- package/dist/graph/adapters/neo4j.adapter.d.ts +0 -81
- package/dist/graph/adapters/neo4j.adapter.js +0 -1317
- package/dist/graph/adapters/neo4j.adapter.js.map +0 -1
- package/dist/graph/adapters/neptune.adapter.d.ts +0 -82
- package/dist/graph/adapters/neptune.adapter.js +0 -1369
- package/dist/graph/adapters/neptune.adapter.js.map +0 -1
- package/dist/graph/graphs.service.d.ts +0 -617
- package/dist/graph/graphs.service.js +0 -2594
- package/dist/graph/graphs.service.js.map +0 -1
- package/dist/graph/index.d.ts +0 -57
- package/dist/graph/index.js +0 -77
- package/dist/graph/index.js.map +0 -1
- package/dist/graph/transactions/index.d.ts +0 -4
- package/dist/graph/transactions/index.js +0 -9
- package/dist/graph/transactions/index.js.map +0 -1
- package/dist/graph/transactions/transaction-manager.d.ts +0 -61
- package/dist/graph/transactions/transaction-manager.js +0 -126
- package/dist/graph/transactions/transaction-manager.js.map +0 -1
- package/dist/graph/types/connection.interface.d.ts +0 -149
- package/dist/graph/types/connection.interface.js +0 -9
- package/dist/graph/types/connection.interface.js.map +0 -1
- package/dist/graph/types/enums.d.ts +0 -101
- package/dist/graph/types/enums.js +0 -114
- package/dist/graph/types/enums.js.map +0 -1
- package/dist/graph/types/index.d.ts +0 -13
- package/dist/graph/types/index.js +0 -20
- package/dist/graph/types/index.js.map +0 -1
- package/dist/graph/types/node.interface.d.ts +0 -248
- package/dist/graph/types/node.interface.js +0 -9
- package/dist/graph/types/node.interface.js.map +0 -1
- package/dist/graph/types/query.interface.d.ts +0 -175
- package/dist/graph/types/query.interface.js +0 -9
- package/dist/graph/types/query.interface.js.map +0 -1
- package/dist/graph/types/relationship.interface.d.ts +0 -207
- package/dist/graph/types/relationship.interface.js +0 -9
- package/dist/graph/types/relationship.interface.js.map +0 -1
- package/dist/graph/types/schema.interface.d.ts +0 -295
- package/dist/graph/types/schema.interface.js +0 -9
- package/dist/graph/types/schema.interface.js.map +0 -1
- package/dist/graph/types/transaction.interface.d.ts +0 -55
- package/dist/graph/types/transaction.interface.js +0 -9
- package/dist/graph/types/transaction.interface.js.map +0 -1
- package/dist/graph/types/traversal.interface.d.ts +0 -181
- package/dist/graph/types/traversal.interface.js +0 -9
- package/dist/graph/types/traversal.interface.js.map +0 -1
- package/dist/graph/utils/graph-error.d.ts +0 -71
- package/dist/graph/utils/graph-error.js +0 -142
- package/dist/graph/utils/graph-error.js.map +0 -1
- package/dist/graph/utils/index.d.ts +0 -4
- package/dist/graph/utils/index.js +0 -9
- package/dist/graph/utils/index.js.map +0 -1
- package/dist/imports/imports.repo.d.ts +0 -0
- package/dist/imports/imports.repo.js +0 -1
- package/dist/imports/imports.repo.js.map +0 -1
- package/dist/imports/imports.service.d.ts +0 -23
- package/dist/imports/imports.service.js +0 -71
- package/dist/imports/imports.service.js.map +0 -1
- package/dist/imports/imports.types.d.ts +0 -350
- package/dist/imports/imports.types.js +0 -33
- package/dist/imports/imports.types.js.map +0 -1
- package/dist/imports/openAPI3.0.types.d.ts +0 -52
- package/dist/imports/openAPI3.0.types.js +0 -3
- package/dist/imports/openAPI3.0.types.js.map +0 -1
- package/dist/imports/repos/openApi.repo.d.ts +0 -6
- package/dist/imports/repos/openApi.repo.js +0 -422
- package/dist/imports/repos/openApi.repo.js.map +0 -1
- package/dist/imports/repos/postmanV21.repo.d.ts +0 -14
- package/dist/imports/repos/postmanV21.repo.js +0 -257
- package/dist/imports/repos/postmanV21.repo.js.map +0 -1
- package/dist/imports/utils/imports.utils.d.ts +0 -80
- package/dist/imports/utils/imports.utils.js +0 -114
- package/dist/imports/utils/imports.utils.js.map +0 -1
- package/dist/imports/validators/index.d.ts +0 -0
- package/dist/imports/validators/index.js +0 -1
- package/dist/imports/validators/index.js.map +0 -1
- package/dist/imports/validators/joi-validators/postmanV21.validator.d.ts +0 -5
- package/dist/imports/validators/joi-validators/postmanV21.validator.js +0 -96
- package/dist/imports/validators/joi-validators/postmanV21.validator.js.map +0 -1
- package/dist/index.d.ts +0 -4021
- package/dist/index.js +0 -5895
- package/dist/index.js.map +0 -1
- package/dist/init.interface.d.ts +0 -407
- package/dist/init.interface.js +0 -3
- package/dist/init.interface.js.map +0 -1
- package/dist/inputs/inputs.repo.d.ts +0 -7
- package/dist/inputs/inputs.repo.js +0 -16
- package/dist/inputs/inputs.repo.js.map +0 -1
- package/dist/inputs/inputs.service.d.ts +0 -61
- package/dist/inputs/inputs.service.js +0 -468
- package/dist/inputs/inputs.service.js.map +0 -1
- package/dist/inputs/utils/inputs.utils.create.d.ts +0 -11
- package/dist/inputs/utils/inputs.utils.create.js +0 -273
- package/dist/inputs/utils/inputs.utils.create.js.map +0 -1
- package/dist/inputs/validators/inputs.validator.parse.d.ts +0 -4
- package/dist/inputs/validators/inputs.validator.parse.js +0 -53
- package/dist/inputs/validators/inputs.validator.parse.js.map +0 -1
- package/dist/jobs/index.d.ts +0 -38
- package/dist/jobs/index.js +0 -50
- package/dist/jobs/index.js.map +0 -1
- package/dist/jobs/jobs.service.d.ts +0 -154
- package/dist/jobs/jobs.service.js +0 -491
- package/dist/jobs/jobs.service.js.map +0 -1
- package/dist/jobs/jobs.state.d.ts +0 -113
- package/dist/jobs/jobs.state.js +0 -447
- package/dist/jobs/jobs.state.js.map +0 -1
- package/dist/jobs/types.d.ts +0 -449
- package/dist/jobs/types.js +0 -74
- package/dist/jobs/types.js.map +0 -1
- package/dist/logs/logs.repo.d.ts +0 -6
- package/dist/logs/logs.repo.js +0 -12
- package/dist/logs/logs.repo.js.map +0 -1
- package/dist/logs/logs.service.d.ts +0 -30
- package/dist/logs/logs.service.js +0 -89
- package/dist/logs/logs.service.js.map +0 -1
- package/dist/logs/logs.types.d.ts +0 -85
- package/dist/logs/logs.types.js +0 -52
- package/dist/logs/logs.types.js.map +0 -1
- package/dist/logs/utils/logs.utils.create.d.ts +0 -0
- package/dist/logs/utils/logs.utils.create.js +0 -1
- package/dist/logs/utils/logs.utils.create.js.map +0 -1
- package/dist/logs/utils/logs.utils.errors.d.ts +0 -2
- package/dist/logs/utils/logs.utils.errors.js +0 -8
- package/dist/logs/utils/logs.utils.errors.js.map +0 -1
- package/dist/models/index.d.ts +0 -6
- package/dist/models/index.js +0 -11
- package/dist/models/index.js.map +0 -1
- package/dist/models/models.service.d.ts +0 -137
- package/dist/models/models.service.js +0 -195
- package/dist/models/models.service.js.map +0 -1
- package/dist/notifications/index.d.ts +0 -13
- package/dist/notifications/index.js +0 -26
- package/dist/notifications/index.js.map +0 -1
- package/dist/notifications/notifications.service.d.ts +0 -268
- package/dist/notifications/notifications.service.js +0 -907
- package/dist/notifications/notifications.service.js.map +0 -1
- package/dist/notifications/types/index.d.ts +0 -4
- package/dist/notifications/types/index.js +0 -21
- package/dist/notifications/types/index.js.map +0 -1
- package/dist/notifications/types/notifications.types.d.ts +0 -454
- package/dist/notifications/types/notifications.types.js +0 -51
- package/dist/notifications/types/notifications.types.js.map +0 -1
- package/dist/parsers/index.d.ts +0 -3
- package/dist/parsers/index.js +0 -27
- package/dist/parsers/index.js.map +0 -1
- package/dist/parsers/pipelines/postman.pipelines.d.ts +0 -15
- package/dist/parsers/pipelines/postman.pipelines.js +0 -103
- package/dist/parsers/pipelines/postman.pipelines.js.map +0 -1
- package/dist/parsers/types/postman.types.d.ts +0 -200
- package/dist/parsers/types/postman.types.js +0 -3
- package/dist/parsers/types/postman.types.js.map +0 -1
- package/dist/parsers/utils/postman.utils.d.ts +0 -12
- package/dist/parsers/utils/postman.utils.js +0 -116
- package/dist/parsers/utils/postman.utils.js.map +0 -1
- package/dist/parsers/validators/postman-auth.validators.d.ts +0 -10
- package/dist/parsers/validators/postman-auth.validators.js +0 -127
- package/dist/parsers/validators/postman-auth.validators.js.map +0 -1
- package/dist/parsers/validators/postman-request.validators.d.ts +0 -13
- package/dist/parsers/validators/postman-request.validators.js +0 -139
- package/dist/parsers/validators/postman-request.validators.js.map +0 -1
- package/dist/parsers/validators/postman-response.validators.d.ts +0 -13
- package/dist/parsers/validators/postman-response.validators.js +0 -150
- package/dist/parsers/validators/postman-response.validators.js.map +0 -1
- package/dist/parsers/validators/postman-variable.validators.d.ts +0 -14
- package/dist/parsers/validators/postman-variable.validators.js +0 -163
- package/dist/parsers/validators/postman-variable.validators.js.map +0 -1
- package/dist/pricing/pricing.repo.d.ts +0 -0
- package/dist/pricing/pricing.repo.js +0 -1
- package/dist/pricing/pricing.repo.js.map +0 -1
- package/dist/pricing/pricing.service.d.ts +0 -24
- package/dist/pricing/pricing.service.js +0 -51
- package/dist/pricing/pricing.service.js.map +0 -1
- package/dist/pricing/pricing.types.d.ts +0 -76
- package/dist/pricing/pricing.types.js +0 -21
- package/dist/pricing/pricing.types.js.map +0 -1
- package/dist/pricing/utils/string.utils.d.ts +0 -1
- package/dist/pricing/utils/string.utils.js +0 -9
- package/dist/pricing/utils/string.utils.js.map +0 -1
- package/dist/processor/repos/mongo.repo.d.ts +0 -39
- package/dist/processor/repos/mongo.repo.js +0 -260
- package/dist/processor/repos/mongo.repo.js.map +0 -1
- package/dist/processor/repos/postgres.repo.d.ts +0 -31
- package/dist/processor/repos/postgres.repo.js +0 -185
- package/dist/processor/repos/postgres.repo.js.map +0 -1
- package/dist/processor/repos/sms.repo.d.ts +0 -39
- package/dist/processor/repos/sms.repo.js +0 -124
- package/dist/processor/repos/sms.repo.js.map +0 -1
- package/dist/processor/services/processor.service.d.ts +0 -465
- package/dist/processor/services/processor.service.js +0 -5343
- package/dist/processor/services/processor.service.js.map +0 -1
- package/dist/processor/services/request.service.d.ts +0 -36
- package/dist/processor/services/request.service.js +0 -304
- package/dist/processor/services/request.service.js.map +0 -1
- package/dist/processor/types/request.types.d.ts +0 -14
- package/dist/processor/types/request.types.js +0 -3
- package/dist/processor/types/request.types.js.map +0 -1
- package/dist/processor/utils/processor.utils.d.ts +0 -104
- package/dist/processor/utils/processor.utils.js +0 -1066
- package/dist/processor/utils/processor.utils.js.map +0 -1
- package/dist/processor/utils/request.utils.d.ts +0 -20
- package/dist/processor/utils/request.utils.js +0 -113
- package/dist/processor/utils/request.utils.js.map +0 -1
- package/dist/processor/utils/storage.util.d.ts +0 -8
- package/dist/processor/utils/storage.util.js +0 -106
- package/dist/processor/utils/storage.util.js.map +0 -1
- package/dist/products/services/products.service.d.ts +0 -577
- package/dist/products/services/products.service.js +0 -5845
- package/dist/products/services/products.service.js.map +0 -1
- package/dist/products/utils/crypt.utils.d.ts +0 -1
- package/dist/products/utils/crypt.utils.js +0 -17
- package/dist/products/utils/crypt.utils.js.map +0 -1
- package/dist/products/utils/functions.utils.d.ts +0 -13
- package/dist/products/utils/functions.utils.js +0 -294
- package/dist/products/utils/functions.utils.js.map +0 -1
- package/dist/products/utils/objects.utils.d.ts +0 -13
- package/dist/products/utils/objects.utils.js +0 -89
- package/dist/products/utils/objects.utils.js.map +0 -1
- package/dist/products/utils/string.utils.d.ts +0 -12
- package/dist/products/utils/string.utils.js +0 -168
- package/dist/products/utils/string.utils.js.map +0 -1
- package/dist/products/validators/index.d.ts +0 -33
- package/dist/products/validators/index.js +0 -75
- package/dist/products/validators/index.js.map +0 -1
- package/dist/products/validators/joi-validators/create.html.validator.d.ts +0 -2
- package/dist/products/validators/joi-validators/create.html.validator.js +0 -55
- package/dist/products/validators/joi-validators/create.html.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productAgent.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productAgent.validator.js +0 -266
- package/dist/products/validators/joi-validators/create.productAgent.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productApp.validator.d.ts +0 -4
- package/dist/products/validators/joi-validators/create.productApp.validator.js +0 -61
- package/dist/products/validators/joi-validators/create.productApp.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productCache.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productCache.validator.js +0 -46
- package/dist/products/validators/joi-validators/create.productCache.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productDatabase.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productDatabase.validator.js +0 -77
- package/dist/products/validators/joi-validators/create.productDatabase.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.d.ts +0 -7
- package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js +0 -194
- package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productDatabaseMigration.validator.d.ts +0 -4
- package/dist/products/validators/joi-validators/create.productDatabaseMigration.validator.js +0 -63
- package/dist/products/validators/joi-validators/create.productDatabaseMigration.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productEnv.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productEnv.validator.js +0 -45
- package/dist/products/validators/joi-validators/create.productEnv.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productFallback.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productFallback.validator.js +0 -64
- package/dist/products/validators/joi-validators/create.productFallback.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productFeature.validator.d.ts +0 -14
- package/dist/products/validators/joi-validators/create.productFeature.validator.js +0 -140
- package/dist/products/validators/joi-validators/create.productFeature.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productFunction.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productFunction.validator.js +0 -57
- package/dist/products/validators/joi-validators/create.productFunction.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productGraph.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productGraph.validator.js +0 -89
- package/dist/products/validators/joi-validators/create.productGraph.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productHealthcheck.validator.d.ts +0 -4
- package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js +0 -58
- package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productJob.validator.d.ts +0 -12
- package/dist/products/validators/joi-validators/create.productJob.validator.js +0 -60
- package/dist/products/validators/joi-validators/create.productJob.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js +0 -52
- package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js +0 -193
- package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productModel.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productModel.validator.js +0 -132
- package/dist/products/validators/joi-validators/create.productModel.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productNotification.validator.d.ts +0 -4
- package/dist/products/validators/joi-validators/create.productNotification.validator.js +0 -241
- package/dist/products/validators/joi-validators/create.productNotification.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productNotificationMessage.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productNotificationMessage.validator.js +0 -57
- package/dist/products/validators/joi-validators/create.productNotificationMessage.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productNotifications.validator.d.ts +0 -0
- package/dist/products/validators/joi-validators/create.productNotifications.validator.js +0 -1
- package/dist/products/validators/joi-validators/create.productNotifications.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productQuota.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productQuota.validator.js +0 -67
- package/dist/products/validators/joi-validators/create.productQuota.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productStorage.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productStorage.validator.js +0 -158
- package/dist/products/validators/joi-validators/create.productStorage.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productVector.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.productVector.validator.js +0 -136
- package/dist/products/validators/joi-validators/create.productVector.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.products.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.products.validator.js +0 -43
- package/dist/products/validators/joi-validators/create.products.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.requestAction.validator.d.ts +0 -2
- package/dist/products/validators/joi-validators/create.requestAction.validator.js +0 -45
- package/dist/products/validators/joi-validators/create.requestAction.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.userAuth.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.userAuth.validator.js +0 -48
- package/dist/products/validators/joi-validators/create.userAuth.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/register.productWebhooks.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/register.productWebhooks.validator.js +0 -48
- package/dist/products/validators/joi-validators/register.productWebhooks.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.dataValue.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.dataValue.validator.js +0 -103
- package/dist/products/validators/joi-validators/update.dataValue.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productApp.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productApp.validator.js +0 -42
- package/dist/products/validators/joi-validators/update.productApp.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productCache.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productCache.validator.js +0 -45
- package/dist/products/validators/joi-validators/update.productCache.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productDatabase.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productDatabase.validator.js +0 -76
- package/dist/products/validators/joi-validators/update.productDatabase.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js +0 -79
- package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productDatabaseMigration.validator.d.ts +0 -4
- package/dist/products/validators/joi-validators/update.productDatabaseMigration.validator.js +0 -64
- package/dist/products/validators/joi-validators/update.productDatabaseMigration.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productEnv.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productEnv.validator.js +0 -46
- package/dist/products/validators/joi-validators/update.productEnv.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productFallback.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productFallback.validator.js +0 -60
- package/dist/products/validators/joi-validators/update.productFallback.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productFeature.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productFeature.validator.js +0 -53
- package/dist/products/validators/joi-validators/update.productFeature.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productFunction.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productFunction.validator.js +0 -41
- package/dist/products/validators/joi-validators/update.productFunction.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productGraph.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productGraph.validator.js +0 -88
- package/dist/products/validators/joi-validators/update.productGraph.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productJob.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productJob.validator.js +0 -50
- package/dist/products/validators/joi-validators/update.productJob.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js +0 -52
- package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productNotification.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productNotification.validator.js +0 -47
- package/dist/products/validators/joi-validators/update.productNotification.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productNotificationMessage.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productNotificationMessage.validator.js +0 -58
- package/dist/products/validators/joi-validators/update.productNotificationMessage.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productQuota.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.productQuota.validator.js +0 -64
- package/dist/products/validators/joi-validators/update.productQuota.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.userAuth.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/update.userAuth.validator.js +0 -48
- package/dist/products/validators/joi-validators/update.userAuth.validator.js.map +0 -1
- package/dist/resilience/fallback.service.d.ts +0 -141
- package/dist/resilience/fallback.service.js +0 -766
- package/dist/resilience/fallback.service.js.map +0 -1
- package/dist/resilience/healthcheck.service.d.ts +0 -163
- package/dist/resilience/healthcheck.service.js +0 -1012
- package/dist/resilience/healthcheck.service.js.map +0 -1
- package/dist/resilience/index.d.ts +0 -104
- package/dist/resilience/index.js +0 -140
- package/dist/resilience/index.js.map +0 -1
- package/dist/resilience/quota.service.d.ts +0 -83
- package/dist/resilience/quota.service.js +0 -518
- package/dist/resilience/quota.service.js.map +0 -1
- package/dist/resilience/resilience.service.d.ts +0 -98
- package/dist/resilience/resilience.service.js +0 -560
- package/dist/resilience/resilience.service.js.map +0 -1
- package/dist/resilience/types/index.d.ts +0 -513
- package/dist/resilience/types/index.js +0 -29
- package/dist/resilience/types/index.js.map +0 -1
- package/dist/secrets/index.d.ts +0 -10
- package/dist/secrets/index.js +0 -33
- package/dist/secrets/index.js.map +0 -1
- package/dist/secrets/secrets.resolver.d.ts +0 -52
- package/dist/secrets/secrets.resolver.js +0 -236
- package/dist/secrets/secrets.resolver.js.map +0 -1
- package/dist/secrets/secrets.service.d.ts +0 -93
- package/dist/secrets/secrets.service.js +0 -246
- package/dist/secrets/secrets.service.js.map +0 -1
- package/dist/secrets/secrets.types.d.ts +0 -188
- package/dist/secrets/secrets.types.js +0 -87
- package/dist/secrets/secrets.types.js.map +0 -1
- package/dist/sessions/index.d.ts +0 -50
- package/dist/sessions/index.js +0 -96
- package/dist/sessions/index.js.map +0 -1
- package/dist/sessions/sessions.helper.d.ts +0 -88
- package/dist/sessions/sessions.helper.js +0 -190
- package/dist/sessions/sessions.helper.js.map +0 -1
- package/dist/sessions/sessions.resolver.d.ts +0 -188
- package/dist/sessions/sessions.resolver.js +0 -603
- package/dist/sessions/sessions.resolver.js.map +0 -1
- package/dist/sessions/sessions.service.d.ts +0 -194
- package/dist/sessions/sessions.service.js +0 -988
- package/dist/sessions/sessions.service.js.map +0 -1
- package/dist/sessions/types/index.d.ts +0 -344
- package/dist/sessions/types/index.js +0 -6
- package/dist/sessions/types/index.js.map +0 -1
- package/dist/storage/index.d.ts +0 -66
- package/dist/storage/index.js +0 -99
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/storage.service.d.ts +0 -177
- package/dist/storage/storage.service.js +0 -905
- package/dist/storage/storage.service.js.map +0 -1
- package/dist/storage/types/index.d.ts +0 -270
- package/dist/storage/types/index.js +0 -6
- package/dist/storage/types/index.js.map +0 -1
- package/dist/storage/utils/storage.util.d.ts +0 -62
- package/dist/storage/utils/storage.util.js +0 -593
- package/dist/storage/utils/storage.util.js.map +0 -1
- package/dist/types/actions.types.d.ts +0 -0
- package/dist/types/actions.types.js +0 -1
- package/dist/types/actions.types.js.map +0 -1
- package/dist/types/appBuilder.types.d.ts +0 -316
- package/dist/types/appBuilder.types.js +0 -3
- package/dist/types/appBuilder.types.js.map +0 -1
- package/dist/types/database.types.d.ts +0 -9
- package/dist/types/database.types.js +0 -3
- package/dist/types/database.types.js.map +0 -1
- package/dist/types/enums.d.ts +0 -231
- package/dist/types/enums.js +0 -261
- package/dist/types/enums.js.map +0 -1
- package/dist/types/index.d.ts +0 -12
- package/dist/types/index.js +0 -29
- package/dist/types/index.js.map +0 -1
- package/dist/types/index.types.d.ts +0 -30
- package/dist/types/index.types.js +0 -9
- package/dist/types/index.types.js.map +0 -1
- package/dist/types/inputs.types.d.ts +0 -114
- package/dist/types/inputs.types.js +0 -44
- package/dist/types/inputs.types.js.map +0 -1
- package/dist/types/logs.types.d.ts +0 -19
- package/dist/types/logs.types.js +0 -8
- package/dist/types/logs.types.js.map +0 -1
- package/dist/types/pricing.types.d.ts +0 -4
- package/dist/types/pricing.types.js +0 -3
- package/dist/types/pricing.types.js.map +0 -1
- package/dist/types/processor.types.d.ts +0 -602
- package/dist/types/processor.types.js +0 -19
- package/dist/types/processor.types.js.map +0 -1
- package/dist/types/productsBuilder.types.d.ts +0 -1566
- package/dist/types/productsBuilder.types.js +0 -303
- package/dist/types/productsBuilder.types.js.map +0 -1
- package/dist/types/request-tracker.interface.d.ts +0 -0
- package/dist/types/request-tracker.interface.js +0 -1
- package/dist/types/request-tracker.interface.js.map +0 -1
- package/dist/types/requests.types.d.ts +0 -8
- package/dist/types/requests.types.js +0 -3
- package/dist/types/requests.types.js.map +0 -1
- package/dist/types/workspaces.types.d.ts +0 -28
- package/dist/types/workspaces.types.js +0 -4
- package/dist/types/workspaces.types.js.map +0 -1
- package/dist/utils/constants.d.ts +0 -1
- package/dist/utils/constants.js +0 -5
- package/dist/utils/constants.js.map +0 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +0 -109
- package/dist/utils/index.js.map +0 -1
- package/dist/vector/actions/action-manager.d.ts +0 -140
- package/dist/vector/actions/action-manager.js +0 -356
- package/dist/vector/actions/action-manager.js.map +0 -1
- package/dist/vector/adapters/base.adapter.d.ts +0 -169
- package/dist/vector/adapters/base.adapter.js +0 -218
- package/dist/vector/adapters/base.adapter.js.map +0 -1
- package/dist/vector/adapters/index.d.ts +0 -10
- package/dist/vector/adapters/index.js +0 -19
- package/dist/vector/adapters/index.js.map +0 -1
- package/dist/vector/adapters/memory.adapter.d.ts +0 -85
- package/dist/vector/adapters/memory.adapter.js +0 -505
- package/dist/vector/adapters/memory.adapter.js.map +0 -1
- package/dist/vector/adapters/pinecone.adapter.d.ts +0 -52
- package/dist/vector/adapters/pinecone.adapter.js +0 -433
- package/dist/vector/adapters/pinecone.adapter.js.map +0 -1
- package/dist/vector/adapters/qdrant.adapter.d.ts +0 -56
- package/dist/vector/adapters/qdrant.adapter.js +0 -442
- package/dist/vector/adapters/qdrant.adapter.js.map +0 -1
- package/dist/vector/adapters/weaviate.adapter.d.ts +0 -68
- package/dist/vector/adapters/weaviate.adapter.js +0 -661
- package/dist/vector/adapters/weaviate.adapter.js.map +0 -1
- package/dist/vector/index.d.ts +0 -36
- package/dist/vector/index.js +0 -70
- package/dist/vector/index.js.map +0 -1
- package/dist/vector/types/action.interface.d.ts +0 -195
- package/dist/vector/types/action.interface.js +0 -100
- package/dist/vector/types/action.interface.js.map +0 -1
- package/dist/vector/types/connection.interface.d.ts +0 -151
- package/dist/vector/types/connection.interface.js +0 -8
- package/dist/vector/types/connection.interface.js.map +0 -1
- package/dist/vector/types/embedding.interface.d.ts +0 -144
- package/dist/vector/types/embedding.interface.js +0 -8
- package/dist/vector/types/embedding.interface.js.map +0 -1
- package/dist/vector/types/enums.d.ts +0 -104
- package/dist/vector/types/enums.js +0 -113
- package/dist/vector/types/enums.js.map +0 -1
- package/dist/vector/types/index.d.ts +0 -11
- package/dist/vector/types/index.js +0 -23
- package/dist/vector/types/index.js.map +0 -1
- package/dist/vector/types/vector.interface.d.ts +0 -315
- package/dist/vector/types/vector.interface.js +0 -8
- package/dist/vector/types/vector.interface.js.map +0 -1
- package/dist/vector/utils/index.d.ts +0 -6
- package/dist/vector/utils/index.js +0 -11
- package/dist/vector/utils/index.js.map +0 -1
- package/dist/vector/utils/vector-error.d.ts +0 -69
- package/dist/vector/utils/vector-error.js +0 -116
- package/dist/vector/utils/vector-error.js.map +0 -1
- package/dist/vector/vector-database.service.d.ts +0 -484
- package/dist/vector/vector-database.service.js +0 -1002
- package/dist/vector/vector-database.service.js.map +0 -1
- package/dist/vector/vector.service.d.ts +0 -283
- package/dist/vector/vector.service.js +0 -544
- package/dist/vector/vector.service.js.map +0 -1
- package/dist/warehouse/executor/index.d.ts +0 -5
- package/dist/warehouse/executor/index.js +0 -12
- package/dist/warehouse/executor/index.js.map +0 -1
- package/dist/warehouse/executor/joins/index.d.ts +0 -5
- package/dist/warehouse/executor/joins/index.js +0 -11
- package/dist/warehouse/executor/joins/index.js.map +0 -1
- package/dist/warehouse/executor/joins/join-executor.d.ts +0 -101
- package/dist/warehouse/executor/joins/join-executor.js +0 -493
- package/dist/warehouse/executor/joins/join-executor.js.map +0 -1
- package/dist/warehouse/executor/joins/semantic-join.d.ts +0 -64
- package/dist/warehouse/executor/joins/semantic-join.js +0 -241
- package/dist/warehouse/executor/joins/semantic-join.js.map +0 -1
- package/dist/warehouse/executor/single-source-executor.d.ts +0 -155
- package/dist/warehouse/executor/single-source-executor.js +0 -573
- package/dist/warehouse/executor/single-source-executor.js.map +0 -1
- package/dist/warehouse/index.d.ts +0 -79
- package/dist/warehouse/index.js +0 -111
- package/dist/warehouse/index.js.map +0 -1
- package/dist/warehouse/parser/index.d.ts +0 -4
- package/dist/warehouse/parser/index.js +0 -10
- package/dist/warehouse/parser/index.js.map +0 -1
- package/dist/warehouse/parser/query-parser.d.ts +0 -181
- package/dist/warehouse/parser/query-parser.js +0 -415
- package/dist/warehouse/parser/query-parser.js.map +0 -1
- package/dist/warehouse/registry/data-source-registry.d.ts +0 -207
- package/dist/warehouse/registry/data-source-registry.js +0 -396
- package/dist/warehouse/registry/data-source-registry.js.map +0 -1
- package/dist/warehouse/registry/index.d.ts +0 -4
- package/dist/warehouse/registry/index.js +0 -9
- package/dist/warehouse/registry/index.js.map +0 -1
- package/dist/warehouse/transactions/index.d.ts +0 -4
- package/dist/warehouse/transactions/index.js +0 -9
- package/dist/warehouse/transactions/index.js.map +0 -1
- package/dist/warehouse/transactions/saga-orchestrator.d.ts +0 -92
- package/dist/warehouse/transactions/saga-orchestrator.js +0 -383
- package/dist/warehouse/transactions/saga-orchestrator.js.map +0 -1
- package/dist/warehouse/types/index.d.ts +0 -9
- package/dist/warehouse/types/index.js +0 -33
- package/dist/warehouse/types/index.js.map +0 -1
- package/dist/warehouse/types/join.interface.d.ts +0 -225
- package/dist/warehouse/types/join.interface.js +0 -87
- package/dist/warehouse/types/join.interface.js.map +0 -1
- package/dist/warehouse/types/query.interface.d.ts +0 -232
- package/dist/warehouse/types/query.interface.js +0 -9
- package/dist/warehouse/types/query.interface.js.map +0 -1
- package/dist/warehouse/types/transaction.interface.d.ts +0 -236
- package/dist/warehouse/types/transaction.interface.js +0 -74
- package/dist/warehouse/types/transaction.interface.js.map +0 -1
- package/dist/warehouse/types/where.interface.d.ts +0 -208
- package/dist/warehouse/types/where.interface.js +0 -89
- package/dist/warehouse/types/where.interface.js.map +0 -1
- package/dist/warehouse/warehouse.service.d.ts +0 -200
- package/dist/warehouse/warehouse.service.js +0 -470
- package/dist/warehouse/warehouse.service.js.map +0 -1
- package/dist/workflows/index.d.ts +0 -30
- package/dist/workflows/index.js +0 -64
- package/dist/workflows/index.js.map +0 -1
- package/dist/workflows/types/index.d.ts +0 -6
- package/dist/workflows/types/index.js +0 -23
- package/dist/workflows/types/index.js.map +0 -1
- package/dist/workflows/types/workflows.types.d.ts +0 -1095
- package/dist/workflows/types/workflows.types.js +0 -13
- package/dist/workflows/types/workflows.types.js.map +0 -1
- package/dist/workflows/workflow-builder.d.ts +0 -70
- package/dist/workflows/workflow-builder.js +0 -353
- package/dist/workflows/workflow-builder.js.map +0 -1
- package/dist/workflows/workflow-executor.d.ts +0 -289
- package/dist/workflows/workflow-executor.js +0 -2467
- package/dist/workflows/workflow-executor.js.map +0 -1
- package/dist/workflows/workflows.service.d.ts +0 -412
- package/dist/workflows/workflows.service.js +0 -2233
- package/dist/workflows/workflows.service.js.map +0 -1
|
@@ -1,1369 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Amazon Neptune Graph Database Adapter
|
|
4
|
-
*
|
|
5
|
-
* Implements the BaseGraphAdapter for Amazon Neptune using Gremlin.
|
|
6
|
-
* Neptune is a fully managed graph database service that supports
|
|
7
|
-
* both property graph (Gremlin) and RDF (SPARQL) query languages.
|
|
8
|
-
*
|
|
9
|
-
* Key features:
|
|
10
|
-
* - Apache TinkerPop Gremlin support
|
|
11
|
-
* - WebSocket connection support
|
|
12
|
-
* - IAM authentication support
|
|
13
|
-
* - High availability and replication
|
|
14
|
-
*/
|
|
15
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
-
}
|
|
21
|
-
Object.defineProperty(o, k2, desc);
|
|
22
|
-
}) : (function(o, m, k, k2) {
|
|
23
|
-
if (k2 === undefined) k2 = k;
|
|
24
|
-
o[k2] = m[k];
|
|
25
|
-
}));
|
|
26
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
-
}) : function(o, v) {
|
|
29
|
-
o["default"] = v;
|
|
30
|
-
});
|
|
31
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
-
var ownKeys = function(o) {
|
|
33
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
-
var ar = [];
|
|
35
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
-
return ar;
|
|
37
|
-
};
|
|
38
|
-
return ownKeys(o);
|
|
39
|
-
};
|
|
40
|
-
return function (mod) {
|
|
41
|
-
if (mod && mod.__esModule) return mod;
|
|
42
|
-
var result = {};
|
|
43
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
-
__setModuleDefault(result, mod);
|
|
45
|
-
return result;
|
|
46
|
-
};
|
|
47
|
-
})();
|
|
48
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
-
exports.NeptuneAdapter = void 0;
|
|
50
|
-
const base_adapter_1 = require("./base.adapter");
|
|
51
|
-
const enums_1 = require("../types/enums");
|
|
52
|
-
const graph_error_1 = require("../utils/graph-error");
|
|
53
|
-
/**
|
|
54
|
-
* Neptune adapter using Gremlin
|
|
55
|
-
* Uses the gremlin package for TinkerPop connectivity
|
|
56
|
-
*/
|
|
57
|
-
class NeptuneAdapter extends base_adapter_1.BaseGraphAdapter {
|
|
58
|
-
constructor() {
|
|
59
|
-
super(...arguments);
|
|
60
|
-
this.graphType = enums_1.GraphType.NEPTUNE;
|
|
61
|
-
this.supportedFeatures = new Set([
|
|
62
|
-
enums_1.GraphFeature.SCHEMA_INDEXES,
|
|
63
|
-
enums_1.GraphFeature.GRAPH_ALGORITHMS,
|
|
64
|
-
]);
|
|
65
|
-
this.connection = null;
|
|
66
|
-
this.g = null; // Gremlin graph traversal source
|
|
67
|
-
this.gremlin = null;
|
|
68
|
-
}
|
|
69
|
-
// ==================== CONNECTION MANAGEMENT ====================
|
|
70
|
-
async connect(options) {
|
|
71
|
-
try {
|
|
72
|
-
// Store connection options for reconnection
|
|
73
|
-
this.connectionOptions = options;
|
|
74
|
-
// Dynamic import of gremlin package
|
|
75
|
-
this.gremlin = await Promise.resolve().then(() => __importStar(require('gremlin')));
|
|
76
|
-
const { DriverRemoteConnection } = this.gremlin.driver;
|
|
77
|
-
// Neptune WebSocket connection URL
|
|
78
|
-
const wsUrl = options.connectionUrl.replace(/^https?:\/\//, 'wss://').replace(/\/?$/, '/gremlin');
|
|
79
|
-
// Connection options for Neptune
|
|
80
|
-
const connectionOptions = {
|
|
81
|
-
mimeType: 'application/vnd.gremlin-v2.0+json',
|
|
82
|
-
pingEnabled: true,
|
|
83
|
-
pingInterval: 30000,
|
|
84
|
-
};
|
|
85
|
-
// Add authentication if provided
|
|
86
|
-
if (options.auth) {
|
|
87
|
-
// For IAM auth, you'd typically use AWS4 signing
|
|
88
|
-
// This is a simplified version - production would need proper IAM signing
|
|
89
|
-
connectionOptions.headers = {
|
|
90
|
-
Authorization: `Basic ${Buffer.from(`${options.auth.username}:${options.auth.password}`).toString('base64')}`,
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
this.connection = new DriverRemoteConnection(wsUrl, connectionOptions);
|
|
94
|
-
// Create graph traversal source
|
|
95
|
-
const { Graph } = this.gremlin.structure;
|
|
96
|
-
const graph = new Graph();
|
|
97
|
-
this.g = graph.traversal().withRemote(this.connection);
|
|
98
|
-
// Test the connection
|
|
99
|
-
await this.g.V().limit(1).toList();
|
|
100
|
-
this.connected = true;
|
|
101
|
-
this.connectionUrl = options.connectionUrl;
|
|
102
|
-
return {
|
|
103
|
-
connected: true,
|
|
104
|
-
type: enums_1.GraphType.NEPTUNE,
|
|
105
|
-
latency: 0,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
catch (error) {
|
|
109
|
-
this.connected = false;
|
|
110
|
-
throw graph_error_1.GraphError.connectionError(`Failed to connect to Neptune: ${error.message}`, error);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
async testConnection(options) {
|
|
114
|
-
try {
|
|
115
|
-
const gremlin = await Promise.resolve().then(() => __importStar(require('gremlin')));
|
|
116
|
-
const { DriverRemoteConnection } = gremlin.driver;
|
|
117
|
-
const startTime = Date.now();
|
|
118
|
-
const wsUrl = options.connectionUrl.replace(/^https?:\/\//, 'wss://').replace(/\/?$/, '/gremlin');
|
|
119
|
-
const testConnection = new DriverRemoteConnection(wsUrl, {
|
|
120
|
-
mimeType: 'application/vnd.gremlin-v2.0+json',
|
|
121
|
-
});
|
|
122
|
-
const { Graph } = gremlin.structure;
|
|
123
|
-
const graph = new Graph();
|
|
124
|
-
const testG = graph.traversal().withRemote(testConnection);
|
|
125
|
-
// Test query
|
|
126
|
-
await testG.V().limit(1).toList();
|
|
127
|
-
await testConnection.close();
|
|
128
|
-
return {
|
|
129
|
-
connected: true,
|
|
130
|
-
type: enums_1.GraphType.NEPTUNE,
|
|
131
|
-
version: 'Neptune',
|
|
132
|
-
latency: Date.now() - startTime,
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
catch (error) {
|
|
136
|
-
return {
|
|
137
|
-
connected: false,
|
|
138
|
-
type: enums_1.GraphType.NEPTUNE,
|
|
139
|
-
error: error.message,
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
async disconnect() {
|
|
144
|
-
if (this.connection) {
|
|
145
|
-
await this.connection.close();
|
|
146
|
-
this.connection = null;
|
|
147
|
-
this.g = null;
|
|
148
|
-
}
|
|
149
|
-
this.connected = false;
|
|
150
|
-
}
|
|
151
|
-
ensureTraversal() {
|
|
152
|
-
this.ensureConnected();
|
|
153
|
-
if (!this.g) {
|
|
154
|
-
throw new Error('Graph traversal source not initialized');
|
|
155
|
-
}
|
|
156
|
-
return this.g;
|
|
157
|
-
}
|
|
158
|
-
// ==================== NODE OPERATIONS ====================
|
|
159
|
-
async createNode(options, _transaction) {
|
|
160
|
-
const g = this.ensureTraversal();
|
|
161
|
-
return this.executeWithRetry(async () => {
|
|
162
|
-
const { t } = this.gremlin.process;
|
|
163
|
-
// Start with addV for the first label
|
|
164
|
-
let traversal = g.addV(options.labels[0]);
|
|
165
|
-
// Add additional labels
|
|
166
|
-
for (let i = 1; i < options.labels.length; i++) {
|
|
167
|
-
traversal = traversal.property(t.label, options.labels[i]);
|
|
168
|
-
}
|
|
169
|
-
// Add properties
|
|
170
|
-
if (options.properties) {
|
|
171
|
-
for (const [key, value] of Object.entries(options.properties)) {
|
|
172
|
-
if (value !== undefined && value !== null) {
|
|
173
|
-
traversal = traversal.property(key, value);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
const result = await traversal.next();
|
|
178
|
-
const vertex = result.value;
|
|
179
|
-
// Fetch the complete vertex with properties
|
|
180
|
-
const fullVertex = await g.V(vertex.id).valueMap(true).next();
|
|
181
|
-
return {
|
|
182
|
-
node: this.mapGremlinVertex(vertex.id, fullVertex.value),
|
|
183
|
-
created: true,
|
|
184
|
-
};
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
async findNodes(options, _transaction) {
|
|
188
|
-
const g = this.ensureTraversal();
|
|
189
|
-
return this.executeWithRetry(async () => {
|
|
190
|
-
var _a, _b;
|
|
191
|
-
let traversal = g.V();
|
|
192
|
-
// Filter by labels
|
|
193
|
-
if ((_a = options.labels) === null || _a === void 0 ? void 0 : _a.length) {
|
|
194
|
-
traversal = traversal.hasLabel(...options.labels);
|
|
195
|
-
}
|
|
196
|
-
// Apply where conditions
|
|
197
|
-
if (options.where) {
|
|
198
|
-
traversal = this.applyWhereConditions(traversal, options.where);
|
|
199
|
-
}
|
|
200
|
-
// Apply ordering
|
|
201
|
-
if ((_b = options.orderBy) === null || _b === void 0 ? void 0 : _b.length) {
|
|
202
|
-
const { order } = this.gremlin.process;
|
|
203
|
-
for (const orderSpec of options.orderBy) {
|
|
204
|
-
const orderDir = orderSpec.direction.toUpperCase() === 'DESC' ? order.desc : order.asc;
|
|
205
|
-
traversal = traversal.order().by(orderSpec.property, orderDir);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
// Apply pagination
|
|
209
|
-
if (options.skip) {
|
|
210
|
-
traversal = traversal.skip(options.skip);
|
|
211
|
-
}
|
|
212
|
-
if (options.limit) {
|
|
213
|
-
traversal = traversal.limit(options.limit);
|
|
214
|
-
}
|
|
215
|
-
// Get vertices with properties
|
|
216
|
-
const results = await traversal.valueMap(true).toList();
|
|
217
|
-
const nodes = results.map((v) => this.mapGremlinVertexFromValueMap(v));
|
|
218
|
-
return {
|
|
219
|
-
nodes,
|
|
220
|
-
count: nodes.length,
|
|
221
|
-
};
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
async findNodeById(id, _transaction) {
|
|
225
|
-
const g = this.ensureTraversal();
|
|
226
|
-
return this.executeWithRetry(async () => {
|
|
227
|
-
const results = await g.V(id).valueMap(true).toList();
|
|
228
|
-
if (results.length === 0) {
|
|
229
|
-
return null;
|
|
230
|
-
}
|
|
231
|
-
return this.mapGremlinVertexFromValueMap(results[0]);
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
async updateNode(options, _transaction) {
|
|
235
|
-
const g = this.ensureTraversal();
|
|
236
|
-
return this.executeWithRetry(async () => {
|
|
237
|
-
var _a;
|
|
238
|
-
let traversal;
|
|
239
|
-
if (options.id) {
|
|
240
|
-
traversal = g.V(options.id);
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
traversal = g.V();
|
|
244
|
-
if ((_a = options.labels) === null || _a === void 0 ? void 0 : _a.length) {
|
|
245
|
-
traversal = traversal.hasLabel(...options.labels);
|
|
246
|
-
}
|
|
247
|
-
if (options.where) {
|
|
248
|
-
traversal = this.applyWhereConditions(traversal, options.where);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
// Update properties
|
|
252
|
-
if (options.properties) {
|
|
253
|
-
for (const [key, value] of Object.entries(options.properties)) {
|
|
254
|
-
if (value !== undefined && value !== null) {
|
|
255
|
-
traversal = traversal.property(this.gremlin.process.cardinality.single, key, value);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
const results = await traversal.valueMap(true).toList();
|
|
260
|
-
const nodes = results.map((v) => this.mapGremlinVertexFromValueMap(v));
|
|
261
|
-
return {
|
|
262
|
-
node: nodes.length === 1 ? nodes[0] : undefined,
|
|
263
|
-
nodes: nodes.length > 1 ? nodes : undefined,
|
|
264
|
-
updatedCount: nodes.length,
|
|
265
|
-
updated: nodes.length > 0,
|
|
266
|
-
};
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
async deleteNode(options, _transaction) {
|
|
270
|
-
const g = this.ensureTraversal();
|
|
271
|
-
return this.executeWithRetry(async () => {
|
|
272
|
-
var _a, _b;
|
|
273
|
-
let traversal;
|
|
274
|
-
if (options.id) {
|
|
275
|
-
traversal = g.V(options.id);
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
traversal = g.V();
|
|
279
|
-
if ((_a = options.labels) === null || _a === void 0 ? void 0 : _a.length) {
|
|
280
|
-
traversal = traversal.hasLabel(...options.labels);
|
|
281
|
-
}
|
|
282
|
-
if (options.where) {
|
|
283
|
-
traversal = this.applyWhereConditions(traversal, options.where);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
// Count before delete
|
|
287
|
-
const countResult = await traversal.count().next();
|
|
288
|
-
const count = countResult.value;
|
|
289
|
-
// In Gremlin, drop() removes the vertex and all connected edges
|
|
290
|
-
if (options.id) {
|
|
291
|
-
await g.V(options.id).drop().iterate();
|
|
292
|
-
}
|
|
293
|
-
else {
|
|
294
|
-
let dropTraversal = g.V();
|
|
295
|
-
if ((_b = options.labels) === null || _b === void 0 ? void 0 : _b.length) {
|
|
296
|
-
dropTraversal = dropTraversal.hasLabel(...options.labels);
|
|
297
|
-
}
|
|
298
|
-
if (options.where) {
|
|
299
|
-
dropTraversal = this.applyWhereConditions(dropTraversal, options.where);
|
|
300
|
-
}
|
|
301
|
-
await dropTraversal.drop().iterate();
|
|
302
|
-
}
|
|
303
|
-
return {
|
|
304
|
-
deleted: count > 0,
|
|
305
|
-
deletedCount: count,
|
|
306
|
-
};
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
async mergeNode(options, _transaction) {
|
|
310
|
-
const g = this.ensureTraversal();
|
|
311
|
-
return this.executeWithRetry(async () => {
|
|
312
|
-
// Check if node exists
|
|
313
|
-
let matchTraversal = g.V().hasLabel(options.labels[0]);
|
|
314
|
-
for (const [key, value] of Object.entries(options.matchProperties)) {
|
|
315
|
-
matchTraversal = matchTraversal.has(key, value);
|
|
316
|
-
}
|
|
317
|
-
const existing = await matchTraversal.toList();
|
|
318
|
-
if (existing.length > 0) {
|
|
319
|
-
// Update existing node
|
|
320
|
-
let updateTraversal = g.V(existing[0].id);
|
|
321
|
-
if (options.onMatch) {
|
|
322
|
-
for (const [key, value] of Object.entries(options.onMatch)) {
|
|
323
|
-
if (value !== undefined && value !== null) {
|
|
324
|
-
updateTraversal = updateTraversal.property(this.gremlin.process.cardinality.single, key, value);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
const updated = await updateTraversal.valueMap(true).next();
|
|
329
|
-
return {
|
|
330
|
-
node: this.mapGremlinVertexFromValueMap(updated.value),
|
|
331
|
-
created: false,
|
|
332
|
-
merged: true,
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
else {
|
|
336
|
-
// Create new node
|
|
337
|
-
let createTraversal = g.addV(options.labels[0]);
|
|
338
|
-
// Add match properties
|
|
339
|
-
for (const [key, value] of Object.entries(options.matchProperties)) {
|
|
340
|
-
if (value !== undefined && value !== null) {
|
|
341
|
-
createTraversal = createTraversal.property(key, value);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
// Add onCreate properties
|
|
345
|
-
if (options.onCreate) {
|
|
346
|
-
for (const [key, value] of Object.entries(options.onCreate)) {
|
|
347
|
-
if (value !== undefined && value !== null) {
|
|
348
|
-
createTraversal = createTraversal.property(key, value);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
const created = await createTraversal.next();
|
|
353
|
-
const fullVertex = await g.V(created.value.id).valueMap(true).next();
|
|
354
|
-
return {
|
|
355
|
-
node: this.mapGremlinVertexFromValueMap(fullVertex.value),
|
|
356
|
-
created: true,
|
|
357
|
-
merged: true,
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
// ==================== LABEL MANAGEMENT ====================
|
|
363
|
-
async addLabels(options, _transaction) {
|
|
364
|
-
const g = this.ensureTraversal();
|
|
365
|
-
return this.executeWithRetry(async () => {
|
|
366
|
-
// In Gremlin/Neptune, vertices have a single label
|
|
367
|
-
// We can add additional labels by adding them as properties or using multi-labels if supported
|
|
368
|
-
// Neptune supports multi-labels via the ::label property pattern
|
|
369
|
-
// For now, we'll treat it as a limitation - Neptune vertices typically have a single label
|
|
370
|
-
// Get the vertex first
|
|
371
|
-
const vertex = await g.V(options.id).next();
|
|
372
|
-
if (!vertex.value) {
|
|
373
|
-
throw graph_error_1.GraphError.notFoundError(`Node with ID ${options.id} not found`);
|
|
374
|
-
}
|
|
375
|
-
// Neptune doesn't natively support adding labels to existing vertices
|
|
376
|
-
// This is a limitation of the Gremlin model
|
|
377
|
-
// We store additional labels as a property
|
|
378
|
-
const existingLabelsResult = await g.V(options.id).values('_additionalLabels').toList();
|
|
379
|
-
const existingLabels = existingLabelsResult.length > 0
|
|
380
|
-
? JSON.parse(existingLabelsResult[0])
|
|
381
|
-
: [];
|
|
382
|
-
const newLabels = [...new Set([...existingLabels, ...options.labels])];
|
|
383
|
-
await g.V(options.id)
|
|
384
|
-
.property('_additionalLabels', JSON.stringify(newLabels))
|
|
385
|
-
.next();
|
|
386
|
-
const fullVertex = await g.V(options.id).valueMap(true).next();
|
|
387
|
-
const node = this.mapGremlinVertexFromValueMap(fullVertex.value);
|
|
388
|
-
// Add the additional labels to the node's labels array
|
|
389
|
-
node.labels = [...new Set([...node.labels, ...options.labels])];
|
|
390
|
-
return {
|
|
391
|
-
node,
|
|
392
|
-
addedLabels: options.labels,
|
|
393
|
-
};
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
async removeLabels(options, _transaction) {
|
|
397
|
-
const g = this.ensureTraversal();
|
|
398
|
-
return this.executeWithRetry(async () => {
|
|
399
|
-
// Get the vertex first
|
|
400
|
-
const vertex = await g.V(options.id).next();
|
|
401
|
-
if (!vertex.value) {
|
|
402
|
-
throw graph_error_1.GraphError.notFoundError(`Node with ID ${options.id} not found`);
|
|
403
|
-
}
|
|
404
|
-
// Get existing additional labels
|
|
405
|
-
const existingLabelsResult = await g.V(options.id).values('_additionalLabels').toList();
|
|
406
|
-
const existingLabels = existingLabelsResult.length > 0
|
|
407
|
-
? JSON.parse(existingLabelsResult[0])
|
|
408
|
-
: [];
|
|
409
|
-
// Remove the specified labels
|
|
410
|
-
const newLabels = existingLabels.filter(l => !options.labels.includes(l));
|
|
411
|
-
await g.V(options.id)
|
|
412
|
-
.property('_additionalLabels', JSON.stringify(newLabels))
|
|
413
|
-
.next();
|
|
414
|
-
const fullVertex = await g.V(options.id).valueMap(true).next();
|
|
415
|
-
const node = this.mapGremlinVertexFromValueMap(fullVertex.value);
|
|
416
|
-
return {
|
|
417
|
-
node,
|
|
418
|
-
removedLabels: options.labels,
|
|
419
|
-
};
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
async setLabels(options, _transaction) {
|
|
423
|
-
const g = this.ensureTraversal();
|
|
424
|
-
return this.executeWithRetry(async () => {
|
|
425
|
-
// Get the vertex first
|
|
426
|
-
const vertex = await g.V(options.id).next();
|
|
427
|
-
if (!vertex.value) {
|
|
428
|
-
throw graph_error_1.GraphError.notFoundError(`Node with ID ${options.id} not found`);
|
|
429
|
-
}
|
|
430
|
-
// Get current labels (primary label + additional)
|
|
431
|
-
const primaryLabel = await g.V(options.id).label().next();
|
|
432
|
-
const existingLabelsResult = await g.V(options.id).values('_additionalLabels').toList();
|
|
433
|
-
const additionalLabels = existingLabelsResult.length > 0
|
|
434
|
-
? JSON.parse(existingLabelsResult[0])
|
|
435
|
-
: [];
|
|
436
|
-
const previousLabels = [primaryLabel.value, ...additionalLabels];
|
|
437
|
-
// In Neptune, we can't change the primary label, so we store all labels as additional
|
|
438
|
-
// Filter out the primary label from the new labels
|
|
439
|
-
const newAdditionalLabels = options.labels.filter(l => l !== primaryLabel.value);
|
|
440
|
-
await g.V(options.id)
|
|
441
|
-
.property('_additionalLabels', JSON.stringify(newAdditionalLabels))
|
|
442
|
-
.next();
|
|
443
|
-
const fullVertex = await g.V(options.id).valueMap(true).next();
|
|
444
|
-
const node = this.mapGremlinVertexFromValueMap(fullVertex.value);
|
|
445
|
-
node.labels = [primaryLabel.value, ...newAdditionalLabels];
|
|
446
|
-
return {
|
|
447
|
-
node,
|
|
448
|
-
previousLabels,
|
|
449
|
-
newLabels: options.labels,
|
|
450
|
-
};
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
// ==================== RELATIONSHIP OPERATIONS ====================
|
|
454
|
-
async createRelationship(options, _transaction) {
|
|
455
|
-
const g = this.ensureTraversal();
|
|
456
|
-
return this.executeWithRetry(async () => {
|
|
457
|
-
const { __ } = this.gremlin.process;
|
|
458
|
-
let traversal = g.V(options.startNodeId)
|
|
459
|
-
.addE(options.type)
|
|
460
|
-
.to(__.V(options.endNodeId));
|
|
461
|
-
// Add properties
|
|
462
|
-
if (options.properties) {
|
|
463
|
-
for (const [key, value] of Object.entries(options.properties)) {
|
|
464
|
-
if (value !== undefined && value !== null) {
|
|
465
|
-
traversal = traversal.property(key, value);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
const result = await traversal.next();
|
|
470
|
-
const edge = result.value;
|
|
471
|
-
// Fetch full edge with properties
|
|
472
|
-
const fullEdge = await g.E(edge.id).valueMap(true).next();
|
|
473
|
-
return {
|
|
474
|
-
relationship: this.mapGremlinEdge(edge, fullEdge.value, options.startNodeId, options.endNodeId),
|
|
475
|
-
created: true,
|
|
476
|
-
};
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
async findRelationships(options, _transaction) {
|
|
480
|
-
const g = this.ensureTraversal();
|
|
481
|
-
return this.executeWithRetry(async () => {
|
|
482
|
-
const { __ } = this.gremlin.process;
|
|
483
|
-
let traversal;
|
|
484
|
-
if (options.startNodeId) {
|
|
485
|
-
traversal = g.V(options.startNodeId).outE();
|
|
486
|
-
}
|
|
487
|
-
else if (options.endNodeId) {
|
|
488
|
-
traversal = g.V(options.endNodeId).inE();
|
|
489
|
-
}
|
|
490
|
-
else {
|
|
491
|
-
traversal = g.E();
|
|
492
|
-
}
|
|
493
|
-
// Filter by type
|
|
494
|
-
const types = options.type
|
|
495
|
-
? (Array.isArray(options.type) ? options.type : [options.type])
|
|
496
|
-
: (options.types || []);
|
|
497
|
-
if (types.length > 0) {
|
|
498
|
-
traversal = traversal.hasLabel(...types);
|
|
499
|
-
}
|
|
500
|
-
// Apply where conditions
|
|
501
|
-
if (options.where) {
|
|
502
|
-
traversal = this.applyWhereConditions(traversal, options.where);
|
|
503
|
-
}
|
|
504
|
-
// Apply endpoint filtering if both are specified
|
|
505
|
-
if (options.startNodeId && options.endNodeId) {
|
|
506
|
-
traversal = traversal.where(__.inV().hasId(options.endNodeId));
|
|
507
|
-
}
|
|
508
|
-
// Apply pagination
|
|
509
|
-
if (options.skip) {
|
|
510
|
-
traversal = traversal.skip(options.skip);
|
|
511
|
-
}
|
|
512
|
-
if (options.limit) {
|
|
513
|
-
traversal = traversal.limit(options.limit);
|
|
514
|
-
}
|
|
515
|
-
// Get edges with in/out vertices
|
|
516
|
-
const results = await traversal.project('edge', 'outV', 'inV')
|
|
517
|
-
.by(__.valueMap(true))
|
|
518
|
-
.by(__.outV().id())
|
|
519
|
-
.by(__.inV().id())
|
|
520
|
-
.toList();
|
|
521
|
-
const relationships = results.map((r) => this.mapGremlinEdgeFromProject(r));
|
|
522
|
-
return {
|
|
523
|
-
relationships,
|
|
524
|
-
count: relationships.length,
|
|
525
|
-
};
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
async findRelationshipById(id, _transaction) {
|
|
529
|
-
const g = this.ensureTraversal();
|
|
530
|
-
return this.executeWithRetry(async () => {
|
|
531
|
-
const { __ } = this.gremlin.process;
|
|
532
|
-
const results = await g.E(id)
|
|
533
|
-
.project('edge', 'outV', 'inV')
|
|
534
|
-
.by(__.valueMap(true))
|
|
535
|
-
.by(__.outV().id())
|
|
536
|
-
.by(__.inV().id())
|
|
537
|
-
.toList();
|
|
538
|
-
if (results.length === 0) {
|
|
539
|
-
return null;
|
|
540
|
-
}
|
|
541
|
-
return this.mapGremlinEdgeFromProject(results[0]);
|
|
542
|
-
});
|
|
543
|
-
}
|
|
544
|
-
async updateRelationship(options, _transaction) {
|
|
545
|
-
const g = this.ensureTraversal();
|
|
546
|
-
return this.executeWithRetry(async () => {
|
|
547
|
-
const { __ } = this.gremlin.process;
|
|
548
|
-
let traversal;
|
|
549
|
-
if (options.id) {
|
|
550
|
-
traversal = g.E(options.id);
|
|
551
|
-
}
|
|
552
|
-
else {
|
|
553
|
-
traversal = g.E();
|
|
554
|
-
if (options.type) {
|
|
555
|
-
traversal = traversal.hasLabel(options.type);
|
|
556
|
-
}
|
|
557
|
-
if (options.where) {
|
|
558
|
-
traversal = this.applyWhereConditions(traversal, options.where);
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
// Update properties
|
|
562
|
-
if (options.properties) {
|
|
563
|
-
for (const [key, value] of Object.entries(options.properties)) {
|
|
564
|
-
if (value !== undefined && value !== null) {
|
|
565
|
-
traversal = traversal.property(key, value);
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
// Get updated edges
|
|
570
|
-
const results = await traversal.project('edge', 'outV', 'inV')
|
|
571
|
-
.by(__.valueMap(true))
|
|
572
|
-
.by(__.outV().id())
|
|
573
|
-
.by(__.inV().id())
|
|
574
|
-
.toList();
|
|
575
|
-
const relationships = results.map((r) => this.mapGremlinEdgeFromProject(r));
|
|
576
|
-
return {
|
|
577
|
-
relationship: relationships.length === 1 ? relationships[0] : undefined,
|
|
578
|
-
relationships: relationships.length > 1 ? relationships : undefined,
|
|
579
|
-
updatedCount: relationships.length,
|
|
580
|
-
updated: relationships.length > 0,
|
|
581
|
-
};
|
|
582
|
-
});
|
|
583
|
-
}
|
|
584
|
-
async deleteRelationship(options, _transaction) {
|
|
585
|
-
const g = this.ensureTraversal();
|
|
586
|
-
return this.executeWithRetry(async () => {
|
|
587
|
-
let traversal;
|
|
588
|
-
if (options.id) {
|
|
589
|
-
traversal = g.E(options.id);
|
|
590
|
-
}
|
|
591
|
-
else {
|
|
592
|
-
if (options.startNodeId && options.endNodeId && options.type) {
|
|
593
|
-
traversal = g.V(options.startNodeId).outE(options.type).where(this.gremlin.process.__.inV().hasId(options.endNodeId));
|
|
594
|
-
}
|
|
595
|
-
else {
|
|
596
|
-
traversal = g.E();
|
|
597
|
-
if (options.type) {
|
|
598
|
-
traversal = traversal.hasLabel(options.type);
|
|
599
|
-
}
|
|
600
|
-
if (options.where) {
|
|
601
|
-
traversal = this.applyWhereConditions(traversal, options.where);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
// Count before delete
|
|
606
|
-
let countTraversal;
|
|
607
|
-
if (options.id) {
|
|
608
|
-
countTraversal = g.E(options.id);
|
|
609
|
-
}
|
|
610
|
-
else if (options.startNodeId && options.endNodeId && options.type) {
|
|
611
|
-
countTraversal = g.V(options.startNodeId).outE(options.type).where(this.gremlin.process.__.inV().hasId(options.endNodeId));
|
|
612
|
-
}
|
|
613
|
-
else {
|
|
614
|
-
countTraversal = g.E();
|
|
615
|
-
if (options.type) {
|
|
616
|
-
countTraversal = countTraversal.hasLabel(options.type);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
const countResult = await countTraversal.count().next();
|
|
620
|
-
const count = countResult.value;
|
|
621
|
-
// Delete
|
|
622
|
-
await traversal.drop().iterate();
|
|
623
|
-
return {
|
|
624
|
-
deleted: count > 0,
|
|
625
|
-
deletedCount: count,
|
|
626
|
-
};
|
|
627
|
-
});
|
|
628
|
-
}
|
|
629
|
-
async mergeRelationship(options, _transaction) {
|
|
630
|
-
const g = this.ensureTraversal();
|
|
631
|
-
return this.executeWithRetry(async () => {
|
|
632
|
-
const { __ } = this.gremlin.process;
|
|
633
|
-
// Check if relationship exists
|
|
634
|
-
let matchTraversal = g.V(options.startNodeId).outE(options.type).where(__.inV().hasId(options.endNodeId));
|
|
635
|
-
if (options.matchProperties) {
|
|
636
|
-
for (const [key, value] of Object.entries(options.matchProperties)) {
|
|
637
|
-
matchTraversal = matchTraversal.has(key, value);
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
const existing = await matchTraversal.toList();
|
|
641
|
-
if (existing.length > 0) {
|
|
642
|
-
// Update existing relationship
|
|
643
|
-
let updateTraversal = g.E(existing[0].id);
|
|
644
|
-
if (options.onMatch) {
|
|
645
|
-
for (const [key, value] of Object.entries(options.onMatch)) {
|
|
646
|
-
if (value !== undefined && value !== null) {
|
|
647
|
-
updateTraversal = updateTraversal.property(key, value);
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
const updated = await updateTraversal.project('edge', 'outV', 'inV')
|
|
652
|
-
.by(__.valueMap(true))
|
|
653
|
-
.by(__.outV().id())
|
|
654
|
-
.by(__.inV().id())
|
|
655
|
-
.next();
|
|
656
|
-
return {
|
|
657
|
-
relationship: this.mapGremlinEdgeFromProject(updated.value),
|
|
658
|
-
created: false,
|
|
659
|
-
merged: true,
|
|
660
|
-
};
|
|
661
|
-
}
|
|
662
|
-
else {
|
|
663
|
-
// Create new relationship
|
|
664
|
-
let createTraversal = g.V(options.startNodeId)
|
|
665
|
-
.addE(options.type)
|
|
666
|
-
.to(__.V(options.endNodeId));
|
|
667
|
-
// Add match properties
|
|
668
|
-
if (options.matchProperties) {
|
|
669
|
-
for (const [key, value] of Object.entries(options.matchProperties)) {
|
|
670
|
-
if (value !== undefined && value !== null) {
|
|
671
|
-
createTraversal = createTraversal.property(key, value);
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
// Add onCreate properties
|
|
676
|
-
if (options.onCreate) {
|
|
677
|
-
for (const [key, value] of Object.entries(options.onCreate)) {
|
|
678
|
-
if (value !== undefined && value !== null) {
|
|
679
|
-
createTraversal = createTraversal.property(key, value);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
const created = await createTraversal.next();
|
|
684
|
-
const fullEdge = await g.E(created.value.id).project('edge', 'outV', 'inV')
|
|
685
|
-
.by(__.valueMap(true))
|
|
686
|
-
.by(__.outV().id())
|
|
687
|
-
.by(__.inV().id())
|
|
688
|
-
.next();
|
|
689
|
-
return {
|
|
690
|
-
relationship: this.mapGremlinEdgeFromProject(fullEdge.value),
|
|
691
|
-
created: true,
|
|
692
|
-
merged: true,
|
|
693
|
-
};
|
|
694
|
-
}
|
|
695
|
-
});
|
|
696
|
-
}
|
|
697
|
-
// ==================== TRAVERSAL OPERATIONS ====================
|
|
698
|
-
async traverse(options, _transaction) {
|
|
699
|
-
const g = this.ensureTraversal();
|
|
700
|
-
return this.executeWithRetry(async () => {
|
|
701
|
-
var _a;
|
|
702
|
-
const { __ } = this.gremlin.process;
|
|
703
|
-
const maxDepth = options.maxDepth || 3;
|
|
704
|
-
// Build direction
|
|
705
|
-
let edgeDirection;
|
|
706
|
-
switch (options.direction) {
|
|
707
|
-
case enums_1.TraversalDirection.INCOMING:
|
|
708
|
-
case 'INCOMING':
|
|
709
|
-
edgeDirection = 'in';
|
|
710
|
-
break;
|
|
711
|
-
case enums_1.TraversalDirection.OUTGOING:
|
|
712
|
-
case 'OUTGOING':
|
|
713
|
-
edgeDirection = 'out';
|
|
714
|
-
break;
|
|
715
|
-
default:
|
|
716
|
-
edgeDirection = 'both';
|
|
717
|
-
}
|
|
718
|
-
// Build traversal
|
|
719
|
-
let traversal = g.V(options.startNodeId);
|
|
720
|
-
// Use repeat for variable-length traversal
|
|
721
|
-
const repeatStep = edgeDirection === 'out' ? __.out() :
|
|
722
|
-
edgeDirection === 'in' ? __.in_() :
|
|
723
|
-
__.both();
|
|
724
|
-
if ((_a = options.relationshipTypes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
725
|
-
traversal = traversal.repeat(edgeDirection === 'out' ? __.out(...options.relationshipTypes) :
|
|
726
|
-
edgeDirection === 'in' ? __.in_(...options.relationshipTypes) :
|
|
727
|
-
__.both(...options.relationshipTypes)).times(maxDepth).emit();
|
|
728
|
-
}
|
|
729
|
-
else {
|
|
730
|
-
traversal = traversal.repeat(repeatStep).times(maxDepth).emit();
|
|
731
|
-
}
|
|
732
|
-
if (options.limit) {
|
|
733
|
-
traversal = traversal.limit(options.limit);
|
|
734
|
-
}
|
|
735
|
-
// Get paths
|
|
736
|
-
const results = await traversal.path().by(__.valueMap(true)).toList();
|
|
737
|
-
const paths = [];
|
|
738
|
-
const nodesMap = new Map();
|
|
739
|
-
const relsMap = new Map();
|
|
740
|
-
for (const pathResult of results) {
|
|
741
|
-
const pathNodes = [];
|
|
742
|
-
const pathRels = [];
|
|
743
|
-
if (pathResult.objects) {
|
|
744
|
-
for (const obj of pathResult.objects) {
|
|
745
|
-
if (obj.id) {
|
|
746
|
-
const node = this.mapGremlinVertexFromValueMap(obj);
|
|
747
|
-
pathNodes.push(node);
|
|
748
|
-
nodesMap.set(String(node.id), node);
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
if (pathNodes.length > 0) {
|
|
753
|
-
paths.push({
|
|
754
|
-
nodes: pathNodes,
|
|
755
|
-
relationships: pathRels,
|
|
756
|
-
length: pathNodes.length - 1,
|
|
757
|
-
});
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
return {
|
|
761
|
-
paths,
|
|
762
|
-
nodes: Array.from(nodesMap.values()),
|
|
763
|
-
relationships: Array.from(relsMap.values()),
|
|
764
|
-
count: paths.length,
|
|
765
|
-
};
|
|
766
|
-
});
|
|
767
|
-
}
|
|
768
|
-
async shortestPath(options, _transaction) {
|
|
769
|
-
const g = this.ensureTraversal();
|
|
770
|
-
return this.executeWithRetry(async () => {
|
|
771
|
-
var _a;
|
|
772
|
-
const { __ } = this.gremlin.process;
|
|
773
|
-
// Build shortest path query
|
|
774
|
-
let traversal = g.V(options.startNodeId);
|
|
775
|
-
if ((_a = options.relationshipTypes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
776
|
-
traversal = traversal.repeat(__.both(...options.relationshipTypes).simplePath())
|
|
777
|
-
.until(__.hasId(options.endNodeId))
|
|
778
|
-
.limit(1)
|
|
779
|
-
.path();
|
|
780
|
-
}
|
|
781
|
-
else {
|
|
782
|
-
traversal = traversal.repeat(__.both().simplePath())
|
|
783
|
-
.until(__.hasId(options.endNodeId))
|
|
784
|
-
.limit(1)
|
|
785
|
-
.path();
|
|
786
|
-
}
|
|
787
|
-
const results = await traversal.by(__.valueMap(true)).toList();
|
|
788
|
-
if (results.length === 0) {
|
|
789
|
-
return { path: null, found: false };
|
|
790
|
-
}
|
|
791
|
-
const pathResult = results[0];
|
|
792
|
-
const pathNodes = [];
|
|
793
|
-
if (pathResult.objects) {
|
|
794
|
-
for (const obj of pathResult.objects) {
|
|
795
|
-
if (obj.id) {
|
|
796
|
-
pathNodes.push(this.mapGremlinVertexFromValueMap(obj));
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
const path = {
|
|
801
|
-
nodes: pathNodes,
|
|
802
|
-
relationships: [],
|
|
803
|
-
length: pathNodes.length - 1,
|
|
804
|
-
};
|
|
805
|
-
return {
|
|
806
|
-
path,
|
|
807
|
-
length: path.length,
|
|
808
|
-
found: true,
|
|
809
|
-
};
|
|
810
|
-
});
|
|
811
|
-
}
|
|
812
|
-
async allPaths(options, _transaction) {
|
|
813
|
-
const g = this.ensureTraversal();
|
|
814
|
-
return this.executeWithRetry(async () => {
|
|
815
|
-
var _a;
|
|
816
|
-
const { __ } = this.gremlin.process;
|
|
817
|
-
const minDepth = options.minDepth || 1;
|
|
818
|
-
const maxDepth = options.maxDepth || 5;
|
|
819
|
-
const limit = options.limit || options.maxPaths || 100;
|
|
820
|
-
// Build all paths query
|
|
821
|
-
let traversal = g.V(options.startNodeId);
|
|
822
|
-
if ((_a = options.relationshipTypes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
823
|
-
traversal = traversal.repeat(__.both(...options.relationshipTypes).simplePath())
|
|
824
|
-
.until(__.hasId(options.endNodeId).or().loops().is(maxDepth))
|
|
825
|
-
.hasId(options.endNodeId)
|
|
826
|
-
.limit(limit)
|
|
827
|
-
.path();
|
|
828
|
-
}
|
|
829
|
-
else {
|
|
830
|
-
traversal = traversal.repeat(__.both().simplePath())
|
|
831
|
-
.until(__.hasId(options.endNodeId).or().loops().is(maxDepth))
|
|
832
|
-
.hasId(options.endNodeId)
|
|
833
|
-
.limit(limit)
|
|
834
|
-
.path();
|
|
835
|
-
}
|
|
836
|
-
const results = await traversal.by(__.valueMap(true)).toList();
|
|
837
|
-
const paths = [];
|
|
838
|
-
for (const pathResult of results) {
|
|
839
|
-
const pathNodes = [];
|
|
840
|
-
if (pathResult.objects) {
|
|
841
|
-
for (const obj of pathResult.objects) {
|
|
842
|
-
if (obj.id) {
|
|
843
|
-
pathNodes.push(this.mapGremlinVertexFromValueMap(obj));
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
if (pathNodes.length >= minDepth + 1) {
|
|
848
|
-
paths.push({
|
|
849
|
-
nodes: pathNodes,
|
|
850
|
-
relationships: [],
|
|
851
|
-
length: pathNodes.length - 1,
|
|
852
|
-
});
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
return {
|
|
856
|
-
paths,
|
|
857
|
-
count: paths.length,
|
|
858
|
-
total: paths.length,
|
|
859
|
-
};
|
|
860
|
-
});
|
|
861
|
-
}
|
|
862
|
-
async getNeighborhood(options, _transaction) {
|
|
863
|
-
const g = this.ensureTraversal();
|
|
864
|
-
return this.executeWithRetry(async () => {
|
|
865
|
-
var _a, _b, _c;
|
|
866
|
-
const { __ } = this.gremlin.process;
|
|
867
|
-
const depth = options.depth || 1;
|
|
868
|
-
// Build direction
|
|
869
|
-
let traversalStep;
|
|
870
|
-
switch (options.direction) {
|
|
871
|
-
case enums_1.TraversalDirection.INCOMING:
|
|
872
|
-
case 'INCOMING':
|
|
873
|
-
traversalStep = ((_a = options.relationshipTypes) === null || _a === void 0 ? void 0 : _a.length)
|
|
874
|
-
? __.in_(...options.relationshipTypes)
|
|
875
|
-
: __.in_();
|
|
876
|
-
break;
|
|
877
|
-
case enums_1.TraversalDirection.OUTGOING:
|
|
878
|
-
case 'OUTGOING':
|
|
879
|
-
traversalStep = ((_b = options.relationshipTypes) === null || _b === void 0 ? void 0 : _b.length)
|
|
880
|
-
? __.out(...options.relationshipTypes)
|
|
881
|
-
: __.out();
|
|
882
|
-
break;
|
|
883
|
-
default:
|
|
884
|
-
traversalStep = ((_c = options.relationshipTypes) === null || _c === void 0 ? void 0 : _c.length)
|
|
885
|
-
? __.both(...options.relationshipTypes)
|
|
886
|
-
: __.both();
|
|
887
|
-
}
|
|
888
|
-
// Get neighbors
|
|
889
|
-
let traversal = g.V(options.nodeId)
|
|
890
|
-
.repeat(traversalStep)
|
|
891
|
-
.times(depth)
|
|
892
|
-
.emit()
|
|
893
|
-
.dedup();
|
|
894
|
-
if (options.limit) {
|
|
895
|
-
traversal = traversal.limit(options.limit);
|
|
896
|
-
}
|
|
897
|
-
const nodeResults = await traversal.valueMap(true).toList();
|
|
898
|
-
const nodes = nodeResults.map((v) => this.mapGremlinVertexFromValueMap(v));
|
|
899
|
-
// Get relationships (simplified - just outgoing edges from source)
|
|
900
|
-
const edgeResults = await g.V(options.nodeId)
|
|
901
|
-
.bothE(...(options.relationshipTypes || []))
|
|
902
|
-
.project('edge', 'outV', 'inV')
|
|
903
|
-
.by(__.valueMap(true))
|
|
904
|
-
.by(__.outV().id())
|
|
905
|
-
.by(__.inV().id())
|
|
906
|
-
.toList();
|
|
907
|
-
const relationships = edgeResults.map((r) => this.mapGremlinEdgeFromProject(r));
|
|
908
|
-
return {
|
|
909
|
-
nodes,
|
|
910
|
-
relationships,
|
|
911
|
-
depth,
|
|
912
|
-
};
|
|
913
|
-
});
|
|
914
|
-
}
|
|
915
|
-
async findConnectedComponents(options, _transaction) {
|
|
916
|
-
const g = this.ensureTraversal();
|
|
917
|
-
return this.executeWithRetry(async () => {
|
|
918
|
-
var _a;
|
|
919
|
-
const { __ } = this.gremlin.process;
|
|
920
|
-
// Neptune doesn't have built-in connected components algorithm
|
|
921
|
-
// We'll implement a basic version using Gremlin
|
|
922
|
-
let startTraversal = g.V();
|
|
923
|
-
if ((_a = options.labels) === null || _a === void 0 ? void 0 : _a.length) {
|
|
924
|
-
startTraversal = startTraversal.hasLabel(...options.labels);
|
|
925
|
-
}
|
|
926
|
-
// Get all vertices
|
|
927
|
-
const allVertices = await startTraversal.id().toList();
|
|
928
|
-
const visited = new Set();
|
|
929
|
-
const components = [];
|
|
930
|
-
for (const vertexId of allVertices) {
|
|
931
|
-
if (visited.has(String(vertexId)))
|
|
932
|
-
continue;
|
|
933
|
-
// BFS to find all connected vertices
|
|
934
|
-
const componentVertices = await g.V(vertexId)
|
|
935
|
-
.repeat(__.both(...(options.relationshipTypes || [])))
|
|
936
|
-
.until(__.not(__.both(...(options.relationshipTypes || []))))
|
|
937
|
-
.emit()
|
|
938
|
-
.dedup()
|
|
939
|
-
.valueMap(true)
|
|
940
|
-
.toList();
|
|
941
|
-
// Include the starting vertex
|
|
942
|
-
const startVertex = await g.V(vertexId).valueMap(true).next();
|
|
943
|
-
const allInComponent = [startVertex.value, ...componentVertices];
|
|
944
|
-
const nodes = allInComponent.map((v) => {
|
|
945
|
-
const node = this.mapGremlinVertexFromValueMap(v);
|
|
946
|
-
visited.add(String(node.id));
|
|
947
|
-
return node;
|
|
948
|
-
});
|
|
949
|
-
components.push({
|
|
950
|
-
nodes,
|
|
951
|
-
size: nodes.length,
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
return {
|
|
955
|
-
components,
|
|
956
|
-
count: components.length,
|
|
957
|
-
};
|
|
958
|
-
});
|
|
959
|
-
}
|
|
960
|
-
// ==================== AGGREGATION OPERATIONS ====================
|
|
961
|
-
async countNodes(labels, where, _transaction) {
|
|
962
|
-
const g = this.ensureTraversal();
|
|
963
|
-
return this.executeWithRetry(async () => {
|
|
964
|
-
let traversal = g.V();
|
|
965
|
-
if (labels === null || labels === void 0 ? void 0 : labels.length) {
|
|
966
|
-
traversal = traversal.hasLabel(...labels);
|
|
967
|
-
}
|
|
968
|
-
if (where) {
|
|
969
|
-
traversal = this.applyWhereConditions(traversal, where);
|
|
970
|
-
}
|
|
971
|
-
const result = await traversal.count().next();
|
|
972
|
-
return {
|
|
973
|
-
count: result.value,
|
|
974
|
-
};
|
|
975
|
-
});
|
|
976
|
-
}
|
|
977
|
-
async countRelationships(types, where, _transaction) {
|
|
978
|
-
const g = this.ensureTraversal();
|
|
979
|
-
return this.executeWithRetry(async () => {
|
|
980
|
-
let traversal = g.E();
|
|
981
|
-
if (types === null || types === void 0 ? void 0 : types.length) {
|
|
982
|
-
traversal = traversal.hasLabel(...types);
|
|
983
|
-
}
|
|
984
|
-
if (where) {
|
|
985
|
-
traversal = this.applyWhereConditions(traversal, where);
|
|
986
|
-
}
|
|
987
|
-
const result = await traversal.count().next();
|
|
988
|
-
return {
|
|
989
|
-
count: result.value,
|
|
990
|
-
};
|
|
991
|
-
});
|
|
992
|
-
}
|
|
993
|
-
async getStatistics(_transaction) {
|
|
994
|
-
const g = this.ensureTraversal();
|
|
995
|
-
return this.executeWithRetry(async () => {
|
|
996
|
-
const nodeCount = await g.V().count().next();
|
|
997
|
-
const relCount = await g.E().count().next();
|
|
998
|
-
return {
|
|
999
|
-
nodeCount: nodeCount.value,
|
|
1000
|
-
relationshipCount: relCount.value,
|
|
1001
|
-
};
|
|
1002
|
-
});
|
|
1003
|
-
}
|
|
1004
|
-
// ==================== SEARCH OPERATIONS ====================
|
|
1005
|
-
async fullTextSearch(options, _transaction) {
|
|
1006
|
-
const g = this.ensureTraversal();
|
|
1007
|
-
return this.executeWithRetry(async () => {
|
|
1008
|
-
// Neptune supports text predicates via Neptune-specific features
|
|
1009
|
-
// Basic implementation using contains predicate
|
|
1010
|
-
const textPredicate = this.gremlin.process.P.containing(options.query);
|
|
1011
|
-
let traversal = g.V().or(this.gremlin.process.__.has('name', textPredicate), this.gremlin.process.__.has('title', textPredicate), this.gremlin.process.__.has('description', textPredicate));
|
|
1012
|
-
if (options.limit) {
|
|
1013
|
-
traversal = traversal.limit(options.limit);
|
|
1014
|
-
}
|
|
1015
|
-
const results = await traversal.valueMap(true).toList();
|
|
1016
|
-
const nodes = results.map((v) => this.mapGremlinVertexFromValueMap(v));
|
|
1017
|
-
return {
|
|
1018
|
-
nodes,
|
|
1019
|
-
scores: nodes.map(() => 1.0),
|
|
1020
|
-
};
|
|
1021
|
-
});
|
|
1022
|
-
}
|
|
1023
|
-
async vectorSearch(_options, _transaction) {
|
|
1024
|
-
throw graph_error_1.GraphError.unsupportedOperationError('Vector search is not natively supported in Neptune. Consider using Amazon OpenSearch with Neptune.', this.graphType);
|
|
1025
|
-
}
|
|
1026
|
-
// ==================== RAW QUERY ====================
|
|
1027
|
-
async query(options, _transaction) {
|
|
1028
|
-
// For Gremlin, the query is a Gremlin script string
|
|
1029
|
-
// Neptune supports script execution via the submit method
|
|
1030
|
-
if (!this.connection) {
|
|
1031
|
-
throw new Error('Not connected to Neptune');
|
|
1032
|
-
}
|
|
1033
|
-
return this.executeWithRetry(async () => {
|
|
1034
|
-
const result = await this.connection.submit(options.query, options.params || {});
|
|
1035
|
-
const records = await result.toArray();
|
|
1036
|
-
return {
|
|
1037
|
-
records: records,
|
|
1038
|
-
summary: {},
|
|
1039
|
-
};
|
|
1040
|
-
});
|
|
1041
|
-
}
|
|
1042
|
-
// ==================== SCHEMA OPERATIONS ====================
|
|
1043
|
-
async createNodeIndex(options) {
|
|
1044
|
-
// Neptune doesn't support user-created indexes in the same way as Neo4j
|
|
1045
|
-
// Indexes are managed automatically by Neptune
|
|
1046
|
-
// Return success as Neptune will handle optimization automatically
|
|
1047
|
-
return { created: true, name: options.name };
|
|
1048
|
-
}
|
|
1049
|
-
async createNodeConstraint(_options) {
|
|
1050
|
-
// Neptune doesn't support constraints like Neo4j
|
|
1051
|
-
throw graph_error_1.GraphError.unsupportedOperationError('Neptune does not support user-defined constraints. Data validation should be handled at the application level.', this.graphType);
|
|
1052
|
-
}
|
|
1053
|
-
async createRelationshipIndex(options) {
|
|
1054
|
-
// Neptune handles indexes automatically
|
|
1055
|
-
return { created: true, name: options.name };
|
|
1056
|
-
}
|
|
1057
|
-
async listIndexes() {
|
|
1058
|
-
// Neptune indexes are managed internally
|
|
1059
|
-
return { indexes: [] };
|
|
1060
|
-
}
|
|
1061
|
-
async listConstraints() {
|
|
1062
|
-
// Neptune doesn't have user-defined constraints
|
|
1063
|
-
return { constraints: [] };
|
|
1064
|
-
}
|
|
1065
|
-
async dropIndex(_name) {
|
|
1066
|
-
// Neptune indexes are managed internally
|
|
1067
|
-
return { dropped: false };
|
|
1068
|
-
}
|
|
1069
|
-
async dropConstraint(_name) {
|
|
1070
|
-
// Neptune doesn't have user-defined constraints
|
|
1071
|
-
return { dropped: false };
|
|
1072
|
-
}
|
|
1073
|
-
// ==================== SCHEMA INTROSPECTION ====================
|
|
1074
|
-
async listLabels() {
|
|
1075
|
-
this.ensureConnected();
|
|
1076
|
-
return this.executeWithRetry(async () => {
|
|
1077
|
-
try {
|
|
1078
|
-
// Get all distinct vertex labels
|
|
1079
|
-
const labelsTraversal = this.g.V().label().dedup();
|
|
1080
|
-
const labelNames = await labelsTraversal.toList();
|
|
1081
|
-
const labels = [];
|
|
1082
|
-
for (const labelName of labelNames) {
|
|
1083
|
-
// Get count for each label
|
|
1084
|
-
const countTraversal = this.g.V().hasLabel(labelName).count();
|
|
1085
|
-
const countResult = await countTraversal.next();
|
|
1086
|
-
const count = countResult.value || 0;
|
|
1087
|
-
// Get properties from a sample of vertices with this label
|
|
1088
|
-
const propsTraversal = this.g.V().hasLabel(labelName).limit(100).properties().key().dedup();
|
|
1089
|
-
const propertyNames = await propsTraversal.toList();
|
|
1090
|
-
const properties = propertyNames.map((name) => ({
|
|
1091
|
-
name,
|
|
1092
|
-
type: 'unknown',
|
|
1093
|
-
}));
|
|
1094
|
-
labels.push({
|
|
1095
|
-
name: String(labelName),
|
|
1096
|
-
count: Number(count),
|
|
1097
|
-
properties,
|
|
1098
|
-
});
|
|
1099
|
-
}
|
|
1100
|
-
return { labels };
|
|
1101
|
-
}
|
|
1102
|
-
catch (error) {
|
|
1103
|
-
throw graph_error_1.GraphError.queryError(`Failed to list labels: ${error.message}`);
|
|
1104
|
-
}
|
|
1105
|
-
});
|
|
1106
|
-
}
|
|
1107
|
-
async listRelationshipTypes() {
|
|
1108
|
-
this.ensureConnected();
|
|
1109
|
-
return this.executeWithRetry(async () => {
|
|
1110
|
-
try {
|
|
1111
|
-
// Get all distinct edge labels
|
|
1112
|
-
const typesTraversal = this.g.E().label().dedup();
|
|
1113
|
-
const typeNames = await typesTraversal.toList();
|
|
1114
|
-
const types = [];
|
|
1115
|
-
for (const typeName of typeNames) {
|
|
1116
|
-
// Get count for each edge label
|
|
1117
|
-
const countTraversal = this.g.E().hasLabel(typeName).count();
|
|
1118
|
-
const countResult = await countTraversal.next();
|
|
1119
|
-
const count = countResult.value || 0;
|
|
1120
|
-
// Get source and target vertex labels
|
|
1121
|
-
const endpointsTraversal = this.g.E().hasLabel(typeName).limit(100)
|
|
1122
|
-
.project('fromLabel', 'toLabel')
|
|
1123
|
-
.by(this.gremlin.process.statics.outV().label())
|
|
1124
|
-
.by(this.gremlin.process.statics.inV().label());
|
|
1125
|
-
const endpoints = await endpointsTraversal.toList();
|
|
1126
|
-
const fromLabelsSet = new Set();
|
|
1127
|
-
const toLabelsSet = new Set();
|
|
1128
|
-
for (const ep of endpoints) {
|
|
1129
|
-
if (ep.fromLabel)
|
|
1130
|
-
fromLabelsSet.add(String(ep.fromLabel));
|
|
1131
|
-
if (ep.toLabel)
|
|
1132
|
-
toLabelsSet.add(String(ep.toLabel));
|
|
1133
|
-
}
|
|
1134
|
-
// Get properties from a sample of edges
|
|
1135
|
-
const propsTraversal = this.g.E().hasLabel(typeName).limit(100).properties().key().dedup();
|
|
1136
|
-
const propertyNames = await propsTraversal.toList();
|
|
1137
|
-
const properties = propertyNames.map((name) => ({
|
|
1138
|
-
name,
|
|
1139
|
-
type: 'unknown',
|
|
1140
|
-
}));
|
|
1141
|
-
types.push({
|
|
1142
|
-
type: String(typeName),
|
|
1143
|
-
count: Number(count),
|
|
1144
|
-
fromLabels: Array.from(fromLabelsSet),
|
|
1145
|
-
toLabels: Array.from(toLabelsSet),
|
|
1146
|
-
properties: properties.length > 0 ? properties : undefined,
|
|
1147
|
-
});
|
|
1148
|
-
}
|
|
1149
|
-
return { types };
|
|
1150
|
-
}
|
|
1151
|
-
catch (error) {
|
|
1152
|
-
throw graph_error_1.GraphError.queryError(`Failed to list relationship types: ${error.message}`);
|
|
1153
|
-
}
|
|
1154
|
-
});
|
|
1155
|
-
}
|
|
1156
|
-
// ==================== TRANSACTION OPERATIONS ====================
|
|
1157
|
-
async beginTransaction(_options) {
|
|
1158
|
-
// Neptune has limited transaction support via sessions
|
|
1159
|
-
// For now, we create a session-based pseudo-transaction
|
|
1160
|
-
this.ensureConnected();
|
|
1161
|
-
return {
|
|
1162
|
-
id: `tx_${Date.now()}`,
|
|
1163
|
-
status: enums_1.GraphTransactionStatus.ACTIVE,
|
|
1164
|
-
client: this.g,
|
|
1165
|
-
nativeTransaction: null,
|
|
1166
|
-
startTime: new Date(),
|
|
1167
|
-
commit: async () => {
|
|
1168
|
-
// Neptune auto-commits each query
|
|
1169
|
-
},
|
|
1170
|
-
rollback: async () => {
|
|
1171
|
-
// Neptune doesn't support rollback for individual queries
|
|
1172
|
-
},
|
|
1173
|
-
};
|
|
1174
|
-
}
|
|
1175
|
-
async commitTransaction(_transaction) {
|
|
1176
|
-
// Neptune auto-commits each query
|
|
1177
|
-
}
|
|
1178
|
-
async rollbackTransaction(_transaction) {
|
|
1179
|
-
// Neptune doesn't support rollback for individual queries
|
|
1180
|
-
}
|
|
1181
|
-
// ==================== UTILITY METHODS ====================
|
|
1182
|
-
buildWhereClause(where) {
|
|
1183
|
-
// For Gremlin, we return the where clause object as-is
|
|
1184
|
-
// The actual predicate building is done in applyWhereConditions
|
|
1185
|
-
return where;
|
|
1186
|
-
}
|
|
1187
|
-
applyWhereConditions(traversal, where) {
|
|
1188
|
-
const { P } = this.gremlin.process;
|
|
1189
|
-
for (const [key, value] of Object.entries(where)) {
|
|
1190
|
-
// Normalize key to lowercase for comparison
|
|
1191
|
-
const normalizedKey = key.toLowerCase();
|
|
1192
|
-
if (normalizedKey === '$and') {
|
|
1193
|
-
// Apply AND conditions
|
|
1194
|
-
if (Array.isArray(value)) {
|
|
1195
|
-
traversal = traversal.and(...value.flatMap((v) => Object.entries(v).map(([k, val]) => this.gremlin.process.__.has(k, val))));
|
|
1196
|
-
}
|
|
1197
|
-
else {
|
|
1198
|
-
traversal = traversal.and(...Object.entries(value).map(([k, v]) => this.gremlin.process.__.has(k, v)));
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
else if (normalizedKey === '$or') {
|
|
1202
|
-
// Apply OR conditions
|
|
1203
|
-
if (Array.isArray(value)) {
|
|
1204
|
-
traversal = traversal.or(...value.flatMap((v) => Object.entries(v).map(([k, val]) => this.gremlin.process.__.has(k, val))));
|
|
1205
|
-
}
|
|
1206
|
-
else {
|
|
1207
|
-
traversal = traversal.or(...Object.entries(value).map(([k, v]) => this.gremlin.process.__.has(k, v)));
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
else if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
|
1211
|
-
// Apply operator conditions
|
|
1212
|
-
for (const [op, opValue] of Object.entries(value)) {
|
|
1213
|
-
const normalizedOp = op.toLowerCase();
|
|
1214
|
-
switch (normalizedOp) {
|
|
1215
|
-
case '$gt':
|
|
1216
|
-
traversal = traversal.has(key, P.gt(opValue));
|
|
1217
|
-
break;
|
|
1218
|
-
case '$gte':
|
|
1219
|
-
traversal = traversal.has(key, P.gte(opValue));
|
|
1220
|
-
break;
|
|
1221
|
-
case '$lt':
|
|
1222
|
-
traversal = traversal.has(key, P.lt(opValue));
|
|
1223
|
-
break;
|
|
1224
|
-
case '$lte':
|
|
1225
|
-
traversal = traversal.has(key, P.lte(opValue));
|
|
1226
|
-
break;
|
|
1227
|
-
case '$ne':
|
|
1228
|
-
traversal = traversal.has(key, P.neq(opValue));
|
|
1229
|
-
break;
|
|
1230
|
-
case '$in':
|
|
1231
|
-
traversal = traversal.has(key, P.within(...opValue));
|
|
1232
|
-
break;
|
|
1233
|
-
case '$nin':
|
|
1234
|
-
case '$not_in':
|
|
1235
|
-
traversal = traversal.has(key, P.without(...opValue));
|
|
1236
|
-
break;
|
|
1237
|
-
case '$contains':
|
|
1238
|
-
traversal = traversal.has(key, P.containing(opValue));
|
|
1239
|
-
break;
|
|
1240
|
-
case '$startswith':
|
|
1241
|
-
case '$starts_with':
|
|
1242
|
-
traversal = traversal.has(key, P.startingWith(opValue));
|
|
1243
|
-
break;
|
|
1244
|
-
case '$endswith':
|
|
1245
|
-
case '$ends_with':
|
|
1246
|
-
traversal = traversal.has(key, P.endingWith(opValue));
|
|
1247
|
-
break;
|
|
1248
|
-
case '$exists':
|
|
1249
|
-
if (opValue) {
|
|
1250
|
-
traversal = traversal.has(key);
|
|
1251
|
-
}
|
|
1252
|
-
else {
|
|
1253
|
-
traversal = traversal.hasNot(key);
|
|
1254
|
-
}
|
|
1255
|
-
break;
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
else {
|
|
1260
|
-
// Simple equality
|
|
1261
|
-
traversal = traversal.has(key, value);
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
return traversal;
|
|
1265
|
-
}
|
|
1266
|
-
parseError(error) {
|
|
1267
|
-
if (error instanceof graph_error_1.GraphError) {
|
|
1268
|
-
return error;
|
|
1269
|
-
}
|
|
1270
|
-
return graph_error_1.GraphError.queryError(String(error));
|
|
1271
|
-
}
|
|
1272
|
-
// ==================== PRIVATE HELPER METHODS ====================
|
|
1273
|
-
mapGremlinVertex(id, properties) {
|
|
1274
|
-
const props = {};
|
|
1275
|
-
const labels = [];
|
|
1276
|
-
if (properties) {
|
|
1277
|
-
for (const [key, value] of properties) {
|
|
1278
|
-
if (key === 'label' || key === this.gremlin.process.t.label) {
|
|
1279
|
-
labels.push(Array.isArray(value) ? value[0] : value);
|
|
1280
|
-
}
|
|
1281
|
-
else if (key === 'id' || key === this.gremlin.process.t.id) {
|
|
1282
|
-
// Skip id as we have it separately
|
|
1283
|
-
}
|
|
1284
|
-
else {
|
|
1285
|
-
props[key] = Array.isArray(value) ? value[0] : value;
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
return {
|
|
1290
|
-
id: String(id),
|
|
1291
|
-
labels,
|
|
1292
|
-
properties: props,
|
|
1293
|
-
};
|
|
1294
|
-
}
|
|
1295
|
-
mapGremlinVertexFromValueMap(valueMap) {
|
|
1296
|
-
const props = {};
|
|
1297
|
-
const labels = [];
|
|
1298
|
-
let id = '';
|
|
1299
|
-
if (valueMap) {
|
|
1300
|
-
for (const [key, value] of Object.entries(valueMap)) {
|
|
1301
|
-
if (key === 'label' || String(key).includes('label')) {
|
|
1302
|
-
const labelValue = Array.isArray(value) ? value[0] : value;
|
|
1303
|
-
labels.push(String(labelValue));
|
|
1304
|
-
}
|
|
1305
|
-
else if (key === 'id' || String(key).includes('id')) {
|
|
1306
|
-
id = String(Array.isArray(value) ? value[0] : value);
|
|
1307
|
-
}
|
|
1308
|
-
else {
|
|
1309
|
-
props[key] = Array.isArray(value) ? value[0] : value;
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
return {
|
|
1314
|
-
id,
|
|
1315
|
-
labels,
|
|
1316
|
-
properties: props,
|
|
1317
|
-
};
|
|
1318
|
-
}
|
|
1319
|
-
mapGremlinEdge(edge, properties, startId, endId) {
|
|
1320
|
-
const props = {};
|
|
1321
|
-
let type = '';
|
|
1322
|
-
if (properties) {
|
|
1323
|
-
for (const [key, value] of Object.entries(properties)) {
|
|
1324
|
-
if (key === 'label' || String(key).includes('label')) {
|
|
1325
|
-
type = String(Array.isArray(value) ? value[0] : value);
|
|
1326
|
-
}
|
|
1327
|
-
else if (key === 'id' || String(key).includes('id')) {
|
|
1328
|
-
// Skip id
|
|
1329
|
-
}
|
|
1330
|
-
else {
|
|
1331
|
-
props[key] = Array.isArray(value) ? value[0] : value;
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
return {
|
|
1336
|
-
id: String(edge.id),
|
|
1337
|
-
type: type || edge.label,
|
|
1338
|
-
startNodeId: String(startId),
|
|
1339
|
-
endNodeId: String(endId),
|
|
1340
|
-
properties: props,
|
|
1341
|
-
};
|
|
1342
|
-
}
|
|
1343
|
-
mapGremlinEdgeFromProject(result) {
|
|
1344
|
-
const edge = result.edge || {};
|
|
1345
|
-
const props = {};
|
|
1346
|
-
let type = '';
|
|
1347
|
-
let id = '';
|
|
1348
|
-
for (const [key, value] of Object.entries(edge)) {
|
|
1349
|
-
if (key === 'label' || String(key).includes('label')) {
|
|
1350
|
-
type = String(Array.isArray(value) ? value[0] : value);
|
|
1351
|
-
}
|
|
1352
|
-
else if (key === 'id' || String(key).includes('id')) {
|
|
1353
|
-
id = String(Array.isArray(value) ? value[0] : value);
|
|
1354
|
-
}
|
|
1355
|
-
else {
|
|
1356
|
-
props[key] = Array.isArray(value) ? value[0] : value;
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
return {
|
|
1360
|
-
id,
|
|
1361
|
-
type,
|
|
1362
|
-
startNodeId: String(result.outV),
|
|
1363
|
-
endNodeId: String(result.inV),
|
|
1364
|
-
properties: props,
|
|
1365
|
-
};
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
exports.NeptuneAdapter = NeptuneAdapter;
|
|
1369
|
-
//# sourceMappingURL=neptune.adapter.js.map
|