n8n 2.36.7 → 2.37.1
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 +4 -4
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/start.js +1 -2
- package/dist/commands/start.js.map +1 -1
- package/dist/constants/oauth2-triggers.d.ts +1 -1
- package/dist/constants/oauth2-triggers.js +3 -3
- package/dist/constants/workflow-reviews.d.ts +0 -3
- package/dist/constants/workflow-reviews.js +1 -10
- package/dist/constants/workflow-reviews.js.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +4 -1
- package/dist/constants.js.map +1 -1
- package/dist/controller.registry.js +11 -1
- package/dist/controller.registry.js.map +1 -1
- package/dist/controllers/binary-data.controller.d.ts +2 -5
- package/dist/controllers/binary-data.controller.js +3 -11
- package/dist/controllers/binary-data.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.d.ts +2 -0
- package/dist/controllers/e2e.controller.js +7 -1
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/project.controller.js +3 -3
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +0 -1
- package/dist/controllers/role.controller.js +24 -17
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/controllers/security-settings.controller.js +1 -2
- package/dist/controllers/security-settings.controller.js.map +1 -1
- package/dist/credentials/credential-resolution-provider.interface.d.ts +1 -1
- package/dist/credentials/dynamic-credentials-proxy.d.ts +1 -1
- package/dist/credentials/dynamic-credentials-proxy.js +2 -2
- package/dist/credentials/dynamic-credentials-proxy.js.map +1 -1
- package/dist/credentials-helper.js +1 -1
- package/dist/credentials-helper.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-audit.d.ts +1 -1
- package/dist/eventbus/event-message-classes/event-message-mcp.d.ts +2 -0
- package/dist/eventbus/event-message-classes/event-message-mcp.js.map +1 -1
- package/dist/eventbus/event-message-classes/index.d.ts +2 -2
- package/dist/eventbus/event-message-classes/index.js +7 -0
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/poll-trigger-metrics.event-map.d.ts +3 -0
- package/dist/events/maps/relay.event-map.d.ts +42 -2
- package/dist/events/relays/log-streaming.event-relay.d.ts +4 -0
- package/dist/events/relays/log-streaming.event-relay.js +72 -1
- 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 +55 -1
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/executions/execution-data/db-store.d.ts +1 -1
- package/dist/executions/execution-data/db-store.js +3 -2
- package/dist/executions/execution-data/db-store.js.map +1 -1
- package/dist/executions/execution-data/types.d.ts +4 -2
- package/dist/executions/execution-data/types.js +4 -0
- package/dist/executions/execution-data/types.js.map +1 -1
- package/dist/executions/execution-data/unreadable-run-data.error.d.ts +5 -0
- package/dist/executions/execution-data/unreadable-run-data.error.js +11 -0
- package/dist/executions/execution-data/unreadable-run-data.error.js.map +1 -0
- package/dist/executions/execution-persistence.d.ts +3 -1
- package/dist/executions/execution-persistence.js +23 -10
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/executions/execution.service.d.ts +4 -1
- package/dist/executions/execution.service.js +9 -7
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/execution.types.d.ts +1 -7
- package/dist/executions/executions.controller.d.ts +4 -1
- package/dist/executions/executions.controller.js +8 -3
- package/dist/executions/executions.controller.js.map +1 -1
- package/dist/executions/pre-execution-checks/credentials-permission-checker.js +3 -21
- package/dist/executions/pre-execution-checks/credentials-permission-checker.js.map +1 -1
- package/dist/metrics/prometheus/poll-trigger-metrics.service.js +8 -0
- package/dist/metrics/prometheus/poll-trigger-metrics.service.js.map +1 -1
- package/dist/modules/agents/agent-config.service.js +1 -1
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-custom-tools.service.js +2 -2
- package/dist/modules/agents/agent-custom-tools.service.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.d.ts +5 -1
- package/dist/modules/agents/agent-execution.service.js +33 -5
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-management.service.d.ts +1 -0
- package/dist/modules/agents/agent-integration-management.service.js +16 -4
- package/dist/modules/agents/agent-integration-management.service.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.d.ts +1 -1
- package/dist/modules/agents/agent-publish.service.js +56 -20
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-sandbox-principal.d.ts +2 -2
- package/dist/modules/agents/agent-sandbox-principal.js +2 -2
- package/dist/modules/agents/agent-sandbox-principal.js.map +1 -1
- package/dist/modules/agents/agent-sandbox-runtime.service.js +2 -2
- package/dist/modules/agents/agent-sandbox-runtime.service.js.map +1 -1
- package/dist/modules/agents/agent-skills.service.js +3 -3
- package/dist/modules/agents/agent-skills.service.js.map +1 -1
- package/dist/modules/agents/agent-task.service.d.ts +2 -0
- package/dist/modules/agents/agent-task.service.js +45 -10
- package/dist/modules/agents/agent-task.service.js.map +1 -1
- package/dist/modules/agents/agent-threads.controller.d.ts +3 -4
- package/dist/modules/agents/agent-threads.controller.js +10 -4
- package/dist/modules/agents/agent-threads.controller.js.map +1 -1
- package/dist/modules/agents/agent-validation.service.d.ts +2 -6
- package/dist/modules/agents/agent-validation.service.js +5 -9
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +3 -2
- package/dist/modules/agents/agent-workflow-execution.service.js +31 -14
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.d.ts +9 -0
- package/dist/modules/agents/agents.module.js +0 -3
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.js +5 -2
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +2 -0
- package/dist/modules/agents/builder/agents-builder.service.js +18 -5
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.d.ts +4 -3
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js +11 -10
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +3 -0
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +2 -0
- package/dist/modules/agents/entities/agent-execution.entity.js +4 -0
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-task-snapshot.entity.d.ts +1 -0
- package/dist/modules/agents/entities/agent-task-snapshot.entity.js +10 -1
- package/dist/modules/agents/entities/agent-task-snapshot.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-task.entity.d.ts +1 -0
- package/dist/modules/agents/entities/agent-task.entity.js +10 -1
- package/dist/modules/agents/entities/agent-task.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent.entity.d.ts +1 -0
- package/dist/modules/agents/entities/agent.entity.js +4 -0
- package/dist/modules/agents/entities/agent.entity.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +1 -0
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +1 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.js +22 -8
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +13 -2
- package/dist/modules/agents/integrations/agent-chat-integration.js +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-message-context.d.ts +2 -1
- package/dist/modules/agents/integrations/agent-chat-message-context.js +15 -0
- package/dist/modules/agents/integrations/agent-chat-message-context.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +14 -1
- package/dist/modules/agents/integrations/chat-integration.service.js +128 -11
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +1 -0
- package/dist/modules/agents/integrations/integration-action-executor.js +20 -6
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -1
- package/dist/modules/agents/integrations/integration-message-context.service.d.ts +8 -1
- package/dist/modules/agents/integrations/integration-message-context.service.js +87 -3
- package/dist/modules/agents/integrations/integration-message-context.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-execution.js +7 -0
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-types.d.ts +8 -0
- package/dist/modules/agents/integrations/leader-channel-relay.service.d.ts +25 -0
- package/dist/modules/agents/integrations/leader-channel-relay.service.js +123 -0
- package/dist/modules/agents/integrations/leader-channel-relay.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-bridge-behavior.js +8 -4
- package/dist/modules/agents/integrations/platforms/slack/slack-bridge-behavior.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.d.ts +12 -2
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js +34 -2
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.d.ts +4 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js +37 -9
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +3 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +2 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/json-config/agent-config-composition.d.ts +1 -1
- package/dist/modules/agents/json-config/agent-config-composition.js +3 -10
- package/dist/modules/agents/json-config/agent-config-composition.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +5 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js +89 -8
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +5 -2
- package/dist/modules/agents/repositories/agent-execution.repository.js +41 -2
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.d.ts +1 -1
- package/dist/modules/agents/repositories/agent.repository.d.ts +6 -1
- package/dist/modules/agents/repositories/agent.repository.js +38 -0
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.d.ts +1 -0
- package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.js +20 -7
- package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +11 -0
- package/dist/modules/agents/tools/workflow-tool-factory.js +109 -40
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/utils/agent-draft.utils.d.ts +4 -0
- package/dist/modules/agents/utils/agent-draft.utils.js +9 -0
- package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -1
- package/dist/modules/agents/utils/agent-memory-scope.d.ts +1 -0
- package/dist/modules/agents/utils/agent-memory-scope.js +4 -0
- package/dist/modules/agents/utils/agent-memory-scope.js.map +1 -1
- package/dist/modules/agents/utils/execution-failure-summary.d.ts +23 -0
- package/dist/modules/agents/utils/execution-failure-summary.js +54 -0
- package/dist/modules/agents/utils/execution-failure-summary.js.map +1 -0
- package/dist/modules/agents/workflow-agent-stream.d.ts +41 -0
- package/dist/modules/agents/workflow-agent-stream.js +132 -0
- package/dist/modules/agents/workflow-agent-stream.js.map +1 -0
- package/dist/modules/breaking-changes/breaking-changes.service.js +1 -1
- package/dist/modules/breaking-changes/breaking-changes.service.js.map +1 -1
- package/dist/modules/breaking-changes/rules/index.d.ts +4 -0
- package/dist/modules/breaking-changes/rules/index.js +4 -0
- package/dist/modules/breaking-changes/rules/index.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/agent-node-mode.d.ts +4 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-mode.js +26 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-mode.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.js +53 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.js +56 -0
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-any-removed.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-any-removed.rule.js +54 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-any-removed.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.js +63 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub.models.service.js +1 -69
- package/dist/modules/chat-hub/chat-hub.models.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.js +4 -14
- package/dist/modules/community-packages/community-packages.lifecycle.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.service.d.ts +8 -6
- package/dist/modules/community-packages/community-packages.service.js +263 -177
- package/dist/modules/community-packages/community-packages.service.js.map +1 -1
- package/dist/modules/data-table/data-table-size-validator.service.js +2 -2
- package/dist/modules/data-table/data-table-size-validator.service.js.map +1 -1
- package/dist/modules/data-table/multer-upload-middleware.js +2 -2
- package/dist/modules/data-table/multer-upload-middleware.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/identifier-interface.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.d.ts +13 -2
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js +33 -3
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.d.ts +3 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.js +14 -16
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.d.ts +2 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js +2 -2
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-userinfo-identifier.d.ts +12 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-userinfo-identifier.js +135 -19
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-userinfo-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-utils.d.ts +6 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-utils.js +29 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-utils.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.d.ts +5 -5
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.js +12 -12
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/oauth-credential-resolver.d.ts +15 -4
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/oauth-credential-resolver.js +8 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/oauth-credential-resolver.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +3 -3
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
- package/dist/modules/engine-v2/engine-data-plane-client.d.ts +15 -0
- package/dist/modules/engine-v2/engine-data-plane-client.js +76 -0
- package/dist/modules/engine-v2/engine-data-plane-client.js.map +1 -0
- package/dist/modules/engine-v2/engine-v2.module.d.ts +5 -0
- package/dist/modules/engine-v2/engine-v2.module.js +48 -0
- package/dist/modules/engine-v2/engine-v2.module.js.map +1 -0
- package/dist/modules/engine-v2/engine-v2.runtime.d.ts +20 -0
- package/dist/modules/engine-v2/engine-v2.runtime.js +164 -0
- package/dist/modules/engine-v2/engine-v2.runtime.js.map +1 -0
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js +1 -1
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js.map +1 -1
- package/dist/modules/git-connections.ee/constants.d.ts +7 -0
- package/dist/modules/git-connections.ee/constants.js +11 -0
- package/dist/modules/git-connections.ee/constants.js.map +1 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection-project.entity.d.ts +8 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection-project.entity.js +36 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection-project.entity.js.map +1 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection.entity.d.ts +14 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection.entity.js +61 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection.entity.js.map +1 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.d.ts +9 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js +46 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js.map +1 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.d.ts +12 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.js +37 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.js.map +1 -0
- package/dist/modules/git-connections.ee/git-connections-git.service.d.ts +33 -0
- package/dist/modules/git-connections.ee/git-connections-git.service.js +191 -0
- package/dist/modules/git-connections.ee/git-connections-git.service.js.map +1 -0
- package/dist/modules/git-connections.ee/git-connections-git.utils.d.ts +13 -0
- package/dist/modules/git-connections.ee/git-connections-git.utils.js +49 -0
- package/dist/modules/git-connections.ee/git-connections-git.utils.js.map +1 -0
- package/dist/modules/git-connections.ee/git-connections.module.d.ts +5 -0
- package/dist/modules/git-connections.ee/git-connections.module.js +32 -0
- package/dist/modules/git-connections.ee/git-connections.module.js.map +1 -0
- package/dist/modules/git-connections.ee/git-connections.service.d.ts +64 -0
- package/dist/modules/git-connections.ee/git-connections.service.js +331 -0
- package/dist/modules/git-connections.ee/git-connections.service.js.map +1 -0
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.d.ts +2 -0
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.js +10 -1
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.js.map +1 -1
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.d.ts +2 -0
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.js +19 -2
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/durable-event-log.d.ts +2 -0
- package/dist/modules/instance-ai/event-bus/durable-event-log.js +30 -1
- package/dist/modules/instance-ai/event-bus/durable-event-log.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.d.ts +3 -1
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js +33 -23
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.js +49 -7
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js +1 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-verification.service.js +3 -2
- package/dist/modules/instance-ai/instance-ai-verification.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +4 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +91 -32
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.js +5 -0
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.service.js +36 -87
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +3 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +14 -6
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.d.ts +3 -2
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js +10 -0
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.d.ts +4 -2
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js +47 -4
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.d.ts +9 -1
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js +34 -2
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.d.ts +4 -0
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.js +14 -0
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.js.map +1 -1
- package/dist/modules/instance-ai/run-trace-metadata.js +2 -1
- package/dist/modules/instance-ai/run-trace-metadata.js.map +1 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js +5 -0
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js.map +1 -1
- package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +4 -1
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js +2 -5
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +2 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +6 -2
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -1
- package/dist/modules/instance-ai/tracing/index.d.ts +1 -1
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.d.ts +9 -6
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js +18 -3
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js.map +1 -1
- package/dist/modules/mcp/mcp-api-key.service.js +1 -1
- package/dist/modules/mcp/mcp-api-key.service.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +7 -3
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +3 -3
- package/dist/modules/mcp/mcp.service.js +7 -5
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +14 -1
- package/dist/modules/mcp/mcp.types.js.map +1 -1
- package/dist/modules/mcp/tool-schema.util.js +2 -3
- package/dist/modules/mcp/tool-schema.util.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.d.ts +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.js +2 -0
- package/dist/modules/mcp/tools/agents/agent-reference.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-tools.service.js +1 -0
- package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
- package/dist/modules/mcp/tools/search-folders.tool.js +1 -1
- package/dist/modules/mcp/tools/search-folders.tool.js.map +1 -1
- package/dist/modules/mcp/tools/search-workflows.tool.d.ts +5 -2
- package/dist/modules/mcp/tools/search-workflows.tool.js +58 -7
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/credential-validation.js +2 -21
- package/dist/modules/mcp/tools/workflow-builder/credential-validation.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +2 -2
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +3 -25
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +62 -13
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +13 -3
- package/dist/modules/n8n-packages/engine/import-orchestrator.js +33 -3
- package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-result.d.ts +3 -1
- package/dist/modules/n8n-packages/engine/import-result.js +2 -0
- package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.d.ts +2 -2
- package/dist/modules/n8n-packages/engine/import-telemetry.js +9 -0
- package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +6 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +16 -2
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.d.ts +2 -2
- package/dist/modules/n8n-packages/engine/project-package-importer.js +11 -0
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.d.ts +2 -2
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +2 -0
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-export-policy.d.ts +4 -0
- package/dist/modules/n8n-packages/entities/credential/credential-export-policy.js +43 -0
- package/dist/modules/n8n-packages/entities/credential/credential-export-policy.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js +5 -2
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.d.ts +4 -2
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js +2 -1
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js +2 -2
- package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.d.ts +5 -1
- package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.js +24 -0
- package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.js.map +1 -1
- package/dist/modules/n8n-packages/entities/folder/folder-removal.types.d.ts +11 -0
- package/dist/modules/n8n-packages/entities/folder/folder-removal.types.js +3 -0
- package/dist/modules/n8n-packages/entities/folder/folder-removal.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder-remover.d.ts +14 -0
- package/dist/modules/n8n-packages/entities/folder/folder-remover.js +110 -0
- package/dist/modules/n8n-packages/entities/folder/folder-remover.js.map +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js +4 -4
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/project/project.exporter.js +4 -4
- package/dist/modules/n8n-packages/entities/project/project.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.js +3 -3
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js +2 -2
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js +16 -16
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-removal.types.d.ts +21 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-removal.types.js +3 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-removal.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-remover.d.ts +12 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-remover.js +109 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-remover.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +2 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +2 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/io/directory/directory-package-writer.d.ts +9 -0
- package/dist/modules/n8n-packages/io/directory/directory-package-writer.js +39 -0
- package/dist/modules/n8n-packages/io/directory/directory-package-writer.js.map +1 -0
- package/dist/modules/n8n-packages/io/package-writer.d.ts +2 -4
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +5 -1
- package/dist/modules/n8n-packages/n8n-packages.service.js +41 -16
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +57 -4
- package/dist/modules/n8n-packages/n8n-packages.types.js +10 -1
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.d.ts +8 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js +12 -1
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +28 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +7 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -1
- package/dist/modules/oauth-server/oauth-token.service.d.ts +1 -0
- package/dist/modules/oauth-server/oauth-token.service.js +12 -1
- package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.js +0 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.js +0 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-check-failed.error.d.ts +10 -0
- package/dist/modules/policy-infrastructure/policy-check-failed.error.js +14 -0
- package/dist/modules/policy-infrastructure/policy-check-failed.error.js.map +1 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.d.ts +14 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js +121 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js.map +1 -0
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.d.ts +4 -0
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.js +23 -0
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.js.map +1 -0
- package/dist/modules/provisioning.ee/constants.d.ts +1 -0
- package/dist/modules/provisioning.ee/constants.js +3 -1
- package/dist/modules/provisioning.ee/constants.js.map +1 -1
- package/dist/modules/provisioning.ee/errors/sso-access-denied.error.d.ts +4 -0
- package/dist/modules/provisioning.ee/errors/sso-access-denied.error.js +11 -0
- package/dist/modules/provisioning.ee/errors/sso-access-denied.error.js.map +1 -0
- package/dist/modules/provisioning.ee/provisioning.service.ee.js +4 -4
- package/dist/modules/provisioning.ee/provisioning.service.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.d.ts +1 -3
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.js +16 -23
- 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 +17 -5
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js +31 -9
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-export.service.ee.js +1 -0
- 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 +7 -19
- package/dist/modules/source-control.ee/source-control-git.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-helper.ee.d.ts +3 -5
- package/dist/modules/source-control.ee/source-control-helper.ee.js +10 -40
- package/dist/modules/source-control.ee/source-control-helper.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +7 -2
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/types/exportable-workflow.d.ts +1 -0
- package/dist/modules/source-control.ee/types/source-control-workflow-version-id.d.ts +1 -0
- package/dist/modules/sso-oidc/oidc.controller.ee.js +23 -7
- package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
- package/dist/modules/sso-saml/saml.controller.ee.js +5 -0
- package/dist/modules/sso-saml/saml.controller.ee.js.map +1 -1
- package/dist/modules/type-availability-policies/policy-evaluator.d.ts +2 -0
- package/dist/modules/type-availability-policies/policy-evaluator.js +28 -0
- package/dist/modules/type-availability-policies/policy-evaluator.js.map +1 -0
- package/dist/modules/type-availability-policies/policy-rule.types.d.ts +23 -0
- package/dist/modules/type-availability-policies/policy-rule.types.js +3 -0
- package/dist/modules/type-availability-policies/policy-rule.types.js.map +1 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.d.ts +4 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js +18 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-access.service.d.ts +4 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-access.service.js +25 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-access.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.d.ts +5 -2
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js +14 -2
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js +9 -9
- package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-feature-gate.service.js +1 -2
- package/dist/modules/workflow-reviews.ee/workflow-review-feature-gate.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.d.ts +2 -3
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js +5 -5
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.d.ts +30 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js +256 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.d.ts +6 -6
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js +61 -52
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review.mapper.d.ts +3 -2
- package/dist/modules/workflow-reviews.ee/workflow-review.mapper.js +24 -1
- package/dist/modules/workflow-reviews.ee/workflow-review.mapper.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js +2 -5
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js.map +1 -1
- package/dist/policy/policy-cleared.d.ts +20 -0
- package/dist/policy/policy-cleared.js +22 -0
- package/dist/policy/policy-cleared.js.map +1 -0
- package/dist/policy/policy-enforcement-backend.d.ts +15 -0
- package/dist/policy/policy-enforcement-backend.js +3 -0
- package/dist/policy/policy-enforcement-backend.js.map +1 -0
- package/dist/policy/policy-enforcement.service.d.ts +21 -0
- package/dist/policy/policy-enforcement.service.js +87 -0
- package/dist/policy/policy-enforcement.service.js.map +1 -0
- package/dist/policy/policy-violation.error.d.ts +13 -0
- package/dist/policy/policy-violation.error.js +22 -0
- package/dist/policy/policy-violation.error.js.map +1 -0
- package/dist/posthog/index.js +1 -1
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/public-api-controller.registry.js +2 -1
- package/dist/public-api/public-api-controller.registry.js.map +1 -1
- package/dist/public-api/public-api-route-resolver.d.ts +2 -2
- package/dist/public-api/public-api-route-resolver.js.map +1 -1
- package/dist/public-api/public-api-validation-error.d.ts +2 -0
- package/dist/public-api/public-api-validation-error.js +17 -0
- package/dist/public-api/public-api-validation-error.js.map +1 -0
- package/dist/public-api/types.d.ts +2 -9
- package/dist/public-api/v1/controllers/git-connections.public.controller.d.ts +20 -0
- package/dist/public-api/v1/controllers/git-connections.public.controller.js +278 -0
- package/dist/public-api/v1/controllers/git-connections.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/index.d.ts +1 -0
- package/dist/public-api/v1/controllers/index.js +1 -0
- package/dist/public-api/v1/controllers/index.js.map +1 -1
- package/dist/public-api/v1/controllers/role-mapping-rules.public.controller.d.ts +6 -1
- package/dist/public-api/v1/controllers/role-mapping-rules.public.controller.js +117 -11
- package/dist/public-api/v1/controllers/role-mapping-rules.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/roles.public.controller.d.ts +2 -1
- package/dist/public-api/v1/controllers/roles.public.controller.js +46 -2
- package/dist/public-api/v1/controllers/roles.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/tags.public.controller.js +1 -18
- package/dist/public-api/v1/controllers/tags.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +16 -3
- package/dist/public-api/v1/controllers/workflows.public.controller.js +169 -5
- package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.js +3 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +1 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +2 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/projects/projects.handler.js +3 -3
- package/dist/public-api/v1/handlers/projects/projects.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +0 -6
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +0 -72
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/openapi-gen/decorator-routes.d.ts +32 -0
- package/dist/public-api/v1/openapi-gen/decorator-routes.js +37 -9
- package/dist/public-api/v1/openapi-gen/decorator-routes.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +5196 -1873
- package/dist/push/index.js +3 -3
- package/dist/push/index.js.map +1 -1
- package/dist/response-helper.js +1 -2
- package/dist/response-helper.js.map +1 -1
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/constants.js +2 -0
- package/dist/scaling/constants.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +19 -0
- package/dist/scaling/pubsub/pubsub.types.d.ts +3 -1
- package/dist/scaling/pubsub/subscriber.service.d.ts +1 -0
- package/dist/scaling/pubsub/subscriber.service.js +24 -4
- package/dist/scaling/pubsub/subscriber.service.js.map +1 -1
- package/dist/scheduling/durable-job-provisioner.js +1 -1
- package/dist/scheduling/durable-job-provisioner.js.map +1 -1
- package/dist/scheduling/durable-scheduler.js +9 -0
- package/dist/scheduling/durable-scheduler.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/durable-poller-chain.d.ts +2 -0
- package/dist/scheduling/poll-trigger-node/durable-poller-chain.js +9 -0
- package/dist/scheduling/poll-trigger-node/durable-poller-chain.js.map +1 -0
- package/dist/scheduling/poll-trigger-node/poll-job-provider.d.ts +1 -3
- package/dist/scheduling/poll-trigger-node/poll-job-provider.js +4 -8
- package/dist/scheduling/poll-trigger-node/poll-job-provider.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.d.ts +3 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js +9 -3
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.d.ts +8 -3
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js +86 -7
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js.map +1 -1
- package/dist/services/engine-data-plane-proxy.service.d.ts +10 -0
- package/dist/services/engine-data-plane-proxy.service.js +33 -0
- package/dist/services/engine-data-plane-proxy.service.js.map +1 -0
- package/dist/services/engine-v2-dispatcher.service.d.ts +14 -0
- package/dist/services/engine-v2-dispatcher.service.js +93 -0
- package/dist/services/engine-v2-dispatcher.service.js.map +1 -0
- package/dist/services/folder-finder.service.d.ts +1 -0
- package/dist/services/folder-finder.service.js +9 -0
- package/dist/services/folder-finder.service.js.map +1 -1
- package/dist/services/folder.service.d.ts +5 -0
- package/dist/services/folder.service.js +7 -0
- package/dist/services/folder.service.js.map +1 -1
- package/dist/services/frontend.service.d.ts +3 -4
- package/dist/services/frontend.service.js +5 -13
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/node-resource-explorer.service.d.ts +1 -0
- package/dist/services/node-resource-explorer.service.js +72 -13
- package/dist/services/node-resource-explorer.service.js.map +1 -1
- package/dist/services/oauth-token-verifier-proxy.service.d.ts +11 -1
- package/dist/services/oauth-token-verifier-proxy.service.js +6 -0
- package/dist/services/oauth-token-verifier-proxy.service.js.map +1 -1
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +5 -0
- package/dist/services/role-authorization.d.ts +11 -2
- package/dist/services/role-authorization.js +15 -6
- package/dist/services/role-authorization.js.map +1 -1
- package/dist/services/role.service.d.ts +5 -1
- package/dist/services/role.service.js +7 -2
- package/dist/services/role.service.js.map +1 -1
- package/dist/utils/ai-service-retry.js +3 -4
- package/dist/utils/ai-service-retry.js.map +1 -1
- package/dist/webhooks/webhook-blank-file-inputs.d.ts +4 -0
- package/dist/webhooks/webhook-blank-file-inputs.js +32 -0
- package/dist/webhooks/webhook-blank-file-inputs.js.map +1 -0
- package/dist/webhooks/webhook-form-data.js +29 -15
- package/dist/webhooks/webhook-form-data.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +2 -2
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-request-sanitizer.js +10 -4
- package/dist/webhooks/webhook-request-sanitizer.js.map +1 -1
- package/dist/workflow-execute-additional-data.d.ts +2 -2
- package/dist/workflow-execute-additional-data.js +17 -6
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +2 -7
- package/dist/workflow-helpers.js +3 -34
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.d.ts +3 -1
- package/dist/workflow-runner.js +7 -2
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/publication/heal-node-ids.d.ts +26 -0
- package/dist/workflows/publication/heal-node-ids.js +65 -0
- package/dist/workflows/publication/heal-node-ids.js.map +1 -0
- package/dist/workflows/publication/publication-result.d.ts +1 -1
- package/dist/workflows/publication/publication-status-reporter.js +8 -3
- package/dist/workflows/publication/publication-status-reporter.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-applier.d.ts +10 -1
- package/dist/workflows/publication/workflow-publication-applier.js +56 -3
- package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js +1 -1
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js.map +1 -1
- package/dist/workflows/triggers/enabled-trigger-nodes.d.ts +2 -1
- package/dist/workflows/triggers/enabled-trigger-nodes.js +5 -1
- package/dist/workflows/triggers/enabled-trigger-nodes.js.map +1 -1
- package/dist/workflows/triggers/poll-backoff-policy.d.ts +15 -0
- package/dist/workflows/triggers/poll-backoff-policy.js +78 -0
- package/dist/workflows/triggers/poll-backoff-policy.js.map +1 -0
- package/dist/workflows/triggers/poll-backoff.service.d.ts +30 -0
- package/dist/workflows/triggers/poll-backoff.service.js +121 -0
- package/dist/workflows/triggers/poll-backoff.service.js.map +1 -0
- package/dist/workflows/triggers/poll-cursor.service.d.ts +7 -5
- package/dist/workflows/triggers/poll-cursor.service.js +14 -6
- package/dist/workflows/triggers/poll-cursor.service.js.map +1 -1
- package/dist/workflows/triggers/workflow-trigger-activator.d.ts +1 -0
- package/dist/workflows/triggers/workflow-trigger-activator.js +31 -3
- package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +3 -1
- package/dist/workflows/workflow-creation.service.js +9 -2
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +8 -0
- package/dist/workflows/workflow-finder.service.js +20 -0
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-mutation-hooks-proxy.service.d.ts +16 -6
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js +9 -6
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.js +2 -5
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +15 -1
- package/dist/workflows/workflow.service.ee.d.ts +3 -1
- package/dist/workflows/workflow.service.ee.js +12 -6
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +77 -25
- package/dist/workflows/workflow.service.js.map +1 -1
- package/package.json +64 -62
- package/templates/form-shell.handlebars +92 -7
- package/templates/form-trigger-completion.handlebars +5 -3
- package/templates/form-trigger.handlebars +11 -4
- package/templates/partials/formHostNavigation.handlebars +44 -0
- package/dist/binary-data/binary-data-access.service.d.ts +0 -11
- package/dist/binary-data/binary-data-access.service.js +0 -50
- package/dist/binary-data/binary-data-access.service.js.map +0 -1
- package/dist/modules/agents/builder/agents-builder-settings.controller.d.ts +0 -10
- package/dist/modules/agents/builder/agents-builder-settings.controller.js +0 -52
- package/dist/modules/agents/builder/agents-builder-settings.controller.js.map +0 -1
- package/dist/modules/agents/builder/agents-builder-settings.service.d.ts +0 -38
- package/dist/modules/agents/builder/agents-builder-settings.service.js +0 -174
- package/dist/modules/agents/builder/agents-builder-settings.service.js.map +0 -1
- package/dist/modules/data-table/utils/size-utils.d.ts +0 -2
- package/dist/modules/data-table/utils/size-utils.js +0 -19
- package/dist/modules/data-table/utils/size-utils.js.map +0 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.d.ts +0 -18
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.js +0 -114
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.js.map +0 -1
- package/dist/workflows/triggers/durable-poller-gate.service.d.ts +0 -19
- package/dist/workflows/triggers/durable-poller-gate.service.js +0 -78
- package/dist/workflows/triggers/durable-poller-gate.service.js.map +0 -1
|
@@ -21,6 +21,8 @@ export declare namespace ExecutionRequest {
|
|
|
21
21
|
workflowId?: string;
|
|
22
22
|
lastId?: string;
|
|
23
23
|
projectId?: string;
|
|
24
|
+
startedAfter?: string;
|
|
25
|
+
startedBefore?: string;
|
|
24
26
|
}>;
|
|
25
27
|
type Get = AuthenticatedRequest<{
|
|
26
28
|
id: string;
|
|
@@ -100,10 +102,6 @@ export declare namespace CredentialTypeRequest {
|
|
|
100
102
|
}, {}, {}, {}>;
|
|
101
103
|
}
|
|
102
104
|
export declare namespace WorkflowRequest {
|
|
103
|
-
type Create = AuthenticatedRequest<{}, {}, WorkflowEntity & {
|
|
104
|
-
projectId?: string;
|
|
105
|
-
parentFolderId?: string | null;
|
|
106
|
-
}, {}>;
|
|
107
105
|
type Get = AuthenticatedRequest<{
|
|
108
106
|
id: string;
|
|
109
107
|
}, {}, {}, {
|
|
@@ -124,11 +122,6 @@ export declare namespace WorkflowRequest {
|
|
|
124
122
|
name?: string;
|
|
125
123
|
description?: string;
|
|
126
124
|
}, {}>;
|
|
127
|
-
type Transfer = AuthenticatedRequest<{
|
|
128
|
-
id: string;
|
|
129
|
-
}, {}, {
|
|
130
|
-
destinationProjectId: string;
|
|
131
|
-
}>;
|
|
132
125
|
type GetVersion = AuthenticatedRequest<{
|
|
133
126
|
id: string;
|
|
134
127
|
versionId: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CloneGitConnectionDto, CreateGitConnectionDto, GitConnectionListPublicDto, GitConnectionProjectListPublicDto, GitConnectionProjectPublicDto, GitConnectionPublicDto, GitConnectionPushResultDto, ListGitConnectionsQueryDto, UpdateGitConnectionDto } from '@n8n/api-types';
|
|
2
|
+
import { ModuleRegistry } from '@n8n/backend-common';
|
|
3
|
+
import type { AuthenticatedRequest } from '@n8n/db';
|
|
4
|
+
import type { Response } from 'express';
|
|
5
|
+
export declare class GitConnectionsPublicController {
|
|
6
|
+
private readonly moduleRegistry;
|
|
7
|
+
constructor(moduleRegistry: ModuleRegistry);
|
|
8
|
+
private gitConnectionsService;
|
|
9
|
+
createGitConnection(_req: AuthenticatedRequest, _res: Response, input: CreateGitConnectionDto): Promise<GitConnectionPublicDto>;
|
|
10
|
+
getGitConnections(_req: AuthenticatedRequest, _res: Response, query: ListGitConnectionsQueryDto): Promise<GitConnectionListPublicDto>;
|
|
11
|
+
getGitConnection(_req: AuthenticatedRequest, _res: Response, id: string): Promise<GitConnectionPublicDto>;
|
|
12
|
+
updateGitConnection(_req: AuthenticatedRequest, _res: Response, id: string, input: UpdateGitConnectionDto): Promise<GitConnectionPublicDto>;
|
|
13
|
+
cloneGitConnection(_req: AuthenticatedRequest, _res: Response, id: string, input: CloneGitConnectionDto): Promise<GitConnectionPublicDto>;
|
|
14
|
+
disconnectGitConnection(_req: AuthenticatedRequest, _res: Response, id: string): Promise<GitConnectionPublicDto>;
|
|
15
|
+
deleteGitConnection(_req: AuthenticatedRequest, _res: Response, id: string): Promise<void>;
|
|
16
|
+
pushGitConnectionProjects(req: AuthenticatedRequest, _res: Response, id: string): Promise<GitConnectionPushResultDto>;
|
|
17
|
+
getGitConnectionProjects(_req: AuthenticatedRequest, _res: Response, id: string): Promise<GitConnectionProjectListPublicDto>;
|
|
18
|
+
addProjectToGitConnection(req: AuthenticatedRequest, _res: Response, id: string, projectId: string): Promise<GitConnectionProjectPublicDto>;
|
|
19
|
+
removeProjectFromGitConnection(req: AuthenticatedRequest, _res: Response, id: string, projectId: string): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.GitConnectionsPublicController = void 0;
|
|
16
|
+
const api_types_1 = require("@n8n/api-types");
|
|
17
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
18
|
+
const constants_1 = require("@n8n/constants");
|
|
19
|
+
const decorators_1 = require("@n8n/decorators");
|
|
20
|
+
const di_1 = require("@n8n/di");
|
|
21
|
+
const bad_request_error_1 = require("../../../errors/response-errors/bad-request.error");
|
|
22
|
+
const service_unavailable_error_1 = require("../../../errors/response-errors/service-unavailable.error");
|
|
23
|
+
const pagination_service_1 = require("../../../public-api/v1/shared/services/pagination.service");
|
|
24
|
+
const tags = ['GitConnections'];
|
|
25
|
+
let GitConnectionsPublicController = class GitConnectionsPublicController {
|
|
26
|
+
constructor(moduleRegistry) {
|
|
27
|
+
this.moduleRegistry = moduleRegistry;
|
|
28
|
+
}
|
|
29
|
+
async gitConnectionsService() {
|
|
30
|
+
if (!this.moduleRegistry.isActive('git-connections')) {
|
|
31
|
+
throw new service_unavailable_error_1.ServiceUnavailableError('Git connections module is not enabled');
|
|
32
|
+
}
|
|
33
|
+
const { GitConnectionsService } = await import('../../../modules/git-connections.ee/git-connections.service.js');
|
|
34
|
+
return di_1.Container.get(GitConnectionsService);
|
|
35
|
+
}
|
|
36
|
+
async createGitConnection(_req, _res, input) {
|
|
37
|
+
return await (await this.gitConnectionsService()).create(input);
|
|
38
|
+
}
|
|
39
|
+
async getGitConnections(_req, _res, query) {
|
|
40
|
+
let offset = 0;
|
|
41
|
+
let { limit } = query;
|
|
42
|
+
if (query.cursor) {
|
|
43
|
+
try {
|
|
44
|
+
const cursor = (0, pagination_service_1.decodeCursor)(query.cursor);
|
|
45
|
+
if (!('offset' in cursor))
|
|
46
|
+
throw new bad_request_error_1.BadRequestError('An invalid cursor was provided');
|
|
47
|
+
offset = cursor.offset;
|
|
48
|
+
limit = cursor.limit;
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
if (error instanceof bad_request_error_1.BadRequestError)
|
|
52
|
+
throw error;
|
|
53
|
+
throw new bad_request_error_1.BadRequestError('An invalid cursor was provided');
|
|
54
|
+
}
|
|
55
|
+
if (!Number.isInteger(offset) || offset < 0 || !Number.isInteger(limit) || limit < 1) {
|
|
56
|
+
throw new bad_request_error_1.BadRequestError('An invalid cursor was provided');
|
|
57
|
+
}
|
|
58
|
+
limit = Math.min(limit, api_types_1.MAX_ITEMS_PER_PAGE);
|
|
59
|
+
}
|
|
60
|
+
const { data, count } = await (await this.gitConnectionsService()).list(offset, limit);
|
|
61
|
+
return {
|
|
62
|
+
data,
|
|
63
|
+
nextCursor: (0, pagination_service_1.encodeNextCursor)({ offset, limit, numberOfTotalRecords: count }),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
async getGitConnection(_req, _res, id) {
|
|
67
|
+
return await (await this.gitConnectionsService()).findOne(id);
|
|
68
|
+
}
|
|
69
|
+
async updateGitConnection(_req, _res, id, input) {
|
|
70
|
+
return await (await this.gitConnectionsService()).update(id, input);
|
|
71
|
+
}
|
|
72
|
+
async cloneGitConnection(_req, _res, id, input) {
|
|
73
|
+
return await (await this.gitConnectionsService()).clone(id, input.branchName);
|
|
74
|
+
}
|
|
75
|
+
async disconnectGitConnection(_req, _res, id) {
|
|
76
|
+
return await (await this.gitConnectionsService()).disconnect(id);
|
|
77
|
+
}
|
|
78
|
+
async deleteGitConnection(_req, _res, id) {
|
|
79
|
+
await (await this.gitConnectionsService()).delete(id);
|
|
80
|
+
}
|
|
81
|
+
async pushGitConnectionProjects(req, _res, id) {
|
|
82
|
+
return await (await this.gitConnectionsService()).push(id, req.user);
|
|
83
|
+
}
|
|
84
|
+
async getGitConnectionProjects(_req, _res, id) {
|
|
85
|
+
return await (await this.gitConnectionsService()).listProjects(id);
|
|
86
|
+
}
|
|
87
|
+
async addProjectToGitConnection(req, _res, id, projectId) {
|
|
88
|
+
return await (await this.gitConnectionsService()).addProject({
|
|
89
|
+
user: req.user,
|
|
90
|
+
connectionId: id,
|
|
91
|
+
projectId,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
async removeProjectFromGitConnection(req, _res, id, projectId) {
|
|
95
|
+
await (await this.gitConnectionsService()).removeProject({
|
|
96
|
+
user: req.user,
|
|
97
|
+
connectionId: id,
|
|
98
|
+
projectId,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
exports.GitConnectionsPublicController = GitConnectionsPublicController;
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, decorators_1.Post)('/'),
|
|
105
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.GIT_CONNECTIONS),
|
|
106
|
+
(0, decorators_1.ApiKeyScope)('gitConnection:create'),
|
|
107
|
+
(0, decorators_1.GlobalScope)('gitConnection:create'),
|
|
108
|
+
(0, decorators_1.ApiSummary)('Create a Git connection'),
|
|
109
|
+
(0, decorators_1.ApiDescription)('Creates a Git connection and its authentication material.'),
|
|
110
|
+
(0, decorators_1.ApiTags)(tags),
|
|
111
|
+
(0, decorators_1.ApiResponse)(201, api_types_1.GitConnectionPublicDto),
|
|
112
|
+
__param(2, decorators_1.Body),
|
|
113
|
+
__metadata("design:type", Function),
|
|
114
|
+
__metadata("design:paramtypes", [Object, Object, api_types_1.CreateGitConnectionDto]),
|
|
115
|
+
__metadata("design:returntype", Promise)
|
|
116
|
+
], GitConnectionsPublicController.prototype, "createGitConnection", null);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, decorators_1.Get)('/'),
|
|
119
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.GIT_CONNECTIONS),
|
|
120
|
+
(0, decorators_1.ApiKeyScope)('gitConnection:list'),
|
|
121
|
+
(0, decorators_1.GlobalScope)('gitConnection:list'),
|
|
122
|
+
(0, decorators_1.ApiSummary)('List Git connections'),
|
|
123
|
+
(0, decorators_1.ApiDescription)('Returns a cursor-paginated list of Git connections.'),
|
|
124
|
+
(0, decorators_1.ApiTags)(tags),
|
|
125
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.GitConnectionListPublicDto),
|
|
126
|
+
__param(2, decorators_1.Query),
|
|
127
|
+
__metadata("design:type", Function),
|
|
128
|
+
__metadata("design:paramtypes", [Object, Object, api_types_1.ListGitConnectionsQueryDto]),
|
|
129
|
+
__metadata("design:returntype", Promise)
|
|
130
|
+
], GitConnectionsPublicController.prototype, "getGitConnections", null);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, decorators_1.Get)('/:id'),
|
|
133
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.GIT_CONNECTIONS),
|
|
134
|
+
(0, decorators_1.ApiKeyScope)('gitConnection:read'),
|
|
135
|
+
(0, decorators_1.GlobalScope)('gitConnection:read'),
|
|
136
|
+
(0, decorators_1.ApiSummary)('Retrieve a Git connection'),
|
|
137
|
+
(0, decorators_1.ApiTags)(tags),
|
|
138
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.GitConnectionPublicDto),
|
|
139
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
140
|
+
__param(2, (0, decorators_1.Param)('id')),
|
|
141
|
+
__metadata("design:type", Function),
|
|
142
|
+
__metadata("design:paramtypes", [Object, Object, String]),
|
|
143
|
+
__metadata("design:returntype", Promise)
|
|
144
|
+
], GitConnectionsPublicController.prototype, "getGitConnection", null);
|
|
145
|
+
__decorate([
|
|
146
|
+
(0, decorators_1.Put)('/:id'),
|
|
147
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.GIT_CONNECTIONS),
|
|
148
|
+
(0, decorators_1.ApiKeyScope)('gitConnection:update'),
|
|
149
|
+
(0, decorators_1.GlobalScope)('gitConnection:update'),
|
|
150
|
+
(0, decorators_1.ApiSummary)('Update a Git connection'),
|
|
151
|
+
(0, decorators_1.ApiDescription)('Updates only the supplied fields. Secrets are never returned.'),
|
|
152
|
+
(0, decorators_1.ApiTags)(tags),
|
|
153
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.GitConnectionPublicDto),
|
|
154
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
155
|
+
__param(2, (0, decorators_1.Param)('id')),
|
|
156
|
+
__param(3, decorators_1.Body),
|
|
157
|
+
__metadata("design:type", Function),
|
|
158
|
+
__metadata("design:paramtypes", [Object, Object, String, api_types_1.UpdateGitConnectionDto]),
|
|
159
|
+
__metadata("design:returntype", Promise)
|
|
160
|
+
], GitConnectionsPublicController.prototype, "updateGitConnection", null);
|
|
161
|
+
__decorate([
|
|
162
|
+
(0, decorators_1.Post)('/:id/clone'),
|
|
163
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.GIT_CONNECTIONS),
|
|
164
|
+
(0, decorators_1.ApiKeyScope)('gitConnection:clone'),
|
|
165
|
+
(0, decorators_1.GlobalScope)('gitConnection:clone'),
|
|
166
|
+
(0, decorators_1.ApiSummary)('Clone a Git connection'),
|
|
167
|
+
(0, decorators_1.ApiDescription)('Clones the repository into local storage. Safe to call repeatedly.'),
|
|
168
|
+
(0, decorators_1.ApiTags)(tags),
|
|
169
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.GitConnectionPublicDto),
|
|
170
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
171
|
+
__param(2, (0, decorators_1.Param)('id')),
|
|
172
|
+
__param(3, decorators_1.Body),
|
|
173
|
+
__metadata("design:type", Function),
|
|
174
|
+
__metadata("design:paramtypes", [Object, Object, String, api_types_1.CloneGitConnectionDto]),
|
|
175
|
+
__metadata("design:returntype", Promise)
|
|
176
|
+
], GitConnectionsPublicController.prototype, "cloneGitConnection", null);
|
|
177
|
+
__decorate([
|
|
178
|
+
(0, decorators_1.Post)('/:id/disconnect'),
|
|
179
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.GIT_CONNECTIONS),
|
|
180
|
+
(0, decorators_1.ApiKeyScope)('gitConnection:clone'),
|
|
181
|
+
(0, decorators_1.GlobalScope)('gitConnection:clone'),
|
|
182
|
+
(0, decorators_1.ApiSummary)('Disconnect a Git connection'),
|
|
183
|
+
(0, decorators_1.ApiDescription)('Removes the local clone. The connection and its authentication material are retained.'),
|
|
184
|
+
(0, decorators_1.ApiTags)(tags),
|
|
185
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.GitConnectionPublicDto),
|
|
186
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
187
|
+
__param(2, (0, decorators_1.Param)('id')),
|
|
188
|
+
__metadata("design:type", Function),
|
|
189
|
+
__metadata("design:paramtypes", [Object, Object, String]),
|
|
190
|
+
__metadata("design:returntype", Promise)
|
|
191
|
+
], GitConnectionsPublicController.prototype, "disconnectGitConnection", null);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, decorators_1.Delete)('/:id'),
|
|
194
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.GIT_CONNECTIONS),
|
|
195
|
+
(0, decorators_1.ApiKeyScope)('gitConnection:delete'),
|
|
196
|
+
(0, decorators_1.GlobalScope)('gitConnection:delete'),
|
|
197
|
+
(0, decorators_1.ApiSummary)('Delete a Git connection'),
|
|
198
|
+
(0, decorators_1.ApiDescription)('Deletes a Git connection and its local files.'),
|
|
199
|
+
(0, decorators_1.ApiTags)(tags),
|
|
200
|
+
(0, decorators_1.ApiResponse)(204),
|
|
201
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
202
|
+
__param(2, (0, decorators_1.Param)('id')),
|
|
203
|
+
__metadata("design:type", Function),
|
|
204
|
+
__metadata("design:paramtypes", [Object, Object, String]),
|
|
205
|
+
__metadata("design:returntype", Promise)
|
|
206
|
+
], GitConnectionsPublicController.prototype, "deleteGitConnection", null);
|
|
207
|
+
__decorate([
|
|
208
|
+
(0, decorators_1.Post)('/:id/push'),
|
|
209
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.GIT_CONNECTIONS),
|
|
210
|
+
(0, decorators_1.ApiKeyScope)('gitConnection:push'),
|
|
211
|
+
(0, decorators_1.GlobalScope)('gitConnection:push'),
|
|
212
|
+
(0, decorators_1.ApiSummary)('Push all projects linked to a Git connection'),
|
|
213
|
+
(0, decorators_1.ApiDescription)('Work in progress. Exports all linked projects to the local repository working copy. It does not commit or push changes to the selected branch yet.'),
|
|
214
|
+
(0, decorators_1.ApiTags)(tags),
|
|
215
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.GitConnectionPushResultDto),
|
|
216
|
+
(0, decorators_1.ApiErrorResponse)(400),
|
|
217
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
218
|
+
(0, decorators_1.ApiErrorResponse)(503),
|
|
219
|
+
__param(2, (0, decorators_1.Param)('id')),
|
|
220
|
+
__metadata("design:type", Function),
|
|
221
|
+
__metadata("design:paramtypes", [Object, Object, String]),
|
|
222
|
+
__metadata("design:returntype", Promise)
|
|
223
|
+
], GitConnectionsPublicController.prototype, "pushGitConnectionProjects", null);
|
|
224
|
+
__decorate([
|
|
225
|
+
(0, decorators_1.Get)('/:id/projects'),
|
|
226
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.GIT_CONNECTIONS),
|
|
227
|
+
(0, decorators_1.ApiKeyScope)('gitConnection:read'),
|
|
228
|
+
(0, decorators_1.GlobalScope)('gitConnection:read'),
|
|
229
|
+
(0, decorators_1.ApiSummary)('List projects added to a Git connection'),
|
|
230
|
+
(0, decorators_1.ApiTags)(tags),
|
|
231
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.GitConnectionProjectListPublicDto),
|
|
232
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
233
|
+
__param(2, (0, decorators_1.Param)('id')),
|
|
234
|
+
__metadata("design:type", Function),
|
|
235
|
+
__metadata("design:paramtypes", [Object, Object, String]),
|
|
236
|
+
__metadata("design:returntype", Promise)
|
|
237
|
+
], GitConnectionsPublicController.prototype, "getGitConnectionProjects", null);
|
|
238
|
+
__decorate([
|
|
239
|
+
(0, decorators_1.Post)('/:id/projects/:projectId'),
|
|
240
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.GIT_CONNECTIONS),
|
|
241
|
+
(0, decorators_1.ApiKeyScope)('gitConnection:manageProjects'),
|
|
242
|
+
(0, decorators_1.GlobalScope)('gitConnection:manageProjects'),
|
|
243
|
+
(0, decorators_1.ApiSummary)('Add a project to a Git connection'),
|
|
244
|
+
(0, decorators_1.ApiDescription)('Adds a team project to the connection. A project can be added to only one connection.'),
|
|
245
|
+
(0, decorators_1.ApiTags)(tags),
|
|
246
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.GitConnectionProjectPublicDto),
|
|
247
|
+
(0, decorators_1.ApiErrorResponse)(400),
|
|
248
|
+
(0, decorators_1.ApiErrorResponse)(403),
|
|
249
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
250
|
+
(0, decorators_1.ApiErrorResponse)(409),
|
|
251
|
+
__param(2, (0, decorators_1.Param)('id')),
|
|
252
|
+
__param(3, (0, decorators_1.Param)('projectId')),
|
|
253
|
+
__metadata("design:type", Function),
|
|
254
|
+
__metadata("design:paramtypes", [Object, Object, String, String]),
|
|
255
|
+
__metadata("design:returntype", Promise)
|
|
256
|
+
], GitConnectionsPublicController.prototype, "addProjectToGitConnection", null);
|
|
257
|
+
__decorate([
|
|
258
|
+
(0, decorators_1.Delete)('/:id/projects/:projectId'),
|
|
259
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.GIT_CONNECTIONS),
|
|
260
|
+
(0, decorators_1.ApiKeyScope)('gitConnection:manageProjects'),
|
|
261
|
+
(0, decorators_1.GlobalScope)('gitConnection:manageProjects'),
|
|
262
|
+
(0, decorators_1.ApiSummary)('Remove a project from a Git connection'),
|
|
263
|
+
(0, decorators_1.ApiTags)(tags),
|
|
264
|
+
(0, decorators_1.ApiResponse)(204),
|
|
265
|
+
(0, decorators_1.ApiErrorResponse)(403),
|
|
266
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
267
|
+
(0, decorators_1.ApiErrorResponse)(409),
|
|
268
|
+
__param(2, (0, decorators_1.Param)('id')),
|
|
269
|
+
__param(3, (0, decorators_1.Param)('projectId')),
|
|
270
|
+
__metadata("design:type", Function),
|
|
271
|
+
__metadata("design:paramtypes", [Object, Object, String, String]),
|
|
272
|
+
__metadata("design:returntype", Promise)
|
|
273
|
+
], GitConnectionsPublicController.prototype, "removeProjectFromGitConnection", null);
|
|
274
|
+
exports.GitConnectionsPublicController = GitConnectionsPublicController = __decorate([
|
|
275
|
+
(0, decorators_1.PublicApiController)('/git-connections'),
|
|
276
|
+
__metadata("design:paramtypes", [backend_common_1.ModuleRegistry])
|
|
277
|
+
], GitConnectionsPublicController);
|
|
278
|
+
//# sourceMappingURL=git-connections.public.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-connections.public.controller.js","sourceRoot":"","sources":["../../../../src/public-api/v1/controllers/git-connections.public.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAWwB;AACxB,wDAAqD;AACrD,8CAAkD;AAElD,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IAC3C,IAAA,uBAAU,EAAC,wCAAwC,CAAC;IACpD,IAAA,oBAAO,EAAC,IAAI,CAAC;IACb,IAAA,wBAAW,EAAC,GAAG,CAAC;IAChB,IAAA,6BAAgB,EAAC,GAAG,CAAC;IACrB,IAAA,6BAAgB,EAAC,GAAG,CAAC;IACrB,IAAA,6BAAgB,EAAC,GAAG,CAAC;IAIpB,WAAA,IAAA,kBAAK,EAAC,IAAI,CAAC,CAAA;IACX,WAAA,IAAA,kBAAK,EAAC,WAAW,CAAC,CAAA;;;;oFAOnB;yCAjPW,8BAA8B;IAD1C,IAAA,gCAAmB,EAAC,kBAAkB,CAAC;qCAEM,+BAAc;GAD/C,8BAA8B,CAkP1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/public-api/v1/controllers/index.ts"],"names":[],"mappings":";;AAKA,kDAAgD;AAChD,qCAAmC;AACnC,oCAAkC;AAClC,yCAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/public-api/v1/controllers/index.ts"],"names":[],"mappings":";;AAKA,+CAA6C;AAC7C,kDAAgD;AAChD,qCAAmC;AACnC,oCAAkC;AAClC,yCAAuC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateRoleMappingRuleDto, RoleMappingRulePublicDto } from '@n8n/api-types';
|
|
1
|
+
import { CreateRoleMappingRuleDto, MoveRoleMappingRuleDto, RoleMappingRuleListPublicDto, RoleMappingRuleListQueryPublicDto, RoleMappingRulePublicDto, UpdateRoleMappingRulePublicDto } from '@n8n/api-types';
|
|
2
2
|
import { LicenseState } from '@n8n/backend-common';
|
|
3
3
|
import { AuthenticatedRequest } from '@n8n/db';
|
|
4
4
|
import type { Response } from 'express';
|
|
@@ -7,5 +7,10 @@ export declare class RoleMappingRulesPublicController {
|
|
|
7
7
|
private readonly roleMappingRuleService;
|
|
8
8
|
private readonly licenseState;
|
|
9
9
|
constructor(roleMappingRuleService: RoleMappingRuleService, licenseState: LicenseState);
|
|
10
|
+
getRoleMappingRules(_req: AuthenticatedRequest, _res: Response, query: RoleMappingRuleListQueryPublicDto): Promise<RoleMappingRuleListPublicDto>;
|
|
10
11
|
createRoleMappingRule(req: AuthenticatedRequest, _res: Response, body: CreateRoleMappingRuleDto): Promise<RoleMappingRulePublicDto>;
|
|
12
|
+
moveRoleMappingRule(req: AuthenticatedRequest, _res: Response, roleMappingRuleId: string, body: MoveRoleMappingRuleDto): Promise<RoleMappingRulePublicDto>;
|
|
13
|
+
updateRoleMappingRule(req: AuthenticatedRequest, _res: Response, roleMappingRuleId: string, body: UpdateRoleMappingRulePublicDto): Promise<RoleMappingRulePublicDto>;
|
|
14
|
+
deleteRoleMappingRule(req: AuthenticatedRequest, _res: Response, roleMappingRuleId: string): Promise<RoleMappingRulePublicDto>;
|
|
15
|
+
private assertProvisioningLicensed;
|
|
11
16
|
}
|
|
@@ -18,29 +18,94 @@ 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
20
|
const role_mapping_rule_service_ee_1 = require("../../../modules/provisioning.ee/role-mapping-rule.service.ee");
|
|
21
|
+
const pagination_service_1 = require("../../../public-api/v1/shared/services/pagination.service");
|
|
22
|
+
function toRoleMappingRulePublicDto(rule) {
|
|
23
|
+
return {
|
|
24
|
+
id: rule.id,
|
|
25
|
+
expression: rule.expression,
|
|
26
|
+
role: rule.role,
|
|
27
|
+
type: rule.type,
|
|
28
|
+
order: rule.order,
|
|
29
|
+
projectIds: rule.projectIds,
|
|
30
|
+
createdAt: rule.createdAt,
|
|
31
|
+
updatedAt: rule.updatedAt,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
21
34
|
let RoleMappingRulesPublicController = class RoleMappingRulesPublicController {
|
|
22
35
|
constructor(roleMappingRuleService, licenseState) {
|
|
23
36
|
this.roleMappingRuleService = roleMappingRuleService;
|
|
24
37
|
this.licenseState = licenseState;
|
|
25
38
|
}
|
|
39
|
+
async getRoleMappingRules(_req, _res, query) {
|
|
40
|
+
this.assertProvisioningLicensed();
|
|
41
|
+
const { offset, limit } = (0, pagination_service_1.resolveOffsetPagination)(query);
|
|
42
|
+
const { count, items } = await this.roleMappingRuleService.list({
|
|
43
|
+
skip: offset,
|
|
44
|
+
take: limit,
|
|
45
|
+
type: query.type,
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
data: items.map(toRoleMappingRulePublicDto),
|
|
49
|
+
nextCursor: (0, pagination_service_1.encodeNextCursor)({
|
|
50
|
+
offset,
|
|
51
|
+
limit,
|
|
52
|
+
numberOfTotalRecords: count,
|
|
53
|
+
}),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
26
56
|
async createRoleMappingRule(req, _res, body) {
|
|
57
|
+
this.assertProvisioningLicensed();
|
|
58
|
+
const rule = await this.roleMappingRuleService.create(body, req.user);
|
|
59
|
+
return toRoleMappingRulePublicDto(rule);
|
|
60
|
+
}
|
|
61
|
+
async moveRoleMappingRule(req, _res, roleMappingRuleId, body) {
|
|
62
|
+
this.assertProvisioningLicensed();
|
|
63
|
+
const rule = await this.roleMappingRuleService.move({
|
|
64
|
+
id: roleMappingRuleId,
|
|
65
|
+
targetIndex: body.targetIndex,
|
|
66
|
+
userId: req.user.id,
|
|
67
|
+
userEmail: req.user.email,
|
|
68
|
+
});
|
|
69
|
+
return toRoleMappingRulePublicDto(rule);
|
|
70
|
+
}
|
|
71
|
+
async updateRoleMappingRule(req, _res, roleMappingRuleId, body) {
|
|
72
|
+
this.assertProvisioningLicensed();
|
|
73
|
+
const rule = await this.roleMappingRuleService.patch({
|
|
74
|
+
id: roleMappingRuleId,
|
|
75
|
+
dto: body,
|
|
76
|
+
userId: req.user.id,
|
|
77
|
+
userEmail: req.user.email,
|
|
78
|
+
});
|
|
79
|
+
return toRoleMappingRulePublicDto(rule);
|
|
80
|
+
}
|
|
81
|
+
async deleteRoleMappingRule(req, _res, roleMappingRuleId) {
|
|
82
|
+
this.assertProvisioningLicensed();
|
|
83
|
+
const rule = await this.roleMappingRuleService.delete({
|
|
84
|
+
id: roleMappingRuleId,
|
|
85
|
+
userId: req.user.id,
|
|
86
|
+
userEmail: req.user.email,
|
|
87
|
+
});
|
|
88
|
+
return toRoleMappingRulePublicDto(rule);
|
|
89
|
+
}
|
|
90
|
+
assertProvisioningLicensed() {
|
|
27
91
|
if (!this.licenseState.isProvisioningLicensed()) {
|
|
28
92
|
throw new forbidden_error_1.ForbiddenError('Provisioning is not licensed');
|
|
29
93
|
}
|
|
30
|
-
const rule = await this.roleMappingRuleService.create(body, req.user);
|
|
31
|
-
return {
|
|
32
|
-
id: rule.id,
|
|
33
|
-
expression: rule.expression,
|
|
34
|
-
role: rule.role,
|
|
35
|
-
type: rule.type,
|
|
36
|
-
order: rule.order,
|
|
37
|
-
projectIds: rule.projectIds,
|
|
38
|
-
createdAt: rule.createdAt,
|
|
39
|
-
updatedAt: rule.updatedAt,
|
|
40
|
-
};
|
|
41
94
|
}
|
|
42
95
|
};
|
|
43
96
|
exports.RoleMappingRulesPublicController = RoleMappingRulesPublicController;
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, decorators_1.Get)('/'),
|
|
99
|
+
(0, decorators_1.ApiKeyScope)('roleMappingRule:list'),
|
|
100
|
+
(0, decorators_1.ApiSummary)('Retrieve role-mapping rules'),
|
|
101
|
+
(0, decorators_1.ApiDescription)("Returns the configured role-mapping rules. `order` is the rule's evaluation position within its own `type`, so instance and project rules each have their own sequence starting at 0 — filter by `type` to retrieve a single evaluation order."),
|
|
102
|
+
(0, decorators_1.ApiTags)(['RoleMappingRule']),
|
|
103
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.RoleMappingRuleListPublicDto),
|
|
104
|
+
__param(2, decorators_1.Query),
|
|
105
|
+
__metadata("design:type", Function),
|
|
106
|
+
__metadata("design:paramtypes", [Object, Object, api_types_1.RoleMappingRuleListQueryPublicDto]),
|
|
107
|
+
__metadata("design:returntype", Promise)
|
|
108
|
+
], RoleMappingRulesPublicController.prototype, "getRoleMappingRules", null);
|
|
44
109
|
__decorate([
|
|
45
110
|
(0, decorators_1.Post)('/'),
|
|
46
111
|
(0, decorators_1.ApiKeyScope)('roleMappingRule:create'),
|
|
@@ -54,6 +119,47 @@ __decorate([
|
|
|
54
119
|
__metadata("design:paramtypes", [Object, Object, api_types_1.CreateRoleMappingRuleDto]),
|
|
55
120
|
__metadata("design:returntype", Promise)
|
|
56
121
|
], RoleMappingRulesPublicController.prototype, "createRoleMappingRule", null);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, decorators_1.Post)('/:roleMappingRuleId/move'),
|
|
124
|
+
(0, decorators_1.ApiKeyScope)('roleMappingRule:update'),
|
|
125
|
+
(0, decorators_1.ApiSummary)('Move a role-mapping rule'),
|
|
126
|
+
(0, decorators_1.ApiDescription)("Changes a rule's position in the evaluation order for its type. `targetIndex` is the desired 0-based position within the rule's own `type` sequence; a value beyond the last position moves the rule to the end."),
|
|
127
|
+
(0, decorators_1.ApiTags)(['RoleMappingRule']),
|
|
128
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.RoleMappingRulePublicDto),
|
|
129
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
130
|
+
__param(2, (0, decorators_1.Param)('roleMappingRuleId')),
|
|
131
|
+
__param(3, decorators_1.Body),
|
|
132
|
+
__metadata("design:type", Function),
|
|
133
|
+
__metadata("design:paramtypes", [Object, Object, String, api_types_1.MoveRoleMappingRuleDto]),
|
|
134
|
+
__metadata("design:returntype", Promise)
|
|
135
|
+
], RoleMappingRulesPublicController.prototype, "moveRoleMappingRule", null);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, decorators_1.Patch)('/:roleMappingRuleId'),
|
|
138
|
+
(0, decorators_1.ApiKeyScope)('roleMappingRule:update'),
|
|
139
|
+
(0, decorators_1.ApiSummary)('Update a role-mapping rule'),
|
|
140
|
+
(0, decorators_1.ApiDescription)("Updates a rule's claim expression, role, and/or project assignments. A rule's type cannot be changed once created, so `type` isn't accepted here, and reordering is handled by the move endpoint."),
|
|
141
|
+
(0, decorators_1.ApiTags)(['RoleMappingRule']),
|
|
142
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.RoleMappingRulePublicDto),
|
|
143
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
144
|
+
__param(2, (0, decorators_1.Param)('roleMappingRuleId')),
|
|
145
|
+
__param(3, decorators_1.Body),
|
|
146
|
+
__metadata("design:type", Function),
|
|
147
|
+
__metadata("design:paramtypes", [Object, Object, String, api_types_1.UpdateRoleMappingRulePublicDto]),
|
|
148
|
+
__metadata("design:returntype", Promise)
|
|
149
|
+
], RoleMappingRulesPublicController.prototype, "updateRoleMappingRule", null);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, decorators_1.Delete)('/:roleMappingRuleId'),
|
|
152
|
+
(0, decorators_1.ApiKeyScope)('roleMappingRule:delete'),
|
|
153
|
+
(0, decorators_1.ApiSummary)('Delete a role-mapping rule'),
|
|
154
|
+
(0, decorators_1.ApiDescription)('Deletes a role-mapping rule. The remaining rules of the same type close the gap, so their `order` values stay a contiguous sequence starting at 0.'),
|
|
155
|
+
(0, decorators_1.ApiTags)(['RoleMappingRule']),
|
|
156
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.RoleMappingRulePublicDto),
|
|
157
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
158
|
+
__param(2, (0, decorators_1.Param)('roleMappingRuleId')),
|
|
159
|
+
__metadata("design:type", Function),
|
|
160
|
+
__metadata("design:paramtypes", [Object, Object, String]),
|
|
161
|
+
__metadata("design:returntype", Promise)
|
|
162
|
+
], RoleMappingRulesPublicController.prototype, "deleteRoleMappingRule", null);
|
|
57
163
|
exports.RoleMappingRulesPublicController = RoleMappingRulesPublicController = __decorate([
|
|
58
164
|
(0, decorators_1.PublicApiController)('/role-mapping-rules'),
|
|
59
165
|
__metadata("design:paramtypes", [role_mapping_rule_service_ee_1.RoleMappingRuleService, backend_common_1.LicenseState])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role-mapping-rules.public.controller.js","sourceRoot":"","sources":["../../../../src/public-api/v1/controllers/role-mapping-rules.public.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"role-mapping-rules.public.controller.js","sourceRoot":"","sources":["../../../../src/public-api/v1/controllers/role-mapping-rules.public.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAOwB;AACxB,wDAAmD;AAEnD,gDAeyB;AAGzB,8EAA0E;AAE1E,yGAAgG;AAChG,2FAG4D;AAE5D,SAAS,0BAA0B,CAAC,IAA6B;IAChE,OAAO;QACN,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,SAAS,EAAE,IAAI,CAAC,SAAS;KACzB,CAAC;AACH,CAAC;AAGM,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAC5C,YACkB,sBAA8C,EAC9C,YAA0B;sCAD1B,sBAAsB;4BACtB,YAAY;IAC3B,CAAC;IAUE,AAAN,KAAK,CAAC,mBAAmB,CACxB,IAA0B,EAC1B,IAAc,EACP,KAAwC;QAE/C,IAAI,CAAC,0BAA0B,EAAE,CAAC;QAElC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,4CAAuB,EAAC,KAAK,CAAC,CAAC;QAEzD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC;YAC/D,IAA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GAAG,EAAE,oCAAwB,CAAC;IAC1C,IAAA,6BAAgB,EAAC,GAAG,CAAC;IAIpB,WAAA,IAAA,kBAAK,EAAC,mBAAmB,CAAC,CAAA;;;;6EAW3B;2CAzIW,gCAAgC;IAD5C,IAAA,gCAAmB,EAAC,qBAAqB,CAAC;qCAGA,qDAAsB,EAChC,6BAAY;GAHhC,gCAAgC,CAgJ5C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateRoleDto, RoleGetPublicDto, RoleListPublicDto, RoleListQueryPublicDto, RolePublicDto, UpdateRolePublicDto } from '@n8n/api-types';
|
|
1
|
+
import { CreateRoleDto, RoleDeleteQueryDto, RoleGetPublicDto, RoleListPublicDto, RoleListQueryPublicDto, RolePublicDto, UpdateRolePublicDto } from '@n8n/api-types';
|
|
2
2
|
import { AuthenticatedRequest } from '@n8n/db';
|
|
3
3
|
import type { Response } from 'express';
|
|
4
4
|
import { EventService } from '../../../events/event.service';
|
|
@@ -11,4 +11,5 @@ export declare class RolesPublicController {
|
|
|
11
11
|
getRole(_req: AuthenticatedRequest, _res: Response, slug: string, query: RoleListQueryPublicDto): Promise<RoleGetPublicDto>;
|
|
12
12
|
createRole(req: AuthenticatedRequest, _res: Response, createRole: CreateRoleDto): Promise<RolePublicDto>;
|
|
13
13
|
updateRole(req: AuthenticatedRequest, _res: Response, slug: string, updateRole: UpdateRolePublicDto): Promise<RolePublicDto>;
|
|
14
|
+
deleteRole(req: AuthenticatedRequest, _res: Response, slug: string, query: RoleDeleteQueryDto): Promise<RolePublicDto>;
|
|
14
15
|
}
|
|
@@ -65,7 +65,11 @@ let RolesPublicController = class RolesPublicController {
|
|
|
65
65
|
return toRoleGetPublicDto({ ...role, roleType: role.roleType }, withUsageCount);
|
|
66
66
|
}
|
|
67
67
|
async createRole(req, _res, createRole) {
|
|
68
|
-
(0, role_authorization_1.assertCanManageRoleType)(
|
|
68
|
+
(0, role_authorization_1.assertCanManageRoleType)({
|
|
69
|
+
apiKeyScopes: req.tokenGrant?.apiKeyScopes ?? [],
|
|
70
|
+
roleType: createRole.roleType,
|
|
71
|
+
user: req.user,
|
|
72
|
+
});
|
|
69
73
|
const role = await this.roleService.createCustomRole(createRole);
|
|
70
74
|
this.eventService.emit('custom-role-created', {
|
|
71
75
|
userId: req.user.id,
|
|
@@ -79,7 +83,11 @@ let RolesPublicController = class RolesPublicController {
|
|
|
79
83
|
if (!isPublicRole(role)) {
|
|
80
84
|
throw new not_found_error_1.NotFoundError('Role not found');
|
|
81
85
|
}
|
|
82
|
-
(0, role_authorization_1.assertCanManageRoleType)(
|
|
86
|
+
(0, role_authorization_1.assertCanManageRoleType)({
|
|
87
|
+
apiKeyScopes: req.tokenGrant?.apiKeyScopes ?? [],
|
|
88
|
+
roleType: role.roleType,
|
|
89
|
+
user: req.user,
|
|
90
|
+
});
|
|
83
91
|
const result = await this.roleService.updateCustomRole({
|
|
84
92
|
slug,
|
|
85
93
|
newRole: updateRole,
|
|
@@ -87,6 +95,27 @@ let RolesPublicController = class RolesPublicController {
|
|
|
87
95
|
});
|
|
88
96
|
return toRolePublicDto({ ...result, roleType: role.roleType });
|
|
89
97
|
}
|
|
98
|
+
async deleteRole(req, _res, slug, query) {
|
|
99
|
+
const role = await this.roleService.getRole(slug);
|
|
100
|
+
if (!isPublicRole(role)) {
|
|
101
|
+
throw new not_found_error_1.NotFoundError('Role not found');
|
|
102
|
+
}
|
|
103
|
+
const apiKeyScopes = req.tokenGrant?.apiKeyScopes ?? [];
|
|
104
|
+
(0, role_authorization_1.assertCanManageRoleType)({
|
|
105
|
+
apiKeyScopes,
|
|
106
|
+
roleType: role.roleType,
|
|
107
|
+
user: req.user,
|
|
108
|
+
});
|
|
109
|
+
const reassignRoleSlug = (0, role_authorization_1.canReassignUsers)({ apiKeyScopes, role, user: req.user })
|
|
110
|
+
? query.reassignRoleSlug
|
|
111
|
+
: undefined;
|
|
112
|
+
const result = await this.roleService.removeCustomRole({
|
|
113
|
+
slug,
|
|
114
|
+
reassignRoleSlug,
|
|
115
|
+
userId: req.user.id,
|
|
116
|
+
});
|
|
117
|
+
return toRolePublicDto({ ...result, roleType: role.roleType });
|
|
118
|
+
}
|
|
90
119
|
};
|
|
91
120
|
exports.RolesPublicController = RolesPublicController;
|
|
92
121
|
__decorate([
|
|
@@ -143,6 +172,21 @@ __decorate([
|
|
|
143
172
|
__metadata("design:paramtypes", [Object, Object, String, api_types_1.UpdateRolePublicDto]),
|
|
144
173
|
__metadata("design:returntype", Promise)
|
|
145
174
|
], RolesPublicController.prototype, "updateRole", null);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, decorators_1.Delete)('/:slug'),
|
|
177
|
+
(0, decorators_1.ApiKeyScope)({ anyOf: ['role:manage', 'role:manageProject'] }),
|
|
178
|
+
(0, decorators_1.Licensed)(constants_1.LICENSE_FEATURES.CUSTOM_ROLES),
|
|
179
|
+
(0, decorators_1.ApiSummary)('Delete a custom role'),
|
|
180
|
+
(0, decorators_1.ApiDescription)('Deletes a custom role. System roles cannot be deleted. A role with users assigned cannot be deleted unless `reassignRoleSlug` is set to move those users to another role first.'),
|
|
181
|
+
(0, decorators_1.ApiTags)(['Role']),
|
|
182
|
+
(0, decorators_1.ApiResponse)(200, api_types_1.RolePublicDto),
|
|
183
|
+
(0, decorators_1.ApiErrorResponse)(404),
|
|
184
|
+
__param(2, (0, decorators_1.Param)('slug')),
|
|
185
|
+
__param(3, decorators_1.Query),
|
|
186
|
+
__metadata("design:type", Function),
|
|
187
|
+
__metadata("design:paramtypes", [Object, Object, String, api_types_1.RoleDeleteQueryDto]),
|
|
188
|
+
__metadata("design:returntype", Promise)
|
|
189
|
+
], RolesPublicController.prototype, "deleteRole", null);
|
|
146
190
|
exports.RolesPublicController = RolesPublicController = __decorate([
|
|
147
191
|
(0, decorators_1.PublicApiController)('/roles'),
|
|
148
192
|
__metadata("design:paramtypes", [role_service_1.RoleService, event_service_1.EventService])
|