@atom8n/n8n 2.4.7 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/chat/chat-service.types.d.ts +6 -6
  3. package/dist/commands/execute-batch.d.ts +2 -2
  4. package/dist/commands/execute.js +0 -0
  5. package/dist/commands/import/credentials.d.ts +2 -2
  6. package/dist/commands/import/credentials.js +0 -0
  7. package/dist/commands/import/workflow.d.ts +2 -2
  8. package/dist/commands/ldap/reset.d.ts +2 -2
  9. package/dist/commands/mcp.d.ts +23 -0
  10. package/dist/commands/mcp.js +315 -0
  11. package/dist/commands/run.d.ts +23 -0
  12. package/dist/commands/run.js +162 -0
  13. package/dist/controllers/annotation-tags.controller.ee.d.ts +1 -1
  14. package/dist/controllers/cli.controller.d.ts +26 -0
  15. package/dist/controllers/cli.controller.js +334 -0
  16. package/dist/controllers/orchestration.controller.js +0 -0
  17. package/dist/controllers/users.controller.d.ts +1 -1
  18. package/dist/environments.ee/source-control/source-control-status.service.ee.d.ts +2 -2
  19. package/dist/environments.ee/source-control/source-control.controller.ee.d.ts +4 -4
  20. package/dist/environments.ee/source-control/source-control.service.ee.d.ts +2 -2
  21. package/dist/environments.ee/source-control/types/source-control-set-branch.js +0 -0
  22. package/dist/eventbus/event-message-classes/index.js +0 -0
  23. package/dist/events/relays/workflow-failure-notification.event-relay.d.ts +13 -0
  24. package/dist/events/relays/workflow-failure-notification.event-relay.js +77 -0
  25. package/dist/executions/execution-data/types.d.ts +17 -0
  26. package/dist/executions/execution-data/types.js +2 -0
  27. package/dist/executions/failed-run-factory.d.ts +4 -0
  28. package/dist/executions/failed-run-factory.js +71 -0
  29. package/dist/index.d.ts +2 -1
  30. package/dist/index.js +8 -0
  31. package/dist/interfaces.d.ts +1 -1
  32. package/dist/license.js +1 -1
  33. package/dist/middlewares/webview-frame-options.d.ts +2 -0
  34. package/dist/middlewares/webview-frame-options.js +22 -0
  35. package/dist/modules/chat-hub/chat-hub-extractor.d.ts +22 -0
  36. package/dist/modules/chat-hub/chat-hub-extractor.js +63 -0
  37. package/dist/modules/dynamic-credentials.ee/credential-resolvers/storage/dynamic-credential-user-entry-storage.d.ts +11 -0
  38. package/dist/modules/dynamic-credentials.ee/credential-resolvers/storage/dynamic-credential-user-entry-storage.js +58 -0
  39. package/dist/modules/dynamic-credentials.ee/database/entities/dynamic-credential-user-entry.d.ts +12 -0
  40. package/dist/modules/dynamic-credentials.ee/database/entities/dynamic-credential-user-entry.js +64 -0
  41. package/dist/modules/dynamic-credentials.ee/database/repositories/dynamic-credential-user-entry.repository.d.ts +5 -0
  42. package/dist/modules/dynamic-credentials.ee/database/repositories/dynamic-credential-user-entry.repository.js +25 -0
  43. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.d.ts +5 -0
  44. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.js +36 -0
  45. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-cors.service.d.ts +12 -0
  46. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-cors.service.js +69 -0
  47. package/dist/modules/dynamic-credentials.ee/services/resolver-config-expression.service.d.ts +7 -0
  48. package/dist/modules/dynamic-credentials.ee/services/resolver-config-expression.service.js +46 -0
  49. package/dist/modules/insights/database/entities/insights-metadata.js +1 -1
  50. package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js +4 -1
  51. package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +1 -1
  52. package/dist/modules/insights/insights.module.d.ts +1 -1
  53. package/dist/modules/insights/insights.service.d.ts +1 -1
  54. package/dist/modules/log-streaming.ee/database/entities/event-destination.entity.d.ts +6 -0
  55. package/dist/modules/log-streaming.ee/database/entities/event-destination.entity.js +28 -0
  56. package/dist/modules/log-streaming.ee/database/entities/index.d.ts +1 -0
  57. package/dist/modules/log-streaming.ee/database/entities/index.js +5 -0
  58. package/dist/modules/log-streaming.ee/database/repositories/event-destination.repository.d.ts +5 -0
  59. package/dist/modules/log-streaming.ee/database/repositories/event-destination.repository.js +25 -0
  60. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-from-db.d.ts +4 -0
  61. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-from-db.js +24 -0
  62. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-sentry.ee.d.ts +17 -0
  63. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-sentry.ee.js +131 -0
  64. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-syslog.ee.d.ts +22 -0
  65. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-syslog.ee.js +116 -0
  66. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.d.ts +35 -0
  67. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.js +328 -0
  68. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination.ee.d.ts +28 -0
  69. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination.ee.js +74 -0
  70. package/dist/modules/log-streaming.ee/log-streaming-destination.service.d.ts +32 -0
  71. package/dist/modules/log-streaming.ee/log-streaming-destination.service.js +175 -0
  72. package/dist/modules/log-streaming.ee/log-streaming.controller.d.ts +15 -0
  73. package/dist/modules/log-streaming.ee/log-streaming.controller.js +149 -0
  74. package/dist/modules/log-streaming.ee/log-streaming.module.d.ts +5 -0
  75. package/dist/modules/log-streaming.ee/log-streaming.module.js +66 -0
  76. package/dist/modules/mcp/mcp-oauth.helpers.js +0 -0
  77. package/dist/modules/mcp/mcp.oauth-clients.controller.js +0 -0
  78. package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +10 -10
  79. package/dist/modules/mcp/tools/schemas.d.ts +10 -10
  80. package/dist/modules/source-control.ee/constants.d.ts +17 -0
  81. package/dist/modules/source-control.ee/constants.js +22 -0
  82. package/dist/modules/source-control.ee/middleware/source-control-enabled-middleware.ee.d.ts +2 -0
  83. package/dist/modules/source-control.ee/middleware/source-control-enabled-middleware.ee.js +18 -0
  84. package/dist/modules/source-control.ee/source-control-export.service.ee.d.ts +37 -0
  85. package/dist/modules/source-control.ee/source-control-export.service.ee.js +426 -0
  86. package/dist/modules/source-control.ee/source-control-git.service.ee.d.ts +59 -0
  87. package/dist/modules/source-control.ee/source-control-git.service.ee.js +427 -0
  88. package/dist/modules/source-control.ee/source-control-helper.ee.d.ts +49 -0
  89. package/dist/modules/source-control.ee/source-control-helper.ee.js +241 -0
  90. package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +110 -0
  91. package/dist/modules/source-control.ee/source-control-import.service.ee.js +957 -0
  92. package/dist/modules/source-control.ee/source-control-preferences.service.ee.d.ts +46 -0
  93. package/dist/modules/source-control.ee/source-control-preferences.service.ee.js +309 -0
  94. package/dist/modules/source-control.ee/source-control-resource-helper.d.ts +4 -0
  95. package/dist/modules/source-control.ee/source-control-resource-helper.js +20 -0
  96. package/dist/modules/source-control.ee/source-control-scoped.service.d.ts +17 -0
  97. package/dist/modules/source-control.ee/source-control-scoped.service.js +134 -0
  98. package/dist/modules/source-control.ee/source-control-status.service.ee.d.ts +90 -0
  99. package/dist/modules/source-control.ee/source-control-status.service.ee.js +596 -0
  100. package/dist/modules/source-control.ee/source-control.config.d.ts +3 -0
  101. package/dist/modules/source-control.ee/source-control.config.js +26 -0
  102. package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +157 -0
  103. package/dist/modules/source-control.ee/source-control.controller.ee.js +347 -0
  104. package/dist/modules/source-control.ee/source-control.module.d.ts +4 -0
  105. package/dist/modules/source-control.ee/source-control.module.js +59 -0
  106. package/dist/modules/source-control.ee/source-control.service.ee.d.ts +125 -0
  107. package/dist/modules/source-control.ee/source-control.service.ee.js +466 -0
  108. package/dist/modules/source-control.ee/types/export-result.d.ts +10 -0
  109. package/dist/modules/source-control.ee/types/export-result.js +2 -0
  110. package/dist/modules/source-control.ee/types/exportable-credential.d.ts +14 -0
  111. package/dist/modules/source-control.ee/types/exportable-credential.js +2 -0
  112. package/dist/modules/source-control.ee/types/exportable-folders.d.ts +11 -0
  113. package/dist/modules/source-control.ee/types/exportable-folders.js +2 -0
  114. package/dist/modules/source-control.ee/types/exportable-project.d.ts +17 -0
  115. package/dist/modules/source-control.ee/types/exportable-project.js +2 -0
  116. package/dist/modules/source-control.ee/types/exportable-tags.d.ts +5 -0
  117. package/dist/modules/source-control.ee/types/exportable-tags.js +2 -0
  118. package/dist/modules/source-control.ee/types/exportable-variable.d.ts +7 -0
  119. package/dist/modules/source-control.ee/types/exportable-variable.js +2 -0
  120. package/dist/modules/source-control.ee/types/exportable-workflow.d.ts +14 -0
  121. package/dist/modules/source-control.ee/types/exportable-workflow.js +2 -0
  122. package/dist/modules/source-control.ee/types/import-result.d.ts +20 -0
  123. package/dist/modules/source-control.ee/types/import-result.js +2 -0
  124. package/dist/modules/source-control.ee/types/key-pair-type.d.ts +1 -0
  125. package/dist/modules/source-control.ee/types/key-pair-type.js +2 -0
  126. package/dist/modules/source-control.ee/types/key-pair.d.ts +4 -0
  127. package/dist/modules/source-control.ee/types/key-pair.js +2 -0
  128. package/dist/modules/source-control.ee/types/requests.d.ts +21 -0
  129. package/dist/modules/source-control.ee/types/requests.js +2 -0
  130. package/dist/modules/source-control.ee/types/resource-owner.d.ts +17 -0
  131. package/dist/modules/source-control.ee/types/resource-owner.js +2 -0
  132. package/dist/modules/source-control.ee/types/source-control-commit.d.ts +3 -0
  133. package/dist/modules/source-control.ee/types/source-control-commit.js +20 -0
  134. package/dist/modules/source-control.ee/types/source-control-context.d.ts +7 -0
  135. package/dist/modules/source-control.ee/types/source-control-context.js +16 -0
  136. package/dist/modules/source-control.ee/types/source-control-disconnect.d.ts +3 -0
  137. package/dist/modules/source-control.ee/types/source-control-disconnect.js +21 -0
  138. package/dist/modules/source-control.ee/types/source-control-generate-key-pair.d.ts +4 -0
  139. package/dist/modules/source-control.ee/types/source-control-generate-key-pair.js +21 -0
  140. package/dist/modules/source-control.ee/types/source-control-get-status.d.ts +10 -0
  141. package/dist/modules/source-control.ee/types/source-control-get-status.js +42 -0
  142. package/dist/modules/source-control.ee/types/source-control-preferences.d.ts +17 -0
  143. package/dist/modules/source-control.ee/types/source-control-preferences.js +88 -0
  144. package/dist/modules/source-control.ee/types/source-control-push.d.ts +3 -0
  145. package/dist/modules/source-control.ee/types/source-control-push.js +21 -0
  146. package/dist/modules/source-control.ee/types/source-control-set-branch.d.ts +3 -0
  147. package/dist/modules/source-control.ee/types/source-control-set-branch.js +20 -0
  148. package/dist/modules/source-control.ee/types/source-control-set-read-only.d.ts +3 -0
  149. package/dist/modules/source-control.ee/types/source-control-set-read-only.js +20 -0
  150. package/dist/modules/source-control.ee/types/source-control-stage.d.ts +5 -0
  151. package/dist/modules/source-control.ee/types/source-control-stage.js +31 -0
  152. package/dist/modules/source-control.ee/types/source-control-workflow-version-id.d.ts +12 -0
  153. package/dist/modules/source-control.ee/types/source-control-workflow-version-id.js +2 -0
  154. package/dist/modules/sso-oidc/constants.d.ts +3 -0
  155. package/dist/modules/sso-oidc/constants.js +6 -0
  156. package/dist/modules/sso-oidc/oidc.controller.ee.d.ts +23 -0
  157. package/dist/modules/sso-oidc/oidc.controller.ee.js +123 -0
  158. package/dist/modules/sso-oidc/oidc.service.ee.d.ts +56 -0
  159. package/dist/modules/sso-oidc/oidc.service.ee.js +468 -0
  160. package/dist/modules/sso-oidc/sso-oidc.module.d.ts +4 -0
  161. package/dist/modules/sso-oidc/sso-oidc.module.js +55 -0
  162. package/dist/modules/sso-saml/constants.d.ts +3 -0
  163. package/dist/modules/sso-saml/constants.js +6 -0
  164. package/dist/modules/sso-saml/errors/invalid-saml-metadata-url.error.d.ts +4 -0
  165. package/dist/modules/sso-saml/errors/invalid-saml-metadata-url.error.js +10 -0
  166. package/dist/modules/sso-saml/errors/invalid-saml-metadata.error.d.ts +4 -0
  167. package/dist/modules/sso-saml/errors/invalid-saml-metadata.error.js +10 -0
  168. package/dist/modules/sso-saml/middleware/saml-enabled-middleware.d.ts +3 -0
  169. package/dist/modules/sso-saml/middleware/saml-enabled-middleware.js +22 -0
  170. package/dist/modules/sso-saml/saml-helpers.d.ts +19 -0
  171. package/dist/modules/sso-saml/saml-helpers.js +129 -0
  172. package/dist/modules/sso-saml/saml-validator.d.ts +16 -0
  173. package/dist/modules/sso-saml/saml-validator.js +129 -0
  174. package/dist/modules/sso-saml/saml.controller.ee.d.ts +50 -0
  175. package/dist/modules/sso-saml/saml.controller.ee.js +227 -0
  176. package/dist/modules/sso-saml/saml.service.ee.d.ts +52 -0
  177. package/dist/modules/sso-saml/saml.service.ee.js +462 -0
  178. package/dist/modules/sso-saml/schema/metadata-exchange.xsd.d.ts +2 -0
  179. package/dist/modules/sso-saml/schema/metadata-exchange.xsd.js +118 -0
  180. package/dist/modules/sso-saml/schema/oasis-200401-wss-wssecurity-secext-1.0.xsd.d.ts +2 -0
  181. package/dist/modules/sso-saml/schema/oasis-200401-wss-wssecurity-secext-1.0.xsd.js +201 -0
  182. package/dist/modules/sso-saml/schema/oasis-200401-wss-wssecurity-utility-1.0.xsd.d.ts +2 -0
  183. package/dist/modules/sso-saml/schema/oasis-200401-wss-wssecurity-utility-1.0.xsd.js +114 -0
  184. package/dist/modules/sso-saml/schema/saml-schema-assertion-2.0.xsd.d.ts +2 -0
  185. package/dist/modules/sso-saml/schema/saml-schema-assertion-2.0.xsd.js +289 -0
  186. package/dist/modules/sso-saml/schema/saml-schema-metadata-2.0.xsd.d.ts +2 -0
  187. package/dist/modules/sso-saml/schema/saml-schema-metadata-2.0.xsd.js +344 -0
  188. package/dist/modules/sso-saml/schema/saml-schema-protocol-2.0.xsd.d.ts +2 -0
  189. package/dist/modules/sso-saml/schema/saml-schema-protocol-2.0.xsd.js +308 -0
  190. package/dist/modules/sso-saml/schema/ws-addr.xsd.d.ts +2 -0
  191. package/dist/modules/sso-saml/schema/ws-addr.xsd.js +143 -0
  192. package/dist/modules/sso-saml/schema/ws-authorization.xsd.d.ts +2 -0
  193. package/dist/modules/sso-saml/schema/ws-authorization.xsd.js +151 -0
  194. package/dist/modules/sso-saml/schema/ws-federation.xsd.d.ts +2 -0
  195. package/dist/modules/sso-saml/schema/ws-federation.xsd.js +476 -0
  196. package/dist/modules/sso-saml/schema/ws-securitypolicy-1.2.xsd.d.ts +2 -0
  197. package/dist/modules/sso-saml/schema/ws-securitypolicy-1.2.xsd.js +1211 -0
  198. package/dist/modules/sso-saml/schema/xenc-schema.xsd.d.ts +2 -0
  199. package/dist/modules/sso-saml/schema/xenc-schema.xsd.js +151 -0
  200. package/dist/modules/sso-saml/schema/xml.xsd.d.ts +2 -0
  201. package/dist/modules/sso-saml/schema/xml.xsd.js +123 -0
  202. package/dist/modules/sso-saml/schema/xmldsig-core-schema.xsd.d.ts +2 -0
  203. package/dist/modules/sso-saml/schema/xmldsig-core-schema.xsd.js +324 -0
  204. package/dist/modules/sso-saml/service-provider.ee.d.ts +6 -0
  205. package/dist/modules/sso-saml/service-provider.ee.js +44 -0
  206. package/dist/modules/sso-saml/sso-saml.module.d.ts +4 -0
  207. package/dist/modules/sso-saml/sso-saml.module.js +55 -0
  208. package/dist/modules/sso-saml/types.d.ts +4 -0
  209. package/dist/modules/sso-saml/types.js +2 -0
  210. package/dist/modules/sso-saml/views/init-sso-post.d.ts +2 -0
  211. package/dist/modules/sso-saml/views/init-sso-post.js +16 -0
  212. package/dist/node-lib.d.ts +10 -0
  213. package/dist/node-lib.js +137 -0
  214. package/dist/push/index.d.ts +1 -1
  215. package/dist/server.d.ts +1 -0
  216. package/dist/server.js +1 -0
  217. package/dist/services/cors-service.d.ts +7 -0
  218. package/dist/services/cors-service.js +50 -0
  219. package/dist/services/static-auth-service.d.ts +4 -0
  220. package/dist/services/static-auth-service.js +29 -0
  221. package/dist/sso.ee/saml/schema/metadata-exchange.xsd.js +0 -0
  222. package/dist/task-runners/task-broker/errors/task-runner-accept-timeout.error.js +0 -0
  223. package/dist/typecheck.tsbuildinfo +1 -0
  224. package/dist/user-management/email/templates/workflow-failure.handlebars +211 -0
  225. package/dist/utils/cors.util.d.ts +2 -0
  226. package/dist/utils/cors.util.js +17 -0
  227. package/dist/webhooks/waiting-forms.js +3 -3
  228. package/dist/webhooks/waiting-webhooks.js +2 -0
  229. package/dist/workflows/workflow.service.d.ts +2 -2
  230. package/dist/workflows/workflows.controller.d.ts +6 -6
  231. package/package.json +22 -21
