@ductape/sdk 0.0.4-v51 → 0.0.4-v53
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/README.md +1 -1
- package/dist/agents/agent-context.d.ts +98 -0
- package/dist/agents/agent-context.js +588 -0
- package/dist/agents/agent-context.js.map +1 -0
- package/dist/agents/agent-executor.d.ts +180 -0
- package/dist/agents/agent-executor.js +715 -0
- package/dist/agents/agent-executor.js.map +1 -0
- package/dist/agents/agents.service.d.ts +304 -0
- package/dist/agents/agents.service.js +1244 -0
- package/dist/agents/agents.service.js.map +1 -0
- package/dist/agents/index.d.ts +55 -0
- package/dist/agents/index.js +110 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/memory-manager.d.ts +182 -0
- package/dist/agents/memory-manager.js +383 -0
- package/dist/agents/memory-manager.js.map +1 -0
- package/dist/agents/tool-registry.d.ts +141 -0
- package/dist/agents/tool-registry.js +355 -0
- package/dist/agents/tool-registry.js.map +1 -0
- package/dist/agents/types/agents.types.d.ts +1225 -0
- package/dist/agents/types/agents.types.js +12 -0
- package/dist/agents/types/agents.types.js.map +1 -0
- package/dist/agents/types/index.d.ts +6 -0
- package/dist/agents/types/index.js +23 -0
- package/dist/agents/types/index.js.map +1 -0
- package/dist/agents/vector-store-adapter.d.ts +108 -0
- package/dist/agents/vector-store-adapter.js +213 -0
- package/dist/agents/vector-store-adapter.js.map +1 -0
- package/dist/api/services/appApi.service.js +4 -5
- package/dist/api/services/appApi.service.js.map +1 -1
- package/dist/api/services/processorApi.service.d.ts +322 -0
- package/dist/api/services/processorApi.service.js +252 -0
- package/dist/api/services/processorApi.service.js.map +1 -1
- package/dist/api/services/productsApi.service.d.ts +69 -1
- package/dist/api/services/productsApi.service.js +67 -31
- package/dist/api/services/productsApi.service.js.map +1 -1
- package/dist/api/services/resilienceApi.service.d.ts +106 -0
- package/dist/api/services/resilienceApi.service.js +224 -0
- package/dist/api/services/resilienceApi.service.js.map +1 -0
- package/dist/api/services/secretsApi.service.d.ts +38 -0
- package/dist/api/services/secretsApi.service.js +96 -0
- package/dist/api/services/secretsApi.service.js.map +1 -0
- package/dist/api/services/userApi.service.js +0 -1
- package/dist/api/services/userApi.service.js.map +1 -1
- package/dist/api/services/workflowApi.service.d.ts +199 -0
- package/dist/api/services/workflowApi.service.js +183 -0
- package/dist/api/services/workflowApi.service.js.map +1 -0
- package/dist/api/services/workspaceApi.service.js +0 -1
- package/dist/api/services/workspaceApi.service.js.map +1 -1
- package/dist/api/urls.d.ts +57 -0
- package/dist/api/urls.js +68 -1
- package/dist/api/urls.js.map +1 -1
- package/dist/api/utils/cache.utils.js +4 -10
- package/dist/api/utils/cache.utils.js.map +1 -1
- package/dist/apps/services/app.service.d.ts +0 -10
- package/dist/apps/services/app.service.js +74 -30
- package/dist/apps/services/app.service.js.map +1 -1
- package/dist/apps/utils/auth-context-manager.d.ts +137 -0
- package/dist/apps/utils/auth-context-manager.js +248 -0
- package/dist/apps/utils/auth-context-manager.js.map +1 -0
- package/dist/apps/utils/credential-manager.d.ts +128 -0
- package/dist/apps/utils/credential-manager.js +199 -0
- package/dist/apps/utils/credential-manager.js.map +1 -0
- package/dist/apps/utils/index.d.ts +10 -0
- package/dist/apps/utils/index.js +54 -0
- package/dist/apps/utils/index.js.map +1 -0
- package/dist/apps/utils/input-helpers.d.ts +67 -0
- package/dist/apps/utils/input-helpers.js +185 -0
- package/dist/apps/utils/input-helpers.js.map +1 -0
- package/dist/apps/utils/input-resolver.d.ts +165 -0
- package/dist/apps/utils/input-resolver.js +477 -0
- package/dist/apps/utils/input-resolver.js.map +1 -0
- package/dist/apps/utils/oauth-manager.d.ts +196 -0
- package/dist/apps/utils/oauth-manager.js +405 -0
- package/dist/apps/utils/oauth-manager.js.map +1 -0
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.d.ts +2 -1
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.js +15 -2
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.js.map +1 -1
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.d.ts +2 -1
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.js +14 -2
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.js.map +1 -1
- package/dist/bin.d.ts +26 -0
- package/dist/bin.js +28 -0
- package/dist/bin.js.map +1 -0
- package/dist/brokers/brokers.service.d.ts +257 -0
- package/dist/brokers/brokers.service.js +604 -0
- package/dist/brokers/brokers.service.js.map +1 -0
- package/dist/brokers/index.d.ts +46 -0
- package/dist/brokers/index.js +83 -0
- package/dist/brokers/index.js.map +1 -0
- package/dist/brokers/types/index.d.ts +288 -0
- package/dist/brokers/types/index.js +8 -0
- package/dist/brokers/types/index.js.map +1 -0
- package/dist/brokers/utils/broker.util.d.ts +33 -0
- package/dist/brokers/utils/broker.util.js +125 -0
- package/dist/brokers/utils/broker.util.js.map +1 -0
- package/dist/brokers/utils/providers/aws-sqs.service.d.ts +16 -0
- package/dist/brokers/utils/providers/aws-sqs.service.js +71 -0
- package/dist/brokers/utils/providers/aws-sqs.service.js.map +1 -0
- package/dist/brokers/utils/providers/google-pubsub.service.d.ts +16 -0
- package/dist/brokers/utils/providers/google-pubsub.service.js +43 -0
- package/dist/brokers/utils/providers/google-pubsub.service.js.map +1 -0
- package/dist/brokers/utils/providers/index.d.ts +6 -0
- package/dist/brokers/utils/providers/index.js +16 -0
- package/dist/brokers/utils/providers/index.js.map +1 -0
- package/dist/brokers/utils/providers/kafka.service.d.ts +16 -0
- package/dist/brokers/utils/providers/kafka.service.js +52 -0
- package/dist/brokers/utils/providers/kafka.service.js.map +1 -0
- package/dist/brokers/utils/providers/nats.service.d.ts +18 -0
- package/dist/brokers/utils/providers/nats.service.js +63 -0
- package/dist/brokers/utils/providers/nats.service.js.map +1 -0
- package/dist/brokers/utils/providers/rabbitmq.service.d.ts +14 -0
- package/dist/brokers/utils/providers/rabbitmq.service.js +67 -0
- package/dist/brokers/utils/providers/rabbitmq.service.js.map +1 -0
- package/dist/brokers/utils/providers/redis.service.d.ts +18 -0
- package/dist/brokers/utils/providers/redis.service.js +93 -0
- package/dist/brokers/utils/providers/redis.service.js.map +1 -0
- package/dist/cache/cache.manager.d.ts +159 -0
- package/dist/cache/cache.manager.js +265 -0
- package/dist/cache/cache.manager.js.map +1 -0
- package/dist/cache/cache.service.d.ts +186 -0
- package/dist/cache/cache.service.js +437 -0
- package/dist/cache/cache.service.js.map +1 -0
- package/dist/cache/index.d.ts +52 -0
- package/dist/cache/index.js +79 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/types/index.d.ts +106 -0
- package/dist/cache/types/index.js +6 -0
- package/dist/cache/types/index.js.map +1 -0
- package/dist/database/actions/action-manager.d.ts +170 -0
- package/dist/database/actions/action-manager.js +465 -0
- package/dist/database/actions/action-manager.js.map +1 -0
- package/dist/database/actions/index.d.ts +6 -0
- package/dist/database/actions/index.js +13 -0
- package/dist/database/actions/index.js.map +1 -0
- package/dist/database/adapters/adapter.factory.d.ts +62 -0
- package/dist/database/adapters/adapter.factory.js +97 -0
- package/dist/database/adapters/adapter.factory.js.map +1 -0
- package/dist/database/adapters/base.adapter.d.ts +307 -90
- package/dist/database/adapters/base.adapter.js +139 -20
- package/dist/database/adapters/base.adapter.js.map +1 -1
- package/dist/database/adapters/cassandra.adapter.d.ts +90 -0
- package/dist/database/adapters/cassandra.adapter.js +1019 -0
- package/dist/database/adapters/cassandra.adapter.js.map +1 -0
- package/dist/database/adapters/dynamodb.adapter.d.ts +94 -77
- package/dist/database/adapters/dynamodb.adapter.js +1162 -1305
- package/dist/database/adapters/dynamodb.adapter.js.map +1 -1
- package/dist/database/adapters/index.d.ts +11 -0
- package/dist/database/adapters/index.js +27 -0
- package/dist/database/adapters/index.js.map +1 -0
- package/dist/database/adapters/mariadb.adapter.d.ts +100 -0
- package/dist/database/adapters/mariadb.adapter.js +247 -0
- package/dist/database/adapters/mariadb.adapter.js.map +1 -0
- package/dist/database/adapters/mongodb.adapter.d.ts +105 -57
- package/dist/database/adapters/mongodb.adapter.js +941 -838
- package/dist/database/adapters/mongodb.adapter.js.map +1 -1
- package/dist/database/adapters/mysql.adapter.d.ts +76 -138
- package/dist/database/adapters/mysql.adapter.js +990 -1246
- package/dist/database/adapters/mysql.adapter.js.map +1 -1
- package/dist/database/adapters/postgresql.adapter.d.ts +75 -139
- package/dist/database/adapters/postgresql.adapter.js +1076 -1346
- package/dist/database/adapters/postgresql.adapter.js.map +1 -1
- package/dist/database/databases.service.d.ts +1374 -0
- package/dist/database/databases.service.js +2680 -0
- package/dist/database/databases.service.js.map +1 -0
- package/dist/database/index.d.ts +41 -13
- package/dist/database/index.js +97 -86
- package/dist/database/index.js.map +1 -1
- package/dist/database/migrations/index.d.ts +6 -0
- package/dist/database/migrations/index.js +12 -0
- package/dist/database/migrations/index.js.map +1 -0
- package/dist/database/migrations/migration-engine.d.ts +132 -0
- package/dist/database/migrations/migration-engine.js +1356 -0
- package/dist/database/migrations/migration-engine.js.map +1 -0
- package/dist/database/operators/aggregation-builder.d.ts +64 -0
- package/dist/database/operators/aggregation-builder.js +746 -0
- package/dist/database/operators/aggregation-builder.js.map +1 -0
- package/dist/database/operators/index.d.ts +7 -0
- package/dist/database/operators/index.js +15 -0
- package/dist/database/operators/index.js.map +1 -0
- package/dist/database/operators/query-builder.d.ts +55 -0
- package/dist/database/operators/query-builder.js +365 -0
- package/dist/database/operators/query-builder.js.map +1 -0
- package/dist/database/presave/decrypt.d.ts +25 -0
- package/dist/database/presave/decrypt.js +146 -0
- package/dist/database/presave/decrypt.js.map +1 -0
- package/dist/database/presave/index.d.ts +9 -0
- package/dist/database/presave/index.js +18 -0
- package/dist/database/presave/index.js.map +1 -0
- package/dist/database/presave/presave-processor.d.ts +148 -0
- package/dist/database/presave/presave-processor.js +702 -0
- package/dist/database/presave/presave-processor.js.map +1 -0
- package/dist/database/schema/index.d.ts +7 -0
- package/dist/database/schema/index.js +13 -0
- package/dist/database/schema/index.js.map +1 -0
- package/dist/database/schema/schema-manager.d.ts +258 -0
- package/dist/database/schema/schema-manager.js +637 -0
- package/dist/database/schema/schema-manager.js.map +1 -0
- package/dist/database/transactions/index.d.ts +6 -0
- package/dist/database/transactions/index.js +13 -0
- package/dist/database/transactions/index.js.map +1 -0
- package/dist/database/transactions/transaction-manager.d.ts +113 -0
- package/dist/database/transactions/transaction-manager.js +344 -0
- package/dist/database/transactions/transaction-manager.js.map +1 -0
- package/dist/database/triggers/index.d.ts +7 -0
- package/dist/database/triggers/index.js +14 -0
- package/dist/database/triggers/index.js.map +1 -0
- package/dist/database/triggers/trigger-processor.d.ts +239 -0
- package/dist/database/triggers/trigger-processor.js +1034 -0
- package/dist/database/triggers/trigger-processor.js.map +1 -0
- package/dist/database/types/action.interface.d.ts +148 -0
- package/dist/database/types/action.interface.js +6 -0
- package/dist/database/types/action.interface.js.map +1 -0
- package/dist/database/types/aggregation.interface.d.ts +179 -0
- package/dist/database/types/aggregation.interface.js +6 -0
- package/dist/database/types/aggregation.interface.js.map +1 -0
- package/dist/database/types/connection.interface.d.ts +137 -0
- package/dist/database/types/connection.interface.js +6 -0
- package/dist/database/types/connection.interface.js.map +1 -0
- package/dist/database/types/enums.d.ts +195 -0
- package/dist/database/types/enums.js +244 -0
- package/dist/database/types/enums.js.map +1 -0
- package/dist/database/types/index.d.ts +12 -10
- package/dist/database/types/index.js +26 -32
- package/dist/database/types/index.js.map +1 -1
- package/dist/database/types/migration.interface.d.ts +686 -0
- package/dist/database/types/migration.interface.js +9 -0
- package/dist/database/types/migration.interface.js.map +1 -0
- package/dist/database/types/presave.interface.d.ts +292 -0
- package/dist/database/types/presave.interface.js +60 -0
- package/dist/database/types/presave.interface.js.map +1 -0
- package/dist/database/types/query.interface.d.ts +199 -0
- package/dist/database/types/query.interface.js +6 -0
- package/dist/database/types/query.interface.js.map +1 -0
- package/dist/database/types/schema.interface.d.ts +398 -0
- package/dist/database/types/schema.interface.js +6 -0
- package/dist/database/types/schema.interface.js.map +1 -0
- package/dist/database/types/transaction.interface.d.ts +84 -0
- package/dist/database/types/transaction.interface.js +6 -0
- package/dist/database/types/transaction.interface.js.map +1 -0
- package/dist/database/types/trigger.interface.d.ts +612 -0
- package/dist/database/types/trigger.interface.js +121 -0
- package/dist/database/types/trigger.interface.js.map +1 -0
- package/dist/database/types/write.interface.d.ts +208 -0
- package/dist/database/types/write.interface.js +6 -0
- package/dist/database/types/write.interface.js.map +1 -0
- package/dist/database/utils/database-error.d.ts +96 -0
- package/dist/database/utils/database-error.js +221 -0
- package/dist/database/utils/database-error.js.map +1 -0
- package/dist/database/utils/index.d.ts +6 -0
- package/dist/database/utils/index.js +11 -0
- package/dist/database/utils/index.js.map +1 -0
- package/dist/graph/adapters/adapter.factory.d.ts +47 -0
- package/dist/graph/adapters/adapter.factory.js +77 -0
- package/dist/graph/adapters/adapter.factory.js.map +1 -0
- package/dist/graph/adapters/arangodb.adapter.d.ts +78 -72
- package/dist/graph/adapters/arangodb.adapter.js +1310 -1220
- package/dist/graph/adapters/arangodb.adapter.js.map +1 -1
- package/dist/graph/adapters/base.adapter.d.ts +135 -118
- package/dist/graph/adapters/base.adapter.js +46 -20
- package/dist/graph/adapters/base.adapter.js.map +1 -1
- package/dist/graph/adapters/index.d.ts +5 -4
- package/dist/graph/adapters/index.js +6 -8
- package/dist/graph/adapters/index.js.map +1 -1
- package/dist/graph/adapters/memgraph.adapter.d.ts +98 -73
- package/dist/graph/adapters/memgraph.adapter.js +1050 -1202
- package/dist/graph/adapters/memgraph.adapter.js.map +1 -1
- package/dist/graph/adapters/neo4j.adapter.d.ts +71 -78
- package/dist/graph/adapters/neo4j.adapter.js +912 -1605
- package/dist/graph/adapters/neo4j.adapter.js.map +1 -1
- package/dist/graph/adapters/neptune.adapter.d.ts +76 -81
- package/dist/graph/adapters/neptune.adapter.js +1095 -1228
- package/dist/graph/adapters/neptune.adapter.js.map +1 -1
- package/dist/graph/graphs.service.d.ts +524 -0
- package/dist/graph/graphs.service.js +1683 -0
- package/dist/graph/graphs.service.js.map +1 -0
- package/dist/graph/index.d.ts +54 -8
- package/dist/graph/index.js +67 -32
- package/dist/graph/index.js.map +1 -1
- package/dist/graph/transactions/index.d.ts +4 -0
- package/dist/graph/transactions/index.js +9 -0
- package/dist/graph/transactions/index.js.map +1 -0
- package/dist/graph/transactions/transaction-manager.d.ts +61 -0
- package/dist/graph/transactions/transaction-manager.js +126 -0
- package/dist/graph/transactions/transaction-manager.js.map +1 -0
- package/dist/graph/types/connection.interface.d.ts +141 -0
- package/dist/graph/types/connection.interface.js +9 -0
- package/dist/graph/types/connection.interface.js.map +1 -0
- package/dist/graph/types/enums.d.ts +101 -0
- package/dist/graph/types/enums.js +114 -0
- package/dist/graph/types/enums.js.map +1 -0
- package/dist/graph/types/index.d.ts +11 -9
- package/dist/graph/types/index.js +15 -30
- package/dist/graph/types/index.js.map +1 -1
- package/dist/graph/types/node.interface.d.ts +248 -0
- package/dist/graph/types/node.interface.js +9 -0
- package/dist/graph/types/node.interface.js.map +1 -0
- package/dist/graph/types/query.interface.d.ts +168 -0
- package/dist/graph/types/query.interface.js +9 -0
- package/dist/graph/types/query.interface.js.map +1 -0
- package/dist/graph/types/relationship.interface.d.ts +207 -0
- package/dist/graph/types/relationship.interface.js +9 -0
- package/dist/graph/types/relationship.interface.js.map +1 -0
- package/dist/graph/types/schema.interface.d.ts +295 -0
- package/dist/graph/types/schema.interface.js +9 -0
- package/dist/graph/types/schema.interface.js.map +1 -0
- package/dist/graph/types/transaction.interface.d.ts +55 -0
- package/dist/graph/types/transaction.interface.js +9 -0
- package/dist/graph/types/transaction.interface.js.map +1 -0
- package/dist/graph/types/traversal.interface.d.ts +181 -0
- package/dist/graph/types/traversal.interface.js +9 -0
- package/dist/graph/types/traversal.interface.js.map +1 -0
- package/dist/graph/utils/graph-error.d.ts +71 -0
- package/dist/graph/utils/graph-error.js +142 -0
- package/dist/graph/utils/graph-error.js.map +1 -0
- package/dist/graph/utils/index.d.ts +4 -0
- package/dist/graph/utils/index.js +9 -0
- package/dist/graph/utils/index.js.map +1 -0
- package/dist/index.d.ts +1905 -875
- package/dist/index.js +3063 -1282
- package/dist/index.js.map +1 -1
- package/dist/init.interface.d.ts +407 -0
- package/dist/init.interface.js +3 -0
- package/dist/init.interface.js.map +1 -0
- package/dist/jobs/index.d.ts +38 -0
- package/dist/jobs/index.js +50 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/jobs.service.d.ts +154 -0
- package/dist/jobs/jobs.service.js +491 -0
- package/dist/jobs/jobs.service.js.map +1 -0
- package/dist/jobs/jobs.state.d.ts +113 -0
- package/dist/jobs/jobs.state.js +447 -0
- package/dist/jobs/jobs.state.js.map +1 -0
- package/dist/jobs/types.d.ts +449 -0
- package/dist/jobs/types.js +74 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/logs/logs.types.d.ts +12 -2
- package/dist/logs/logs.types.js +5 -1
- package/dist/logs/logs.types.js.map +1 -1
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +11 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/models.service.d.ts +137 -0
- package/dist/models/models.service.js +195 -0
- package/dist/models/models.service.js.map +1 -0
- package/dist/notifications/index.d.ts +13 -0
- package/dist/notifications/index.js +26 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/notifications/notifications.service.d.ts +252 -0
- package/dist/notifications/notifications.service.js +654 -0
- package/dist/notifications/notifications.service.js.map +1 -0
- package/dist/notifications/types/index.d.ts +4 -0
- package/dist/notifications/types/index.js +21 -0
- package/dist/notifications/types/index.js.map +1 -0
- package/dist/notifications/types/notifications.types.d.ts +400 -0
- package/dist/notifications/types/notifications.types.js +49 -0
- package/dist/notifications/types/notifications.types.js.map +1 -0
- package/dist/processor/services/messagebrokers/kafka.service.js +2 -0
- package/dist/processor/services/messagebrokers/kafka.service.js.map +1 -1
- package/dist/processor/services/messagebrokers/rabbitmq.service.d.ts +1 -9
- package/dist/processor/services/messagebrokers/rabbitmq.service.js +11 -40
- package/dist/processor/services/messagebrokers/rabbitmq.service.js.map +1 -1
- package/dist/processor/services/processor.service.d.ts +86 -70
- package/dist/processor/services/processor.service.js +1353 -1259
- package/dist/processor/services/processor.service.js.map +1 -1
- package/dist/processor/utils/processor.utils.js +5 -1
- package/dist/processor/utils/processor.utils.js.map +1 -1
- package/dist/products/services/products.service.d.ts +167 -25
- package/dist/products/services/products.service.js +1248 -412
- package/dist/products/services/products.service.js.map +1 -1
- package/dist/products/validators/index.d.ts +6 -3
- package/dist/products/validators/index.js +14 -5
- package/dist/products/validators/index.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productAgent.validator.d.ts +3 -0
- package/dist/products/validators/joi-validators/create.productAgent.validator.js +218 -0
- package/dist/products/validators/joi-validators/create.productAgent.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/create.productDatabase.validator.js +5 -0
- package/dist/products/validators/joi-validators/create.productDatabase.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.d.ts +4 -15
- package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js +109 -501
- package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productGraph.validator.js +14 -9
- package/dist/products/validators/joi-validators/create.productGraph.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js +0 -1
- package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js +87 -30
- package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productModel.validator.d.ts +3 -0
- package/dist/products/validators/joi-validators/create.productModel.validator.js +132 -0
- package/dist/products/validators/joi-validators/create.productModel.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/create.productNotification.validator.js +135 -50
- package/dist/products/validators/joi-validators/create.productNotification.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productStorage.validator.js +77 -18
- package/dist/products/validators/joi-validators/create.productStorage.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productVector.validator.d.ts +3 -0
- package/dist/products/validators/joi-validators/create.productVector.validator.js +135 -0
- package/dist/products/validators/joi-validators/create.productVector.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/update.productDatabase.validator.js +5 -0
- package/dist/products/validators/joi-validators/update.productDatabase.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.d.ts +0 -6
- package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js +26 -28
- package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.productGraph.validator.js +11 -12
- package/dist/products/validators/joi-validators/update.productGraph.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js +0 -1
- package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js.map +1 -1
- package/dist/resilience/fallback.service.d.ts +88 -0
- package/dist/resilience/fallback.service.js +511 -0
- package/dist/resilience/fallback.service.js.map +1 -0
- package/dist/resilience/healthcheck.service.d.ts +106 -0
- package/dist/resilience/healthcheck.service.js +379 -0
- package/dist/resilience/healthcheck.service.js.map +1 -0
- package/dist/resilience/index.d.ts +104 -0
- package/dist/resilience/index.js +140 -0
- package/dist/resilience/index.js.map +1 -0
- package/dist/resilience/quota.service.d.ts +90 -0
- package/dist/resilience/quota.service.js +519 -0
- package/dist/resilience/quota.service.js.map +1 -0
- package/dist/resilience/resilience.service.d.ts +95 -0
- package/dist/resilience/resilience.service.js +525 -0
- package/dist/resilience/resilience.service.js.map +1 -0
- package/dist/resilience/types/index.d.ts +479 -0
- package/dist/resilience/types/index.js +26 -0
- package/dist/resilience/types/index.js.map +1 -0
- package/dist/secrets/index.d.ts +10 -0
- package/dist/secrets/index.js +33 -0
- package/dist/secrets/index.js.map +1 -0
- package/dist/secrets/secrets.resolver.d.ts +52 -0
- package/dist/secrets/secrets.resolver.js +233 -0
- package/dist/secrets/secrets.resolver.js.map +1 -0
- package/dist/secrets/secrets.service.d.ts +83 -0
- package/dist/secrets/secrets.service.js +159 -0
- package/dist/secrets/secrets.service.js.map +1 -0
- package/dist/secrets/secrets.types.d.ts +188 -0
- package/dist/secrets/secrets.types.js +87 -0
- package/dist/secrets/secrets.types.js.map +1 -0
- package/dist/sessions/index.d.ts +50 -0
- package/dist/sessions/index.js +93 -0
- package/dist/sessions/index.js.map +1 -0
- package/dist/sessions/sessions.helper.d.ts +68 -0
- package/dist/sessions/sessions.helper.js +116 -0
- package/dist/sessions/sessions.helper.js.map +1 -0
- package/dist/sessions/sessions.resolver.d.ts +150 -0
- package/dist/sessions/sessions.resolver.js +356 -0
- package/dist/sessions/sessions.resolver.js.map +1 -0
- package/dist/sessions/sessions.service.d.ts +170 -0
- package/dist/sessions/sessions.service.js +736 -0
- package/dist/sessions/sessions.service.js.map +1 -0
- package/dist/sessions/types/index.d.ts +290 -0
- package/dist/sessions/types/index.js +6 -0
- package/dist/sessions/types/index.js.map +1 -0
- package/dist/storage/index.d.ts +66 -0
- package/dist/storage/index.js +98 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/storage.service.d.ts +123 -0
- package/dist/storage/storage.service.js +478 -0
- package/dist/storage/storage.service.js.map +1 -0
- package/dist/storage/types/index.d.ts +207 -0
- package/dist/storage/types/index.js +6 -0
- package/dist/storage/types/index.js.map +1 -0
- package/dist/storage/utils/storage.util.d.ts +51 -0
- package/dist/storage/utils/storage.util.js +402 -0
- package/dist/storage/utils/storage.util.js.map +1 -0
- package/dist/test/index.d.ts +3 -0
- package/dist/test/index.js +13 -0
- package/dist/test/index.js.map +1 -0
- package/dist/test/test.appBuilder.d.ts +0 -1
- package/dist/test/test.appBuilder.js +0 -15
- package/dist/test/test.appBuilder.js.map +1 -1
- package/dist/test/test.database.js +140 -0
- package/dist/test/test.database.js.map +1 -0
- package/dist/test/test.health.d.ts +0 -1
- package/dist/test/test.health.js +0 -48
- package/dist/test/test.health.js.map +1 -1
- package/dist/test/test.import.d.ts +0 -1
- package/dist/test/test.import.js +0 -1506
- package/dist/test/test.import.js.map +1 -1
- package/dist/test/test.import.openapi.d.ts +0 -1
- package/dist/test/test.import.openapi.js +0 -75
- package/dist/test/test.import.openapi.js.map +1 -1
- package/dist/test/test.imports.d.ts +0 -1
- package/dist/test/test.imports.js +0 -76
- package/dist/test/test.imports.js.map +1 -1
- package/dist/test/test.logs.d.ts +0 -1
- package/dist/test/test.logs.js +0 -17
- package/dist/test/test.logs.js.map +1 -1
- package/dist/test/test.notifiers.d.ts +0 -1
- package/dist/test/test.notifiers.js +0 -84
- package/dist/test/test.notifiers.js.map +1 -1
- package/dist/test/test.processor.d.ts +0 -1
- package/dist/test/test.processor.js +0 -37
- package/dist/test/test.processor.js.map +1 -1
- package/dist/test/test.productBuilder.d.ts +0 -1
- package/dist/test/test.productBuilder.js +0 -660
- package/dist/test/test.productBuilder.js.map +1 -1
- package/dist/test/test.products.d.ts +0 -1
- package/dist/test/test.products.js +0 -48
- package/dist/test/test.products.js.map +1 -1
- package/dist/test/test.storage.js +332 -0
- package/dist/test/test.storage.js.map +1 -0
- package/dist/test/test.triggers.js +314 -0
- package/dist/test/test.triggers.js.map +1 -0
- package/dist/types/appBuilder.types.d.ts +1 -1
- package/dist/types/enums.d.ts +6 -1
- package/dist/types/enums.js +5 -0
- package/dist/types/enums.js.map +1 -1
- package/dist/types/processor.types.d.ts +197 -35
- package/dist/types/processor.types.js +9 -1
- package/dist/types/processor.types.js.map +1 -1
- package/dist/types/productsBuilder.types.d.ts +837 -75
- package/dist/types/productsBuilder.types.js +168 -62
- package/dist/types/productsBuilder.types.js.map +1 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +2 -49
- package/dist/utils/index.js.map +1 -1
- package/dist/vector/adapters/base.adapter.d.ts +152 -0
- package/dist/vector/adapters/base.adapter.js +137 -0
- package/dist/vector/adapters/base.adapter.js.map +1 -0
- package/dist/vector/adapters/index.d.ts +10 -0
- package/dist/vector/adapters/index.js +19 -0
- package/dist/vector/adapters/index.js.map +1 -0
- package/dist/vector/adapters/memory.adapter.d.ts +85 -0
- package/dist/vector/adapters/memory.adapter.js +505 -0
- package/dist/vector/adapters/memory.adapter.js.map +1 -0
- package/dist/vector/adapters/pinecone.adapter.d.ts +52 -0
- package/dist/vector/adapters/pinecone.adapter.js +400 -0
- package/dist/vector/adapters/pinecone.adapter.js.map +1 -0
- package/dist/vector/adapters/qdrant.adapter.d.ts +56 -0
- package/dist/vector/adapters/qdrant.adapter.js +392 -0
- package/dist/vector/adapters/qdrant.adapter.js.map +1 -0
- package/dist/vector/adapters/weaviate.adapter.d.ts +64 -0
- package/dist/vector/adapters/weaviate.adapter.js +478 -0
- package/dist/vector/adapters/weaviate.adapter.js.map +1 -0
- package/dist/vector/index.d.ts +47 -0
- package/dist/vector/index.js +72 -0
- package/dist/vector/index.js.map +1 -0
- package/dist/vector/types/connection.interface.d.ts +151 -0
- package/dist/vector/types/connection.interface.js +8 -0
- package/dist/vector/types/connection.interface.js.map +1 -0
- package/dist/vector/types/embedding.interface.d.ts +144 -0
- package/dist/vector/types/embedding.interface.js +8 -0
- package/dist/vector/types/embedding.interface.js.map +1 -0
- package/dist/vector/types/enums.d.ts +104 -0
- package/dist/vector/types/enums.js +113 -0
- package/dist/vector/types/enums.js.map +1 -0
- package/dist/vector/types/index.d.ts +9 -0
- package/dist/vector/types/index.js +16 -0
- package/dist/vector/types/index.js.map +1 -0
- package/dist/vector/types/vector.interface.d.ts +315 -0
- package/dist/vector/types/vector.interface.js +8 -0
- package/dist/vector/types/vector.interface.js.map +1 -0
- package/dist/vector/utils/index.d.ts +6 -0
- package/dist/vector/utils/index.js +11 -0
- package/dist/vector/utils/index.js.map +1 -0
- package/dist/vector/utils/vector-error.d.ts +69 -0
- package/dist/vector/utils/vector-error.js +117 -0
- package/dist/vector/utils/vector-error.js.map +1 -0
- package/dist/vector/vector-database.service.d.ts +405 -0
- package/dist/vector/vector-database.service.js +544 -0
- package/dist/vector/vector-database.service.js.map +1 -0
- package/dist/vector/vector.service.d.ts +245 -0
- package/dist/vector/vector.service.js +381 -0
- package/dist/vector/vector.service.js.map +1 -0
- package/dist/workflows/index.d.ts +30 -0
- package/dist/workflows/index.js +64 -0
- package/dist/workflows/index.js.map +1 -0
- package/dist/workflows/types/index.d.ts +6 -0
- package/dist/workflows/types/index.js +23 -0
- package/dist/workflows/types/index.js.map +1 -0
- package/dist/workflows/types/workflows.types.d.ts +1035 -0
- package/dist/workflows/types/workflows.types.js +13 -0
- package/dist/workflows/types/workflows.types.js.map +1 -0
- package/dist/workflows/workflow-builder.d.ts +70 -0
- package/dist/workflows/workflow-builder.js +338 -0
- package/dist/workflows/workflow-builder.js.map +1 -0
- package/dist/workflows/workflow-executor.d.ts +205 -0
- package/dist/workflows/workflow-executor.js +1186 -0
- package/dist/workflows/workflow-executor.js.map +1 -0
- package/dist/workflows/workflows.service.d.ts +398 -0
- package/dist/workflows/workflows.service.js +1595 -0
- package/dist/workflows/workflows.service.js.map +1 -0
- package/package.json +16 -13
- package/dist/actions/actions.repo.d.ts +0 -0
- package/dist/actions/actions.repo.js +0 -13
- package/dist/actions/actions.repo.js.map +0 -1
- package/dist/actions/actions.service.d.ts +0 -0
- package/dist/actions/actions.service.js +0 -24
- package/dist/actions/actions.service.js.map +0 -1
- package/dist/actions/utils/actions.util.read.d.ts +0 -0
- package/dist/actions/utils/actions.util.read.js +0 -427
- package/dist/actions/utils/actions.util.read.js.map +0 -1
- package/dist/api/services/integrationsApi.service.d.ts +0 -18
- package/dist/api/services/integrationsApi.service.js +0 -80
- package/dist/api/services/integrationsApi.service.js.map +0 -1
- package/dist/api/services/workspaceSecretsApi.service.d.ts +0 -75
- package/dist/api/services/workspaceSecretsApi.service.js +0 -62
- package/dist/api/services/workspaceSecretsApi.service.js.map +0 -1
- package/dist/appBuilder/services/app.service.d.ts +0 -111
- package/dist/appBuilder/services/app.service.js +0 -737
- package/dist/appBuilder/services/app.service.js.map +0 -1
- package/dist/appBuilder/services/appBuilder.service.d.ts +0 -111
- package/dist/appBuilder/services/appBuilder.service.js +0 -662
- package/dist/appBuilder/services/appBuilder.service.js.map +0 -1
- package/dist/appBuilder/utils/objects.utils.d.ts +0 -3
- package/dist/appBuilder/utils/objects.utils.js +0 -9
- package/dist/appBuilder/utils/objects.utils.js.map +0 -1
- package/dist/appBuilder/utils/string.utils.d.ts +0 -2
- package/dist/appBuilder/utils/string.utils.js +0 -57
- package/dist/appBuilder/utils/string.utils.js.map +0 -1
- package/dist/appBuilder/validators/index.d.ts +0 -19
- package/dist/appBuilder/validators/index.js +0 -40
- package/dist/appBuilder/validators/index.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.app.validator.d.ts +0 -3
- package/dist/appBuilder/validators/joi-validators/create.app.validator.js +0 -10
- package/dist/appBuilder/validators/joi-validators/create.app.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appAction.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/create.appAction.validator.js +0 -20
- package/dist/appBuilder/validators/joi-validators/create.appAction.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appActionResponse.validator.d.ts +0 -7
- package/dist/appBuilder/validators/joi-validators/create.appActionResponse.validator.js +0 -44
- package/dist/appBuilder/validators/joi-validators/create.appActionResponse.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appAuth.validator.d.ts +0 -3
- package/dist/appBuilder/validators/joi-validators/create.appAuth.validator.js +0 -31
- package/dist/appBuilder/validators/joi-validators/create.appAuth.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appBody.validators.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/create.appBody.validators.js +0 -11
- package/dist/appBuilder/validators/joi-validators/create.appBody.validators.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appConstants.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/create.appConstants.validator.js +0 -12
- package/dist/appBuilder/validators/joi-validators/create.appConstants.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appEnv.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/create.appEnv.validator.js +0 -17
- package/dist/appBuilder/validators/joi-validators/create.appEnv.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appEvent.validator.d.ts +0 -5
- package/dist/appBuilder/validators/joi-validators/create.appEvent.validator.js +0 -30
- package/dist/appBuilder/validators/joi-validators/create.appEvent.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appVariable.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/create.appVariable.validator.js +0 -14
- package/dist/appBuilder/validators/joi-validators/create.appVariable.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/sample.validator.d.ts +0 -5
- package/dist/appBuilder/validators/joi-validators/sample.validator.js +0 -26
- package/dist/appBuilder/validators/joi-validators/sample.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.app.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.app.validator.js +0 -34
- package/dist/appBuilder/validators/joi-validators/update.app.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appAction.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.appAction.validator.js +0 -23
- package/dist/appBuilder/validators/joi-validators/update.appAction.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appActionResponse.validator.d.ts +0 -3
- package/dist/appBuilder/validators/joi-validators/update.appActionResponse.validator.js +0 -21
- package/dist/appBuilder/validators/joi-validators/update.appActionResponse.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appAuth.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.appAuth.validator.js +0 -19
- package/dist/appBuilder/validators/joi-validators/update.appAuth.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appConstants.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.appConstants.validator.js +0 -12
- package/dist/appBuilder/validators/joi-validators/update.appConstants.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appEnv.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.appEnv.validator.js +0 -17
- package/dist/appBuilder/validators/joi-validators/update.appEnv.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appEvent.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.appEvent.validator.js +0 -16
- package/dist/appBuilder/validators/joi-validators/update.appEvent.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appVariables.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.appVariables.validator.js +0 -14
- package/dist/appBuilder/validators/joi-validators/update.appVariables.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.validation.entityData.validator.d.ts +0 -3
- package/dist/appBuilder/validators/joi-validators/update.validation.entityData.validator.js +0 -27
- package/dist/appBuilder/validators/joi-validators/update.validation.entityData.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/create.appEvent.validator.d.ts +0 -5
- package/dist/apps/validators/joi-validators/create.appEvent.validator.js +0 -30
- package/dist/apps/validators/joi-validators/create.appEvent.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/update.appEvent.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/update.appEvent.validator.js +0 -16
- package/dist/apps/validators/joi-validators/update.appEvent.validator.js.map +0 -1
- package/dist/clients/integrations.client.d.ts +0 -2
- package/dist/clients/integrations.client.js +0 -26
- package/dist/clients/integrations.client.js.map +0 -1
- package/dist/database/database.service.d.ts +0 -232
- package/dist/database/database.service.js +0 -802
- package/dist/database/database.service.js.map +0 -1
- package/dist/database/types/aggregation.types.d.ts +0 -261
- package/dist/database/types/aggregation.types.js +0 -21
- package/dist/database/types/aggregation.types.js.map +0 -1
- package/dist/database/types/connection.types.d.ts +0 -132
- package/dist/database/types/connection.types.js +0 -6
- package/dist/database/types/connection.types.js.map +0 -1
- package/dist/database/types/database.types.d.ts +0 -175
- package/dist/database/types/database.types.js +0 -75
- package/dist/database/types/database.types.js.map +0 -1
- package/dist/database/types/index.types.d.ts +0 -220
- package/dist/database/types/index.types.js +0 -27
- package/dist/database/types/index.types.js.map +0 -1
- package/dist/database/types/migration.types.d.ts +0 -205
- package/dist/database/types/migration.types.js +0 -44
- package/dist/database/types/migration.types.js.map +0 -1
- package/dist/database/types/query.types.d.ts +0 -305
- package/dist/database/types/query.types.js +0 -57
- package/dist/database/types/query.types.js.map +0 -1
- package/dist/database/types/result.types.d.ts +0 -220
- package/dist/database/types/result.types.js +0 -6
- package/dist/database/types/result.types.js.map +0 -1
- package/dist/database/types/schema.types.d.ts +0 -190
- package/dist/database/types/schema.types.js +0 -69
- package/dist/database/types/schema.types.js.map +0 -1
- package/dist/database/utils/helpers.d.ts +0 -66
- package/dist/database/utils/helpers.js +0 -501
- package/dist/database/utils/helpers.js.map +0 -1
- package/dist/database/utils/migration.utils.d.ts +0 -151
- package/dist/database/utils/migration.utils.js +0 -476
- package/dist/database/utils/migration.utils.js.map +0 -1
- package/dist/database/utils/transaction.d.ts +0 -64
- package/dist/database/utils/transaction.js +0 -130
- package/dist/database/utils/transaction.js.map +0 -1
- package/dist/database/validators/connection.validator.d.ts +0 -20
- package/dist/database/validators/connection.validator.js +0 -267
- package/dist/database/validators/connection.validator.js.map +0 -1
- package/dist/database/validators/query.validator.d.ts +0 -31
- package/dist/database/validators/query.validator.js +0 -305
- package/dist/database/validators/query.validator.js.map +0 -1
- package/dist/database/validators/schema.validator.d.ts +0 -31
- package/dist/database/validators/schema.validator.js +0 -334
- package/dist/database/validators/schema.validator.js.map +0 -1
- package/dist/graph/graph.service.d.ts +0 -278
- package/dist/graph/graph.service.js +0 -687
- package/dist/graph/graph.service.js.map +0 -1
- package/dist/graph/types/connection.types.d.ts +0 -158
- package/dist/graph/types/connection.types.js +0 -43
- package/dist/graph/types/connection.types.js.map +0 -1
- package/dist/graph/types/graph.types.d.ts +0 -144
- package/dist/graph/types/graph.types.js +0 -84
- package/dist/graph/types/graph.types.js.map +0 -1
- package/dist/graph/types/node.types.d.ts +0 -193
- package/dist/graph/types/node.types.js +0 -49
- package/dist/graph/types/node.types.js.map +0 -1
- package/dist/graph/types/path.types.d.ts +0 -224
- package/dist/graph/types/path.types.js +0 -38
- package/dist/graph/types/path.types.js.map +0 -1
- package/dist/graph/types/query.types.d.ts +0 -247
- package/dist/graph/types/query.types.js +0 -23
- package/dist/graph/types/query.types.js.map +0 -1
- package/dist/graph/types/relationship.types.d.ts +0 -224
- package/dist/graph/types/relationship.types.js +0 -35
- package/dist/graph/types/relationship.types.js.map +0 -1
- package/dist/graph/types/result.types.d.ts +0 -237
- package/dist/graph/types/result.types.js +0 -7
- package/dist/graph/types/result.types.js.map +0 -1
- package/dist/graph/validators/index.d.ts +0 -81
- package/dist/graph/validators/index.js +0 -243
- package/dist/graph/validators/index.js.map +0 -1
- package/dist/integrationsBuilder/services/integration.service.d.ts +0 -138
- package/dist/integrationsBuilder/services/integration.service.js +0 -1148
- package/dist/integrationsBuilder/services/integration.service.js.map +0 -1
- package/dist/integrationsBuilder/services/integrationBuilder.service.d.ts +0 -130
- package/dist/integrationsBuilder/services/integrationBuilder.service.js +0 -1017
- package/dist/integrationsBuilder/services/integrationBuilder.service.js.map +0 -1
- package/dist/integrationsBuilder/utils/objects.utils.d.ts +0 -2
- package/dist/integrationsBuilder/utils/objects.utils.js +0 -48
- package/dist/integrationsBuilder/utils/objects.utils.js.map +0 -1
- package/dist/integrationsBuilder/utils/string.utils.d.ts +0 -1
- package/dist/integrationsBuilder/utils/string.utils.js +0 -9
- package/dist/integrationsBuilder/utils/string.utils.js.map +0 -1
- package/dist/integrationsBuilder/validators/index.d.ts +0 -18
- package/dist/integrationsBuilder/validators/index.js +0 -38
- package/dist/integrationsBuilder/validators/index.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integration.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integration.validator.js +0 -10
- package/dist/integrationsBuilder/validators/joi-validators/create.integration.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationApp.validator.d.ts +0 -4
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationApp.validator.js +0 -26
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationApp.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationCache.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationCache.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationCache.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationDatabase.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationDatabase.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationDatabase.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationEnv.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationEnv.validator.js +0 -10
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationEnv.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationFeature.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationFeature.validator.js +0 -60
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationFeature.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationFunction.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationFunction.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationFunction.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationJob.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationJob.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationJob.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationNotification.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationNotification.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationNotification.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationApp.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationApp.validator.js +0 -9
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationApp.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationCache.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationCache.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationCache.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationDatabase.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationDatabase.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationDatabase.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationEnv.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationEnv.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationEnv.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationFeature.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationFeature.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationFeature.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationFunction.validator copy.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationFunction.validator copy.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationFunction.validator copy.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationJob.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationJob.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationJob.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationNotification.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationNotification.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationNotification.validator.js.map +0 -1
- package/dist/postman.d.ts +0 -1
- package/dist/postman.js +0 -21674
- package/dist/postman.js.map +0 -1
- package/dist/processor/utils/mongo.util.d.ts +0 -0
- package/dist/processor/utils/mongo.util.js +0 -152
- package/dist/processor/utils/mongo.util.js.map +0 -1
- package/dist/processor/utils/postgres.util.d.ts +0 -14
- package/dist/processor/utils/postgres.util.js +0 -83
- package/dist/processor/utils/postgres.util.js.map +0 -1
- package/dist/products/services/utils/crypt.utils.d.ts +0 -1
- package/dist/products/services/utils/crypt.utils.js +0 -17
- package/dist/products/services/utils/crypt.utils.js.map +0 -1
- package/dist/products/services/utils/functions.utils.d.ts +0 -13
- package/dist/products/services/utils/functions.utils.js +0 -289
- package/dist/products/services/utils/functions.utils.js.map +0 -1
- package/dist/products/services/utils/objects.utils.d.ts +0 -13
- package/dist/products/services/utils/objects.utils.js +0 -89
- package/dist/products/services/utils/objects.utils.js.map +0 -1
- package/dist/products/services/utils/string.utils.d.ts +0 -12
- package/dist/products/services/utils/string.utils.js +0 -168
- package/dist/products/services/utils/string.utils.js.map +0 -1
- package/dist/products/validators/joi-validators/create.product.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.product.validator.js +0 -10
- package/dist/products/validators/joi-validators/create.product.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productGraphAction.validator.d.ts +0 -14
- package/dist/products/validators/joi-validators/create.productGraphAction.validator.js +0 -696
- package/dist/products/validators/joi-validators/create.productGraphAction.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productGraphAction.validator.d.ts +0 -7
- package/dist/products/validators/joi-validators/update.productGraphAction.validator.js +0 -72
- package/dist/products/validators/joi-validators/update.productGraphAction.validator.js.map +0 -1
- package/dist/test.appBuilder.js +0 -14
- package/dist/test.appBuilder.js.map +0 -1
- package/dist/test.import.d.ts +0 -0
- package/dist/test.import.js +0 -24
- package/dist/test.import.js.map +0 -1
- package/dist/test.imports.js +0 -28
- package/dist/test.imports.js.map +0 -1
- package/dist/test.integrationBuilder.js +0 -276
- package/dist/test.integrationBuilder.js.map +0 -1
- package/dist/test.processor.d.ts +0 -1
- package/dist/test.processor.js +0 -23
- package/dist/test.processor.js.map +0 -1
- package/dist/test.utils.d.ts +0 -1
- package/dist/test.utils.js +0 -25
- package/dist/test.utils.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/integrationsBuilder.types.d.ts +0 -276
- package/dist/types/integrationsBuilder.types.js +0 -51
- package/dist/types/integrationsBuilder.types.js.map +0 -1
- /package/dist/{test.appBuilder.d.ts → test/test.database.d.ts} +0 -0
- /package/dist/{test.imports.d.ts → test/test.storage.d.ts} +0 -0
- /package/dist/{test.integrationBuilder.d.ts → test/test.triggers.d.ts} +0 -0
|
@@ -1,687 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Graph Service
|
|
4
|
-
* Main entry point for graph database operations in Ductape SDK
|
|
5
|
-
*
|
|
6
|
-
* Provides a unified interface for interacting with graph databases
|
|
7
|
-
* including Neo4j, AWS Neptune, ArangoDB, and Memgraph
|
|
8
|
-
*/
|
|
9
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.GraphService = void 0;
|
|
14
|
-
exports.createGraphService = createGraphService;
|
|
15
|
-
const adapters_1 = require("./adapters");
|
|
16
|
-
const graph_types_1 = require("./types/graph.types");
|
|
17
|
-
const connection_types_1 = require("./types/connection.types");
|
|
18
|
-
const products_service_1 = __importDefault(require("../products/services/products.service"));
|
|
19
|
-
const productsBuilder_types_1 = require("../types/productsBuilder.types");
|
|
20
|
-
const index_types_1 = require("../types/index.types");
|
|
21
|
-
const logs_service_1 = __importDefault(require("../logs/logs.service"));
|
|
22
|
-
const logs_types_1 = require("../logs/logs.types");
|
|
23
|
-
const uuid_1 = require("uuid");
|
|
24
|
-
/**
|
|
25
|
-
* Graph Service Class
|
|
26
|
-
* Provides a high-level API for graph database operations
|
|
27
|
-
*/
|
|
28
|
-
class GraphService {
|
|
29
|
-
constructor(config) {
|
|
30
|
-
this.adapters = new Map();
|
|
31
|
-
this.connectionPool = new Map();
|
|
32
|
-
this.currentConnection = null;
|
|
33
|
-
this.currentAdapter = null;
|
|
34
|
-
this.config = config;
|
|
35
|
-
this.initializeAdapters();
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Initialize all supported adapters
|
|
39
|
-
*/
|
|
40
|
-
initializeAdapters() {
|
|
41
|
-
this.adapters.set(graph_types_1.GraphDatabaseType.NEO4J, new adapters_1.Neo4jAdapter());
|
|
42
|
-
this.adapters.set(graph_types_1.GraphDatabaseType.NEPTUNE, new adapters_1.NeptuneAdapter());
|
|
43
|
-
this.adapters.set(graph_types_1.GraphDatabaseType.ARANGODB, new adapters_1.ArangoDBAdapter());
|
|
44
|
-
this.adapters.set(graph_types_1.GraphDatabaseType.MEMGRAPH, new adapters_1.MemgraphAdapter());
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Get adapter for a specific database type
|
|
48
|
-
*/
|
|
49
|
-
getAdapter(type) {
|
|
50
|
-
const adapter = this.adapters.get(type);
|
|
51
|
-
if (!adapter) {
|
|
52
|
-
throw new graph_types_1.GraphError(graph_types_1.GraphErrorType.VALIDATION_ERROR, `No adapter available for database type: ${type}`);
|
|
53
|
-
}
|
|
54
|
-
return adapter;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Generate a unique connection key
|
|
58
|
-
*/
|
|
59
|
-
getConnectionKey(config) {
|
|
60
|
-
const baseKey = `${config.type}-${config.env}`;
|
|
61
|
-
if (config.connectionTag) {
|
|
62
|
-
return `${baseKey}-${config.connectionTag}`;
|
|
63
|
-
}
|
|
64
|
-
return baseKey;
|
|
65
|
-
}
|
|
66
|
-
// ==================== CONNECTION MANAGEMENT ====================
|
|
67
|
-
/**
|
|
68
|
-
* Connect to a graph database
|
|
69
|
-
*/
|
|
70
|
-
async connect(config) {
|
|
71
|
-
let resolvedConfig;
|
|
72
|
-
if ((0, connection_types_1.isProductGraphConfig)(config)) {
|
|
73
|
-
// Resolve product-based configuration
|
|
74
|
-
resolvedConfig = await this.resolveProductConfig(config);
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
resolvedConfig = config;
|
|
78
|
-
}
|
|
79
|
-
const connectionKey = this.getConnectionKey(resolvedConfig);
|
|
80
|
-
// Check if connection already exists in pool
|
|
81
|
-
const pooled = this.connectionPool.get(connectionKey);
|
|
82
|
-
if (pooled && pooled.connection.isConnected()) {
|
|
83
|
-
pooled.inUse = true;
|
|
84
|
-
pooled.lastUsed = new Date();
|
|
85
|
-
this.currentConnection = pooled.connection;
|
|
86
|
-
this.currentAdapter = pooled.adapter;
|
|
87
|
-
return pooled.connection;
|
|
88
|
-
}
|
|
89
|
-
// Create new connection
|
|
90
|
-
const adapter = this.getAdapter(resolvedConfig.type);
|
|
91
|
-
const connection = await adapter.connect(resolvedConfig);
|
|
92
|
-
// Add to pool
|
|
93
|
-
this.connectionPool.set(connectionKey, {
|
|
94
|
-
connection,
|
|
95
|
-
adapter,
|
|
96
|
-
lastUsed: new Date(),
|
|
97
|
-
inUse: true,
|
|
98
|
-
});
|
|
99
|
-
this.currentConnection = connection;
|
|
100
|
-
this.currentAdapter = adapter;
|
|
101
|
-
return connection;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Disconnect from a graph database
|
|
105
|
-
*/
|
|
106
|
-
async disconnect(connection) {
|
|
107
|
-
const conn = connection || this.currentConnection;
|
|
108
|
-
if (!conn) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
// Find in pool and mark as not in use
|
|
112
|
-
for (const [key, pooled] of this.connectionPool.entries()) {
|
|
113
|
-
if (pooled.connection === conn) {
|
|
114
|
-
pooled.inUse = false;
|
|
115
|
-
await pooled.adapter.disconnect(conn);
|
|
116
|
-
this.connectionPool.delete(key);
|
|
117
|
-
break;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
if (conn === this.currentConnection) {
|
|
121
|
-
this.currentConnection = null;
|
|
122
|
-
this.currentAdapter = null;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Disconnect all connections
|
|
127
|
-
*/
|
|
128
|
-
async disconnectAll() {
|
|
129
|
-
for (const [key, pooled] of this.connectionPool.entries()) {
|
|
130
|
-
await pooled.adapter.disconnect(pooled.connection);
|
|
131
|
-
}
|
|
132
|
-
this.connectionPool.clear();
|
|
133
|
-
this.currentConnection = null;
|
|
134
|
-
this.currentAdapter = null;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Test a connection
|
|
138
|
-
*/
|
|
139
|
-
async testConnection(config) {
|
|
140
|
-
if (config) {
|
|
141
|
-
const connection = await this.connect(config);
|
|
142
|
-
const adapter = this.currentAdapter;
|
|
143
|
-
const result = await adapter.testConnection(connection);
|
|
144
|
-
return result;
|
|
145
|
-
}
|
|
146
|
-
if (!this.currentConnection || !this.currentAdapter) {
|
|
147
|
-
throw new graph_types_1.GraphError(graph_types_1.GraphErrorType.CONNECTION_ERROR, 'No active connection. Call connect() first or provide a config.');
|
|
148
|
-
}
|
|
149
|
-
return this.currentAdapter.testConnection(this.currentConnection);
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Get database info
|
|
153
|
-
*/
|
|
154
|
-
async getDatabaseInfo() {
|
|
155
|
-
this.ensureConnection();
|
|
156
|
-
return this.currentAdapter.getDatabaseInfo(this.currentConnection);
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Resolve product-based configuration
|
|
160
|
-
* In a real implementation, this would fetch config from Ductape API
|
|
161
|
-
*/
|
|
162
|
-
async resolveProductConfig(config) {
|
|
163
|
-
// This would typically call the Ductape API to get the actual connection config
|
|
164
|
-
// For now, throw an error indicating this needs to be implemented
|
|
165
|
-
throw new graph_types_1.GraphError(graph_types_1.GraphErrorType.VALIDATION_ERROR, 'Product-based graph configuration requires Ductape API integration. Use direct connection config instead.');
|
|
166
|
-
}
|
|
167
|
-
// ==================== TRANSACTION MANAGEMENT ====================
|
|
168
|
-
/**
|
|
169
|
-
* Begin a transaction
|
|
170
|
-
*/
|
|
171
|
-
async beginTransaction(options) {
|
|
172
|
-
this.ensureConnection();
|
|
173
|
-
return this.currentAdapter.beginTransaction(this.currentConnection, options);
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Commit a transaction
|
|
177
|
-
*/
|
|
178
|
-
async commitTransaction(transaction) {
|
|
179
|
-
this.ensureConnection();
|
|
180
|
-
return this.currentAdapter.commitTransaction(this.currentConnection, transaction);
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Rollback a transaction
|
|
184
|
-
*/
|
|
185
|
-
async rollbackTransaction(transaction) {
|
|
186
|
-
this.ensureConnection();
|
|
187
|
-
return this.currentAdapter.rollbackTransaction(this.currentConnection, transaction);
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Execute operations within a transaction
|
|
191
|
-
*/
|
|
192
|
-
async executeTransaction(callback, options) {
|
|
193
|
-
this.ensureConnection();
|
|
194
|
-
return this.currentAdapter.executeTransaction(this.currentConnection, callback, options);
|
|
195
|
-
}
|
|
196
|
-
// ==================== RAW QUERY ====================
|
|
197
|
-
/**
|
|
198
|
-
* Execute a raw query
|
|
199
|
-
*/
|
|
200
|
-
async query(query, params, options) {
|
|
201
|
-
this.ensureConnection();
|
|
202
|
-
return this.currentAdapter.executeRaw(this.currentConnection, Object.assign({ query, params }, options));
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Execute a raw query with full options
|
|
206
|
-
*/
|
|
207
|
-
async executeRaw(options, transaction) {
|
|
208
|
-
this.ensureConnection();
|
|
209
|
-
return this.currentAdapter.executeRaw(this.currentConnection, options, transaction);
|
|
210
|
-
}
|
|
211
|
-
// ==================== NODE OPERATIONS ====================
|
|
212
|
-
/**
|
|
213
|
-
* Create a node
|
|
214
|
-
*/
|
|
215
|
-
async createNode(options, transaction) {
|
|
216
|
-
this.ensureConnection();
|
|
217
|
-
return this.currentAdapter.createNode(this.currentConnection, options, transaction);
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Find nodes
|
|
221
|
-
*/
|
|
222
|
-
async findNodes(options, transaction) {
|
|
223
|
-
this.ensureConnection();
|
|
224
|
-
return this.currentAdapter.findNodes(this.currentConnection, options, transaction);
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Find a single node by ID
|
|
228
|
-
*/
|
|
229
|
-
async findNodeById(id, transaction) {
|
|
230
|
-
this.ensureConnection();
|
|
231
|
-
return this.currentAdapter.findNodeById(this.currentConnection, id, transaction);
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Update a node
|
|
235
|
-
*/
|
|
236
|
-
async updateNode(options, transaction) {
|
|
237
|
-
this.ensureConnection();
|
|
238
|
-
return this.currentAdapter.updateNode(this.currentConnection, options, transaction);
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Delete node(s)
|
|
242
|
-
*/
|
|
243
|
-
async deleteNode(options, transaction) {
|
|
244
|
-
this.ensureConnection();
|
|
245
|
-
return this.currentAdapter.deleteNode(this.currentConnection, options, transaction);
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Merge a node (create if not exists, update if exists)
|
|
249
|
-
*/
|
|
250
|
-
async mergeNode(options, transaction) {
|
|
251
|
-
this.ensureConnection();
|
|
252
|
-
return this.currentAdapter.mergeNode(this.currentConnection, options, transaction);
|
|
253
|
-
}
|
|
254
|
-
// ==================== RELATIONSHIP OPERATIONS ====================
|
|
255
|
-
/**
|
|
256
|
-
* Create a relationship
|
|
257
|
-
*/
|
|
258
|
-
async createRelationship(options, transaction) {
|
|
259
|
-
this.ensureConnection();
|
|
260
|
-
return this.currentAdapter.createRelationship(this.currentConnection, options, transaction);
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Find relationships
|
|
264
|
-
*/
|
|
265
|
-
async findRelationships(options, transaction) {
|
|
266
|
-
this.ensureConnection();
|
|
267
|
-
return this.currentAdapter.findRelationships(this.currentConnection, options, transaction);
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Find a single relationship by ID
|
|
271
|
-
*/
|
|
272
|
-
async findRelationshipById(id, transaction) {
|
|
273
|
-
this.ensureConnection();
|
|
274
|
-
return this.currentAdapter.findRelationshipById(this.currentConnection, id, transaction);
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Update a relationship
|
|
278
|
-
*/
|
|
279
|
-
async updateRelationship(options, transaction) {
|
|
280
|
-
this.ensureConnection();
|
|
281
|
-
return this.currentAdapter.updateRelationship(this.currentConnection, options, transaction);
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Delete relationship(s)
|
|
285
|
-
*/
|
|
286
|
-
async deleteRelationship(options, transaction) {
|
|
287
|
-
this.ensureConnection();
|
|
288
|
-
return this.currentAdapter.deleteRelationship(this.currentConnection, options, transaction);
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* Merge a relationship
|
|
292
|
-
*/
|
|
293
|
-
async mergeRelationship(options, transaction) {
|
|
294
|
-
this.ensureConnection();
|
|
295
|
-
return this.currentAdapter.mergeRelationship(this.currentConnection, options, transaction);
|
|
296
|
-
}
|
|
297
|
-
// ==================== PATH & TRAVERSAL OPERATIONS ====================
|
|
298
|
-
/**
|
|
299
|
-
* Traverse the graph
|
|
300
|
-
*/
|
|
301
|
-
async traverse(options, transaction) {
|
|
302
|
-
this.ensureConnection();
|
|
303
|
-
return this.currentAdapter.traverse(this.currentConnection, options, transaction);
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* Find shortest path
|
|
307
|
-
*/
|
|
308
|
-
async shortestPath(options, transaction) {
|
|
309
|
-
this.ensureConnection();
|
|
310
|
-
return this.currentAdapter.shortestPath(this.currentConnection, options, transaction);
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* Find all paths between nodes
|
|
314
|
-
*/
|
|
315
|
-
async allPaths(options, transaction) {
|
|
316
|
-
this.ensureConnection();
|
|
317
|
-
return this.currentAdapter.allPaths(this.currentConnection, options, transaction);
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Match a graph pattern
|
|
321
|
-
*/
|
|
322
|
-
async matchPattern(options, transaction) {
|
|
323
|
-
this.ensureConnection();
|
|
324
|
-
return this.currentAdapter.matchPattern(this.currentConnection, options, transaction);
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Extract a subgraph
|
|
328
|
-
*/
|
|
329
|
-
async extractSubgraph(options, transaction) {
|
|
330
|
-
this.ensureConnection();
|
|
331
|
-
return this.currentAdapter.extractSubgraph(this.currentConnection, options, transaction);
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Get node neighborhood
|
|
335
|
-
*/
|
|
336
|
-
async getNeighborhood(options, transaction) {
|
|
337
|
-
this.ensureConnection();
|
|
338
|
-
return this.currentAdapter.getNeighborhood(this.currentConnection, options, transaction);
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* Find connected components
|
|
342
|
-
*/
|
|
343
|
-
async findConnectedComponents(options, transaction) {
|
|
344
|
-
this.ensureConnection();
|
|
345
|
-
return this.currentAdapter.findConnectedComponents(this.currentConnection, options, transaction);
|
|
346
|
-
}
|
|
347
|
-
// ==================== AGGREGATION OPERATIONS ====================
|
|
348
|
-
/**
|
|
349
|
-
* Count nodes
|
|
350
|
-
*/
|
|
351
|
-
async countNodes(labels, where, transaction) {
|
|
352
|
-
this.ensureConnection();
|
|
353
|
-
return this.currentAdapter.countNodes(this.currentConnection, labels, where, transaction);
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* Count relationships
|
|
357
|
-
*/
|
|
358
|
-
async countRelationships(type, where, transaction) {
|
|
359
|
-
this.ensureConnection();
|
|
360
|
-
return this.currentAdapter.countRelationships(this.currentConnection, type, where, transaction);
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* Get graph statistics
|
|
364
|
-
*/
|
|
365
|
-
async getStatistics(transaction) {
|
|
366
|
-
this.ensureConnection();
|
|
367
|
-
return this.currentAdapter.getStatistics(this.currentConnection, transaction);
|
|
368
|
-
}
|
|
369
|
-
// ==================== SEARCH OPERATIONS ====================
|
|
370
|
-
/**
|
|
371
|
-
* Full-text search
|
|
372
|
-
*/
|
|
373
|
-
async fullTextSearch(options, transaction) {
|
|
374
|
-
this.ensureConnection();
|
|
375
|
-
return this.currentAdapter.fullTextSearch(this.currentConnection, options, transaction);
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* Vector similarity search
|
|
379
|
-
*/
|
|
380
|
-
async vectorSearch(options, transaction) {
|
|
381
|
-
this.ensureConnection();
|
|
382
|
-
return this.currentAdapter.vectorSearch(this.currentConnection, options, transaction);
|
|
383
|
-
}
|
|
384
|
-
// ==================== SCHEMA OPERATIONS ====================
|
|
385
|
-
/**
|
|
386
|
-
* Create a constraint on nodes
|
|
387
|
-
*/
|
|
388
|
-
async createNodeConstraint(constraint, transaction) {
|
|
389
|
-
this.ensureConnection();
|
|
390
|
-
return this.currentAdapter.createNodeConstraint(this.currentConnection, constraint, transaction);
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* Create a constraint on relationships
|
|
394
|
-
*/
|
|
395
|
-
async createRelationshipConstraint(constraint, transaction) {
|
|
396
|
-
this.ensureConnection();
|
|
397
|
-
return this.currentAdapter.createRelationshipConstraint(this.currentConnection, constraint, transaction);
|
|
398
|
-
}
|
|
399
|
-
/**
|
|
400
|
-
* Drop a constraint
|
|
401
|
-
*/
|
|
402
|
-
async dropConstraint(name, transaction) {
|
|
403
|
-
this.ensureConnection();
|
|
404
|
-
return this.currentAdapter.dropConstraint(this.currentConnection, name, transaction);
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* List all constraints
|
|
408
|
-
*/
|
|
409
|
-
async listConstraints(transaction) {
|
|
410
|
-
this.ensureConnection();
|
|
411
|
-
return this.currentAdapter.listConstraints(this.currentConnection, transaction);
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
* Create an index on nodes
|
|
415
|
-
*/
|
|
416
|
-
async createNodeIndex(index, transaction) {
|
|
417
|
-
this.ensureConnection();
|
|
418
|
-
return this.currentAdapter.createNodeIndex(this.currentConnection, index, transaction);
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* Create an index on relationships
|
|
422
|
-
*/
|
|
423
|
-
async createRelationshipIndex(index, transaction) {
|
|
424
|
-
this.ensureConnection();
|
|
425
|
-
return this.currentAdapter.createRelationshipIndex(this.currentConnection, index, transaction);
|
|
426
|
-
}
|
|
427
|
-
/**
|
|
428
|
-
* Drop an index
|
|
429
|
-
*/
|
|
430
|
-
async dropIndex(name, transaction) {
|
|
431
|
-
this.ensureConnection();
|
|
432
|
-
return this.currentAdapter.dropIndex(this.currentConnection, name, transaction);
|
|
433
|
-
}
|
|
434
|
-
/**
|
|
435
|
-
* List all indexes
|
|
436
|
-
*/
|
|
437
|
-
async listIndexes(transaction) {
|
|
438
|
-
this.ensureConnection();
|
|
439
|
-
return this.currentAdapter.listIndexes(this.currentConnection, transaction);
|
|
440
|
-
}
|
|
441
|
-
// ==================== EXECUTE ACTION METHODS ====================
|
|
442
|
-
/**
|
|
443
|
-
* Execute a graph action by tag
|
|
444
|
-
*
|
|
445
|
-
* @example
|
|
446
|
-
* ```typescript
|
|
447
|
-
* await ductape.graph.execute({
|
|
448
|
-
* product: 'my-product',
|
|
449
|
-
* env: 'production',
|
|
450
|
-
* graph: 'my-graph',
|
|
451
|
-
* action: 'find-users',
|
|
452
|
-
* input: { name: 'John' }
|
|
453
|
-
* });
|
|
454
|
-
* ```
|
|
455
|
-
*/
|
|
456
|
-
async execute(options) {
|
|
457
|
-
const { product, env, graph, action: actionTag, input = {} } = options;
|
|
458
|
-
const startTime = Date.now();
|
|
459
|
-
const processId = (0, uuid_1.v4)();
|
|
460
|
-
let logService = null;
|
|
461
|
-
const productTag = product;
|
|
462
|
-
try {
|
|
463
|
-
// Create ProductBuilder instance to fetch action
|
|
464
|
-
const productBuilder = new products_service_1.default({
|
|
465
|
-
workspace_id: this.config.workspace_id,
|
|
466
|
-
user_id: this.config.user_id,
|
|
467
|
-
public_key: this.config.public_key,
|
|
468
|
-
token: this.config.token,
|
|
469
|
-
env_type: this.config.env_type || index_types_1.EnvType.PRODUCTION,
|
|
470
|
-
redis_client: this.config.redis_client,
|
|
471
|
-
});
|
|
472
|
-
// Initialize the product
|
|
473
|
-
await productBuilder.initializeProductByTag(product);
|
|
474
|
-
// Initialize LogsService for fire-and-forget logging
|
|
475
|
-
logService = new logs_service_1.default({
|
|
476
|
-
workspace_id: this.config.workspace_id,
|
|
477
|
-
user_id: this.config.user_id,
|
|
478
|
-
public_key: this.config.public_key,
|
|
479
|
-
token: this.config.token,
|
|
480
|
-
product_id: productBuilder.fetchProductId(),
|
|
481
|
-
env_type: this.config.env_type || index_types_1.EnvType.PRODUCTION,
|
|
482
|
-
app_id: null,
|
|
483
|
-
});
|
|
484
|
-
// Fetch the graph action
|
|
485
|
-
const fullActionTag = `${graph}:${actionTag}`;
|
|
486
|
-
const graphAction = await productBuilder.fetchGraphAction(fullActionTag);
|
|
487
|
-
if (!graphAction) {
|
|
488
|
-
throw new graph_types_1.GraphError(graph_types_1.GraphErrorType.QUERY_ERROR, `Graph action '${fullActionTag}' not found in product '${product}'`);
|
|
489
|
-
}
|
|
490
|
-
// Connect to the graph database using product config
|
|
491
|
-
await this.connect({
|
|
492
|
-
env,
|
|
493
|
-
product,
|
|
494
|
-
graph,
|
|
495
|
-
});
|
|
496
|
-
// Process the action template with input parameters
|
|
497
|
-
const processedQuery = this.processActionTemplate(graphAction, input);
|
|
498
|
-
// Execute based on action type
|
|
499
|
-
let result;
|
|
500
|
-
switch (graphAction.type) {
|
|
501
|
-
case productsBuilder_types_1.GraphActionTypes.FIND_NODES:
|
|
502
|
-
result = await this.findNodes(processedQuery).then(res => res.nodes);
|
|
503
|
-
break;
|
|
504
|
-
case productsBuilder_types_1.GraphActionTypes.FIND_NODE_BY_ID:
|
|
505
|
-
result = await this.findNodeById(processedQuery.id).then(res => res);
|
|
506
|
-
break;
|
|
507
|
-
case productsBuilder_types_1.GraphActionTypes.CREATE_NODE:
|
|
508
|
-
result = await this.createNode(processedQuery).then(res => res.node);
|
|
509
|
-
break;
|
|
510
|
-
case productsBuilder_types_1.GraphActionTypes.UPDATE_NODE:
|
|
511
|
-
result = await this.updateNode(processedQuery).then(res => res.node);
|
|
512
|
-
break;
|
|
513
|
-
case productsBuilder_types_1.GraphActionTypes.DELETE_NODE:
|
|
514
|
-
result = await this.deleteNode(processedQuery).then(res => res);
|
|
515
|
-
break;
|
|
516
|
-
case productsBuilder_types_1.GraphActionTypes.MERGE_NODE:
|
|
517
|
-
result = await this.mergeNode(processedQuery).then(res => res.node);
|
|
518
|
-
break;
|
|
519
|
-
case productsBuilder_types_1.GraphActionTypes.FIND_RELATIONSHIPS:
|
|
520
|
-
result = await this.findRelationships(processedQuery).then(res => res.relationships);
|
|
521
|
-
break;
|
|
522
|
-
case productsBuilder_types_1.GraphActionTypes.CREATE_RELATIONSHIP:
|
|
523
|
-
result = await this.createRelationship(processedQuery).then(res => res.relationship);
|
|
524
|
-
break;
|
|
525
|
-
case productsBuilder_types_1.GraphActionTypes.UPDATE_RELATIONSHIP:
|
|
526
|
-
result = await this.updateRelationship(processedQuery).then(res => res.relationship);
|
|
527
|
-
break;
|
|
528
|
-
case productsBuilder_types_1.GraphActionTypes.DELETE_RELATIONSHIP:
|
|
529
|
-
result = await this.deleteRelationship(processedQuery).then(res => res);
|
|
530
|
-
break;
|
|
531
|
-
case productsBuilder_types_1.GraphActionTypes.MERGE_RELATIONSHIP:
|
|
532
|
-
result = await this.mergeRelationship(processedQuery).then(res => res.relationship);
|
|
533
|
-
break;
|
|
534
|
-
case productsBuilder_types_1.GraphActionTypes.TRAVERSE:
|
|
535
|
-
result = await this.traverse(processedQuery).then(res => res);
|
|
536
|
-
break;
|
|
537
|
-
case productsBuilder_types_1.GraphActionTypes.SHORTEST_PATH:
|
|
538
|
-
result = await this.shortestPath(processedQuery).then(res => res);
|
|
539
|
-
break;
|
|
540
|
-
case productsBuilder_types_1.GraphActionTypes.RAW_QUERY:
|
|
541
|
-
result = await this.query(processedQuery.query, processedQuery.params).then(res => res.data);
|
|
542
|
-
break;
|
|
543
|
-
default:
|
|
544
|
-
throw new graph_types_1.GraphError(graph_types_1.GraphErrorType.QUERY_ERROR, `Unsupported action type: ${graphAction.type}`);
|
|
545
|
-
}
|
|
546
|
-
// Fire-and-forget success logging
|
|
547
|
-
if (logService) {
|
|
548
|
-
logService.add({
|
|
549
|
-
process_id: processId,
|
|
550
|
-
product_tag: productTag,
|
|
551
|
-
env,
|
|
552
|
-
type: logs_types_1.LogEventTypes.GRAPH_ACTION,
|
|
553
|
-
action: fullActionTag,
|
|
554
|
-
status: logs_types_1.LogEventStatus.SUCCESS,
|
|
555
|
-
start: startTime,
|
|
556
|
-
end: Date.now(),
|
|
557
|
-
data: { action: actionTag, graph, actionType: graphAction.type },
|
|
558
|
-
});
|
|
559
|
-
logService.publish().catch(() => { }); // Silent fail - don't affect main request
|
|
560
|
-
}
|
|
561
|
-
return result;
|
|
562
|
-
}
|
|
563
|
-
catch (error) {
|
|
564
|
-
// Fire-and-forget failure logging
|
|
565
|
-
if (logService) {
|
|
566
|
-
logService.add({
|
|
567
|
-
process_id: processId,
|
|
568
|
-
product_tag: productTag,
|
|
569
|
-
env,
|
|
570
|
-
type: logs_types_1.LogEventTypes.GRAPH_ACTION,
|
|
571
|
-
action: `${graph}:${actionTag}`,
|
|
572
|
-
status: logs_types_1.LogEventStatus.FAIL,
|
|
573
|
-
start: startTime,
|
|
574
|
-
end: Date.now(),
|
|
575
|
-
data: { action: actionTag, graph, error: error.message },
|
|
576
|
-
});
|
|
577
|
-
logService.publish().catch(() => { }); // Silent fail - don't affect main request
|
|
578
|
-
}
|
|
579
|
-
if (error instanceof graph_types_1.GraphError) {
|
|
580
|
-
throw error;
|
|
581
|
-
}
|
|
582
|
-
throw new graph_types_1.GraphError(graph_types_1.GraphErrorType.QUERY_ERROR, `Failed to execute graph action: ${error.message}`);
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
/**
|
|
586
|
-
* Process action template with input parameters
|
|
587
|
-
*/
|
|
588
|
-
processActionTemplate(action, input) {
|
|
589
|
-
let template = action.template;
|
|
590
|
-
// If template is a string, parse it as JSON
|
|
591
|
-
if (typeof template === 'string') {
|
|
592
|
-
try {
|
|
593
|
-
template = JSON.parse(template);
|
|
594
|
-
}
|
|
595
|
-
catch (_a) {
|
|
596
|
-
// If it's not valid JSON, return it as a raw query
|
|
597
|
-
return { query: this.replaceTemplateParams(template, input), params: input };
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
// Deep clone to avoid mutation
|
|
601
|
-
const processed = JSON.parse(JSON.stringify(template));
|
|
602
|
-
// Replace parameters in the template
|
|
603
|
-
return this.replaceParamsInObject(processed, input);
|
|
604
|
-
}
|
|
605
|
-
/**
|
|
606
|
-
* Replace template parameters with actual values
|
|
607
|
-
*/
|
|
608
|
-
replaceTemplateParams(template, params) {
|
|
609
|
-
let result = template;
|
|
610
|
-
for (const [key, value] of Object.entries(params)) {
|
|
611
|
-
const placeholder = new RegExp(`\\{\\{${key}\\}\\}`, 'g');
|
|
612
|
-
result = result.replace(placeholder, typeof value === 'string' ? value : JSON.stringify(value));
|
|
613
|
-
}
|
|
614
|
-
return result;
|
|
615
|
-
}
|
|
616
|
-
/**
|
|
617
|
-
* Recursively replace parameters in an object
|
|
618
|
-
*/
|
|
619
|
-
replaceParamsInObject(obj, params) {
|
|
620
|
-
if (typeof obj === 'string') {
|
|
621
|
-
// Check if it's a parameter placeholder
|
|
622
|
-
const match = obj.match(/^\{\{(\w+)\}\}$/);
|
|
623
|
-
if (match) {
|
|
624
|
-
const paramName = match[1];
|
|
625
|
-
return params[paramName] !== undefined ? params[paramName] : obj;
|
|
626
|
-
}
|
|
627
|
-
// Replace inline parameters
|
|
628
|
-
return this.replaceTemplateParams(obj, params);
|
|
629
|
-
}
|
|
630
|
-
if (Array.isArray(obj)) {
|
|
631
|
-
return obj.map(item => this.replaceParamsInObject(item, params));
|
|
632
|
-
}
|
|
633
|
-
if (obj && typeof obj === 'object') {
|
|
634
|
-
const result = {};
|
|
635
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
636
|
-
result[key] = this.replaceParamsInObject(value, params);
|
|
637
|
-
}
|
|
638
|
-
return result;
|
|
639
|
-
}
|
|
640
|
-
return obj;
|
|
641
|
-
}
|
|
642
|
-
// ==================== UTILITY METHODS ====================
|
|
643
|
-
/**
|
|
644
|
-
* Get the current connection
|
|
645
|
-
*/
|
|
646
|
-
getConnection() {
|
|
647
|
-
return this.currentConnection;
|
|
648
|
-
}
|
|
649
|
-
/**
|
|
650
|
-
* Get the current adapter
|
|
651
|
-
*/
|
|
652
|
-
getCurrentAdapter() {
|
|
653
|
-
return this.currentAdapter;
|
|
654
|
-
}
|
|
655
|
-
/**
|
|
656
|
-
* Get supported database types
|
|
657
|
-
*/
|
|
658
|
-
getSupportedDatabaseTypes() {
|
|
659
|
-
return Array.from(this.adapters.keys());
|
|
660
|
-
}
|
|
661
|
-
/**
|
|
662
|
-
* Check if a database type is supported
|
|
663
|
-
*/
|
|
664
|
-
isDatabaseTypeSupported(type) {
|
|
665
|
-
return this.adapters.has(type);
|
|
666
|
-
}
|
|
667
|
-
/**
|
|
668
|
-
* Ensure there's an active connection
|
|
669
|
-
*/
|
|
670
|
-
ensureConnection() {
|
|
671
|
-
if (!this.currentConnection || !this.currentAdapter) {
|
|
672
|
-
throw new graph_types_1.GraphError(graph_types_1.GraphErrorType.CONNECTION_ERROR, 'No active connection. Call connect() first.');
|
|
673
|
-
}
|
|
674
|
-
if (!this.currentConnection.isConnected()) {
|
|
675
|
-
throw new graph_types_1.GraphError(graph_types_1.GraphErrorType.CONNECTION_ERROR, 'Connection is not active. Reconnect required.');
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
exports.GraphService = GraphService;
|
|
680
|
-
/**
|
|
681
|
-
* Create a new GraphService instance
|
|
682
|
-
*/
|
|
683
|
-
function createGraphService(config) {
|
|
684
|
-
return new GraphService(config);
|
|
685
|
-
}
|
|
686
|
-
exports.default = GraphService;
|
|
687
|
-
//# sourceMappingURL=graph.service.js.map
|