diff --git a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts index ad43e25842..7cd85d67b3 100644 --- a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts +++ b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts @@ -327,8 +327,8 @@ export class ActiveCampaign implements INodeType { for (let i = 0; i < items.length; i++) { try { dataKey = undefined; - resource = this.getNodeParameter('resource', 0) as string; - operation = this.getNodeParameter('operation', 0) as string; + resource = this.getNodeParameter('resource', 0); + operation = this.getNodeParameter('operation', 0); requestMethod = 'GET'; endpoint = ''; diff --git a/packages/nodes-base/nodes/Affinity/Affinity.node.ts b/packages/nodes-base/nodes/Affinity/Affinity.node.ts index 8bfac4d166..05a6c8d2ee 100644 --- a/packages/nodes-base/nodes/Affinity/Affinity.node.ts +++ b/packages/nodes-base/nodes/Affinity/Affinity.node.ts @@ -150,8 +150,8 @@ export class Affinity implements INodeType { const length = items.length; let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'list') { diff --git a/packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts b/packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts index a9e5703d6d..06a7b45dbd 100644 --- a/packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts +++ b/packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts @@ -93,8 +93,8 @@ export class AgileCrm implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { if (resource === 'contact' || resource === 'company') { diff --git a/packages/nodes-base/nodes/Airtable/Airtable.node.ts b/packages/nodes-base/nodes/Airtable/Airtable.node.ts index ef7c420b83..eaaed70c32 100644 --- a/packages/nodes-base/nodes/Airtable/Airtable.node.ts +++ b/packages/nodes-base/nodes/Airtable/Airtable.node.ts @@ -493,7 +493,7 @@ export class Airtable implements INodeType { const returnData: INodeExecutionData[] = []; let responseData; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); const application = this.getNodeParameter('application', 0, undefined, { extractValue: true, diff --git a/packages/nodes-base/nodes/ApiTemplateIo/ApiTemplateIo.node.ts b/packages/nodes-base/nodes/ApiTemplateIo/ApiTemplateIo.node.ts index 0935713bae..da953d331e 100644 --- a/packages/nodes-base/nodes/ApiTemplateIo/ApiTemplateIo.node.ts +++ b/packages/nodes-base/nodes/ApiTemplateIo/ApiTemplateIo.node.ts @@ -346,8 +346,8 @@ export class ApiTemplateIo implements INodeType { let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); if (resource === 'account') { // ********************************************************************* @@ -436,7 +436,7 @@ export class ApiTemplateIo implements INodeType { responseData = await apiTemplateIoApiRequest.call(this, 'POST', '/create', qs, body); if (download === true) { - const binaryProperty = this.getNodeParameter('binaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('binaryProperty', i); const data = await downloadImage.call(this, responseData.download_url); const fileName = responseData.download_url.split('/').pop(); const binaryData = await this.helpers.prepareBinaryData( @@ -520,7 +520,7 @@ export class ApiTemplateIo implements INodeType { responseData = await apiTemplateIoApiRequest.call(this, 'POST', '/create', qs, data); if (download === true) { - const binaryProperty = this.getNodeParameter('binaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('binaryProperty', i); const data = await downloadImage.call(this, responseData.download_url); const fileName = responseData.download_url.split('/').pop(); const binaryData = await this.helpers.prepareBinaryData( diff --git a/packages/nodes-base/nodes/Asana/Asana.node.ts b/packages/nodes-base/nodes/Asana/Asana.node.ts index 17d145bbc2..b9cbd5e84a 100644 --- a/packages/nodes-base/nodes/Asana/Asana.node.ts +++ b/packages/nodes-base/nodes/Asana/Asana.node.ts @@ -1911,8 +1911,8 @@ export class Asana implements INodeType { const returnData: IDataObject[] = []; const timezone = this.getTimezone(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let endpoint = ''; let requestMethod: IHttpRequestMethods = 'GET'; diff --git a/packages/nodes-base/nodes/Automizy/Automizy.node.ts b/packages/nodes-base/nodes/Automizy/Automizy.node.ts index b047018e9d..da0e4eb6b5 100644 --- a/packages/nodes-base/nodes/Automizy/Automizy.node.ts +++ b/packages/nodes-base/nodes/Automizy/Automizy.node.ts @@ -125,8 +125,8 @@ export class Automizy implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'contact') { if (operation === 'create') { diff --git a/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts b/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts index 9077d26988..58b64f756c 100644 --- a/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts +++ b/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts @@ -121,8 +121,8 @@ export class Autopilot implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'contact') { diff --git a/packages/nodes-base/nodes/Aws/AwsSns.node.ts b/packages/nodes-base/nodes/Aws/AwsSns.node.ts index 4ac111c8e5..d437dcaf84 100644 --- a/packages/nodes-base/nodes/Aws/AwsSns.node.ts +++ b/packages/nodes-base/nodes/Aws/AwsSns.node.ts @@ -247,7 +247,7 @@ export class AwsSns implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); const returnData: IDataObject[] = []; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { diff --git a/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts b/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts index e38f93c66f..91de9d6ea7 100644 --- a/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts +++ b/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts @@ -51,8 +51,8 @@ export class AwsCertificateManager implements INodeType { const returnData: IDataObject[] = []; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { if (resource === 'certificate') { diff --git a/packages/nodes-base/nodes/Aws/Comprehend/AwsComprehend.node.ts b/packages/nodes-base/nodes/Aws/Comprehend/AwsComprehend.node.ts index 0c54d8dc84..4a2e92a2dd 100644 --- a/packages/nodes-base/nodes/Aws/Comprehend/AwsComprehend.node.ts +++ b/packages/nodes-base/nodes/Aws/Comprehend/AwsComprehend.node.ts @@ -191,8 +191,8 @@ export class AwsComprehend implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { if (resource === 'text') { diff --git a/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts b/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts index debfbd09ef..9d317098a4 100644 --- a/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts +++ b/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts @@ -218,8 +218,8 @@ export class AwsElb implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { diff --git a/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts b/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts index 86d61c8c3a..aa5da0353d 100644 --- a/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts +++ b/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts @@ -335,8 +335,8 @@ export class AwsRekognition implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { if (resource === 'image') { diff --git a/packages/nodes-base/nodes/Aws/S3/AwsS3.node.ts b/packages/nodes-base/nodes/Aws/S3/AwsS3.node.ts index ee4632c482..4207d88f81 100644 --- a/packages/nodes-base/nodes/Aws/S3/AwsS3.node.ts +++ b/packages/nodes-base/nodes/Aws/S3/AwsS3.node.ts @@ -87,8 +87,8 @@ export class AwsS3 implements INodeType { const returnData: IDataObject[] = []; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { const headers: IDataObject = {}; try { diff --git a/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts b/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts index 59e568703f..f48ee46185 100644 --- a/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts +++ b/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts @@ -828,8 +828,8 @@ export class AwsSes implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { diff --git a/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts b/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts index 546d36d298..456ca9b1fa 100644 --- a/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts +++ b/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts @@ -290,7 +290,7 @@ export class AwsSqs implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { diff --git a/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts b/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts index e0369289c6..5b18f95cc0 100644 --- a/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts +++ b/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts @@ -115,7 +115,7 @@ export class AwsTextract implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; let responseData; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { //https://docs.aws.amazon.com/textract/latest/dg/API_AnalyzeExpense.html diff --git a/packages/nodes-base/nodes/Aws/Transcribe/AwsTranscribe.node.ts b/packages/nodes-base/nodes/Aws/Transcribe/AwsTranscribe.node.ts index 01c9b7e277..942af9059c 100644 --- a/packages/nodes-base/nodes/Aws/Transcribe/AwsTranscribe.node.ts +++ b/packages/nodes-base/nodes/Aws/Transcribe/AwsTranscribe.node.ts @@ -355,8 +355,8 @@ export class AwsTranscribe implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { if (resource === 'transcriptionJob') { diff --git a/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts b/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts index 2e447a9614..30508db81a 100644 --- a/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts +++ b/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts @@ -109,8 +109,8 @@ export class Bannerbear implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'image') { //https://developers.bannerbear.com/#create-an-image diff --git a/packages/nodes-base/nodes/Beeminder/Beeminder.node.ts b/packages/nodes-base/nodes/Beeminder/Beeminder.node.ts index 2adaf24f97..04c05ed685 100644 --- a/packages/nodes-base/nodes/Beeminder/Beeminder.node.ts +++ b/packages/nodes-base/nodes/Beeminder/Beeminder.node.ts @@ -296,8 +296,8 @@ export class Beeminder implements INodeType { const length = items.length; const timezone = this.getTimezone(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let results; for (let i = 0; i < length; i++) { diff --git a/packages/nodes-base/nodes/Bitbucket/BitbucketTrigger.node.ts b/packages/nodes-base/nodes/Bitbucket/BitbucketTrigger.node.ts index a874163101..f93c1f4da5 100644 --- a/packages/nodes-base/nodes/Bitbucket/BitbucketTrigger.node.ts +++ b/packages/nodes-base/nodes/Bitbucket/BitbucketTrigger.node.ts @@ -252,7 +252,7 @@ export class BitbucketTrigger implements INodeType { default: { async checkExists(this: IHookFunctions): Promise { let endpoint = ''; - const resource = this.getNodeParameter('resource', 0) as string; + const resource = this.getNodeParameter('resource', 0); const workspace = this.getNodeParameter('workspace', 0) as string; const webhookUrl = this.getNodeWebhookUrl('default'); const webhookData = this.getWorkflowStaticData('node'); @@ -278,7 +278,7 @@ export class BitbucketTrigger implements INodeType { const webhookUrl = this.getNodeWebhookUrl('default'); const webhookData = this.getWorkflowStaticData('node'); const events = this.getNodeParameter('events') as string[]; - const resource = this.getNodeParameter('resource', 0) as string; + const resource = this.getNodeParameter('resource', 0); const workspace = this.getNodeParameter('workspace', 0) as string; if (resource === 'workspace') { @@ -302,7 +302,7 @@ export class BitbucketTrigger implements INodeType { let endpoint = ''; const webhookData = this.getWorkflowStaticData('node'); const workspace = this.getNodeParameter('workspace', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; + const resource = this.getNodeParameter('resource', 0); if (resource === 'workspace') { endpoint = `/workspaces/${workspace}/hooks/${webhookData.webhookId}`; } diff --git a/packages/nodes-base/nodes/Bitly/Bitly.node.ts b/packages/nodes-base/nodes/Bitly/Bitly.node.ts index 88fc1dd050..fb95857806 100644 --- a/packages/nodes-base/nodes/Bitly/Bitly.node.ts +++ b/packages/nodes-base/nodes/Bitly/Bitly.node.ts @@ -128,8 +128,8 @@ export class Bitly implements INodeType { const returnData: INodeExecutionData[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'link') { diff --git a/packages/nodes-base/nodes/Bitwarden/Bitwarden.node.ts b/packages/nodes-base/nodes/Bitwarden/Bitwarden.node.ts index f92212ee7b..21f8a5a2e5 100644 --- a/packages/nodes-base/nodes/Bitwarden/Bitwarden.node.ts +++ b/packages/nodes-base/nodes/Bitwarden/Bitwarden.node.ts @@ -112,8 +112,8 @@ export class Bitwarden implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; const returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Box/Box.node.ts b/packages/nodes-base/nodes/Box/Box.node.ts index a1e8347e95..2bb8f48d22 100644 --- a/packages/nodes-base/nodes/Box/Box.node.ts +++ b/packages/nodes-base/nodes/Box/Box.node.ts @@ -72,8 +72,8 @@ export class Box implements INodeType { const qs: IDataObject = {}; let responseData; const timezone = this.getTimezone(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'file') { diff --git a/packages/nodes-base/nodes/Brandfetch/Brandfetch.node.ts b/packages/nodes-base/nodes/Brandfetch/Brandfetch.node.ts index 407dcd2948..f91694c11e 100644 --- a/packages/nodes-base/nodes/Brandfetch/Brandfetch.node.ts +++ b/packages/nodes-base/nodes/Brandfetch/Brandfetch.node.ts @@ -145,7 +145,7 @@ export class Brandfetch implements INodeType { const items = this.getInputData(); const length = items.length; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); const responseData: INodeExecutionData[] = []; for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Bubble/Bubble.node.ts b/packages/nodes-base/nodes/Bubble/Bubble.node.ts index b5c290433f..7e6cd24eb9 100644 --- a/packages/nodes-base/nodes/Bubble/Bubble.node.ts +++ b/packages/nodes-base/nodes/Bubble/Bubble.node.ts @@ -54,8 +54,8 @@ export class Bubble implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; const qs: IDataObject = {}; diff --git a/packages/nodes-base/nodes/CircleCi/CircleCi.node.ts b/packages/nodes-base/nodes/CircleCi/CircleCi.node.ts index 400237aefc..665f14d897 100644 --- a/packages/nodes-base/nodes/CircleCi/CircleCi.node.ts +++ b/packages/nodes-base/nodes/CircleCi/CircleCi.node.ts @@ -52,8 +52,8 @@ export class CircleCi implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts index fa1ba97bc1..ccfd60995d 100644 --- a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts +++ b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebex.node.ts @@ -112,8 +112,8 @@ export class CiscoWebex implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; const timezone = this.getTimezone(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; diff --git a/packages/nodes-base/nodes/Citrix/ADC/CitrixAdc.node.ts b/packages/nodes-base/nodes/Citrix/ADC/CitrixAdc.node.ts index 0c8a3c4d88..095c0a9069 100644 --- a/packages/nodes-base/nodes/Citrix/ADC/CitrixAdc.node.ts +++ b/packages/nodes-base/nodes/Citrix/ADC/CitrixAdc.node.ts @@ -61,8 +61,8 @@ export class CitrixAdc implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); const returnData: IDataObject[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData: IDataObject | IDataObject[] = {}; for (let i = 0; i < items.length; i++) { @@ -70,7 +70,7 @@ export class CitrixAdc implements INodeType { if (resource === 'file') { if (operation === 'upload') { const fileLocation = this.getNodeParameter('fileLocation', i) as string; - const binaryProperty = this.getNodeParameter('binaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('binaryProperty', i); const options = this.getNodeParameter('options', i); const endpoint = `/config/systemfile`; @@ -119,7 +119,7 @@ export class CitrixAdc implements INodeType { if (operation === 'download') { const fileName = this.getNodeParameter('fileName', i) as string; const fileLocation = this.getNodeParameter('fileLocation', i) as string; - const binaryProperty = this.getNodeParameter('binaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('binaryProperty', i); const endpoint = `/config/systemfile?args=filename:${fileName},filelocation:${encodeURIComponent( fileLocation, diff --git a/packages/nodes-base/nodes/Clearbit/Clearbit.node.ts b/packages/nodes-base/nodes/Clearbit/Clearbit.node.ts index 61006e9a94..d6d36cf9d4 100644 --- a/packages/nodes-base/nodes/Clearbit/Clearbit.node.ts +++ b/packages/nodes-base/nodes/Clearbit/Clearbit.node.ts @@ -62,8 +62,8 @@ export class Clearbit implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'person') { diff --git a/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts b/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts index 522f668ba2..882e6aa632 100644 --- a/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts +++ b/packages/nodes-base/nodes/ClickUp/ClickUp.node.ts @@ -428,8 +428,8 @@ export class ClickUp implements INodeType { const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Clockify/Clockify.node.ts b/packages/nodes-base/nodes/Clockify/Clockify.node.ts index bb2d74fbf4..64b0603f75 100644 --- a/packages/nodes-base/nodes/Clockify/Clockify.node.ts +++ b/packages/nodes-base/nodes/Clockify/Clockify.node.ts @@ -243,9 +243,9 @@ export class Clockify implements INodeType { let responseData; - const resource = this.getNodeParameter('resource', 0) as string; + const resource = this.getNodeParameter('resource', 0); - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Cloudflare/Cloudflare.node.ts b/packages/nodes-base/nodes/Cloudflare/Cloudflare.node.ts index e017d08be8..bc7857a40d 100644 --- a/packages/nodes-base/nodes/Cloudflare/Cloudflare.node.ts +++ b/packages/nodes-base/nodes/Cloudflare/Cloudflare.node.ts @@ -74,8 +74,8 @@ export class Cloudflare implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Cockpit/Cockpit.node.ts b/packages/nodes-base/nodes/Cockpit/Cockpit.node.ts index 806a6fc373..dd3556d2bd 100644 --- a/packages/nodes-base/nodes/Cockpit/Cockpit.node.ts +++ b/packages/nodes-base/nodes/Cockpit/Cockpit.node.ts @@ -102,8 +102,8 @@ export class Cockpit implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; const length = items.length; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; diff --git a/packages/nodes-base/nodes/Coda/Coda.node.ts b/packages/nodes-base/nodes/Coda/Coda.node.ts index 77973677cf..997b09109b 100644 --- a/packages/nodes-base/nodes/Coda/Coda.node.ts +++ b/packages/nodes-base/nodes/Coda/Coda.node.ts @@ -242,9 +242,9 @@ export class Coda implements INodeType { const returnData: INodeExecutionData[] = []; const items = this.getInputData(); let responseData; - const resource = this.getNodeParameter('resource', 0) as string; + const resource = this.getNodeParameter('resource', 0); let qs: IDataObject = {}; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (resource === 'table') { // https://coda.io/developers/apis/v1beta1#operation/upsertRows diff --git a/packages/nodes-base/nodes/CoinGecko/CoinGecko.node.ts b/packages/nodes-base/nodes/CoinGecko/CoinGecko.node.ts index 189ce4bfae..df36b9326a 100644 --- a/packages/nodes-base/nodes/CoinGecko/CoinGecko.node.ts +++ b/packages/nodes-base/nodes/CoinGecko/CoinGecko.node.ts @@ -143,8 +143,8 @@ export class CoinGecko implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'coin') { diff --git a/packages/nodes-base/nodes/Compression/Compression.node.ts b/packages/nodes-base/nodes/Compression/Compression.node.ts index f863a70172..26dcb8b5c5 100644 --- a/packages/nodes-base/nodes/Compression/Compression.node.ts +++ b/packages/nodes-base/nodes/Compression/Compression.node.ts @@ -180,7 +180,7 @@ export class Compression implements INodeType { const items = this.getInputData(); const length = items.length; const returnData: INodeExecutionData[] = []; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Contentful/Contentful.node.ts b/packages/nodes-base/nodes/Contentful/Contentful.node.ts index 17f19abe3b..860bbe5898 100644 --- a/packages/nodes-base/nodes/Contentful/Contentful.node.ts +++ b/packages/nodes-base/nodes/Contentful/Contentful.node.ts @@ -82,8 +82,8 @@ export class Contentful implements INodeType { }; async execute(this: IExecuteFunctions): Promise { - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; const items = this.getInputData(); diff --git a/packages/nodes-base/nodes/ConvertKit/ConvertKit.node.ts b/packages/nodes-base/nodes/ConvertKit/ConvertKit.node.ts index d3048bc139..2a7e92b981 100644 --- a/packages/nodes-base/nodes/ConvertKit/ConvertKit.node.ts +++ b/packages/nodes-base/nodes/ConvertKit/ConvertKit.node.ts @@ -159,8 +159,8 @@ export class ConvertKit implements INodeType { const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { diff --git a/packages/nodes-base/nodes/Copper/Copper.node.ts b/packages/nodes-base/nodes/Copper/Copper.node.ts index b4a9885d9c..940d74698f 100644 --- a/packages/nodes-base/nodes/Copper/Copper.node.ts +++ b/packages/nodes-base/nodes/Copper/Copper.node.ts @@ -115,8 +115,8 @@ export class Copper implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; diff --git a/packages/nodes-base/nodes/Cortex/Cortex.node.ts b/packages/nodes-base/nodes/Cortex/Cortex.node.ts index fe7d91617d..d162dc44d5 100644 --- a/packages/nodes-base/nodes/Cortex/Cortex.node.ts +++ b/packages/nodes-base/nodes/Cortex/Cortex.node.ts @@ -166,8 +166,8 @@ export class Cortex implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts b/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts index 321b5fb285..bc874b7fed 100644 --- a/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts +++ b/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts @@ -276,7 +276,7 @@ export class CrateDb implements INodeType { let returnItems: INodeExecutionData[] = []; const items = this.getInputData(); - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (operation === 'executeQuery') { // ---------------------------------- diff --git a/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts b/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts index 74ceb3259e..88a49616a2 100644 --- a/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts +++ b/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts @@ -76,8 +76,8 @@ export class CustomerIo implements INodeType { async execute(this: IExecuteFunctions): Promise { const returnData: IDataObject[] = []; const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const body: IDataObject = {}; let responseData; diff --git a/packages/nodes-base/nodes/Demio/Demio.node.ts b/packages/nodes-base/nodes/Demio/Demio.node.ts index 0f1364aad7..2c1cab8866 100644 --- a/packages/nodes-base/nodes/Demio/Demio.node.ts +++ b/packages/nodes-base/nodes/Demio/Demio.node.ts @@ -109,8 +109,8 @@ export class Demio implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Dhl/Dhl.node.ts b/packages/nodes-base/nodes/Dhl/Dhl.node.ts index 85ec73df9c..eccdb4b5b2 100644 --- a/packages/nodes-base/nodes/Dhl/Dhl.node.ts +++ b/packages/nodes-base/nodes/Dhl/Dhl.node.ts @@ -124,8 +124,8 @@ export class Dhl implements INodeType { const returnData: IDataObject[] = []; let qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { diff --git a/packages/nodes-base/nodes/Discourse/Discourse.node.ts b/packages/nodes-base/nodes/Discourse/Discourse.node.ts index cc673190ed..3d9041b8a5 100644 --- a/packages/nodes-base/nodes/Discourse/Discourse.node.ts +++ b/packages/nodes-base/nodes/Discourse/Discourse.node.ts @@ -114,8 +114,8 @@ export class Discourse implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'category') { diff --git a/packages/nodes-base/nodes/Disqus/Disqus.node.ts b/packages/nodes-base/nodes/Disqus/Disqus.node.ts index c5b0deb47e..1ad2b738a5 100644 --- a/packages/nodes-base/nodes/Disqus/Disqus.node.ts +++ b/packages/nodes-base/nodes/Disqus/Disqus.node.ts @@ -572,8 +572,8 @@ export class Disqus implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let endpoint = ''; let requestMethod = ''; diff --git a/packages/nodes-base/nodes/Drift/Drift.node.ts b/packages/nodes-base/nodes/Drift/Drift.node.ts index f950dc6c9a..ce39a7359f 100644 --- a/packages/nodes-base/nodes/Drift/Drift.node.ts +++ b/packages/nodes-base/nodes/Drift/Drift.node.ts @@ -79,8 +79,8 @@ export class Drift implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'contact') { diff --git a/packages/nodes-base/nodes/Dropbox/Dropbox.node.ts b/packages/nodes-base/nodes/Dropbox/Dropbox.node.ts index 8ac6df406b..99e9ab7d70 100644 --- a/packages/nodes-base/nodes/Dropbox/Dropbox.node.ts +++ b/packages/nodes-base/nodes/Dropbox/Dropbox.node.ts @@ -695,8 +695,8 @@ export class Dropbox implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let endpoint = ''; let requestMethod = ''; diff --git a/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts b/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts index 431b55665f..826720b3f1 100644 --- a/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts +++ b/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts @@ -241,8 +241,8 @@ export class Dropcontact implements INodeType { }; async execute(this: IExecuteFunctions): Promise { const entryData = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); // tslint:disable-next-line: no-any let responseData: any; const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts b/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts index f53578a755..58ba2ae9e2 100644 --- a/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts +++ b/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts @@ -120,8 +120,8 @@ export class ERPNext implements INodeType { const body: IDataObject = {}; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { // https://app.swaggerhub.com/apis-docs/alyf.de/ERPNext/11#/Resources/post_api_resource_Webhook diff --git a/packages/nodes-base/nodes/Egoi/Egoi.node.ts b/packages/nodes-base/nodes/Egoi/Egoi.node.ts index 482b03b38a..659c998272 100644 --- a/packages/nodes-base/nodes/Egoi/Egoi.node.ts +++ b/packages/nodes-base/nodes/Egoi/Egoi.node.ts @@ -541,8 +541,8 @@ export class Egoi implements INodeType { const returnData: INodeExecutionData[] = []; const items = this.getInputData(); const length = items.length; - const operation = this.getNodeParameter('operation', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; + const operation = this.getNodeParameter('operation', 0); + const resource = this.getNodeParameter('resource', 0); for (let i = 0; i < length; i++) { try { if (resource === 'contact') { diff --git a/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts b/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts index 956a3f4452..88bb73fb04 100644 --- a/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts +++ b/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts @@ -166,8 +166,8 @@ export class ElasticSecurity implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; diff --git a/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts b/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts index 16c4084331..562e96fe27 100644 --- a/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts +++ b/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts @@ -66,7 +66,7 @@ export class Elasticsearch implements INodeType { const returnData: INodeExecutionData[] = []; const resource = this.getNodeParameter('resource', 0) as 'document' | 'index'; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); let responseData; diff --git a/packages/nodes-base/nodes/Flow/Flow.node.ts b/packages/nodes-base/nodes/Flow/Flow.node.ts index cc7deec65c..ddc8ba5170 100644 --- a/packages/nodes-base/nodes/Flow/Flow.node.ts +++ b/packages/nodes-base/nodes/Flow/Flow.node.ts @@ -60,8 +60,8 @@ export class Flow implements INodeType { const length = items.length; let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'task') { diff --git a/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts b/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts index d9e13f4209..4ac9eb451c 100644 --- a/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts +++ b/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts @@ -1096,8 +1096,8 @@ export class Freshdesk implements INodeType { const returnData: INodeExecutionData[] = []; let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { if (resource === 'ticket') { diff --git a/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts b/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts index b4df4929ff..5bcbea847b 100644 --- a/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts +++ b/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts @@ -271,8 +271,8 @@ export class Freshservice implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const defaultTimezone = this.getTimezone(); diff --git a/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts b/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts index f9399e4545..387d1ee296 100644 --- a/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts +++ b/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts @@ -239,8 +239,8 @@ export class FreshworksCrm implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const defaultTimezone = this.getTimezone(); let responseData; diff --git a/packages/nodes-base/nodes/FreshworksCrm/GenericFunctions.ts b/packages/nodes-base/nodes/FreshworksCrm/GenericFunctions.ts index 9952662233..86b10aa9e3 100644 --- a/packages/nodes-base/nodes/FreshworksCrm/GenericFunctions.ts +++ b/packages/nodes-base/nodes/FreshworksCrm/GenericFunctions.ts @@ -49,7 +49,7 @@ export async function getAllItemsViewId( this: IExecuteFunctions | ILoadOptionsFunctions, { fromLoadOptions } = { fromLoadOptions: false }, ) { - let resource = this.getNodeParameter('resource', 0) as string; + let resource = this.getNodeParameter('resource', 0); let keyword = 'All'; if (resource === 'account' || fromLoadOptions) { diff --git a/packages/nodes-base/nodes/Ftp/Ftp.node.ts b/packages/nodes-base/nodes/Ftp/Ftp.node.ts index 20aa35e56d..c61956af92 100644 --- a/packages/nodes-base/nodes/Ftp/Ftp.node.ts +++ b/packages/nodes-base/nodes/Ftp/Ftp.node.ts @@ -415,7 +415,7 @@ export class Ftp implements INodeType { // const returnData: IDataObject[] = []; const returnItems: INodeExecutionData[] = []; let responseData; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); let credentials: ICredentialDataDecryptedObject | undefined = undefined; const protocol = this.getNodeParameter('protocol', 0) as string; diff --git a/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts b/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts index 40a657e99c..9e22b689c8 100644 --- a/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts +++ b/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts @@ -135,8 +135,8 @@ export class GetResponse implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'contact') { diff --git a/packages/nodes-base/nodes/Ghost/Ghost.node.ts b/packages/nodes-base/nodes/Ghost/Ghost.node.ts index fb69dbee51..753deba5bf 100644 --- a/packages/nodes-base/nodes/Ghost/Ghost.node.ts +++ b/packages/nodes-base/nodes/Ghost/Ghost.node.ts @@ -124,8 +124,8 @@ export class Ghost implements INodeType { const timezone = this.getTimezone(); const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const source = this.getNodeParameter('source', 0) as string; for (let i = 0; i < length; i++) { diff --git a/packages/nodes-base/nodes/Git/Git.node.ts b/packages/nodes-base/nodes/Git/Git.node.ts index dc6225f2aa..38594c5fe3 100644 --- a/packages/nodes-base/nodes/Git/Git.node.ts +++ b/packages/nodes-base/nodes/Git/Git.node.ts @@ -211,7 +211,7 @@ export class Git implements INodeType { return repositoryPath; }; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); let _item: INodeExecutionData; const returnItems: INodeExecutionData[] = []; for (let itemIndex = 0; itemIndex < items.length; itemIndex++) { diff --git a/packages/nodes-base/nodes/Github/Github.node.ts b/packages/nodes-base/nodes/Github/Github.node.ts index 6140bb8ac2..dbd39bdfc0 100644 --- a/packages/nodes-base/nodes/Github/Github.node.ts +++ b/packages/nodes-base/nodes/Github/Github.node.ts @@ -1658,8 +1658,8 @@ export class Github implements INodeType { let requestMethod: string; let endpoint: string; - const operation = this.getNodeParameter('operation', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; + const operation = this.getNodeParameter('operation', 0); + const resource = this.getNodeParameter('resource', 0); const fullOperation = `${resource}:${operation}`; for (let i = 0; i < items.length; i++) { diff --git a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts index 9ea0134a1b..eb6d11cc2e 100644 --- a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts +++ b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts @@ -1025,8 +1025,8 @@ export class Gitlab implements INodeType { let endpoint: string; let returnAll = false; - const operation = this.getNodeParameter('operation', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; + const operation = this.getNodeParameter('operation', 0); + const resource = this.getNodeParameter('resource', 0); const fullOperation = `${resource}:${operation}`; for (let i = 0; i < items.length; i++) { diff --git a/packages/nodes-base/nodes/GoToWebinar/GenericFunctions.ts b/packages/nodes-base/nodes/GoToWebinar/GenericFunctions.ts index 579b3d7f09..73f22c4d5c 100644 --- a/packages/nodes-base/nodes/GoToWebinar/GenericFunctions.ts +++ b/packages/nodes-base/nodes/GoToWebinar/GenericFunctions.ts @@ -24,8 +24,8 @@ export async function goToWebinarApiRequest( body: IDataObject | IDataObject[], option: IDataObject = {}, ) { - const operation = this.getNodeParameter('operation', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; + const operation = this.getNodeParameter('operation', 0); + const resource = this.getNodeParameter('resource', 0); const options: OptionsWithUri = { headers: { diff --git a/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts b/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts index 14de10e93a..21aad41542 100644 --- a/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts +++ b/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts @@ -150,8 +150,8 @@ export class GoToWebinar implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; const returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Google/Analytics/GoogleAnalytics.node.ts b/packages/nodes-base/nodes/Google/Analytics/GoogleAnalytics.node.ts index 3564097311..8bce66a3d4 100644 --- a/packages/nodes-base/nodes/Google/Analytics/GoogleAnalytics.node.ts +++ b/packages/nodes-base/nodes/Google/Analytics/GoogleAnalytics.node.ts @@ -141,8 +141,8 @@ export class GoogleAnalytics implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let method = ''; const qs: IDataObject = {}; diff --git a/packages/nodes-base/nodes/Google/BigQuery/GoogleBigQuery.node.ts b/packages/nodes-base/nodes/Google/BigQuery/GoogleBigQuery.node.ts index ecc38f5615..0e422d70d2 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/GoogleBigQuery.node.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/GoogleBigQuery.node.ts @@ -142,8 +142,8 @@ export class GoogleBigQuery implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); if (resource === 'record') { // ********************************************************************* diff --git a/packages/nodes-base/nodes/Google/Books/GoogleBooks.node.ts b/packages/nodes-base/nodes/Google/Books/GoogleBooks.node.ts index d9756e2aa5..cad53729d7 100644 --- a/packages/nodes-base/nodes/Google/Books/GoogleBooks.node.ts +++ b/packages/nodes-base/nodes/Google/Books/GoogleBooks.node.ts @@ -345,8 +345,8 @@ export class GoogleBooks implements INodeType { const items = this.getInputData(); const length = items.length; const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const qs: IDataObject = {}; let responseData; diff --git a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts index 0b38aabe54..cf70f85fd3 100644 --- a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts +++ b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts @@ -129,8 +129,8 @@ export class GoogleCalendar implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const timezone = this.getTimezone(); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts b/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts index 8d95f50ccb..3cf7198b8b 100644 --- a/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts +++ b/packages/nodes-base/nodes/Google/Chat/GoogleChat.node.ts @@ -199,8 +199,8 @@ export class GoogleChat implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'media') { diff --git a/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.ts b/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.ts index f105026fdf..4706fa823a 100644 --- a/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.ts +++ b/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GoogleCloudNaturalLanguage.node.ts @@ -254,8 +254,8 @@ export class GoogleCloudNaturalLanguage implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); const length = items.length; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const responseData = []; for (let i = 0; i < length; i++) { if (resource === 'document') { diff --git a/packages/nodes-base/nodes/Google/Contacts/GoogleContacts.node.ts b/packages/nodes-base/nodes/Google/Contacts/GoogleContacts.node.ts index 49437d021e..310bd63224 100644 --- a/packages/nodes-base/nodes/Google/Contacts/GoogleContacts.node.ts +++ b/packages/nodes-base/nodes/Google/Contacts/GoogleContacts.node.ts @@ -91,8 +91,8 @@ export class GoogleContacts implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'contact') { diff --git a/packages/nodes-base/nodes/Google/Docs/GoogleDocs.node.ts b/packages/nodes-base/nodes/Google/Docs/GoogleDocs.node.ts index 3e1ef84c5a..5462a4c8f8 100644 --- a/packages/nodes-base/nodes/Google/Docs/GoogleDocs.node.ts +++ b/packages/nodes-base/nodes/Google/Docs/GoogleDocs.node.ts @@ -202,8 +202,8 @@ export class GoogleDocs implements INodeType { let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Google/Drive/GoogleDrive.node.ts b/packages/nodes-base/nodes/Google/Drive/GoogleDrive.node.ts index 7a56e7d0a4..da4fe5c7ac 100644 --- a/packages/nodes-base/nodes/Google/Drive/GoogleDrive.node.ts +++ b/packages/nodes-base/nodes/Google/Drive/GoogleDrive.node.ts @@ -2106,8 +2106,8 @@ export class GoogleDrive implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { diff --git a/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GoogleFirebaseCloudFirestore.node.ts b/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GoogleFirebaseCloudFirestore.node.ts index fc5885331d..bee639d432 100644 --- a/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GoogleFirebaseCloudFirestore.node.ts +++ b/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GoogleFirebaseCloudFirestore.node.ts @@ -93,8 +93,8 @@ export class GoogleFirebaseCloudFirestore implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); if (resource === 'document') { if (operation === 'get') { diff --git a/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GoogleFirebaseRealtimeDatabase.node.ts b/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GoogleFirebaseRealtimeDatabase.node.ts index 37f5896607..9170447d3a 100644 --- a/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GoogleFirebaseRealtimeDatabase.node.ts +++ b/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GoogleFirebaseRealtimeDatabase.node.ts @@ -166,7 +166,7 @@ export class GoogleFirebaseRealtimeDatabase implements INodeType { const returnData: INodeExecutionData[] = []; const length = items.length; let responseData; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); //https://firebase.google.com/docs/reference/rest/database if ( diff --git a/packages/nodes-base/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts b/packages/nodes-base/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts index ae72bae3ce..b03bfc199e 100644 --- a/packages/nodes-base/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts +++ b/packages/nodes-base/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts @@ -113,8 +113,8 @@ export class GSuiteAdmin implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'group') { //https://developers.google.com/admin-sdk/directory/v1/reference/groups/insert diff --git a/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts b/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts index 854c69e769..f20735ec4a 100644 --- a/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts +++ b/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts @@ -175,8 +175,8 @@ export class GmailV1 implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let method = ''; let body: IDataObject = {}; diff --git a/packages/nodes-base/nodes/Google/Gmail/v2/GmailV2.node.ts b/packages/nodes-base/nodes/Google/Gmail/v2/GmailV2.node.ts index 96d0a6b73b..67027e04f8 100644 --- a/packages/nodes-base/nodes/Google/Gmail/v2/GmailV2.node.ts +++ b/packages/nodes-base/nodes/Google/Gmail/v2/GmailV2.node.ts @@ -204,8 +204,8 @@ export class GmailV2 implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; diff --git a/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheetsV1.node.ts b/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheetsV1.node.ts index 6b7eb6011c..dc5bf7e260 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheetsV1.node.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheetsV1.node.ts @@ -102,8 +102,8 @@ export class GoogleSheetsV1 implements INodeType { }; async execute(this: IExecuteFunctions): Promise { - const operation = this.getNodeParameter('operation', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; + const operation = this.getNodeParameter('operation', 0); + const resource = this.getNodeParameter('resource', 0); if (resource === 'sheet') { const spreadsheetId = this.getNodeParameter('sheetId', 0) as string; diff --git a/packages/nodes-base/nodes/Google/Slides/GoogleSlides.node.ts b/packages/nodes-base/nodes/Google/Slides/GoogleSlides.node.ts index ce67691c0f..215bbb96aa 100644 --- a/packages/nodes-base/nodes/Google/Slides/GoogleSlides.node.ts +++ b/packages/nodes-base/nodes/Google/Slides/GoogleSlides.node.ts @@ -387,8 +387,8 @@ export class GoogleSlides implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; const returnData: INodeExecutionData[] = []; @@ -433,7 +433,7 @@ export class GoogleSlides implements INodeType { const download = this.getNodeParameter('download', 0); if (download === true) { - const binaryProperty = this.getNodeParameter('binaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('binaryProperty', i); const data = await this.helpers.request({ uri: responseData.contentUrl, diff --git a/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts b/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts index 9f450da232..9d3800a535 100644 --- a/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts +++ b/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts @@ -83,8 +83,8 @@ export class GoogleTasks implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let body: IDataObject = {}; for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Google/Translate/GoogleTranslate.node.ts b/packages/nodes-base/nodes/Google/Translate/GoogleTranslate.node.ts index 8ce291e321..39565ee68f 100644 --- a/packages/nodes-base/nodes/Google/Translate/GoogleTranslate.node.ts +++ b/packages/nodes-base/nodes/Google/Translate/GoogleTranslate.node.ts @@ -186,8 +186,8 @@ export class GoogleTranslate implements INodeType { const items = this.getInputData(); const length = items.length; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const responseData: INodeExecutionData[] = []; for (let i = 0; i < length; i++) { if (resource === 'language') { diff --git a/packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts b/packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts index 852a0cfb49..1848f1f595 100644 --- a/packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts +++ b/packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts @@ -189,8 +189,8 @@ export class YouTube implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'channel') { @@ -383,7 +383,7 @@ export class YouTube implements INodeType { //https://developers.google.com/youtube/v3/docs/channelBanners/insert if (operation === 'uploadBanner') { const channelId = this.getNodeParameter('channelId', i) as string; - const binaryProperty = this.getNodeParameter('binaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('binaryProperty', i); let mimeType; @@ -849,7 +849,7 @@ export class YouTube implements INodeType { const title = this.getNodeParameter('title', i) as string; const categoryId = this.getNodeParameter('categoryId', i) as string; const options = this.getNodeParameter('options', i); - const binaryProperty = this.getNodeParameter('binaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('binaryProperty', i); let mimeType; diff --git a/packages/nodes-base/nodes/Gotify/Gotify.node.ts b/packages/nodes-base/nodes/Gotify/Gotify.node.ts index b9435770e3..467c09eeab 100644 --- a/packages/nodes-base/nodes/Gotify/Gotify.node.ts +++ b/packages/nodes-base/nodes/Gotify/Gotify.node.ts @@ -163,8 +163,8 @@ export class Gotify implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'message') { diff --git a/packages/nodes-base/nodes/Grafana/Grafana.node.ts b/packages/nodes-base/nodes/Grafana/Grafana.node.ts index 63f3bfee76..c9c1b3d3b0 100644 --- a/packages/nodes-base/nodes/Grafana/Grafana.node.ts +++ b/packages/nodes-base/nodes/Grafana/Grafana.node.ts @@ -123,8 +123,8 @@ export class Grafana implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; diff --git a/packages/nodes-base/nodes/Grist/Grist.node.ts b/packages/nodes-base/nodes/Grist/Grist.node.ts index 3f35bb6e4b..ee522b012a 100644 --- a/packages/nodes-base/nodes/Grist/Grist.node.ts +++ b/packages/nodes-base/nodes/Grist/Grist.node.ts @@ -118,7 +118,7 @@ export class Grist implements INodeType { let responseData; const returnData: IDataObject[] = []; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { diff --git a/packages/nodes-base/nodes/HackerNews/HackerNews.node.ts b/packages/nodes-base/nodes/HackerNews/HackerNews.node.ts index b3e7b8dea0..9493c3f7f2 100644 --- a/packages/nodes-base/nodes/HackerNews/HackerNews.node.ts +++ b/packages/nodes-base/nodes/HackerNews/HackerNews.node.ts @@ -265,8 +265,8 @@ export class HackerNews implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let returnAll = false; for (let i = 0; i < items.length; i++) { diff --git a/packages/nodes-base/nodes/HaloPSA/HaloPSA.node.ts b/packages/nodes-base/nodes/HaloPSA/HaloPSA.node.ts index e7ab818e31..51768fe386 100644 --- a/packages/nodes-base/nodes/HaloPSA/HaloPSA.node.ts +++ b/packages/nodes-base/nodes/HaloPSA/HaloPSA.node.ts @@ -222,8 +222,8 @@ export class HaloPSA implements INodeType { const tokens = await getAccessTokens.call(this); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); //==================================================================== // Main Loop diff --git a/packages/nodes-base/nodes/Harvest/Harvest.node.ts b/packages/nodes-base/nodes/Harvest/Harvest.node.ts index 7053cbf86c..3bd1cafa71 100644 --- a/packages/nodes-base/nodes/Harvest/Harvest.node.ts +++ b/packages/nodes-base/nodes/Harvest/Harvest.node.ts @@ -204,8 +204,8 @@ export class Harvest implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let endpoint = ''; let requestMethod = ''; diff --git a/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts b/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts index fda5dd0878..a8030ac7d7 100644 --- a/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts +++ b/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts @@ -151,8 +151,8 @@ export class HelpScout implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'conversation') { diff --git a/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts b/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts index be1b1e2644..95c213afc3 100644 --- a/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts +++ b/packages/nodes-base/nodes/HomeAssistant/HomeAssistant.node.ts @@ -182,8 +182,8 @@ export class HomeAssistant implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; const length = items.length; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const qs: IDataObject = {}; let responseData; for (let i = 0; i < length; i++) { diff --git a/packages/nodes-base/nodes/Hubspot/Hubspot.node.ts b/packages/nodes-base/nodes/Hubspot/Hubspot.node.ts index c0ed0091c1..1af85eb74e 100644 --- a/packages/nodes-base/nodes/Hubspot/Hubspot.node.ts +++ b/packages/nodes-base/nodes/Hubspot/Hubspot.node.ts @@ -933,8 +933,8 @@ export class Hubspot implements INodeType { const length = items.length; let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); //https://legacydocs.hubspot.com/docs/methods/lists/contact-lists-overview if (resource === 'contactList') { diff --git a/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts b/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts index 8969929c8f..97a2e263a1 100644 --- a/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts +++ b/packages/nodes-base/nodes/HumanticAI/HumanticAi.node.ts @@ -61,8 +61,8 @@ export class HumanticAi implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'profile') { if (operation === 'create') { diff --git a/packages/nodes-base/nodes/Hunter/Hunter.node.ts b/packages/nodes-base/nodes/Hunter/Hunter.node.ts index fee9f02308..917f8ffd98 100644 --- a/packages/nodes-base/nodes/Hunter/Hunter.node.ts +++ b/packages/nodes-base/nodes/Hunter/Hunter.node.ts @@ -274,7 +274,7 @@ export class Hunter implements INodeType { let responseData; for (let i = 0; i < length; i++) { try { - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); //https://hunter.io/api-documentation/v2#domain-search if (operation === 'domainSearch') { const returnAll = this.getNodeParameter('returnAll', i); diff --git a/packages/nodes-base/nodes/ICalendar/ICalendar.node.ts b/packages/nodes-base/nodes/ICalendar/ICalendar.node.ts index b6122fbc28..0dcf26242a 100644 --- a/packages/nodes-base/nodes/ICalendar/ICalendar.node.ts +++ b/packages/nodes-base/nodes/ICalendar/ICalendar.node.ts @@ -300,7 +300,7 @@ export class ICalendar implements INodeType { const items = this.getInputData(); const length = items.length; const returnData: INodeExecutionData[] = []; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (operation === 'createEventFile') { for (let i = 0; i < length; i++) { const title = this.getNodeParameter('title', i) as string; diff --git a/packages/nodes-base/nodes/Intercom/Intercom.node.ts b/packages/nodes-base/nodes/Intercom/Intercom.node.ts index c6dafd12b5..06d357e2eb 100644 --- a/packages/nodes-base/nodes/Intercom/Intercom.node.ts +++ b/packages/nodes-base/nodes/Intercom/Intercom.node.ts @@ -108,8 +108,8 @@ export class Intercom implements INodeType { for (let i = 0; i < length; i++) { try { qs = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); //https://developers.intercom.com/intercom-api-reference/reference#leads if (resource === 'lead') { if (operation === 'create' || operation === 'update') { diff --git a/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinja.node.ts b/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinja.node.ts index 8d492a12cb..487ed59dab 100644 --- a/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinja.node.ts +++ b/packages/nodes-base/nodes/InvoiceNinja/InvoiceNinja.node.ts @@ -267,8 +267,8 @@ export class InvoiceNinja implements INodeType { let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const apiVersion = this.getNodeParameter('apiVersion', 0) as string; for (let i = 0; i < length; i++) { diff --git a/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts b/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts index a630278931..6ed85e864e 100644 --- a/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts +++ b/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts @@ -736,8 +736,8 @@ return 0;`, const items = this.getInputData(); const length = items.length; const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); if (resource === 'itemList') { if (operation === 'splitOutItems') { for (let i = 0; i < length; i++) { diff --git a/packages/nodes-base/nodes/Iterable/Iterable.node.ts b/packages/nodes-base/nodes/Iterable/Iterable.node.ts index 308d3de8e5..4b8755ffb2 100644 --- a/packages/nodes-base/nodes/Iterable/Iterable.node.ts +++ b/packages/nodes-base/nodes/Iterable/Iterable.node.ts @@ -97,8 +97,8 @@ export class Iterable implements INodeType { const timezone = this.getTimezone(); const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); if (resource === 'event') { if (operation === 'track') { diff --git a/packages/nodes-base/nodes/Jenkins/Jenkins.node.ts b/packages/nodes-base/nodes/Jenkins/Jenkins.node.ts index 79c6657c47..8baeaffb3d 100644 --- a/packages/nodes-base/nodes/Jenkins/Jenkins.node.ts +++ b/packages/nodes-base/nodes/Jenkins/Jenkins.node.ts @@ -486,8 +486,8 @@ export class Jenkins implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Jira/Jira.node.ts b/packages/nodes-base/nodes/Jira/Jira.node.ts index 624cfdc4de..ea656b7c8f 100644 --- a/packages/nodes-base/nodes/Jira/Jira.node.ts +++ b/packages/nodes-base/nodes/Jira/Jira.node.ts @@ -446,8 +446,8 @@ export class Jira implements INodeType { let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const jiraVersion = this.getNodeParameter('jiraVersion', 0) as string; if (resource === 'issue') { @@ -1066,7 +1066,7 @@ export class Jira implements INodeType { returnData.push(...executionData); } if (download) { - const binaryPropertyName = this.getNodeParameter('binaryProperty', 0) as string; + const binaryPropertyName = this.getNodeParameter('binaryProperty', 0); for (const [index, attachment] of returnData.entries()) { returnData[index]['binary'] = {}; @@ -1120,7 +1120,7 @@ export class Jira implements INodeType { returnData.push(...executionData); } if (download) { - const binaryPropertyName = this.getNodeParameter('binaryProperty', 0) as string; + const binaryPropertyName = this.getNodeParameter('binaryProperty', 0); for (const [index, attachment] of returnData.entries()) { returnData[index]['binary'] = {}; //@ts-ignore diff --git a/packages/nodes-base/nodes/Keap/Keap.node.ts b/packages/nodes-base/nodes/Keap/Keap.node.ts index a199ca08ea..6e4f4def5b 100644 --- a/packages/nodes-base/nodes/Keap/Keap.node.ts +++ b/packages/nodes-base/nodes/Keap/Keap.node.ts @@ -249,8 +249,8 @@ export class Keap implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'company') { //https://developer.keap.com/docs/rest/#!/Company/createCompanyUsingPOST diff --git a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts index 04767f769c..325c4195b5 100644 --- a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts +++ b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts @@ -81,8 +81,8 @@ export class KoBoToolbox implements INodeType { let returnData: any[] = []; const binaryItems: INodeExecutionData[] = []; const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { if (resource === 'form') { diff --git a/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts b/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts index 6c7f4522cf..21cb2a102d 100644 --- a/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts +++ b/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts @@ -103,8 +103,8 @@ export class Lemlist implements INodeType { async execute(this: IExecuteFunctions) { const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; const returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Line/Line.node.ts b/packages/nodes-base/nodes/Line/Line.node.ts index 6c15637cf4..7592677473 100644 --- a/packages/nodes-base/nodes/Line/Line.node.ts +++ b/packages/nodes-base/nodes/Line/Line.node.ts @@ -63,8 +63,8 @@ export class Line implements INodeType { const returnData: INodeExecutionData[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'notification') { diff --git a/packages/nodes-base/nodes/Linear/Linear.node.ts b/packages/nodes-base/nodes/Linear/Linear.node.ts index e2f6fbba62..be81032de4 100644 --- a/packages/nodes-base/nodes/Linear/Linear.node.ts +++ b/packages/nodes-base/nodes/Linear/Linear.node.ts @@ -159,8 +159,8 @@ export class Linear implements INodeType { const returnData: INodeExecutionData[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'issue') { diff --git a/packages/nodes-base/nodes/LingvaNex/LingvaNex.node.ts b/packages/nodes-base/nodes/LingvaNex/LingvaNex.node.ts index 53c02ad20f..a3843c19f2 100644 --- a/packages/nodes-base/nodes/LingvaNex/LingvaNex.node.ts +++ b/packages/nodes-base/nodes/LingvaNex/LingvaNex.node.ts @@ -151,7 +151,7 @@ export class LingvaNex implements INodeType { const items = this.getInputData(); const length = items.length; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); const responseData = []; for (let i = 0; i < length; i++) { if (operation === 'translate') { diff --git a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts index f653182482..7a0ff4ec19 100644 --- a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts +++ b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts @@ -72,8 +72,8 @@ export class LinkedIn implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let body: any = {}; // tslint:disable-line:no-any diff --git a/packages/nodes-base/nodes/Magento/Magento2.node.ts b/packages/nodes-base/nodes/Magento/Magento2.node.ts index 37f8e4d59b..30916e17cb 100644 --- a/packages/nodes-base/nodes/Magento/Magento2.node.ts +++ b/packages/nodes-base/nodes/Magento/Magento2.node.ts @@ -310,8 +310,8 @@ export class Magento2 implements INodeType { const returnData: INodeExecutionData[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Mailcheck/Mailcheck.node.ts b/packages/nodes-base/nodes/Mailcheck/Mailcheck.node.ts index d5fd4645fc..b7c893a1bb 100644 --- a/packages/nodes-base/nodes/Mailcheck/Mailcheck.node.ts +++ b/packages/nodes-base/nodes/Mailcheck/Mailcheck.node.ts @@ -80,8 +80,8 @@ export class Mailcheck implements INodeType { const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'email') { diff --git a/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts b/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts index 3cb79694be..d54f8dfc62 100644 --- a/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts +++ b/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts @@ -1678,8 +1678,8 @@ export class Mailchimp implements INodeType { const length = items.length; let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/MailerLite/MailerLite.node.ts b/packages/nodes-base/nodes/MailerLite/MailerLite.node.ts index 7f5d56a646..47fc74ff06 100644 --- a/packages/nodes-base/nodes/MailerLite/MailerLite.node.ts +++ b/packages/nodes-base/nodes/MailerLite/MailerLite.node.ts @@ -77,8 +77,8 @@ export class MailerLite implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'subscriber') { diff --git a/packages/nodes-base/nodes/Mailjet/GenericFunctions.ts b/packages/nodes-base/nodes/Mailjet/GenericFunctions.ts index 88c8f29962..8105a4323b 100644 --- a/packages/nodes-base/nodes/Mailjet/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mailjet/GenericFunctions.ts @@ -15,7 +15,7 @@ export async function mailjetApiRequest( option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { - const resource = this.getNodeParameter('resource', 0) as string; + const resource = this.getNodeParameter('resource', 0); let credentialType; diff --git a/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts b/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts index 4c7a038c90..7653204da7 100644 --- a/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts +++ b/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts @@ -97,8 +97,8 @@ export class Mailjet implements INodeType { const returnData: INodeExecutionData[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts b/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts index 94cf7ff064..117e09916d 100644 --- a/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts +++ b/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts @@ -714,8 +714,8 @@ export class Mandrill implements INodeType { const items = this.getInputData(); let responseData; let emailSentResponse; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { diff --git a/packages/nodes-base/nodes/Matrix/Matrix.node.ts b/packages/nodes-base/nodes/Matrix/Matrix.node.ts index 609c7c6726..dd14f03a60 100644 --- a/packages/nodes-base/nodes/Matrix/Matrix.node.ts +++ b/packages/nodes-base/nodes/Matrix/Matrix.node.ts @@ -139,8 +139,8 @@ export class Matrix implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData() as IDataObject[]; const returnData: IDataObject[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { diff --git a/packages/nodes-base/nodes/Mautic/Mautic.node.ts b/packages/nodes-base/nodes/Mautic/Mautic.node.ts index 1ebec00595..9e875416d7 100644 --- a/packages/nodes-base/nodes/Mautic/Mautic.node.ts +++ b/packages/nodes-base/nodes/Mautic/Mautic.node.ts @@ -319,8 +319,8 @@ export class Mautic implements INodeType { let qs: IDataObject; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { qs = {}; diff --git a/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts b/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts index b4f38cf52a..2bb849466f 100644 --- a/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts @@ -150,8 +150,8 @@ export class MicrosoftDynamicsCrm implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Microsoft/Excel/MicrosoftExcel.node.ts b/packages/nodes-base/nodes/Microsoft/Excel/MicrosoftExcel.node.ts index 4d72c86f29..18801ffbe1 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/MicrosoftExcel.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/MicrosoftExcel.node.ts @@ -168,8 +168,8 @@ export class MicrosoftExcel implements INodeType { let qs: IDataObject = {}; const result: IDataObject[] = []; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); if (resource === 'table') { //https://docs.microsoft.com/en-us/graph/api/table-post-rows?view=graph-rest-1.0&tabs=http diff --git a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts index f8b9f34c89..5d3f06803d 100644 --- a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts +++ b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts @@ -66,8 +66,8 @@ export class MicrosoftOneDrive implements INodeType { const returnData: INodeExecutionData[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'file') { diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlook.node.ts b/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlook.node.ts index 54f2c6373c..da9fb9c269 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlook.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/MicrosoftOutlook.node.ts @@ -137,8 +137,8 @@ export class MicrosoftOutlook implements INodeType { const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); if (['draft', 'message'].includes(resource)) { if (operation === 'delete') { diff --git a/packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts b/packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts index 4970d71b50..c01ad72db9 100644 --- a/packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts @@ -282,7 +282,7 @@ export class MicrosoftSql implements INodeType { let responseData: IDataObject | IDataObject[] = []; const items = this.getInputData(); - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); try { if (operation === 'executeQuery') { diff --git a/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts b/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts index 891ab630c1..ec36e674a2 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts @@ -140,7 +140,7 @@ export class MicrosoftTeams implements INodeType { async getPlans(this: ILoadOptionsFunctions): Promise { const returnData: INodePropertyOptions[] = []; let groupId = this.getCurrentNodeParameter('groupId') as string; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (operation === 'update' && (groupId === undefined || groupId === null)) { // groupId not found at base, check updateFields for the groupId groupId = this.getCurrentNodeParameter('updateFields.groupId') as string; @@ -163,7 +163,7 @@ export class MicrosoftTeams implements INodeType { async getBuckets(this: ILoadOptionsFunctions): Promise { const returnData: INodePropertyOptions[] = []; let planId = this.getCurrentNodeParameter('planId') as string; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (operation === 'update' && (planId === undefined || planId === null)) { // planId not found at base, check updateFields for the planId planId = this.getCurrentNodeParameter('updateFields.planId') as string; @@ -186,7 +186,7 @@ export class MicrosoftTeams implements INodeType { async getMembers(this: ILoadOptionsFunctions): Promise { const returnData: INodePropertyOptions[] = []; let groupId = this.getCurrentNodeParameter('groupId') as string; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (operation === 'update' && (groupId === undefined || groupId === null)) { // groupId not found at base, check updateFields for the groupId groupId = this.getCurrentNodeParameter('updateFields.groupId') as string; @@ -210,7 +210,7 @@ export class MicrosoftTeams implements INodeType { const returnData: INodePropertyOptions[] = []; let planId = this.getCurrentNodeParameter('planId') as string; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (operation === 'update' && (planId === undefined || planId === null)) { // planId not found at base, check updateFields for the planId planId = this.getCurrentNodeParameter('updateFields.planId') as string; @@ -263,8 +263,8 @@ export class MicrosoftTeams implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'channel') { diff --git a/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts b/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts index 7b9688efb1..924ce0f368 100644 --- a/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts +++ b/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts @@ -96,8 +96,8 @@ export class MicrosoftToDo implements INodeType { const qs: IDataObject = {}; let responseData; const timezone = this.getTimezone(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'linkedResource') { diff --git a/packages/nodes-base/nodes/Mindee/GenericFunctions.ts b/packages/nodes-base/nodes/Mindee/GenericFunctions.ts index e6fa518e3c..a23bb4714d 100644 --- a/packages/nodes-base/nodes/Mindee/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mindee/GenericFunctions.ts @@ -13,7 +13,7 @@ export async function mindeeApiRequest( option = {}, // tslint:disable-next-line:no-any ): Promise { - const resource = this.getNodeParameter('resource', 0) as string; + const resource = this.getNodeParameter('resource', 0); let service; diff --git a/packages/nodes-base/nodes/Mindee/Mindee.node.ts b/packages/nodes-base/nodes/Mindee/Mindee.node.ts index 71d92b3ee4..db8a230fe8 100644 --- a/packages/nodes-base/nodes/Mindee/Mindee.node.ts +++ b/packages/nodes-base/nodes/Mindee/Mindee.node.ts @@ -154,8 +154,8 @@ export class Mindee implements INodeType { const length = items.length; let responseData; const version = this.getNodeParameter('apiVersion', 0) as number; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let endpoint; for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Misp/Misp.node.ts b/packages/nodes-base/nodes/Misp/Misp.node.ts index 55f875546b..9e316631e4 100644 --- a/packages/nodes-base/nodes/Misp/Misp.node.ts +++ b/packages/nodes-base/nodes/Misp/Misp.node.ts @@ -171,8 +171,8 @@ export class Misp implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; diff --git a/packages/nodes-base/nodes/Mocean/Mocean.node.ts b/packages/nodes-base/nodes/Mocean/Mocean.node.ts index 0a251ec76c..b389f28604 100644 --- a/packages/nodes-base/nodes/Mocean/Mocean.node.ts +++ b/packages/nodes-base/nodes/Mocean/Mocean.node.ts @@ -235,8 +235,8 @@ export class Mocean implements INodeType { body = {}; qs = {}; try { - resource = this.getNodeParameter('resource', itemIndex, '') as string; - operation = this.getNodeParameter('operation', itemIndex, '') as string; + resource = this.getNodeParameter('resource', itemIndex, ''); + operation = this.getNodeParameter('operation', itemIndex, ''); text = this.getNodeParameter('message', itemIndex, '') as string; requestMethod = 'POST'; body['mocean-from'] = this.getNodeParameter('from', itemIndex, '') as string; diff --git a/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts b/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts index 4e43d270bc..1c874249e0 100644 --- a/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts +++ b/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts @@ -230,8 +230,8 @@ export class MondayCom implements INodeType { const returnData: INodeExecutionData[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'board') { diff --git a/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts b/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts index df709bccae..67187e4278 100644 --- a/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts +++ b/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts @@ -88,7 +88,7 @@ export class MongoDb implements INodeType { let responseData: IDataObject | IDataObject[] = []; const items = this.getInputData(); - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (operation === 'aggregate') { // ---------------------------------- diff --git a/packages/nodes-base/nodes/MonicaCrm/MonicaCrm.node.ts b/packages/nodes-base/nodes/MonicaCrm/MonicaCrm.node.ts index dc7aee71d8..1dd5bf8dc2 100644 --- a/packages/nodes-base/nodes/MonicaCrm/MonicaCrm.node.ts +++ b/packages/nodes-base/nodes/MonicaCrm/MonicaCrm.node.ts @@ -211,8 +211,8 @@ export class MonicaCrm implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; diff --git a/packages/nodes-base/nodes/MySql/MySql.node.ts b/packages/nodes-base/nodes/MySql/MySql.node.ts index f24c62ca45..04dd0918b5 100644 --- a/packages/nodes-base/nodes/MySql/MySql.node.ts +++ b/packages/nodes-base/nodes/MySql/MySql.node.ts @@ -278,7 +278,7 @@ export class MySql implements INodeType { const credentials = await this.getCredentials('mySql'); const connection = await createConnection(credentials); const items = this.getInputData(); - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); let returnItems: INodeExecutionData[] = []; if (operation === 'executeQuery') { diff --git a/packages/nodes-base/nodes/N8nTrainingCustomerDatastore/N8nTrainingCustomerDatastore.node.ts b/packages/nodes-base/nodes/N8nTrainingCustomerDatastore/N8nTrainingCustomerDatastore.node.ts index 54b022b345..20d39ce0ae 100644 --- a/packages/nodes-base/nodes/N8nTrainingCustomerDatastore/N8nTrainingCustomerDatastore.node.ts +++ b/packages/nodes-base/nodes/N8nTrainingCustomerDatastore/N8nTrainingCustomerDatastore.node.ts @@ -113,7 +113,7 @@ export class N8nTrainingCustomerDatastore implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; const length = items.length; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); let responseData; for (let i = 0; i < length; i++) { diff --git a/packages/nodes-base/nodes/Nasa/Nasa.node.ts b/packages/nodes-base/nodes/Nasa/Nasa.node.ts index 059d7ed0c4..872b536b12 100644 --- a/packages/nodes-base/nodes/Nasa/Nasa.node.ts +++ b/packages/nodes-base/nodes/Nasa/Nasa.node.ts @@ -850,8 +850,8 @@ export class Nasa implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; const qs: IDataObject = {}; diff --git a/packages/nodes-base/nodes/Netlify/Netlify.node.ts b/packages/nodes-base/nodes/Netlify/Netlify.node.ts index 527d41d9d3..7947b289bd 100644 --- a/packages/nodes-base/nodes/Netlify/Netlify.node.ts +++ b/packages/nodes-base/nodes/Netlify/Netlify.node.ts @@ -84,8 +84,8 @@ export class Netlify implements INodeType { const returnData: INodeExecutionData[] = []; const qs: IDataObject = {}; const body: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts b/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts index 6d1f974a50..688efd2842 100644 --- a/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts +++ b/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts @@ -871,8 +871,8 @@ export class NextCloud implements INodeType { credentials = await this.getCredentials('nextCloudOAuth2Api'); } - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let endpoint = ''; let requestMethod = ''; diff --git a/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts b/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts index d72f6c6ad0..7c659ae706 100644 --- a/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts +++ b/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts @@ -209,8 +209,8 @@ export class NocoDB implements INodeType { let responseData; const version = this.getNodeParameter('version', 0) as number; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let returnAll = false; let requestMethod = ''; diff --git a/packages/nodes-base/nodes/Notion/GenericFunctions.ts b/packages/nodes-base/nodes/Notion/GenericFunctions.ts index 79bbf43798..80fe60474d 100644 --- a/packages/nodes-base/nodes/Notion/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Notion/GenericFunctions.ts @@ -82,7 +82,7 @@ export async function notionApiRequestAllItems( query: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { - const resource = this.getNodeParameter('resource', 0) as string; + const resource = this.getNodeParameter('resource', 0); const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts b/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts index b1a4a513f8..ce484e605b 100644 --- a/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts +++ b/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts @@ -232,8 +232,8 @@ export class NotionV1 implements INodeType { const qs: IDataObject = {}; const timezone = this.getTimezone(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); if (resource === 'block') { if (operation === 'append') { diff --git a/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts b/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts index 027bb18044..4852827b1d 100644 --- a/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts +++ b/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts @@ -238,8 +238,8 @@ export class NotionV2 implements INodeType { const qs: IDataObject = {}; const timezone = this.getTimezone(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let download = false; if (resource === 'block') { diff --git a/packages/nodes-base/nodes/Odoo/Odoo.node.ts b/packages/nodes-base/nodes/Odoo/Odoo.node.ts index b77fa4ed71..8016d03c18 100644 --- a/packages/nodes-base/nodes/Odoo/Odoo.node.ts +++ b/packages/nodes-base/nodes/Odoo/Odoo.node.ts @@ -301,8 +301,8 @@ export class Odoo implements INodeType { const returnData: IDataObject[] = []; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const credentials = await this.getCredentials('odooApi'); const url = (credentials.url as string).replace(/\/$/, ''); diff --git a/packages/nodes-base/nodes/OneSimpleApi/OneSimpleApi.node.ts b/packages/nodes-base/nodes/OneSimpleApi/OneSimpleApi.node.ts index b85809e1a9..d59703acfc 100644 --- a/packages/nodes-base/nodes/OneSimpleApi/OneSimpleApi.node.ts +++ b/packages/nodes-base/nodes/OneSimpleApi/OneSimpleApi.node.ts @@ -657,8 +657,8 @@ export class OneSimpleApi implements INodeType { let download; for (let i = 0; i < length; i++) { try { - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); if (resource === 'website') { if (operation === 'pdf') { diff --git a/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts b/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts index 7542142db0..ec1516cbc4 100644 --- a/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts +++ b/packages/nodes-base/nodes/Onfleet/Onfleet.node.ts @@ -175,8 +175,8 @@ export class Onfleet implements INodeType { }; async execute(this: IExecuteFunctions): Promise { - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const items = this.getInputData(); const operations: { [key: string]: Function } = { diff --git a/packages/nodes-base/nodes/OpenThesaurus/OpenThesaurus.node.ts b/packages/nodes-base/nodes/OpenThesaurus/OpenThesaurus.node.ts index 1f4c71a050..de56f64518 100644 --- a/packages/nodes-base/nodes/OpenThesaurus/OpenThesaurus.node.ts +++ b/packages/nodes-base/nodes/OpenThesaurus/OpenThesaurus.node.ts @@ -139,7 +139,7 @@ export class OpenThesaurus implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/OpenWeatherMap/OpenWeatherMap.node.ts b/packages/nodes-base/nodes/OpenWeatherMap/OpenWeatherMap.node.ts index 9ecc0c5404..a2e8d08226 100644 --- a/packages/nodes-base/nodes/OpenWeatherMap/OpenWeatherMap.node.ts +++ b/packages/nodes-base/nodes/OpenWeatherMap/OpenWeatherMap.node.ts @@ -199,7 +199,7 @@ export class OpenWeatherMap implements INodeType { const credentials = await this.getCredentials('openWeatherMapApi'); - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); let endpoint = ''; let locationSelection; diff --git a/packages/nodes-base/nodes/Orbit/Orbit.node.ts b/packages/nodes-base/nodes/Orbit/Orbit.node.ts index c7848db456..6c40dbeb05 100644 --- a/packages/nodes-base/nodes/Orbit/Orbit.node.ts +++ b/packages/nodes-base/nodes/Orbit/Orbit.node.ts @@ -115,8 +115,8 @@ export class Orbit implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'activity') { diff --git a/packages/nodes-base/nodes/Oura/Oura.node.ts b/packages/nodes-base/nodes/Oura/Oura.node.ts index 814e9f29f2..a68b50c2de 100644 --- a/packages/nodes-base/nodes/Oura/Oura.node.ts +++ b/packages/nodes-base/nodes/Oura/Oura.node.ts @@ -61,8 +61,8 @@ export class Oura implements INodeType { let responseData; const returnData: IDataObject[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'profile') { diff --git a/packages/nodes-base/nodes/Paddle/Paddle.node.ts b/packages/nodes-base/nodes/Paddle/Paddle.node.ts index fad5833b00..25acca4e10 100644 --- a/packages/nodes-base/nodes/Paddle/Paddle.node.ts +++ b/packages/nodes-base/nodes/Paddle/Paddle.node.ts @@ -169,8 +169,8 @@ export class Paddle implements INodeType { const length = items.length; let responseData; const body: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'coupon') { diff --git a/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts b/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts index 9134e5518f..d66a375b97 100644 --- a/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts +++ b/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts @@ -207,8 +207,8 @@ export class PagerDuty implements INodeType { const length = items.length; let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'incident') { diff --git a/packages/nodes-base/nodes/PayPal/PayPal.node.ts b/packages/nodes-base/nodes/PayPal/PayPal.node.ts index 58ff379fd1..b16009c3da 100644 --- a/packages/nodes-base/nodes/PayPal/PayPal.node.ts +++ b/packages/nodes-base/nodes/PayPal/PayPal.node.ts @@ -135,8 +135,8 @@ export class PayPal implements INodeType { let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Peekalink/Peekalink.node.ts b/packages/nodes-base/nodes/Peekalink/Peekalink.node.ts index a28fdc4658..0a4cc1708c 100644 --- a/packages/nodes-base/nodes/Peekalink/Peekalink.node.ts +++ b/packages/nodes-base/nodes/Peekalink/Peekalink.node.ts @@ -62,7 +62,7 @@ export class Peekalink implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts b/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts index ffa0a7dfd9..ea3934a3b9 100644 --- a/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts +++ b/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts @@ -106,8 +106,8 @@ export class Phantombuster implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'agent') { diff --git a/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts b/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts index 34d1307c57..db5cf97f56 100644 --- a/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts +++ b/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts @@ -91,8 +91,8 @@ export class PhilipsHue implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'light') { if (operation === 'update') { diff --git a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts index c836f6e0ae..3ba1eae4ae 100644 --- a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts +++ b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts @@ -4034,8 +4034,8 @@ export class Pipedrive implements INodeType { let endpoint: string; let returnAll = false; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let customProperties: ICustomProperties | undefined; if ( diff --git a/packages/nodes-base/nodes/Plivo/Plivo.node.ts b/packages/nodes-base/nodes/Plivo/Plivo.node.ts index 8fa16224b4..5747d34c9c 100644 --- a/packages/nodes-base/nodes/Plivo/Plivo.node.ts +++ b/packages/nodes-base/nodes/Plivo/Plivo.node.ts @@ -67,8 +67,8 @@ export class Plivo implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { let responseData; diff --git a/packages/nodes-base/nodes/PostHog/PostHog.node.ts b/packages/nodes-base/nodes/PostHog/PostHog.node.ts index 6e173f8a69..5a74493c3d 100644 --- a/packages/nodes-base/nodes/PostHog/PostHog.node.ts +++ b/packages/nodes-base/nodes/PostHog/PostHog.node.ts @@ -76,8 +76,8 @@ export class PostHog implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); if (resource === 'alias') { if (operation === 'create') { diff --git a/packages/nodes-base/nodes/Postgres/Postgres.node.ts b/packages/nodes-base/nodes/Postgres/Postgres.node.ts index bd72e7f8f6..4df919a462 100644 --- a/packages/nodes-base/nodes/Postgres/Postgres.node.ts +++ b/packages/nodes-base/nodes/Postgres/Postgres.node.ts @@ -361,7 +361,7 @@ export class Postgres implements INodeType { let returnItems: INodeExecutionData[] = []; const items = this.getInputData(); - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (operation === 'executeQuery') { // ---------------------------------- diff --git a/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts b/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts index d34aae74ff..375bc540c5 100644 --- a/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts +++ b/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts @@ -88,8 +88,8 @@ export class ProfitWell implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'company') { diff --git a/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts b/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts index 3e65c05cfd..0afc714457 100644 --- a/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts +++ b/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts @@ -376,8 +376,8 @@ export class Pushbullet implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'push') { diff --git a/packages/nodes-base/nodes/Pushcut/Pushcut.node.ts b/packages/nodes-base/nodes/Pushcut/Pushcut.node.ts index a47cbc99c7..e86ae56e37 100644 --- a/packages/nodes-base/nodes/Pushcut/Pushcut.node.ts +++ b/packages/nodes-base/nodes/Pushcut/Pushcut.node.ts @@ -169,8 +169,8 @@ export class Pushcut implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'notification') { if (operation === 'send') { diff --git a/packages/nodes-base/nodes/Pushover/Pushover.node.ts b/packages/nodes-base/nodes/Pushover/Pushover.node.ts index 06f5ab7c3c..3d1812be00 100644 --- a/packages/nodes-base/nodes/Pushover/Pushover.node.ts +++ b/packages/nodes-base/nodes/Pushover/Pushover.node.ts @@ -302,8 +302,8 @@ export class Pushover implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'message') { diff --git a/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts b/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts index 880cca4e31..905c2223d0 100644 --- a/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts +++ b/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts @@ -214,7 +214,7 @@ export class QuestDb implements INodeType { let returnItems: INodeExecutionData[] = []; const items = this.getInputData(); - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (operation === 'executeQuery') { // ---------------------------------- diff --git a/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts b/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts index bbba91fcd4..68971c9e39 100644 --- a/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts +++ b/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts @@ -121,8 +121,8 @@ export class QuickBase implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); if (resource === 'field') { if (operation === 'getAll') { diff --git a/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts b/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts index ec0d030907..6572ba2f7c 100644 --- a/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts +++ b/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts @@ -232,7 +232,7 @@ export async function handleBinaryData( resource: string, resourceId: string, ) { - const binaryProperty = this.getNodeParameter('binaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('binaryProperty', i); const fileName = this.getNodeParameter('fileName', i) as string; const endpoint = `/v3/company/${companyId}/${resource}/${resourceId}/pdf`; const data = await quickBooksApiRequest.call(this, 'GET', endpoint, {}, {}, { encoding: null }); diff --git a/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts b/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts index ac5db3316f..4248823a99 100644 --- a/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts +++ b/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts @@ -188,8 +188,8 @@ export class QuickBooks implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; const returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts b/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts index a07081063d..f46bad454f 100644 --- a/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts +++ b/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts @@ -97,8 +97,8 @@ export class Raindrop implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Reddit/GenericFunctions.ts b/packages/nodes-base/nodes/Reddit/GenericFunctions.ts index 55d03339b3..c1ce273193 100644 --- a/packages/nodes-base/nodes/Reddit/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Reddit/GenericFunctions.ts @@ -64,8 +64,8 @@ export async function redditApiRequestAllItems( let responseData; const returnData: IDataObject[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const returnAll = this.getNodeParameter('returnAll', 0, false) as boolean; qs.limit = 100; diff --git a/packages/nodes-base/nodes/Reddit/Reddit.node.ts b/packages/nodes-base/nodes/Reddit/Reddit.node.ts index 1bae514086..75ade5a8a5 100644 --- a/packages/nodes-base/nodes/Reddit/Reddit.node.ts +++ b/packages/nodes-base/nodes/Reddit/Reddit.node.ts @@ -91,8 +91,8 @@ export class Reddit implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; const returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Redis/Redis.node.ts b/packages/nodes-base/nodes/Redis/Redis.node.ts index 5a7f5ee804..044ab968d1 100644 --- a/packages/nodes-base/nodes/Redis/Redis.node.ts +++ b/packages/nodes-base/nodes/Redis/Redis.node.ts @@ -670,7 +670,7 @@ export class Redis implements INodeType { const client = redis.createClient(redisOptions); - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); client.on('error', (err: Error) => { client.quit(); diff --git a/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts b/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts index f585342cf9..55fd69af4a 100644 --- a/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts +++ b/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts @@ -368,8 +368,8 @@ export class Rocketchat implements INodeType { const length = items.length; let responseData; const returnData: IDataObject[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'chat') { diff --git a/packages/nodes-base/nodes/Rundeck/Rundeck.node.ts b/packages/nodes-base/nodes/Rundeck/Rundeck.node.ts index 50088d70de..fc3ab4e7fb 100644 --- a/packages/nodes-base/nodes/Rundeck/Rundeck.node.ts +++ b/packages/nodes-base/nodes/Rundeck/Rundeck.node.ts @@ -147,8 +147,8 @@ export class Rundeck implements INodeType { const returnData: IDataObject[] = []; const length = items.length; - const operation = this.getNodeParameter('operation', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; + const operation = this.getNodeParameter('operation', 0); + const resource = this.getNodeParameter('resource', 0); const rundeckApi = new RundeckApi(this); await rundeckApi.init(); diff --git a/packages/nodes-base/nodes/S3/S3.node.ts b/packages/nodes-base/nodes/S3/S3.node.ts index ae31b1a6ce..db7fdfb26d 100644 --- a/packages/nodes-base/nodes/S3/S3.node.ts +++ b/packages/nodes-base/nodes/S3/S3.node.ts @@ -84,8 +84,8 @@ export class S3 implements INodeType { const returnData: INodeExecutionData[] = []; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { const headers: IDataObject = {}; diff --git a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts index a8537c1d93..f300a9a0ab 100644 --- a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts +++ b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts @@ -383,7 +383,7 @@ export class Salesforce implements INodeType { // select them easily async getCustomFields(this: ILoadOptionsFunctions): Promise { const returnData: INodePropertyOptions[] = []; - const resource = this.getNodeParameter('resource', 0) as string; + const resource = this.getNodeParameter('resource', 0); // TODO: find a way to filter this object to get just the lead sources instead of the whole object const { fields } = await salesforceApiRequest.call( this, @@ -407,7 +407,7 @@ export class Salesforce implements INodeType { // select them easily async getRecordTypes(this: ILoadOptionsFunctions): Promise { const returnData: INodePropertyOptions[] = []; - let resource = this.getNodeParameter('resource', 0) as string; + let resource = this.getNodeParameter('resource', 0); if (resource === 'customObject') { resource = this.getNodeParameter('customObject', 0) as string; } @@ -1065,8 +1065,8 @@ export class Salesforce implements INodeType { const returnData: INodeExecutionData[] = []; let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); Logger.debug( `Running "Salesforce" node named "${this.getNode.name}" resource "${resource}" operation "${operation}"`, diff --git a/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts b/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts index 9f3f7d0520..92bab924c3 100644 --- a/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts +++ b/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts @@ -137,8 +137,8 @@ export class Salesmate implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'company') { if (operation === 'create') { diff --git a/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts b/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts index fa41437c7c..81f9d0fb2d 100644 --- a/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts +++ b/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts @@ -136,8 +136,8 @@ export class SeaTable implements INodeType { const returnData: INodeExecutionData[] = []; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const body: IDataObject = {}; const qs: IDataObject = {}; diff --git a/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts b/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts index dd6ae26192..d712117d25 100644 --- a/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts +++ b/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts @@ -103,8 +103,8 @@ export class SecurityScorecard implements INodeType { let responseData; const length = items.length; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'portfolio') { diff --git a/packages/nodes-base/nodes/Segment/Segment.node.ts b/packages/nodes-base/nodes/Segment/Segment.node.ts index 3f66095c12..6df4c76280 100644 --- a/packages/nodes-base/nodes/Segment/Segment.node.ts +++ b/packages/nodes-base/nodes/Segment/Segment.node.ts @@ -75,8 +75,8 @@ export class Segment implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts b/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts index 9ee4a9972b..08c3ceee3f 100644 --- a/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts +++ b/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts @@ -138,8 +138,8 @@ export class SendGrid implements INodeType { let responseData; const timezone = this.getTimezone(); const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); // https://sendgrid.com/docs/api-reference/ if (resource === 'contact') { if (operation === 'getAll') { diff --git a/packages/nodes-base/nodes/Sendy/Sendy.node.ts b/packages/nodes-base/nodes/Sendy/Sendy.node.ts index 89122227be..90f75a6115 100644 --- a/packages/nodes-base/nodes/Sendy/Sendy.node.ts +++ b/packages/nodes-base/nodes/Sendy/Sendy.node.ts @@ -66,8 +66,8 @@ export class Sendy implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'campaign') { if (operation === 'create') { diff --git a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts index f392c80efe..4dc545f6fe 100644 --- a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts +++ b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts @@ -287,8 +287,8 @@ export class SentryIo implements INodeType { const length = items.length; let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts index eec4c1021e..85d485cf14 100644 --- a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts +++ b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts @@ -251,8 +251,8 @@ export class ServiceNow implements INodeType { }, async getUsers(this: ILoadOptionsFunctions): Promise { const returnData: INodePropertyOptions[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const qs = { sysparm_fields: 'sys_id,user_name', @@ -509,8 +509,8 @@ export class ServiceNow implements INodeType { const length = items.length; let responseData = {}; let qs: IDataObject; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Shopify/Shopify.node.ts b/packages/nodes-base/nodes/Shopify/Shopify.node.ts index fd7ad544d2..0123663f62 100644 --- a/packages/nodes-base/nodes/Shopify/Shopify.node.ts +++ b/packages/nodes-base/nodes/Shopify/Shopify.node.ts @@ -165,8 +165,8 @@ export class Shopify implements INodeType { const length = items.length; let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'order') { diff --git a/packages/nodes-base/nodes/Signl4/Signl4.node.ts b/packages/nodes-base/nodes/Signl4/Signl4.node.ts index 28d42f3511..2fde99f96f 100644 --- a/packages/nodes-base/nodes/Signl4/Signl4.node.ts +++ b/packages/nodes-base/nodes/Signl4/Signl4.node.ts @@ -234,8 +234,8 @@ export class Signl4 implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'alert') { diff --git a/packages/nodes-base/nodes/Slack/GenericFunctions.ts b/packages/nodes-base/nodes/Slack/GenericFunctions.ts index b4dfcdac2d..d6ae5b7e82 100644 --- a/packages/nodes-base/nodes/Slack/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Slack/GenericFunctions.ts @@ -57,9 +57,10 @@ export async function slackApiRequest( if (response.error === 'paid_teams_only') { throw new NodeOperationError( this.getNode(), - `Your current Slack plan does not include the resource '${ - this.getNodeParameter('resource', 0) as string - }'`, + `Your current Slack plan does not include the resource '${this.getNodeParameter( + 'resource', + 0, + )}'`, { description: `Hint: Upgrate to the Slack plan that includes the funcionality you want to use.`, }, diff --git a/packages/nodes-base/nodes/Slack/Slack.node.ts b/packages/nodes-base/nodes/Slack/Slack.node.ts index 14d54846ba..96c8ae6e25 100644 --- a/packages/nodes-base/nodes/Slack/Slack.node.ts +++ b/packages/nodes-base/nodes/Slack/Slack.node.ts @@ -266,8 +266,8 @@ export class Slack implements INodeType { let qs: IDataObject; let responseData; const authentication = this.getNodeParameter('authentication', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts b/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts index 2e566a6e31..0d9a823c24 100644 --- a/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts +++ b/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts @@ -166,7 +166,7 @@ export class Snowflake implements INodeType { await connect(connection); const items = this.getInputData(); - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (operation === 'executeQuery') { // ---------------------------------- diff --git a/packages/nodes-base/nodes/Splunk/Splunk.node.ts b/packages/nodes-base/nodes/Splunk/Splunk.node.ts index 474f6e592a..e95ea6bcc3 100644 --- a/packages/nodes-base/nodes/Splunk/Splunk.node.ts +++ b/packages/nodes-base/nodes/Splunk/Splunk.node.ts @@ -159,8 +159,8 @@ export class Splunk implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; diff --git a/packages/nodes-base/nodes/Spontit/Spontit.node.ts b/packages/nodes-base/nodes/Spontit/Spontit.node.ts index 84a4606c24..b3cb09b889 100644 --- a/packages/nodes-base/nodes/Spontit/Spontit.node.ts +++ b/packages/nodes-base/nodes/Spontit/Spontit.node.ts @@ -52,8 +52,8 @@ export class Spontit implements INodeType { const returnData: IDataObject[] = []; const timezone = this.getTimezone(); let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { if (resource === 'push') { diff --git a/packages/nodes-base/nodes/Spotify/Spotify.node.ts b/packages/nodes-base/nodes/Spotify/Spotify.node.ts index d2ad81bb53..3c30c66603 100644 --- a/packages/nodes-base/nodes/Spotify/Spotify.node.ts +++ b/packages/nodes-base/nodes/Spotify/Spotify.node.ts @@ -791,8 +791,8 @@ export class Spotify implements INodeType { let propertyName = ''; let responseData; - const operation = this.getNodeParameter('operation', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; + const operation = this.getNodeParameter('operation', 0); + const resource = this.getNodeParameter('resource', 0); // Set initial values requestMethod = 'GET'; diff --git a/packages/nodes-base/nodes/SpreadsheetFile/SpreadsheetFile.node.ts b/packages/nodes-base/nodes/SpreadsheetFile/SpreadsheetFile.node.ts index 94ac4446f6..fd1417f331 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/SpreadsheetFile.node.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/SpreadsheetFile.node.ts @@ -296,7 +296,7 @@ export class SpreadsheetFile implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); const newItems: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Ssh/Ssh.node.ts b/packages/nodes-base/nodes/Ssh/Ssh.node.ts index 0b5c45ecc7..d7ca1e7151 100644 --- a/packages/nodes-base/nodes/Ssh/Ssh.node.ts +++ b/packages/nodes-base/nodes/Ssh/Ssh.node.ts @@ -247,8 +247,8 @@ export class Ssh implements INodeType { const returnItems: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const authentication = this.getNodeParameter('authentication', 0) as string; const temporaryFiles: string[] = []; diff --git a/packages/nodes-base/nodes/Stackby/Stackby.node.ts b/packages/nodes-base/nodes/Stackby/Stackby.node.ts index 44590ecba3..171258bb09 100644 --- a/packages/nodes-base/nodes/Stackby/Stackby.node.ts +++ b/packages/nodes-base/nodes/Stackby/Stackby.node.ts @@ -177,7 +177,7 @@ export class Stackby implements INodeType { const length = items.length; let responseData; const qs: IDataObject = {}; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (operation === 'read') { for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts b/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts index 3f9583e561..d442f0aa51 100644 --- a/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts +++ b/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts @@ -153,8 +153,8 @@ export class Storyblok implements INodeType { const qs: IDataObject = {}; let responseData; const source = this.getNodeParameter('source', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (source === 'contentApi') { diff --git a/packages/nodes-base/nodes/Strapi/Strapi.node.ts b/packages/nodes-base/nodes/Strapi/Strapi.node.ts index 93c97e6501..1ed5341915 100644 --- a/packages/nodes-base/nodes/Strapi/Strapi.node.ts +++ b/packages/nodes-base/nodes/Strapi/Strapi.node.ts @@ -109,8 +109,8 @@ export class Strapi implements INodeType { const qs: IDataObject = {}; const headers: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const { apiVersion } = await this.getCredentials('strapiApi'); const { jwt } = await getToken.call(this); diff --git a/packages/nodes-base/nodes/Strava/Strava.node.ts b/packages/nodes-base/nodes/Strava/Strava.node.ts index 125aad48ac..3f0c0f59a2 100644 --- a/packages/nodes-base/nodes/Strava/Strava.node.ts +++ b/packages/nodes-base/nodes/Strava/Strava.node.ts @@ -53,8 +53,8 @@ export class Strava implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'activity') { diff --git a/packages/nodes-base/nodes/Stripe/Stripe.node.ts b/packages/nodes-base/nodes/Stripe/Stripe.node.ts index 6597a66770..bd04b18472 100644 --- a/packages/nodes-base/nodes/Stripe/Stripe.node.ts +++ b/packages/nodes-base/nodes/Stripe/Stripe.node.ts @@ -133,8 +133,8 @@ export class Stripe implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; const returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Supabase/Supabase.node.ts b/packages/nodes-base/nodes/Supabase/Supabase.node.ts index b58253b90a..abeeb7dda3 100644 --- a/packages/nodes-base/nodes/Supabase/Supabase.node.ts +++ b/packages/nodes-base/nodes/Supabase/Supabase.node.ts @@ -124,8 +124,8 @@ export class Supabase implements INodeType { const returnData: IDataObject[] = []; const length = items.length; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); if (resource === 'row') { if (operation === 'create') { diff --git a/packages/nodes-base/nodes/Tapfiliate/Tapfiliate.node.ts b/packages/nodes-base/nodes/Tapfiliate/Tapfiliate.node.ts index d4d9c4804f..65703b12f2 100644 --- a/packages/nodes-base/nodes/Tapfiliate/Tapfiliate.node.ts +++ b/packages/nodes-base/nodes/Tapfiliate/Tapfiliate.node.ts @@ -96,8 +96,8 @@ export class Tapfiliate implements INodeType { const qs: IDataObject = {}; let responseData; const returnData: INodeExecutionData[] = []; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'affiliate') { diff --git a/packages/nodes-base/nodes/Telegram/GenericFunctions.ts b/packages/nodes-base/nodes/Telegram/GenericFunctions.ts index 5e78205553..d9235e5f90 100644 --- a/packages/nodes-base/nodes/Telegram/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Telegram/GenericFunctions.ts @@ -68,7 +68,7 @@ export function addAdditionalFields(this: IExecuteFunctions, body: IDataObject, const additionalFields = this.getNodeParameter('additionalFields', index); Object.assign(body, additionalFields); - const operation = this.getNodeParameter('operation', index) as string; + const operation = this.getNodeParameter('operation', index); // Add the reply markup let replyMarkupOption = ''; diff --git a/packages/nodes-base/nodes/Telegram/Telegram.node.ts b/packages/nodes-base/nodes/Telegram/Telegram.node.ts index 13809a84ce..fe00302990 100644 --- a/packages/nodes-base/nodes/Telegram/Telegram.node.ts +++ b/packages/nodes-base/nodes/Telegram/Telegram.node.ts @@ -1683,8 +1683,8 @@ export class Telegram implements INodeType { let requestMethod: string; let endpoint: string; - const operation = this.getNodeParameter('operation', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; + const operation = this.getNodeParameter('operation', 0); + const resource = this.getNodeParameter('resource', 0); const binaryData = this.getNodeParameter('binaryData', 0, false); for (let i = 0; i < items.length; i++) { diff --git a/packages/nodes-base/nodes/TheHive/TheHive.node.ts b/packages/nodes-base/nodes/TheHive/TheHive.node.ts index 890e48a963..827f5e8628 100644 --- a/packages/nodes-base/nodes/TheHive/TheHive.node.ts +++ b/packages/nodes-base/nodes/TheHive/TheHive.node.ts @@ -315,8 +315,8 @@ export class TheHive implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { @@ -914,7 +914,7 @@ export class TheHive implements INodeType { }); } - const binaryPropertyName = this.getNodeParameter('binaryProperty', i) as string; + const binaryPropertyName = this.getNodeParameter('binaryProperty', i); if (item.binary[binaryPropertyName] === undefined) { throw new NodeOperationError( diff --git a/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts b/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts index 7eeb47465d..b1472297d8 100644 --- a/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts +++ b/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts @@ -272,7 +272,7 @@ export class TimescaleDb implements INodeType { let returnItems = []; const items = this.getInputData(); - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); if (operation === 'executeQuery') { // ---------------------------------- diff --git a/packages/nodes-base/nodes/Todoist/v1/TodoistV1.node.ts b/packages/nodes-base/nodes/Todoist/v1/TodoistV1.node.ts index 854bcb1b51..aade484df2 100644 --- a/packages/nodes-base/nodes/Todoist/v1/TodoistV1.node.ts +++ b/packages/nodes-base/nodes/Todoist/v1/TodoistV1.node.ts @@ -702,8 +702,8 @@ export class TodoistV1 implements INodeType { const length = items.length; const service = new TodoistService(); let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'task') { diff --git a/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts b/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts index b014bb33cd..e42b3b5ffb 100644 --- a/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts +++ b/packages/nodes-base/nodes/Todoist/v2/TodoistV2.node.ts @@ -701,8 +701,8 @@ export class TodoistV2 implements INodeType { const length = items.length; const service = new TodoistService(); let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'task') { diff --git a/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts b/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts index a84e86693e..6a3f0bb6f2 100644 --- a/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts +++ b/packages/nodes-base/nodes/TravisCi/TravisCi.node.ts @@ -52,8 +52,8 @@ export class TravisCi implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Trello/Trello.node.ts b/packages/nodes-base/nodes/Trello/Trello.node.ts index 843eabd092..7c6f166e5c 100644 --- a/packages/nodes-base/nodes/Trello/Trello.node.ts +++ b/packages/nodes-base/nodes/Trello/Trello.node.ts @@ -194,8 +194,8 @@ export class Trello implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - const operation = this.getNodeParameter('operation', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; + const operation = this.getNodeParameter('operation', 0); + const resource = this.getNodeParameter('resource', 0); // For Post let body: IDataObject; diff --git a/packages/nodes-base/nodes/Twake/Twake.node.ts b/packages/nodes-base/nodes/Twake/Twake.node.ts index 660d56f20e..1d77b26698 100644 --- a/packages/nodes-base/nodes/Twake/Twake.node.ts +++ b/packages/nodes-base/nodes/Twake/Twake.node.ts @@ -186,8 +186,8 @@ export class Twake implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'message') { if (operation === 'send') { diff --git a/packages/nodes-base/nodes/Twist/Twist.node.ts b/packages/nodes-base/nodes/Twist/Twist.node.ts index d0edb82349..f2d054403c 100644 --- a/packages/nodes-base/nodes/Twist/Twist.node.ts +++ b/packages/nodes-base/nodes/Twist/Twist.node.ts @@ -159,8 +159,8 @@ export class Twist implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'channel') { diff --git a/packages/nodes-base/nodes/Twitter/Twitter.node.ts b/packages/nodes-base/nodes/Twitter/Twitter.node.ts index 7f07794835..42157970f6 100644 --- a/packages/nodes-base/nodes/Twitter/Twitter.node.ts +++ b/packages/nodes-base/nodes/Twitter/Twitter.node.ts @@ -95,8 +95,8 @@ export class Twitter implements INodeType { const returnData: INodeExecutionData[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'directMessage') { diff --git a/packages/nodes-base/nodes/UnleashedSoftware/UnleashedSoftware.node.ts b/packages/nodes-base/nodes/UnleashedSoftware/UnleashedSoftware.node.ts index bd7821b8ce..cec5eca791 100644 --- a/packages/nodes-base/nodes/UnleashedSoftware/UnleashedSoftware.node.ts +++ b/packages/nodes-base/nodes/UnleashedSoftware/UnleashedSoftware.node.ts @@ -69,8 +69,8 @@ export class UnleashedSoftware implements INodeType { let responseData; for (let i = 0; i < length; i++) { - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); //https://apidocs.unleashedsoftware.com/SalesOrders if (resource === 'salesOrder') { diff --git a/packages/nodes-base/nodes/Uplead/Uplead.node.ts b/packages/nodes-base/nodes/Uplead/Uplead.node.ts index a635935ce5..e07b59444c 100644 --- a/packages/nodes-base/nodes/Uplead/Uplead.node.ts +++ b/packages/nodes-base/nodes/Uplead/Uplead.node.ts @@ -60,8 +60,8 @@ export class Uplead implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'person') { diff --git a/packages/nodes-base/nodes/UptimeRobot/UptimeRobot.node.ts b/packages/nodes-base/nodes/UptimeRobot/UptimeRobot.node.ts index 585b58efcb..f0b7a4ecfd 100644 --- a/packages/nodes-base/nodes/UptimeRobot/UptimeRobot.node.ts +++ b/packages/nodes-base/nodes/UptimeRobot/UptimeRobot.node.ts @@ -121,8 +121,8 @@ export class UptimeRobot implements INodeType { const timezone = this.getTimezone(); for (let i = 0; i < length; i++) { try { - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let body: IDataObject = {}; //https://uptimerobot.com/#methods if (resource === 'account') { diff --git a/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenter.node.ts b/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenter.node.ts index bd48412ef0..ddc36cc8ca 100644 --- a/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenter.node.ts +++ b/packages/nodes-base/nodes/Venafi/Datacenter/VenafiTlsProtectDatacenter.node.ts @@ -59,8 +59,8 @@ export class VenafiTlsProtectDatacenter implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'certificate') { @@ -108,7 +108,7 @@ export class VenafiTlsProtectDatacenter implements INodeType { if (operation === 'download') { const certificateDn = this.getNodeParameter('certificateDn', i) as string; const includePrivateKey = this.getNodeParameter('includePrivateKey', i) as boolean; - const binaryProperty = this.getNodeParameter('binaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('binaryProperty', i); const additionalFields = this.getNodeParameter('additionalFields', i); const body: IDataObject = { diff --git a/packages/nodes-base/nodes/Venafi/ProtectCloud/GenericFunctions.ts b/packages/nodes-base/nodes/Venafi/ProtectCloud/GenericFunctions.ts index a2128b7e16..f93ee0c0f8 100644 --- a/packages/nodes-base/nodes/Venafi/ProtectCloud/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Venafi/ProtectCloud/GenericFunctions.ts @@ -18,7 +18,7 @@ export async function venafiApiRequest( option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); const options: OptionsWithUri = { headers: { diff --git a/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloud.node.ts b/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloud.node.ts index 9635d9e651..1cc9398f4d 100644 --- a/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloud.node.ts +++ b/packages/nodes-base/nodes/Venafi/ProtectCloud/VenafiTlsProtectCloud.node.ts @@ -137,8 +137,8 @@ export class VenafiTlsProtectCloud implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'certificateRequest') { @@ -311,7 +311,7 @@ export class VenafiTlsProtectCloud implements INodeType { //https://api.venafi.cloud/webjars/swagger-ui/index.html?configUrl=%2Fv3%2Fapi-docs%2Fswagger-config&urls.primaryName=outagedetection-service#/ if (operation === 'download') { const certificateId = this.getNodeParameter('certificateId', i) as string; - const binaryProperty = this.getNodeParameter('binaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('binaryProperty', i); const downloadItem = this.getNodeParameter('downloadItem', i) as string; const options = this.getNodeParameter('options', i); diff --git a/packages/nodes-base/nodes/Vero/Vero.node.ts b/packages/nodes-base/nodes/Vero/Vero.node.ts index 1ed30fb929..e11b01c9a6 100644 --- a/packages/nodes-base/nodes/Vero/Vero.node.ts +++ b/packages/nodes-base/nodes/Vero/Vero.node.ts @@ -64,8 +64,8 @@ export class Vero implements INodeType { let responseData; for (let i = 0; i < length; i++) { try { - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); //https://developers.getvero.com/?bash#users if (resource === 'user') { //https://developers.getvero.com/?bash#users-identify diff --git a/packages/nodes-base/nodes/Vonage/Vonage.node.ts b/packages/nodes-base/nodes/Vonage/Vonage.node.ts index 59b54c4929..25ce2a0dc7 100644 --- a/packages/nodes-base/nodes/Vonage/Vonage.node.ts +++ b/packages/nodes-base/nodes/Vonage/Vonage.node.ts @@ -399,8 +399,8 @@ export class Vonage implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'sms') { diff --git a/packages/nodes-base/nodes/Webflow/Webflow.node.ts b/packages/nodes-base/nodes/Webflow/Webflow.node.ts index 806df2594d..7f90433eac 100644 --- a/packages/nodes-base/nodes/Webflow/Webflow.node.ts +++ b/packages/nodes-base/nodes/Webflow/Webflow.node.ts @@ -133,8 +133,8 @@ export class Webflow implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); let responseData; const returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Wekan/Wekan.node.ts b/packages/nodes-base/nodes/Wekan/Wekan.node.ts index 8f5a163e29..c8ef0a90ee 100644 --- a/packages/nodes-base/nodes/Wekan/Wekan.node.ts +++ b/packages/nodes-base/nodes/Wekan/Wekan.node.ts @@ -239,8 +239,8 @@ export class Wekan implements INodeType { let returnAll; let limit; - const operation = this.getNodeParameter('operation', 0) as string; - const resource = this.getNodeParameter('resource', 0) as string; + const operation = this.getNodeParameter('operation', 0); + const resource = this.getNodeParameter('resource', 0); // For Post let body: IDataObject; diff --git a/packages/nodes-base/nodes/Wise/Wise.node.ts b/packages/nodes-base/nodes/Wise/Wise.node.ts index f70daa60bd..d4b52dc913 100644 --- a/packages/nodes-base/nodes/Wise/Wise.node.ts +++ b/packages/nodes-base/nodes/Wise/Wise.node.ts @@ -167,8 +167,8 @@ export class Wise implements INodeType { async execute(this: IExecuteFunctions) { const items = this.getInputData(); - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); const timezone = this.getTimezone(); @@ -252,7 +252,7 @@ export class Wise implements INodeType { const data = await wiseApiRequest.call(this, 'GET', endpoint, {}, qs, { encoding: 'arraybuffer', }); - const binaryProperty = this.getNodeParameter('binaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('binaryProperty', i); items[i].binary = items[i].binary ?? {}; items[i].binary![binaryProperty] = await this.helpers.prepareBinaryData( @@ -476,7 +476,7 @@ export class Wise implements INodeType { {}, { encoding: 'arraybuffer' }, ); - const binaryProperty = this.getNodeParameter('binaryProperty', i) as string; + const binaryProperty = this.getNodeParameter('binaryProperty', i); items[i].binary = items[i].binary ?? {}; items[i].binary![binaryProperty] = await this.helpers.prepareBinaryData( diff --git a/packages/nodes-base/nodes/WooCommerce/WooCommerce.node.ts b/packages/nodes-base/nodes/WooCommerce/WooCommerce.node.ts index 51e3b576d8..f9cb92043e 100644 --- a/packages/nodes-base/nodes/WooCommerce/WooCommerce.node.ts +++ b/packages/nodes-base/nodes/WooCommerce/WooCommerce.node.ts @@ -126,8 +126,8 @@ export class WooCommerce implements INodeType { const length = items.length; let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { if (resource === 'customer') { diff --git a/packages/nodes-base/nodes/Wordpress/Wordpress.node.ts b/packages/nodes-base/nodes/Wordpress/Wordpress.node.ts index 0575ed2723..75e8c520bb 100644 --- a/packages/nodes-base/nodes/Wordpress/Wordpress.node.ts +++ b/packages/nodes-base/nodes/Wordpress/Wordpress.node.ts @@ -123,8 +123,8 @@ export class Wordpress implements INodeType { const length = items.length; let responseData; const qs: IDataObject = {}; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { diff --git a/packages/nodes-base/nodes/Xero/Xero.node.ts b/packages/nodes-base/nodes/Xero/Xero.node.ts index 758558354f..0b46037c11 100644 --- a/packages/nodes-base/nodes/Xero/Xero.node.ts +++ b/packages/nodes-base/nodes/Xero/Xero.node.ts @@ -216,8 +216,8 @@ export class Xero implements INodeType { let responseData; for (let i = 0; i < length; i++) { try { - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); //https://developer.xero.com/documentation/api/invoices if (resource === 'invoice') { if (operation === 'create') { diff --git a/packages/nodes-base/nodes/Yourls/Yourls.node.ts b/packages/nodes-base/nodes/Yourls/Yourls.node.ts index 51be4cfcab..7a11df46d1 100644 --- a/packages/nodes-base/nodes/Yourls/Yourls.node.ts +++ b/packages/nodes-base/nodes/Yourls/Yourls.node.ts @@ -52,8 +52,8 @@ export class Yourls implements INodeType { const length = items.length; const qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'url') { diff --git a/packages/nodes-base/nodes/Zammad/Zammad.node.ts b/packages/nodes-base/nodes/Zammad/Zammad.node.ts index c992fb5d2e..959fe3ee14 100644 --- a/packages/nodes-base/nodes/Zammad/Zammad.node.ts +++ b/packages/nodes-base/nodes/Zammad/Zammad.node.ts @@ -320,7 +320,7 @@ export class Zammad implements INodeType { const items = this.getInputData(); const resource = this.getNodeParameter('resource', 0) as ZammadTypes.Resource; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); let responseData; const returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Zendesk/Zendesk.node.ts b/packages/nodes-base/nodes/Zendesk/Zendesk.node.ts index 9ca2749205..3ae8ddcdd4 100644 --- a/packages/nodes-base/nodes/Zendesk/Zendesk.node.ts +++ b/packages/nodes-base/nodes/Zendesk/Zendesk.node.ts @@ -270,8 +270,8 @@ export class Zendesk implements INodeType { let responseData; for (let i = 0; i < length; i++) { try { - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); //https://developer.zendesk.com/api-reference/ticketing/introduction/ if (resource === 'ticket') { //https://developer.zendesk.com/rest_api/docs/support/tickets diff --git a/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts b/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts index e510671fbc..e19788cba0 100644 --- a/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts +++ b/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts @@ -333,7 +333,7 @@ export class ZohoCrm implements INodeType { const returnData: INodeExecutionData[] = []; const resource = this.getNodeParameter('resource', 0) as CamelCaseResource; - const operation = this.getNodeParameter('operation', 0) as string; + const operation = this.getNodeParameter('operation', 0); let responseData; diff --git a/packages/nodes-base/nodes/Zoom/Zoom.node.ts b/packages/nodes-base/nodes/Zoom/Zoom.node.ts index 9d58c0f105..23710f2859 100644 --- a/packages/nodes-base/nodes/Zoom/Zoom.node.ts +++ b/packages/nodes-base/nodes/Zoom/Zoom.node.ts @@ -156,8 +156,8 @@ export class Zoom implements INodeType { const returnData: INodeExecutionData[] = []; let qs: IDataObject = {}; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < items.length; i++) { try { diff --git a/packages/nodes-base/nodes/Zulip/Zulip.node.ts b/packages/nodes-base/nodes/Zulip/Zulip.node.ts index 5fee00c9a6..2134b0e49d 100644 --- a/packages/nodes-base/nodes/Zulip/Zulip.node.ts +++ b/packages/nodes-base/nodes/Zulip/Zulip.node.ts @@ -130,8 +130,8 @@ export class Zulip implements INodeType { const returnData: IDataObject[] = []; const length = items.length; let responseData; - const resource = this.getNodeParameter('resource', 0) as string; - const operation = this.getNodeParameter('operation', 0) as string; + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); for (let i = 0; i < length; i++) { try { if (resource === 'message') { diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index 390b9e2069..3291fd8e5a 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -547,6 +547,10 @@ export interface IGetNodeParameterOptions { } namespace ExecuteFunctions { + namespace StringReturning { + export type NodeParameter = 'binaryProperty' | 'resource' | 'operation'; + } + namespace NumberReturning { export type NodeParameter = 'limit'; } @@ -572,6 +576,12 @@ namespace ExecuteFunctions { itemIndex?: number, ): T['resource']; + getNodeParameter( + parameterName: StringReturning.NodeParameter, + itemIndex: number, + fallbackValue?: string, + options?: IGetNodeParameterOptions, + ): string; getNodeParameter( parameterName: RecordReturning.NodeParameter, itemIndex: number,