diff --git a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaignTrigger.node.ts b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaignTrigger.node.ts index 49314a20a6..6bf4112e16 100644 --- a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaignTrigger.node.ts +++ b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaignTrigger.node.ts @@ -110,7 +110,6 @@ export class ActiveCampaignTrigger implements INodeType { }, }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/AcuityScheduling/AcuitySchedulingTrigger.node.ts b/packages/nodes-base/nodes/AcuityScheduling/AcuitySchedulingTrigger.node.ts index de920558fc..c7269a5acc 100644 --- a/packages/nodes-base/nodes/AcuityScheduling/AcuitySchedulingTrigger.node.ts +++ b/packages/nodes-base/nodes/AcuityScheduling/AcuitySchedulingTrigger.node.ts @@ -114,7 +114,6 @@ export class AcuitySchedulingTrigger implements INodeType { ], }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Affinity/AffinityTrigger.node.ts b/packages/nodes-base/nodes/Affinity/AffinityTrigger.node.ts index e7b04339cf..8c83aea194 100644 --- a/packages/nodes-base/nodes/Affinity/AffinityTrigger.node.ts +++ b/packages/nodes-base/nodes/Affinity/AffinityTrigger.node.ts @@ -152,7 +152,6 @@ export class AffinityTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Asana/AsanaTrigger.node.ts b/packages/nodes-base/nodes/Asana/AsanaTrigger.node.ts index 2115baa2c5..eca553f118 100644 --- a/packages/nodes-base/nodes/Asana/AsanaTrigger.node.ts +++ b/packages/nodes-base/nodes/Asana/AsanaTrigger.node.ts @@ -112,7 +112,6 @@ export class AsanaTrigger implements INodeType { }, }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Autopilot/AutopilotTrigger.node.ts b/packages/nodes-base/nodes/Autopilot/AutopilotTrigger.node.ts index ee208e1d54..09e985922d 100644 --- a/packages/nodes-base/nodes/Autopilot/AutopilotTrigger.node.ts +++ b/packages/nodes-base/nodes/Autopilot/AutopilotTrigger.node.ts @@ -80,7 +80,6 @@ export class AutopilotTrigger implements INodeType { ], }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Bitbucket/BitbucketTrigger.node.ts b/packages/nodes-base/nodes/Bitbucket/BitbucketTrigger.node.ts index 6bf6ba373a..82581b77ee 100644 --- a/packages/nodes-base/nodes/Bitbucket/BitbucketTrigger.node.ts +++ b/packages/nodes-base/nodes/Bitbucket/BitbucketTrigger.node.ts @@ -248,7 +248,6 @@ export class BitbucketTrigger implements INodeType { }, }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Box/BoxTrigger.node.ts b/packages/nodes-base/nodes/Box/BoxTrigger.node.ts index 370ef54e6d..b70bd9675f 100644 --- a/packages/nodes-base/nodes/Box/BoxTrigger.node.ts +++ b/packages/nodes-base/nodes/Box/BoxTrigger.node.ts @@ -256,7 +256,6 @@ export class BoxTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Calendly/CalendlyTrigger.node.ts b/packages/nodes-base/nodes/Calendly/CalendlyTrigger.node.ts index 53aec5c53e..d2e7b12723 100644 --- a/packages/nodes-base/nodes/Calendly/CalendlyTrigger.node.ts +++ b/packages/nodes-base/nodes/Calendly/CalendlyTrigger.node.ts @@ -80,7 +80,6 @@ export class CalendlyTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebexTrigger.node.ts b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebexTrigger.node.ts index 56635b50e6..507c9d00ec 100644 --- a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebexTrigger.node.ts +++ b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebexTrigger.node.ts @@ -490,7 +490,6 @@ export class CiscoWebexTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/ClickUp/ClickUpTrigger.node.ts b/packages/nodes-base/nodes/ClickUp/ClickUpTrigger.node.ts index 4772205693..d296ae54f9 100644 --- a/packages/nodes-base/nodes/ClickUp/ClickUpTrigger.node.ts +++ b/packages/nodes-base/nodes/ClickUp/ClickUpTrigger.node.ts @@ -260,7 +260,6 @@ export class ClickUpTrigger implements INodeType { }, }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/ConvertKit/ConvertKitTrigger.node.ts b/packages/nodes-base/nodes/ConvertKit/ConvertKitTrigger.node.ts index 24b1d14cb7..0b1c113aba 100644 --- a/packages/nodes-base/nodes/ConvertKit/ConvertKitTrigger.node.ts +++ b/packages/nodes-base/nodes/ConvertKit/ConvertKitTrigger.node.ts @@ -237,7 +237,6 @@ export class ConvertKitTrigger implements INodeType { }, }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Copper/CopperTrigger.node.ts b/packages/nodes-base/nodes/Copper/CopperTrigger.node.ts index 74238b10ab..4ae1fe780c 100644 --- a/packages/nodes-base/nodes/Copper/CopperTrigger.node.ts +++ b/packages/nodes-base/nodes/Copper/CopperTrigger.node.ts @@ -100,7 +100,6 @@ export class CopperTrigger implements INodeType { ], }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/CustomerIo/CustomerIoTrigger.node.ts b/packages/nodes-base/nodes/CustomerIo/CustomerIoTrigger.node.ts index 07106e1b7a..1399515a20 100644 --- a/packages/nodes-base/nodes/CustomerIo/CustomerIoTrigger.node.ts +++ b/packages/nodes-base/nodes/CustomerIo/CustomerIoTrigger.node.ts @@ -219,7 +219,6 @@ export class CustomerIoTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Eventbrite/EventbriteTrigger.node.ts b/packages/nodes-base/nodes/Eventbrite/EventbriteTrigger.node.ts index 834e1564c3..7f9a937902 100644 --- a/packages/nodes-base/nodes/Eventbrite/EventbriteTrigger.node.ts +++ b/packages/nodes-base/nodes/Eventbrite/EventbriteTrigger.node.ts @@ -226,7 +226,6 @@ export class EventbriteTrigger implements INodeType { }, }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts b/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts index 7f9c5cbe44..735bcd5442 100644 --- a/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts +++ b/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts @@ -170,7 +170,6 @@ export class FacebookTrigger implements INodeType { }, }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Figma/FigmaTrigger.node.ts b/packages/nodes-base/nodes/Figma/FigmaTrigger.node.ts index bf096dd6ec..eecb109bf1 100644 --- a/packages/nodes-base/nodes/Figma/FigmaTrigger.node.ts +++ b/packages/nodes-base/nodes/Figma/FigmaTrigger.node.ts @@ -92,7 +92,6 @@ export class FigmaTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Flow/FlowTrigger.node.ts b/packages/nodes-base/nodes/Flow/FlowTrigger.node.ts index 6351eb1596..257cc3a0c3 100644 --- a/packages/nodes-base/nodes/Flow/FlowTrigger.node.ts +++ b/packages/nodes-base/nodes/Flow/FlowTrigger.node.ts @@ -91,7 +91,6 @@ export class FlowTrigger implements INodeType { ], }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/FormIo/FormIoTrigger.node.ts b/packages/nodes-base/nodes/FormIo/FormIoTrigger.node.ts index 6e8e0561ac..19f86791a5 100644 --- a/packages/nodes-base/nodes/FormIo/FormIoTrigger.node.ts +++ b/packages/nodes-base/nodes/FormIo/FormIoTrigger.node.ts @@ -121,7 +121,6 @@ export class FormIoTrigger implements INodeType { }, }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Formstack/FormstackTrigger.node.ts b/packages/nodes-base/nodes/Formstack/FormstackTrigger.node.ts index 54732eb813..055b259312 100644 --- a/packages/nodes-base/nodes/Formstack/FormstackTrigger.node.ts +++ b/packages/nodes-base/nodes/Formstack/FormstackTrigger.node.ts @@ -98,7 +98,6 @@ export class FormstackTrigger implements INodeType { }, }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/GetResponse/GetResponseTrigger.node.ts b/packages/nodes-base/nodes/GetResponse/GetResponseTrigger.node.ts index 71d4aaf937..125405a3fc 100644 --- a/packages/nodes-base/nodes/GetResponse/GetResponseTrigger.node.ts +++ b/packages/nodes-base/nodes/GetResponse/GetResponseTrigger.node.ts @@ -155,7 +155,6 @@ export class GetResponseTrigger implements INodeType { }, }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts b/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts index a02c826ed5..9107593494 100644 --- a/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts +++ b/packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts @@ -174,7 +174,6 @@ export class GitlabTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Gumroad/GumroadTrigger.node.ts b/packages/nodes-base/nodes/Gumroad/GumroadTrigger.node.ts index e8d2cd9a26..c8394cf93a 100644 --- a/packages/nodes-base/nodes/Gumroad/GumroadTrigger.node.ts +++ b/packages/nodes-base/nodes/Gumroad/GumroadTrigger.node.ts @@ -83,7 +83,6 @@ export class GumroadTrigger implements INodeType { ], }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/HelpScout/HelpScoutTrigger.node.ts b/packages/nodes-base/nodes/HelpScout/HelpScoutTrigger.node.ts index eb4f7b6ecc..3ebed8e04a 100644 --- a/packages/nodes-base/nodes/HelpScout/HelpScoutTrigger.node.ts +++ b/packages/nodes-base/nodes/HelpScout/HelpScoutTrigger.node.ts @@ -99,7 +99,6 @@ export class HelpScoutTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Hubspot/HubspotTrigger.node.ts b/packages/nodes-base/nodes/Hubspot/HubspotTrigger.node.ts index 99e0ee10f3..96e33c7d43 100644 --- a/packages/nodes-base/nodes/Hubspot/HubspotTrigger.node.ts +++ b/packages/nodes-base/nodes/Hubspot/HubspotTrigger.node.ts @@ -287,7 +287,6 @@ export class HubspotTrigger implements INodeType { }, }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinjaTrigger.node.ts b/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinjaTrigger.node.ts index ad331c7e8f..022973b724 100644 --- a/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinjaTrigger.node.ts +++ b/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinjaTrigger.node.ts @@ -116,7 +116,6 @@ export class InvoiceNinjaTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts b/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts index e9030fe23c..3b4d7e77e5 100644 --- a/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts +++ b/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts @@ -102,7 +102,6 @@ export class JotFormTrigger implements INodeType { }, }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Keap/KeapTrigger.node.ts b/packages/nodes-base/nodes/Keap/KeapTrigger.node.ts index 0ee412d907..6c5475c7d3 100644 --- a/packages/nodes-base/nodes/Keap/KeapTrigger.node.ts +++ b/packages/nodes-base/nodes/Keap/KeapTrigger.node.ts @@ -85,7 +85,6 @@ export class KeapTrigger implements INodeType { }, }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Lemlist/LemlistTrigger.node.ts b/packages/nodes-base/nodes/Lemlist/LemlistTrigger.node.ts index 6cae55780c..a9306c21c5 100644 --- a/packages/nodes-base/nodes/Lemlist/LemlistTrigger.node.ts +++ b/packages/nodes-base/nodes/Lemlist/LemlistTrigger.node.ts @@ -89,7 +89,6 @@ export class LemlistTrigger implements INodeType { }, }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Linear/LinearTrigger.node.ts b/packages/nodes-base/nodes/Linear/LinearTrigger.node.ts index e127d7b01c..273a2c11b7 100644 --- a/packages/nodes-base/nodes/Linear/LinearTrigger.node.ts +++ b/packages/nodes-base/nodes/Linear/LinearTrigger.node.ts @@ -123,7 +123,6 @@ export class LinearTrigger implements INodeType { }, }; - //@ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts b/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts index 0d74231dd2..8b58559ec4 100644 --- a/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts +++ b/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts @@ -183,7 +183,6 @@ export class MailchimpTrigger implements INodeType { }, }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/MailerLite/MailerLiteTrigger.node.ts b/packages/nodes-base/nodes/MailerLite/MailerLiteTrigger.node.ts index b4f7a52a23..84f3261d09 100644 --- a/packages/nodes-base/nodes/MailerLite/MailerLiteTrigger.node.ts +++ b/packages/nodes-base/nodes/MailerLite/MailerLiteTrigger.node.ts @@ -106,7 +106,6 @@ export class MailerLiteTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Mailjet/MailjetTrigger.node.ts b/packages/nodes-base/nodes/Mailjet/MailjetTrigger.node.ts index 7204461b63..cc2968dfed 100644 --- a/packages/nodes-base/nodes/Mailjet/MailjetTrigger.node.ts +++ b/packages/nodes-base/nodes/Mailjet/MailjetTrigger.node.ts @@ -74,7 +74,6 @@ export class MailjetTrigger implements INodeType { ], }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Mautic/MauticTrigger.node.ts b/packages/nodes-base/nodes/Mautic/MauticTrigger.node.ts index 15050bf875..94c0011731 100644 --- a/packages/nodes-base/nodes/Mautic/MauticTrigger.node.ts +++ b/packages/nodes-base/nodes/Mautic/MauticTrigger.node.ts @@ -125,7 +125,6 @@ export class MauticTrigger implements INodeType { }, }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Pushcut/PushcutTrigger.node.ts b/packages/nodes-base/nodes/Pushcut/PushcutTrigger.node.ts index e40171c7a3..58ad01d373 100644 --- a/packages/nodes-base/nodes/Pushcut/PushcutTrigger.node.ts +++ b/packages/nodes-base/nodes/Pushcut/PushcutTrigger.node.ts @@ -48,7 +48,6 @@ export class PushcutTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/SendInBlue/SendInBlueTrigger.node.ts b/packages/nodes-base/nodes/SendInBlue/SendInBlueTrigger.node.ts index cb86812a61..dc9bb30370 100644 --- a/packages/nodes-base/nodes/SendInBlue/SendInBlueTrigger.node.ts +++ b/packages/nodes-base/nodes/SendInBlue/SendInBlueTrigger.node.ts @@ -201,7 +201,6 @@ export class SendInBlueTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Strava/StravaTrigger.node.ts b/packages/nodes-base/nodes/Strava/StravaTrigger.node.ts index 48415187c2..68c7fc650f 100644 --- a/packages/nodes-base/nodes/Strava/StravaTrigger.node.ts +++ b/packages/nodes-base/nodes/Strava/StravaTrigger.node.ts @@ -119,7 +119,6 @@ export class StravaTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Taiga/TaigaTrigger.node.ts b/packages/nodes-base/nodes/Taiga/TaigaTrigger.node.ts index c7f22b79f7..fe1b34e36d 100644 --- a/packages/nodes-base/nodes/Taiga/TaigaTrigger.node.ts +++ b/packages/nodes-base/nodes/Taiga/TaigaTrigger.node.ts @@ -142,7 +142,6 @@ export class TaigaTrigger implements INodeType { }, }; - // @ts-ignore webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts b/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts index 8699c15d06..d293d40348 100644 --- a/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts +++ b/packages/nodes-base/nodes/TheHive/TheHiveTrigger.node.ts @@ -32,7 +32,6 @@ export class TheHiveTrigger implements INodeType { properties: [...eventsDescription], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts b/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts index 87d3b27aea..cfb1faf0ab 100644 --- a/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts +++ b/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts @@ -56,7 +56,6 @@ export class TrelloTrigger implements INodeType { ], }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts b/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts index c2f6396366..d2f153efb0 100644 --- a/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts +++ b/packages/nodes-base/nodes/Typeform/TypeformTrigger.node.ts @@ -153,7 +153,6 @@ export class TypeformTrigger implements INodeType { }, }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/nodes-base/nodes/Workable/WorkableTrigger.node.ts b/packages/nodes-base/nodes/Workable/WorkableTrigger.node.ts index b7fcaceb56..e67a7ab7ea 100644 --- a/packages/nodes-base/nodes/Workable/WorkableTrigger.node.ts +++ b/packages/nodes-base/nodes/Workable/WorkableTrigger.node.ts @@ -121,7 +121,6 @@ export class WorkableTrigger implements INodeType { }, }; - // @ts-ignore (because of request) webhookMethods = { default: { async checkExists(this: IHookFunctions): Promise { diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index 9b8a256bf9..1f77b08afd 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -1163,6 +1163,8 @@ export interface ITriggerResponse { manualTriggerResponse?: Promise; } +export type WebhookSetupMethodNames = 'checkExists' | 'create' | 'delete'; + export interface INodeType { description: INodeTypeDescription; execute?( @@ -1172,9 +1174,6 @@ export interface INodeType { poll?(this: IPollFunctions): Promise; trigger?(this: ITriggerFunctions): Promise; webhook?(this: IWebhookFunctions): Promise; - hooks?: { - [key: string]: (this: IHookFunctions) => Promise; - }; methods?: { loadOptions?: { [key: string]: (this: ILoadOptionsFunctions) => Promise; @@ -1192,7 +1191,9 @@ export interface INodeType { }; }; webhookMethods?: { - [key: string]: IWebhookSetupMethods; + [name in IWebhookDescription['name']]?: { + [method in WebhookSetupMethodNames]: (this: IHookFunctions) => Promise; + }; }; } @@ -1213,15 +1214,6 @@ export interface INodeCredentialTestRequest { credentials: ICredentialsDecrypted; } -export type WebhookSetupMethodNames = 'checkExists' | 'create' | 'delete'; - -export interface IWebhookSetupMethods { - [key: string]: ((this: IHookFunctions) => Promise) | undefined; - checkExists?: (this: IHookFunctions) => Promise; - create?: (this: IHookFunctions) => Promise; - delete?: (this: IHookFunctions) => Promise; -} - export interface INodeCredentialDescription { name: string; required?: boolean; @@ -1436,7 +1428,7 @@ export interface IWebhookDescription { [key: string]: WebhookHttpMethod | WebhookResponseMode | boolean | string | undefined; httpMethod: WebhookHttpMethod | string; isFullPath?: boolean; - name: string; + name: 'default' | 'setup'; path: string; responseBinaryPropertyName?: string; responseContentType?: string; diff --git a/packages/workflow/src/Workflow.ts b/packages/workflow/src/Workflow.ts index 0be3970582..feb9c699d8 100644 --- a/packages/workflow/src/Workflow.ts +++ b/packages/workflow/src/Workflow.ts @@ -982,17 +982,8 @@ export class Workflow { const node = this.getNode(webhookData.node) as INode; const nodeType = this.nodeTypes.getByNameAndVersion(node.type, node.typeVersion); - if (nodeType.webhookMethods === undefined) { - return; - } - - if (nodeType.webhookMethods[webhookData.webhookDescription.name] === undefined) { - return; - } - - if (nodeType.webhookMethods[webhookData.webhookDescription.name][method] === undefined) { - return; - } + const webhookFn = nodeType.webhookMethods?.[webhookData.webhookDescription.name]?.[method]; + if (webhookFn === undefined) return; const thisArgs = nodeExecuteFunctions.getExecuteHookFunctions( this, @@ -1003,8 +994,8 @@ export class Workflow { isTest, webhookData, ); - // eslint-disable-next-line consistent-return - return nodeType.webhookMethods[webhookData.webhookDescription.name][method]!.call(thisArgs); + + return webhookFn.call(thisArgs); } /**