@@ -0,0 +1,28 @@
1
+ import { Logger } from '@n8n/backend-common';
2
+ import type { INodeCredentials, MessageEventBusDestinationOptions } from 'n8n-workflow';
3
+ import { MessageEventBusDestinationTypeNames } from 'n8n-workflow';
4
+ import type { AbstractEventMessage } from '../../../eventbus/event-message-classes/abstract-event-message';
5
+ import type { MessageEventBus, MessageWithCallback } from '../../../eventbus/message-event-bus/message-event-bus';
6
+ import { License } from '../../../license';
7
+ import { CircuitBreaker } from '../../../utils/circuit-breaker';
8
+ export declare abstract class MessageEventBusDestination implements MessageEventBusDestinationOptions {
9
+ readonly id: string;
10
+ readonly eventBusInstance: MessageEventBus;
11
+ protected readonly logger: Logger;
12
+ protected readonly license: License;
13
+ protected circuitBreakerInstance: CircuitBreaker;
14
+ __type: MessageEventBusDestinationTypeNames;
15
+ label: string;
16
+ enabled: boolean;
17
+ subscribedEvents: string[];
18
+ credentials: INodeCredentials;
19
+ anonymizeAuditMessages: boolean;
20
+ constructor(eventBusInstance: MessageEventBus, options: MessageEventBusDestinationOptions);
21
+ getId(): string;
22
+ hasSubscribedToEvent(msg: AbstractEventMessage): boolean;
23
+ serialize(): MessageEventBusDestinationOptions;
24
+ abstract receiveFromEventBus(emitterPayload: MessageWithCallback): Promise<boolean>;
25
+ sendMessage(emitterPayload: MessageWithCallback): Promise<boolean>;
26
+ toString(): string;
27
+ close(): Promise<void>;
28
+ }
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MessageEventBusDestination = void 0;
4
+ const backend_common_1 = require("@n8n/backend-common");
5
+ const constants_1 = require("@n8n/constants");
6
+ const di_1 = require("@n8n/di");
7
+ const uuid_1 = require("uuid");
8
+ const license_1 = require("../../../license");
9
+ const circuit_breaker_1 = require("../../../utils/circuit-breaker");
10
+ class MessageEventBusDestination {
11
+ constructor(eventBusInstance, options) {
12
+ this.credentials = {};
13
+ this.logger = di_1.Container.get(backend_common_1.Logger);
14
+ this.license = di_1.Container.get(license_1.License);
15
+ const timeout = options.circuitBreaker?.maxDuration ?? constants_1.LOGSTREAMING_CB_DEFAULT_MAX_DURATION_MS;
16
+ const maxFailures = options.circuitBreaker?.maxFailures ?? constants_1.LOGSTREAMING_CB_DEFAULT_MAX_FAILURES;
17
+ const halfOpenRequests = options.circuitBreaker?.halfOpenRequests ?? constants_1.LOGSTREAMING_CB_DEFAULT_HALF_OPEN_REQUESTS;
18
+ const failureWindow = options.circuitBreaker?.failureWindow ?? constants_1.LOGSTREAMING_CB_DEFAULT_FAILURE_WINDOW_MS;
19
+ const maxConcurrentHalfOpenRequests = options.circuitBreaker?.maxConcurrentHalfOpenRequests ??
20
+ constants_1.LOGSTREAMING_CB_DEFAULT_CONCURRENT_HALF_OPEN_REQUESTS;
21
+ this.circuitBreakerInstance = new circuit_breaker_1.CircuitBreaker({
22
+ timeout,
23
+ maxFailures,
24
+ halfOpenRequests,
25
+ failureWindow,
26
+ maxConcurrentHalfOpenRequests,
27
+ });
28
+ this.eventBusInstance = eventBusInstance;
29
+ this.id = !options.id || options.id.length !== 36 ? (0, uuid_1.v4)() : options.id;
30
+ this.__type = options.__type ?? "$$AbstractMessageEventBusDestination";
31
+ this.label = options.label ?? 'Log Destination';
32
+ this.enabled = options.enabled ?? false;
33
+ this.subscribedEvents = options.subscribedEvents ?? [];
34
+ this.anonymizeAuditMessages = options.anonymizeAuditMessages ?? false;
35
+ if (options.credentials)
36
+ this.credentials = options.credentials;
37
+ this.logger.debug(`${this.__type}(${this.id}) event destination constructed`);
38
+ }
39
+ getId() {
40
+ return this.id;
41
+ }
42
+ hasSubscribedToEvent(msg) {
43
+ if (!this.enabled)
44
+ return false;
45
+ for (const eventName of this.subscribedEvents) {
46
+ if (eventName === '*' || msg.eventName.startsWith(eventName)) {
47
+ return true;
48
+ }
49
+ }
50
+ return false;
51
+ }
52
+ serialize() {
53
+ return {
54
+ __type: this.__type,
55
+ id: this.getId(),
56
+ label: this.label,
57
+ enabled: this.enabled,
58
+ subscribedEvents: this.subscribedEvents,
59
+ anonymizeAuditMessages: this.anonymizeAuditMessages,
60
+ };
61
+ }
62
+ async sendMessage(emitterPayload) {
63
+ return await this.circuitBreakerInstance.execute(async () => {
64
+ return await this.receiveFromEventBus(emitterPayload);
65
+ });
66
+ }
67
+ toString() {
68
+ return JSON.stringify(this.serialize());
69
+ }
70
+ async close() {
71
+ this.enabled = false;
72
+ }
73
+ }
74
+ exports.MessageEventBusDestination = MessageEventBusDestination;
@@ -0,0 +1,32 @@
1
+ import { LicenseState, Logger } from '@n8n/backend-common';
2
+ import type { DeleteResult } from '@n8n/typeorm';
3
+ import type { MessageEventBusDestinationOptions } from 'n8n-workflow';
4
+ import type { EventMessageTypes } from '../../eventbus';
5
+ import { MessageEventBus } from '../../eventbus/message-event-bus/message-event-bus';
6
+ import { Publisher } from '../../scaling/pubsub/publisher.service';
7
+ import { EventDestinationsRepository } from './database/repositories/event-destination.repository';
8
+ import { MessageEventBusDestination } from './destinations/message-event-bus-destination.ee';
9
+ export declare class LogStreamingDestinationService {
10
+ private readonly logger;
11
+ private readonly eventDestinationsRepository;
12
+ private readonly eventBus;
13
+ private readonly licenseState;
14
+ private readonly publisher;
15
+ private destinations;
16
+ private isListening;
17
+ private readonly messageHandler;
18
+ constructor(logger: Logger, eventDestinationsRepository: EventDestinationsRepository, eventBus: MessageEventBus, licenseState: LicenseState, publisher: Publisher);
19
+ loadDestinationsFromDb(): Promise<void>;
20
+ saveDestinationToDb(destination: MessageEventBusDestination): Promise<import("@n8n/typeorm").InsertResult>;
21
+ deleteDestinationFromDb(id: string): Promise<DeleteResult>;
22
+ addDestination(destination: MessageEventBusDestination, notifyWorkers?: boolean): Promise<MessageEventBusDestination>;
23
+ removeDestination(id: string, notifyWorkers?: boolean): Promise<DeleteResult>;
24
+ initialize(): Promise<void>;
25
+ private handleMessage;
26
+ findDestination(id?: string): Promise<MessageEventBusDestinationOptions[]>;
27
+ testDestination(destinationId: string): Promise<boolean>;
28
+ private hasAnyDestinationSubscribedToEvent;
29
+ shouldSendMsg(msg: EventMessageTypes): boolean;
30
+ close(): Promise<void>;
31
+ restart(): Promise<void>;
32
+ }
@@ -0,0 +1,175 @@
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.LogStreamingDestinationService = void 0;
13
+ const backend_common_1 = require("@n8n/backend-common");
14
+ const decorators_1 = require("@n8n/decorators");
15
+ const di_1 = require("@n8n/di");
16
+ const event_message_generic_1 = require("../../eventbus/event-message-classes/event-message-generic");
17
+ const message_event_bus_1 = require("../../eventbus/message-event-bus/message-event-bus");
18
+ const publisher_service_1 = require("../../scaling/pubsub/publisher.service");
19
+ const event_destination_repository_1 = require("./database/repositories/event-destination.repository");
20
+ const message_event_bus_destination_from_db_1 = require("./destinations/message-event-bus-destination-from-db");
21
+ let LogStreamingDestinationService = class LogStreamingDestinationService {
22
+ constructor(logger, eventDestinationsRepository, eventBus, licenseState, publisher) {
23
+ this.logger = logger;
24
+ this.eventDestinationsRepository = eventDestinationsRepository;
25
+ this.eventBus = eventBus;
26
+ this.licenseState = licenseState;
27
+ this.publisher = publisher;
28
+ this.destinations = {};
29
+ this.isListening = false;
30
+ this.messageHandler = this.handleMessage.bind(this);
31
+ }
32
+ async loadDestinationsFromDb() {
33
+ const savedEventDestinations = await this.eventDestinationsRepository.find({});
34
+ if (savedEventDestinations.length > 0) {
35
+ for (const destinationData of savedEventDestinations) {
36
+ try {
37
+ const destination = (0, message_event_bus_destination_from_db_1.messageEventBusDestinationFromDb)(this.eventBus, destinationData);
38
+ if (destination) {
39
+ this.destinations[destination.getId()] = destination;
40
+ this.logger.debug(`Loaded destination ${destination.getId()} from database`);
41
+ }
42
+ }
43
+ catch (error) {
44
+ this.logger.debug('Failed to load destination from database', { error });
45
+ }
46
+ }
47
+ }
48
+ }
49
+ async saveDestinationToDb(destination) {
50
+ const data = {
51
+ id: destination.getId(),
52
+ destination: destination.serialize(),
53
+ };
54
+ const dbResult = await this.eventDestinationsRepository.upsert(data, {
55
+ skipUpdateIfNoValuesChanged: true,
56
+ conflictPaths: ['id'],
57
+ });
58
+ return dbResult;
59
+ }
60
+ async deleteDestinationFromDb(id) {
61
+ return await this.eventDestinationsRepository.delete({ id });
62
+ }
63
+ async addDestination(destination, notifyWorkers = true) {
64
+ await this.destinations[destination.getId()]?.close();
65
+ this.destinations[destination.getId()] = destination;
66
+ this.logger.debug(`Added destination ${destination.getId()}`);
67
+ await this.saveDestinationToDb(destination);
68
+ if (notifyWorkers) {
69
+ void this.publisher.publishCommand({ command: 'restart-event-bus' });
70
+ }
71
+ return destination;
72
+ }
73
+ async removeDestination(id, notifyWorkers = true) {
74
+ if (this.destinations[id]) {
75
+ await this.destinations[id].close();
76
+ delete this.destinations[id];
77
+ this.logger.debug(`Removed destination ${id}`);
78
+ }
79
+ if (notifyWorkers) {
80
+ void this.publisher.publishCommand({ command: 'restart-event-bus' });
81
+ }
82
+ return await this.deleteDestinationFromDb(id);
83
+ }
84
+ async initialize() {
85
+ if (this.isListening) {
86
+ return;
87
+ }
88
+ this.logger.debug('Initializing log streaming destination service...');
89
+ this.eventBus.on('message', this.messageHandler);
90
+ this.isListening = true;
91
+ this.logger.debug(`Log streaming destination service initialized with ${Object.keys(this.destinations).length} destinations`);
92
+ }
93
+ async handleMessage(msg, confirmCallback) {
94
+ if (!this.shouldSendMsg(msg)) {
95
+ this.eventBus.confirmSent(msg, { id: '0', name: 'eventBus' });
96
+ return;
97
+ }
98
+ for (const destination of Object.values(this.destinations)) {
99
+ if (destination.hasSubscribedToEvent(msg)) {
100
+ try {
101
+ await destination.sendMessage({ msg, confirmCallback });
102
+ }
103
+ catch (error) {
104
+ this.logger.error(`Failed to send message to destination ${destination.getId()}`, {
105
+ error,
106
+ });
107
+ }
108
+ }
109
+ }
110
+ }
111
+ async findDestination(id) {
112
+ const result = id
113
+ ? this.destinations[id]
114
+ ? [this.destinations[id].serialize()]
115
+ : []
116
+ : Object.values(this.destinations).map((dest) => dest.serialize());
117
+ return result.sort((a, b) => (a.__type ?? '').localeCompare(b.__type ?? ''));
118
+ }
119
+ async testDestination(destinationId) {
120
+ const msg = new event_message_generic_1.EventMessageGeneric({
121
+ eventName: event_message_generic_1.eventMessageGenericDestinationTestEvent,
122
+ });
123
+ const destination = await this.findDestination(destinationId);
124
+ if (destination.length > 0) {
125
+ const sendResult = await this.destinations[destinationId].receiveFromEventBus({
126
+ msg,
127
+ confirmCallback: () => this.eventBus.confirmSent(msg, { id: '0', name: 'eventBus' }),
128
+ });
129
+ return sendResult;
130
+ }
131
+ return false;
132
+ }
133
+ hasAnyDestinationSubscribedToEvent(msg) {
134
+ return Object.values(this.destinations).some((destination) => destination.hasSubscribedToEvent(msg));
135
+ }
136
+ shouldSendMsg(msg) {
137
+ return (this.licenseState.isLogStreamingLicensed() &&
138
+ Object.keys(this.destinations).length > 0 &&
139
+ this.hasAnyDestinationSubscribedToEvent(msg));
140
+ }
141
+ async close() {
142
+ this.logger.debug('Closing log streaming destination service...');
143
+ if (this.isListening) {
144
+ this.eventBus.removeListener('message', this.messageHandler);
145
+ this.isListening = false;
146
+ }
147
+ for (const destination of Object.values(this.destinations)) {
148
+ this.logger.debug(`Closing destination ${destination.getId()}...`);
149
+ await destination.close();
150
+ }
151
+ this.destinations = {};
152
+ this.logger.debug('Log streaming destination service closed');
153
+ }
154
+ async restart() {
155
+ this.logger.debug('Restarting log streaming destination service...');
156
+ await this.close();
157
+ await this.loadDestinationsFromDb();
158
+ await this.initialize();
159
+ }
160
+ };
161
+ exports.LogStreamingDestinationService = LogStreamingDestinationService;
162
+ __decorate([
163
+ (0, decorators_1.OnPubSubEvent)('restart-event-bus'),
164
+ __metadata("design:type", Function),
165
+ __metadata("design:paramtypes", []),
166
+ __metadata("design:returntype", Promise)
167
+ ], LogStreamingDestinationService.prototype, "restart", null);
168
+ exports.LogStreamingDestinationService = LogStreamingDestinationService = __decorate([
169
+ (0, di_1.Service)(),
170
+ __metadata("design:paramtypes", [backend_common_1.Logger,
171
+ event_destination_repository_1.EventDestinationsRepository,
172
+ message_event_bus_1.MessageEventBus,
173
+ backend_common_1.LicenseState,
174
+ publisher_service_1.Publisher])
175
+ ], LogStreamingDestinationService);
@@ -0,0 +1,15 @@
1
+ import { AuthenticatedRequest } from '@n8n/db';
2
+ import express from 'express';
3
+ import type { MessageEventBusDestinationOptions } from 'n8n-workflow';
4
+ import { MessageEventBus } from '../../eventbus/message-event-bus/message-event-bus';
5
+ import { LogStreamingDestinationService } from './log-streaming-destination.service';
6
+ export declare class EventBusController {
7
+ private readonly eventBus;
8
+ private readonly destinationService;
9
+ constructor(eventBus: MessageEventBus, destinationService: LogStreamingDestinationService);
10
+ getEventNames(): Promise<string[]>;
11
+ getDestination(req: express.Request): Promise<MessageEventBusDestinationOptions[]>;
12
+ postDestination(req: AuthenticatedRequest): Promise<any>;
13
+ sendTestMessage(req: express.Request): Promise<boolean>;
14
+ deleteDestination(req: AuthenticatedRequest): Promise<void>;
15
+ }
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.EventBusController = void 0;
16
+ const decorators_1 = require("@n8n/decorators");
17
+ const express_1 = __importDefault(require("express"));
18
+ const bad_request_error_1 = require("../../errors/response-errors/bad-request.error");
19
+ const event_message_classes_1 = require("../../eventbus/event-message-classes");
20
+ const message_event_bus_1 = require("../../eventbus/message-event-bus/message-event-bus");
21
+ const message_event_bus_destination_sentry_ee_1 = require("./destinations/message-event-bus-destination-sentry.ee");
22
+ const message_event_bus_destination_syslog_ee_1 = require("./destinations/message-event-bus-destination-syslog.ee");
23
+ const message_event_bus_destination_webhook_ee_1 = require("./destinations/message-event-bus-destination-webhook.ee");
24
+ const log_streaming_destination_service_1 = require("./log-streaming-destination.service");
25
+ const isWithIdString = (candidate) => {
26
+ const o = candidate;
27
+ if (!o)
28
+ return false;
29
+ return o.id !== undefined;
30
+ };
31
+ const isMessageEventBusDestinationWebhookOptions = (candidate) => {
32
+ const o = candidate;
33
+ if (!o)
34
+ return false;
35
+ return o.url !== undefined;
36
+ };
37
+ const isMessageEventBusDestinationOptions = (candidate) => {
38
+ const o = candidate;
39
+ if (!o)
40
+ return false;
41
+ return o.__type !== undefined;
42
+ };
43
+ let EventBusController = class EventBusController {
44
+ constructor(eventBus, destinationService) {
45
+ this.eventBus = eventBus;
46
+ this.destinationService = destinationService;
47
+ }
48
+ async getEventNames() {
49
+ return event_message_classes_1.eventNamesAll;
50
+ }
51
+ async getDestination(req) {
52
+ if (isWithIdString(req.query)) {
53
+ return await this.destinationService.findDestination(req.query.id);
54
+ }
55
+ else {
56
+ return await this.destinationService.findDestination();
57
+ }
58
+ }
59
+ async postDestination(req) {
60
+ let result;
61
+ if (isMessageEventBusDestinationOptions(req.body)) {
62
+ switch (req.body.__type) {
63
+ case "$$MessageEventBusDestinationSentry":
64
+ if ((0, message_event_bus_destination_sentry_ee_1.isMessageEventBusDestinationSentryOptions)(req.body)) {
65
+ result = await this.destinationService.addDestination(new message_event_bus_destination_sentry_ee_1.MessageEventBusDestinationSentry(this.eventBus, req.body));
66
+ }
67
+ break;
68
+ case "$$MessageEventBusDestinationWebhook":
69
+ if (isMessageEventBusDestinationWebhookOptions(req.body)) {
70
+ result = await this.destinationService.addDestination(new message_event_bus_destination_webhook_ee_1.MessageEventBusDestinationWebhook(this.eventBus, req.body));
71
+ }
72
+ break;
73
+ case "$$MessageEventBusDestinationSyslog":
74
+ if ((0, message_event_bus_destination_syslog_ee_1.isMessageEventBusDestinationSyslogOptions)(req.body)) {
75
+ result = await this.destinationService.addDestination(new message_event_bus_destination_syslog_ee_1.MessageEventBusDestinationSyslog(this.eventBus, req.body));
76
+ }
77
+ break;
78
+ default:
79
+ throw new bad_request_error_1.BadRequestError(`Body is missing ${req.body.__type} options or type ${req.body.__type} is unknown`);
80
+ }
81
+ if (result) {
82
+ return {
83
+ ...result.serialize(),
84
+ eventBusInstance: undefined,
85
+ };
86
+ }
87
+ throw new bad_request_error_1.BadRequestError('There was an error adding the destination');
88
+ }
89
+ throw new bad_request_error_1.BadRequestError('Body is not configuring MessageEventBusDestinationOptions');
90
+ }
91
+ async sendTestMessage(req) {
92
+ if (isWithIdString(req.query)) {
93
+ return await this.destinationService.testDestination(req.query.id);
94
+ }
95
+ return false;
96
+ }
97
+ async deleteDestination(req) {
98
+ if (isWithIdString(req.query)) {
99
+ await this.destinationService.removeDestination(req.query.id);
100
+ }
101
+ else {
102
+ throw new bad_request_error_1.BadRequestError('Query is missing id');
103
+ }
104
+ }
105
+ };
106
+ exports.EventBusController = EventBusController;
107
+ __decorate([
108
+ (0, decorators_1.Get)('/eventnames'),
109
+ __metadata("design:type", Function),
110
+ __metadata("design:paramtypes", []),
111
+ __metadata("design:returntype", Promise)
112
+ ], EventBusController.prototype, "getEventNames", null);
113
+ __decorate([
114
+ (0, decorators_1.Licensed)('feat:logStreaming'),
115
+ (0, decorators_1.Get)('/destination'),
116
+ (0, decorators_1.GlobalScope)('eventBusDestination:list'),
117
+ __metadata("design:type", Function),
118
+ __metadata("design:paramtypes", [Object]),
119
+ __metadata("design:returntype", Promise)
120
+ ], EventBusController.prototype, "getDestination", null);
121
+ __decorate([
122
+ (0, decorators_1.Licensed)('feat:logStreaming'),
123
+ (0, decorators_1.Post)('/destination'),
124
+ (0, decorators_1.GlobalScope)('eventBusDestination:create'),
125
+ __metadata("design:type", Function),
126
+ __metadata("design:paramtypes", [Object]),
127
+ __metadata("design:returntype", Promise)
128
+ ], EventBusController.prototype, "postDestination", null);
129
+ __decorate([
130
+ (0, decorators_1.Licensed)('feat:logStreaming'),
131
+ (0, decorators_1.Get)('/testmessage'),
132
+ (0, decorators_1.GlobalScope)('eventBusDestination:test'),
133
+ __metadata("design:type", Function),
134
+ __metadata("design:paramtypes", [Object]),
135
+ __metadata("design:returntype", Promise)
136
+ ], EventBusController.prototype, "sendTestMessage", null);
137
+ __decorate([
138
+ (0, decorators_1.Licensed)('feat:logStreaming'),
139
+ (0, decorators_1.Delete)('/destination'),
140
+ (0, decorators_1.GlobalScope)('eventBusDestination:delete'),
141
+ __metadata("design:type", Function),
142
+ __metadata("design:paramtypes", [Object]),
143
+ __metadata("design:returntype", Promise)
144
+ ], EventBusController.prototype, "deleteDestination", null);
145
+ exports.EventBusController = EventBusController = __decorate([
146
+ (0, decorators_1.RestController)('/eventbus'),
147
+ __metadata("design:paramtypes", [message_event_bus_1.MessageEventBus,
148
+ log_streaming_destination_service_1.LogStreamingDestinationService])
149
+ ], EventBusController);
@@ -0,0 +1,5 @@
1
+ import type { ModuleInterface } from '@n8n/decorators';
2
+ export declare class LogStreamingModule implements ModuleInterface {
3
+ init(): Promise<void>;
4
+ entities(): Promise<typeof import("./database/entities/event-destination.entity").EventDestinations[]>;
5
+ }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ 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;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.LogStreamingModule = void 0;
43
+ const constants_1 = require("@n8n/constants");
44
+ const decorators_1 = require("@n8n/decorators");
45
+ const di_1 = require("@n8n/di");
46
+ let LogStreamingModule = class LogStreamingModule {
47
+ async init() {
48
+ await Promise.resolve().then(() => __importStar(require('./log-streaming.controller')));
49
+ const { LogStreamingDestinationService } = await Promise.resolve().then(() => __importStar(require('./log-streaming-destination.service')));
50
+ const destinationService = di_1.Container.get(LogStreamingDestinationService);
51
+ await destinationService.loadDestinationsFromDb();
52
+ await destinationService.initialize();
53
+ }
54
+ async entities() {
55
+ const { EventDestinations } = await Promise.resolve().then(() => __importStar(require('./database/entities/event-destination.entity')));
56
+ return [EventDestinations];
57
+ }
58
+ };
59
+ exports.LogStreamingModule = LogStreamingModule;
60
+ exports.LogStreamingModule = LogStreamingModule = __decorate([
61
+ (0, decorators_1.BackendModule)({
62
+ name: 'log-streaming',
63
+ licenseFlag: constants_1.LICENSE_FEATURES.LOG_STREAMING,
64
+ instanceTypes: ['main', 'worker', 'webhook'],
65
+ })
66
+ ], LogStreamingModule);
File without changes
File without changes
@@ -12,11 +12,11 @@ declare const inputSchema: z.ZodObject<{
12
12
  type: z.ZodLiteral<"chat">;
13
13
  chatInput: z.ZodString;
14
14
  }, "strip", z.ZodTypeAny, {
15
- type: "chat";
16
15
  chatInput: string;
17
- }, {
18
16
  type: "chat";
17
+ }, {
19
18
  chatInput: string;
19
+ type: "chat";
20
20
  }>, z.ZodObject<{
21
21
  type: z.ZodLiteral<"form">;
22
22
  formData: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -34,20 +34,20 @@ declare const inputSchema: z.ZodObject<{
34
34
  body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
35
35
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
36
36
  }, "strip", z.ZodTypeAny, {
37
- method: "GET" | "DELETE" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH";
37
+ method: "POST" | "OPTIONS" | "DELETE" | "GET" | "HEAD" | "PATCH" | "PUT";
38
38
  body?: Record<string, unknown> | undefined;
39
39
  query?: Record<string, string> | undefined;
40
40
  headers?: Record<string, string> | undefined;
41
41
  }, {
42
+ method?: "POST" | "OPTIONS" | "DELETE" | "GET" | "HEAD" | "PATCH" | "PUT" | undefined;
42
43
  body?: Record<string, unknown> | undefined;
43
- method?: "GET" | "DELETE" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | undefined;
44
44
  query?: Record<string, string> | undefined;
45
45
  headers?: Record<string, string> | undefined;
46
46
  }>;
47
47
  }, "strip", z.ZodTypeAny, {
48
48
  type: "webhook";
49
49
  webhookData: {
50
- method: "GET" | "DELETE" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH";
50
+ method: "POST" | "OPTIONS" | "DELETE" | "GET" | "HEAD" | "PATCH" | "PUT";
51
51
  body?: Record<string, unknown> | undefined;
52
52
  query?: Record<string, string> | undefined;
53
53
  headers?: Record<string, string> | undefined;
@@ -55,8 +55,8 @@ declare const inputSchema: z.ZodObject<{
55
55
  }, {
56
56
  type: "webhook";
57
57
  webhookData: {
58
+ method?: "POST" | "OPTIONS" | "DELETE" | "GET" | "HEAD" | "PATCH" | "PUT" | undefined;
58
59
  body?: Record<string, unknown> | undefined;
59
- method?: "GET" | "DELETE" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | undefined;
60
60
  query?: Record<string, string> | undefined;
61
61
  headers?: Record<string, string> | undefined;
62
62
  };
@@ -64,15 +64,15 @@ declare const inputSchema: z.ZodObject<{
64
64
  }, "strip", z.ZodTypeAny, {
65
65
  workflowId: string;
66
66
  inputs?: {
67
- type: "chat";
68
67
  chatInput: string;
68
+ type: "chat";
69
69
  } | {
70
70
  type: "form";
71
71
  formData: Record<string, unknown>;
72
72
  } | {
73
73
  type: "webhook";
74
74
  webhookData: {
75
- method: "GET" | "DELETE" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH";
75
+ method: "POST" | "OPTIONS" | "DELETE" | "GET" | "HEAD" | "PATCH" | "PUT";
76
76
  body?: Record<string, unknown> | undefined;
77
77
  query?: Record<string, string> | undefined;
78
78
  headers?: Record<string, string> | undefined;
@@ -81,16 +81,16 @@ declare const inputSchema: z.ZodObject<{
81
81
  }, {
82
82
  workflowId: string;
83
83
  inputs?: {
84
- type: "chat";
85
84
  chatInput: string;
85
+ type: "chat";
86
86
  } | {
87
87
  type: "form";
88
88
  formData: Record<string, unknown>;
89
89
  } | {
90
90
  type: "webhook";
91
91
  webhookData: {
92
+ method?: "POST" | "OPTIONS" | "DELETE" | "GET" | "HEAD" | "PATCH" | "PUT" | undefined;
92
93
  body?: Record<string, unknown> | undefined;
93
- method?: "GET" | "DELETE" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | undefined;
94
94
  query?: Record<string, string> | undefined;
95
95
  headers?: Record<string, string> | undefined;
96
96
  };