n8n 2.37.6 → 2.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/active-executions.js +2 -1
- package/dist/active-executions.js.map +1 -1
- package/dist/active-workflow-manager.d.ts +5 -1
- package/dist/active-workflow-manager.js +64 -33
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/binary-data/binary-data-access.service.d.ts +11 -0
- package/dist/binary-data/binary-data-access.service.js +50 -0
- package/dist/binary-data/binary-data-access.service.js.map +1 -0
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/base-command.d.ts +2 -0
- package/dist/commands/base-command.js +8 -0
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/import/workflow.d.ts +1 -0
- package/dist/commands/import/workflow.js +12 -3
- package/dist/commands/import/workflow.js.map +1 -1
- package/dist/commands/start.d.ts +1 -0
- package/dist/commands/start.js +2 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +3 -1
- package/dist/constants.js.map +1 -1
- package/dist/controllers/binary-data.controller.d.ts +5 -2
- package/dist/controllers/binary-data.controller.js +11 -3
- package/dist/controllers/binary-data.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.d.ts +1 -6
- package/dist/controllers/e2e.controller.js +7 -20
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/project.controller.d.ts +4 -10
- package/dist/controllers/project.controller.js +14 -114
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/telemetry.controller.js +1 -1
- package/dist/controllers/telemetry.controller.js.map +1 -1
- package/dist/credentials/credentials-finder.service.d.ts +2 -0
- package/dist/credentials/credentials-finder.service.js +46 -12
- package/dist/credentials/credentials-finder.service.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +5 -2
- package/dist/credentials/credentials.service.js +4 -1
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials-helper.d.ts +3 -1
- package/dist/credentials-helper.js +10 -2
- package/dist/credentials-helper.js.map +1 -1
- package/dist/deprecation/deprecation.service.js +5 -0
- package/dist/deprecation/deprecation.service.js.map +1 -1
- package/dist/errors/http-error-serializers.js +3 -0
- package/dist/errors/http-error-serializers.js.map +1 -1
- package/dist/errors/variable-validation.error.d.ts +2 -2
- package/dist/errors/variable-validation.error.js +1 -1
- package/dist/errors/variable-validation.error.js.map +1 -1
- package/dist/evaluation.ee/evaluation-config-validator.js +3 -2
- package/dist/evaluation.ee/evaluation-config-validator.js.map +1 -1
- package/dist/evaluation.ee/evaluation-dataset.service.js +8 -1
- package/dist/evaluation.ee/evaluation-dataset.service.js.map +1 -1
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.js +96 -45
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.js.map +1 -1
- package/dist/execution-lifecycle/execute-error-workflow.js +3 -0
- package/dist/execution-lifecycle/execute-error-workflow.js.map +1 -1
- package/dist/executions/engine-v2-execution-reader.service.d.ts +11 -0
- package/dist/executions/engine-v2-execution-reader.service.js +68 -0
- package/dist/executions/engine-v2-execution-reader.service.js.map +1 -0
- package/dist/executions/execution-id.d.ts +5 -0
- package/dist/executions/execution-id.js +10 -0
- package/dist/executions/execution-id.js.map +1 -0
- package/dist/executions/execution.service.d.ts +3 -1
- package/dist/executions/execution.service.js +16 -8
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/executions.controller.d.ts +1 -0
- package/dist/executions/executions.controller.js +12 -6
- package/dist/executions/executions.controller.js.map +1 -1
- package/dist/expression-observability/expression-observability.provider.js +3 -2
- package/dist/expression-observability/expression-observability.provider.js.map +1 -1
- package/dist/license/license.service.js +1 -1
- package/dist/license/license.service.js.map +1 -1
- package/dist/metrics/prometheus/instance-ai-metrics.service.js.map +1 -1
- package/dist/middlewares/content-security-policy.d.ts +10 -0
- package/dist/middlewares/content-security-policy.js +53 -0
- package/dist/middlewares/content-security-policy.js.map +1 -0
- package/dist/middlewares/index.d.ts +1 -0
- package/dist/middlewares/index.js +1 -0
- package/dist/middlewares/index.js.map +1 -1
- package/dist/modules/agents/agent-config.service.js +0 -3
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-default-model-resolver.service.js +2 -4
- package/dist/modules/agents/agent-default-model-resolver.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-orchestrator.service.js +13 -6
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.d.ts +1 -0
- package/dist/modules/agents/agent-execution.service.js +3 -0
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integrations.controller.d.ts +7 -5
- package/dist/modules/agents/agent-integrations.controller.js +10 -17
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-model-catalog.service.js +6 -12
- package/dist/modules/agents/agent-model-catalog.service.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.d.ts +2 -3
- package/dist/modules/agents/agent-publish.service.js +12 -5
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.d.ts +5 -0
- package/dist/modules/agents/agent-runtime-cache.service.js +57 -3
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +14 -7
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +89 -36
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-sandbox-runtime.service.d.ts +4 -2
- package/dist/modules/agents/agent-sandbox-runtime.service.js +21 -11
- package/dist/modules/agents/agent-sandbox-runtime.service.js.map +1 -1
- package/dist/modules/agents/agent-validation.service.js +0 -4
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.js +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-tool-resume.service.d.ts +32 -0
- package/dist/modules/agents/agent-workflow-tool-resume.service.js +168 -0
- package/dist/modules/agents/agent-workflow-tool-resume.service.js.map +1 -0
- package/dist/modules/agents/agent-workspace.service.d.ts +8 -2
- package/dist/modules/agents/agent-workspace.service.js +15 -4
- package/dist/modules/agents/agent-workspace.service.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +1 -1
- package/dist/modules/agents/agents.module.js +8 -7
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +4 -6
- package/dist/modules/agents/builder/agents-builder-tools.service.js +16 -21
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +5 -7
- package/dist/modules/agents/builder/agents-builder.service.js +27 -36
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/call-agent-failure.d.ts +5 -0
- package/dist/modules/agents/builder/call-agent-failure.js +28 -0
- package/dist/modules/agents/builder/call-agent-failure.js.map +1 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +3 -2
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +8 -9
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/finish-setup.tool.d.ts +3 -2
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js +16 -6
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +57 -44
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +3 -2
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.js +6 -0
- package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -1
- package/dist/modules/agents/builder/skills/external-services.skill.js +51 -8
- package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/sub-agents.skill.js +15 -12
- package/dist/modules/agents/builder/skills/sub-agents.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +16 -5
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-channel-status.entity.d.ts +16 -0
- package/dist/modules/agents/entities/agent-channel-status.entity.js +99 -0
- package/dist/modules/agents/entities/agent-channel-status.entity.js.map +1 -0
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +3 -3
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +17 -7
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-channel-reconciler.service.d.ts +38 -0
- package/dist/modules/agents/integrations/agent-channel-reconciler.service.js +260 -0
- package/dist/modules/agents/integrations/agent-channel-reconciler.service.js.map +1 -0
- package/dist/modules/agents/integrations/agent-channel-status-reporter.d.ts +23 -0
- package/dist/modules/agents/integrations/agent-channel-status-reporter.js +114 -0
- package/dist/modules/agents/integrations/agent-channel-status-reporter.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +9 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.js +53 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.d.ts +1 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js +3 -2
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +5 -2
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/channel-status-report.d.ts +4 -0
- package/dist/modules/agents/integrations/channel-status-report.js +58 -0
- package/dist/modules/agents/integrations/channel-status-report.js.map +1 -0
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +17 -2
- package/dist/modules/agents/integrations/chat-integration.service.js +63 -35
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/credential-claim.d.ts +3 -0
- package/dist/modules/agents/integrations/credential-claim.js +12 -0
- package/dist/modules/agents/integrations/credential-claim.js.map +1 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.d.ts +2 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js +25 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/discord-integration.d.ts +2 -1
- package/dist/modules/agents/integrations/platforms/discord-integration.js +9 -6
- package/dist/modules/agents/integrations/platforms/discord-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-integration.js +1 -1
- package/dist/modules/agents/integrations/platforms/linear-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.d.ts +2 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js +7 -6
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +4 -6
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +11 -14
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/json-config/credential-field-mapping.js +3 -0
- package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -1
- package/dist/modules/agents/llm-provider-defaults.js +16 -1
- package/dist/modules/agents/llm-provider-defaults.js.map +1 -1
- package/dist/modules/agents/repositories/agent-channel-status.repository.d.ts +29 -0
- package/dist/modules/agents/repositories/agent-channel-status.repository.js +63 -0
- package/dist/modules/agents/repositories/agent-channel-status.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +1 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js +4 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +29 -19
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.d.ts +6 -3
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js +43 -16
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.d.ts +1 -0
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js +18 -6
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +24 -13
- package/dist/modules/agents/tools/workflow-tool-factory.js +147 -9
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.d.ts +10 -2
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js +23 -4
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js.map +1 -1
- package/dist/modules/agents/utils/provider-model-id.d.ts +2 -0
- package/dist/modules/agents/utils/provider-model-id.js +21 -0
- package/dist/modules/agents/utils/provider-model-id.js.map +1 -0
- package/dist/modules/community-packages/community-packages.service.d.ts +4 -0
- package/dist/modules/community-packages/community-packages.service.js +96 -92
- package/dist/modules/community-packages/community-packages.service.js.map +1 -1
- package/dist/modules/community-packages/npm-utils.js +1 -5
- package/dist/modules/community-packages/npm-utils.js.map +1 -1
- package/dist/modules/data-table/data-table-aggregate.service.d.ts +1 -1
- package/dist/modules/data-table/data-table-aggregate.service.js +1 -1
- package/dist/modules/data-table/data-table-aggregate.service.js.map +1 -1
- package/dist/modules/data-table/data-table.service.d.ts +9 -4
- package/dist/modules/data-table/data-table.service.js +34 -4
- package/dist/modules/data-table/data-table.service.js.map +1 -1
- package/dist/modules/data-table/errors/data-table-access-denied.error.d.ts +4 -0
- package/dist/modules/data-table/errors/data-table-access-denied.error.js +13 -0
- package/dist/modules/data-table/errors/data-table-access-denied.error.js.map +1 -0
- package/dist/modules/dynamic-credentials.ee/config-redaction.d.ts +5 -0
- package/dist/modules/dynamic-credentials.ee/config-redaction.js +81 -0
- package/dist/modules/dynamic-credentials.ee/config-redaction.js.map +1 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.d.ts +2 -3
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js +2 -4
- 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.controller.d.ts +1 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js +18 -4
- package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js +3 -2
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +22 -4
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.d.ts +1 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js +12 -2
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js.map +1 -1
- package/dist/modules/encryption-key-manager/key-manager.service.d.ts +7 -2
- package/dist/modules/encryption-key-manager/key-manager.service.js +27 -8
- package/dist/modules/encryption-key-manager/key-manager.service.js.map +1 -1
- package/dist/modules/engine-v2/engine-control-plane-auth.middleware.d.ts +6 -0
- package/dist/modules/engine-v2/engine-control-plane-auth.middleware.js +31 -0
- package/dist/modules/engine-v2/engine-control-plane-auth.middleware.js.map +1 -0
- package/dist/modules/engine-v2/engine-control-plane-client.d.ts +9 -0
- package/dist/modules/engine-v2/engine-control-plane-client.js +51 -0
- package/dist/modules/engine-v2/engine-control-plane-client.js.map +1 -0
- package/dist/modules/engine-v2/engine-control-plane-server.d.ts +14 -0
- package/dist/modules/engine-v2/engine-control-plane-server.js +84 -0
- package/dist/modules/engine-v2/engine-control-plane-server.js.map +1 -0
- package/dist/modules/engine-v2/engine-data-plane-client.d.ts +3 -1
- package/dist/modules/engine-v2/engine-data-plane-client.js +16 -1
- package/dist/modules/engine-v2/engine-data-plane-client.js.map +1 -1
- package/dist/modules/engine-v2/engine-lifecycle-event-push-relay.d.ts +18 -0
- package/dist/modules/engine-v2/engine-lifecycle-event-push-relay.js +150 -0
- package/dist/modules/engine-v2/engine-lifecycle-event-push-relay.js.map +1 -0
- package/dist/modules/engine-v2/engine-lifecycle-event.controller.d.ts +7 -0
- package/dist/modules/engine-v2/engine-lifecycle-event.controller.js +34 -0
- package/dist/modules/engine-v2/engine-lifecycle-event.controller.js.map +1 -0
- package/dist/modules/engine-v2/engine-v2.constants.d.ts +2 -0
- package/dist/modules/engine-v2/engine-v2.constants.js +6 -0
- package/dist/modules/engine-v2/engine-v2.constants.js.map +1 -0
- package/dist/modules/engine-v2/engine-v2.module.js +4 -0
- package/dist/modules/engine-v2/engine-v2.module.js.map +1 -1
- package/dist/modules/engine-v2/engine-v2.runtime.d.ts +3 -1
- package/dist/modules/engine-v2/engine-v2.runtime.js +6 -2
- package/dist/modules/engine-v2/engine-v2.runtime.js.map +1 -1
- 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/external-secrets.ee/providers/infisical.js +1 -1
- package/dist/modules/external-secrets.ee/providers/infisical.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/vault.js +1 -1
- package/dist/modules/external-secrets.ee/providers/vault.js.map +1 -1
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.d.ts +5 -3
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js +16 -4
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js.map +1 -1
- package/dist/modules/git-connections.ee/git-connections.service.d.ts +4 -2
- package/dist/modules/git-connections.ee/git-connections.service.js +87 -4
- package/dist/modules/git-connections.ee/git-connections.service.js.map +1 -1
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.d.ts +3 -2
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.js +48 -30
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.js.map +1 -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 +2 -28
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js +5 -228
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.d.ts +1 -3
- package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js +2 -8
- package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.js +1 -3
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +2 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js +10 -2
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.d.ts +0 -2
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js +1 -2
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +2 -3
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +101 -44
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.js +75 -83
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.js +8 -16
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +2 -0
- package/dist/modules/instance-ai/instance-ai.service.js +55 -11
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/internal-messages.d.ts +7 -0
- package/dist/modules/instance-ai/internal-messages.js +32 -2
- package/dist/modules/instance-ai/internal-messages.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.d.ts +2 -5
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js +4 -7
- 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.js.map +1 -1
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js.map +1 -1
- package/dist/modules/instance-ai/workflow-templates.service.js +1 -1
- package/dist/modules/instance-ai/workflow-templates.service.js.map +1 -1
- package/dist/modules/ldap.ee/ldap.controller.ee.d.ts +4 -2
- package/dist/modules/ldap.ee/ldap.controller.ee.js +9 -2
- package/dist/modules/ldap.ee/ldap.controller.ee.js.map +1 -1
- package/dist/modules/ldap.ee/ldap.service.ee.js +4 -0
- package/dist/modules/ldap.ee/ldap.service.ee.js.map +1 -1
- package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.js +1 -1
- package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js +1 -0
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.constants.d.ts +2 -0
- package/dist/modules/mcp/mcp.constants.js +3 -1
- package/dist/modules/mcp/mcp.constants.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +20 -6
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +1 -0
- package/dist/modules/mcp/tools/agents/agent-reference.d.ts +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.js +2 -2
- package/dist/modules/mcp/tools/agents/agent-tools.service.d.ts +2 -5
- package/dist/modules/mcp/tools/agents/agent-tools.service.js +5 -9
- package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-result.d.ts +2 -1
- package/dist/modules/n8n-packages/engine/import-result.js +1 -0
- package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.d.ts +5 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.d.ts +4 -5
- package/dist/modules/n8n-packages/engine/project-package-importer.js +9 -7
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.d.ts +4 -5
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +18 -20
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-importer.js +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js +12 -12
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/workflow-credential-references.d.ts +4 -0
- package/dist/modules/n8n-packages/entities/credential/workflow-credential-references.js +34 -0
- package/dist/modules/n8n-packages/entities/credential/workflow-credential-references.js.map +1 -0
- package/dist/modules/n8n-packages/entities/project/project-importer.js +1 -1
- package/dist/modules/n8n-packages/entities/project/project-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js +22 -14
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js.map +1 -1
- package/dist/modules/n8n-packages/io/directory/directory-package-reader.d.ts +21 -0
- package/dist/modules/n8n-packages/io/directory/directory-package-reader.js +146 -0
- package/dist/modules/n8n-packages/io/directory/directory-package-reader.js.map +1 -0
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +5 -1
- package/dist/modules/n8n-packages/n8n-packages.service.js +36 -0
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +10 -2
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.d.ts +1 -0
- package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.js +4 -0
- package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.js.map +1 -1
- package/dist/modules/oauth-server/database/repositories/oauth-refresh-token.repository.d.ts +1 -0
- package/dist/modules/oauth-server/database/repositories/oauth-refresh-token.repository.js.map +1 -1
- package/dist/modules/oauth-server/oauth-server.service.d.ts +1 -1
- package/dist/modules/oauth-server/oauth-server.service.js +12 -16
- package/dist/modules/oauth-server/oauth-server.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-token.service.d.ts +2 -1
- package/dist/modules/oauth-server/oauth-token.service.js +15 -3
- package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.d.ts +22 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.js +60 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.resolver.d.ts +24 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.resolver.js +62 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.resolver.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-test-resource.resolver.d.ts +22 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-test-resource.resolver.js +56 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-test-resource.resolver.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/index.js +4 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/index.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.d.ts +4 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.js +17 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.js.map +1 -1
- package/dist/modules/oauth-server/resource-identity.d.ts +2 -0
- package/dist/modules/oauth-server/resource-identity.js +15 -0
- package/dist/modules/oauth-server/resource-identity.js.map +1 -0
- package/dist/modules/otel/otel.service.js +14 -7
- package/dist/modules/otel/otel.service.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-decision.service.d.ts +1 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js +3 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.js +1 -0
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-lifecycle-handler.d.ts +9 -0
- package/dist/modules/policy-infrastructure/policy-lifecycle-handler.js +45 -0
- package/dist/modules/policy-infrastructure/policy-lifecycle-handler.js.map +1 -0
- package/dist/modules/quick-connect/handlers/firecrawl.handler.js +1 -1
- package/dist/modules/quick-connect/handlers/firecrawl.handler.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +18 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +11 -3
- 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 +2 -0
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +32 -0
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +16 -0
- package/dist/modules/source-control.ee/source-control.service.ee.js +11 -2
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/types/import-result.d.ts +2 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.js +2 -2
- package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
- package/dist/modules/sso-oidc/oidc.service.ee.js +1 -1
- package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
- package/dist/modules/sso-oidc/views/oidc-test-result.d.ts +2 -2
- package/dist/modules/sso-oidc/views/oidc-test-result.js +10 -4
- package/dist/modules/sso-oidc/views/oidc-test-result.js.map +1 -1
- package/dist/modules/sso-saml/saml.controller.ee.js +2 -2
- package/dist/modules/sso-saml/saml.controller.ee.js.map +1 -1
- package/dist/modules/sso-saml/saml.service.ee.js +1 -1
- package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
- package/dist/modules/sso-saml/views/init-sso-post.d.ts +1 -1
- package/dist/modules/sso-saml/views/init-sso-post.js +2 -2
- package/dist/modules/sso-saml/views/init-sso-post.js.map +1 -1
- package/dist/modules/token-exchange/services/jwks-resolver.js +1 -1
- package/dist/modules/token-exchange/services/jwks-resolver.js.map +1 -1
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy-attachment.entity.d.ts +7 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy-attachment.entity.js +38 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy-attachment.entity.js.map +1 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy-scope.entity.d.ts +9 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy-scope.entity.js +41 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy-scope.entity.js.map +1 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.d.ts +8 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.js +37 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.js.map +1 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.d.ts +17 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.js +96 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.js.map +1 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.d.ts +20 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js +69 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js.map +1 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.d.ts +18 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js +63 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js.map +1 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.d.ts +1 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js +6 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.d.ts +3 -5
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js +7 -9
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/{workflow-review-access.service.d.ts → workflow-review-authorization.service.d.ts} +12 -3
- package/dist/modules/workflow-reviews.ee/{workflow-review-access.service.js → workflow-review-authorization.service.js} +52 -17
- package/dist/modules/workflow-reviews.ee/workflow-review-authorization.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-policy.d.ts +14 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-policy.js +17 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-policy.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.d.ts +8 -12
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js +28 -82
- 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 +7 -6
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js +80 -110
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-participant.resolver.d.ts +17 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-participant.resolver.js +69 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-participant.resolver.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-decision.service.d.ts +34 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-decision.service.js +237 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-decision.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-mutation-guard.service.d.ts +10 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-mutation-guard.service.js +57 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-mutation-guard.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-status.service.d.ts +17 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-status.service.js +93 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-status.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-submission.service.d.ts +34 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-submission.service.js +268 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-submission.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.d.ts +7 -3
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js +13 -9
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-state-notifier.service.d.ts +9 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-state-notifier.service.js +37 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-state-notifier.service.js.map +1 -0
- package/dist/oauth/oauth.service.js +0 -1
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/permissions.ee/check-access.js +11 -7
- package/dist/permissions.ee/check-access.js.map +1 -1
- package/dist/permissions.ee/project-scope.service.d.ts +1 -0
- package/dist/permissions.ee/project-scope.service.js +7 -2
- package/dist/permissions.ee/project-scope.service.js.map +1 -1
- package/dist/policy/evaluate-content-import-safely.d.ts +5 -0
- package/dist/policy/evaluate-content-import-safely.js +18 -0
- package/dist/policy/evaluate-content-import-safely.js.map +1 -0
- package/dist/policy/policy-enforcement-backend.d.ts +1 -0
- package/dist/policy/policy-enforcement.service.d.ts +2 -2
- package/dist/policy/policy-enforcement.service.js +10 -14
- package/dist/policy/policy-enforcement.service.js.map +1 -1
- package/dist/policy/policy-violation.error.d.ts +2 -0
- package/dist/policy/policy-violation.error.js +10 -0
- package/dist/policy/policy-violation.error.js.map +1 -1
- package/dist/public-api/types.d.ts +1 -14
- package/dist/public-api/v1/controllers/git-connections.public.controller.d.ts +2 -1
- package/dist/public-api/v1/controllers/git-connections.public.controller.js +24 -3
- package/dist/public-api/v1/controllers/git-connections.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +8 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.js +151 -14
- package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js +1 -0
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js +33 -44
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/discover/discover.handler.d.ts +1 -1
- package/dist/public-api/v1/handlers/discover/discover.handler.js +3 -13
- package/dist/public-api/v1/handlers/discover/discover.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/discover/discover.service.d.ts +2 -3
- package/dist/public-api/v1/handlers/discover/discover.service.js.map +1 -1
- package/dist/public-api/v1/handlers/projects/projects.handler.d.ts +1 -1
- package/dist/public-api/v1/handlers/projects/projects.handler.js +23 -21
- package/dist/public-api/v1/handlers/projects/projects.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/variables/variables.handler.d.ts +1 -1
- package/dist/public-api/v1/handlers/variables/variables.handler.js +5 -6
- package/dist/public-api/v1/handlers/variables/variables.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +0 -4
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +0 -102
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +4779 -2848
- package/dist/response-helper.js +3 -0
- package/dist/response-helper.js.map +1 -1
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/constants.js +1 -0
- package/dist/scaling/constants.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +5 -1
- package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js +2 -7
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js.map +1 -1
- package/dist/security/content-security-policy.d.ts +8 -0
- package/dist/security/content-security-policy.js +18 -0
- package/dist/security/content-security-policy.js.map +1 -0
- package/dist/security-audit/risk-reporters/instance-risk-reporter.js +1 -1
- package/dist/security-audit/risk-reporters/instance-risk-reporter.js.map +1 -1
- package/dist/server.js +22 -21
- package/dist/server.js.map +1 -1
- package/dist/services/active-workflows.service.d.ts +3 -1
- package/dist/services/active-workflows.service.js +11 -9
- package/dist/services/active-workflows.service.js.map +1 -1
- package/dist/services/ai-gateway.service.js +1 -1
- package/dist/services/ai-gateway.service.js.map +1 -1
- package/dist/services/credentials-tester.service.js +7 -1
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/engine-data-plane-proxy.service.d.ts +4 -1
- package/dist/services/engine-data-plane-proxy.service.js +5 -0
- package/dist/services/engine-data-plane-proxy.service.js.map +1 -1
- package/dist/services/engine-v2-dispatcher.service.d.ts +5 -2
- package/dist/services/engine-v2-dispatcher.service.js +46 -24
- package/dist/services/engine-v2-dispatcher.service.js.map +1 -1
- package/dist/services/engine-v2-push-registry.service.d.ts +8 -0
- package/dist/services/engine-v2-push-registry.service.js +51 -0
- package/dist/services/engine-v2-push-registry.service.js.map +1 -0
- package/dist/services/engine-v2-push-session.d.ts +23 -0
- package/dist/services/engine-v2-push-session.js +24 -0
- package/dist/services/engine-v2-push-session.js.map +1 -0
- package/dist/services/folder-finder.service.js +10 -8
- package/dist/services/folder-finder.service.js.map +1 -1
- package/dist/services/folder.service.d.ts +1 -1
- package/dist/services/folder.service.js +1 -7
- package/dist/services/folder.service.js.map +1 -1
- package/dist/services/import.service.d.ts +14 -3
- package/dist/services/import.service.js +27 -2
- package/dist/services/import.service.js.map +1 -1
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +5 -0
- package/dist/services/project.service.ee.d.ts +47 -9
- package/dist/services/project.service.ee.js +128 -17
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/role.service.js +10 -5
- package/dist/services/role.service.js.map +1 -1
- package/dist/task-runners/task-runner-process-py.d.ts +1 -1
- package/dist/task-runners/task-runner-process-py.js.map +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/telemetry/index.js.map +1 -1
- package/dist/utils/ai-proxy-fetch.d.ts +3 -4
- package/dist/utils/ai-proxy-fetch.js +3 -5
- package/dist/utils/ai-proxy-fetch.js.map +1 -1
- package/dist/utils/strapi-utils.js +1 -1
- package/dist/utils/strapi-utils.js.map +1 -1
- package/dist/utils/ttl-map.d.ts +1 -0
- package/dist/utils/ttl-map.js +9 -0
- package/dist/utils/ttl-map.js.map +1 -1
- package/dist/webhooks/constants.d.ts +2 -0
- package/dist/webhooks/constants.js +2 -1
- package/dist/webhooks/constants.js.map +1 -1
- package/dist/webhooks/live-webhooks.js +1 -1
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/test-webhook-registrations.service.d.ts +1 -0
- package/dist/webhooks/test-webhook-registrations.service.js.map +1 -1
- package/dist/webhooks/test-webhooks.d.ts +6 -2
- package/dist/webhooks/test-webhooks.js +29 -6
- package/dist/webhooks/test-webhooks.js.map +1 -1
- package/dist/webhooks/waiting-forms.js +3 -4
- package/dist/webhooks/waiting-forms.js.map +1 -1
- package/dist/webhooks/waiting-webhooks.js +4 -0
- package/dist/webhooks/waiting-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-helpers.d.ts +3 -1
- package/dist/webhooks/webhook-helpers.js +24 -1
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-response-headers.d.ts +1 -0
- package/dist/webhooks/webhook-response-headers.js +6 -0
- package/dist/webhooks/webhook-response-headers.js.map +1 -1
- package/dist/workflow-execute-additional-data.js +5 -0
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +3 -2
- package/dist/workflow-helpers.js +35 -24
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflows/publication/publication-result.d.ts +5 -0
- package/dist/workflows/publication/publication-status-reporter.d.ts +1 -0
- package/dist/workflows/publication/publication-status-reporter.js +23 -5
- package/dist/workflows/publication/publication-status-reporter.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-applier.d.ts +6 -1
- package/dist/workflows/publication/workflow-publication-applier.js +63 -10
- package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
- package/dist/workflows/triggers/poll-backoff.service.d.ts +2 -2
- package/dist/workflows/triggers/poll-backoff.service.js +3 -3
- package/dist/workflows/triggers/poll-backoff.service.js.map +1 -1
- package/dist/workflows/triggers/poll-cursor.service.d.ts +2 -2
- package/dist/workflows/triggers/poll-cursor.service.js +4 -1
- package/dist/workflows/triggers/poll-cursor.service.js.map +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +6 -4
- package/dist/workflows/triggers/trigger-execution-context.factory.js +13 -7
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.d.ts +1 -0
- package/dist/workflows/triggers/webhook-trigger-registrar.js +3 -0
- package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -1
- package/dist/workflows/triggers/workflow-trigger-activator.d.ts +10 -1
- package/dist/workflows/triggers/workflow-trigger-activator.js +78 -38
- package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +17 -4
- package/dist/workflows/workflow-creation.service.js +96 -16
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-execution.service.js +2 -0
- package/dist/workflows/workflow-execution.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.js +67 -56
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.js +3 -2
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +4 -1
- package/dist/workflows/workflow.service.ee.d.ts +9 -3
- package/dist/workflows/workflow.service.ee.js +16 -2
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +25 -4
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +3 -5
- package/dist/workflows/workflows.controller.js +3 -7
- package/dist/workflows/workflows.controller.js.map +1 -1
- package/package.json +38 -38
- package/templates/oauth-callback.handlebars +1 -1
- package/templates/oauth-error-callback.handlebars +1 -1
- package/templates/saml-connection-test-failed.handlebars +4 -1
- package/templates/saml-connection-test-success.handlebars +4 -1
- package/dist/modules/instance-ai/output-redaction-config.d.ts +0 -3
- package/dist/modules/instance-ai/output-redaction-config.js +0 -21
- package/dist/modules/instance-ai/output-redaction-config.js.map +0 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-access.service.js.map +0 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.d.ts +0 -18
- package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js +0 -77
- package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js.map +0 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.d.ts +0 -51
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js +0 -538
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js.map +0 -1
- package/dist/policy/policy-cleared.d.ts +0 -20
- package/dist/policy/policy-cleared.js +0 -22
- package/dist/policy/policy-cleared.js.map +0 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.service.d.ts +0 -4
- package/dist/public-api/v1/handlers/data-tables/data-tables.service.js +0 -44
- package/dist/public-api/v1/handlers/data-tables/data-tables.service.js.map +0 -1
|
@@ -14,27 +14,23 @@ const db_1 = require("@n8n/db");
|
|
|
14
14
|
const di_1 = require("@n8n/di");
|
|
15
15
|
const bad_request_error_1 = require("../../errors/response-errors/bad-request.error");
|
|
16
16
|
const workflow_history_service_1 = require("../../workflows/workflow-history/workflow-history.service");
|
|
17
|
-
const
|
|
18
|
-
const workflow_review_eligibility_service_1 = require("./workflow-review-eligibility.service");
|
|
17
|
+
const workflow_review_authorization_service_1 = require("./workflow-review-authorization.service");
|
|
19
18
|
const workflow_review_feature_gate_service_1 = require("./workflow-review-feature-gate.service");
|
|
20
|
-
const
|
|
19
|
+
const workflow_review_participant_resolver_1 = require("./workflow-review-participant.resolver");
|
|
21
20
|
let WorkflowReviewInboxService = class WorkflowReviewInboxService {
|
|
22
|
-
constructor(featureGate,
|
|
21
|
+
constructor(featureGate, authorizationService, workflowHistoryService, workflowReviewInboxRepository, workflowReviewRequestWorkflowRepository, participantResolver) {
|
|
23
22
|
this.featureGate = featureGate;
|
|
24
|
-
this.
|
|
23
|
+
this.authorizationService = authorizationService;
|
|
25
24
|
this.workflowHistoryService = workflowHistoryService;
|
|
26
|
-
this.
|
|
25
|
+
this.workflowReviewInboxRepository = workflowReviewInboxRepository;
|
|
27
26
|
this.workflowReviewRequestWorkflowRepository = workflowReviewRequestWorkflowRepository;
|
|
28
|
-
this.
|
|
29
|
-
this.workflowReviewRequestAuthorRepository = workflowReviewRequestAuthorRepository;
|
|
30
|
-
this.userRepository = userRepository;
|
|
31
|
-
this.eligibilityService = eligibilityService;
|
|
27
|
+
this.participantResolver = participantResolver;
|
|
32
28
|
}
|
|
33
29
|
async listForInbox(user, query) {
|
|
34
30
|
await this.featureGate.assertAvailable();
|
|
35
|
-
const visibility = await this.
|
|
31
|
+
const visibility = await this.authorizationService.resolveInboxVisibility(user);
|
|
36
32
|
const { limit } = query;
|
|
37
|
-
const rows = await this.
|
|
33
|
+
const rows = await this.workflowReviewInboxRepository.findRequests({
|
|
38
34
|
visibility,
|
|
39
35
|
state: query.state ?? 'open',
|
|
40
36
|
category: query.category === undefined ? undefined : { userId: user.id, category: query.category },
|
|
@@ -45,47 +41,32 @@ let WorkflowReviewInboxService = class WorkflowReviewInboxService {
|
|
|
45
41
|
const data = rows.slice(0, limit);
|
|
46
42
|
const lastRow = data.at(-1);
|
|
47
43
|
const nextCursor = hasMore && lastRow ? this.encodeInboxCursor(lastRow) : null;
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
this.
|
|
51
|
-
this.workflowReviewRequestReviewerRepository.findByRequestIds(requestIds),
|
|
52
|
-
this.workflowReviewRequestAuthorRepository.findByRequestIds(requestIds),
|
|
44
|
+
const [linkedWorkflowByRequestId, participants] = await Promise.all([
|
|
45
|
+
this.workflowReviewRequestWorkflowRepository.findLinkedWorkflowsByRequestIds(data.map((row) => row.id)),
|
|
46
|
+
this.participantResolver.resolve(data),
|
|
53
47
|
]);
|
|
54
|
-
const participantsByRequestId = await this.hydrateParticipants(data, reviewerRows, authorRows);
|
|
55
48
|
return {
|
|
56
|
-
data: data.map((row) =>
|
|
57
|
-
const { requester, authors, reviewers } = participantsByRequestId.get(row.id) ?? {
|
|
58
|
-
requester: null,
|
|
59
|
-
authors: [],
|
|
60
|
-
reviewers: [],
|
|
61
|
-
};
|
|
62
|
-
return this.toInboxItem(row, linkedWorkflowByRequestId.get(row.id) ?? null, requester, authors, reviewers);
|
|
63
|
-
}),
|
|
49
|
+
data: data.map((row) => this.toInboxItem(row, linkedWorkflowByRequestId.get(row.id) ?? null, participants.for(row.id))),
|
|
64
50
|
nextCursor,
|
|
65
51
|
hasMore,
|
|
66
52
|
};
|
|
67
53
|
}
|
|
68
54
|
async getInboxSummaryForUser(user) {
|
|
69
55
|
await this.featureGate.assertAvailable();
|
|
70
|
-
const visibility = await this.
|
|
71
|
-
return await this.
|
|
56
|
+
const visibility = await this.authorizationService.resolveInboxVisibility(user);
|
|
57
|
+
return await this.workflowReviewInboxRepository.countRequestsByState(visibility);
|
|
72
58
|
}
|
|
73
59
|
async getDetail(user, workflowReviewRequestId) {
|
|
74
60
|
await this.featureGate.assertAvailable();
|
|
75
|
-
const access = await this.
|
|
61
|
+
const access = await this.authorizationService.findReadableRequestOrFail(user, workflowReviewRequestId);
|
|
76
62
|
const { request, readableWorkflowRows } = access;
|
|
77
|
-
const [workflows,
|
|
63
|
+
const [workflows, participants, eligibility] = await Promise.all([
|
|
78
64
|
Promise.all(readableWorkflowRows.map(async (row) => await this.toWorkflowDetail(row))),
|
|
79
|
-
this.
|
|
80
|
-
this.
|
|
65
|
+
this.participantResolver.resolve([request]),
|
|
66
|
+
this.authorizationService.resolveViewerEligibility(user, access),
|
|
81
67
|
]);
|
|
82
|
-
const { requester, authors, reviewers } = participantsByRequestId.get(request.id) ?? {
|
|
83
|
-
requester: null,
|
|
84
|
-
authors: [],
|
|
85
|
-
reviewers: [],
|
|
86
|
-
};
|
|
87
68
|
return {
|
|
88
|
-
...this.
|
|
69
|
+
...this.toReviewSummary(request, participants.for(request.id)),
|
|
89
70
|
description: request.description,
|
|
90
71
|
workflows,
|
|
91
72
|
viewerCanDecide: eligibility.canDecide,
|
|
@@ -93,13 +74,6 @@ let WorkflowReviewInboxService = class WorkflowReviewInboxService {
|
|
|
93
74
|
viewerCanComment: eligibility.canComment,
|
|
94
75
|
};
|
|
95
76
|
}
|
|
96
|
-
async resolveParticipants(request) {
|
|
97
|
-
const [reviewerRows, authorRows] = await Promise.all([
|
|
98
|
-
this.workflowReviewRequestReviewerRepository.findByRequestIds([request.id]),
|
|
99
|
-
this.workflowReviewRequestAuthorRepository.findByRequestIds([request.id]),
|
|
100
|
-
]);
|
|
101
|
-
return await this.hydrateParticipants([request], reviewerRows, authorRows);
|
|
102
|
-
}
|
|
103
77
|
async toWorkflowDetail(row) {
|
|
104
78
|
const baselineVersionId = row.baselineVersionId ?? (row.requestState === 'closed' ? null : row.activeVersionId);
|
|
105
79
|
const [pinnedVersion, baselineVersion] = await Promise.all([
|
|
@@ -132,30 +106,6 @@ let WorkflowReviewInboxService = class WorkflowReviewInboxService {
|
|
|
132
106
|
createdAt: version.createdAt.toISOString(),
|
|
133
107
|
};
|
|
134
108
|
}
|
|
135
|
-
async hydrateParticipants(rows, reviewerRows, authorRows) {
|
|
136
|
-
const reviewerIdsByRequestId = groupUserIdsByRequestId(reviewerRows);
|
|
137
|
-
const authorIdsByRequestId = groupUserIdsByRequestId(authorRows);
|
|
138
|
-
const userIds = new Set([
|
|
139
|
-
...rows.map((row) => row.createdById).filter((id) => id !== null),
|
|
140
|
-
...reviewerRows.map((row) => row.userId),
|
|
141
|
-
...authorRows.map((row) => row.userId),
|
|
142
|
-
]);
|
|
143
|
-
const usersById = new Map();
|
|
144
|
-
if (userIds.size > 0) {
|
|
145
|
-
for (const user of await this.userRepository.findManyByIds([...userIds])) {
|
|
146
|
-
usersById.set(user.id, (0, workflow_review_mapper_1.toEligibleReviewer)(user));
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
const resolve = (userIdsForRequest) => userIdsForRequest.map((userId) => usersById.get(userId)).filter((user) => user !== undefined);
|
|
150
|
-
return new Map(rows.map((row) => [
|
|
151
|
-
row.id,
|
|
152
|
-
{
|
|
153
|
-
requester: row.createdById ? (usersById.get(row.createdById) ?? null) : null,
|
|
154
|
-
authors: resolve(authorIdsByRequestId.get(row.id) ?? []),
|
|
155
|
-
reviewers: resolve(reviewerIdsByRequestId.get(row.id) ?? []),
|
|
156
|
-
},
|
|
157
|
-
]));
|
|
158
|
-
}
|
|
159
109
|
encodeInboxCursor(row) {
|
|
160
110
|
return Buffer.from(`${row.createdAt.toISOString()}|${row.id}`, 'utf8').toString('base64url');
|
|
161
111
|
}
|
|
@@ -172,13 +122,11 @@ let WorkflowReviewInboxService = class WorkflowReviewInboxService {
|
|
|
172
122
|
}
|
|
173
123
|
return { createdAt, id };
|
|
174
124
|
}
|
|
175
|
-
|
|
125
|
+
toReviewSummary(entity, { requester, authors, reviewers }) {
|
|
176
126
|
return {
|
|
177
127
|
id: entity.id,
|
|
178
128
|
projectId: entity.projectId,
|
|
179
129
|
title: entity.title,
|
|
180
|
-
workflowName: linkedWorkflow?.workflowName ?? null,
|
|
181
|
-
workflowVersionId: linkedWorkflow?.workflowVersionId ?? null,
|
|
182
130
|
decision: entity.decision,
|
|
183
131
|
state: entity.state,
|
|
184
132
|
createdAt: entity.createdAt.toISOString(),
|
|
@@ -188,19 +136,17 @@ let WorkflowReviewInboxService = class WorkflowReviewInboxService {
|
|
|
188
136
|
reviewers,
|
|
189
137
|
};
|
|
190
138
|
}
|
|
139
|
+
toInboxItem(entity, linkedWorkflow, participants) {
|
|
140
|
+
return {
|
|
141
|
+
...this.toReviewSummary(entity, participants),
|
|
142
|
+
workflowName: linkedWorkflow?.workflowName ?? null,
|
|
143
|
+
workflowVersionId: linkedWorkflow?.workflowVersionId ?? null,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
191
146
|
};
|
|
192
147
|
exports.WorkflowReviewInboxService = WorkflowReviewInboxService;
|
|
193
148
|
exports.WorkflowReviewInboxService = WorkflowReviewInboxService = __decorate([
|
|
194
149
|
(0, di_1.Service)(),
|
|
195
|
-
__metadata("design:paramtypes", [workflow_review_feature_gate_service_1.WorkflowReviewFeatureGate,
|
|
150
|
+
__metadata("design:paramtypes", [workflow_review_feature_gate_service_1.WorkflowReviewFeatureGate, workflow_review_authorization_service_1.WorkflowReviewAuthorizationService, workflow_history_service_1.WorkflowHistoryService, db_1.WorkflowReviewInboxRepository, db_1.WorkflowReviewRequestWorkflowRepository, workflow_review_participant_resolver_1.WorkflowReviewParticipantResolver])
|
|
196
151
|
], WorkflowReviewInboxService);
|
|
197
|
-
function groupUserIdsByRequestId(rows) {
|
|
198
|
-
const idsByRequestId = new Map();
|
|
199
|
-
for (const { workflowReviewRequestId, userId } of rows) {
|
|
200
|
-
const ids = idsByRequestId.get(workflowReviewRequestId) ?? [];
|
|
201
|
-
ids.push(userId);
|
|
202
|
-
idsByRequestId.set(workflowReviewRequestId, ids);
|
|
203
|
-
}
|
|
204
|
-
return idsByRequestId;
|
|
205
|
-
}
|
|
206
152
|
//# sourceMappingURL=workflow-review-inbox.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-review-inbox.service.js","sourceRoot":"","sources":["../../../src/modules/workflow-reviews.ee/workflow-review-inbox.service.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"workflow-review-inbox.service.js","sourceRoot":"","sources":["../../../src/modules/workflow-reviews.ee/workflow-review-inbox.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA,gCASiB;AACjB,gCAAkC;AAElC,kFAA6E;AAC7E,oGAA+F;AAE/F,mGAA6F;AAC7F,iGAAmF;AACnF,iGAGgD;AASzC,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACtC,YACkB,WAAsC,EACtC,oBAAwD,EACxD,sBAA8C,EAC9C,6BAA4D,EAC5D,uCAAgF,EAChF,mBAAsD;2BALtD,WAAW;oCACX,oBAAoB;sCACpB,sBAAsB;6CACtB,6BAA6B;uDAC7B,uCAAuC;mCACvC,mBAAmB;IAClC,CAAC;IAEJ,KAAK,CAAC,YAAY,CACjB,IAAU,EACV,KAAsC;QAEtC,MAAM,IAAI,CAAC,WAAW,CAAC,eA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M,IAAI,mCAAe,CAAC,2BAA2B,CAAC,CAAC;QACxD,CAAC;QAED,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAC1B,CAAC;IAGO,eAAe,CACtB,MAA6B,EAC7B,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAA8B;QAE7D,OAAO;YACN,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE;YACzC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE;YACzC,SAAS;YACT,OAAO;YACP,SAAS;SACT,CAAC;IACH,CAAC;IAEO,WAAW,CAClB,MAA6B,EAC7B,cAA0D,EAC1D,YAAwC;QAExC,OAAO;YACN,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,YAAY,CAAC;YAC7C,YAAY,EAAE,cAAc,EAAE,YAAY,IAAI,IAAI;YAClD,iBAAiB,EAAE,cAAc,EAAE,iBAAiB,IAAI,IAAI;SAC5D,CAAC;IACH,CAAC;CACD,CAAA;;qCApNY,0BAA0B;IADtC,IAAA,YAAO,GAAE;qCAGsB,gEAAyB,EAChB,0EAAkC,EAChC,iDAAsB,EACf,kCAA6B,EACnB,4CAAuC,EAC3D,wEAAiC;GAP5D,0BAA0B,CAoNtC"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { Logger } from '@n8n/backend-common';
|
|
2
|
-
import { DbLockService, WorkflowReviewActivityRepository, WorkflowReviewRequestRepository, WorkflowReviewRequestWorkflowRepository } from '@n8n/db';
|
|
3
|
-
import { CollaborationService } from '../../collaboration/collaboration.service';
|
|
2
|
+
import { DbLockService, WorkflowReviewActivityRepository, WorkflowReviewLifecycleRepository, WorkflowReviewRequestRepository, WorkflowReviewRequestWorkflowRepository } from '@n8n/db';
|
|
4
3
|
import { EventService } from '../../events/event.service';
|
|
5
4
|
import type { WorkflowMutationHooks } from '../../workflows/workflow-mutation-hooks-proxy.service';
|
|
5
|
+
import { WorkflowReviewStateNotifier } from './workflow-review-state-notifier.service';
|
|
6
6
|
export declare class WorkflowReviewLifecycleService implements WorkflowMutationHooks {
|
|
7
7
|
private readonly logger;
|
|
8
8
|
private readonly workflowReviewRequestRepository;
|
|
9
|
+
private readonly workflowReviewLifecycleRepository;
|
|
9
10
|
private readonly workflowReviewRequestWorkflowRepository;
|
|
10
11
|
private readonly activityRepository;
|
|
11
12
|
private readonly dbLockService;
|
|
12
|
-
private readonly
|
|
13
|
+
private readonly stateNotifier;
|
|
13
14
|
private readonly eventService;
|
|
14
15
|
private readonly pendingDeleteCaptures;
|
|
15
|
-
constructor(logger: Logger, workflowReviewRequestRepository: WorkflowReviewRequestRepository, workflowReviewRequestWorkflowRepository: WorkflowReviewRequestWorkflowRepository, activityRepository: WorkflowReviewActivityRepository, dbLockService: DbLockService,
|
|
16
|
+
constructor(logger: Logger, workflowReviewRequestRepository: WorkflowReviewRequestRepository, workflowReviewLifecycleRepository: WorkflowReviewLifecycleRepository, workflowReviewRequestWorkflowRepository: WorkflowReviewRequestWorkflowRepository, activityRepository: WorkflowReviewActivityRepository, dbLockService: DbLockService, stateNotifier: WorkflowReviewStateNotifier, eventService: EventService);
|
|
16
17
|
afterWorkflowArchived(workflowId: string, userId: string | null): Promise<void>;
|
|
17
18
|
afterWorkflowsTransferred(workflowIds: string[], userId: string | null): Promise<void>;
|
|
18
19
|
beforeWorkflowDeleted(workflowId: string, userId: string | null): Promise<void>;
|
|
@@ -25,6 +26,6 @@ export declare class WorkflowReviewLifecycleService implements WorkflowMutationH
|
|
|
25
26
|
private reconcileUnreviewableOpenRequests;
|
|
26
27
|
private recordCauseEventsAndApplyClosePolicy;
|
|
27
28
|
private recordCapturedDeletions;
|
|
28
|
-
private
|
|
29
|
-
private
|
|
29
|
+
private recordCauseEventsAndClose;
|
|
30
|
+
private closeUnreviewable;
|
|
30
31
|
}
|
|
@@ -13,17 +13,23 @@ exports.WorkflowReviewLifecycleService = void 0;
|
|
|
13
13
|
const backend_common_1 = require("@n8n/backend-common");
|
|
14
14
|
const db_1 = require("@n8n/db");
|
|
15
15
|
const di_1 = require("@n8n/di");
|
|
16
|
-
const collaboration_service_1 = require("../../collaboration/collaboration.service");
|
|
17
16
|
const event_service_1 = require("../../events/event.service");
|
|
17
|
+
const workflow_review_state_notifier_service_1 = require("./workflow-review-state-notifier.service");
|
|
18
|
+
const CLOSE_TRIGGER_BY_ACTIVITY_TYPE = {
|
|
19
|
+
'workflow.archived': 'workflow-archived',
|
|
20
|
+
'workflow.moved': 'workflow-moved',
|
|
21
|
+
'workflow.deleted': 'workflow-deleted',
|
|
22
|
+
};
|
|
18
23
|
const MAX_PENDING_DELETE_CAPTURES = 1000;
|
|
19
24
|
let WorkflowReviewLifecycleService = class WorkflowReviewLifecycleService {
|
|
20
|
-
constructor(logger, workflowReviewRequestRepository, workflowReviewRequestWorkflowRepository, activityRepository, dbLockService,
|
|
25
|
+
constructor(logger, workflowReviewRequestRepository, workflowReviewLifecycleRepository, workflowReviewRequestWorkflowRepository, activityRepository, dbLockService, stateNotifier, eventService) {
|
|
21
26
|
this.logger = logger;
|
|
22
27
|
this.workflowReviewRequestRepository = workflowReviewRequestRepository;
|
|
28
|
+
this.workflowReviewLifecycleRepository = workflowReviewLifecycleRepository;
|
|
23
29
|
this.workflowReviewRequestWorkflowRepository = workflowReviewRequestWorkflowRepository;
|
|
24
30
|
this.activityRepository = activityRepository;
|
|
25
31
|
this.dbLockService = dbLockService;
|
|
26
|
-
this.
|
|
32
|
+
this.stateNotifier = stateNotifier;
|
|
27
33
|
this.eventService = eventService;
|
|
28
34
|
this.pendingDeleteCaptures = new Map();
|
|
29
35
|
}
|
|
@@ -37,7 +43,7 @@ let WorkflowReviewLifecycleService = class WorkflowReviewLifecycleService {
|
|
|
37
43
|
}
|
|
38
44
|
async beforeWorkflowDeleted(workflowId, userId) {
|
|
39
45
|
try {
|
|
40
|
-
const openRequests = await this.
|
|
46
|
+
const openRequests = await this.workflowReviewLifecycleRepository.findOpenRequestsAffectedByWorkflows([workflowId], {});
|
|
41
47
|
this.pendingDeleteCaptures.delete(workflowId);
|
|
42
48
|
if (this.pendingDeleteCaptures.size >= MAX_PENDING_DELETE_CAPTURES) {
|
|
43
49
|
const oldest = this.pendingDeleteCaptures.keys().next().value;
|
|
@@ -88,7 +94,7 @@ let WorkflowReviewLifecycleService = class WorkflowReviewLifecycleService {
|
|
|
88
94
|
createdById: event.userId,
|
|
89
95
|
}, {});
|
|
90
96
|
}
|
|
91
|
-
this.
|
|
97
|
+
this.stateNotifier.notify(event.workflowId);
|
|
92
98
|
}
|
|
93
99
|
catch (error) {
|
|
94
100
|
this.logger.warn('Failed to record workflow publication in review activity', {
|
|
@@ -100,18 +106,7 @@ let WorkflowReviewLifecycleService = class WorkflowReviewLifecycleService {
|
|
|
100
106
|
}
|
|
101
107
|
async reconcileUnreviewableOpenRequests(workflowIds) {
|
|
102
108
|
try {
|
|
103
|
-
const closedRequestIds = await this.dbLockService.withLockContext(1004, async (ctx) =>
|
|
104
|
-
const requestIds = await this.workflowReviewRequestRepository.closeUnreviewableOpenRequests(ctx);
|
|
105
|
-
for (const requestId of requestIds) {
|
|
106
|
-
await this.activityRepository.createActivity({
|
|
107
|
-
workflowReviewRequestId: requestId,
|
|
108
|
-
type: 'review.closed',
|
|
109
|
-
data: { reason: 'no-reviewable-workflows' },
|
|
110
|
-
createdById: null,
|
|
111
|
-
}, ctx);
|
|
112
|
-
}
|
|
113
|
-
return requestIds;
|
|
114
|
-
});
|
|
109
|
+
const closedRequestIds = await this.dbLockService.withLockContext(1004, async (ctx) => await this.closeUnreviewable(ctx));
|
|
115
110
|
if (closedRequestIds.length === 0)
|
|
116
111
|
return;
|
|
117
112
|
for (const requestId of closedRequestIds) {
|
|
@@ -131,126 +126,101 @@ let WorkflowReviewLifecycleService = class WorkflowReviewLifecycleService {
|
|
|
131
126
|
}
|
|
132
127
|
async recordCauseEventsAndApplyClosePolicy(workflowIds, type, userId) {
|
|
133
128
|
const actorKind = userId === null ? 'system' : 'user';
|
|
134
|
-
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
for (const {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
affected.add(linkedWorkflowId);
|
|
148
|
-
}
|
|
149
|
-
if (await this.applyClosePolicy(request, workflowIds, ctx)) {
|
|
150
|
-
closedRequestIds.push(request.id);
|
|
151
|
-
}
|
|
129
|
+
await this.recordCauseEventsAndClose(type, workflowIds, async (ctx) => {
|
|
130
|
+
const openRequests = await this.workflowReviewLifecycleRepository.findOpenRequestsAffectedByWorkflows(workflowIds, ctx);
|
|
131
|
+
const affected = new Set();
|
|
132
|
+
const candidateRequestIds = [];
|
|
133
|
+
for (const { request, links } of openRequests) {
|
|
134
|
+
for (const { workflowId: linkedWorkflowId } of links) {
|
|
135
|
+
await this.activityRepository.createActivity({
|
|
136
|
+
workflowReviewRequestId: request.id,
|
|
137
|
+
type,
|
|
138
|
+
data: { workflowId: linkedWorkflowId, actorKind },
|
|
139
|
+
createdById: userId,
|
|
140
|
+
}, ctx);
|
|
141
|
+
affected.add(linkedWorkflowId);
|
|
152
142
|
}
|
|
153
|
-
|
|
154
|
-
});
|
|
155
|
-
for (const requestId of closedRequestIds) {
|
|
156
|
-
this.eventService.emit('workflow-review-closed', {
|
|
157
|
-
workflowReviewRequestId: requestId,
|
|
158
|
-
cause: {
|
|
159
|
-
trigger: type === 'workflow.archived' ? 'workflow-archived' : 'workflow-moved',
|
|
160
|
-
actorKind,
|
|
161
|
-
userId,
|
|
162
|
-
},
|
|
163
|
-
});
|
|
143
|
+
candidateRequestIds.push(request.id);
|
|
164
144
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
this.broadcastReviewStateChanged(affectedWorkflowIds);
|
|
172
|
-
}
|
|
173
|
-
catch (error) {
|
|
174
|
-
this.logger.error('Failed to record workflow review cause event(s)', {
|
|
175
|
-
type,
|
|
176
|
-
workflowIds,
|
|
177
|
-
error,
|
|
178
|
-
});
|
|
179
|
-
}
|
|
145
|
+
const closedRequestIds = await this.closeUnreviewable(ctx, candidateRequestIds);
|
|
146
|
+
return {
|
|
147
|
+
affectedWorkflowIds: [...affected],
|
|
148
|
+
closedRequests: closedRequestIds.map((requestId) => ({ requestId, actorKind, userId })),
|
|
149
|
+
};
|
|
150
|
+
});
|
|
180
151
|
}
|
|
181
152
|
async recordCapturedDeletions(capturesByRequestId, batchWorkflowIds) {
|
|
182
|
-
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
if (await this.applyClosePolicy(request, batchWorkflowIds, ctx)) {
|
|
201
|
-
closed.push({ requestId, actorKind, userId: capture.userId });
|
|
202
|
-
}
|
|
153
|
+
await this.recordCauseEventsAndClose('workflow.deleted', batchWorkflowIds, async (ctx) => {
|
|
154
|
+
const affected = new Set();
|
|
155
|
+
const candidateRequestIds = [];
|
|
156
|
+
const actorByRequestId = new Map();
|
|
157
|
+
for (const [requestId, capture] of capturesByRequestId) {
|
|
158
|
+
const request = await this.workflowReviewRequestRepository.findById(requestId, ctx);
|
|
159
|
+
if (!request || request.state !== 'open')
|
|
160
|
+
continue;
|
|
161
|
+
const actorKind = capture.userId === null ? 'system' : 'user';
|
|
162
|
+
for (const workflowId of capture.workflowIds) {
|
|
163
|
+
await this.activityRepository.createActivity({
|
|
164
|
+
workflowReviewRequestId: requestId,
|
|
165
|
+
type: 'workflow.deleted',
|
|
166
|
+
data: { workflowId, actorKind },
|
|
167
|
+
createdById: capture.userId,
|
|
168
|
+
}, ctx);
|
|
169
|
+
affected.add(workflowId);
|
|
203
170
|
}
|
|
204
|
-
|
|
205
|
-
|
|
171
|
+
candidateRequestIds.push(requestId);
|
|
172
|
+
actorByRequestId.set(requestId, { requestId, actorKind, userId: capture.userId });
|
|
173
|
+
}
|
|
174
|
+
const closedRequestIds = await this.closeUnreviewable(ctx, candidateRequestIds);
|
|
175
|
+
return {
|
|
176
|
+
affectedWorkflowIds: [...affected],
|
|
177
|
+
closedRequests: closedRequestIds.map((requestId) => actorByRequestId.get(requestId)),
|
|
178
|
+
};
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
async recordCauseEventsAndClose(type, logWorkflowIds, gather) {
|
|
182
|
+
try {
|
|
183
|
+
const { affectedWorkflowIds, closedRequests } = await this.dbLockService.withLockContext(1004, gather);
|
|
184
|
+
const trigger = CLOSE_TRIGGER_BY_ACTIVITY_TYPE[type];
|
|
206
185
|
for (const { requestId, actorKind, userId } of closedRequests) {
|
|
207
186
|
this.eventService.emit('workflow-review-closed', {
|
|
208
187
|
workflowReviewRequestId: requestId,
|
|
209
|
-
cause: { trigger
|
|
188
|
+
cause: { trigger, actorKind, userId },
|
|
210
189
|
});
|
|
211
190
|
}
|
|
212
191
|
if (affectedWorkflowIds.length === 0)
|
|
213
192
|
return;
|
|
214
193
|
this.logger.info('Recorded workflow review cause event(s)', {
|
|
215
|
-
type
|
|
194
|
+
type,
|
|
216
195
|
workflowIds: affectedWorkflowIds,
|
|
217
196
|
});
|
|
218
|
-
this.
|
|
197
|
+
this.stateNotifier.notifyMany(affectedWorkflowIds);
|
|
219
198
|
}
|
|
220
199
|
catch (error) {
|
|
221
200
|
this.logger.error('Failed to record workflow review cause event(s)', {
|
|
222
|
-
type
|
|
223
|
-
workflowIds:
|
|
201
|
+
type,
|
|
202
|
+
workflowIds: logWorkflowIds,
|
|
224
203
|
error,
|
|
225
204
|
});
|
|
226
205
|
}
|
|
227
206
|
}
|
|
228
|
-
async
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
data: { reason: 'no-reviewable-workflows' },
|
|
239
|
-
createdById: null,
|
|
240
|
-
}, ctx);
|
|
241
|
-
return true;
|
|
242
|
-
}
|
|
243
|
-
broadcastReviewStateChanged(workflowIds) {
|
|
244
|
-
for (const workflowId of workflowIds) {
|
|
245
|
-
this.collaborationService
|
|
246
|
-
.broadcastWorkflowReviewStateChanged(workflowId)
|
|
247
|
-
.catch((error) => this.logger.warn('Failed to broadcast review state change', { workflowId, error }));
|
|
207
|
+
async closeUnreviewable(ctx, candidateRequestIds) {
|
|
208
|
+
const closableRequestIds = await this.workflowReviewLifecycleRepository.findUnreviewableOpenRequestIds(ctx, candidateRequestIds);
|
|
209
|
+
await this.workflowReviewRequestRepository.closeRequests(closableRequestIds, ctx);
|
|
210
|
+
for (const requestId of closableRequestIds) {
|
|
211
|
+
await this.activityRepository.createActivity({
|
|
212
|
+
workflowReviewRequestId: requestId,
|
|
213
|
+
type: 'review.closed',
|
|
214
|
+
data: { reason: 'no-reviewable-workflows' },
|
|
215
|
+
createdById: null,
|
|
216
|
+
}, ctx);
|
|
248
217
|
}
|
|
218
|
+
return closableRequestIds;
|
|
249
219
|
}
|
|
250
220
|
};
|
|
251
221
|
exports.WorkflowReviewLifecycleService = WorkflowReviewLifecycleService;
|
|
252
222
|
exports.WorkflowReviewLifecycleService = WorkflowReviewLifecycleService = __decorate([
|
|
253
223
|
(0, di_1.Service)(),
|
|
254
|
-
__metadata("design:paramtypes", [backend_common_1.Logger, db_1.WorkflowReviewRequestRepository, db_1.WorkflowReviewRequestWorkflowRepository, db_1.WorkflowReviewActivityRepository, db_1.DbLockService,
|
|
224
|
+
__metadata("design:paramtypes", [backend_common_1.Logger, db_1.WorkflowReviewRequestRepository, db_1.WorkflowReviewLifecycleRepository, db_1.WorkflowReviewRequestWorkflowRepository, db_1.WorkflowReviewActivityRepository, db_1.DbLockService, workflow_review_state_notifier_service_1.WorkflowReviewStateNotifier, event_service_1.EventService])
|
|
255
225
|
], WorkflowReviewLifecycleService);
|
|
256
226
|
//# sourceMappingURL=workflow-review-lifecycle.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-review-lifecycle.service.js","sourceRoot":"","sources":["../../../src/modules/workflow-reviews.ee/workflow-review-lifecycle.service.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"workflow-review-lifecycle.service.js","sourceRoot":"","sources":["../../../src/modules/workflow-reviews.ee/workflow-review-lifecycle.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,wDAA6C;AAC7C,gCAOiB;AACjB,gCAAkC;AAElC,0DAAsD;AAGtD,qGAAuF;AAYvF,MAAM,8BAA8B,GAAG;IACtC,mBAAmB,EAAE,mBAAmB;IACxC,gBAAgB,EAAE,gBAAgB;IAClC,kBAAkB,EAAE,kBAAkB;CAItC,CAAC;AAGF,MAAM,2BAA2B,GAAG,IAAI,CAAC;AASlC,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAG1C,YACkB,MAAc,EACd,+BAAgE,EAChE,iCAAoE,EACpE,uCAAgF,EAChF,kBAAoD,EACpD,aAA4B,EAC5B,aAA0C,EAC1C,YAA0B;QAP1B,WAAM,GAAN,MAAM,CAAQ;QACd,oCAA+B,GAA/B,+BAA+B,CAAiC;QAChE,sCAAiC,GAAjC,iCAAiC,CAAmC;QACpE,4CAAuC,GAAvC,uCAAuC,CAAyC;QAChF,uBAAkB,GAAlB,kBAAkB,CAAkC;QACpD,kBAAa,GAAb,aAAa,CAAe;QAC5B,kBAAa,GAAb,aAAa,CAA6B;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IAAI,CAAC,yCAAyC,EAAE;gBAC3D,IAAI;gBACJ,WAAW,EAAE,mBAAmB;aAChC,CAAC,CAAC;YAEH,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;QACpD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iDAAiD,EAAE;gBACpE,IAAI;gBACJ,WAAW,EAAE,cAAc;gBAC3B,KAAK;aACL,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IAMO,KAAK,CAAC,iBAAiB,CAC9B,GAAqB,EACrB,mBAA8B;QAE9B,MAAM,kBAAkB,GACvB,MAAM,IAAI,CAAC,iCAAiC,CAAC,8BAA8B,CAC1E,GAAG,EACH,mBAAmB,CACnB,CAAC;QAEH,MAAM,IAAI,CAAC,+BAA+B,CAAC,aAAa,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;QAElF,KAAK,MAAM,SAAS,IAAI,kBAAkB,EAAE,CAAC;YAC5C,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAC3C;gBACC,uBAAuB,EAAE,SAAS;gBAClC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,EAAE,MAAM,EAAE,yBAAyB,EAAE;gBAC3C,WAAW,EAAE,IAAI;aACjB,EACD,GAAG,CACH,CAAC;QACH,CAAC;QAED,OAAO,kBAAkB,CAAC;IAC3B,CAAC;CACD,CAAA;;yCAlTY,8BAA8B;IAD1C,IAAA,YAAO,GAAE;qCAKiB,uBAAM,EACmB,oCAA+B,EAC7B,sCAAiC,EAC3B,4CAAuC,EAC5D,qCAAgC,EACrC,kBAAa,EACb,oEAA2B,EAC5B,4BAAY;GAXhC,8BAA8B,CAkT1C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { WorkflowReviewEligibleReviewer } from '@n8n/api-types';
|
|
2
|
+
import { UserRepository, WorkflowReviewRequestAuthorRepository, WorkflowReviewRequestReviewerRepository, type WorkflowReviewRequest } from '@n8n/db';
|
|
3
|
+
export interface WorkflowReviewParticipants {
|
|
4
|
+
requester: WorkflowReviewEligibleReviewer | null;
|
|
5
|
+
authors: WorkflowReviewEligibleReviewer[];
|
|
6
|
+
reviewers: WorkflowReviewEligibleReviewer[];
|
|
7
|
+
}
|
|
8
|
+
export interface WorkflowReviewParticipantLookup {
|
|
9
|
+
for(requestId: string): WorkflowReviewParticipants;
|
|
10
|
+
}
|
|
11
|
+
export declare class WorkflowReviewParticipantResolver {
|
|
12
|
+
private readonly workflowReviewRequestReviewerRepository;
|
|
13
|
+
private readonly workflowReviewRequestAuthorRepository;
|
|
14
|
+
private readonly userRepository;
|
|
15
|
+
constructor(workflowReviewRequestReviewerRepository: WorkflowReviewRequestReviewerRepository, workflowReviewRequestAuthorRepository: WorkflowReviewRequestAuthorRepository, userRepository: UserRepository);
|
|
16
|
+
resolve(requests: WorkflowReviewRequest[]): Promise<WorkflowReviewParticipantLookup>;
|
|
17
|
+
}
|