@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,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CredentialManager - Manages shared credentials for action execution
|
|
3
|
+
*
|
|
4
|
+
* This utility allows developers to set up credentials once per app/product/env
|
|
5
|
+
* combination, and have those credentials automatically merged into action
|
|
6
|
+
* inputs before resolution.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* // Set up shared credentials once
|
|
11
|
+
* ductape.actions.share({
|
|
12
|
+
* product: 'my-product',
|
|
13
|
+
* app: 'stripe',
|
|
14
|
+
* env: 'prd',
|
|
15
|
+
* credentials: {
|
|
16
|
+
* 'headers:Authorization': '$Secret{StripeApiKey}',
|
|
17
|
+
* }
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* // Now all stripe actions in prd env automatically include credentials
|
|
21
|
+
* const result = await ductape.actions.run({
|
|
22
|
+
* product: 'my-product',
|
|
23
|
+
* app: 'stripe',
|
|
24
|
+
* env: 'prd',
|
|
25
|
+
* event: 'create-charge',
|
|
26
|
+
* input: { amount: 1000, currency: 'usd' }
|
|
27
|
+
* });
|
|
28
|
+
* // Input automatically includes 'headers:Authorization' from shared credentials
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Shared credentials configuration
|
|
33
|
+
*/
|
|
34
|
+
export interface IShareCredentialsConfig {
|
|
35
|
+
/** Product tag */
|
|
36
|
+
product: string;
|
|
37
|
+
/** App tag */
|
|
38
|
+
app: string;
|
|
39
|
+
/** Environment slug */
|
|
40
|
+
env: string;
|
|
41
|
+
/** Credentials to share (flat format with optional prefixes) */
|
|
42
|
+
credentials: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Options for getting shared credentials
|
|
46
|
+
*/
|
|
47
|
+
export interface IGetCredentialsOptions {
|
|
48
|
+
product: string;
|
|
49
|
+
app: string;
|
|
50
|
+
env: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Validation error thrown for invalid credential configurations
|
|
54
|
+
*/
|
|
55
|
+
export declare class CredentialError extends Error {
|
|
56
|
+
readonly errorType: 'invalid_config' | 'not_found';
|
|
57
|
+
constructor(message: string, errorType: 'invalid_config' | 'not_found');
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* CredentialManager stores and retrieves shared credentials
|
|
61
|
+
* for product/app/env combinations.
|
|
62
|
+
*/
|
|
63
|
+
export declare class CredentialManager {
|
|
64
|
+
/** Storage for credentials, keyed by product:app:env */
|
|
65
|
+
private credentials;
|
|
66
|
+
/**
|
|
67
|
+
* Share credentials for a product/app/env combination
|
|
68
|
+
*
|
|
69
|
+
* @param config - Credential configuration
|
|
70
|
+
* @throws CredentialError if configuration is invalid
|
|
71
|
+
*/
|
|
72
|
+
share(config: IShareCredentialsConfig): void;
|
|
73
|
+
/**
|
|
74
|
+
* Get shared credentials for a product/app/env combination
|
|
75
|
+
*
|
|
76
|
+
* @param options - Options specifying product, app, and env
|
|
77
|
+
* @returns Shared credentials or undefined if not set
|
|
78
|
+
*/
|
|
79
|
+
get(options: IGetCredentialsOptions): Record<string, unknown> | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Check if shared credentials exist for a product/app/env combination
|
|
82
|
+
*/
|
|
83
|
+
has(options: IGetCredentialsOptions): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Remove shared credentials for a product/app/env combination
|
|
86
|
+
*
|
|
87
|
+
* @param options - Options specifying product, app, and env
|
|
88
|
+
* @returns true if credentials were removed, false if they didn't exist
|
|
89
|
+
*/
|
|
90
|
+
remove(options: IGetCredentialsOptions): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Clear all shared credentials
|
|
93
|
+
*/
|
|
94
|
+
clearAll(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Clear all credentials for a specific product
|
|
97
|
+
*/
|
|
98
|
+
clearProduct(product: string): void;
|
|
99
|
+
/**
|
|
100
|
+
* Clear all credentials for a specific app (across all products)
|
|
101
|
+
*/
|
|
102
|
+
clearApp(app: string): void;
|
|
103
|
+
/**
|
|
104
|
+
* Clear all credentials for a specific environment (across all products and apps)
|
|
105
|
+
*/
|
|
106
|
+
clearEnv(env: string): void;
|
|
107
|
+
/**
|
|
108
|
+
* Get all registered product/app/env combinations
|
|
109
|
+
*/
|
|
110
|
+
list(): Array<{
|
|
111
|
+
product: string;
|
|
112
|
+
app: string;
|
|
113
|
+
env: string;
|
|
114
|
+
}>;
|
|
115
|
+
/**
|
|
116
|
+
* Merge shared credentials with user-provided input
|
|
117
|
+
* Shared credentials are used as defaults; user input takes precedence
|
|
118
|
+
*
|
|
119
|
+
* @param sharedCredentials - Shared credentials from manager
|
|
120
|
+
* @param userInput - User-provided flat input
|
|
121
|
+
* @returns Merged input with shared credentials as defaults
|
|
122
|
+
*/
|
|
123
|
+
mergeWithInput(sharedCredentials: Record<string, unknown>, userInput: Record<string, unknown>): Record<string, unknown>;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Singleton instance for convenience
|
|
127
|
+
*/
|
|
128
|
+
export declare const credentialManager: CredentialManager;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CredentialManager - Manages shared credentials for action execution
|
|
4
|
+
*
|
|
5
|
+
* This utility allows developers to set up credentials once per app/product/env
|
|
6
|
+
* combination, and have those credentials automatically merged into action
|
|
7
|
+
* inputs before resolution.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // Set up shared credentials once
|
|
12
|
+
* ductape.actions.share({
|
|
13
|
+
* product: 'my-product',
|
|
14
|
+
* app: 'stripe',
|
|
15
|
+
* env: 'prd',
|
|
16
|
+
* credentials: {
|
|
17
|
+
* 'headers:Authorization': '$Secret{StripeApiKey}',
|
|
18
|
+
* }
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* // Now all stripe actions in prd env automatically include credentials
|
|
22
|
+
* const result = await ductape.actions.run({
|
|
23
|
+
* product: 'my-product',
|
|
24
|
+
* app: 'stripe',
|
|
25
|
+
* env: 'prd',
|
|
26
|
+
* event: 'create-charge',
|
|
27
|
+
* input: { amount: 1000, currency: 'usd' }
|
|
28
|
+
* });
|
|
29
|
+
* // Input automatically includes 'headers:Authorization' from shared credentials
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.credentialManager = exports.CredentialManager = exports.CredentialError = void 0;
|
|
34
|
+
/**
|
|
35
|
+
* Validation error thrown for invalid credential configurations
|
|
36
|
+
*/
|
|
37
|
+
class CredentialError extends Error {
|
|
38
|
+
constructor(message, errorType) {
|
|
39
|
+
super(message);
|
|
40
|
+
this.errorType = errorType;
|
|
41
|
+
this.name = 'CredentialError';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.CredentialError = CredentialError;
|
|
45
|
+
/**
|
|
46
|
+
* Generate a unique key for product/app/env combination
|
|
47
|
+
*/
|
|
48
|
+
function generateCredentialKey(product, app, env) {
|
|
49
|
+
return `${product}:${app}:${env}`;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* CredentialManager stores and retrieves shared credentials
|
|
53
|
+
* for product/app/env combinations.
|
|
54
|
+
*/
|
|
55
|
+
class CredentialManager {
|
|
56
|
+
constructor() {
|
|
57
|
+
/** Storage for credentials, keyed by product:app:env */
|
|
58
|
+
this.credentials = new Map();
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Share credentials for a product/app/env combination
|
|
62
|
+
*
|
|
63
|
+
* @param config - Credential configuration
|
|
64
|
+
* @throws CredentialError if configuration is invalid
|
|
65
|
+
*/
|
|
66
|
+
share(config) {
|
|
67
|
+
// Validate required fields
|
|
68
|
+
if (!config.product || typeof config.product !== 'string') {
|
|
69
|
+
throw new CredentialError('Shared credentials require a valid product tag', 'invalid_config');
|
|
70
|
+
}
|
|
71
|
+
if (!config.app || typeof config.app !== 'string') {
|
|
72
|
+
throw new CredentialError('Shared credentials require a valid app tag', 'invalid_config');
|
|
73
|
+
}
|
|
74
|
+
if (!config.env || typeof config.env !== 'string') {
|
|
75
|
+
throw new CredentialError('Shared credentials require a valid env slug', 'invalid_config');
|
|
76
|
+
}
|
|
77
|
+
// Ensure credentials are provided
|
|
78
|
+
if (!config.credentials || typeof config.credentials !== 'object') {
|
|
79
|
+
throw new CredentialError('Shared credentials require a credentials object', 'invalid_config');
|
|
80
|
+
}
|
|
81
|
+
if (Object.keys(config.credentials).length === 0) {
|
|
82
|
+
throw new CredentialError('Shared credentials object cannot be empty', 'invalid_config');
|
|
83
|
+
}
|
|
84
|
+
// Validate credential values are not undefined
|
|
85
|
+
for (const [key, value] of Object.entries(config.credentials)) {
|
|
86
|
+
if (value === undefined) {
|
|
87
|
+
throw new CredentialError(`Credential "${key}" cannot be undefined. Provide a valid value or remove the key.`, 'invalid_config');
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const key = generateCredentialKey(config.product, config.app, config.env);
|
|
91
|
+
this.credentials.set(key, Object.assign({}, config.credentials));
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Get shared credentials for a product/app/env combination
|
|
95
|
+
*
|
|
96
|
+
* @param options - Options specifying product, app, and env
|
|
97
|
+
* @returns Shared credentials or undefined if not set
|
|
98
|
+
*/
|
|
99
|
+
get(options) {
|
|
100
|
+
const key = generateCredentialKey(options.product, options.app, options.env);
|
|
101
|
+
return this.credentials.get(key);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Check if shared credentials exist for a product/app/env combination
|
|
105
|
+
*/
|
|
106
|
+
has(options) {
|
|
107
|
+
return this.get(options) !== undefined;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Remove shared credentials for a product/app/env combination
|
|
111
|
+
*
|
|
112
|
+
* @param options - Options specifying product, app, and env
|
|
113
|
+
* @returns true if credentials were removed, false if they didn't exist
|
|
114
|
+
*/
|
|
115
|
+
remove(options) {
|
|
116
|
+
const key = generateCredentialKey(options.product, options.app, options.env);
|
|
117
|
+
return this.credentials.delete(key);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Clear all shared credentials
|
|
121
|
+
*/
|
|
122
|
+
clearAll() {
|
|
123
|
+
this.credentials.clear();
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Clear all credentials for a specific product
|
|
127
|
+
*/
|
|
128
|
+
clearProduct(product) {
|
|
129
|
+
const keysToDelete = [];
|
|
130
|
+
for (const key of this.credentials.keys()) {
|
|
131
|
+
if (key.startsWith(`${product}:`)) {
|
|
132
|
+
keysToDelete.push(key);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
for (const key of keysToDelete) {
|
|
136
|
+
this.credentials.delete(key);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Clear all credentials for a specific app (across all products)
|
|
141
|
+
*/
|
|
142
|
+
clearApp(app) {
|
|
143
|
+
const keysToDelete = [];
|
|
144
|
+
for (const key of this.credentials.keys()) {
|
|
145
|
+
// Key format: product:app:env
|
|
146
|
+
const parts = key.split(':');
|
|
147
|
+
if (parts[1] === app) {
|
|
148
|
+
keysToDelete.push(key);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
for (const key of keysToDelete) {
|
|
152
|
+
this.credentials.delete(key);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Clear all credentials for a specific environment (across all products and apps)
|
|
157
|
+
*/
|
|
158
|
+
clearEnv(env) {
|
|
159
|
+
const keysToDelete = [];
|
|
160
|
+
for (const key of this.credentials.keys()) {
|
|
161
|
+
// Key format: product:app:env
|
|
162
|
+
if (key.endsWith(`:${env}`)) {
|
|
163
|
+
keysToDelete.push(key);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
for (const key of keysToDelete) {
|
|
167
|
+
this.credentials.delete(key);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Get all registered product/app/env combinations
|
|
172
|
+
*/
|
|
173
|
+
list() {
|
|
174
|
+
const result = [];
|
|
175
|
+
for (const key of this.credentials.keys()) {
|
|
176
|
+
const parts = key.split(':');
|
|
177
|
+
result.push({ product: parts[0], app: parts[1], env: parts[2] });
|
|
178
|
+
}
|
|
179
|
+
return result;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Merge shared credentials with user-provided input
|
|
183
|
+
* Shared credentials are used as defaults; user input takes precedence
|
|
184
|
+
*
|
|
185
|
+
* @param sharedCredentials - Shared credentials from manager
|
|
186
|
+
* @param userInput - User-provided flat input
|
|
187
|
+
* @returns Merged input with shared credentials as defaults
|
|
188
|
+
*/
|
|
189
|
+
mergeWithInput(sharedCredentials, userInput) {
|
|
190
|
+
// Shared credentials come first (lower priority), user input overwrites
|
|
191
|
+
return Object.assign(Object.assign({}, sharedCredentials), userInput);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
exports.CredentialManager = CredentialManager;
|
|
195
|
+
/**
|
|
196
|
+
* Singleton instance for convenience
|
|
197
|
+
*/
|
|
198
|
+
exports.credentialManager = new CredentialManager();
|
|
199
|
+
//# sourceMappingURL=credential-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-manager.js","sourceRoot":"","sources":["../../../src/apps/utils/credential-manager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;;AAyBH;;GAEG;AACH,MAAa,eAAgB,SAAQ,KAAK;IACxC,YACE,OAAe,EACC,SAAyC;QAEzD,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,cAAS,GAAT,SAAS,CAAgC;QAGzD,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AARD,0CAQC;AAED;;GAEG;AACH,SAAS,qBAAqB,CAAC,OAAe,EAAE,GAAW,EAAE,GAAW;IACtE,OAAO,GAAG,OAAO,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;AACpC,CAAC;AAED;;;GAGG;AACH,MAAa,iBAAiB;IAA9B;QACE,wDAAwD;QAChD,gBAAW,GAAyC,IAAI,GAAG,EAAE,CAAC;IAmLxE,CAAC;IAjLC;;;;;OAKG;IACH,KAAK,CAAC,MAA+B;QACnC,2BAA2B;QAC3B,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YAC1D,MAAM,IAAI,eAAe,CACvB,gDAAgD,EAChD,gBAAgB,CACjB,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;YAClD,MAAM,IAAI,eAAe,CACvB,4CAA4C,EAC5C,gBAAgB,CACjB,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;YAClD,MAAM,IAAI,eAAe,CACvB,6CAA6C,EAC7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XES, type InputLocation, type ILocationMap, type IResolvedInput, type IResolveOptions, } from './input-resolver';
|
|
5
|
+
export { AuthContextManager, authContextManager, AuthContextError, type IAuthContextConfig, } from './auth-context-manager';
|
|
6
|
+
export { CredentialManager, credentialManager, CredentialError, type IShareCredentialsConfig, type IGetCredentialsOptions, } from './credential-manager';
|
|
7
|
+
export { OAuthManager, oauthManager, OAuthError, type IOAuthTokens, type IOAuthRefreshResult, type IOAuthConfig, type CredentialsBuilder, } from './oauth-manager';
|
|
8
|
+
export { isStructuredInput, hasPrefixedKeys, processActionInput, createFlatInputValidator, getInputKeySummary, type IProcessInputOptions, } from './input-helpers';
|
|
9
|
+
export * from './string.utils';
|
|
10
|
+
export * from './objects.utils';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Apps utility exports
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.getInputKeySummary = exports.createFlatInputValidator = exports.processActionInput = exports.hasPrefixedKeys = exports.isStructuredInput = exports.OAuthError = exports.oauthManager = exports.OAuthManager = exports.CredentialError = exports.credentialManager = exports.CredentialManager = exports.AuthContextError = exports.authContextManager = exports.AuthContextManager = exports.LOCATION_PREFIXES = exports.InputResolutionError = exports.resolveInput = exports.inputResolver = exports.InputResolver = void 0;
|
|
21
|
+
// Input resolution utilities
|
|
22
|
+
var input_resolver_1 = require("./input-resolver");
|
|
23
|
+
Object.defineProperty(exports, "InputResolver", { enumerable: true, get: function () { return input_resolver_1.InputResolver; } });
|
|
24
|
+
Object.defineProperty(exports, "inputResolver", { enumerable: true, get: function () { return input_resolver_1.inputResolver; } });
|
|
25
|
+
Object.defineProperty(exports, "resolveInput", { enumerable: true, get: function () { return input_resolver_1.resolveInput; } });
|
|
26
|
+
Object.defineProperty(exports, "InputResolutionError", { enumerable: true, get: function () { return input_resolver_1.InputResolutionError; } });
|
|
27
|
+
Object.defineProperty(exports, "LOCATION_PREFIXES", { enumerable: true, get: function () { return input_resolver_1.LOCATION_PREFIXES; } });
|
|
28
|
+
// Auth context management
|
|
29
|
+
var auth_context_manager_1 = require("./auth-context-manager");
|
|
30
|
+
Object.defineProperty(exports, "AuthContextManager", { enumerable: true, get: function () { return auth_context_manager_1.AuthContextManager; } });
|
|
31
|
+
Object.defineProperty(exports, "authContextManager", { enumerable: true, get: function () { return auth_context_manager_1.authContextManager; } });
|
|
32
|
+
Object.defineProperty(exports, "AuthContextError", { enumerable: true, get: function () { return auth_context_manager_1.AuthContextError; } });
|
|
33
|
+
// Credential management for shared credentials
|
|
34
|
+
var credential_manager_1 = require("./credential-manager");
|
|
35
|
+
Object.defineProperty(exports, "CredentialManager", { enumerable: true, get: function () { return credential_manager_1.CredentialManager; } });
|
|
36
|
+
Object.defineProperty(exports, "credentialManager", { enumerable: true, get: function () { return credential_manager_1.credentialManager; } });
|
|
37
|
+
Object.defineProperty(exports, "CredentialError", { enumerable: true, get: function () { return credential_manager_1.CredentialError; } });
|
|
38
|
+
// OAuth management with automatic refresh and $Secret{} integration
|
|
39
|
+
var oauth_manager_1 = require("./oauth-manager");
|
|
40
|
+
Object.defineProperty(exports, "OAuthManager", { enumerable: true, get: function () { return oauth_manager_1.OAuthManager; } });
|
|
41
|
+
Object.defineProperty(exports, "oauthManager", { enumerable: true, get: function () { return oauth_manager_1.oauthManager; } });
|
|
42
|
+
Object.defineProperty(exports, "OAuthError", { enumerable: true, get: function () { return oauth_manager_1.OAuthError; } });
|
|
43
|
+
// Input helpers for detection and processing
|
|
44
|
+
var input_helpers_1 = require("./input-helpers");
|
|
45
|
+
Object.defineProperty(exports, "isStructuredInput", { enumerable: true, get: function () { return input_helpers_1.isStructuredInput; } });
|
|
46
|
+
Object.defineProperty(exports, "hasPrefixedKeys", { enumerable: true, get: function () { return input_helpers_1.hasPrefixedKeys; } });
|
|
47
|
+
Object.defineProperty(exports, "processActionInput", { enumerable: true, get: function () { return input_helpers_1.processActionInput; } });
|
|
48
|
+
Object.defineProperty(exports, "createFlatInputValidator", { enumerable: true, get: function () { return input_helpers_1.createFlatInputValidator; } });
|
|
49
|
+
Object.defineProperty(exports, "getInputKeySummary", { enumerable: true, get: function () { return input_helpers_1.getInputKeySummary; } });
|
|
50
|
+
// String utilities
|
|
51
|
+
__exportStar(require("./string.utils"), exports);
|
|
52
|
+
// Object utilities
|
|
53
|
+
__exportStar(require("./objects.utils"), exports);
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/apps/utils/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AAEH,6BAA6B;AAC7B,mDAU0B;AATxB,+GAAA,aAAa,OAAA;AACb,+GAAA,aAAa,OAAA;AACb,8GAAA,YAAY,OAAA;AACZ,sHAAA,oBAAoB,OAAA;AACpB,mHAAA,iBAAiB,OAAA;AAOnB,0BAA0B;AAC1B,+DAKgC;AAJ9B,0HAAA,kBAAkB,OAAA;AAClB,0HAAA,kBAAkB,OAAA;AAClB,wHAAA,gBAAgB,OAAA;AAIlB,+CAA+C;AAC/C,2DAM8B;AAL5B,uHAAA,iBAAiB,OAAA;AACjB,uHAAA,iBAAiB,OAAA;AACjB,qHAAA,eAAe,OAAA;AAKjB,oEAAoE;AACpE,iDAQyB;AAPvB,6GAAA,YAAY,OAAA;AACZ,6GAAA,YAAY,OAAA;AACZ,2GAAA,UAAU,OAAA;AAOZ,6CAA6C;AAC7C,iDAOyB;AANvB,kHAAA,iBAAiB,OAAA;AACjB,gHAAA,eAAe,OAAA;AACf,mHAAA,kBAAkB,OAAA;AAClB,yHAAA,wBAAwB,OAAA;AACxB,mHAAA,kBAAkB,OAAA;AAIpB,mBAAmB;AACnB,iDAA+B;AAE/B,mBAAmB;AACnB,kDAAgC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input Helpers - Utilities for detecting and processing action inputs
|
|
3
|
+
*/
|
|
4
|
+
import { IActionRequest, IAppAction } from '../../types';
|
|
5
|
+
import { IResolveOptions } from './input-resolver';
|
|
6
|
+
import { AuthContextManager } from './auth-context-manager';
|
|
7
|
+
/**
|
|
8
|
+
* Check if the input appears to be a structured IActionRequest format
|
|
9
|
+
*
|
|
10
|
+
* Structured format has ONLY these keys: body, params, query, headers, input
|
|
11
|
+
* Flat format has arbitrary keys that need to be resolved
|
|
12
|
+
*
|
|
13
|
+
* @param input - Input to check
|
|
14
|
+
* @returns true if structured, false if flat
|
|
15
|
+
*/
|
|
16
|
+
export declare function isStructuredInput(input: Record<string, unknown>): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Check if input contains any flat-style prefixed keys
|
|
19
|
+
*
|
|
20
|
+
* @param input - Input to check
|
|
21
|
+
* @returns true if contains prefixed keys like 'body:key', 'params:id'
|
|
22
|
+
*/
|
|
23
|
+
export declare function hasPrefixedKeys(input: Record<string, unknown>): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Options for processing action input
|
|
26
|
+
*/
|
|
27
|
+
export interface IProcessInputOptions extends IResolveOptions {
|
|
28
|
+
/** Skip validation after resolution */
|
|
29
|
+
skipValidation?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Process action input - detect format and resolve if flat
|
|
33
|
+
*
|
|
34
|
+
* This is the main entry point for action input processing:
|
|
35
|
+
* 1. Detects if input is structured or flat
|
|
36
|
+
* 2. If flat, resolves it using the action schema
|
|
37
|
+
* 3. Merges auth context if provided
|
|
38
|
+
* 4. Optionally validates required fields
|
|
39
|
+
*
|
|
40
|
+
* @param input - Raw input (structured or flat)
|
|
41
|
+
* @param action - Action schema for resolution
|
|
42
|
+
* @param authManager - Optional auth context manager
|
|
43
|
+
* @param app - App tag for auth context lookup
|
|
44
|
+
* @param env - Env slug for auth context lookup
|
|
45
|
+
* @param product - Optional product tag for auth context lookup
|
|
46
|
+
* @param options - Processing options
|
|
47
|
+
* @returns Structured IActionRequest ready for execution
|
|
48
|
+
* @throws InputResolutionError for invalid inputs in strict mode
|
|
49
|
+
*/
|
|
50
|
+
export declare function processActionInput(input: Record<string, unknown>, action: IAppAction, authManager?: AuthContextManager, app?: string, env?: string, product?: string, options?: IProcessInputOptions): IActionRequest;
|
|
51
|
+
/**
|
|
52
|
+
* Create a flat input validator for an action
|
|
53
|
+
*
|
|
54
|
+
* Returns a function that validates flat input against the action schema
|
|
55
|
+
* without actually resolving it. Useful for pre-validation.
|
|
56
|
+
*
|
|
57
|
+
* @param action - Action schema
|
|
58
|
+
* @returns Validator function
|
|
59
|
+
*/
|
|
60
|
+
export declare function createFlatInputValidator(action: IAppAction): (input: Record<string, unknown>) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Get a user-friendly summary of valid input keys for an action
|
|
63
|
+
*
|
|
64
|
+
* @param action - Action schema
|
|
65
|
+
* @returns Human-readable summary string
|
|
66
|
+
*/
|
|
67
|
+
export declare function getInputKeySummary(action: IAppAction): string;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Input Helpers - Utilities for detecting and processing action inputs
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isStructuredInput = isStructuredInput;
|
|
7
|
+
exports.hasPrefixedKeys = hasPrefixedKeys;
|
|
8
|
+
exports.processActionInput = processActionInput;
|
|
9
|
+
exports.createFlatInputValidator = createFlatInputValidator;
|
|
10
|
+
exports.getInputKeySummary = getInputKeySummary;
|
|
11
|
+
const input_resolver_1 = require("./input-resolver");
|
|
12
|
+
/**
|
|
13
|
+
* Valid top-level keys for structured IActionRequest
|
|
14
|
+
*/
|
|
15
|
+
const STRUCTURED_KEYS = new Set(['body', 'params', 'query', 'headers', 'input']);
|
|
16
|
+
/**
|
|
17
|
+
* Check if the input appears to be a structured IActionRequest format
|
|
18
|
+
*
|
|
19
|
+
* Structured format has ONLY these keys: body, params, query, headers, input
|
|
20
|
+
* Flat format has arbitrary keys that need to be resolved
|
|
21
|
+
*
|
|
22
|
+
* @param input - Input to check
|
|
23
|
+
* @returns true if structured, false if flat
|
|
24
|
+
*/
|
|
25
|
+
function isStructuredInput(input) {
|
|
26
|
+
if (!input || typeof input !== 'object') {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
const keys = Object.keys(input);
|
|
30
|
+
// Empty object is considered flat (will be resolved to empty structured)
|
|
31
|
+
if (keys.length === 0) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
// Check if ALL keys are structured keys
|
|
35
|
+
// If any key is NOT a structured key, it's flat input
|
|
36
|
+
for (const key of keys) {
|
|
37
|
+
if (!STRUCTURED_KEYS.has(key)) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
// Additional check: if it has structured keys, the values should be objects
|
|
42
|
+
for (const key of keys) {
|
|
43
|
+
const value = input[key];
|
|
44
|
+
// For structured input, body/params/query/headers should be objects or undefined
|
|
45
|
+
if (key !== 'input' && value !== undefined && value !== null) {
|
|
46
|
+
if (typeof value !== 'object' || Array.isArray(value)) {
|
|
47
|
+
// If a structured key has a non-object value, treat as flat input
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Check if input contains any flat-style prefixed keys
|
|
56
|
+
*
|
|
57
|
+
* @param input - Input to check
|
|
58
|
+
* @returns true if contains prefixed keys like 'body:key', 'params:id'
|
|
59
|
+
*/
|
|
60
|
+
function hasPrefixedKeys(input) {
|
|
61
|
+
const prefixes = ['body:', 'params:', 'query:', 'headers:'];
|
|
62
|
+
for (const key of Object.keys(input)) {
|
|
63
|
+
for (const prefix of prefixes) {
|
|
64
|
+
if (key.startsWith(prefix)) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Process action input - detect format and resolve if flat
|
|
73
|
+
*
|
|
74
|
+
* This is the main entry point for action input processing:
|
|
75
|
+
* 1. Detects if input is structured or flat
|
|
76
|
+
* 2. If flat, resolves it using the action schema
|
|
77
|
+
* 3. Merges auth context if provided
|
|
78
|
+
* 4. Optionally validates required fields
|
|
79
|
+
*
|
|
80
|
+
* @param input - Raw input (structured or flat)
|
|
81
|
+
* @param action - Action schema for resolution
|
|
82
|
+
* @param authManager - Optional auth context manager
|
|
83
|
+
* @param app - App tag for auth context lookup
|
|
84
|
+
* @param env - Env slug for auth context lookup
|
|
85
|
+
* @param product - Optional product tag for auth context lookup
|
|
86
|
+
* @param options - Processing options
|
|
87
|
+
* @returns Structured IActionRequest ready for execution
|
|
88
|
+
* @throws InputResolutionError for invalid inputs in strict mode
|
|
89
|
+
*/
|
|
90
|
+
function processActionInput(input, action, authManager, app, env, product, options = {}) {
|
|
91
|
+
const { strict = true, skipValidation = false } = options;
|
|
92
|
+
const resolver = new input_resolver_1.InputResolver();
|
|
93
|
+
// Get auth context if available
|
|
94
|
+
let authContext;
|
|
95
|
+
if (authManager && app && env) {
|
|
96
|
+
authContext = authManager.getAuth(app, env, product);
|
|
97
|
+
}
|
|
98
|
+
let resolved;
|
|
99
|
+
if (isStructuredInput(input)) {
|
|
100
|
+
// Already structured - merge with auth context
|
|
101
|
+
resolved = input;
|
|
102
|
+
if (authContext) {
|
|
103
|
+
resolved = authManager.mergeWithInput(authContext, resolved);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
// Flat input - resolve using action schema
|
|
108
|
+
resolved = resolver.resolve(input, action, {
|
|
109
|
+
strict,
|
|
110
|
+
authContext,
|
|
111
|
+
defaultLocation: 'body',
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// Validate required fields if not skipped
|
|
115
|
+
if (!skipValidation && strict) {
|
|
116
|
+
resolver.validateRequired(resolved, action);
|
|
117
|
+
}
|
|
118
|
+
// Convert to IActionRequest format
|
|
119
|
+
return {
|
|
120
|
+
body: resolved.body,
|
|
121
|
+
params: resolved.params,
|
|
122
|
+
query: resolved.query,
|
|
123
|
+
headers: resolved.headers,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Create a flat input validator for an action
|
|
128
|
+
*
|
|
129
|
+
* Returns a function that validates flat input against the action schema
|
|
130
|
+
* without actually resolving it. Useful for pre-validation.
|
|
131
|
+
*
|
|
132
|
+
* @param action - Action schema
|
|
133
|
+
* @returns Validator function
|
|
134
|
+
*/
|
|
135
|
+
function createFlatInputValidator(action) {
|
|
136
|
+
const resolver = new input_resolver_1.InputResolver();
|
|
137
|
+
const locationMap = resolver.buildLocationMap(action);
|
|
138
|
+
return (input) => {
|
|
139
|
+
for (const key of Object.keys(input)) {
|
|
140
|
+
const [explicitLocation, actualKey] = resolver.parseKey(key);
|
|
141
|
+
if (explicitLocation) {
|
|
142
|
+
// Check prefixed key exists in the specified location
|
|
143
|
+
const locationsForKey = locationMap.keyToLocations.get(actualKey);
|
|
144
|
+
if (!locationsForKey || !locationsForKey.includes(explicitLocation)) {
|
|
145
|
+
throw new input_resolver_1.InputResolutionError(`Key '${actualKey}' does not exist in '${explicitLocation}' for action '${action.tag}'`, key, 'unknown_key');
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
// Check non-prefixed key exists in schema
|
|
150
|
+
const locations = locationMap.keyToLocations.get(actualKey);
|
|
151
|
+
if (!locations || locations.length === 0) {
|
|
152
|
+
throw new input_resolver_1.InputResolutionError(`Unknown key '${actualKey}' for action '${action.tag}'`, actualKey, 'unknown_key');
|
|
153
|
+
}
|
|
154
|
+
if (locations.length > 1) {
|
|
155
|
+
throw new input_resolver_1.InputResolutionError(`Ambiguous key '${actualKey}' exists in: ${locations.join(', ')}. Use a prefix.`, actualKey, 'conflict');
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Get a user-friendly summary of valid input keys for an action
|
|
163
|
+
*
|
|
164
|
+
* @param action - Action schema
|
|
165
|
+
* @returns Human-readable summary string
|
|
166
|
+
*/
|
|
167
|
+
function getInputKeySummary(action) {
|
|
168
|
+
const resolver = new input_resolver_1.InputResolver();
|
|
169
|
+
const validKeys = resolver.getValidKeys(action);
|
|
170
|
+
const conflictingKeys = resolver.getConflictingKeys(action);
|
|
171
|
+
const lines = [];
|
|
172
|
+
lines.push(`Valid input keys for action '${action.tag}':`);
|
|
173
|
+
lines.push('');
|
|
174
|
+
for (const { key, locations } of validKeys) {
|
|
175
|
+
const isConflict = conflictingKeys.some((c) => c.key === key);
|
|
176
|
+
if (isConflict) {
|
|
177
|
+
lines.push(` ${key} (conflict - use prefix: ${locations.map((l) => `'${l}:${key}'`).join(' or ')})`);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
lines.push(` ${key} -> ${locations[0]}`);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return lines.join('\n');
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=input-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-helpers.js","sourceRoot":"","sources":["../../../src/apps/utils/input-helpers.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAoBH,8CAiCC;AAQD,0CAYC;AA6BD,gDAgDC;AAWD,4DAwCC;AAQD,gDAoBC;AAlOD,qDAAwG;AAGxG;;GAEG;AACH,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;AAEjF;;;;;;;;GAQG;AACH,SAAgB,iBAAiB,CAAC,KAA8B;IAC9D,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAEhC,yEAAyE;IACzE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,wCAAwC;IACxC,sDAAsD;IACtD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAC9B,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,4EAA4E;IAC5E,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QACzB,iFAAiF;QACjF,IAAI,GAAG,KAAK,OAAO,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YAC7D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,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