diff --git a/packages/node-dev/templates/webhook/simple.ts b/packages/node-dev/templates/webhook/simple.ts index 88896f8f88..eaf1521e84 100644 --- a/packages/node-dev/templates/webhook/simple.ts +++ b/packages/node-dev/templates/webhook/simple.ts @@ -6,7 +6,7 @@ import { IDataObject, INodeTypeDescription, INodeType, - IWebhookResonseData, + IWebhookResponseData, } from 'n8n-workflow'; @@ -48,7 +48,7 @@ export class ClassNameReplace implements INodeType { }; - async webhook(this: IWebhookFunctions): Promise { + async webhook(this: IWebhookFunctions): Promise { // The data to return and so start the workflow with const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Asana/AsanaTrigger.node.ts b/packages/nodes-base/nodes/Asana/AsanaTrigger.node.ts index 079802d26a..10358b902d 100644 --- a/packages/nodes-base/nodes/Asana/AsanaTrigger.node.ts +++ b/packages/nodes-base/nodes/Asana/AsanaTrigger.node.ts @@ -7,7 +7,7 @@ import { IDataObject, INodeTypeDescription, INodeType, - IWebhookResonseData, + IWebhookResponseData, } from 'n8n-workflow'; import { @@ -138,7 +138,7 @@ export class AsanaTrigger implements INodeType { - async webhook(this: IWebhookFunctions): Promise { + async webhook(this: IWebhookFunctions): Promise { const bodyData = this.getBodyData() as IDataObject; const headerData = this.getHeaderData() as IDataObject; const req = this.getRequestObject(); diff --git a/packages/nodes-base/nodes/Chargebee/ChargebeeTrigger.node.ts b/packages/nodes-base/nodes/Chargebee/ChargebeeTrigger.node.ts index 5019be878b..e3ad8b9cd1 100644 --- a/packages/nodes-base/nodes/Chargebee/ChargebeeTrigger.node.ts +++ b/packages/nodes-base/nodes/Chargebee/ChargebeeTrigger.node.ts @@ -6,7 +6,7 @@ import { IDataObject, INodeTypeDescription, INodeType, - IWebhookResonseData, + IWebhookResponseData, } from 'n8n-workflow'; @@ -222,7 +222,7 @@ export class ChargebeeTrigger implements INodeType { }; - async webhook(this: IWebhookFunctions): Promise { + async webhook(this: IWebhookFunctions): Promise { const bodyData = this.getBodyData() as IDataObject; const req = this.getRequestObject(); diff --git a/packages/nodes-base/nodes/Github/GithubTrigger.node.ts b/packages/nodes-base/nodes/Github/GithubTrigger.node.ts index a04e25886a..f3151b069a 100644 --- a/packages/nodes-base/nodes/Github/GithubTrigger.node.ts +++ b/packages/nodes-base/nodes/Github/GithubTrigger.node.ts @@ -7,7 +7,7 @@ import { IDataObject, INodeTypeDescription, INodeType, - IWebhookResonseData, + IWebhookResponseData, } from 'n8n-workflow'; import { @@ -403,7 +403,7 @@ export class GithubTrigger implements INodeType { - async webhook(this: IWebhookFunctions): Promise { + async webhook(this: IWebhookFunctions): Promise { const bodyData = this.getBodyData(); // Check if the webhook is only the ping from Github to confirm if it workshook_id diff --git a/packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts b/packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts index 038aa3fc67..2c55246a32 100644 --- a/packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts +++ b/packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts @@ -6,7 +6,7 @@ import { import { INodeTypeDescription, INodeType, - IWebhookResonseData, + IWebhookResponseData, } from 'n8n-workflow'; import { @@ -278,7 +278,7 @@ export class PipedriveTrigger implements INodeType { - async webhook(this: IWebhookFunctions): Promise { + async webhook(this: IWebhookFunctions): Promise { const req = this.getRequestObject(); const resp = this.getResponseObject(); const realm = 'Webhook'; diff --git a/packages/nodes-base/nodes/Telegram/TelegramTrigger.node.ts b/packages/nodes-base/nodes/Telegram/TelegramTrigger.node.ts index 4345786458..bc560c0d5e 100644 --- a/packages/nodes-base/nodes/Telegram/TelegramTrigger.node.ts +++ b/packages/nodes-base/nodes/Telegram/TelegramTrigger.node.ts @@ -6,7 +6,7 @@ import { import { INodeTypeDescription, INodeType, - IWebhookResonseData, + IWebhookResponseData, } from 'n8n-workflow'; import { @@ -151,7 +151,7 @@ export class TelegramTrigger implements INodeType { - async webhook(this: IWebhookFunctions): Promise { + async webhook(this: IWebhookFunctions): Promise { const bodyData = this.getBodyData(); return { diff --git a/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts b/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts index 3eb45dc88b..3812a882ad 100644 --- a/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts +++ b/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts @@ -7,7 +7,7 @@ import { IDataObject, INodeTypeDescription, INodeType, - IWebhookResonseData, + IWebhookResponseData, } from 'n8n-workflow'; import { @@ -179,7 +179,7 @@ export class TrelloTrigger implements INodeType { - async webhook(this: IWebhookFunctions): Promise { + async webhook(this: IWebhookFunctions): Promise { const webhookName = this.getWebhookName(); if (webhookName === 'setup') { diff --git a/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts b/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts index fa8061c6ab..94683c5322 100644 --- a/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts +++ b/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts @@ -6,7 +6,7 @@ import { import { INodeTypeDescription, INodeType, - IWebhookResonseData, + IWebhookResponseData, IDataObject, } from 'n8n-workflow'; @@ -158,7 +158,7 @@ export class TypeformTrigger implements INodeType { - async webhook(this: IWebhookFunctions): Promise { + async webhook(this: IWebhookFunctions): Promise { const bodyData = this.getBodyData(); const simplifyAnswers = this.getNodeParameter('simplifyAnswers') as boolean; diff --git a/packages/nodes-base/nodes/Webhook.node.ts b/packages/nodes-base/nodes/Webhook.node.ts index 2fb96fa374..2797d5e957 100644 --- a/packages/nodes-base/nodes/Webhook.node.ts +++ b/packages/nodes-base/nodes/Webhook.node.ts @@ -6,7 +6,7 @@ import { IDataObject, INodeTypeDescription, INodeType, - IWebhookResonseData, + IWebhookResponseData, } from 'n8n-workflow'; import * as basicAuth from 'basic-auth'; @@ -207,7 +207,7 @@ export class Webhook implements INodeType { }; - async webhook(this: IWebhookFunctions): Promise { + async webhook(this: IWebhookFunctions): Promise { const authentication = this.getNodeParameter('authentication', 0) as string; const req = this.getRequestObject(); const resp = this.getResponseObject(); diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index 80e3e14bb7..79f0a448e2 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -369,7 +369,7 @@ export interface INodeType { execute?(this: IExecuteFunctions): Promise; executeSingle?(this: IExecuteSingleFunctions): Promise; trigger?(this: ITriggerFunctions): Promise; - webhook?(this: IWebhookFunctions): Promise; + webhook?(this: IWebhookFunctions): Promise; hooks?: { [key: string]: (this: IHookFunctions) => Promise; }; @@ -481,7 +481,7 @@ export interface IWorkflowDataProxyData { export type WebhookHttpMethod = 'GET' | 'POST'; -export interface IWebhookResonseData { +export interface IWebhookResponseData { workflowData?: INodeExecutionData[][]; webhookResponse?: any; // tslint:disable-line:no-any noWebhookResponse?: boolean; diff --git a/packages/workflow/src/Workflow.ts b/packages/workflow/src/Workflow.ts index f1dc51349a..fd10723256 100644 --- a/packages/workflow/src/Workflow.ts +++ b/packages/workflow/src/Workflow.ts @@ -17,7 +17,7 @@ import { ITaskDataConnections, ITriggerResponse, IWebhookData, - IWebhookResonseData, + IWebhookResponseData, WebhookSetupMethodNames, WorkflowDataProxy, IWorfklowIssues, @@ -1002,10 +1002,10 @@ export class Workflow { * @param {IWorkflowExecuteAdditionalData} additionalData * @param {INodeExecuteFunctions} nodeExecuteFunctions * @param {WorkflowExecuteMode} mode - * @returns {Promise} + * @returns {Promise} * @memberof Workflow */ - async runWebhook(webhookData: IWebhookData, node: INode, additionalData: IWorkflowExecuteAdditionalData, nodeExecuteFunctions: INodeExecuteFunctions, mode: WorkflowExecuteMode): Promise { + async runWebhook(webhookData: IWebhookData, node: INode, additionalData: IWorkflowExecuteAdditionalData, nodeExecuteFunctions: INodeExecuteFunctions, mode: WorkflowExecuteMode): Promise { const nodeType = this.nodeTypes.getByName(node.type); if (nodeType === undefined) { throw new Error(`The type of the webhook node "${node.name}" is not known.`);