n8n 2.15.1 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/active-workflow-manager.d.ts +3 -1
- package/dist/active-workflow-manager.js +62 -16
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/auth/auth.service.d.ts +5 -2
- package/dist/auth/auth.service.js +11 -6
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/base-command.js +13 -1
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/start.d.ts +1 -0
- package/dist/commands/start.js +7 -0
- package/dist/commands/start.js.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +5 -1
- package/dist/constants.js.map +1 -1
- package/dist/controllers/ai.controller.d.ts +11 -2
- package/dist/controllers/ai.controller.js +56 -4
- package/dist/controllers/ai.controller.js.map +1 -1
- package/dist/controllers/auth.controller.js +1 -1
- package/dist/controllers/auth.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.js +5 -0
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/me.controller.d.ts +1 -0
- package/dist/controllers/me.controller.js +12 -0
- package/dist/controllers/me.controller.js.map +1 -1
- package/dist/controllers/project.controller.d.ts +3 -1
- package/dist/controllers/project.controller.js +9 -2
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +6 -4
- package/dist/controllers/role.controller.js +28 -8
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +4 -1
- package/dist/controllers/users.controller.js +8 -2
- package/dist/controllers/users.controller.js.map +1 -1
- package/dist/credentials/credentials.controller.js +4 -1
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +10 -6
- package/dist/credentials/credentials.service.js +98 -26
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials/validation.js +2 -2
- package/dist/credentials/validation.js.map +1 -1
- package/dist/credentials-helper.d.ts +3 -1
- package/dist/credentials-helper.js +21 -3
- package/dist/credentials-helper.js.map +1 -1
- package/dist/errors/http-error-classifier.d.ts +31 -0
- package/dist/errors/http-error-classifier.js +60 -0
- package/dist/errors/http-error-classifier.js.map +1 -0
- package/dist/errors/http-error-serializers.d.ts +18 -0
- package/dist/errors/http-error-serializers.js +64 -0
- package/dist/errors/http-error-serializers.js.map +1 -0
- package/dist/eventbus/event-message-classes/index.d.ts +2 -2
- package/dist/eventbus/event-message-classes/index.js +10 -0
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +114 -0
- package/dist/events/relays/log-streaming.event-relay.d.ts +10 -0
- package/dist/events/relays/log-streaming.event-relay.js +108 -2
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +5 -0
- package/dist/events/relays/telemetry.event-relay.js +58 -5
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.d.ts +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +24 -9
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/execution.service.js +2 -1
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/instance-settings-loader/instance-settings-loader.service.d.ts +9 -0
- package/dist/instance-settings-loader/instance-settings-loader.service.js +36 -0
- package/dist/instance-settings-loader/instance-settings-loader.service.js.map +1 -0
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.d.ts +10 -0
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.js +72 -0
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub-workflow.service.d.ts +1 -0
- package/dist/modules/chat-hub/chat-hub-workflow.service.js +18 -2
- package/dist/modules/chat-hub/chat-hub-workflow.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.types.d.ts +5 -0
- package/dist/modules/chat-hub/chat-hub.types.js +1 -0
- package/dist/modules/chat-hub/chat-hub.types.js.map +1 -1
- package/dist/modules/chat-hub/context-limits.js +10 -0
- package/dist/modules/chat-hub/context-limits.js.map +1 -1
- package/dist/modules/chat-hub/stream-capturer.js +3 -0
- package/dist/modules/chat-hub/stream-capturer.js.map +1 -1
- package/dist/modules/community-packages/community-node-types-utils.d.ts +2 -2
- package/dist/modules/community-packages/community-node-types-utils.js +4 -4
- package/dist/modules/community-packages/community-node-types-utils.js.map +1 -1
- package/dist/modules/community-packages/strapi-utils.d.ts +1 -1
- package/dist/modules/data-table/data-table-proxy.service.d.ts +44 -2
- package/dist/modules/data-table/data-table-proxy.service.js +86 -2
- package/dist/modules/data-table/data-table-proxy.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.d.ts +2 -2
- package/dist/modules/dynamic-credentials.ee/services/resolver-config-expression.service.js +10 -4
- package/dist/modules/dynamic-credentials.ee/services/resolver-config-expression.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.d.ts +5 -2
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.js +10 -3
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-connections.controller.ee.js +5 -5
- package/dist/modules/external-secrets.ee/secrets-providers-connections.controller.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.d.ts +6 -6
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.js +14 -9
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-project.controller.ee.js +3 -3
- package/dist/modules/external-secrets.ee/secrets-providers-project.controller.ee.js.map +1 -1
- package/dist/modules/instance-ai/compaction.service.d.ts +19 -0
- package/dist/modules/instance-ai/compaction.service.js +213 -0
- package/dist/modules/instance-ai/compaction.service.js.map +1 -0
- package/dist/modules/instance-ai/entities/index.d.ts +7 -0
- package/dist/modules/instance-ai/entities/index.js +18 -0
- package/dist/modules/instance-ai/entities/index.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-iteration-log.entity.d.ts +7 -0
- package/dist/modules/instance-ai/entities/instance-ai-iteration-log.entity.js +38 -0
- package/dist/modules/instance-ai/entities/instance-ai-iteration-log.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-message.entity.d.ts +9 -0
- package/dist/modules/instance-ai/entities/instance-ai-message.entity.js +47 -0
- package/dist/modules/instance-ai/entities/instance-ai-message.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.d.ts +33 -0
- package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.js +145 -0
- package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-resource.entity.d.ts +6 -0
- package/dist/modules/instance-ai/entities/instance-ai-resource.entity.js +33 -0
- package/dist/modules/instance-ai/entities/instance-ai-resource.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.d.ts +8 -0
- package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.js +43 -0
- package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-thread.entity.d.ts +7 -0
- package/dist/modules/instance-ai/entities/instance-ai-thread.entity.js +38 -0
- package/dist/modules/instance-ai/entities/instance-ai-thread.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.d.ts +8 -0
- package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.js +41 -0
- package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.js.map +1 -0
- package/dist/modules/instance-ai/eval/api-docs.d.ts +1 -0
- package/dist/modules/instance-ai/eval/api-docs.js +78 -0
- package/dist/modules/instance-ai/eval/api-docs.js.map +1 -0
- package/dist/modules/instance-ai/eval/execution.service.d.ts +25 -0
- package/dist/modules/instance-ai/eval/execution.service.js +291 -0
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -0
- package/dist/modules/instance-ai/eval/mock-handler.d.ts +9 -0
- package/dist/modules/instance-ai/eval/mock-handler.js +264 -0
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -0
- package/dist/modules/instance-ai/eval/node-config.d.ts +2 -0
- package/dist/modules/instance-ai/eval/node-config.js +15 -0
- package/dist/modules/instance-ai/eval/node-config.js.map +1 -0
- package/dist/modules/instance-ai/eval/pin-data-generator.d.ts +12 -0
- package/dist/modules/instance-ai/eval/pin-data-generator.js +301 -0
- package/dist/modules/instance-ai/eval/pin-data-generator.js.map +1 -0
- package/dist/modules/instance-ai/eval/request-sanitizer.d.ts +3 -0
- package/dist/modules/instance-ai/eval/request-sanitizer.js +50 -0
- package/dist/modules/instance-ai/eval/request-sanitizer.js.map +1 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +16 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js +217 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -0
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.d.ts +19 -0
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js +98 -0
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -0
- package/dist/modules/instance-ai/filesystem/index.d.ts +3 -0
- package/dist/modules/instance-ai/filesystem/index.js +8 -0
- package/dist/modules/instance-ai/filesystem/index.js.map +1 -0
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.d.ts +29 -0
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.js +137 -0
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.js.map +1 -0
- package/dist/modules/instance-ai/filesystem/local-gateway.d.ts +35 -0
- package/dist/modules/instance-ai/filesystem/local-gateway.js +99 -0
- package/dist/modules/instance-ai/filesystem/local-gateway.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +40 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.js +245 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +59 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js +450 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +91 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +1885 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +101 -0
- package/dist/modules/instance-ai/instance-ai.controller.js +670 -0
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.module.d.ts +12 -0
- package/dist/modules/instance-ai/instance-ai.module.js +118 -0
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.service.d.ts +133 -0
- package/dist/modules/instance-ai/instance-ai.service.js +1802 -0
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -0
- package/dist/modules/instance-ai/internal-messages.d.ts +2 -0
- package/dist/modules/instance-ai/internal-messages.js +11 -0
- package/dist/modules/instance-ai/internal-messages.js.map +1 -0
- package/dist/modules/instance-ai/message-parser.d.ts +12 -0
- package/dist/modules/instance-ai/message-parser.js +171 -0
- package/dist/modules/instance-ai/message-parser.js.map +1 -0
- package/dist/modules/instance-ai/node-definition-resolver.d.ts +19 -0
- package/dist/modules/instance-ai/node-definition-resolver.js +290 -0
- package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -0
- package/dist/modules/instance-ai/proxy-token-manager.d.ts +15 -0
- package/dist/modules/instance-ai/proxy-token-manager.js +64 -0
- package/dist/modules/instance-ai/proxy-token-manager.js.map +1 -0
- package/dist/modules/instance-ai/repositories/index.d.ts +7 -0
- package/dist/modules/instance-ai/repositories/index.js +18 -0
- package/dist/modules/instance-ai/repositories/index.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-iteration-log.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-iteration-log.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-iteration-log.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-message.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-message.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-message.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-resource.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-resource.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-resource.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-thread.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-thread.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-thread.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.js.map +1 -0
- package/dist/modules/instance-ai/snapshot-pruning.service.d.ts +17 -0
- package/dist/modules/instance-ai/snapshot-pruning.service.js +89 -0
- package/dist/modules/instance-ai/snapshot-pruning.service.js.map +1 -0
- package/dist/modules/instance-ai/storage/db-iteration-log-storage.d.ts +9 -0
- package/dist/modules/instance-ai/storage/db-iteration-log-storage.js +45 -0
- package/dist/modules/instance-ai/storage/db-iteration-log-storage.js.map +1 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +14 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js +99 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -0
- package/dist/modules/instance-ai/storage/index.d.ts +5 -0
- package/dist/modules/instance-ai/storage/index.js +14 -0
- package/dist/modules/instance-ai/storage/index.js.map +1 -0
- package/dist/modules/instance-ai/storage/typeorm-composite-store.d.ts +9 -0
- package/dist/modules/instance-ai/storage/typeorm-composite-store.js +33 -0
- package/dist/modules/instance-ai/storage/typeorm-composite-store.js.map +1 -0
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.d.ts +96 -0
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.js +853 -0
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.js.map +1 -0
- package/dist/modules/instance-ai/storage/typeorm-workflows-storage.d.ts +44 -0
- package/dist/modules/instance-ai/storage/typeorm-workflows-storage.js +156 -0
- package/dist/modules/instance-ai/storage/typeorm-workflows-storage.js.map +1 -0
- package/dist/modules/instance-ai/web-research/brave-search.d.ts +10 -0
- package/dist/modules/instance-ai/web-research/brave-search.js +44 -0
- package/dist/modules/instance-ai/web-research/brave-search.js.map +1 -0
- package/dist/modules/instance-ai/web-research/cache.d.ts +13 -0
- package/dist/modules/instance-ai/web-research/cache.js +43 -0
- package/dist/modules/instance-ai/web-research/cache.js.map +1 -0
- package/dist/modules/instance-ai/web-research/fetch-and-extract.d.ts +8 -0
- package/dist/modules/instance-ai/web-research/fetch-and-extract.js +231 -0
- package/dist/modules/instance-ai/web-research/fetch-and-extract.js.map +1 -0
- package/dist/modules/instance-ai/web-research/index.d.ts +7 -0
- package/dist/modules/instance-ai/web-research/index.js +16 -0
- package/dist/modules/instance-ai/web-research/index.js.map +1 -0
- package/dist/modules/instance-ai/web-research/searxng-search.d.ts +6 -0
- package/dist/modules/instance-ai/web-research/searxng-search.js +39 -0
- package/dist/modules/instance-ai/web-research/searxng-search.js.map +1 -0
- package/dist/modules/instance-ai/web-research/ssrf-guard.d.ts +1 -0
- package/dist/modules/instance-ai/web-research/ssrf-guard.js +85 -0
- package/dist/modules/instance-ai/web-research/ssrf-guard.js.map +1 -0
- package/dist/modules/instance-ai/web-research/summarize-content.d.ts +4 -0
- package/dist/modules/instance-ai/web-research/summarize-content.js +34 -0
- package/dist/modules/instance-ai/web-research/summarize-content.js.map +1 -0
- package/dist/modules/instance-registry/instance-registry.types.d.ts +1 -0
- package/dist/modules/instance-registry/instance-registry.types.js +2 -1
- package/dist/modules/instance-registry/instance-registry.types.js.map +1 -1
- package/dist/modules/instance-registry/storage/instance-storage.interface.d.ts +1 -0
- package/dist/modules/instance-registry/storage/lua-scripts.d.ts +4 -0
- package/dist/modules/instance-registry/storage/lua-scripts.js +39 -0
- package/dist/modules/instance-registry/storage/lua-scripts.js.map +1 -0
- package/dist/modules/instance-registry/storage/memory-storage.d.ts +1 -0
- package/dist/modules/instance-registry/storage/memory-storage.js +1 -0
- package/dist/modules/instance-registry/storage/memory-storage.js.map +1 -1
- package/dist/modules/instance-registry/storage/redis-instance-storage.d.ts +25 -0
- package/dist/modules/instance-registry/storage/redis-instance-storage.js +185 -0
- package/dist/modules/instance-registry/storage/redis-instance-storage.js.map +1 -0
- package/dist/modules/instance-version-history/database/entities/instance-version-history.entity.d.ts +7 -0
- package/dist/modules/instance-version-history/database/entities/instance-version-history.entity.js +37 -0
- package/dist/modules/instance-version-history/database/entities/instance-version-history.entity.js.map +1 -0
- package/dist/modules/instance-version-history/database/repositories/instance-version-history.repository.d.ts +5 -0
- package/dist/modules/instance-version-history/database/repositories/instance-version-history.repository.js +26 -0
- package/dist/modules/instance-version-history/database/repositories/instance-version-history.repository.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.controller.d.ts +26 -0
- package/dist/modules/instance-version-history/instance-version-history.controller.js +85 -0
- package/dist/modules/instance-version-history/instance-version-history.controller.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.module.d.ts +5 -0
- package/dist/modules/instance-version-history/instance-version-history.module.js +60 -0
- package/dist/modules/instance-version-history/instance-version-history.module.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.service.d.ts +18 -0
- package/dist/modules/instance-version-history/instance-version-history.service.js +120 -0
- package/dist/modules/instance-version-history/instance-version-history.service.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.types.d.ts +12 -0
- package/dist/modules/instance-version-history/instance-version-history.types.js +27 -0
- package/dist/modules/instance-version-history/instance-version-history.types.js.map +1 -0
- package/dist/modules/log-streaming.ee/log-streaming.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +3 -1
- package/dist/modules/mcp/mcp.service.js +22 -3
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/add-data-table-column.tool.d.ts +13 -0
- package/dist/modules/mcp/tools/data-table/add-data-table-column.tool.js +69 -0
- package/dist/modules/mcp/tools/data-table/add-data-table-column.tool.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/add-data-table-rows.tool.d.ts +12 -0
- package/dist/modules/mcp/tools/data-table/add-data-table-rows.tool.js +77 -0
- package/dist/modules/mcp/tools/data-table/add-data-table-rows.tool.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/create-data-table.tool.d.ts +21 -0
- package/dist/modules/mcp/tools/data-table/create-data-table.tool.js +92 -0
- package/dist/modules/mcp/tools/data-table/create-data-table.tool.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/delete-data-table-column.tool.d.ts +12 -0
- package/dist/modules/mcp/tools/data-table/delete-data-table-column.tool.js +60 -0
- package/dist/modules/mcp/tools/data-table/delete-data-table-column.tool.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/index.d.ts +7 -0
- package/dist/modules/mcp/tools/data-table/index.js +18 -0
- package/dist/modules/mcp/tools/data-table/index.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/rename-data-table-column.tool.d.ts +13 -0
- package/dist/modules/mcp/tools/data-table/rename-data-table-column.tool.js +70 -0
- package/dist/modules/mcp/tools/data-table/rename-data-table-column.tool.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/rename-data-table.tool.d.ts +12 -0
- package/dist/modules/mcp/tools/data-table/rename-data-table.tool.js +60 -0
- package/dist/modules/mcp/tools/data-table/rename-data-table.tool.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/search-data-tables.tool.d.ts +12 -0
- package/dist/modules/mcp/tools/data-table/search-data-tables.tool.js +93 -0
- package/dist/modules/mcp/tools/data-table/search-data-tables.tool.js.map +1 -0
- package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +3 -4
- package/dist/modules/mcp/tools/execute-workflow.tool.js +10 -25
- package/dist/modules/mcp/tools/execute-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-execution.tool.js +4 -8
- package/dist/modules/mcp/tools/get-execution.tool.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +73 -2
- package/dist/modules/mcp/tools/schemas.js +41 -1
- package/dist/modules/mcp/tools/schemas.js.map +1 -1
- package/dist/modules/mcp/tools/search-folders.tool.js +2 -7
- package/dist/modules/mcp/tools/search-folders.tool.js.map +1 -1
- package/dist/modules/mcp/tools/search-projects.tool.js +2 -7
- package/dist/modules/mcp/tools/search-projects.tool.js.map +1 -1
- package/dist/modules/mcp/tools/search-workflows.tool.js +2 -7
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js +1 -37
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +1 -37
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +1 -37
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-builder-tools.service.d.ts +17 -0
- package/dist/modules/mcp/tools/workflow-builder/workflow-builder-tools.service.js +48 -0
- package/dist/modules/mcp/tools/workflow-builder/workflow-builder-tools.service.js.map +1 -1
- package/dist/modules/otel/handlers/node-end.handler.d.ts +8 -0
- package/dist/modules/otel/handlers/node-end.handler.js +71 -0
- package/dist/modules/otel/handlers/node-end.handler.js.map +1 -0
- package/dist/modules/otel/handlers/node-start.handler.d.ts +7 -0
- package/dist/modules/otel/handlers/node-start.handler.js +37 -0
- package/dist/modules/otel/handlers/node-start.handler.js.map +1 -0
- package/dist/modules/otel/handlers/workflow-end.handler.d.ts +1 -0
- package/dist/modules/otel/handlers/workflow-end.handler.js +8 -0
- package/dist/modules/otel/handlers/workflow-end.handler.js.map +1 -1
- package/dist/modules/otel/n8n-instrumentation.d.ts +8 -2
- package/dist/modules/otel/n8n-instrumentation.js +32 -1
- package/dist/modules/otel/n8n-instrumentation.js.map +1 -1
- package/dist/modules/otel/otel.config.d.ts +1 -0
- package/dist/modules/otel/otel.config.js +5 -0
- package/dist/modules/otel/otel.config.js.map +1 -1
- package/dist/modules/otel/otel.constants.d.ts +7 -0
- package/dist/modules/otel/otel.constants.js +7 -0
- package/dist/modules/otel/otel.constants.js.map +1 -1
- package/dist/modules/otel/otel.service.d.ts +1 -1
- package/dist/modules/otel/otel.service.js +20 -23
- package/dist/modules/otel/otel.service.js.map +1 -1
- package/dist/modules/otel/span-registry.d.ts +1 -0
- package/dist/modules/otel/span-registry.js +11 -0
- package/dist/modules/otel/span-registry.js.map +1 -1
- package/dist/modules/provisioning.ee/provisioning.service.ee.d.ts +17 -3
- package/dist/modules/provisioning.ee/provisioning.service.ee.js +195 -8
- package/dist/modules/provisioning.ee/provisioning.service.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.d.ts +7 -5
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.js +40 -10
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.d.ts +3 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js +1 -0
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-resolver-types.d.ts +14 -2
- package/dist/modules/provisioning.ee/role-resolver.service.ee.js +16 -6
- package/dist/modules/provisioning.ee/role-resolver.service.ee.js.map +1 -1
- package/dist/modules/redaction/executions/execution-redaction.service.d.ts +3 -2
- package/dist/modules/redaction/executions/execution-redaction.service.js +5 -1
- package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
- package/dist/modules/redaction/redaction.module.js +0 -6
- package/dist/modules/redaction/redaction.module.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-context.factory.d.ts +12 -0
- package/dist/modules/source-control.ee/source-control-context.factory.js +112 -0
- package/dist/modules/source-control.ee/source-control-context.factory.js.map +1 -0
- package/dist/modules/source-control.ee/source-control-export.service.ee.d.ts +2 -2
- package/dist/modules/source-control.ee/source-control-export.service.ee.js +9 -11
- package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-git.service.ee.js +3 -3
- package/dist/modules/source-control.ee/source-control-git.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +6 -4
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +29 -85
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-scoped.service.d.ts +4 -4
- package/dist/modules/source-control.ee/source-control-scoped.service.js +9 -40
- package/dist/modules/source-control.ee/source-control-scoped.service.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.d.ts +3 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js +99 -59
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +3 -1
- package/dist/modules/source-control.ee/source-control.service.ee.js +6 -4
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/types/source-control-context.d.ts +12 -4
- package/dist/modules/source-control.ee/types/source-control-context.js +32 -6
- package/dist/modules/source-control.ee/types/source-control-context.js.map +1 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.d.ts +4 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.js +39 -3
- package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
- package/dist/modules/sso-oidc/oidc.service.ee.d.ts +14 -2
- package/dist/modules/sso-oidc/oidc.service.ee.js +86 -8
- package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
- package/dist/modules/sso-oidc/views/oidc-test-result.d.ts +5 -0
- package/dist/modules/sso-oidc/views/oidc-test-result.js +58 -0
- package/dist/modules/sso-oidc/views/oidc-test-result.js.map +1 -0
- package/dist/modules/sso-saml/saml-helpers.d.ts +1 -0
- package/dist/modules/sso-saml/saml-helpers.js +2 -0
- package/dist/modules/sso-saml/saml-helpers.js.map +1 -1
- package/dist/modules/sso-saml/saml.controller.ee.d.ts +2 -3
- package/dist/modules/sso-saml/saml.controller.ee.js +3 -15
- package/dist/modules/sso-saml/saml.controller.ee.js.map +1 -1
- package/dist/modules/sso-saml/saml.service.ee.d.ts +4 -1
- package/dist/modules/sso-saml/saml.service.ee.js +13 -7
- package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
- package/dist/modules/token-exchange/controllers/embed-auth.controller.d.ts +19 -0
- package/dist/modules/token-exchange/controllers/embed-auth.controller.js +106 -0
- package/dist/modules/token-exchange/controllers/embed-auth.controller.js.map +1 -0
- package/dist/modules/token-exchange/controllers/token-exchange.controller.d.ts +9 -0
- package/dist/modules/token-exchange/controllers/token-exchange.controller.js +148 -0
- package/dist/modules/token-exchange/controllers/token-exchange.controller.js.map +1 -0
- package/dist/modules/token-exchange/database/entities/token-exchange-jti.entity.d.ts +5 -0
- package/dist/modules/token-exchange/database/entities/token-exchange-jti.entity.js +33 -0
- package/dist/modules/token-exchange/database/entities/token-exchange-jti.entity.js.map +1 -0
- package/dist/modules/token-exchange/database/entities/trusted-key-source.entity.d.ts +10 -0
- package/dist/modules/token-exchange/database/entities/trusted-key-source.entity.js +45 -0
- package/dist/modules/token-exchange/database/entities/trusted-key-source.entity.js.map +1 -0
- package/dist/modules/token-exchange/database/entities/trusted-key.entity.d.ts +9 -0
- package/dist/modules/token-exchange/database/entities/trusted-key.entity.js +43 -0
- package/dist/modules/token-exchange/database/entities/trusted-key.entity.js.map +1 -0
- package/dist/modules/token-exchange/database/repositories/token-exchange-jti.repository.d.ts +10 -0
- package/dist/modules/token-exchange/database/repositories/token-exchange-jti.repository.js +106 -0
- package/dist/modules/token-exchange/database/repositories/token-exchange-jti.repository.js.map +1 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key-source.repository.d.ts +5 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key-source.repository.js +26 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key-source.repository.js.map +1 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key.repository.d.ts +7 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key.repository.js +32 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key.repository.js.map +1 -0
- package/dist/modules/token-exchange/services/identity-resolution.service.d.ts +23 -0
- package/dist/modules/token-exchange/services/identity-resolution.service.js +195 -0
- package/dist/modules/token-exchange/services/identity-resolution.service.js.map +1 -0
- package/dist/modules/token-exchange/services/jti-cleanup.service.d.ts +18 -0
- package/dist/modules/token-exchange/services/jti-cleanup.service.js +90 -0
- package/dist/modules/token-exchange/services/jti-cleanup.service.js.map +1 -0
- package/dist/modules/token-exchange/services/jti-store.service.d.ts +6 -0
- package/dist/modules/token-exchange/services/jti-store.service.js +30 -0
- package/dist/modules/token-exchange/services/jti-store.service.js.map +1 -0
- package/dist/modules/token-exchange/services/jwks-resolver.d.ts +30 -0
- package/dist/modules/token-exchange/services/jwks-resolver.js +190 -0
- package/dist/modules/token-exchange/services/jwks-resolver.js.map +1 -0
- package/dist/modules/token-exchange/services/scoped-jwt.strategy.d.ts +12 -0
- package/dist/modules/token-exchange/services/scoped-jwt.strategy.js +92 -0
- package/dist/modules/token-exchange/services/scoped-jwt.strategy.js.map +1 -0
- package/dist/modules/token-exchange/services/token-exchange.service.d.ts +31 -0
- package/dist/modules/token-exchange/services/token-exchange.service.js +152 -0
- package/dist/modules/token-exchange/services/token-exchange.service.js.map +1 -0
- package/dist/modules/token-exchange/services/trusted-key.service.d.ts +47 -0
- package/dist/modules/token-exchange/services/trusted-key.service.js +465 -0
- package/dist/modules/token-exchange/services/trusted-key.service.js.map +1 -0
- package/dist/modules/token-exchange/token-exchange.config.d.ts +11 -0
- package/dist/modules/token-exchange/token-exchange.config.js +67 -0
- package/dist/modules/token-exchange/token-exchange.config.js.map +1 -0
- package/dist/modules/token-exchange/token-exchange.module.d.ts +5 -0
- package/dist/modules/token-exchange/token-exchange.module.js +79 -0
- package/dist/modules/token-exchange/token-exchange.module.js.map +1 -0
- package/dist/modules/token-exchange/token-exchange.schemas.d.ts +161 -0
- package/dist/modules/token-exchange/token-exchange.schemas.js +69 -0
- package/dist/modules/token-exchange/token-exchange.schemas.js.map +1 -0
- package/dist/modules/token-exchange/token-exchange.types.d.ts +53 -0
- package/dist/modules/token-exchange/token-exchange.types.js +5 -0
- package/dist/modules/token-exchange/token-exchange.types.js.map +1 -0
- package/dist/oauth/oauth.service.d.ts +1 -0
- package/dist/oauth/oauth.service.js +39 -2
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/public-api/index.js +37 -9
- package/dist/public-api/index.js.map +1 -1
- package/dist/public-api/types.d.ts +28 -1
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.d.ts +19 -0
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.js +71 -0
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.js.map +1 -0
- package/dist/public-api/v1/handlers/community-packages/community-packages.mapper.d.ts +27 -0
- package/dist/public-api/v1/handlers/community-packages/community-packages.mapper.js +35 -0
- package/dist/public-api/v1/handlers/community-packages/community-packages.mapper.js.map +1 -0
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js +7 -12
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.service.d.ts +3 -4
- package/dist/public-api/v1/handlers/credentials/credentials.service.js +21 -33
- package/dist/public-api/v1/handlers/credentials/credentials.service.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js +5 -5
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js +5 -5
- package/dist/public-api/v1/handlers/executions/executions.handler.js +56 -12
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/insights/insights.handler.d.ts +6 -0
- package/dist/public-api/v1/handlers/insights/insights.handler.js +57 -0
- package/dist/public-api/v1/handlers/insights/insights.handler.js.map +1 -0
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +14 -35
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.service.d.ts +6 -4
- package/dist/public-api/v1/handlers/workflows/workflows.service.js +7 -15
- package/dist/public-api/v1/handlers/workflows/workflows.service.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +530 -9
- package/dist/public-api/v1/public-api-error-response.d.ts +2 -0
- package/dist/public-api/v1/public-api-error-response.js +11 -0
- package/dist/public-api/v1/public-api-error-response.js.map +1 -0
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +1 -1
- package/dist/public-api/v1/shared/middlewares/global.middleware.js +19 -8
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
- package/dist/push/abstract.push.d.ts +1 -0
- package/dist/push/abstract.push.js +3 -0
- package/dist/push/abstract.push.js.map +1 -1
- package/dist/push/sse.push.js +5 -1
- package/dist/push/sse.push.js.map +1 -1
- package/dist/push/websocket.push.js +3 -1
- package/dist/push/websocket.push.js.map +1 -1
- package/dist/response-helper.js +6 -29
- package/dist/response-helper.js.map +1 -1
- package/dist/scaling/pubsub/subscriber.service.d.ts +2 -0
- package/dist/scaling/pubsub/subscriber.service.js +17 -8
- package/dist/scaling/pubsub/subscriber.service.js.map +1 -1
- package/dist/scaling/redis/redis.types.d.ts +1 -1
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.d.ts +2 -3
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.js +2 -5
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.js.map +1 -1
- package/dist/services/ai-gateway.service.d.ts +44 -0
- package/dist/services/ai-gateway.service.js +228 -0
- package/dist/services/ai-gateway.service.js.map +1 -0
- package/dist/services/ai-workflow-builder.service.d.ts +2 -2
- package/dist/services/ai-workflow-builder.service.js +4 -4
- package/dist/services/ai-workflow-builder.service.js.map +1 -1
- package/dist/services/ai.service.d.ts +4 -0
- package/dist/services/ai.service.js +20 -18
- package/dist/services/ai.service.js.map +1 -1
- package/dist/services/api-key-auth.strategy.d.ts +10 -0
- package/dist/services/api-key-auth.strategy.js +71 -0
- package/dist/services/api-key-auth.strategy.js.map +1 -0
- package/dist/services/auth-strategy.registry.d.ts +7 -0
- package/dist/services/auth-strategy.registry.js +32 -0
- package/dist/services/auth-strategy.registry.js.map +1 -0
- package/dist/services/auth-strategy.types.d.ts +4 -0
- package/dist/services/auth-strategy.types.js +3 -0
- package/dist/services/auth-strategy.types.js.map +1 -0
- package/dist/services/credentials-tester.service.js +2 -0
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/db-clock.service.d.ts +10 -0
- package/dist/services/db-clock.service.js +48 -0
- package/dist/services/db-clock.service.js.map +1 -0
- package/dist/services/frontend.service.js +9 -0
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/import.service.d.ts +1 -0
- package/dist/services/import.service.js +25 -2
- package/dist/services/import.service.js.map +1 -1
- package/dist/services/ownership.service.d.ts +4 -1
- package/dist/services/ownership.service.js +11 -5
- package/dist/services/ownership.service.js.map +1 -1
- package/dist/services/project.service.ee.js +1 -1
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.js +4 -4
- package/dist/services/pruning/workflow-history-compaction.service.js.map +1 -1
- package/dist/services/public-api-key.service.d.ts +6 -13
- package/dist/services/public-api-key.service.js +12 -80
- package/dist/services/public-api-key.service.js.map +1 -1
- package/dist/services/user.service.js +6 -0
- package/dist/services/user.service.js.map +1 -1
- package/dist/utils/validate-redirect-url.d.ts +1 -0
- package/dist/utils/validate-redirect-url.js +17 -0
- package/dist/utils/validate-redirect-url.js.map +1 -0
- package/dist/wait-tracker.d.ts +6 -2
- package/dist/wait-tracker.js +94 -63
- package/dist/wait-tracker.js.map +1 -1
- package/dist/webhooks/live-webhooks.js +24 -18
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/test-webhooks.js +96 -78
- package/dist/webhooks/test-webhooks.js.map +1 -1
- package/dist/webhooks/waiting-webhooks.js +27 -21
- package/dist/webhooks/waiting-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-form-data.js +6 -2
- package/dist/webhooks/webhook-form-data.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +21 -6
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-last-node-response-extractor.d.ts +5 -2
- package/dist/webhooks/webhook-last-node-response-extractor.js +5 -8
- package/dist/webhooks/webhook-last-node-response-extractor.js.map +1 -1
- package/dist/webhooks/webhook.service.js +19 -4
- package/dist/webhooks/webhook.service.js.map +1 -1
- package/dist/workflow-execute-additional-data.js +2 -0
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +1 -0
- package/dist/workflow-helpers.js +21 -0
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.js +25 -1
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +8 -5
- package/dist/workflows/workflow-creation.service.js +40 -17
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-execution.service.js +1 -1
- package/dist/workflows/workflow-execution.service.js.map +1 -1
- package/dist/workflows/workflow-history/workflow-history.service.js +1 -0
- package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.js +3 -3
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.ee.js +4 -1
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +16 -2
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +4 -4
- package/package.json +32 -30
|
@@ -10,11 +10,11 @@ function getUrl(environment) {
|
|
|
10
10
|
? N8N_VETTED_NODE_TYPES_PRODUCTION_URL
|
|
11
11
|
: N8N_VETTED_NODE_TYPES_STAGING_URL;
|
|
12
12
|
}
|
|
13
|
-
async function getCommunityNodeTypes(environment, qs = {},
|
|
13
|
+
async function getCommunityNodeTypes(environment, qs = {}, maxAiNodeSdk) {
|
|
14
14
|
const url = getUrl(environment);
|
|
15
15
|
const params = {
|
|
16
16
|
...qs,
|
|
17
|
-
|
|
17
|
+
maxAiNodeSdk,
|
|
18
18
|
pagination: {
|
|
19
19
|
page: 1,
|
|
20
20
|
pageSize: 25,
|
|
@@ -22,11 +22,11 @@ async function getCommunityNodeTypes(environment, qs = {}, maxAiNodeSdkVersion)
|
|
|
22
22
|
};
|
|
23
23
|
return await (0, strapi_utils_1.paginatedRequest)(url, params);
|
|
24
24
|
}
|
|
25
|
-
async function getCommunityNodesMetadata(environment,
|
|
25
|
+
async function getCommunityNodesMetadata(environment, maxAiNodeSdk) {
|
|
26
26
|
const url = getUrl(environment);
|
|
27
27
|
const params = {
|
|
28
28
|
fields: ['npmVersion', 'name', 'updatedAt'],
|
|
29
|
-
|
|
29
|
+
maxAiNodeSdk,
|
|
30
30
|
pagination: {
|
|
31
31
|
page: 1,
|
|
32
32
|
pageSize: 500,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"community-node-types-utils.js","sourceRoot":"","sources":["../../../src/modules/community-packages/community-node-types-utils.ts"],"names":[],"mappings":";;AAuCA,sDAeC;AAED,8DAiBC;AAvED,iDAAsE;AA4BtE,MAAM,iCAAiC,GAAG,gDAAgD,CAAC;AAC3F,MAAM,oCAAoC,GAAG,wCAAwC,CAAC;AAEtF,SAAS,MAAM,CAAC,WAAqC;IACpD,OAAO,WAAW,KAAK,YAAY;QAClC,CAAC,CAAC,oCAAoC;QACtC,CAAC,CAAC,iCAAiC,CAAC;AACtC,CAAC;AAEM,KAAK,UAAU,qBAAqB,CAC1C,WAAqC,EACrC,KAAqD,EAAE,EACvD,
|
|
1
|
+
{"version":3,"file":"community-node-types-utils.js","sourceRoot":"","sources":["../../../src/modules/community-packages/community-node-types-utils.ts"],"names":[],"mappings":";;AAuCA,sDAeC;AAED,8DAiBC;AAvED,iDAAsE;AA4BtE,MAAM,iCAAiC,GAAG,gDAAgD,CAAC;AAC3F,MAAM,oCAAoC,GAAG,wCAAwC,CAAC;AAEtF,SAAS,MAAM,CAAC,WAAqC;IACpD,OAAO,WAAW,KAAK,YAAY;QAClC,CAAC,CAAC,oCAAoC;QACtC,CAAC,CAAC,iCAAiC,CAAC;AACtC,CAAC;AAEM,KAAK,UAAU,qBAAqB,CAC1C,WAAqC,EACrC,KAAqD,EAAE,EACvD,YAAoB;IAEpB,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;IAChC,MAAM,MAAM,GAAG;QACd,GAAG,EAAE;QACL,YAAY;QACZ,UAAU,EAAE;YACX,IAAI,EAAE,CAAC;YACP,QAAQ,EAAE,EAAE;SACZ;KACD,CAAC;IACF,OAAO,MAAM,IAAA,+BAAgB,EAA0B,GAAG,EAAE,MAAM,CAAC,CAAC;AACrE,CAAC;AAEM,KAAK,UAAU,yBAAyB,CAC9C,WAAqC,EACrC,YAAoB;IAEpB,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;IAChC,MAAM,MAAM,GAAG;QACd,MAAM,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,CAAC;QAC3C,YAAY;QACZ,UAAU,EAAE;YACX,IAAI,EAAE,CAAC;YACP,QAAQ,EAAE,GAAG;SACb;KACD,CAAC;IAEF,OAAO,MAAM,IAAA,+BAAgB,EAAyB,GAAG,EAAE,MAAM,EAAE;QAClE,YAAY,EAAE,IAAI;KAClB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -19,7 +19,7 @@ interface PaginationRequestParams {
|
|
|
19
19
|
page: number;
|
|
20
20
|
pageSize: number;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
maxAiNodeSdk?: number;
|
|
23
23
|
}
|
|
24
24
|
export declare function paginatedRequest<T>(url: string, params: PaginationRequestParams, options?: PaginationRequestOptions): Promise<T[]>;
|
|
25
25
|
export declare function buildStrapiUpdateQuery(ids: number[]): IDataObject;
|
|
@@ -1,20 +1,62 @@
|
|
|
1
|
+
import type { ListDataTableQueryDto } from '@n8n/api-types';
|
|
1
2
|
import { Logger } from '@n8n/backend-common';
|
|
2
|
-
import {
|
|
3
|
+
import type { User } from '@n8n/db';
|
|
4
|
+
import { AddDataTableColumnOptions, CreateDataTableOptions, DataTableProxyProvider, DataTableRows, DeleteDataTableRowsOptions, IDataTableProjectAggregateService, IDataTableProjectService, DataTableInsertRowsReturnType, INode, ListDataTableRowsOptions, UpdateDataTableOptions, UpdateDataTableRowOptions, Workflow } from 'n8n-workflow';
|
|
5
|
+
import { DataTableAggregateService } from './data-table-aggregate.service';
|
|
3
6
|
import { DataTableService } from './data-table.service';
|
|
7
|
+
import { SourceControlPreferencesService } from '../../modules/source-control.ee/source-control-preferences.service.ee';
|
|
4
8
|
import { OwnershipService } from '../../services/ownership.service';
|
|
5
9
|
declare const ALLOWED_NODES: readonly ["n8n-nodes-base.dataTable", "n8n-nodes-base.dataTableTool", "n8n-nodes-base.evaluationTrigger", "n8n-nodes-base.evaluation"];
|
|
6
10
|
type AllowedNode = (typeof ALLOWED_NODES)[number];
|
|
7
11
|
export declare function isAllowedNode(s: string): s is AllowedNode;
|
|
8
12
|
export declare class DataTableProxyService implements DataTableProxyProvider {
|
|
9
13
|
private readonly dataTableService;
|
|
14
|
+
private readonly dataTableAggregateService;
|
|
10
15
|
private readonly ownershipService;
|
|
11
16
|
private readonly logger;
|
|
12
|
-
|
|
17
|
+
private readonly sourceControlPreferencesService;
|
|
18
|
+
constructor(dataTableService: DataTableService, dataTableAggregateService: DataTableAggregateService, ownershipService: OwnershipService, logger: Logger, sourceControlPreferencesService: SourceControlPreferencesService);
|
|
19
|
+
private checkInstanceWriteAccess;
|
|
13
20
|
private validateRequest;
|
|
14
21
|
private getProjectId;
|
|
15
22
|
getDataTableAggregateProxy(workflow: Workflow, node: INode, projectId?: string): Promise<IDataTableProjectAggregateService>;
|
|
16
23
|
getDataTableProxy(workflow: Workflow, node: INode, dataTableId: string, projectId?: string): Promise<IDataTableProjectService>;
|
|
24
|
+
private requireScope;
|
|
25
|
+
makeDataTableOperationsForUser(user: User): {
|
|
26
|
+
getManyAndCount(options: ListDataTableQueryDto): Promise<{
|
|
27
|
+
count: number;
|
|
28
|
+
data: import("./data-table.entity").DataTable[];
|
|
29
|
+
}>;
|
|
30
|
+
createDataTable(projectId: string, options: CreateDataTableOptions): Promise<import("./data-table.entity").DataTable>;
|
|
31
|
+
getColumns(dataTableId: string, projectId: string): Promise<import("./data-table-column.entity").DataTableColumn[]>;
|
|
32
|
+
updateDataTable(dataTableId: string, projectId: string, options: UpdateDataTableOptions): Promise<boolean>;
|
|
33
|
+
addColumn(dataTableId: string, projectId: string, options: AddDataTableColumnOptions): Promise<import("./data-table-column.entity").DataTableColumn>;
|
|
34
|
+
deleteColumn(dataTableId: string, projectId: string, columnId: string): Promise<boolean>;
|
|
35
|
+
renameColumn(dataTableId: string, projectId: string, columnId: string, options: {
|
|
36
|
+
name: string;
|
|
37
|
+
}): Promise<{
|
|
38
|
+
name: string;
|
|
39
|
+
dataTableId: string;
|
|
40
|
+
type: "string" | "number" | "boolean" | "date";
|
|
41
|
+
index: number;
|
|
42
|
+
dataTable: import("./data-table.entity").DataTable;
|
|
43
|
+
id: string;
|
|
44
|
+
generateId(): void;
|
|
45
|
+
createdAt: Date;
|
|
46
|
+
updatedAt: Date;
|
|
47
|
+
setUpdateDate(): void;
|
|
48
|
+
}>;
|
|
49
|
+
deleteDataTable(dataTableId: string, projectId: string): Promise<boolean>;
|
|
50
|
+
getManyRowsAndCount(dataTableId: string, projectId: string, options: Partial<ListDataTableRowsOptions>): Promise<{
|
|
51
|
+
count: number;
|
|
52
|
+
data: import("n8n-workflow").DataTableRowsReturn;
|
|
53
|
+
}>;
|
|
54
|
+
insertRows<T extends DataTableInsertRowsReturnType>(dataTableId: string, projectId: string, rows: DataTableRows, returnType: T): Promise<import("n8n-workflow").DataTableInsertRowsResult<T>>;
|
|
55
|
+
updateRows(dataTableId: string, projectId: string, options: UpdateDataTableRowOptions): Promise<import("n8n-workflow").DataTableRowReturn[] | import("n8n-workflow").DataTableRowReturnWithState[]>;
|
|
56
|
+
deleteRows(dataTableId: string, projectId: string, options: DeleteDataTableRowsOptions): Promise<import("n8n-workflow").DataTableRowReturn[]>;
|
|
57
|
+
};
|
|
17
58
|
private makeAggregateOperations;
|
|
18
59
|
private makeDataTableOperations;
|
|
19
60
|
}
|
|
61
|
+
export type DataTableUserOperations = ReturnType<DataTableProxyService['makeDataTableOperationsForUser']>;
|
|
20
62
|
export {};
|
|
@@ -13,7 +13,11 @@ exports.DataTableProxyService = void 0;
|
|
|
13
13
|
exports.isAllowedNode = isAllowedNode;
|
|
14
14
|
const backend_common_1 = require("@n8n/backend-common");
|
|
15
15
|
const di_1 = require("@n8n/di");
|
|
16
|
+
const data_table_aggregate_service_1 = require("./data-table-aggregate.service");
|
|
16
17
|
const data_table_service_1 = require("./data-table.service");
|
|
18
|
+
const forbidden_error_1 = require("../../errors/response-errors/forbidden.error");
|
|
19
|
+
const check_access_1 = require("../../permissions.ee/check-access");
|
|
20
|
+
const source_control_preferences_service_ee_1 = require("../../modules/source-control.ee/source-control-preferences.service.ee");
|
|
17
21
|
const ownership_service_1 = require("../../services/ownership.service");
|
|
18
22
|
const ALLOWED_NODES = [
|
|
19
23
|
'n8n-nodes-base.dataTable',
|
|
@@ -25,12 +29,20 @@ function isAllowedNode(s) {
|
|
|
25
29
|
return ALLOWED_NODES.includes(s);
|
|
26
30
|
}
|
|
27
31
|
let DataTableProxyService = class DataTableProxyService {
|
|
28
|
-
constructor(dataTableService, ownershipService, logger) {
|
|
32
|
+
constructor(dataTableService, dataTableAggregateService, ownershipService, logger, sourceControlPreferencesService) {
|
|
29
33
|
this.dataTableService = dataTableService;
|
|
34
|
+
this.dataTableAggregateService = dataTableAggregateService;
|
|
30
35
|
this.ownershipService = ownershipService;
|
|
31
36
|
this.logger = logger;
|
|
37
|
+
this.sourceControlPreferencesService = sourceControlPreferencesService;
|
|
32
38
|
this.logger = this.logger.scoped('data-table');
|
|
33
39
|
}
|
|
40
|
+
checkInstanceWriteAccess() {
|
|
41
|
+
const preferences = this.sourceControlPreferencesService.getPreferences();
|
|
42
|
+
if (preferences.branchReadOnly) {
|
|
43
|
+
throw new forbidden_error_1.ForbiddenError('Cannot modify data tables on a protected instance. This instance is in read-only mode.');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
34
46
|
validateRequest(node) {
|
|
35
47
|
if (!isAllowedNode(node.type)) {
|
|
36
48
|
throw new Error('This proxy is only available for Data table nodes');
|
|
@@ -50,6 +62,76 @@ let DataTableProxyService = class DataTableProxyService {
|
|
|
50
62
|
projectId = projectId ?? (await this.getProjectId(workflow));
|
|
51
63
|
return this.makeDataTableOperations(projectId, dataTableId);
|
|
52
64
|
}
|
|
65
|
+
async requireScope(user, scope, projectId) {
|
|
66
|
+
const hasScope = await (0, check_access_1.userHasScopes)(user, [scope], false, { projectId });
|
|
67
|
+
if (!hasScope) {
|
|
68
|
+
throw new Error(`User does not have '${scope}' access on project '${projectId}'`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
makeDataTableOperationsForUser(user) {
|
|
72
|
+
const dataTableService = this.dataTableService;
|
|
73
|
+
const dataTableAggregateService = this.dataTableAggregateService;
|
|
74
|
+
const requireScope = async (scope, projectId) => await this.requireScope(user, scope, projectId);
|
|
75
|
+
const checkInstanceWriteAccess = () => this.checkInstanceWriteAccess();
|
|
76
|
+
return {
|
|
77
|
+
async getManyAndCount(options) {
|
|
78
|
+
return await dataTableAggregateService.getManyAndCount(user, options);
|
|
79
|
+
},
|
|
80
|
+
async createDataTable(projectId, options) {
|
|
81
|
+
checkInstanceWriteAccess();
|
|
82
|
+
await requireScope('dataTable:create', projectId);
|
|
83
|
+
return await dataTableService.createDataTable(projectId, options);
|
|
84
|
+
},
|
|
85
|
+
async getColumns(dataTableId, projectId) {
|
|
86
|
+
await requireScope('dataTable:read', projectId);
|
|
87
|
+
return await dataTableService.getColumns(dataTableId, projectId);
|
|
88
|
+
},
|
|
89
|
+
async updateDataTable(dataTableId, projectId, options) {
|
|
90
|
+
checkInstanceWriteAccess();
|
|
91
|
+
await requireScope('dataTable:update', projectId);
|
|
92
|
+
return await dataTableService.updateDataTable(dataTableId, projectId, options);
|
|
93
|
+
},
|
|
94
|
+
async addColumn(dataTableId, projectId, options) {
|
|
95
|
+
checkInstanceWriteAccess();
|
|
96
|
+
await requireScope('dataTable:update', projectId);
|
|
97
|
+
return await dataTableService.addColumn(dataTableId, projectId, options);
|
|
98
|
+
},
|
|
99
|
+
async deleteColumn(dataTableId, projectId, columnId) {
|
|
100
|
+
checkInstanceWriteAccess();
|
|
101
|
+
await requireScope('dataTable:update', projectId);
|
|
102
|
+
return await dataTableService.deleteColumn(dataTableId, projectId, columnId);
|
|
103
|
+
},
|
|
104
|
+
async renameColumn(dataTableId, projectId, columnId, options) {
|
|
105
|
+
checkInstanceWriteAccess();
|
|
106
|
+
await requireScope('dataTable:update', projectId);
|
|
107
|
+
return await dataTableService.renameColumn(dataTableId, projectId, columnId, options);
|
|
108
|
+
},
|
|
109
|
+
async deleteDataTable(dataTableId, projectId) {
|
|
110
|
+
checkInstanceWriteAccess();
|
|
111
|
+
await requireScope('dataTable:delete', projectId);
|
|
112
|
+
return await dataTableService.deleteDataTable(dataTableId, projectId);
|
|
113
|
+
},
|
|
114
|
+
async getManyRowsAndCount(dataTableId, projectId, options) {
|
|
115
|
+
await requireScope('dataTable:readRow', projectId);
|
|
116
|
+
return await dataTableService.getManyRowsAndCount(dataTableId, projectId, options);
|
|
117
|
+
},
|
|
118
|
+
async insertRows(dataTableId, projectId, rows, returnType) {
|
|
119
|
+
checkInstanceWriteAccess();
|
|
120
|
+
await requireScope('dataTable:writeRow', projectId);
|
|
121
|
+
return await dataTableService.insertRows(dataTableId, projectId, rows, returnType);
|
|
122
|
+
},
|
|
123
|
+
async updateRows(dataTableId, projectId, options) {
|
|
124
|
+
checkInstanceWriteAccess();
|
|
125
|
+
await requireScope('dataTable:writeRow', projectId);
|
|
126
|
+
return await dataTableService.updateRows(dataTableId, projectId, { filter: options.filter, data: options.data }, true, options.dryRun);
|
|
127
|
+
},
|
|
128
|
+
async deleteRows(dataTableId, projectId, options) {
|
|
129
|
+
checkInstanceWriteAccess();
|
|
130
|
+
await requireScope('dataTable:writeRow', projectId);
|
|
131
|
+
return await dataTableService.deleteRows(dataTableId, projectId, { filter: options.filter }, true, options.dryRun);
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
}
|
|
53
135
|
makeAggregateOperations(projectId) {
|
|
54
136
|
const dataTableService = this.dataTableService;
|
|
55
137
|
return {
|
|
@@ -114,7 +196,9 @@ exports.DataTableProxyService = DataTableProxyService;
|
|
|
114
196
|
exports.DataTableProxyService = DataTableProxyService = __decorate([
|
|
115
197
|
(0, di_1.Service)(),
|
|
116
198
|
__metadata("design:paramtypes", [data_table_service_1.DataTableService,
|
|
199
|
+
data_table_aggregate_service_1.DataTableAggregateService,
|
|
117
200
|
ownership_service_1.OwnershipService,
|
|
118
|
-
backend_common_1.Logger
|
|
201
|
+
backend_common_1.Logger,
|
|
202
|
+
source_control_preferences_service_ee_1.SourceControlPreferencesService])
|
|
119
203
|
], DataTableProxyService);
|
|
120
204
|
//# sourceMappingURL=data-table-proxy.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table-proxy.service.js","sourceRoot":"","sources":["../../../src/modules/data-table/data-table-proxy.service.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"data-table-proxy.service.js","sourceRoot":"","sources":["../../../src/modules/data-table/data-table-proxy.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AA2CA,sCAEC;AA5CD,wDAA6C;AAE7C,gCAAkC;AAuBlC,iFAA2E;AAC3E,6DAAwD;AAExD,8EAA0E;AAC1E,gEAA8D;AAC9D,6HAAoH;AACpH,oEAAgE;AAEhE,MAAM,aAAa,GAAG;IACrB,0BAA0B;IAC1B,8BAA8B;IAC9B,kCAAkC;IAClC,2BAA2B;CAClB,CAAC;AAIX,SAAgB,aAAa,CAAC,CAAS;IACtC,OAAO,aAAa,CAAC,QAAQ,CAAC,CAAgB,CAAC,CAAC;AACjD,CAAC;AAGM,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACjC,YACkB,gBAAkC,EAClC,yBAAoD,EACpD,gBAAkC,EAClC,MAAc,EACd,+BAAgE;QAJhE,qBAAgB,GAAhB,gBAAgB,CA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M,gBAAgB,CAAC,UAAU,CACvC,WAAW,EACX,SAAS,EACT,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,EAC1B,IAAI,EACJ,OAAO,CAAC,MAAM,CACd,CAAC;YACH,CAAC;SACD,CAAC;IACH,CAAC;CACD,CAAA;AAzRY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,YAAO,GAAE;qCAG2B,qCAAgB;QACP,wDAAyB;QAClC,oCAAgB;QAC1B,uBAAM;QACmB,uEAA+B;GANtE,qBAAqB,CAyRjC"}
|
|
@@ -10,15 +10,15 @@ export declare const OAuth2IntrospectionOptionsSchema: z.ZodObject<{
|
|
|
10
10
|
metadataUri: z.ZodString;
|
|
11
11
|
subjectClaim: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
validation: "oauth2-introspection";
|
|
13
14
|
clientId: string;
|
|
14
15
|
clientSecret: string;
|
|
15
|
-
validation: "oauth2-introspection";
|
|
16
16
|
metadataUri: string;
|
|
17
17
|
subjectClaim: string;
|
|
18
18
|
}, {
|
|
19
|
+
validation: "oauth2-introspection";
|
|
19
20
|
clientId: string;
|
|
20
21
|
clientSecret: string;
|
|
21
|
-
validation: "oauth2-introspection";
|
|
22
22
|
metadataUri: string;
|
|
23
23
|
subjectClaim?: string | undefined;
|
|
24
24
|
}>;
|
|
@@ -31,10 +31,16 @@ let ResolverConfigExpressionService = class ResolverConfigExpressionService {
|
|
|
31
31
|
});
|
|
32
32
|
const additionalData = await (0, workflow_execute_additional_data_1.getBase)();
|
|
33
33
|
const additionalKeys = (0, n8n_core_1.getNonWorkflowAdditionalKeys)(additionalData);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
await workflow.expression.acquireIsolate();
|
|
35
|
+
try {
|
|
36
|
+
return workflow.expression.getComplexParameterValue({
|
|
37
|
+
id: '1',
|
|
38
|
+
name: 'Mock Node',
|
|
39
|
+
}, config, 'manual', additionalKeys, undefined, undefined, config);
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
await workflow.expression.releaseIsolate();
|
|
43
|
+
}
|
|
38
44
|
}
|
|
39
45
|
};
|
|
40
46
|
exports.ResolverConfigExpressionService = ResolverConfigExpressionService;
|
package/dist/modules/dynamic-credentials.ee/services/resolver-config-expression.service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver-config-expression.service.js","sourceRoot":"","sources":["../../../../src/modules/dynamic-credentials.ee/services/resolver-config-expression.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAkC;AAClC,uCAAwD;AAExD,+CAA0D;AAE1D,6CAAyC;AACzC,yFAA6D;AAOtD,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAC3C,YAA6B,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IAAG,CAAC;IAOrD,KAAK,CAAC,OAAO,CAAC,MAAuC;QAEpD,IAAI,CAAC,IAAA,+BAAgB,EAAC,MAAM,CAAC,EAAE,CAAC;YAC/B,OAAO,MAAM,CAAC;QACf,CAAC;QAGD,MAAM,QAAQ,GAAG,IAAI,uBAAQ,CAAC;YAC7B,KAAK,EAAE,EAAE;YACT,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,IAAI,CAAC,SAAS;SACzB,CAAC,CAAC;QAEH,MAAM,cAAc,GAAG,MAAM,IAAA,0CAAO,GAAE,CAAC;QACvC,MAAM,cAAc,GAAG,IAAA,uCAA4B,EAAC,cAAc,CAAC,CAAC;QAEpE,OAAO,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAElD;
|
|
1
|
+
{"version":3,"file":"resolver-config-expression.service.js","sourceRoot":"","sources":["../../../../src/modules/dynamic-credentials.ee/services/resolver-config-expression.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAkC;AAClC,uCAAwD;AAExD,+CAA0D;AAE1D,6CAAyC;AACzC,yFAA6D;AAOtD,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAC3C,YAA6B,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IAAG,CAAC;IAOrD,KAAK,CAAC,OAAO,CAAC,MAAuC;QAEpD,IAAI,CAAC,IAAA,+BAAgB,EAAC,MAAM,CAAC,EAAE,CAAC;YAC/B,OAAO,MAAM,CAAC;QACf,CAAC;QAGD,MAAM,QAAQ,GAAG,IAAI,uBAAQ,CAAC;YAC7B,KAAK,EAAE,EAAE;YACT,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,IAAI,CAAC,SAAS;SACzB,CAAC,CAAC;QAEH,MAAM,cAAc,GAAG,MAAM,IAAA,0CAAO,GAAE,CAAC;QACvC,MAAM,cAAc,GAAG,IAAA,uCAA4B,EAAC,cAAc,CAAC,CAAC;QAEpE,MAAM,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;QAC3C,IAAI,CAAC;YACJ,OAAO,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAElD;gBACC,EAAE,EAAE,GAAG;gBACP,IAAI,EAAE,WAAW;aACR,EACV,MAAM,EACN,QAAQ,EACR,cAAc,EACd,SAAS,EACT,SAAS,EACT,MAAM,CACa,CAAC;QACtB,CAAC;gBAAS,CAAC;YACV,MAAM,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;QAC5C,CAAC;IACF,CAAC;CACD,CAAA;AA5CY,0EAA+B;0CAA/B,+BAA+B;IAD3C,IAAA,YAAO,GAAE;qCAE+B,sBAAS;GADrC,+BAA+B,CA4C3C"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { UpdateExternalSecretsSettingsDto } from '@n8n/api-types';
|
|
2
2
|
import { ModuleRegistry, Logger } from '@n8n/backend-common';
|
|
3
|
+
import type { AuthenticatedRequest } from '@n8n/db';
|
|
3
4
|
import type { NextFunction, Request, Response } from 'express';
|
|
5
|
+
import { EventService } from '../../events/event.service';
|
|
4
6
|
import { ExternalSecretsConfig } from './external-secrets.config';
|
|
5
7
|
import { ExternalSecretsSettingsService } from './external-secrets-settings.service.ee';
|
|
6
8
|
export declare class ExternalSecretsSettingsController {
|
|
@@ -8,9 +10,10 @@ export declare class ExternalSecretsSettingsController {
|
|
|
8
10
|
private readonly settingsService;
|
|
9
11
|
private readonly moduleRegistry;
|
|
10
12
|
private readonly logger;
|
|
11
|
-
|
|
13
|
+
private readonly eventService;
|
|
14
|
+
constructor(config: ExternalSecretsConfig, settingsService: ExternalSecretsSettingsService, moduleRegistry: ModuleRegistry, logger: Logger, eventService: EventService);
|
|
12
15
|
checkFeatureFlag(_req: Request, res: Response, next: NextFunction): void;
|
|
13
|
-
updateSettings(
|
|
16
|
+
updateSettings(req: AuthenticatedRequest, _res: Response, body: UpdateExternalSecretsSettingsDto): Promise<{
|
|
14
17
|
systemRolesEnabled: boolean;
|
|
15
18
|
}>;
|
|
16
19
|
}
|
|
@@ -17,15 +17,17 @@ const api_types_1 = require("@n8n/api-types");
|
|
|
17
17
|
const backend_common_1 = require("@n8n/backend-common");
|
|
18
18
|
const decorators_1 = require("@n8n/decorators");
|
|
19
19
|
const forbidden_error_1 = require("../../errors/response-errors/forbidden.error");
|
|
20
|
+
const event_service_1 = require("../../events/event.service");
|
|
20
21
|
const response_helper_1 = require("../../response-helper");
|
|
21
22
|
const external_secrets_config_1 = require("./external-secrets.config");
|
|
22
23
|
const external_secrets_settings_service_ee_1 = require("./external-secrets-settings.service.ee");
|
|
23
24
|
let ExternalSecretsSettingsController = class ExternalSecretsSettingsController {
|
|
24
|
-
constructor(config, settingsService, moduleRegistry, logger) {
|
|
25
|
+
constructor(config, settingsService, moduleRegistry, logger, eventService) {
|
|
25
26
|
this.config = config;
|
|
26
27
|
this.settingsService = settingsService;
|
|
27
28
|
this.moduleRegistry = moduleRegistry;
|
|
28
29
|
this.logger = logger;
|
|
30
|
+
this.eventService = eventService;
|
|
29
31
|
}
|
|
30
32
|
checkFeatureFlag(_req, res, next) {
|
|
31
33
|
if (!this.config.externalSecretsRoleBasedAccess) {
|
|
@@ -34,8 +36,12 @@ let ExternalSecretsSettingsController = class ExternalSecretsSettingsController
|
|
|
34
36
|
}
|
|
35
37
|
next();
|
|
36
38
|
}
|
|
37
|
-
async updateSettings(
|
|
39
|
+
async updateSettings(req, _res, body) {
|
|
38
40
|
await this.settingsService.setSystemRolesEnabled(body.systemRolesEnabled);
|
|
41
|
+
this.eventService.emit('external-secrets-system-roles-toggled', {
|
|
42
|
+
userId: req.user.id,
|
|
43
|
+
enabled: body.systemRolesEnabled,
|
|
44
|
+
});
|
|
39
45
|
try {
|
|
40
46
|
await this.moduleRegistry.refreshModuleSettings('external-secrets');
|
|
41
47
|
}
|
|
@@ -69,6 +75,7 @@ exports.ExternalSecretsSettingsController = ExternalSecretsSettingsController =
|
|
|
69
75
|
__metadata("design:paramtypes", [external_secrets_config_1.ExternalSecretsConfig,
|
|
70
76
|
external_secrets_settings_service_ee_1.ExternalSecretsSettingsService,
|
|
71
77
|
backend_common_1.ModuleRegistry,
|
|
72
|
-
backend_common_1.Logger
|
|
78
|
+
backend_common_1.Logger,
|
|
79
|
+
event_service_1.EventService])
|
|
73
80
|
], ExternalSecretsSettingsController);
|
|
74
81
|
//# sourceMappingURL=external-secrets-settings.controller.ee.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-secrets-settings.controller.ee.js","sourceRoot":"","sources":["../../../src/modules/external-secrets.ee/external-secrets-settings.controller.ee.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAAkE;AAClE,wDAA6D;AAC7D,gDAAsF;
|
|
1
|
+
{"version":3,"file":"external-secrets-settings.controller.ee.js","sourceRoot":"","sources":["../../../src/modules/external-secrets.ee/external-secrets-settings.controller.ee.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAAkE;AAClE,wDAA6D;AAC7D,gDAAsF;AAItF,8EAA0E;AA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D,CAAC,CAAC;QACJ,CAAC;QAED,OAAO;YACN,kBAAkB,EAAE,MAAM,IAAI,CAAC,eAAe,CAAC,oBAAoB,EAAE;SACrE,CAAC;IACH,CAAC;CACD,CAAA;AA/CY,8EAAiC;AAU7C;IADC,IAAA,uBAAU,GAAE;;;;yEAUZ;AAIK;IAFL,IAAA,iBAAI,EAAC,GAAG,CAAC;IACT,IAAA,wBAAW,EAAC,gCAAgC,CAAC;IAI5C,WAAA,iBAAI,CAAA;;qDAAO,4CAAgC;;uEAoB5C;4CA9CW,iCAAiC;IAD7C,IAAA,2BAAc,EAAC,4BAA4B,CAAC;qCAGlB,+CAAqB;QACZ,qEAA8B;QAC/B,+BAAc;QACtB,uBAAM;QACA,4BAAY;GANhC,iCAAiC,CA+C7C"}
|
|
@@ -52,17 +52,17 @@ let SecretProvidersConnectionsController = class SecretProvidersConnectionsContr
|
|
|
52
52
|
providerKey: body.providerKey,
|
|
53
53
|
type: body.type,
|
|
54
54
|
});
|
|
55
|
-
const savedConnection = await this.connectionsService.createConnection(body, req.user.id, 'secretsProviderConnection:user');
|
|
55
|
+
const savedConnection = await this.connectionsService.createConnection(body, req.user.id, 'secretsProviderConnection:user', req.user.role?.slug);
|
|
56
56
|
return this.connectionsService.toPublicConnection(savedConnection);
|
|
57
57
|
}
|
|
58
58
|
async updateConnection(req, _res, providerKey, body) {
|
|
59
59
|
this.logger.debug('Updating connection', { providerKey });
|
|
60
|
-
const connection = await this.connectionsService.updateGlobalConnection(providerKey, body, req.user.id);
|
|
60
|
+
const connection = await this.connectionsService.updateGlobalConnection(providerKey, body, req.user.id, req.user.role?.slug);
|
|
61
61
|
return this.connectionsService.toPublicConnection(connection);
|
|
62
62
|
}
|
|
63
63
|
async deleteConnection(req, res, providerKey) {
|
|
64
64
|
this.logger.debug('Deleting connection', { providerKey });
|
|
65
|
-
await this.connectionsService.deleteConnection(providerKey, req.user.id);
|
|
65
|
+
await this.connectionsService.deleteConnection(providerKey, req.user.id, req.user.role?.slug);
|
|
66
66
|
res.status(204).send();
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
@@ -78,11 +78,11 @@ let SecretProvidersConnectionsController = class SecretProvidersConnectionsContr
|
|
|
78
78
|
}
|
|
79
79
|
async testConnection(req, _res, providerKey) {
|
|
80
80
|
this.logger.debug('Testing provider connection', { providerKey });
|
|
81
|
-
return await this.connectionsService.testConnection(providerKey, req.user.id);
|
|
81
|
+
return await this.connectionsService.testConnection(providerKey, req.user.id, req.user.role?.slug);
|
|
82
82
|
}
|
|
83
83
|
async reloadConnectionSecrets(req, _res, providerKey) {
|
|
84
84
|
this.logger.debug('Reloading secrets for secret provider connection', { providerKey });
|
|
85
|
-
return await this.connectionsService.reloadConnectionSecrets(providerKey, req.user.id);
|
|
85
|
+
return await this.connectionsService.reloadConnectionSecrets(providerKey, req.user.id, req.user.role?.slug);
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
exports.SecretProvidersConnectionsController = SecretProvidersConnectionsController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets-providers-connections.controller.ee.js","sourceRoot":"","sources":["../../../src/modules/external-secrets.ee/secrets-providers-connections.controller.ee.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAOwB;AACxB,wDAA6C;AAE7C,gDAUyB;AAGzB,8EAA0E;AAC1E,uDAAsD;AAEtD,uEAAkE;AAClE,yGAAgG;AAGzF,IAAM,oCAAoC,GAA1C,MAAM,oCAAoC;IAChD,YACkB,MAA6B,EAC7B,MAAc,EACd,kBAAsD;QAFtD,WAAM,GAAN,MAAM,CAAuB;QAC7B,WAAM,GAAN,MAAM,CAAQ;QACd,uBAAkB,GAAlB,kBAAkB,CAAoC;QAEvE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IACtD,CAAC;IAGD,gBAAgB,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB;QAE/D,MAAM,sBAAsB,GAC3B,CAAC,GAAG,CAAC,MAAM,KAAK,MAAM,IAAI,GAAG,CAAC,MAAM,KAAK,OAAO,CAAC;YAChD,GAAG,CAAC,IAAI,CAAC,UAAuB,EAAE,MAAM,GAAG,CAAC,CAAC;QAC/C,IAAI,sBAAsB,EAAE,CAAC;YAC5B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,CAAC;gBAC7C,IAAI,CAAC,MAAM,CAAC,IAAI,CACf,0FAA0F,CAC1F,CAAC;gBACF,IAAA,mCAAiB,EAChB,GAAG,EACH,IAAI,gCAAc,CACjB,0FAA0F,CAC1F,CACD,CAAC;gBACF,OAAO;YACR,CAAC;YACD,IAAI,EAAE,CAAC;YACP,OAAO;QACR,CAAC;QAGD,IACC,CAAC,IAAI,CAAC,MAAM,CAAC,0BAA0B;YACvC,CAAC,IAAI,CAAC,MAAM,CAAC,kCAAkC,EAC9C,CAAC;YACF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAC;YACzF,IAAA,mCAAiB,EAChB,GAAG,EACH,IAAI,gCAAc,CAAC,sEAAsE,CAAC,CAC1F,CAAC;YACF,OAAO;QACR,CAAC;QAED,IAAI,EAAE,CAAC;IACR,CAAC;IAIK,AAAN,KAAK,CAAC,gBAAgB,CACrB,GAAyB,EACzB,IAAc,EACR,IAAwC;QAE9C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE;YAC5C,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;SACf,CAAC,CAAC;QACH,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CACrE,IAAI,EACJ,GAAG,CAAC,IAAI,CAAC,EAAE,EAIX,gCAAgC,
|
|
1
|
+
{"version":3,"file":"secrets-providers-connections.controller.ee.js","sourceRoot":"","sources":["../../../src/modules/external-secrets.ee/secrets-providers-connections.controller.ee.ts"],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AA,kBAAK,EAAC,aAAa,CAAC,CAAA;;;;mFAQrB;+CAxJW,oCAAoC;IADhD,IAAA,2BAAc,EAAC,+BAA+B,CAAC;qCAGrB,+CAAqB;QACrB,uBAAM;QACM,6EAAkC;GAJ5D,oCAAoC,CAyJhD"}
|
|
@@ -20,21 +20,21 @@ export declare class SecretsProvidersConnectionsService {
|
|
|
20
20
|
private readonly redactionService;
|
|
21
21
|
private readonly eventService;
|
|
22
22
|
constructor(logger: Logger, repository: SecretsProviderConnectionRepository, projectAccessRepository: ProjectSecretsProviderAccessRepository, credentialDependencyService: CredentialDependencyService, providerRegistry: ExternalSecretsProviderRegistry, cipher: Cipher, externalSecretsManager: ExternalSecretsManager, redactionService: RedactionService, eventService: EventService);
|
|
23
|
-
createConnection(proposedConnection: CreateSecretsProviderConnectionDto, userId: string, projectRole: SecretsProviderAccessRole): Promise<SecretsProviderConnection>;
|
|
23
|
+
createConnection(proposedConnection: CreateSecretsProviderConnectionDto, userId: string, projectRole: SecretsProviderAccessRole, userRole?: string): Promise<SecretsProviderConnection>;
|
|
24
24
|
updateProjectConnection(providerKey: string, updates: {
|
|
25
25
|
type?: string;
|
|
26
26
|
settings?: IDataObject;
|
|
27
27
|
isEnabled?: boolean;
|
|
28
|
-
}, userId: string): Promise<SecretsProviderConnection>;
|
|
28
|
+
}, userId: string, userRole?: string): Promise<SecretsProviderConnection>;
|
|
29
29
|
updateGlobalConnection(providerKey: string, updates: {
|
|
30
30
|
type?: string;
|
|
31
31
|
projectIds?: string[];
|
|
32
32
|
settings?: IDataObject;
|
|
33
33
|
isEnabled?: boolean;
|
|
34
|
-
}, userId: string): Promise<SecretsProviderConnection>;
|
|
34
|
+
}, userId: string, userRole?: string): Promise<SecretsProviderConnection>;
|
|
35
35
|
private applyConnectionUpdates;
|
|
36
36
|
private syncAndEmitUpdate;
|
|
37
|
-
deleteConnection(providerKey: string, userId: string): Promise<SecretsProviderConnection>;
|
|
37
|
+
deleteConnection(providerKey: string, userId: string, userRole?: string): Promise<SecretsProviderConnection>;
|
|
38
38
|
private findConnectionOrFail;
|
|
39
39
|
getConnection(providerKey: string): Promise<SecretsProviderConnection>;
|
|
40
40
|
listConnections(): Promise<SecretsProviderConnection[]>;
|
|
@@ -44,8 +44,8 @@ export declare class SecretsProvidersConnectionsService {
|
|
|
44
44
|
toSecretCompletionsResponse(connections: SecretsProviderConnection[]): SecretCompletionsResponse;
|
|
45
45
|
toPublicConnectionListItem(connection: SecretsProviderConnection): SecretProviderConnectionListItem;
|
|
46
46
|
toPublicConnection(connection: SecretsProviderConnection): SecretProviderConnection;
|
|
47
|
-
testConnection(providerKey: string, userId: string): Promise<TestSecretProviderConnectionResponse>;
|
|
48
|
-
reloadConnectionSecrets(providerKey: string, userId: string): Promise<ReloadSecretProviderConnectionResponse>;
|
|
47
|
+
testConnection(providerKey: string, userId: string, userRole?: string): Promise<TestSecretProviderConnectionResponse>;
|
|
48
|
+
reloadConnectionSecrets(providerKey: string, userId: string, userRole?: string): Promise<ReloadSecretProviderConnectionResponse>;
|
|
49
49
|
private extractProjectInfo;
|
|
50
50
|
cleanupConnectionsForProjectDeletion(projectId: string): Promise<void>;
|
|
51
51
|
private encryptConnectionSettings;
|
|
@@ -37,7 +37,7 @@ let SecretsProvidersConnectionsService = class SecretsProvidersConnectionsServic
|
|
|
37
37
|
this.eventService = eventService;
|
|
38
38
|
this.logger = this.logger.scoped('external-secrets');
|
|
39
39
|
}
|
|
40
|
-
async createConnection(proposedConnection, userId, projectRole) {
|
|
40
|
+
async createConnection(proposedConnection, userId, projectRole, userRole) {
|
|
41
41
|
const existing = await this.repository.findOne({
|
|
42
42
|
where: { providerKey: proposedConnection.providerKey },
|
|
43
43
|
});
|
|
@@ -65,19 +65,20 @@ let SecretsProvidersConnectionsService = class SecretsProvidersConnectionsServic
|
|
|
65
65
|
await this.externalSecretsManager.syncProviderConnection(proposedConnection.providerKey);
|
|
66
66
|
this.eventService.emit('external-secrets-connection-created', {
|
|
67
67
|
userId,
|
|
68
|
+
userRole,
|
|
68
69
|
providerKey: result.providerKey,
|
|
69
70
|
vaultType: result.type,
|
|
70
71
|
...this.extractProjectInfo(result),
|
|
71
72
|
});
|
|
72
73
|
return result;
|
|
73
74
|
}
|
|
74
|
-
async updateProjectConnection(providerKey, updates, userId) {
|
|
75
|
+
async updateProjectConnection(providerKey, updates, userId, userRole) {
|
|
75
76
|
const connection = await this.findConnectionOrFail(providerKey);
|
|
76
77
|
this.applyConnectionUpdates(connection, updates);
|
|
77
78
|
await this.repository.save(connection);
|
|
78
|
-
return await this.syncAndEmitUpdate(providerKey, userId);
|
|
79
|
+
return await this.syncAndEmitUpdate(providerKey, userId, userRole);
|
|
79
80
|
}
|
|
80
|
-
async updateGlobalConnection(providerKey, updates, userId) {
|
|
81
|
+
async updateGlobalConnection(providerKey, updates, userId, userRole) {
|
|
81
82
|
const connection = await this.findConnectionOrFail(providerKey);
|
|
82
83
|
this.applyConnectionUpdates(connection, updates);
|
|
83
84
|
await this.repository.save(connection);
|
|
@@ -96,7 +97,7 @@ let SecretsProvidersConnectionsService = class SecretsProvidersConnectionsServic
|
|
|
96
97
|
}));
|
|
97
98
|
await this.projectAccessRepository.updateProjectAccess(connection.id, projectIdsToRemove, entriesToAdd);
|
|
98
99
|
}
|
|
99
|
-
return await this.syncAndEmitUpdate(providerKey, userId);
|
|
100
|
+
return await this.syncAndEmitUpdate(providerKey, userId, userRole);
|
|
100
101
|
}
|
|
101
102
|
applyConnectionUpdates(connection, updates) {
|
|
102
103
|
if (updates.type !== undefined) {
|
|
@@ -114,20 +115,21 @@ let SecretsProvidersConnectionsService = class SecretsProvidersConnectionsServic
|
|
|
114
115
|
connection.isEnabled = updates.isEnabled;
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
|
-
async syncAndEmitUpdate(providerKey, userId) {
|
|
118
|
+
async syncAndEmitUpdate(providerKey, userId, userRole) {
|
|
118
119
|
await this.externalSecretsManager.syncProviderConnection(providerKey);
|
|
119
120
|
const result = (await this.repository.findOne({
|
|
120
121
|
where: { providerKey },
|
|
121
122
|
}));
|
|
122
123
|
this.eventService.emit('external-secrets-connection-updated', {
|
|
123
124
|
userId,
|
|
125
|
+
userRole,
|
|
124
126
|
providerKey: result.providerKey,
|
|
125
127
|
vaultType: result.type,
|
|
126
128
|
...this.extractProjectInfo(result),
|
|
127
129
|
});
|
|
128
130
|
return result;
|
|
129
131
|
}
|
|
130
|
-
async deleteConnection(providerKey, userId) {
|
|
132
|
+
async deleteConnection(providerKey, userId, userRole) {
|
|
131
133
|
const connection = await this.findConnectionOrFail(providerKey);
|
|
132
134
|
const projectInfo = this.extractProjectInfo(connection);
|
|
133
135
|
const dependencyId = connection.id.toString();
|
|
@@ -143,6 +145,7 @@ let SecretsProvidersConnectionsService = class SecretsProvidersConnectionsServic
|
|
|
143
145
|
await this.externalSecretsManager.syncProviderConnection(providerKey);
|
|
144
146
|
this.eventService.emit('external-secrets-connection-deleted', {
|
|
145
147
|
userId,
|
|
148
|
+
userRole,
|
|
146
149
|
providerKey: connection.providerKey,
|
|
147
150
|
vaultType: connection.type,
|
|
148
151
|
...projectInfo,
|
|
@@ -230,13 +233,14 @@ let SecretsProvidersConnectionsService = class SecretsProvidersConnectionsServic
|
|
|
230
233
|
updatedAt: connection.updatedAt.toISOString(),
|
|
231
234
|
};
|
|
232
235
|
}
|
|
233
|
-
async testConnection(providerKey, userId) {
|
|
236
|
+
async testConnection(providerKey, userId, userRole) {
|
|
234
237
|
const connection = await this.getConnection(providerKey);
|
|
235
238
|
const decryptedSettings = this.decryptConnectionSettings(connection.encryptedSettings);
|
|
236
239
|
const result = await this.externalSecretsManager.testProviderSettings(connection.type, decryptedSettings);
|
|
237
240
|
const response = api_types_1.testSecretProviderConnectionResponseSchema.parse(result);
|
|
238
241
|
this.eventService.emit('external-secrets-connection-tested', {
|
|
239
242
|
userId,
|
|
243
|
+
userRole,
|
|
240
244
|
providerKey: connection.providerKey,
|
|
241
245
|
vaultType: connection.type,
|
|
242
246
|
...this.extractProjectInfo(connection),
|
|
@@ -245,12 +249,13 @@ let SecretsProvidersConnectionsService = class SecretsProvidersConnectionsServic
|
|
|
245
249
|
});
|
|
246
250
|
return response;
|
|
247
251
|
}
|
|
248
|
-
async reloadConnectionSecrets(providerKey, userId) {
|
|
252
|
+
async reloadConnectionSecrets(providerKey, userId, userRole) {
|
|
249
253
|
try {
|
|
250
254
|
const connection = await this.getConnection(providerKey);
|
|
251
255
|
await this.externalSecretsManager.updateProvider(providerKey);
|
|
252
256
|
this.eventService.emit('external-secrets-connection-reloaded', {
|
|
253
257
|
userId,
|
|
258
|
+
userRole,
|
|
254
259
|
providerKey: connection.providerKey,
|
|
255
260
|
vaultType: connection.type,
|
|
256
261
|
...this.extractProjectInfo(connection),
|