@ductape/sdk 0.0.4-v6 → 0.0.4-v61
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/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 +310 -0
- package/dist/agents/agents.service.js +1249 -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 +1227 -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.d.ts +51 -5
- package/dist/api/services/appApi.service.js +101 -3
- package/dist/api/services/appApi.service.js.map +1 -1
- package/dist/api/services/pricingApi.service.d.ts +10 -0
- package/dist/api/services/pricingApi.service.js +34 -0
- package/dist/api/services/pricingApi.service.js.map +1 -0
- package/dist/api/services/processorApi.service.d.ts +334 -2
- package/dist/api/services/processorApi.service.js +264 -2
- package/dist/api/services/processorApi.service.js.map +1 -1
- package/dist/api/services/productsApi.service.d.ts +108 -1
- package/dist/api/services/productsApi.service.js +150 -3
- 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 +50 -0
- package/dist/api/services/secretsApi.service.js +124 -0
- package/dist/api/services/secretsApi.service.js.map +1 -0
- 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.d.ts +8 -0
- package/dist/api/services/workspaceApi.service.js +20 -0
- package/dist/api/services/workspaceApi.service.js.map +1 -1
- package/dist/api/urls.d.ts +65 -1
- package/dist/api/urls.js +90 -18
- package/dist/api/urls.js.map +1 -1
- package/dist/api/utils/auth.utils.d.ts +1 -3
- package/dist/api/utils/auth.utils.js.map +1 -1
- package/dist/api/utils/cache.utils.d.ts +1 -1
- package/dist/api/utils/cache.utils.js +2 -2
- package/dist/api/utils/cache.utils.js.map +1 -1
- package/dist/api/utils/strings.utils.d.ts +2 -0
- package/dist/api/utils/strings.utils.js +14 -0
- package/dist/api/utils/strings.utils.js.map +1 -1
- package/dist/apps/services/app.service.d.ts +41 -33
- package/dist/apps/services/app.service.js +472 -184
- 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 +429 -0
- package/dist/apps/utils/oauth-manager.js.map +1 -0
- package/dist/apps/validators/joi-validators/create.appAction.validator.d.ts +1 -2
- package/dist/apps/validators/joi-validators/create.appAction.validator.js +21 -2
- package/dist/apps/validators/joi-validators/create.appAction.validator.js.map +1 -1
- package/dist/apps/validators/joi-validators/update.appAction.validator.js +11 -1
- package/dist/apps/validators/joi-validators/update.appAction.validator.js.map +1 -1
- package/dist/apps/validators/joi-validators/update.appActionResponse.validator.d.ts +1 -1
- package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js +34 -1
- package/dist/apps/validators/joi-validators/update.appActionResponse.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 +289 -0
- package/dist/brokers/brokers.service.js +722 -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 +314 -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 +23 -0
- package/dist/brokers/utils/providers/kafka.service.js +131 -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 +15 -0
- package/dist/brokers/utils/providers/rabbitmq.service.js +151 -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/clients/pricing.client.d.ts +3 -0
- package/dist/clients/pricing.client.js +33 -0
- package/dist/clients/pricing.client.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 +393 -0
- package/dist/database/adapters/base.adapter.js +150 -0
- package/dist/database/adapters/base.adapter.js.map +1 -0
- package/dist/database/adapters/cassandra.adapter.d.ts +91 -0
- package/dist/database/adapters/cassandra.adapter.js +1075 -0
- package/dist/database/adapters/cassandra.adapter.js.map +1 -0
- package/dist/database/adapters/dynamodb.adapter.d.ts +109 -0
- package/dist/database/adapters/dynamodb.adapter.js +1534 -0
- package/dist/database/adapters/dynamodb.adapter.js.map +1 -0
- 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 +120 -0
- package/dist/database/adapters/mongodb.adapter.js +1253 -0
- package/dist/database/adapters/mongodb.adapter.js.map +1 -0
- package/dist/database/adapters/mysql.adapter.d.ts +85 -0
- package/dist/database/adapters/mysql.adapter.js +1313 -0
- package/dist/database/adapters/mysql.adapter.js.map +1 -0
- package/dist/database/adapters/postgresql.adapter.d.ts +88 -0
- package/dist/database/adapters/postgresql.adapter.js +1434 -0
- package/dist/database/adapters/postgresql.adapter.js.map +1 -0
- package/dist/database/databases.service.d.ts +1388 -0
- package/dist/database/databases.service.js +2821 -0
- package/dist/database/databases.service.js.map +1 -0
- package/dist/database/index.d.ts +46 -0
- package/dist/database/index.js +109 -0
- package/dist/database/index.js.map +1 -0
- 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 +67 -0
- package/dist/database/operators/aggregation-builder.js +841 -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 +59 -0
- package/dist/database/operators/query-builder.js +397 -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 +185 -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 +14 -0
- package/dist/database/types/index.js +31 -0
- package/dist/database/types/index.js.map +1 -0
- 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 +205 -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 +216 -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 +86 -0
- package/dist/graph/adapters/arangodb.adapter.js +1522 -0
- package/dist/graph/adapters/arangodb.adapter.js.map +1 -0
- package/dist/graph/adapters/base.adapter.d.ts +245 -0
- package/dist/graph/adapters/base.adapter.js +64 -0
- package/dist/graph/adapters/base.adapter.js.map +1 -0
- package/dist/graph/adapters/index.d.ts +11 -0
- package/dist/graph/adapters/index.js +21 -0
- package/dist/graph/adapters/index.js.map +1 -0
- package/dist/graph/adapters/memgraph.adapter.d.ts +110 -0
- package/dist/graph/adapters/memgraph.adapter.js +1345 -0
- package/dist/graph/adapters/memgraph.adapter.js.map +1 -0
- package/dist/graph/adapters/neo4j.adapter.d.ts +81 -0
- package/dist/graph/adapters/neo4j.adapter.js +1198 -0
- package/dist/graph/adapters/neo4j.adapter.js.map +1 -0
- package/dist/graph/adapters/neptune.adapter.d.ts +82 -0
- package/dist/graph/adapters/neptune.adapter.js +1313 -0
- package/dist/graph/adapters/neptune.adapter.js.map +1 -0
- package/dist/graph/graphs.service.d.ts +546 -0
- package/dist/graph/graphs.service.js +1893 -0
- package/dist/graph/graphs.service.js.map +1 -0
- package/dist/graph/index.d.ts +57 -0
- package/dist/graph/index.js +77 -0
- package/dist/graph/index.js.map +1 -0
- 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 +149 -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 +13 -0
- package/dist/graph/types/index.js +20 -0
- package/dist/graph/types/index.js.map +1 -0
- 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 +175 -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/imports/imports.service.d.ts +3 -3
- package/dist/imports/imports.service.js +8 -7
- package/dist/imports/imports.service.js.map +1 -1
- package/dist/imports/imports.types.d.ts +8 -0
- package/dist/imports/repos/openApi.repo.d.ts +1 -1
- package/dist/imports/repos/openApi.repo.js +414 -47
- package/dist/imports/repos/openApi.repo.js.map +1 -1
- package/dist/imports/repos/postmanV21.repo.d.ts +1 -1
- package/dist/imports/repos/postmanV21.repo.js +126 -83
- package/dist/imports/repos/postmanV21.repo.js.map +1 -1
- package/dist/index.d.ts +3241 -285
- package/dist/index.js +4711 -687
- 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/inputs/inputs.service.d.ts +1 -1
- package/dist/inputs/inputs.service.js +2 -2
- package/dist/inputs/inputs.service.js.map +1 -1
- package/dist/inputs/utils/inputs.utils.create.js +1 -1
- package/dist/inputs/utils/inputs.utils.create.js.map +1 -1
- 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 +16 -1
- package/dist/logs/logs.types.js +5 -0
- 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 +257 -0
- package/dist/notifications/notifications.service.js +656 -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/parsers/index.d.ts +3 -0
- package/dist/parsers/index.js +27 -0
- package/dist/parsers/index.js.map +1 -0
- package/dist/parsers/pipelines/postman.pipelines.d.ts +15 -0
- package/dist/parsers/pipelines/postman.pipelines.js +103 -0
- package/dist/parsers/pipelines/postman.pipelines.js.map +1 -0
- package/dist/parsers/types/postman.types.d.ts +200 -0
- package/dist/parsers/types/postman.types.js +3 -0
- package/dist/parsers/types/postman.types.js.map +1 -0
- package/dist/parsers/utils/postman.utils.d.ts +12 -0
- package/dist/parsers/utils/postman.utils.js +116 -0
- package/dist/parsers/utils/postman.utils.js.map +1 -0
- package/dist/parsers/validators/postman-auth.validators.d.ts +10 -0
- package/dist/parsers/validators/postman-auth.validators.js +127 -0
- package/dist/parsers/validators/postman-auth.validators.js.map +1 -0
- package/dist/parsers/validators/postman-request.validators.d.ts +13 -0
- package/dist/parsers/validators/postman-request.validators.js +139 -0
- package/dist/parsers/validators/postman-request.validators.js.map +1 -0
- package/dist/parsers/validators/postman-response.validators.d.ts +13 -0
- package/dist/parsers/validators/postman-response.validators.js +150 -0
- package/dist/parsers/validators/postman-response.validators.js.map +1 -0
- package/dist/parsers/validators/postman-variable.validators.d.ts +14 -0
- package/dist/parsers/validators/postman-variable.validators.js +163 -0
- package/dist/parsers/validators/postman-variable.validators.js.map +1 -0
- package/dist/pricing/pricing.repo.js +1 -0
- package/dist/pricing/pricing.repo.js.map +1 -0
- package/dist/pricing/pricing.service.d.ts +24 -0
- package/dist/pricing/pricing.service.js +51 -0
- package/dist/pricing/pricing.service.js.map +1 -0
- package/dist/pricing/pricing.types.d.ts +76 -0
- package/dist/pricing/pricing.types.js +21 -0
- package/dist/pricing/pricing.types.js.map +1 -0
- package/dist/pricing/utils/string.utils.d.ts +1 -0
- package/dist/pricing/utils/string.utils.js +9 -0
- package/dist/pricing/utils/string.utils.js.map +1 -0
- package/dist/processor/services/processor.service.d.ts +120 -73
- package/dist/processor/services/processor.service.js +1705 -1294
- package/dist/processor/services/processor.service.js.map +1 -1
- package/dist/processor/services/request.service.d.ts +36 -0
- package/dist/processor/services/request.service.js +304 -0
- package/dist/processor/services/request.service.js.map +1 -0
- package/dist/processor/types/request.types.d.ts +14 -0
- package/dist/processor/types/request.types.js +3 -0
- package/dist/processor/types/request.types.js.map +1 -0
- package/dist/processor/utils/processor.utils.d.ts +3 -0
- package/dist/processor/utils/processor.utils.js +87 -21
- package/dist/processor/utils/processor.utils.js.map +1 -1
- package/dist/processor/utils/request.utils.d.ts +20 -0
- package/dist/processor/utils/request.utils.js +113 -0
- package/dist/processor/utils/request.utils.js.map +1 -0
- package/dist/products/services/products.service.d.ts +330 -77
- package/dist/products/services/products.service.js +2586 -397
- package/dist/products/services/products.service.js.map +1 -1
- package/dist/products/utils/string.utils.d.ts +1 -1
- package/dist/products/utils/string.utils.js +14 -2
- package/dist/products/utils/string.utils.js.map +1 -1
- package/dist/products/validators/index.d.ts +7 -1
- package/dist/products/validators/index.js +16 -1
- 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 +266 -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.productEnv.validator.js +1 -0
- package/dist/products/validators/joi-validators/create.productEnv.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productGraph.validator.js +89 -0
- package/dist/products/validators/joi-validators/create.productGraph.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/create.productHealthcheck.validator.d.ts +4 -0
- package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js +58 -0
- package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js +81 -25
- 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 +133 -45
- 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.dataValue.validator.js +1 -0
- package/dist/products/validators/joi-validators/update.dataValue.validator.js.map +1 -1
- 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.productEnv.validator.js +3 -0
- package/dist/products/validators/joi-validators/update.productEnv.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.productGraph.validator.js +88 -0
- package/dist/products/validators/joi-validators/update.productGraph.validator.js.map +1 -0
- package/dist/resilience/fallback.service.d.ts +140 -0
- package/dist/resilience/fallback.service.js +764 -0
- package/dist/resilience/fallback.service.js.map +1 -0
- package/dist/resilience/healthcheck.service.d.ts +159 -0
- package/dist/resilience/healthcheck.service.js +943 -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 +82 -0
- package/dist/resilience/quota.service.js +516 -0
- package/dist/resilience/quota.service.js.map +1 -0
- package/dist/resilience/resilience.service.d.ts +98 -0
- package/dist/resilience/resilience.service.js +560 -0
- package/dist/resilience/resilience.service.js.map +1 -0
- package/dist/resilience/types/index.d.ts +513 -0
- package/dist/resilience/types/index.js +29 -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 +93 -0
- package/dist/secrets/secrets.service.js +258 -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 +151 -0
- package/dist/storage/storage.service.js +522 -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 +11 -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.broker.kafka.js +172 -0
- package/dist/test/test.broker.kafka.js.map +1 -0
- package/dist/test/test.broker.nats.js +193 -0
- package/dist/test/test.broker.nats.js.map +1 -0
- package/dist/test/test.broker.pubsub.js +171 -0
- package/dist/test/test.broker.pubsub.js.map +1 -0
- package/dist/test/test.broker.rabbitmq.js +164 -0
- package/dist/test/test.broker.rabbitmq.js.map +1 -0
- package/dist/test/test.broker.redis.js +168 -0
- package/dist/test/test.broker.redis.js.map +1 -0
- package/dist/test/test.broker.sqs.d.ts +1 -0
- package/dist/test/test.broker.sqs.js +158 -0
- package/dist/test/test.broker.sqs.js.map +1 -0
- package/dist/test/test.caches.d.ts +1 -0
- package/dist/test/test.caches.js +231 -0
- package/dist/test/test.caches.js.map +1 -0
- package/dist/test/test.database.d.ts +1 -0
- package/dist/test/test.database.dynamo.d.ts +1 -0
- package/dist/test/test.database.dynamo.js +265 -0
- package/dist/test/test.database.dynamo.js.map +1 -0
- package/dist/test/test.database.js +140 -0
- package/dist/test/test.database.js.map +1 -0
- package/dist/test/test.database.mongo.d.ts +1 -0
- package/dist/test/test.database.mongo.js +371 -0
- package/dist/test/test.database.mongo.js.map +1 -0
- package/dist/test/test.database.mysql.d.ts +1 -0
- package/dist/test/test.database.mysql.js +415 -0
- package/dist/test/test.database.mysql.js.map +1 -0
- package/dist/test/test.database.postgres.d.ts +1 -0
- package/dist/test/test.database.postgres.js +412 -0
- package/dist/test/test.database.postgres.js.map +1 -0
- package/dist/test/test.email.brevo.d.ts +1 -0
- package/dist/test/test.email.brevo.js +326 -0
- package/dist/test/test.email.brevo.js.map +1 -0
- package/dist/test/test.email.mailgun.d.ts +1 -0
- package/dist/test/test.email.mailgun.js +352 -0
- package/dist/test/test.email.mailgun.js.map +1 -0
- package/dist/test/test.email.postmark.d.ts +1 -0
- package/dist/test/test.email.postmark.js +316 -0
- package/dist/test/test.email.postmark.js.map +1 -0
- package/dist/test/test.email.sendgrid.d.ts +1 -0
- package/dist/test/test.email.sendgrid.js +365 -0
- package/dist/test/test.email.sendgrid.js.map +1 -0
- package/dist/test/test.email.smtp.d.ts +1 -0
- package/dist/test/test.email.smtp.js +323 -0
- package/dist/test/test.email.smtp.js.map +1 -0
- package/dist/test/test.graph.arangodb.d.ts +1 -0
- package/dist/test/test.graph.arangodb.js +358 -0
- package/dist/test/test.graph.arangodb.js.map +1 -0
- package/dist/test/test.graph.memgraph.d.ts +1 -0
- package/dist/test/test.graph.memgraph.js +320 -0
- package/dist/test/test.graph.memgraph.js.map +1 -0
- package/dist/test/test.graph.neo4j.d.ts +1 -0
- package/dist/test/test.graph.neo4j.js +218 -0
- package/dist/test/test.graph.neo4j.js.map +1 -0
- package/dist/test/test.graph.neptune.d.ts +1 -0
- package/dist/test/test.graph.neptune.js +331 -0
- package/dist/test/test.graph.neptune.js.map +1 -0
- package/dist/test/test.health.js +1 -0
- package/dist/test/test.health.js.map +1 -0
- package/dist/test/test.import.d.ts +0 -1
- package/dist/test/test.import.js +0 -1459
- 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.js +14 -55
- 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.notifications.d.ts +1 -0
- package/dist/test/test.notifications.js +198 -0
- package/dist/test/test.notifications.js.map +1 -0
- package/dist/test/test.notifiers.js +1 -0
- package/dist/test/test.notifiers.js.map +1 -0
- package/dist/test/test.processor.d.ts +0 -1
- package/dist/test/test.processor.js +0 -122
- 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.js +1 -0
- package/dist/test/test.products.js.map +1 -0
- package/dist/test/test.push.expo.d.ts +1 -0
- package/dist/test/test.push.expo.js +442 -0
- package/dist/test/test.push.expo.js.map +1 -0
- package/dist/test/test.push.firebase.d.ts +1 -0
- package/dist/test/test.push.firebase.js +409 -0
- package/dist/test/test.push.firebase.js.map +1 -0
- package/dist/test/test.session.d.ts +1 -0
- package/dist/test/test.session.js +299 -0
- package/dist/test/test.session.js.map +1 -0
- package/dist/test/test.sms.nexmo.d.ts +1 -0
- package/dist/test/test.sms.nexmo.js +278 -0
- package/dist/test/test.sms.nexmo.js.map +1 -0
- package/dist/test/test.sms.twilio.d.ts +1 -0
- package/dist/test/test.sms.twilio.js +275 -0
- package/dist/test/test.sms.twilio.js.map +1 -0
- package/dist/test/test.storage.d.ts +1 -0
- package/dist/test/test.storage.js +202 -0
- package/dist/test/test.storage.js.map +1 -0
- package/dist/test/test.triggers.d.ts +1 -0
- package/dist/test/test.triggers.js +314 -0
- package/dist/test/test.triggers.js.map +1 -0
- package/dist/test/test.vector.pinecone.d.ts +1 -0
- package/dist/test/test.vector.pinecone.js +238 -0
- package/dist/test/test.vector.pinecone.js.map +1 -0
- package/dist/test/test.vector.qdrant.d.ts +1 -0
- package/dist/test/test.vector.qdrant.js +307 -0
- package/dist/test/test.vector.qdrant.js.map +1 -0
- package/dist/test/test.vector.weaviate.d.ts +1 -0
- package/dist/test/test.vector.weaviate.js +325 -0
- package/dist/test/test.vector.weaviate.js.map +1 -0
- package/dist/types/appBuilder.types.d.ts +10 -13
- package/dist/types/enums.d.ts +11 -1
- package/dist/types/enums.js +10 -0
- package/dist/types/enums.js.map +1 -1
- package/dist/types/index.types.d.ts +6 -4
- package/dist/types/index.types.js +0 -1
- package/dist/types/index.types.js.map +1 -1
- package/dist/types/pricing.types.d.ts +4 -0
- package/dist/types/pricing.types.js +3 -0
- package/dist/types/pricing.types.js.map +1 -0
- package/dist/types/processor.types.d.ts +245 -20
- package/dist/types/processor.types.js +9 -1
- package/dist/types/processor.types.js.map +1 -1
- package/dist/types/productsBuilder.types.d.ts +906 -24
- package/dist/types/productsBuilder.types.js +173 -2
- package/dist/types/productsBuilder.types.js.map +1 -1
- package/dist/types/request-tracker.interface.js +1 -0
- package/dist/types/request-tracker.interface.js.map +1 -0
- package/dist/types/requests.types.d.ts +2 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +5 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +24 -52
- 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 +116 -0
- package/dist/vector/utils/vector-error.js.map +1 -0
- package/dist/vector/vector-database.service.d.ts +408 -0
- package/dist/vector/vector-database.service.js +545 -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 +384 -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 +208 -0
- package/dist/workflows/workflow-executor.js +1194 -0
- package/dist/workflows/workflow-executor.js.map +1 -0
- package/dist/workflows/workflows.service.d.ts +404 -0
- package/dist/workflows/workflows.service.js +1620 -0
- package/dist/workflows/workflows.service.js.map +1 -0
- package/package.json +54 -11
- package/dist/actions/actions.repo.js +0 -13
- package/dist/actions/actions.repo.js.map +0 -1
- package/dist/actions/actions.service.js +0 -24
- package/dist/actions/actions.service.js.map +0 -1
- 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/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.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.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/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.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/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/test.appBuilder.js +0 -14
- package/dist/test.appBuilder.js.map +0 -1
- 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.js +0 -23
- package/dist/test.processor.js.map +0 -1
- package/dist/test.utils.js +0 -25
- package/dist/test.utils.js.map +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/{actions/actions.repo.d.ts → pricing/pricing.repo.d.ts} +0 -0
- /package/dist/{appBuilder/validators/joi-validators/create.app.validator.d.ts → products/validators/joi-validators/create.productGraph.validator.d.ts} +0 -0
- /package/dist/{appBuilder/validators/joi-validators/update.validation.entityData.validator.d.ts → products/validators/joi-validators/update.productGraph.validator.d.ts} +0 -0
- /package/dist/{test.appBuilder.d.ts → test/test.broker.kafka.d.ts} +0 -0
- /package/dist/{test.imports.d.ts → test/test.broker.nats.d.ts} +0 -0
- /package/dist/{test.integrationBuilder.d.ts → test/test.broker.pubsub.d.ts} +0 -0
- /package/dist/{test.processor.d.ts → test/test.broker.rabbitmq.d.ts} +0 -0
- /package/dist/{test.utils.d.ts → test/test.broker.redis.d.ts} +0 -0
- /package/dist/{actions/actions.service.d.ts → test/test.health.d.ts} +0 -0
- /package/dist/{actions/utils/actions.util.read.d.ts → test/test.notifiers.d.ts} +0 -0
- /package/dist/{processor/utils/mongo.util.d.ts → test/test.products.d.ts} +0 -0
- /package/dist/{test.import.d.ts → types/request-tracker.interface.d.ts} +0 -0
|
@@ -0,0 +1,943 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Healthcheck Service
|
|
4
|
+
*
|
|
5
|
+
* Code-first API for defining and managing healthchecks.
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
+
var ownKeys = function(o) {
|
|
25
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
+
var ar = [];
|
|
27
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
+
return ar;
|
|
29
|
+
};
|
|
30
|
+
return ownKeys(o);
|
|
31
|
+
};
|
|
32
|
+
return function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
|
+
};
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.HealthcheckService = exports.HealthcheckError = void 0;
|
|
45
|
+
const types_1 = require("./types");
|
|
46
|
+
const resilienceApi_service_1 = require("../api/services/resilienceApi.service");
|
|
47
|
+
const processor_service_1 = __importDefault(require("../processor/services/processor.service"));
|
|
48
|
+
/**
|
|
49
|
+
* Error class for healthcheck operations
|
|
50
|
+
*/
|
|
51
|
+
class HealthcheckError extends Error {
|
|
52
|
+
constructor(message, code, details) {
|
|
53
|
+
super(message);
|
|
54
|
+
this.code = code;
|
|
55
|
+
this.details = details;
|
|
56
|
+
this.name = 'HealthcheckError';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.HealthcheckError = HealthcheckError;
|
|
60
|
+
/**
|
|
61
|
+
* Recording context that captures healthcheck configuration during handler execution
|
|
62
|
+
*/
|
|
63
|
+
class RecordingHealthcheckContext {
|
|
64
|
+
constructor() {
|
|
65
|
+
this._probe = null;
|
|
66
|
+
this._interval = 60000;
|
|
67
|
+
this._retries = 2;
|
|
68
|
+
this._envs = [];
|
|
69
|
+
this._onFailure = null;
|
|
70
|
+
}
|
|
71
|
+
probe() {
|
|
72
|
+
return new RecordingProbeBuilder(this);
|
|
73
|
+
}
|
|
74
|
+
setProbe(probe) {
|
|
75
|
+
this._probe = probe;
|
|
76
|
+
}
|
|
77
|
+
interval(ms) {
|
|
78
|
+
this._interval = ms;
|
|
79
|
+
}
|
|
80
|
+
retries(count) {
|
|
81
|
+
this._retries = count;
|
|
82
|
+
}
|
|
83
|
+
env(slug, options) {
|
|
84
|
+
const envConfig = Object.assign({ slug }, options);
|
|
85
|
+
this._envs.push(envConfig);
|
|
86
|
+
}
|
|
87
|
+
onFailure() {
|
|
88
|
+
if (!this._onFailure) {
|
|
89
|
+
this._onFailure = {
|
|
90
|
+
notifications: [],
|
|
91
|
+
webhooks: [],
|
|
92
|
+
emit: [],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return new RecordingFailureNotificationBuilder(this._onFailure);
|
|
96
|
+
}
|
|
97
|
+
auth(field) {
|
|
98
|
+
return `$Auth{${field}}`;
|
|
99
|
+
}
|
|
100
|
+
token(key) {
|
|
101
|
+
return `$Secret{${key}}`;
|
|
102
|
+
}
|
|
103
|
+
variable(app, key) {
|
|
104
|
+
return `$Variable{${app}}{${key}}`;
|
|
105
|
+
}
|
|
106
|
+
constant(app, key) {
|
|
107
|
+
return `$Constant{${app}}{${key}}`;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Build the healthcheck schema from recorded configuration
|
|
111
|
+
*/
|
|
112
|
+
build(tag, name, description) {
|
|
113
|
+
if (!this._probe) {
|
|
114
|
+
throw new HealthcheckError('Healthcheck probe not configured', 'PROBE_NOT_CONFIGURED');
|
|
115
|
+
}
|
|
116
|
+
if (this._envs.length === 0) {
|
|
117
|
+
throw new HealthcheckError('At least one environment must be configured', 'NO_ENVS_CONFIGURED');
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
tag,
|
|
121
|
+
name,
|
|
122
|
+
description,
|
|
123
|
+
probe: this._probe,
|
|
124
|
+
interval: this._interval,
|
|
125
|
+
retries: this._retries,
|
|
126
|
+
onFailure: this._onFailure || undefined,
|
|
127
|
+
envs: this._envs,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Probe builder that records probe configuration
|
|
133
|
+
*/
|
|
134
|
+
class RecordingProbeBuilder {
|
|
135
|
+
constructor(ctx) {
|
|
136
|
+
this.ctx = ctx;
|
|
137
|
+
}
|
|
138
|
+
app(tag) {
|
|
139
|
+
return new RecordingAppProbeBuilder(this.ctx, tag);
|
|
140
|
+
}
|
|
141
|
+
database(tag) {
|
|
142
|
+
return new RecordingDatabaseProbeBuilder(this.ctx, tag);
|
|
143
|
+
}
|
|
144
|
+
workflow(tag) {
|
|
145
|
+
return new RecordingWorkflowProbeBuilder(this.ctx, tag);
|
|
146
|
+
}
|
|
147
|
+
graph(tag) {
|
|
148
|
+
return new RecordingGraphProbeBuilder(this.ctx, tag);
|
|
149
|
+
}
|
|
150
|
+
messageBroker(tag) {
|
|
151
|
+
return new RecordingMessageBrokerProbeBuilder(this.ctx, tag);
|
|
152
|
+
}
|
|
153
|
+
storage(tag) {
|
|
154
|
+
return new RecordingStorageProbeBuilder(this.ctx, tag);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
class RecordingAppProbeBuilder {
|
|
158
|
+
constructor(ctx, appTag) {
|
|
159
|
+
this.ctx = ctx;
|
|
160
|
+
this.appTag = appTag;
|
|
161
|
+
}
|
|
162
|
+
action(event) {
|
|
163
|
+
return new RecordingAppProbeActionBuilder(this.ctx, this.appTag, event);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
class RecordingAppProbeActionBuilder {
|
|
167
|
+
constructor(ctx, appTag, event) {
|
|
168
|
+
this.ctx = ctx;
|
|
169
|
+
this.appTag = appTag;
|
|
170
|
+
this.event = event;
|
|
171
|
+
// Set probe immediately (input is optional)
|
|
172
|
+
this.ctx.setProbe({
|
|
173
|
+
type: types_1.ProbeType.APP,
|
|
174
|
+
app: this.appTag,
|
|
175
|
+
event: this.event,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
input(data) {
|
|
179
|
+
this.ctx.setProbe({
|
|
180
|
+
type: types_1.ProbeType.APP,
|
|
181
|
+
app: this.appTag,
|
|
182
|
+
event: this.event,
|
|
183
|
+
input: data,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
class RecordingDatabaseProbeBuilder {
|
|
188
|
+
constructor(ctx, dbTag) {
|
|
189
|
+
this.ctx = ctx;
|
|
190
|
+
this.dbTag = dbTag;
|
|
191
|
+
}
|
|
192
|
+
action(event) {
|
|
193
|
+
return new RecordingDatabaseProbeActionBuilder(this.ctx, this.dbTag, event);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
class RecordingDatabaseProbeActionBuilder {
|
|
197
|
+
constructor(ctx, dbTag, event) {
|
|
198
|
+
this.ctx = ctx;
|
|
199
|
+
this.dbTag = dbTag;
|
|
200
|
+
this.event = event;
|
|
201
|
+
// Set probe immediately (input is optional)
|
|
202
|
+
this.ctx.setProbe({
|
|
203
|
+
type: types_1.ProbeType.DATABASE,
|
|
204
|
+
database: this.dbTag,
|
|
205
|
+
event: this.event,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
input(data) {
|
|
209
|
+
this.ctx.setProbe({
|
|
210
|
+
type: types_1.ProbeType.DATABASE,
|
|
211
|
+
database: this.dbTag,
|
|
212
|
+
event: this.event,
|
|
213
|
+
input: data,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
class RecordingWorkflowProbeBuilder {
|
|
218
|
+
constructor(ctx, workflowTag) {
|
|
219
|
+
this.ctx = ctx;
|
|
220
|
+
this.workflowTag = workflowTag;
|
|
221
|
+
}
|
|
222
|
+
input(data) {
|
|
223
|
+
this.ctx.setProbe({
|
|
224
|
+
type: types_1.ProbeType.WORKFLOW,
|
|
225
|
+
workflow: this.workflowTag,
|
|
226
|
+
input: data,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
class RecordingGraphProbeBuilder {
|
|
231
|
+
constructor(ctx, graphTag) {
|
|
232
|
+
this.ctx = ctx;
|
|
233
|
+
this.graphTag = graphTag;
|
|
234
|
+
}
|
|
235
|
+
action(event) {
|
|
236
|
+
return new RecordingGraphProbeActionBuilder(this.ctx, this.graphTag, event);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
class RecordingGraphProbeActionBuilder {
|
|
240
|
+
constructor(ctx, graphTag, event) {
|
|
241
|
+
this.ctx = ctx;
|
|
242
|
+
this.graphTag = graphTag;
|
|
243
|
+
this.event = event;
|
|
244
|
+
// Set probe immediately (input is optional)
|
|
245
|
+
this.ctx.setProbe({
|
|
246
|
+
type: types_1.ProbeType.GRAPH,
|
|
247
|
+
graph: this.graphTag,
|
|
248
|
+
event: this.event,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
input(data) {
|
|
252
|
+
this.ctx.setProbe({
|
|
253
|
+
type: types_1.ProbeType.GRAPH,
|
|
254
|
+
graph: this.graphTag,
|
|
255
|
+
event: this.event,
|
|
256
|
+
input: data,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
class RecordingMessageBrokerProbeBuilder {
|
|
261
|
+
constructor(ctx, brokerTag) {
|
|
262
|
+
this.ctx = ctx;
|
|
263
|
+
this.brokerTag = brokerTag;
|
|
264
|
+
}
|
|
265
|
+
action(event) {
|
|
266
|
+
return new RecordingMessageBrokerProbeActionBuilder(this.ctx, this.brokerTag, event);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
class RecordingMessageBrokerProbeActionBuilder {
|
|
270
|
+
constructor(ctx, brokerTag, event) {
|
|
271
|
+
this.ctx = ctx;
|
|
272
|
+
this.brokerTag = brokerTag;
|
|
273
|
+
this.event = event;
|
|
274
|
+
// Set probe immediately (input is optional)
|
|
275
|
+
this.ctx.setProbe({
|
|
276
|
+
type: types_1.ProbeType.MESSAGE_BROKER,
|
|
277
|
+
messageBroker: this.brokerTag,
|
|
278
|
+
event: this.event,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
input(data) {
|
|
282
|
+
this.ctx.setProbe({
|
|
283
|
+
type: types_1.ProbeType.MESSAGE_BROKER,
|
|
284
|
+
messageBroker: this.brokerTag,
|
|
285
|
+
event: this.event,
|
|
286
|
+
input: data,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
class RecordingStorageProbeBuilder {
|
|
291
|
+
constructor(ctx, storageTag) {
|
|
292
|
+
this.ctx = ctx;
|
|
293
|
+
this.storageTag = storageTag;
|
|
294
|
+
}
|
|
295
|
+
action(event) {
|
|
296
|
+
return new RecordingStorageProbeActionBuilder(this.ctx, this.storageTag, event);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
class RecordingStorageProbeActionBuilder {
|
|
300
|
+
constructor(ctx, storageTag, event) {
|
|
301
|
+
this.ctx = ctx;
|
|
302
|
+
this.storageTag = storageTag;
|
|
303
|
+
this.event = event;
|
|
304
|
+
// Set probe immediately (input is optional)
|
|
305
|
+
this.ctx.setProbe({
|
|
306
|
+
type: types_1.ProbeType.STORAGE,
|
|
307
|
+
storage: this.storageTag,
|
|
308
|
+
event: this.event,
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
input(data) {
|
|
312
|
+
this.ctx.setProbe({
|
|
313
|
+
type: types_1.ProbeType.STORAGE,
|
|
314
|
+
storage: this.storageTag,
|
|
315
|
+
event: this.event,
|
|
316
|
+
input: data,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Failure notification builder
|
|
322
|
+
*/
|
|
323
|
+
class RecordingFailureNotificationBuilder {
|
|
324
|
+
constructor(onFailure) {
|
|
325
|
+
this.onFailure = onFailure;
|
|
326
|
+
}
|
|
327
|
+
notification(tag) {
|
|
328
|
+
return new RecordingNotificationMessageBuilder(this.onFailure, tag);
|
|
329
|
+
}
|
|
330
|
+
webhook(config) {
|
|
331
|
+
this.onFailure.webhooks = this.onFailure.webhooks || [];
|
|
332
|
+
this.onFailure.webhooks.push(config);
|
|
333
|
+
return this;
|
|
334
|
+
}
|
|
335
|
+
emit(config) {
|
|
336
|
+
this.onFailure.emit = this.onFailure.emit || [];
|
|
337
|
+
this.onFailure.emit.push(config);
|
|
338
|
+
return this;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
class RecordingNotificationMessageBuilder {
|
|
342
|
+
constructor(onFailure, notificationTag) {
|
|
343
|
+
this.onFailure = onFailure;
|
|
344
|
+
this.notificationTag = notificationTag;
|
|
345
|
+
}
|
|
346
|
+
message(event) {
|
|
347
|
+
return new RecordingNotificationChannelBuilder(this.onFailure, this.notificationTag, event);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
class RecordingNotificationChannelBuilder {
|
|
351
|
+
constructor(onFailure, notificationTag, message) {
|
|
352
|
+
this.parentOnFailure = onFailure;
|
|
353
|
+
this.currentNotification = {
|
|
354
|
+
notification: notificationTag,
|
|
355
|
+
message,
|
|
356
|
+
channels: {},
|
|
357
|
+
};
|
|
358
|
+
this.parentOnFailure.notifications = this.parentOnFailure.notifications || [];
|
|
359
|
+
this.parentOnFailure.notifications.push(this.currentNotification);
|
|
360
|
+
}
|
|
361
|
+
notification(tag) {
|
|
362
|
+
return new RecordingNotificationMessageBuilder(this.parentOnFailure, tag);
|
|
363
|
+
}
|
|
364
|
+
webhook(config) {
|
|
365
|
+
this.parentOnFailure.webhooks = this.parentOnFailure.webhooks || [];
|
|
366
|
+
this.parentOnFailure.webhooks.push(config);
|
|
367
|
+
return this;
|
|
368
|
+
}
|
|
369
|
+
emit(config) {
|
|
370
|
+
this.parentOnFailure.emit = this.parentOnFailure.emit || [];
|
|
371
|
+
this.parentOnFailure.emit.push(config);
|
|
372
|
+
return this;
|
|
373
|
+
}
|
|
374
|
+
push(config) {
|
|
375
|
+
this.currentNotification.channels.push = config || {};
|
|
376
|
+
return this;
|
|
377
|
+
}
|
|
378
|
+
email(config) {
|
|
379
|
+
this.currentNotification.channels.email = config;
|
|
380
|
+
return this;
|
|
381
|
+
}
|
|
382
|
+
sms(config) {
|
|
383
|
+
this.currentNotification.channels.sms = config;
|
|
384
|
+
return this;
|
|
385
|
+
}
|
|
386
|
+
callback(config) {
|
|
387
|
+
this.currentNotification.channels.callback = config || {};
|
|
388
|
+
return this;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Healthcheck Service
|
|
393
|
+
*
|
|
394
|
+
* Provides code-first API for defining, creating, and managing healthchecks.
|
|
395
|
+
*/
|
|
396
|
+
class HealthcheckService {
|
|
397
|
+
constructor(config) {
|
|
398
|
+
this.config = config;
|
|
399
|
+
this._privateKey = config.private_key;
|
|
400
|
+
this.apiService = new resilienceApi_service_1.ResilienceApiService({
|
|
401
|
+
token: config.token,
|
|
402
|
+
env_type: config.env_type,
|
|
403
|
+
base_url: config.base_url,
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Creates a ProcessorService instance for local execution
|
|
408
|
+
*/
|
|
409
|
+
createProcessor() {
|
|
410
|
+
return new processor_service_1.default({
|
|
411
|
+
workspace_id: this.config.workspace_id,
|
|
412
|
+
public_key: this.config.public_key,
|
|
413
|
+
user_id: this.config.user_id,
|
|
414
|
+
token: this.config.token,
|
|
415
|
+
env_type: this.config.env_type,
|
|
416
|
+
redis_client: this.config.redis_client,
|
|
417
|
+
queues: this.config.queues,
|
|
418
|
+
private_key: this._privateKey,
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Define a healthcheck using code-first API
|
|
423
|
+
*
|
|
424
|
+
* @example
|
|
425
|
+
* ```ts
|
|
426
|
+
* const healthcheck = await healthcheckService.define({
|
|
427
|
+
* product: 'my-product',
|
|
428
|
+
* tag: 'stripe-health',
|
|
429
|
+
* name: 'Stripe API Health',
|
|
430
|
+
* handler: async (ctx) => {
|
|
431
|
+
* ctx.probe().app('stripe-app').action('health');
|
|
432
|
+
* ctx.interval(30000);
|
|
433
|
+
* ctx.retries(2);
|
|
434
|
+
* ctx.env('prd');
|
|
435
|
+
* ctx.env('stg');
|
|
436
|
+
* },
|
|
437
|
+
* });
|
|
438
|
+
* ```
|
|
439
|
+
*/
|
|
440
|
+
async define(options) {
|
|
441
|
+
const ctx = new RecordingHealthcheckContext();
|
|
442
|
+
// Execute the handler to record the configuration
|
|
443
|
+
await options.handler(ctx);
|
|
444
|
+
// Build the schema
|
|
445
|
+
const schema = ctx.build(options.tag, options.name, options.description);
|
|
446
|
+
const definedHealthcheck = {
|
|
447
|
+
tag: options.tag,
|
|
448
|
+
name: options.name,
|
|
449
|
+
description: options.description,
|
|
450
|
+
compile: () => schema,
|
|
451
|
+
};
|
|
452
|
+
// If product is specified, register immediately
|
|
453
|
+
if (options.product) {
|
|
454
|
+
await this.create(options.product, definedHealthcheck);
|
|
455
|
+
}
|
|
456
|
+
return definedHealthcheck;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Create a healthcheck from a defined healthcheck or schema
|
|
460
|
+
*/
|
|
461
|
+
async create(product, healthcheck) {
|
|
462
|
+
const schema = 'compile' in healthcheck ? healthcheck.compile() : healthcheck;
|
|
463
|
+
return await this.apiService.createHealthcheck(product, schema);
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Update an existing healthcheck
|
|
467
|
+
*/
|
|
468
|
+
async update(product, tag, healthcheck) {
|
|
469
|
+
if ('handler' in healthcheck && healthcheck.handler) {
|
|
470
|
+
const ctx = new RecordingHealthcheckContext();
|
|
471
|
+
await healthcheck.handler(ctx);
|
|
472
|
+
const schema = ctx.build(tag, healthcheck.name, healthcheck.description);
|
|
473
|
+
return await this.apiService.updateHealthcheck(product, tag, schema);
|
|
474
|
+
}
|
|
475
|
+
return await this.apiService.updateHealthcheck(product, tag, healthcheck);
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Fetch a healthcheck by tag
|
|
479
|
+
*/
|
|
480
|
+
async fetch(product, tag) {
|
|
481
|
+
return await this.apiService.getHealthcheck(product, tag);
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Fetch all healthchecks for a product
|
|
485
|
+
*/
|
|
486
|
+
async fetchAll(product) {
|
|
487
|
+
return await this.apiService.listHealthchecks(product);
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Delete a healthcheck
|
|
491
|
+
*/
|
|
492
|
+
async delete(product, tag) {
|
|
493
|
+
await this.apiService.deleteHealthcheck(product, tag);
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Get the current status of a healthcheck
|
|
497
|
+
*/
|
|
498
|
+
async getStatus(options) {
|
|
499
|
+
return await this.apiService.getHealthcheckStatus(options.product, options.tag, options.env);
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Alias for getStatus - check the health of a service
|
|
503
|
+
*
|
|
504
|
+
* @example
|
|
505
|
+
* ```ts
|
|
506
|
+
* const status = await resilience.healthcheck.check({
|
|
507
|
+
* product: 'my-product',
|
|
508
|
+
* env: 'prd',
|
|
509
|
+
* tag: 'stripe-health',
|
|
510
|
+
* });
|
|
511
|
+
* console.log(status.status); // 'healthy' | 'unhealthy' | 'degraded'
|
|
512
|
+
* ```
|
|
513
|
+
*/
|
|
514
|
+
async check(options) {
|
|
515
|
+
return await this.getStatus(options);
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Manually trigger a healthcheck
|
|
519
|
+
*
|
|
520
|
+
* Executes the healthcheck locally using the ProcessorService and caches
|
|
521
|
+
* the result in Redis for status tracking. On failure, triggers configured
|
|
522
|
+
* notifications, webhooks, and event emissions.
|
|
523
|
+
*
|
|
524
|
+
* Supports the following probe types:
|
|
525
|
+
* - APP: Executes an app action (supports OAuth auto-refresh)
|
|
526
|
+
* - DATABASE: Tests database connection
|
|
527
|
+
* - GRAPH: Tests graph database connection
|
|
528
|
+
* - MESSAGE_BROKER: Tests message broker connection
|
|
529
|
+
* - STORAGE: Tests object storage connection
|
|
530
|
+
* - WORKFLOW: Executes a workflow and checks completion status
|
|
531
|
+
*/
|
|
532
|
+
async run(options) {
|
|
533
|
+
var _a, _b, _c, _d, _e;
|
|
534
|
+
// Fetch the healthcheck configuration
|
|
535
|
+
const healthcheck = await this.fetch(options.product, options.tag);
|
|
536
|
+
// Find the environment configuration
|
|
537
|
+
const envConfig = (_a = healthcheck.envs) === null || _a === void 0 ? void 0 : _a.find((e) => e.slug === options.env);
|
|
538
|
+
// Execute via processor
|
|
539
|
+
const processor = this.createProcessor();
|
|
540
|
+
const startTime = Date.now();
|
|
541
|
+
// Determine probe type and execute accordingly
|
|
542
|
+
let result;
|
|
543
|
+
const probeType = ((_b = healthcheck.probe) === null || _b === void 0 ? void 0 : _b.type) || types_1.ProbeType.APP;
|
|
544
|
+
if (probeType === types_1.ProbeType.DATABASE) {
|
|
545
|
+
// Database healthcheck - test connection
|
|
546
|
+
result = await this.executeDatabaseProbe(healthcheck, options.product, options.env, startTime);
|
|
547
|
+
}
|
|
548
|
+
else if (probeType === types_1.ProbeType.GRAPH) {
|
|
549
|
+
// Graph healthcheck - test connection
|
|
550
|
+
result = await this.executeGraphProbe(healthcheck, options.product, options.env, startTime);
|
|
551
|
+
}
|
|
552
|
+
else if (probeType === types_1.ProbeType.MESSAGE_BROKER) {
|
|
553
|
+
// Message broker healthcheck - test connection
|
|
554
|
+
result = await this.executeMessageBrokerProbe(healthcheck, options.product, options.env, startTime);
|
|
555
|
+
}
|
|
556
|
+
else if (probeType === types_1.ProbeType.APP) {
|
|
557
|
+
// App healthcheck - execute app action
|
|
558
|
+
const actionData = {
|
|
559
|
+
env: options.env,
|
|
560
|
+
product: options.product,
|
|
561
|
+
app: ((_c = healthcheck.probe) === null || _c === void 0 ? void 0 : _c.app) || healthcheck.app,
|
|
562
|
+
input: (envConfig === null || envConfig === void 0 ? void 0 : envConfig.input) || ((_d = healthcheck.probe) === null || _d === void 0 ? void 0 : _d.input) || {},
|
|
563
|
+
action: ((_e = healthcheck.probe) === null || _e === void 0 ? void 0 : _e.event) || healthcheck.event,
|
|
564
|
+
retries: healthcheck.retries || 0,
|
|
565
|
+
};
|
|
566
|
+
result = await processor.processAction(actionData);
|
|
567
|
+
result = {
|
|
568
|
+
status: result ? 'available' : 'unavailable',
|
|
569
|
+
latency: Date.now() - startTime,
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
else if (probeType === types_1.ProbeType.WORKFLOW) {
|
|
573
|
+
// Workflow healthcheck - execute workflow
|
|
574
|
+
result = await this.executeWorkflowProbe(healthcheck, options.product, options.env, startTime);
|
|
575
|
+
}
|
|
576
|
+
else if (probeType === types_1.ProbeType.STORAGE) {
|
|
577
|
+
// Storage healthcheck - test connection
|
|
578
|
+
result = await this.executeStorageProbe(healthcheck, options.product, options.env, startTime);
|
|
579
|
+
}
|
|
580
|
+
// Build cache data with healthcheck tag for Redis key
|
|
581
|
+
const cacheData = {
|
|
582
|
+
healthcheck: options.tag,
|
|
583
|
+
env: options.env,
|
|
584
|
+
product: options.product,
|
|
585
|
+
};
|
|
586
|
+
// Determine if healthcheck failed
|
|
587
|
+
const isFailure = !result || result.status === 'unavailable' || result.status === 'error' || result.status === 'unknown';
|
|
588
|
+
// Write result to Redis cache
|
|
589
|
+
const healthcheckResult = Object.assign({ status: (result === null || result === void 0 ? void 0 : result.status) || 'unknown', checkedAt: new Date().toISOString(), latency: (result === null || result === void 0 ? void 0 : result.latency) || 0 }, result);
|
|
590
|
+
await processor.writeHealthcheckResultToCache(cacheData, healthcheckResult);
|
|
591
|
+
// Handle failure notifications if configured
|
|
592
|
+
if (isFailure && healthcheck.onFailure) {
|
|
593
|
+
await this.handleFailureNotifications(processor, healthcheck.onFailure, options, healthcheckResult);
|
|
594
|
+
}
|
|
595
|
+
return healthcheckResult;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Handles failure notifications for a healthcheck
|
|
599
|
+
*/
|
|
600
|
+
async handleFailureNotifications(processor, onFailure, options, result) {
|
|
601
|
+
const failureContext = {
|
|
602
|
+
healthcheck: options.tag,
|
|
603
|
+
product: options.product,
|
|
604
|
+
env: options.env,
|
|
605
|
+
status: result.status,
|
|
606
|
+
timestamp: result.checkedAt,
|
|
607
|
+
};
|
|
608
|
+
// Process notifications via processor service
|
|
609
|
+
if (onFailure.notifications && onFailure.notifications.length > 0) {
|
|
610
|
+
for (const notification of onFailure.notifications) {
|
|
611
|
+
try {
|
|
612
|
+
// Build notification input with channel-specific recipients
|
|
613
|
+
const notificationInput = Object.assign({}, failureContext);
|
|
614
|
+
// Add channel-specific data
|
|
615
|
+
if (notification.channels.email) {
|
|
616
|
+
notificationInput.email = notification.channels.email;
|
|
617
|
+
}
|
|
618
|
+
if (notification.channels.sms) {
|
|
619
|
+
notificationInput.sms = notification.channels.sms;
|
|
620
|
+
}
|
|
621
|
+
if (notification.channels.push) {
|
|
622
|
+
notificationInput.push = notification.channels.push;
|
|
623
|
+
}
|
|
624
|
+
if (notification.channels.callback) {
|
|
625
|
+
notificationInput.callback = notification.channels.callback;
|
|
626
|
+
}
|
|
627
|
+
await processor.processNotification({
|
|
628
|
+
env: options.env,
|
|
629
|
+
product: options.product,
|
|
630
|
+
event: `${notification.notification}:${notification.message}`,
|
|
631
|
+
input: notificationInput,
|
|
632
|
+
retries: 2,
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
catch (error) {
|
|
636
|
+
// Log but don't throw - notification failures shouldn't break the healthcheck
|
|
637
|
+
console.error(`Failed to send notification for healthcheck ${options.tag}:`, error);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
// Process webhooks
|
|
642
|
+
if (onFailure.webhooks && onFailure.webhooks.length > 0) {
|
|
643
|
+
for (const webhook of onFailure.webhooks) {
|
|
644
|
+
try {
|
|
645
|
+
const axios = (await Promise.resolve().then(() => __importStar(require('axios')))).default;
|
|
646
|
+
await axios({
|
|
647
|
+
method: webhook.method || 'POST',
|
|
648
|
+
url: webhook.url,
|
|
649
|
+
headers: webhook.headers,
|
|
650
|
+
data: Object.assign(Object.assign({}, failureContext), webhook.body),
|
|
651
|
+
timeout: 10000,
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
catch (error) {
|
|
655
|
+
// Log but don't throw - webhook failures shouldn't break the healthcheck
|
|
656
|
+
console.error(`Failed to call webhook for healthcheck ${options.tag}:`, error);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
// Process event emissions (emit to message broker if configured)
|
|
661
|
+
if (onFailure.emit && onFailure.emit.length > 0) {
|
|
662
|
+
for (const emission of onFailure.emit) {
|
|
663
|
+
try {
|
|
664
|
+
// Emit events via message broker if available
|
|
665
|
+
await processor.processMessageBrokerPublish({
|
|
666
|
+
env: options.env,
|
|
667
|
+
product: options.product,
|
|
668
|
+
event: emission.event,
|
|
669
|
+
input: {
|
|
670
|
+
message: Object.assign(Object.assign({}, failureContext), emission.data),
|
|
671
|
+
},
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
catch (error) {
|
|
675
|
+
// Log but don't throw - emit failures shouldn't break the healthcheck
|
|
676
|
+
console.error(`Failed to emit event for healthcheck ${options.tag}:`, error);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Execute a database healthcheck probe by testing the connection
|
|
683
|
+
*/
|
|
684
|
+
async executeDatabaseProbe(healthcheck, product, env, startTime) {
|
|
685
|
+
var _a;
|
|
686
|
+
const databaseTag = (_a = healthcheck.probe) === null || _a === void 0 ? void 0 : _a.database;
|
|
687
|
+
if (!databaseTag) {
|
|
688
|
+
throw new HealthcheckError('Database healthcheck requires a database tag in the probe configuration', 'MISSING_DATABASE_TAG');
|
|
689
|
+
}
|
|
690
|
+
try {
|
|
691
|
+
// Dynamically import DatabaseService to avoid circular dependencies
|
|
692
|
+
const { DatabaseService } = await Promise.resolve().then(() => __importStar(require('../database/databases.service')));
|
|
693
|
+
const dbService = new DatabaseService({
|
|
694
|
+
workspace_id: this.config.workspace_id,
|
|
695
|
+
public_key: this.config.public_key,
|
|
696
|
+
user_id: this.config.user_id,
|
|
697
|
+
token: this.config.token,
|
|
698
|
+
env_type: this.config.env_type,
|
|
699
|
+
private_key: this._privateKey,
|
|
700
|
+
access_key: this.config.access_key,
|
|
701
|
+
});
|
|
702
|
+
// Test the database connection
|
|
703
|
+
const connectionResult = await dbService.testConnection({
|
|
704
|
+
product,
|
|
705
|
+
env,
|
|
706
|
+
database: databaseTag,
|
|
707
|
+
});
|
|
708
|
+
const latency = Date.now() - startTime;
|
|
709
|
+
if (connectionResult.connected) {
|
|
710
|
+
return {
|
|
711
|
+
status: 'available',
|
|
712
|
+
latency,
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
else {
|
|
716
|
+
return {
|
|
717
|
+
status: 'unavailable',
|
|
718
|
+
latency,
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
catch (error) {
|
|
723
|
+
const latency = Date.now() - startTime;
|
|
724
|
+
return {
|
|
725
|
+
status: 'unavailable',
|
|
726
|
+
latency,
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* Execute a graph healthcheck probe by testing the connection
|
|
732
|
+
*/
|
|
733
|
+
async executeGraphProbe(healthcheck, product, env, startTime) {
|
|
734
|
+
var _a;
|
|
735
|
+
const graphTag = (_a = healthcheck.probe) === null || _a === void 0 ? void 0 : _a.graph;
|
|
736
|
+
if (!graphTag) {
|
|
737
|
+
throw new HealthcheckError('Graph healthcheck requires a graph tag in the probe configuration', 'MISSING_GRAPH_TAG');
|
|
738
|
+
}
|
|
739
|
+
try {
|
|
740
|
+
// Dynamically import GraphService to avoid circular dependencies
|
|
741
|
+
const { GraphService } = await Promise.resolve().then(() => __importStar(require('../graph/graphs.service')));
|
|
742
|
+
const graphService = new GraphService({
|
|
743
|
+
workspace_id: this.config.workspace_id,
|
|
744
|
+
public_key: this.config.public_key,
|
|
745
|
+
user_id: this.config.user_id,
|
|
746
|
+
token: this.config.token,
|
|
747
|
+
env_type: this.config.env_type,
|
|
748
|
+
private_key: this._privateKey,
|
|
749
|
+
access_key: this.config.access_key,
|
|
750
|
+
});
|
|
751
|
+
// Test the graph connection
|
|
752
|
+
const connectionResult = await graphService.testConnection({
|
|
753
|
+
product,
|
|
754
|
+
env,
|
|
755
|
+
graph: graphTag,
|
|
756
|
+
});
|
|
757
|
+
const latency = Date.now() - startTime;
|
|
758
|
+
if (connectionResult.connected) {
|
|
759
|
+
return {
|
|
760
|
+
status: 'available',
|
|
761
|
+
latency,
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
else {
|
|
765
|
+
return {
|
|
766
|
+
status: 'unavailable',
|
|
767
|
+
latency,
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
catch (error) {
|
|
772
|
+
const latency = Date.now() - startTime;
|
|
773
|
+
return {
|
|
774
|
+
status: 'unavailable',
|
|
775
|
+
latency,
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Execute a message broker healthcheck probe by testing the connection
|
|
781
|
+
*/
|
|
782
|
+
async executeMessageBrokerProbe(healthcheck, product, env, startTime) {
|
|
783
|
+
var _a;
|
|
784
|
+
const brokerTag = (_a = healthcheck.probe) === null || _a === void 0 ? void 0 : _a.messageBroker;
|
|
785
|
+
if (!brokerTag) {
|
|
786
|
+
throw new HealthcheckError('Message broker healthcheck requires a messageBroker tag in the probe configuration', 'MISSING_MESSAGE_BROKER_TAG');
|
|
787
|
+
}
|
|
788
|
+
try {
|
|
789
|
+
// Dynamically import BrokersService to avoid circular dependencies
|
|
790
|
+
const { BrokersService } = await Promise.resolve().then(() => __importStar(require('../brokers/brokers.service')));
|
|
791
|
+
const brokersService = new BrokersService({
|
|
792
|
+
workspace_id: this.config.workspace_id,
|
|
793
|
+
public_key: this.config.public_key,
|
|
794
|
+
user_id: this.config.user_id,
|
|
795
|
+
token: this.config.token,
|
|
796
|
+
env_type: this.config.env_type,
|
|
797
|
+
});
|
|
798
|
+
// Test the broker connection by attempting to get broker config
|
|
799
|
+
// This validates broker exists and credentials are correct
|
|
800
|
+
const connectionResult = await brokersService.testConnection({
|
|
801
|
+
product,
|
|
802
|
+
env,
|
|
803
|
+
broker: brokerTag,
|
|
804
|
+
});
|
|
805
|
+
const latency = Date.now() - startTime;
|
|
806
|
+
if (connectionResult.connected) {
|
|
807
|
+
return {
|
|
808
|
+
status: 'available',
|
|
809
|
+
latency,
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
else {
|
|
813
|
+
return {
|
|
814
|
+
status: 'unavailable',
|
|
815
|
+
latency,
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
catch (error) {
|
|
820
|
+
const latency = Date.now() - startTime;
|
|
821
|
+
return {
|
|
822
|
+
status: 'unavailable',
|
|
823
|
+
latency,
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* Execute a workflow healthcheck probe by running the workflow
|
|
829
|
+
*
|
|
830
|
+
* Workflow healthchecks execute the workflow with the provided input
|
|
831
|
+
* and check if it completes successfully. This is useful for testing
|
|
832
|
+
* end-to-end workflow functionality.
|
|
833
|
+
*/
|
|
834
|
+
async executeWorkflowProbe(healthcheck, product, env, startTime) {
|
|
835
|
+
var _a, _b;
|
|
836
|
+
const workflowTag = (_a = healthcheck.probe) === null || _a === void 0 ? void 0 : _a.workflow;
|
|
837
|
+
if (!workflowTag) {
|
|
838
|
+
throw new HealthcheckError('Workflow healthcheck requires a workflow tag in the probe configuration', 'MISSING_WORKFLOW_TAG');
|
|
839
|
+
}
|
|
840
|
+
try {
|
|
841
|
+
// Dynamically import WorkflowService to avoid circular dependencies
|
|
842
|
+
const { WorkflowService } = await Promise.resolve().then(() => __importStar(require('../workflows/workflows.service')));
|
|
843
|
+
const workflowService = new WorkflowService({
|
|
844
|
+
workspace_id: this.config.workspace_id,
|
|
845
|
+
public_key: this.config.public_key,
|
|
846
|
+
user_id: this.config.user_id,
|
|
847
|
+
token: this.config.token,
|
|
848
|
+
env_type: this.config.env_type,
|
|
849
|
+
private_key: this._privateKey,
|
|
850
|
+
access_key: this.config.access_key,
|
|
851
|
+
});
|
|
852
|
+
// Execute the workflow with the configured input
|
|
853
|
+
const input = ((_b = healthcheck.probe) === null || _b === void 0 ? void 0 : _b.input) || {};
|
|
854
|
+
const result = await workflowService.execute({
|
|
855
|
+
product,
|
|
856
|
+
env,
|
|
857
|
+
tag: workflowTag,
|
|
858
|
+
input,
|
|
859
|
+
});
|
|
860
|
+
const latency = Date.now() - startTime;
|
|
861
|
+
// Check if workflow completed successfully
|
|
862
|
+
if (result.status === 'completed') {
|
|
863
|
+
return {
|
|
864
|
+
status: 'available',
|
|
865
|
+
latency,
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
else {
|
|
869
|
+
return {
|
|
870
|
+
status: 'unavailable',
|
|
871
|
+
latency,
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
catch (error) {
|
|
876
|
+
const latency = Date.now() - startTime;
|
|
877
|
+
return {
|
|
878
|
+
status: 'unavailable',
|
|
879
|
+
latency,
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Execute a storage healthcheck probe by testing the connection
|
|
885
|
+
*
|
|
886
|
+
* Storage healthchecks attempt to list objects (with limit 1) to verify
|
|
887
|
+
* connectivity and credentials are working correctly.
|
|
888
|
+
*/
|
|
889
|
+
async executeStorageProbe(healthcheck, product, env, startTime) {
|
|
890
|
+
var _a;
|
|
891
|
+
const storageTag = (_a = healthcheck.probe) === null || _a === void 0 ? void 0 : _a.storage;
|
|
892
|
+
if (!storageTag) {
|
|
893
|
+
throw new HealthcheckError('Storage healthcheck requires a storage tag in the probe configuration', 'MISSING_STORAGE_TAG');
|
|
894
|
+
}
|
|
895
|
+
try {
|
|
896
|
+
// Dynamically import StorageService to avoid circular dependencies
|
|
897
|
+
const { StorageService } = await Promise.resolve().then(() => __importStar(require('../storage/storage.service')));
|
|
898
|
+
const storageService = new StorageService({
|
|
899
|
+
workspace_id: this.config.workspace_id,
|
|
900
|
+
public_key: this.config.public_key,
|
|
901
|
+
user_id: this.config.user_id,
|
|
902
|
+
token: this.config.token,
|
|
903
|
+
env_type: this.config.env_type,
|
|
904
|
+
private_key: this._privateKey,
|
|
905
|
+
});
|
|
906
|
+
// Test the storage connection
|
|
907
|
+
const connectionResult = await storageService.testConnection({
|
|
908
|
+
product,
|
|
909
|
+
env,
|
|
910
|
+
storage: storageTag,
|
|
911
|
+
});
|
|
912
|
+
const latency = Date.now() - startTime;
|
|
913
|
+
if (connectionResult.connected) {
|
|
914
|
+
return {
|
|
915
|
+
status: 'available',
|
|
916
|
+
latency,
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
else {
|
|
920
|
+
return {
|
|
921
|
+
status: 'unavailable',
|
|
922
|
+
latency,
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
catch (error) {
|
|
927
|
+
const latency = Date.now() - startTime;
|
|
928
|
+
return {
|
|
929
|
+
status: 'unavailable',
|
|
930
|
+
latency,
|
|
931
|
+
};
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* @deprecated Use run() instead
|
|
936
|
+
*/
|
|
937
|
+
async runNow(options) {
|
|
938
|
+
return await this.run(options);
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
exports.HealthcheckService = HealthcheckService;
|
|
942
|
+
exports.default = HealthcheckService;
|
|
943
|
+
//# sourceMappingURL=healthcheck.service.js.map
|