n8n 2.37.5 → 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/adapters/agents-credential-provider.js +1 -1
- package/dist/modules/agents/adapters/agents-credential-provider.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 +3 -5
- 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/builder-model-live-lookup.service.js +1 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.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 +74 -61
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +5 -4
- 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/node-tools.skill.js +4 -4
- package/dist/modules/agents/builder/skills/node-tools.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/json-config/model-config.js +1 -1
- package/dist/modules/agents/json-config/model-config.js.map +1 -1
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.js +1 -1
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.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-scopes.js +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 +3 -1
- package/dist/modules/mcp/mcp.constants.js +4 -2
- 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.service.js +3 -3
- 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/mcp/tools/list-credentials.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/list-credentials.tool.js +5 -5
- package/dist/modules/mcp/tools/list-credentials.tool.js.map +1 -1
- package/dist/modules/mcp/tools/{list-n8n-connect-services.tool.d.ts → list-n8n-gateway-services.tool.d.ts} +1 -1
- package/dist/modules/mcp/tools/{list-n8n-connect-services.tool.js → list-n8n-gateway-services.tool.js} +13 -13
- package/dist/modules/mcp/tools/list-n8n-gateway-services.tool.js.map +1 -0
- 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/credentials-auto-assign.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +8 -6
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +8 -6
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.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-eligibility.js +1 -1
- package/dist/services/ai-gateway-eligibility.js.map +1 -1
- package/dist/services/ai-gateway.service.js +14 -14
- 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/node-resource-explorer.service.js +1 -1
- package/dist/services/node-resource-explorer.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 +39 -39
- 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/mcp/tools/list-n8n-connect-services.tool.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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-availability-policy-scope.repository.js","sourceRoot":"","sources":["../../../../../src/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAA6F;AAC7F,gCAAkC;AAClC,0CAAsD;AAGtD,6GAAgG;AAUzF,IAAM,qCAAqC,GAA3C,MAAM,qCAAsC,SAAQ,mBAA2C;IACrG,YAAY,UAAsB,EAAE,iBAAoC;QACvE,KAAK,CAAC,mEAA2B,EAAE,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;IAC3E,CAAC;IAMD,KAAK,CAAC,yBAAyB,CAC9B,IAAY,EACZ,SAAwB,EACxB,GAAqB;QAErB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,m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type { PolicyRule } from '../../policy-rule.types';
|
|
4
|
+
import { TypeAvailabilityPolicy } from '../entities/type-availability-policy.entity';
|
|
5
|
+
type NewPolicy = {
|
|
6
|
+
kind: string;
|
|
7
|
+
rules: readonly PolicyRule[];
|
|
8
|
+
updatedBy: string;
|
|
9
|
+
};
|
|
10
|
+
export declare class TypeAvailabilityPolicyRepository extends BaseRepository<TypeAvailabilityPolicy> {
|
|
11
|
+
constructor(dataSource: DataSource, transactionRunner: TransactionRunner);
|
|
12
|
+
findById(id: string, ctx: OperationContext): Promise<TypeAvailabilityPolicy | null>;
|
|
13
|
+
findManyByIds(ids: string[], ctx: OperationContext): Promise<TypeAvailabilityPolicy[]>;
|
|
14
|
+
createPolicy(input: NewPolicy, ctx: OperationContext): Promise<TypeAvailabilityPolicy>;
|
|
15
|
+
updateRules(id: string, rules: readonly PolicyRule[], updatedBy: string, ctx: OperationContext): Promise<TypeAvailabilityPolicy | null>;
|
|
16
|
+
deletePolicy(id: string, ctx: OperationContext): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TypeAvailabilityPolicyRepository = void 0;
|
|
13
|
+
const db_1 = require("@n8n/db");
|
|
14
|
+
const di_1 = require("@n8n/di");
|
|
15
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
16
|
+
const node_util_1 = require("node:util");
|
|
17
|
+
const type_availability_policy_entity_1 = require("../entities/type-availability-policy.entity");
|
|
18
|
+
function rulesEqual(a, b) {
|
|
19
|
+
return (0, node_util_1.isDeepStrictEqual)([...a], [...b]);
|
|
20
|
+
}
|
|
21
|
+
let TypeAvailabilityPolicyRepository = class TypeAvailabilityPolicyRepository extends db_1.BaseRepository {
|
|
22
|
+
constructor(dataSource, transactionRunner) {
|
|
23
|
+
super(type_availability_policy_entity_1.TypeAvailabilityPolicy, dataSource.manager, transactionRunner);
|
|
24
|
+
}
|
|
25
|
+
async findById(id, ctx) {
|
|
26
|
+
return await this.managerFor(ctx).findOneBy(type_availability_policy_entity_1.TypeAvailabilityPolicy, { id });
|
|
27
|
+
}
|
|
28
|
+
async findManyByIds(ids, ctx) {
|
|
29
|
+
if (ids.length === 0)
|
|
30
|
+
return [];
|
|
31
|
+
return await this.managerFor(ctx).findBy(type_availability_policy_entity_1.TypeAvailabilityPolicy, { id: (0, typeorm_1.In)(ids) });
|
|
32
|
+
}
|
|
33
|
+
async createPolicy(input, ctx) {
|
|
34
|
+
const policy = this.create({
|
|
35
|
+
kind: input.kind,
|
|
36
|
+
rules: [...input.rules],
|
|
37
|
+
updatedBy: input.updatedBy,
|
|
38
|
+
version: 1,
|
|
39
|
+
});
|
|
40
|
+
return await this.managerFor(ctx).save(type_availability_policy_entity_1.TypeAvailabilityPolicy, policy);
|
|
41
|
+
}
|
|
42
|
+
async updateRules(id, rules, updatedBy, ctx) {
|
|
43
|
+
return await this.runInTransaction(ctx, async (tx) => {
|
|
44
|
+
const policy = await tx.findOneBy(type_availability_policy_entity_1.TypeAvailabilityPolicy, { id });
|
|
45
|
+
if (!policy)
|
|
46
|
+
return null;
|
|
47
|
+
if (rulesEqual(policy.rules, rules))
|
|
48
|
+
return policy;
|
|
49
|
+
await tx.update(type_availability_policy_entity_1.TypeAvailabilityPolicy, { id }, { rules: [...rules], updatedBy });
|
|
50
|
+
await tx.increment(type_availability_policy_entity_1.TypeAvailabilityPolicy, { id }, 'version', 1);
|
|
51
|
+
return await tx.findOneBy(type_availability_policy_entity_1.TypeAvailabilityPolicy, { id });
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
async deletePolicy(id, ctx) {
|
|
55
|
+
await this.managerFor(ctx).delete(type_availability_policy_entity_1.TypeAvailabilityPolicy, { id });
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.TypeAvailabilityPolicyRepository = TypeAvailabilityPolicyRepository;
|
|
59
|
+
exports.TypeAvailabilityPolicyRepository = TypeAvailabilityPolicyRepository = __decorate([
|
|
60
|
+
(0, di_1.Service)(),
|
|
61
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource, db_1.TransactionRunner])
|
|
62
|
+
], TypeAvailabilityPolicyRepository);
|
|
63
|
+
//# sourceMappingURL=type-availability-policy.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-availability-policy.repository.js","sourceRoot":"","sources":["../../../../../src/modules/type-availability-policies/database/repositories/type-availability-policy.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAmF;AACnF,gCAAkC;AAClC,0CAA8C;AAC9C,yCAA8C;AAG9C,iGAAqF;AAcrF,SAAS,UAAU,CAAC,CAAwB,EAAE,CAAwB;IACrE,OAAO,IAAA,6BAAiB,EAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1C,CAAC;AAGM,IAAM,gCAAgC,GAAtC,MAAM,gCAAiC,SAAQ,mBAAsC;IAC3F,YAAY,UAAsB,EAAE,iBAAoC;QACvE,KAAK,CAAC,wDAAsB,EAAE,UAAU,CAAC,OAAO,EA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EAAE,KAAK,CAAC;gBAAE,OAAO,MAAM,CAAC;YAEnD,MAAM,EAAE,CAAC,MAAM,CAAC,wDAAsB,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;YAClF,MAAM,EAAE,CAAC,SAAS,CAAC,wDAAsB,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;YAEjE,OAAO,MAAM,EAAE,CAAC,SAAS,CAAC,wDAAsB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACJ,CAAC;IAOD,KAAK,CAAC,YAAY,CAAC,EAAU,EAAE,GAAqB;QACnD,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,wDAAsB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACnE,CAAC;CACD,CAAA;;2CA/DY,gCAAgC;IAD5C,IAAA,YAAO,GAAE;qCAEe,oBAAU,EAAqB,sBAAiB;GAD5D,gCAAgC,CA+D5C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ModuleInterface } from '@n8n/decorators';
|
|
2
2
|
export declare class TypeAvailabilityPoliciesModule implements ModuleInterface {
|
|
3
3
|
init(): Promise<void>;
|
|
4
|
+
entities(): Promise<(typeof import("./database/entities/type-availability-policy.entity.js").TypeAvailabilityPolicy | typeof import("./database/entities/type-availability-policy-scope.entity.js").TypeAvailabilityPolicyScope | typeof import("./database/entities/type-availability-policy-attachment.entity.js").TypeAvailabilityPolicyAttachment)[]>;
|
|
4
5
|
}
|
|
@@ -10,6 +10,12 @@ exports.TypeAvailabilityPoliciesModule = void 0;
|
|
|
10
10
|
const decorators_1 = require("@n8n/decorators");
|
|
11
11
|
let TypeAvailabilityPoliciesModule = class TypeAvailabilityPoliciesModule {
|
|
12
12
|
async init() { }
|
|
13
|
+
async entities() {
|
|
14
|
+
const { TypeAvailabilityPolicy } = await import('./database/entities/type-availability-policy.entity.js');
|
|
15
|
+
const { TypeAvailabilityPolicyScope } = await import('./database/entities/type-availability-policy-scope.entity.js');
|
|
16
|
+
const { TypeAvailabilityPolicyAttachment } = await import('./database/entities/type-availability-policy-attachment.entity.js');
|
|
17
|
+
return [TypeAvailabilityPolicy, TypeAvailabilityPolicyScope, TypeAvailabilityPolicyAttachment];
|
|
18
|
+
}
|
|
13
19
|
};
|
|
14
20
|
exports.TypeAvailabilityPoliciesModule = TypeAvailabilityPoliciesModule;
|
|
15
21
|
exports.TypeAvailabilityPoliciesModule = TypeAvailabilityPoliciesModule = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-availability-policies.module.js","sourceRoot":"","sources":["../../../src/modules/type-availability-policies/type-availability-policies.module.ts"],"names":[],"mappings":";;;;;;;;;AACA,gDAAgD;AAGzC,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAC1C,KAAK,CAAC,IAAI,KAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"type-availability-policies.module.js","sourceRoot":"","sources":["../../../src/modules/type-availability-policies/type-availability-policies.module.ts"],"names":[],"mappings":";;;;;;;;;AACA,gDAAgD;AAGzC,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAC1C,KAAK,CAAC,IAAI,KAAI,CAAC;IAEf,KAAK,CAAC,QAAQ;QACb,MAAM,EAAE,sBAAsB,EAAE,GAAG,MAAM,MAAM,CAC9C,wDAAwD,CACxD,CAAC;QACF,MAAM,EAAE,2BAA2B,EAAE,GAAG,MAAM,MAAM,CACnD,8DAA8D,CAC9D,CAAC;QACF,MAAM,EAAE,gCAAgC,EAAE,GAAG,MAAM,MAAM,CACxD,mEAAmE,CACnE,CAAC;QAEF,OAAO,CAAC,sBAAsB,EAAE,2BAA2B,EAAE,gCAAgC,CAAC,CAAC;IAChG,CAAC;CACD,CAAA;;yCAhBY,8BAA8B;IAD1C,IAAA,0BAAa,EAAC,EAAE,IAAI,EAAE,4BAA4B,EAAE,CAAC;GACzC,8BAA8B,CAgB1C"}
|
|
@@ -2,13 +2,11 @@ import type { CreateWorkflowReviewCommentDto, ListWorkflowReviewActivityQueryDto
|
|
|
2
2
|
import { Logger } from '@n8n/backend-common';
|
|
3
3
|
import { TransactionRunner, UserRepository, WorkflowReviewActivityCommentRepository, WorkflowReviewActivityRepository, WorkflowReviewRequestRepository, type User } from '@n8n/db';
|
|
4
4
|
import { EventService } from '../../events/event.service';
|
|
5
|
-
import {
|
|
6
|
-
import { WorkflowReviewEligibilityService } from './workflow-review-eligibility.service';
|
|
5
|
+
import { WorkflowReviewAuthorizationService } from './workflow-review-authorization.service';
|
|
7
6
|
import { WorkflowReviewFeatureGate } from './workflow-review-feature-gate.service';
|
|
8
7
|
export declare class WorkflowReviewActivityService {
|
|
9
8
|
private readonly featureGate;
|
|
10
|
-
private readonly
|
|
11
|
-
private readonly eligibilityService;
|
|
9
|
+
private readonly authorizationService;
|
|
12
10
|
private readonly activityRepository;
|
|
13
11
|
private readonly activityCommentRepository;
|
|
14
12
|
private readonly requestRepository;
|
|
@@ -16,7 +14,7 @@ export declare class WorkflowReviewActivityService {
|
|
|
16
14
|
private readonly txRunner;
|
|
17
15
|
private readonly logger;
|
|
18
16
|
private readonly eventService;
|
|
19
|
-
constructor(featureGate: WorkflowReviewFeatureGate,
|
|
17
|
+
constructor(featureGate: WorkflowReviewFeatureGate, authorizationService: WorkflowReviewAuthorizationService, activityRepository: WorkflowReviewActivityRepository, activityCommentRepository: WorkflowReviewActivityCommentRepository, requestRepository: WorkflowReviewRequestRepository, userRepository: UserRepository, txRunner: TransactionRunner, logger: Logger, eventService: EventService);
|
|
20
18
|
listActivity(user: User, workflowReviewRequestId: string, query: ListWorkflowReviewActivityQueryDto): Promise<ListWorkflowReviewActivityResponse>;
|
|
21
19
|
createComment(user: User, workflowReviewRequestId: string, dto: CreateWorkflowReviewCommentDto): Promise<WorkflowReviewActivityEntry>;
|
|
22
20
|
private hydrate;
|
|
@@ -17,15 +17,13 @@ const bad_request_error_1 = require("../../errors/response-errors/bad-request.er
|
|
|
17
17
|
const conflict_error_1 = require("../../errors/response-errors/conflict.error");
|
|
18
18
|
const forbidden_error_1 = require("../../errors/response-errors/forbidden.error");
|
|
19
19
|
const event_service_1 = require("../../events/event.service");
|
|
20
|
-
const
|
|
21
|
-
const workflow_review_eligibility_service_1 = require("./workflow-review-eligibility.service");
|
|
20
|
+
const workflow_review_authorization_service_1 = require("./workflow-review-authorization.service");
|
|
22
21
|
const workflow_review_feature_gate_service_1 = require("./workflow-review-feature-gate.service");
|
|
23
22
|
const workflow_review_mapper_1 = require("./workflow-review.mapper");
|
|
24
23
|
let WorkflowReviewActivityService = class WorkflowReviewActivityService {
|
|
25
|
-
constructor(featureGate,
|
|
24
|
+
constructor(featureGate, authorizationService, activityRepository, activityCommentRepository, requestRepository, userRepository, txRunner, logger, eventService) {
|
|
26
25
|
this.featureGate = featureGate;
|
|
27
|
-
this.
|
|
28
|
-
this.eligibilityService = eligibilityService;
|
|
26
|
+
this.authorizationService = authorizationService;
|
|
29
27
|
this.activityRepository = activityRepository;
|
|
30
28
|
this.activityCommentRepository = activityCommentRepository;
|
|
31
29
|
this.requestRepository = requestRepository;
|
|
@@ -36,7 +34,7 @@ let WorkflowReviewActivityService = class WorkflowReviewActivityService {
|
|
|
36
34
|
}
|
|
37
35
|
async listActivity(user, workflowReviewRequestId, query) {
|
|
38
36
|
await this.featureGate.assertAvailable();
|
|
39
|
-
await this.
|
|
37
|
+
await this.authorizationService.findReadableRequestOrFail(user, workflowReviewRequestId);
|
|
40
38
|
const { entries, hasMore } = await this.activityRepository.findFeedPage({
|
|
41
39
|
workflowReviewRequestId,
|
|
42
40
|
limit: query.limit,
|
|
@@ -48,8 +46,8 @@ let WorkflowReviewActivityService = class WorkflowReviewActivityService {
|
|
|
48
46
|
}
|
|
49
47
|
async createComment(user, workflowReviewRequestId, dto) {
|
|
50
48
|
await this.featureGate.assertAvailable();
|
|
51
|
-
const access = await this.
|
|
52
|
-
const eligibility = await this.
|
|
49
|
+
const access = await this.authorizationService.findReadableRequestOrFail(user, workflowReviewRequestId);
|
|
50
|
+
const eligibility = await this.authorizationService.resolveViewerEligibility(user, access);
|
|
53
51
|
if (!eligibility.canComment) {
|
|
54
52
|
throw new forbidden_error_1.ForbiddenError('You are not allowed to comment on this review');
|
|
55
53
|
}
|
|
@@ -106,6 +104,6 @@ let WorkflowReviewActivityService = class WorkflowReviewActivityService {
|
|
|
106
104
|
exports.WorkflowReviewActivityService = WorkflowReviewActivityService;
|
|
107
105
|
exports.WorkflowReviewActivityService = WorkflowReviewActivityService = __decorate([
|
|
108
106
|
(0, di_1.Service)(),
|
|
109
|
-
__metadata("design:paramtypes", [workflow_review_feature_gate_service_1.WorkflowReviewFeatureGate,
|
|
107
|
+
__metadata("design:paramtypes", [workflow_review_feature_gate_service_1.WorkflowReviewFeatureGate, workflow_review_authorization_service_1.WorkflowReviewAuthorizationService, db_1.WorkflowReviewActivityRepository, db_1.WorkflowReviewActivityCommentRepository, db_1.WorkflowReviewRequestRepository, db_1.UserRepository, db_1.TransactionRunner, backend_common_1.Logger, event_service_1.EventService])
|
|
110
108
|
], WorkflowReviewActivityService);
|
|
111
109
|
//# sourceMappingURL=workflow-review-activity.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-review-activity.service.js","sourceRoot":"","sources":["../../../src/modules/workflow-reviews.ee/workflow-review-activity.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA,wDAA6C;AAC7C,gCAQiB;AACjB,gCAAkC;AAElC,kFAA6E;AAC7E,4EAAwE;AACxE,8EAA0E;AAC1E,0DAAsD;AAEtD,
|
|
1
|
+
{"version":3,"file":"workflow-review-activity.service.js","sourceRoot":"","sources":["../../../src/modules/workflow-reviews.ee/workflow-review-activity.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA,wDAA6C;AAC7C,gCAQiB;A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ProjectRelationRepository, ProjectRepository, WorkflowReviewRequestAuthorRepository, WorkflowReviewRequestRepository, WorkflowReviewRequestReviewerRepository, WorkflowReviewRequestWorkflowRepository, type InboxVisibility, type User, type WorkflowReviewRequest, type WorkflowReviewRequestWorkflowDetailRow } from '@n8n/db';
|
|
2
3
|
import { ProjectService } from '../../services/project.service.ee';
|
|
3
4
|
import { RoleService } from '../../services/role.service';
|
|
4
5
|
import { WorkflowFinderService } from '../../workflows/workflow-finder.service';
|
|
5
6
|
export interface ReadableWorkflowReviewRequest {
|
|
6
7
|
request: WorkflowReviewRequest;
|
|
8
|
+
workflowRows: WorkflowReviewRequestWorkflowDetailRow[];
|
|
7
9
|
readableWorkflowRows: WorkflowReviewRequestWorkflowDetailRow[];
|
|
8
|
-
pinnedWorkflowId: string | null;
|
|
9
|
-
canReadPinnedWorkflow: boolean;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export interface WorkflowReviewViewerEligibility {
|
|
12
|
+
canDecide: boolean;
|
|
13
|
+
decisionIneligibilityReason: WorkflowReviewDecisionIneligibilityReason | null;
|
|
14
|
+
canComment: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class WorkflowReviewAuthorizationService {
|
|
12
17
|
private readonly workflowFinderService;
|
|
13
18
|
private readonly projectService;
|
|
14
19
|
private readonly roleService;
|
|
@@ -19,6 +24,9 @@ export declare class WorkflowReviewAccessService {
|
|
|
19
24
|
private readonly workflowReviewRequestAuthorRepository;
|
|
20
25
|
private readonly workflowReviewRequestReviewerRepository;
|
|
21
26
|
constructor(workflowFinderService: WorkflowFinderService, projectService: ProjectService, roleService: RoleService, projectRepository: ProjectRepository, projectRelationRepository: ProjectRelationRepository, workflowReviewRequestRepository: WorkflowReviewRequestRepository, workflowReviewRequestWorkflowRepository: WorkflowReviewRequestWorkflowRepository, workflowReviewRequestAuthorRepository: WorkflowReviewRequestAuthorRepository, workflowReviewRequestReviewerRepository: WorkflowReviewRequestReviewerRepository);
|
|
27
|
+
isAdminForProject(user: User, projectId: string): Promise<boolean>;
|
|
28
|
+
private isGlobalAdmin;
|
|
29
|
+
private findAdminProjectIds;
|
|
22
30
|
resolveInboxVisibility(user: User): Promise<InboxVisibility>;
|
|
23
31
|
private resolveReadableProjectIds;
|
|
24
32
|
findReadableRequestOrFail(user: User, workflowReviewRequestId: string): Promise<ReadableWorkflowReviewRequest>;
|
|
@@ -28,4 +36,5 @@ export declare class WorkflowReviewAccessService {
|
|
|
28
36
|
projectId: string;
|
|
29
37
|
}>): Promise<Set<string>>;
|
|
30
38
|
private filterReadableWorkflowRows;
|
|
39
|
+
resolveViewerEligibility(user: User, access: Pick<ReadableWorkflowReviewRequest, 'request' | 'workflowRows' | 'readableWorkflowRows'>): Promise<WorkflowReviewViewerEligibility>;
|
|
31
40
|
}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.WorkflowReviewAuthorizationService = void 0;
|
|
13
13
|
const db_1 = require("@n8n/db");
|
|
14
14
|
const di_1 = require("@n8n/di");
|
|
15
15
|
const permissions_1 = require("@n8n/permissions");
|
|
@@ -17,7 +17,8 @@ const not_found_error_1 = require("../../errors/response-errors/not-found.error"
|
|
|
17
17
|
const project_service_ee_1 = require("../../services/project.service.ee");
|
|
18
18
|
const role_service_1 = require("../../services/role.service");
|
|
19
19
|
const workflow_finder_service_1 = require("../../workflows/workflow-finder.service");
|
|
20
|
-
|
|
20
|
+
const workflow_review_decision_policy_1 = require("./workflow-review-decision-policy");
|
|
21
|
+
let WorkflowReviewAuthorizationService = class WorkflowReviewAuthorizationService {
|
|
21
22
|
constructor(workflowFinderService, projectService, roleService, projectRepository, projectRelationRepository, workflowReviewRequestRepository, workflowReviewRequestWorkflowRepository, workflowReviewRequestAuthorRepository, workflowReviewRequestReviewerRepository) {
|
|
22
23
|
this.workflowFinderService = workflowFinderService;
|
|
23
24
|
this.projectService = projectService;
|
|
@@ -29,14 +30,26 @@ let WorkflowReviewAccessService = class WorkflowReviewAccessService {
|
|
|
29
30
|
this.workflowReviewRequestAuthorRepository = workflowReviewRequestAuthorRepository;
|
|
30
31
|
this.workflowReviewRequestReviewerRepository = workflowReviewRequestReviewerRepository;
|
|
31
32
|
}
|
|
33
|
+
async isAdminForProject(user, projectId) {
|
|
34
|
+
if (this.isGlobalAdmin(user)) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
return (await this.findAdminProjectIds(user)).includes(projectId);
|
|
38
|
+
}
|
|
39
|
+
isGlobalAdmin(user) {
|
|
40
|
+
return user.role.slug === permissions_1.GLOBAL_ADMIN_ROLE_SLUG || user.role.slug === permissions_1.GLOBAL_OWNER_ROLE_SLUG;
|
|
41
|
+
}
|
|
42
|
+
async findAdminProjectIds(user) {
|
|
43
|
+
return await this.projectRelationRepository.getAccessibleProjectsByRoles(user.id, [
|
|
44
|
+
permissions_1.PROJECT_ADMIN_ROLE_SLUG,
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
32
47
|
async resolveInboxVisibility(user) {
|
|
33
|
-
if (
|
|
48
|
+
if (this.isGlobalAdmin(user)) {
|
|
34
49
|
return { scope: 'all' };
|
|
35
50
|
}
|
|
36
51
|
const [adminProjectIds, readableProjectIds, readableWorkflowRoles] = await Promise.all([
|
|
37
|
-
this.
|
|
38
|
-
permissions_1.PROJECT_ADMIN_ROLE_SLUG,
|
|
39
|
-
]),
|
|
52
|
+
this.findAdminProjectIds(user),
|
|
40
53
|
this.resolveReadableProjectIds(user),
|
|
41
54
|
this.roleService.rolesWithScope('workflow', ['workflow:read']),
|
|
42
55
|
]);
|
|
@@ -68,13 +81,7 @@ let WorkflowReviewAccessService = class WorkflowReviewAccessService {
|
|
|
68
81
|
if (workflowRows.length > 0 && readableWorkflowRows.length === 0) {
|
|
69
82
|
throw new not_found_error_1.NotFoundError('Could not find review request');
|
|
70
83
|
}
|
|
71
|
-
|
|
72
|
-
return {
|
|
73
|
-
request,
|
|
74
|
-
readableWorkflowRows,
|
|
75
|
-
pinnedWorkflowId,
|
|
76
|
-
canReadPinnedWorkflow: readableWorkflowRows.some((row) => row.workflowId === pinnedWorkflowId),
|
|
77
|
-
};
|
|
84
|
+
return { request, workflowRows, readableWorkflowRows };
|
|
78
85
|
}
|
|
79
86
|
async canAccessRequest(user, request) {
|
|
80
87
|
const visibility = await this.resolveInboxVisibility(user);
|
|
@@ -124,10 +131,38 @@ let WorkflowReviewAccessService = class WorkflowReviewAccessService {
|
|
|
124
131
|
: null));
|
|
125
132
|
return readable.filter((row) => row !== null);
|
|
126
133
|
}
|
|
134
|
+
async resolveViewerEligibility(user, access) {
|
|
135
|
+
const { request, workflowRows, readableWorkflowRows } = access;
|
|
136
|
+
const canReadEveryWorkflow = workflowRows.length > 0 && readableWorkflowRows.length === workflowRows.length;
|
|
137
|
+
if (!canReadEveryWorkflow) {
|
|
138
|
+
return {
|
|
139
|
+
canDecide: false,
|
|
140
|
+
decisionIneligibilityReason: 'missing_permission',
|
|
141
|
+
canComment: false,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
const participant = { workflowReviewRequestId: request.id, userId: user.id };
|
|
145
|
+
const [isAuthor, isAssignedReviewer, hasAdminOverride] = await Promise.all([
|
|
146
|
+
this.workflowReviewRequestAuthorRepository.isAuthor(participant, {}),
|
|
147
|
+
this.workflowReviewRequestReviewerRepository.isReviewer(participant, {}),
|
|
148
|
+
this.isAdminForProject(user, request.projectId),
|
|
149
|
+
]);
|
|
150
|
+
const capability = (0, workflow_review_decision_policy_1.resolveDecisionCapability)({
|
|
151
|
+
canReadEveryWorkflow,
|
|
152
|
+
isAuthor,
|
|
153
|
+
isAssignedReviewer,
|
|
154
|
+
hasAdminOverride,
|
|
155
|
+
});
|
|
156
|
+
return {
|
|
157
|
+
canDecide: capability.allowed,
|
|
158
|
+
decisionIneligibilityReason: capability.allowed ? null : capability.reason,
|
|
159
|
+
canComment: capability.allowed || isAuthor,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
127
162
|
};
|
|
128
|
-
exports.
|
|
129
|
-
exports.
|
|
163
|
+
exports.WorkflowReviewAuthorizationService = WorkflowReviewAuthorizationService;
|
|
164
|
+
exports.WorkflowReviewAuthorizationService = WorkflowReviewAuthorizationService = __decorate([
|
|
130
165
|
(0, di_1.Service)(),
|
|
131
166
|
__metadata("design:paramtypes", [workflow_finder_service_1.WorkflowFinderService, project_service_ee_1.ProjectService, role_service_1.RoleService, db_1.ProjectRepository, db_1.ProjectRelationRepository, db_1.WorkflowReviewRequestRepository, db_1.WorkflowReviewRequestWorkflowRepository, db_1.WorkflowReviewRequestAuthorRepository, db_1.WorkflowReviewRequestReviewerRepository])
|
|
132
|
-
],
|
|
133
|
-
//# sourceMappingURL=workflow-review-
|
|
167
|
+
], WorkflowReviewAuthorizationService);
|
|
168
|
+
//# sourceMappingURL=workflow-review-authorization.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-review-authorization.service.js","sourceRoot":"","sources":["../../../src/modules/workflow-reviews.ee/workflow-review-authorization.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAWiB;AACjB,gCAAkC;AAClC,kDAK0B;AAE1B,8EAAyE;AACzE,sEAA+D;AAC/D,0DAAsD;AACtD,iFAA4E;AAE5E,uFAA8E;AAsBvE,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAC9C,YACkB,qBAA4C,EAC5C,cAA8B,EAC9B,WAAwB,EACxB,iBAAoC,EACpC,yBAAoD,EACpD,+BAAgE,EAChE,uCAAgF,EAChF,qCAA4E,EAC5E,uCAAgF;qCARhF,qBAAqB;8BACrB,cAAc;2BACd,WAAW;iCACX,iBAAiB;yCACjB,yBAAyB;+CACzB,+BAA+B;uDAC/B,uCAAuC;qDACvC,qCAAq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AU,CAAC,OAAO;YAC7B,2BAA2B,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM;YAE1E,UAAU,EAAE,UAAU,CAAC,OAAO,IAAI,QAAQ;SAC1C,CAAC;IACH,CAAC;CAGD,CAAA;;6CA1QY,kCAAkC;IAD9C,IAAA,YAAO,GAAE;qCAGgC,+CAAqB,EAC5B,mCAAc,EACjB,0BAAW,EACL,sBAAiB,EACT,8BAAyB,EACnB,oCAA+B,EACvB,4CAAuC,EACzC,0CAAqC,EACnC,4CAAuC;GAVtF,kCAAkC,CA0Q9C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WorkflowReviewDecisionIneligibilityReason } from '@n8n/api-types';
|
|
2
|
+
export interface WorkflowReviewDecisionFacts {
|
|
3
|
+
canReadEveryWorkflow: boolean;
|
|
4
|
+
isAuthor: boolean;
|
|
5
|
+
isAssignedReviewer: boolean;
|
|
6
|
+
hasAdminOverride: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type WorkflowReviewDecisionCapability = {
|
|
9
|
+
allowed: true;
|
|
10
|
+
} | {
|
|
11
|
+
allowed: false;
|
|
12
|
+
reason: WorkflowReviewDecisionIneligibilityReason;
|
|
13
|
+
};
|
|
14
|
+
export declare function resolveDecisionCapability(facts: WorkflowReviewDecisionFacts): WorkflowReviewDecisionCapability;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveDecisionCapability = resolveDecisionCapability;
|
|
4
|
+
const ALLOWED = { allowed: true };
|
|
5
|
+
function resolveDecisionCapability(facts) {
|
|
6
|
+
if (!facts.canReadEveryWorkflow) {
|
|
7
|
+
return { allowed: false, reason: 'missing_permission' };
|
|
8
|
+
}
|
|
9
|
+
if (facts.hasAdminOverride || facts.isAssignedReviewer) {
|
|
10
|
+
return ALLOWED;
|
|
11
|
+
}
|
|
12
|
+
if (facts.isAuthor) {
|
|
13
|
+
return { allowed: false, reason: 'author' };
|
|
14
|
+
}
|
|
15
|
+
return { allowed: false, reason: 'missing_reviewer_permission' };
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=workflow-review-decision-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-review-decision-policy.js","sourceRoot":"","sources":["../../../src/modules/workflow-reviews.ee/workflow-review-decision-policy.ts"],"names":[],"mappings":";;;AAkBA,MAAM,OAAO,GAAqC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAapE,mCACC,KAAkC;IAIlC,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE,CAAC;QACjC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC;IACzD,CAAC;IAED,IAAI,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,kBAAkB,EAAE,CAAC;QACxD,OAAO,OAAO,CAAC;IAChB,CAAC;IAED,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IAC7C,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,6BAA6B,EAAE,CAAC;AAClE,CAAC"}
|
|
@@ -1,29 +1,25 @@
|
|
|
1
1
|
import type { GetWorkflowReviewInboxSummaryResponse, ListWorkflowReviewInboxQueryDto, ListWorkflowReviewInboxResponse, WorkflowReviewRequestDetail } from '@n8n/api-types';
|
|
2
|
-
import {
|
|
2
|
+
import { WorkflowReviewInboxRepository, WorkflowReviewRequestWorkflowRepository, type User } from '@n8n/db';
|
|
3
3
|
import { WorkflowHistoryService } from '../../workflows/workflow-history/workflow-history.service';
|
|
4
|
-
import {
|
|
5
|
-
import { WorkflowReviewEligibilityService } from './workflow-review-eligibility.service';
|
|
4
|
+
import { WorkflowReviewAuthorizationService } from './workflow-review-authorization.service';
|
|
6
5
|
import { WorkflowReviewFeatureGate } from './workflow-review-feature-gate.service';
|
|
6
|
+
import { WorkflowReviewParticipantResolver } from './workflow-review-participant.resolver';
|
|
7
7
|
export declare class WorkflowReviewInboxService {
|
|
8
8
|
private readonly featureGate;
|
|
9
|
-
private readonly
|
|
9
|
+
private readonly authorizationService;
|
|
10
10
|
private readonly workflowHistoryService;
|
|
11
|
-
private readonly
|
|
11
|
+
private readonly workflowReviewInboxRepository;
|
|
12
12
|
private readonly workflowReviewRequestWorkflowRepository;
|
|
13
|
-
private readonly
|
|
14
|
-
|
|
15
|
-
private readonly userRepository;
|
|
16
|
-
private readonly eligibilityService;
|
|
17
|
-
constructor(featureGate: WorkflowReviewFeatureGate, accessService: WorkflowReviewAccessService, workflowHistoryService: WorkflowHistoryService, workflowReviewRequestRepository: WorkflowReviewRequestRepository, workflowReviewRequestWorkflowRepository: WorkflowReviewRequestWorkflowRepository, workflowReviewRequestReviewerRepository: WorkflowReviewRequestReviewerRepository, workflowReviewRequestAuthorRepository: WorkflowReviewRequestAuthorRepository, userRepository: UserRepository, eligibilityService: WorkflowReviewEligibilityService);
|
|
13
|
+
private readonly participantResolver;
|
|
14
|
+
constructor(featureGate: WorkflowReviewFeatureGate, authorizationService: WorkflowReviewAuthorizationService, workflowHistoryService: WorkflowHistoryService, workflowReviewInboxRepository: WorkflowReviewInboxRepository, workflowReviewRequestWorkflowRepository: WorkflowReviewRequestWorkflowRepository, participantResolver: WorkflowReviewParticipantResolver);
|
|
18
15
|
listForInbox(user: User, query: ListWorkflowReviewInboxQueryDto): Promise<ListWorkflowReviewInboxResponse>;
|
|
19
16
|
getInboxSummaryForUser(user: User): Promise<GetWorkflowReviewInboxSummaryResponse>;
|
|
20
17
|
getDetail(user: User, workflowReviewRequestId: string): Promise<WorkflowReviewRequestDetail>;
|
|
21
|
-
private resolveParticipants;
|
|
22
18
|
private toWorkflowDetail;
|
|
23
19
|
private findVersionSnapshot;
|
|
24
20
|
private toVersionSnapshot;
|
|
25
|
-
private hydrateParticipants;
|
|
26
21
|
private encodeInboxCursor;
|
|
27
22
|
private decodeInboxCursor;
|
|
23
|
+
private toReviewSummary;
|
|
28
24
|
private toInboxItem;
|
|
29
25
|
}
|