diff --git a/packages/@n8n_io/eslint-config/base.js b/packages/@n8n_io/eslint-config/base.js index 0f0093b303..684ae7ba3a 100644 --- a/packages/@n8n_io/eslint-config/base.js +++ b/packages/@n8n_io/eslint-config/base.js @@ -283,11 +283,6 @@ const config = (module.exports = { */ '@typescript-eslint/no-unused-expressions': 'error', - /** - * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md - */ - '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '_' }], - /** * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md */ @@ -367,7 +362,16 @@ const config = (module.exports = { * * Disabled because eslint-plugin-diff fails to catch it. TODO: Revisit. */ - '@typescript-eslint/no-unused-vars': 'warn', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + varsIgnorePattern: '^_', + ignoreRestSiblings: true, + }, + ], // ---------------------------------- // import diff --git a/packages/cli/src/credentials/credentials.service.ee.ts b/packages/cli/src/credentials/credentials.service.ee.ts index cf53cb74dd..c636bb308b 100644 --- a/packages/cli/src/credentials/credentials.service.ee.ts +++ b/packages/cli/src/credentials/credentials.service.ee.ts @@ -1,7 +1,7 @@ /* eslint-disable import/no-cycle */ /* eslint-disable no-param-reassign */ -import { DeleteResult, EntityManager, FindManyOptions, In, Not } from 'typeorm'; -import { Db, ICredentialsDb } from '..'; +import { DeleteResult, EntityManager, In, Not } from 'typeorm'; +import { Db } from '..'; import { RoleService } from '../role/role.service'; import { CredentialsService } from './credentials.service'; diff --git a/packages/cli/src/workflows/workflows.services.ts b/packages/cli/src/workflows/workflows.services.ts index 70dad8ba34..9cae73be3d 100644 --- a/packages/cli/src/workflows/workflows.services.ts +++ b/packages/cli/src/workflows/workflows.services.ts @@ -52,6 +52,7 @@ export class WorkflowsService { workflow: WorkflowEntity, workflowId: string, tags?: string[], + // eslint-disable-next-line @typescript-eslint/no-unused-vars forceSave?: boolean, ): Promise { const shared = await Db.collections.SharedWorkflow.findOne({ diff --git a/packages/nodes-base/.eslintrc.js b/packages/nodes-base/.eslintrc.js index e6204c6ba8..59062ee8fa 100644 --- a/packages/nodes-base/.eslintrc.js +++ b/packages/nodes-base/.eslintrc.js @@ -9,7 +9,7 @@ module.exports = { rules: { // TODO: remove all the following rules - 'eqeqeq': 'off', + eqeqeq: 'off', 'id-denylist': 'off', 'import/extensions': 'off', 'import/order': 'off', @@ -25,10 +25,7 @@ module.exports = { '@typescript-eslint/dot-notation': 'off', '@typescript-eslint/lines-between-class-members': 'off', '@typescript-eslint/member-delimiter-style': 'off', - '@typescript-eslint/naming-convention': [ - 'error', - { selector: 'memberLike', format: null }, - ], + '@typescript-eslint/naming-convention': ['error', { selector: 'memberLike', format: null }], '@typescript-eslint/no-duplicate-imports': 'off', '@typescript-eslint/no-empty-interface': 'off', '@typescript-eslint/no-explicit-any': 'off', @@ -49,7 +46,6 @@ module.exports = { '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/no-unused-expressions': 'off', - '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/no-use-before-define': 'off', '@typescript-eslint/no-var-requires': 'off', '@typescript-eslint/prefer-nullish-coalescing': 'off', @@ -171,4 +167,4 @@ module.exports = { }, }, ], - }; +}; diff --git a/packages/nodes-base/credentials/Aws.credentials.ts b/packages/nodes-base/credentials/Aws.credentials.ts index dc10c02ecf..8269b10268 100644 --- a/packages/nodes-base/credentials/Aws.credentials.ts +++ b/packages/nodes-base/credentials/Aws.credentials.ts @@ -1,5 +1,5 @@ import { Request, sign } from 'aws4'; -import { ICredentialTestRequest, IHttpRequestMethods } from 'n8n-workflow'; +import { ICredentialTestRequest } from 'n8n-workflow'; import { ICredentialDataDecryptedObject, ICredentialType, @@ -369,9 +369,3 @@ export class Aws implements ICredentialType { }, }; } - -function queryToString(params: IDataObject) { - return Object.keys(params) - .map((key) => key + '=' + params[key]) - .join('&'); -} diff --git a/packages/nodes-base/credentials/DropboxApi.credentials.ts b/packages/nodes-base/credentials/DropboxApi.credentials.ts index a1b21423c3..f92e5f3bb9 100644 --- a/packages/nodes-base/credentials/DropboxApi.credentials.ts +++ b/packages/nodes-base/credentials/DropboxApi.credentials.ts @@ -1,6 +1,5 @@ import { IAuthenticateGeneric, - ICredentialTestFunction, ICredentialTestRequest, ICredentialType, INodeProperties, diff --git a/packages/nodes-base/credentials/MailchimpApi.credentials.ts b/packages/nodes-base/credentials/MailchimpApi.credentials.ts index 9a4b9d3b31..c21eb3cace 100644 --- a/packages/nodes-base/credentials/MailchimpApi.credentials.ts +++ b/packages/nodes-base/credentials/MailchimpApi.credentials.ts @@ -1,6 +1,5 @@ import { IAuthenticateGeneric, - ICredentialTestFunctions, ICredentialTestRequest, ICredentialType, INodeProperties, diff --git a/packages/nodes-base/credentials/MattermostApi.credentials.ts b/packages/nodes-base/credentials/MattermostApi.credentials.ts index 335eef8438..a422c3a727 100644 --- a/packages/nodes-base/credentials/MattermostApi.credentials.ts +++ b/packages/nodes-base/credentials/MattermostApi.credentials.ts @@ -1,9 +1,7 @@ import { IAuthenticateGeneric, - ICredentialDataDecryptedObject, ICredentialTestRequest, ICredentialType, - IHttpRequestOptions, INodeProperties, } from 'n8n-workflow'; diff --git a/packages/nodes-base/credentials/MetabaseApi.credentials.ts b/packages/nodes-base/credentials/MetabaseApi.credentials.ts index f6fe0880df..6de56d4764 100644 --- a/packages/nodes-base/credentials/MetabaseApi.credentials.ts +++ b/packages/nodes-base/credentials/MetabaseApi.credentials.ts @@ -4,7 +4,6 @@ import { ICredentialTestRequest, ICredentialType, IHttpRequestHelper, - IHttpRequestOptions, INodeProperties, } from 'n8n-workflow'; diff --git a/packages/nodes-base/credentials/NocoDb.credentials.ts b/packages/nodes-base/credentials/NocoDb.credentials.ts index 85d8141bab..852d3f3be1 100644 --- a/packages/nodes-base/credentials/NocoDb.credentials.ts +++ b/packages/nodes-base/credentials/NocoDb.credentials.ts @@ -1,9 +1,4 @@ -import { - IAuthenticateGeneric, - ICredentialTestRequest, - ICredentialType, - INodeProperties, -} from 'n8n-workflow'; +import { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow'; export class NocoDb implements ICredentialType { name = 'nocoDb'; diff --git a/packages/nodes-base/credentials/NocoDbApiToken.credentials.ts b/packages/nodes-base/credentials/NocoDbApiToken.credentials.ts index 5661928e56..aed28e58ca 100644 --- a/packages/nodes-base/credentials/NocoDbApiToken.credentials.ts +++ b/packages/nodes-base/credentials/NocoDbApiToken.credentials.ts @@ -1,9 +1,4 @@ -import { - IAuthenticateGeneric, - ICredentialTestRequest, - ICredentialType, - INodeProperties, -} from 'n8n-workflow'; +import { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow'; export class NocoDbApiToken implements ICredentialType { name = 'nocoDbApiToken'; diff --git a/packages/nodes-base/credentials/ShopifyApi.credentials.ts b/packages/nodes-base/credentials/ShopifyApi.credentials.ts index 15037ffac2..555ec11f87 100644 --- a/packages/nodes-base/credentials/ShopifyApi.credentials.ts +++ b/packages/nodes-base/credentials/ShopifyApi.credentials.ts @@ -1,6 +1,5 @@ import { BINARY_ENCODING } from 'n8n-core'; import { - IAuthenticateGeneric, ICredentialDataDecryptedObject, ICredentialTestRequest, ICredentialType, diff --git a/packages/nodes-base/credentials/TheHiveApi.credentials.ts b/packages/nodes-base/credentials/TheHiveApi.credentials.ts index 48ee0f023a..1be0c4430c 100644 --- a/packages/nodes-base/credentials/TheHiveApi.credentials.ts +++ b/packages/nodes-base/credentials/TheHiveApi.credentials.ts @@ -1,5 +1,4 @@ import { - IAuthenticate, IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, diff --git a/packages/nodes-base/credentials/TwilioApi.credentials.ts b/packages/nodes-base/credentials/TwilioApi.credentials.ts index 97d53b3eaf..e142244d9a 100644 --- a/packages/nodes-base/credentials/TwilioApi.credentials.ts +++ b/packages/nodes-base/credentials/TwilioApi.credentials.ts @@ -1,11 +1,4 @@ -import { - IAuthenticateGeneric, - ICredentialDataDecryptedObject, - ICredentialTestRequest, - ICredentialType, - IHttpRequestOptions, - INodeProperties, -} from 'n8n-workflow'; +import { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow'; export class TwilioApi implements ICredentialType { name = 'twilioApi'; diff --git a/packages/nodes-base/credentials/VenafiTlsProtectCloudApi.credentials.ts b/packages/nodes-base/credentials/VenafiTlsProtectCloudApi.credentials.ts index 91488a6e9c..8015c8ccc5 100644 --- a/packages/nodes-base/credentials/VenafiTlsProtectCloudApi.credentials.ts +++ b/packages/nodes-base/credentials/VenafiTlsProtectCloudApi.credentials.ts @@ -1,9 +1,7 @@ import { IAuthenticateGeneric, - ICredentialDataDecryptedObject, ICredentialTestRequest, ICredentialType, - IHttpRequestOptions, NodePropertyTypes, } from 'n8n-workflow'; diff --git a/packages/nodes-base/credentials/WhatsAppApi.credentials.ts b/packages/nodes-base/credentials/WhatsAppApi.credentials.ts index fc6296ff57..6ac5e0bbdc 100644 --- a/packages/nodes-base/credentials/WhatsAppApi.credentials.ts +++ b/packages/nodes-base/credentials/WhatsAppApi.credentials.ts @@ -1,11 +1,8 @@ import { IAuthenticateGeneric, - ICredentialDataDecryptedObject, ICredentialTestRequest, ICredentialType, - IHttpRequestOptions, INodeProperties, - NodePropertyTypes, } from 'n8n-workflow'; export class WhatsAppApi implements ICredentialType { diff --git a/packages/nodes-base/nodes/ActiveCampaign/GenericFunctions.ts b/packages/nodes-base/nodes/ActiveCampaign/GenericFunctions.ts index 886f942a57..23b5ffe526 100644 --- a/packages/nodes-base/nodes/ActiveCampaign/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ActiveCampaign/GenericFunctions.ts @@ -1,12 +1,6 @@ import { IExecuteFunctions, IHookFunctions } from 'n8n-core'; -import { - IDataObject, - ILoadOptionsFunctions, - INodeProperties, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, ILoadOptionsFunctions, INodeProperties, NodeApiError } from 'n8n-workflow'; import { OptionsWithUri } from 'request'; diff --git a/packages/nodes-base/nodes/AcuityScheduling/GenericFunctions.ts b/packages/nodes-base/nodes/AcuityScheduling/GenericFunctions.ts index c9d42ea5f7..322d6563fe 100644 --- a/packages/nodes-base/nodes/AcuityScheduling/GenericFunctions.ts +++ b/packages/nodes-base/nodes/AcuityScheduling/GenericFunctions.ts @@ -6,7 +6,7 @@ import { ILoadOptionsFunctions, IWebhookFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function acuitySchedulingApiRequest( this: @@ -21,7 +21,7 @@ export async function acuitySchedulingApiRequest( body: any = {}, qs: IDataObject = {}, uri?: string, - option: IDataObject = {}, + _option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0); diff --git a/packages/nodes-base/nodes/Adalo/Adalo.node.ts b/packages/nodes-base/nodes/Adalo/Adalo.node.ts index a3d7d20c18..208f4c0a09 100644 --- a/packages/nodes-base/nodes/Adalo/Adalo.node.ts +++ b/packages/nodes-base/nodes/Adalo/Adalo.node.ts @@ -2,8 +2,6 @@ import { IDataObject, IExecuteSingleFunctions, IHttpRequestOptions, - IN8nHttpFullResponse, - INodeExecutionData, INodeType, INodeTypeDescription, } from 'n8n-workflow'; diff --git a/packages/nodes-base/nodes/Affinity/GenericFunctions.ts b/packages/nodes-base/nodes/Affinity/GenericFunctions.ts index 7b792269fc..dbbfeed5a9 100644 --- a/packages/nodes-base/nodes/Affinity/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Affinity/GenericFunctions.ts @@ -2,13 +2,7 @@ import { OptionsWithUri } from 'request'; import { BINARY_ENCODING, IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { - IDataObject, - IHookFunctions, - IWebhookFunctions, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, IHookFunctions, IWebhookFunctions, NodeApiError } from 'n8n-workflow'; export async function affinityApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts b/packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts index 4273d0b87a..339e2724c7 100644 --- a/packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts +++ b/packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts @@ -103,7 +103,7 @@ export async function agileCrmApiRequestUpdate( endpoint?: string, // tslint:disable-next-line:no-any body: any = {}, - query: IDataObject = {}, + _query: IDataObject = {}, uri?: string, // tslint:disable-next-line:no-any ): Promise { diff --git a/packages/nodes-base/nodes/Airtable/Airtable.node.ts b/packages/nodes-base/nodes/Airtable/Airtable.node.ts index 4ae888f4e1..188eadacd8 100644 --- a/packages/nodes-base/nodes/Airtable/Airtable.node.ts +++ b/packages/nodes-base/nodes/Airtable/Airtable.node.ts @@ -2,9 +2,7 @@ import { IExecuteFunctions } from 'n8n-core'; import { IDataObject, - ILoadOptionsFunctions, INodeExecutionData, - INodeListSearchResult, INodeType, INodeTypeDescription, NodeOperationError, @@ -12,17 +10,6 @@ import { import { apiRequest, apiRequestAllItems, downloadRecordAttachments } from './GenericFunctions'; -interface AirtableBase { - id: string; - name: string; -} - -interface AirtableTable { - id: string; - name: string; - description: string; -} - export class Airtable implements INodeType { description: INodeTypeDescription = { displayName: 'Airtable', diff --git a/packages/nodes-base/nodes/Airtable/GenericFunctions.ts b/packages/nodes-base/nodes/Airtable/GenericFunctions.ts index 9ae6a3631d..e8ebc4e02a 100644 --- a/packages/nodes-base/nodes/Airtable/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Airtable/GenericFunctions.ts @@ -36,8 +36,6 @@ export async function apiRequest( option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { - const credentials = await this.getCredentials('airtableApi'); - query = query || {}; // For some reason for some endpoints the bearer auth does not work diff --git a/packages/nodes-base/nodes/Autopilot/GenericFunctions.ts b/packages/nodes-base/nodes/Autopilot/GenericFunctions.ts index 872a27176b..b3943e97c8 100644 --- a/packages/nodes-base/nodes/Autopilot/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Autopilot/GenericFunctions.ts @@ -12,7 +12,7 @@ export async function autopilotApiRequest( body: any = {}, query: IDataObject = {}, uri?: string, - option: IDataObject = {}, + _option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('autopilotApi')) as IDataObject; diff --git a/packages/nodes-base/nodes/Aws/AwsLambda.node.ts b/packages/nodes-base/nodes/Aws/AwsLambda.node.ts index f1f544b5f3..4c6603505c 100644 --- a/packages/nodes-base/nodes/Aws/AwsLambda.node.ts +++ b/packages/nodes-base/nodes/Aws/AwsLambda.node.ts @@ -8,7 +8,6 @@ import { INodeTypeDescription, JsonObject, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; import { awsApiRequestREST } from './GenericFunctions'; @@ -191,10 +190,10 @@ export class AwsLambda implements INodeType { ); if (responseData !== null && responseData?.errorMessage !== undefined) { - let errorMessage = responseData.errorMessage; + let _errorMessage = responseData.errorMessage; if (responseData.stackTrace) { - errorMessage += `\n\nStack trace:\n${responseData.stackTrace}`; + _errorMessage += `\n\nStack trace:\n${responseData.stackTrace}`; } throw new NodeApiError(this.getNode(), responseData); diff --git a/packages/nodes-base/nodes/Aws/AwsSns.node.ts b/packages/nodes-base/nodes/Aws/AwsSns.node.ts index 4d6ba5e804..56e0248384 100644 --- a/packages/nodes-base/nodes/Aws/AwsSns.node.ts +++ b/packages/nodes-base/nodes/Aws/AwsSns.node.ts @@ -6,8 +6,6 @@ import { INodePropertyOptions, INodeType, INodeTypeDescription, - NodeApiError, - NodeOperationError, } from 'n8n-workflow'; import { awsApiRequestSOAP } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Aws/Comprehend/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/Comprehend/GenericFunctions.ts index 8c7c76c3b1..78b03c4f8f 100644 --- a/packages/nodes-base/nodes/Aws/Comprehend/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/Comprehend/GenericFunctions.ts @@ -1,9 +1,3 @@ -import { URL } from 'url'; - -import { Request, sign } from 'aws4'; - -import { OptionsWithUri } from 'request'; - import { parseString } from 'xml2js'; import { @@ -13,7 +7,7 @@ import { IWebhookFunctions, } from 'n8n-core'; -import { ICredentialDataDecryptedObject, IHttpRequestOptions, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IHttpRequestOptions, NodeApiError } from 'n8n-workflow'; export async function awsApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, diff --git a/packages/nodes-base/nodes/Aws/DynamoDB/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/DynamoDB/GenericFunctions.ts index 973fb2522d..7426ad9d21 100644 --- a/packages/nodes-base/nodes/Aws/DynamoDB/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/DynamoDB/GenericFunctions.ts @@ -5,13 +5,7 @@ import { IWebhookFunctions, } from 'n8n-core'; -import { - deepCopy, - ICredentialDataDecryptedObject, - IDataObject, - IHttpRequestOptions, - INodeExecutionData, -} from 'n8n-workflow'; +import { deepCopy, IDataObject, IHttpRequestOptions, INodeExecutionData } from 'n8n-workflow'; import { IRequestBody } from './types'; diff --git a/packages/nodes-base/nodes/Aws/ELB/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/ELB/GenericFunctions.ts index 655af70b1a..ac6af43d18 100644 --- a/packages/nodes-base/nodes/Aws/ELB/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/ELB/GenericFunctions.ts @@ -1,10 +1,6 @@ -import { - get, -} from 'lodash'; +import { get } from 'lodash'; -import { - parseString, -} from 'xml2js'; +import { parseString } from 'xml2js'; import { IExecuteFunctions, @@ -13,12 +9,19 @@ import { IWebhookFunctions, } from 'n8n-core'; -import { - IDataObject, IHttpRequestOptions, JsonObject, NodeApiError, -} from 'n8n-workflow'; - -export async function awsApiRequest(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, service: string, method: string, path: string, body?: string | Buffer, query: IDataObject = {}, headers?: object, option: IDataObject = {}, region?: string): Promise { // tslint:disable-line:no-any +import { IDataObject, IHttpRequestOptions, JsonObject, NodeApiError } from 'n8n-workflow'; +export async function awsApiRequest( + this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, + service: string, + method: string, + path: string, + body?: string | Buffer, + query: IDataObject = {}, + headers?: object, + _option: IDataObject = {}, + _region?: string, +) { const credentials = await this.getCredentials('aws'); const requestOptions = { @@ -41,8 +44,28 @@ export async function awsApiRequest(this: IHookFunctions | IExecuteFunctions | I } } -export async function awsApiRequestREST(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, service: string, method: string, path: string, body?: string, query: IDataObject = {}, headers?: object, options: IDataObject = {}, region?: string): Promise { // tslint:disable-line:no-any - const response = await awsApiRequest.call(this, service, method, path, body, query, headers, options, region); +export async function awsApiRequestREST( + this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, + service: string, + method: string, + path: string, + body?: string, + query: IDataObject = {}, + headers?: object, + options: IDataObject = {}, + region?: string, +) { + const response = await awsApiRequest.call( + this, + service, + method, + path, + body, + query, + headers, + options, + region, + ); try { return JSON.parse(response); } catch (e) { @@ -50,8 +73,28 @@ export async function awsApiRequestREST(this: IHookFunctions | IExecuteFunctions } } -export async function awsApiRequestSOAP(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, service: string, method: string, path: string, body?: string | Buffer, query: IDataObject = {}, headers?: object, option: IDataObject = {}, region?: string): Promise { // tslint:disable-line:no-any - const response = await awsApiRequest.call(this, service, method, path, body, query, headers, option, region); +export async function awsApiRequestSOAP( + this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, + service: string, + method: string, + path: string, + body?: string | Buffer, + query: IDataObject = {}, + headers?: object, + option: IDataObject = {}, + region?: string, +) { + const response = await awsApiRequest.call( + this, + service, + method, + path, + body, + query, + headers, + option, + region, + ); try { return await new Promise((resolve, reject) => { parseString(response, { explicitArray: false }, (err, data) => { @@ -66,8 +109,18 @@ export async function awsApiRequestSOAP(this: IHookFunctions | IExecuteFunctions } } -export async function awsApiRequestSOAPAllItems(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, propertyName: string, service: string, method: string, path: string, body?: string, query: IDataObject = {}, headers: IDataObject = {}, option: IDataObject = {}, region?: string): Promise { // tslint:disable-line:no-any - +export async function awsApiRequestSOAPAllItems( + this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, + propertyName: string, + service: string, + method: string, + path: string, + body?: string, + query: IDataObject = {}, + headers: IDataObject = {}, + option: IDataObject = {}, + region?: string, +) { const returnData: IDataObject[] = []; let responseData; @@ -75,10 +128,23 @@ export async function awsApiRequestSOAPAllItems(this: IHookFunctions | IExecuteF const propertyNameArray = propertyName.split('.'); do { - responseData = await awsApiRequestSOAP.call(this, service, method, path, body, query, headers, option, region); + responseData = await awsApiRequestSOAP.call( + this, + service, + method, + path, + body, + query, + headers, + option, + region, + ); if (get(responseData, `${propertyNameArray[0]}.${propertyNameArray[1]}.NextMarker`)) { - query['Marker'] = get(responseData, `${propertyNameArray[0]}.${propertyNameArray[1]}.NextMarker`); + query['Marker'] = get( + responseData, + `${propertyNameArray[0]}.${propertyNameArray[1]}.NextMarker`, + ); } if (get(responseData, propertyName)) { if (Array.isArray(get(responseData, propertyName))) { diff --git a/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts b/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts index fed8951356..3e6d7784cf 100644 --- a/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts +++ b/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts @@ -334,7 +334,6 @@ export class AwsRekognition implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); const returnData: IDataObject[] = []; - const qs: IDataObject = {}; let responseData; const resource = this.getNodeParameter('resource', 0) as string; const operation = this.getNodeParameter('operation', 0) as string; diff --git a/packages/nodes-base/nodes/Aws/Rekognition/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/Rekognition/GenericFunctions.ts index 8ae27202b9..b0207c4137 100644 --- a/packages/nodes-base/nodes/Aws/Rekognition/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/Rekognition/GenericFunctions.ts @@ -1,11 +1,5 @@ -import { URL } from 'url'; - -import { Request, sign } from 'aws4'; - import { get } from 'lodash'; -import { OptionsWithUri } from 'request'; - import { parseString } from 'xml2js'; import { @@ -15,7 +9,7 @@ import { IWebhookFunctions, } from 'n8n-core'; -import { IDataObject, IHttpRequestOptions, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, IHttpRequestOptions, NodeApiError } from 'n8n-workflow'; import { pascalCase } from 'change-case'; @@ -25,10 +19,10 @@ export async function awsApiRequest( method: string, path: string, body?: string | Buffer | IDataObject, - query: IDataObject = {}, + _query: IDataObject = {}, headers?: object, option: IDataObject = {}, - region?: string, + _region?: string, // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('aws'); @@ -177,12 +171,6 @@ export async function awsApiRequestSOAPAllItems( return returnData; } -function queryToString(params: IDataObject) { - return Object.keys(params) - .map((key) => key + '=' + params[key]) - .join('&'); -} - export function keysTPascalCase(object: IDataObject) { const data: IDataObject = {}; for (const key of Object.keys(object)) { diff --git a/packages/nodes-base/nodes/Aws/S3/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/S3/GenericFunctions.ts index 2a27d19dde..2d5a1405ab 100644 --- a/packages/nodes-base/nodes/Aws/S3/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/S3/GenericFunctions.ts @@ -9,12 +9,7 @@ import { IWebhookFunctions, } from 'n8n-core'; -import { - IDataObject, - IHttpRequestOptions, - JsonObject, - NodeApiError, -} from 'n8n-workflow'; +import { IDataObject, IHttpRequestOptions, JsonObject, NodeApiError } from 'n8n-workflow'; export async function awsApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, @@ -25,10 +20,9 @@ export async function awsApiRequest( query: IDataObject = {}, headers?: object, option: IDataObject = {}, - region?: string, + _region?: string, // tslint:disable-next-line:no-any ): Promise { - const credentials = await this.getCredentials('aws'); const requestOptions = { qs: { ...query, @@ -174,9 +168,3 @@ export async function awsApiRequestSOAPAllItems( return returnData; } - -function queryToString(params: IDataObject) { - return Object.keys(params) - .map((key) => key + '=' + params[key]) - .join('&'); -} diff --git a/packages/nodes-base/nodes/Aws/SES/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/SES/GenericFunctions.ts index 71da06b2e4..b44f85f0af 100644 --- a/packages/nodes-base/nodes/Aws/SES/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/SES/GenericFunctions.ts @@ -1,9 +1,3 @@ -import { URL } from 'url'; - -import { Request, sign } from 'aws4'; - -import { OptionsWithUri } from 'request'; - import { parseString } from 'xml2js'; import { @@ -13,7 +7,7 @@ import { IWebhookFunctions, } from 'n8n-core'; -import { IDataObject, IHttpRequestOptions, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, IHttpRequestOptions, NodeApiError } from 'n8n-workflow'; import { get } from 'lodash'; @@ -41,7 +35,7 @@ export async function awsApiRequest( } as IHttpRequestOptions; try { - return await this.helpers.requestWithAuthentication.call(this,'aws', requestOptions); + return await this.helpers.requestWithAuthentication.call(this, 'aws', requestOptions); } catch (error) { throw new NodeApiError(this.getNode(), error, { parseXml: true }); } @@ -96,9 +90,9 @@ export async function awsApiRequestSOAPAllItems( path: string, body?: string, query: IDataObject = {}, - headers: IDataObject = {}, - option: IDataObject = {}, - region?: string, + _headers: IDataObject = {}, + _option: IDataObject = {}, + _region?: string, // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Aws/Textract/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/Textract/GenericFunctions.ts index a9b22f4a5d..8dcb2c4d27 100644 --- a/packages/nodes-base/nodes/Aws/Textract/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/Textract/GenericFunctions.ts @@ -18,7 +18,6 @@ import { ICredentialTestFunctions, IHttpRequestOptions, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; function getEndpointForService( diff --git a/packages/nodes-base/nodes/Aws/Transcribe/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/Transcribe/GenericFunctions.ts index 2d756b90bb..d3e8b6c60e 100644 --- a/packages/nodes-base/nodes/Aws/Transcribe/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/Transcribe/GenericFunctions.ts @@ -11,12 +11,7 @@ import { IWebhookFunctions, } from 'n8n-core'; -import { - ICredentialDataDecryptedObject, - IDataObject, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { ICredentialDataDecryptedObject, IDataObject, NodeApiError } from 'n8n-workflow'; import { get } from 'lodash'; @@ -100,9 +95,9 @@ export async function awsApiRequestRESTAllItems( path: string, body?: string, query: IDataObject = {}, - headers: IDataObject = {}, - option: IDataObject = {}, - region?: string, + _headers: IDataObject = {}, + _option: IDataObject = {}, + _region?: string, // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/getAll/execute.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/getAll/execute.ts index b3537fd36e..cbab3f7232 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employee/getAll/execute.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employee/getAll/execute.ts @@ -6,7 +6,7 @@ import { apiRequest } from '../../../transport'; export async function getAll( this: IExecuteFunctions, - index: number, + _index: number, ): Promise { const body: IDataObject = {}; const requestMethod = 'GET'; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/upload/execute.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/upload/execute.ts index 00e4e20248..d958645128 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/upload/execute.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/employeeDocument/upload/execute.ts @@ -1,4 +1,4 @@ -import { BINARY_ENCODING, IExecuteFunctions } from 'n8n-core'; +import { IExecuteFunctions } from 'n8n-core'; import { IBinaryData, IBinaryKeyData, IDataObject, NodeOperationError } from 'n8n-workflow'; diff --git a/packages/nodes-base/nodes/BambooHr/v1/transport/index.ts b/packages/nodes-base/nodes/BambooHr/v1/transport/index.ts index 6421abf74d..fa8d170b70 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/transport/index.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/transport/index.ts @@ -1,6 +1,6 @@ import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import { OptionsWithUrl } from 'request'; diff --git a/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts b/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts index c0f3dd7d06..11d9c8fef2 100644 --- a/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts +++ b/packages/nodes-base/nodes/Bannerbear/Bannerbear.node.ts @@ -109,7 +109,6 @@ export class Bannerbear implements INodeType { const returnData: IDataObject[] = []; 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; for (let i = 0; i < length; i++) { diff --git a/packages/nodes-base/nodes/Bannerbear/GenericFunctions.ts b/packages/nodes-base/nodes/Bannerbear/GenericFunctions.ts index cc288e7706..f531e1caae 100644 --- a/packages/nodes-base/nodes/Bannerbear/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Bannerbear/GenericFunctions.ts @@ -2,13 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { - IDataObject, - IHookFunctions, - IWebhookFunctions, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, IHookFunctions, IWebhookFunctions, NodeApiError } from 'n8n-workflow'; import { snakeCase } from 'change-case'; diff --git a/packages/nodes-base/nodes/Baserow/GenericFunctions.ts b/packages/nodes-base/nodes/Baserow/GenericFunctions.ts index 5fda24275c..ed9a3ad3a4 100644 --- a/packages/nodes-base/nodes/Baserow/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Baserow/GenericFunctions.ts @@ -2,7 +2,7 @@ import { IExecuteFunctions } from 'n8n-core'; import { OptionsWithUri } from 'request'; -import { IDataObject, ILoadOptionsFunctions, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, ILoadOptionsFunctions, NodeApiError } from 'n8n-workflow'; import { Accumulator, BaserowCredentials, LoadedResource } from './types'; diff --git a/packages/nodes-base/nodes/Beeminder/Beeminder.node.functions.ts b/packages/nodes-base/nodes/Beeminder/Beeminder.node.functions.ts index 8a8b61f8ec..65a3a597cc 100644 --- a/packages/nodes-base/nodes/Beeminder/Beeminder.node.functions.ts +++ b/packages/nodes-base/nodes/Beeminder/Beeminder.node.functions.ts @@ -1,6 +1,6 @@ import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, IHookFunctions, IWebhookFunctions, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, IHookFunctions, IWebhookFunctions } from 'n8n-workflow'; import { beeminderApiRequest, beeminderApiRequestAllItems } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Bitbucket/GenericFunctions.ts b/packages/nodes-base/nodes/Bitbucket/GenericFunctions.ts index 16d24b68e1..df96e4cb48 100644 --- a/packages/nodes-base/nodes/Bitbucket/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Bitbucket/GenericFunctions.ts @@ -5,7 +5,7 @@ import { IHookFunctions, ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function bitbucketApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Bitly/GenericFunctions.ts b/packages/nodes-base/nodes/Bitly/GenericFunctions.ts index a6f6df142b..3386455006 100644 --- a/packages/nodes-base/nodes/Bitly/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Bitly/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function bitlyApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Brandfetch/GenericFunctions.ts b/packages/nodes-base/nodes/Brandfetch/GenericFunctions.ts index 13384fedc3..7c5131e553 100644 --- a/packages/nodes-base/nodes/Brandfetch/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Brandfetch/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function brandfetchApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Bubble/Bubble.node.ts b/packages/nodes-base/nodes/Bubble/Bubble.node.ts index 075d5f6a22..8058b3f855 100644 --- a/packages/nodes-base/nodes/Bubble/Bubble.node.ts +++ b/packages/nodes-base/nodes/Bubble/Bubble.node.ts @@ -2,7 +2,6 @@ import { IExecuteFunctions } from 'n8n-core'; import { IDataObject, - INode, INodeExecutionData, INodeType, INodeTypeDescription, diff --git a/packages/nodes-base/nodes/Chargebee/Chargebee.node.ts b/packages/nodes-base/nodes/Chargebee/Chargebee.node.ts index 4c6d18aa77..0b4b0751de 100644 --- a/packages/nodes-base/nodes/Chargebee/Chargebee.node.ts +++ b/packages/nodes-base/nodes/Chargebee/Chargebee.node.ts @@ -448,7 +448,7 @@ export class Chargebee implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - let item: INodeExecutionData; + let _item: INodeExecutionData; const credentials = await this.getCredentials('chargebeeApi'); @@ -461,7 +461,7 @@ export class Chargebee implements INodeType { for (let i = 0; i < items.length; i++) { try { - item = items[i]; + _item = items[i]; const resource = this.getNodeParameter('resource', i) as string; const operation = this.getNodeParameter('operation', i) as string; diff --git a/packages/nodes-base/nodes/CircleCi/GenericFunctions.ts b/packages/nodes-base/nodes/CircleCi/GenericFunctions.ts index ee9eb11a81..5187874b80 100644 --- a/packages/nodes-base/nodes/CircleCi/GenericFunctions.ts +++ b/packages/nodes-base/nodes/CircleCi/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function circleciApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebexTrigger.node.ts b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebexTrigger.node.ts index f07f8f1855..90143f02f4 100644 --- a/packages/nodes-base/nodes/Cisco/Webex/CiscoWebexTrigger.node.ts +++ b/packages/nodes-base/nodes/Cisco/Webex/CiscoWebexTrigger.node.ts @@ -1,12 +1,6 @@ import { IHookFunctions, IWebhookFunctions } from 'n8n-core'; -import { - IDataObject, - INodeType, - INodeTypeDescription, - IWebhookResponseData, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow'; import { getAutomaticSecret, diff --git a/packages/nodes-base/nodes/Clearbit/GenericFunctions.ts b/packages/nodes-base/nodes/Clearbit/GenericFunctions.ts index 90e24f8556..1acfc63f63 100644 --- a/packages/nodes-base/nodes/Clearbit/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Clearbit/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function clearbitApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/ClickUp/GenericFunctions.ts b/packages/nodes-base/nodes/ClickUp/GenericFunctions.ts index e974426932..77c9e25313 100644 --- a/packages/nodes-base/nodes/ClickUp/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ClickUp/GenericFunctions.ts @@ -23,7 +23,7 @@ export async function clickupApiRequest( body: any = {}, qs: IDataObject = {}, uri?: string, - option: IDataObject = {}, + _option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { diff --git a/packages/nodes-base/nodes/Clockify/GenericFunctions.ts b/packages/nodes-base/nodes/Clockify/GenericFunctions.ts index 7bb9059f90..9c4a81def6 100644 --- a/packages/nodes-base/nodes/Clockify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Clockify/GenericFunctions.ts @@ -12,7 +12,7 @@ export async function clockifyApiRequest( body: any = {}, qs: IDataObject = {}, uri?: string, - option: IDataObject = {}, + _option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { const BASE_URL = 'https://api.clockify.me/api/v1'; diff --git a/packages/nodes-base/nodes/Cockpit/GenericFunctions.ts b/packages/nodes-base/nodes/Cockpit/GenericFunctions.ts index acd3582787..db4188b9ae 100644 --- a/packages/nodes-base/nodes/Cockpit/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Cockpit/GenericFunctions.ts @@ -1,5 +1,5 @@ import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, jsonParse, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, jsonParse, NodeApiError } from 'n8n-workflow'; import { OptionsWithUri } from 'request'; export async function cockpitApiRequest( diff --git a/packages/nodes-base/nodes/Coda/GenericFunctions.ts b/packages/nodes-base/nodes/Coda/GenericFunctions.ts index f3c9e536e1..fc6ccfb83b 100644 --- a/packages/nodes-base/nodes/Coda/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Coda/GenericFunctions.ts @@ -1,6 +1,6 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function codaApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Contentful/GenericFunctions.ts b/packages/nodes-base/nodes/Contentful/GenericFunctions.ts index c3f90a6f2e..a00d3584a4 100644 --- a/packages/nodes-base/nodes/Contentful/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Contentful/GenericFunctions.ts @@ -2,7 +2,7 @@ import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } fro import { OptionsWithUri } from 'request'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function contentfulApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, @@ -12,7 +12,7 @@ export async function contentfulApiRequest( body: any = {}, qs: IDataObject = {}, uri?: string, - option: IDataObject = {}, + _option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('contentfulApi'); diff --git a/packages/nodes-base/nodes/ConvertKit/GenericFunctions.ts b/packages/nodes-base/nodes/ConvertKit/GenericFunctions.ts index e121a3eab8..922f55e6be 100644 --- a/packages/nodes-base/nodes/ConvertKit/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ConvertKit/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, IHookFunctions, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, IHookFunctions, NodeApiError } from 'n8n-workflow'; export async function convertKitApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IHookFunctions, diff --git a/packages/nodes-base/nodes/Cortex/Cortex.node.ts b/packages/nodes-base/nodes/Cortex/Cortex.node.ts index 300949e648..09753dc327 100644 --- a/packages/nodes-base/nodes/Cortex/Cortex.node.ts +++ b/packages/nodes-base/nodes/Cortex/Cortex.node.ts @@ -165,7 +165,6 @@ export class Cortex implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; 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; diff --git a/packages/nodes-base/nodes/Cortex/GenericFunctions.ts b/packages/nodes-base/nodes/Cortex/GenericFunctions.ts index 722cda2199..c97ea4f6bc 100644 --- a/packages/nodes-base/nodes/Cortex/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Cortex/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import moment from 'moment'; diff --git a/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts b/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts index 1e78f7df3c..105a733ac8 100644 --- a/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts +++ b/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts @@ -373,7 +373,7 @@ export class CrateDb implements INodeType { pgp.helpers.update(itemCopy, cs) + pgp.as.format(where, itemCopy) + returning, ); } - const updateItems = await db.multi(pgp.helpers.concat(queries)); + const _updateItems = await db.multi(pgp.helpers.concat(queries)); returnItems = this.helpers.returnJsonArray(getItemsCopy(items, columns) as IDataObject[]); } } else { diff --git a/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts b/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts index 81e1d652ba..06f70c5090 100644 --- a/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts +++ b/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts @@ -1,14 +1,6 @@ import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { OptionsWithUri } from 'request'; - -import { - IDataObject, - IHttpRequestMethods, - IHttpRequestOptions, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, IHttpRequestMethods, IHttpRequestOptions, NodeApiError } from 'n8n-workflow'; import { get } from 'lodash'; @@ -18,11 +10,9 @@ export async function customerIoApiRequest( endpoint: string, body: object, baseApi?: string, - query?: IDataObject, - // tslint:disable-next-line:no-any -): Promise { + _query?: IDataObject, +) { const credentials = await this.getCredentials('customerIoApi'); - query = query || {}; const options: IHttpRequestOptions = { headers: { 'Content-Type': 'application/json', diff --git a/packages/nodes-base/nodes/DeepL/DeepL.node.ts b/packages/nodes-base/nodes/DeepL/DeepL.node.ts index c61f844ded..fe3248c2d4 100644 --- a/packages/nodes-base/nodes/DeepL/DeepL.node.ts +++ b/packages/nodes-base/nodes/DeepL/DeepL.node.ts @@ -7,7 +7,6 @@ import { INodePropertyOptions, INodeType, INodeTypeDescription, - NodeExecutionWithMetadata, } from 'n8n-workflow'; import { deepLApiRequest } from './GenericFunctions'; @@ -132,10 +131,9 @@ export class DeepL implements INodeType { const { translations } = await deepLApiRequest.call(this, 'GET', '/translate', body); const [translation] = translations; const translationJsonArray = this.helpers.returnJsonArray(translation); - const executionData = this.helpers.constructExecutionMetaData( - translationJsonArray, - { itemData: { item: i } }, - ); + const executionData = this.helpers.constructExecutionMetaData(translationJsonArray, { + itemData: { item: i }, + }); responseData.push(...executionData); } } diff --git a/packages/nodes-base/nodes/Demio/GenericFunctions.ts b/packages/nodes-base/nodes/Demio/GenericFunctions.ts index 1c1b760513..e0128099c1 100644 --- a/packages/nodes-base/nodes/Demio/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Demio/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function demioApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Discourse/Discourse.node.ts b/packages/nodes-base/nodes/Discourse/Discourse.node.ts index 4ae5e3909a..2ddfaf2f32 100644 --- a/packages/nodes-base/nodes/Discourse/Discourse.node.ts +++ b/packages/nodes-base/nodes/Discourse/Discourse.node.ts @@ -7,7 +7,6 @@ import { INodePropertyOptions, INodeType, INodeTypeDescription, - JsonObject, } from 'n8n-workflow'; import { discourseApiRequest } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Discourse/GenericFunctions.ts b/packages/nodes-base/nodes/Discourse/GenericFunctions.ts index 48ed02174d..0c93c2d907 100644 --- a/packages/nodes-base/nodes/Discourse/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Discourse/GenericFunctions.ts @@ -11,7 +11,7 @@ export async function discourseApiRequest( // tslint:disable-next-line:no-any body: any = {}, qs: IDataObject = {}, - option = {}, + _option = {}, // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('discourseApi')) as { url: string }; diff --git a/packages/nodes-base/nodes/Disqus/Disqus.node.ts b/packages/nodes-base/nodes/Disqus/Disqus.node.ts index 61801ae40b..e2831ae80f 100644 --- a/packages/nodes-base/nodes/Disqus/Disqus.node.ts +++ b/packages/nodes-base/nodes/Disqus/Disqus.node.ts @@ -577,12 +577,12 @@ export class Disqus implements INodeType { let endpoint = ''; let requestMethod = ''; - let body: IDataObject | Buffer; + let _body: IDataObject | Buffer; let qs: IDataObject; for (let i = 0; i < items.length; i++) { try { - body = {}; + _body = {}; qs = {}; if (resource === 'forum') { diff --git a/packages/nodes-base/nodes/Disqus/GenericFunctions.ts b/packages/nodes-base/nodes/Disqus/GenericFunctions.ts index 9cb326dffc..7c43918d99 100644 --- a/packages/nodes-base/nodes/Disqus/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Disqus/GenericFunctions.ts @@ -5,7 +5,7 @@ import { IHookFunctions, ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function disqusApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Drift/Drift.node.ts b/packages/nodes-base/nodes/Drift/Drift.node.ts index e2781af87a..aea67e58e3 100644 --- a/packages/nodes-base/nodes/Drift/Drift.node.ts +++ b/packages/nodes-base/nodes/Drift/Drift.node.ts @@ -79,7 +79,6 @@ export class Drift implements INodeType { const returnData: IDataObject[] = []; 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; for (let i = 0; i < length; i++) { diff --git a/packages/nodes-base/nodes/Drift/GenericFunctions.ts b/packages/nodes-base/nodes/Drift/GenericFunctions.ts index 2115aeca02..1dd7eadcf9 100644 --- a/packages/nodes-base/nodes/Drift/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Drift/GenericFunctions.ts @@ -2,13 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { - IDataObject, - IHookFunctions, - IWebhookFunctions, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, IHookFunctions, IWebhookFunctions, NodeApiError } from 'n8n-workflow'; export async function driftApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts b/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts index 58c4241d84..431b55665f 100644 --- a/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts +++ b/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts @@ -1,11 +1,7 @@ import { IExecuteFunctions } from 'n8n-core'; import { - ICredentialDataDecryptedObject, - ICredentialsDecrypted, - ICredentialTestFunctions, IDataObject, - INodeCredentialTestResult, INodeExecutionData, INodeType, INodeTypeDescription, diff --git a/packages/nodes-base/nodes/EditImage/EditImage.node.ts b/packages/nodes-base/nodes/EditImage/EditImage.node.ts index 40fe251aad..06c1161915 100644 --- a/packages/nodes-base/nodes/EditImage/EditImage.node.ts +++ b/packages/nodes-base/nodes/EditImage/EditImage.node.ts @@ -1,4 +1,4 @@ -import { BINARY_ENCODING, IExecuteFunctions } from 'n8n-core'; +import { IExecuteFunctions } from 'n8n-core'; import { deepCopy, IDataObject, diff --git a/packages/nodes-base/nodes/Egoi/GenericFunctions.ts b/packages/nodes-base/nodes/Egoi/GenericFunctions.ts index 8c18c7bc18..25f4a63be8 100644 --- a/packages/nodes-base/nodes/Egoi/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Egoi/GenericFunctions.ts @@ -34,7 +34,7 @@ export async function egoiApiRequest( // tslint:disable-next-line:no-any body: any = {}, qs: IDataObject = {}, - headers?: object, + _headers?: object, // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('egoiApi'); diff --git a/packages/nodes-base/nodes/Elastic/ElasticSecurity/GenericFunctions.ts b/packages/nodes-base/nodes/Elastic/ElasticSecurity/GenericFunctions.ts index 0d2628ce47..0f30fa2f36 100644 --- a/packages/nodes-base/nodes/Elastic/ElasticSecurity/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Elastic/ElasticSecurity/GenericFunctions.ts @@ -61,7 +61,7 @@ export async function elasticSecurityApiRequestAllItems( body: IDataObject = {}, qs: IDataObject = {}, ) { - let page = 1; + let _page = 1; const returnData: IDataObject[] = []; let responseData: any; // tslint:disable-line @@ -69,7 +69,7 @@ export async function elasticSecurityApiRequestAllItems( do { responseData = await elasticSecurityApiRequest.call(this, method, endpoint, body, qs); - page++; + _page++; const items = resource === 'case' ? responseData.cases : responseData; diff --git a/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts b/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts index 28a48d98a3..a0bdaac4b3 100644 --- a/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts +++ b/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts @@ -217,7 +217,7 @@ export class EmailReadImapV1 implements INodeType { const conn = imapConnect(config).then(async (conn) => { return conn; }); - (await conn).getBoxes((err, boxes) => {}); + (await conn).getBoxes((_err, _boxes) => {}); } catch (error) { console.log(error); return { diff --git a/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts b/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts index e8ec50d66a..8554803d35 100644 --- a/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts +++ b/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts @@ -555,7 +555,7 @@ export class EmailReadImapV2 implements INodeType { // Connect to the IMAP server and open the mailbox // that we get informed whenever a new email arrives return imapConnect(config).then(async (conn) => { - conn.on('close', async (hadError: boolean) => { + conn.on('close', async (_hadError: boolean) => { if (isCurrentlyReconnecting === true) { Logger.debug(`Email Read Imap: Connected closed for forced reconnecting`); } else if (closeFunctionWasCalled === true) { diff --git a/packages/nodes-base/nodes/EmailSend/EmailSend.node.ts b/packages/nodes-base/nodes/EmailSend/EmailSend.node.ts index 8ee14f8466..18667f8767 100644 --- a/packages/nodes-base/nodes/EmailSend/EmailSend.node.ts +++ b/packages/nodes-base/nodes/EmailSend/EmailSend.node.ts @@ -1,11 +1,5 @@ import { IExecuteFunctions } from 'n8n-core'; -import { - IDataObject, - INodeExecutionData, - INodeType, - INodeTypeDescription, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow'; import { createTransport } from 'nodemailer'; import SMTPTransport from 'nodemailer/lib/smtp-transport'; diff --git a/packages/nodes-base/nodes/Emelia/Emelia.node.ts b/packages/nodes-base/nodes/Emelia/Emelia.node.ts index 73928ed83f..0606fc4835 100644 --- a/packages/nodes-base/nodes/Emelia/Emelia.node.ts +++ b/packages/nodes-base/nodes/Emelia/Emelia.node.ts @@ -6,7 +6,6 @@ import { INodeExecutionData, INodeType, INodeTypeDescription, - JsonObject, } from 'n8n-workflow'; import { emeliaApiTest, emeliaGraphqlRequest, loadResource } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Eventbrite/GenericFunctions.ts b/packages/nodes-base/nodes/Eventbrite/GenericFunctions.ts index 5b70a02010..438bfb6064 100644 --- a/packages/nodes-base/nodes/Eventbrite/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Eventbrite/GenericFunctions.ts @@ -8,7 +8,7 @@ import { IWebhookFunctions, } from 'n8n-core'; -import { IDataObject, JsonObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, JsonObject, NodeApiError } from 'n8n-workflow'; export async function eventbriteApiRequest( this: diff --git a/packages/nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts b/packages/nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts index f6189d5b1c..61566d5b4f 100644 --- a/packages/nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts +++ b/packages/nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts @@ -27,7 +27,7 @@ function execPromise(command: string): Promise { stdout: '', }; - return new Promise((resolve, reject) => { + return new Promise((resolve, _reject) => { exec(command, { cwd: process.cwd() }, (error, stdout, stderr) => { returnData.stdout = stdout.trim(); returnData.stderr = stderr.trim(); diff --git a/packages/nodes-base/nodes/Facebook/GenericFunctions.ts b/packages/nodes-base/nodes/Facebook/GenericFunctions.ts index 079ea205ef..9650251a71 100644 --- a/packages/nodes-base/nodes/Facebook/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Facebook/GenericFunctions.ts @@ -25,7 +25,7 @@ export async function facebookApiRequest( body: any = {}, qs: IDataObject = {}, uri?: string, - option: IDataObject = {}, + _option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { let credentials; diff --git a/packages/nodes-base/nodes/Figma/GenericFunctions.ts b/packages/nodes-base/nodes/Figma/GenericFunctions.ts index 249f4e5efa..5aa27cbf47 100644 --- a/packages/nodes-base/nodes/Figma/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Figma/GenericFunctions.ts @@ -15,7 +15,7 @@ export async function figmaApiRequest( resource: string, // tslint:disable-next-line:no-any body: any = {}, - qs: IDataObject = {}, + _qs: IDataObject = {}, uri?: string, option: IDataObject = {}, // tslint:disable-next-line:no-any diff --git a/packages/nodes-base/nodes/Flow/Flow.node.ts b/packages/nodes-base/nodes/Flow/Flow.node.ts index 5def6aa998..43875e1f4b 100644 --- a/packages/nodes-base/nodes/Flow/Flow.node.ts +++ b/packages/nodes-base/nodes/Flow/Flow.node.ts @@ -5,7 +5,6 @@ import { INodeType, INodeTypeDescription, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; import { flowApiRequest, FlowApiRequestAllItems } from './GenericFunctions'; import { taskFields, taskOpeations } from './TaskDescription'; diff --git a/packages/nodes-base/nodes/Flow/FlowTrigger.node.ts b/packages/nodes-base/nodes/Flow/FlowTrigger.node.ts index a133918b60..b5b1b658cf 100644 --- a/packages/nodes-base/nodes/Flow/FlowTrigger.node.ts +++ b/packages/nodes-base/nodes/Flow/FlowTrigger.node.ts @@ -1,12 +1,6 @@ import { IHookFunctions, IWebhookFunctions } from 'n8n-core'; -import { - IDataObject, - INodeType, - INodeTypeDescription, - IWebhookResponseData, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow'; import { flowApiRequest } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Flow/GenericFunctions.ts b/packages/nodes-base/nodes/Flow/GenericFunctions.ts index 5b0f04422b..0dbcf55f79 100644 --- a/packages/nodes-base/nodes/Flow/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Flow/GenericFunctions.ts @@ -5,7 +5,7 @@ import { IHookFunctions, ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function flowApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Formstack/FormstackTrigger.node.ts b/packages/nodes-base/nodes/Formstack/FormstackTrigger.node.ts index a6bd837c73..cb1661e967 100644 --- a/packages/nodes-base/nodes/Formstack/FormstackTrigger.node.ts +++ b/packages/nodes-base/nodes/Formstack/FormstackTrigger.node.ts @@ -2,13 +2,7 @@ import { IHookFunctions, IWebhookFunctions } from 'n8n-core'; import { IDataObject, INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow'; -import { - apiRequest, - getFields, - getForms, - getSubmission, - IFormstackWebhookResponseBody, -} from './GenericFunctions'; +import { apiRequest, getForms, IFormstackWebhookResponseBody } from './GenericFunctions'; export class FormstackTrigger implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts b/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts index a3c90ed4d3..6fa296aa9f 100644 --- a/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts +++ b/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts @@ -32,8 +32,6 @@ import { agentRoleOperations, announcementFields, announcementOperations, - assetFields, - assetOperations, assetTypeFields, assetTypeOperations, changeFields, diff --git a/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts b/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts index fd3c59a9ab..c2c9640669 100644 --- a/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts +++ b/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts @@ -15,7 +15,6 @@ import { getAllItemsViewId, handleListing, loadResource, - throwOnEmptyFilter, throwOnEmptyUpdate, } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Ftp/Ftp.node.ts b/packages/nodes-base/nodes/Ftp/Ftp.node.ts index 19ed52ef79..9a1d4936cc 100644 --- a/packages/nodes-base/nodes/Ftp/Ftp.node.ts +++ b/packages/nodes-base/nodes/Ftp/Ftp.node.ts @@ -414,7 +414,6 @@ export class Ftp implements INodeType { const items = this.getInputData(); // const returnData: IDataObject[] = []; const returnItems: INodeExecutionData[] = []; - const qs: IDataObject = {}; let responseData; const operation = this.getNodeParameter('operation', 0) as string; diff --git a/packages/nodes-base/nodes/GetResponse/GetResponseTrigger.node.ts b/packages/nodes-base/nodes/GetResponse/GetResponseTrigger.node.ts index c257c728a1..38ef0ade3c 100644 --- a/packages/nodes-base/nodes/GetResponse/GetResponseTrigger.node.ts +++ b/packages/nodes-base/nodes/GetResponse/GetResponseTrigger.node.ts @@ -8,7 +8,6 @@ import { INodeTypeDescription, IWebhookResponseData, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; import { getresponseApiRequest, getResponseApiRequestAllItems } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Git/Git.node.ts b/packages/nodes-base/nodes/Git/Git.node.ts index cc4d60516e..bd71f8aa99 100644 --- a/packages/nodes-base/nodes/Git/Git.node.ts +++ b/packages/nodes-base/nodes/Git/Git.node.ts @@ -212,11 +212,11 @@ export class Git implements INodeType { }; const operation = this.getNodeParameter('operation', 0) as string; - let item: INodeExecutionData; + let _item: INodeExecutionData; const returnItems: INodeExecutionData[] = []; for (let itemIndex = 0; itemIndex < items.length; itemIndex++) { try { - item = items[itemIndex]; + _item = items[itemIndex]; const repositoryPath = this.getNodeParameter('repositoryPath', itemIndex, '') as string; const options = this.getNodeParameter('options', itemIndex, {}) as IDataObject; diff --git a/packages/nodes-base/nodes/Github/Github.node.ts b/packages/nodes-base/nodes/Github/Github.node.ts index 6d945b5599..c52caee54e 100644 --- a/packages/nodes-base/nodes/Github/Github.node.ts +++ b/packages/nodes-base/nodes/Github/Github.node.ts @@ -5,7 +5,6 @@ import { INodeExecutionData, INodeType, INodeTypeDescription, - IPairedItemData, NodeOperationError, } from 'n8n-workflow'; diff --git a/packages/nodes-base/nodes/Gitlab/GenericFunctions.ts b/packages/nodes-base/nodes/Gitlab/GenericFunctions.ts index 7776b5df78..9756ee69c6 100644 --- a/packages/nodes-base/nodes/Gitlab/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Gitlab/GenericFunctions.ts @@ -1,6 +1,6 @@ import { IExecuteFunctions, IHookFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import { OptionsWithUri } from 'request'; /** diff --git a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts index 1318174957..a3571395b7 100644 --- a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts +++ b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts @@ -978,15 +978,15 @@ export class Gitlab implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; - let credentials; + let _credentials; const authenticationMethod = this.getNodeParameter('authentication', 0); try { if (authenticationMethod === 'accessToken') { - credentials = await this.getCredentials('gitlabApi'); + _credentials = await this.getCredentials('gitlabApi'); } else { - credentials = await this.getCredentials('gitlabOAuth2Api'); + _credentials = await this.getCredentials('gitlabOAuth2Api'); } } catch (error) { if (this.continueOnFail()) { diff --git a/packages/nodes-base/nodes/Google/Books/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Books/GenericFunctions.ts index 760f2a7d9b..582db6751f 100644 --- a/packages/nodes-base/nodes/Google/Books/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Books/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import moment from 'moment-timezone'; diff --git a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts index 84b7c9bf3e..57f7318370 100644 --- a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts +++ b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts @@ -7,7 +7,6 @@ import { INodePropertyOptions, INodeType, INodeTypeDescription, - JsonObject, NodeApiError, NodeOperationError, } from 'n8n-workflow'; diff --git a/packages/nodes-base/nodes/Google/Chat/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Chat/GenericFunctions.ts index f7fc8b7643..3038fb4973 100644 --- a/packages/nodes-base/nodes/Google/Chat/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Chat/GenericFunctions.ts @@ -8,7 +8,6 @@ import { IDataObject, INodeProperties, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; import moment from 'moment-timezone'; diff --git a/packages/nodes-base/nodes/Google/Docs/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Docs/GenericFunctions.ts index ef09d6051b..11bd28c70e 100644 --- a/packages/nodes-base/nodes/Google/Docs/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Docs/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import moment from 'moment-timezone'; diff --git a/packages/nodes-base/nodes/Google/Drive/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Drive/GenericFunctions.ts index 9e07bee5f9..52a5680afa 100644 --- a/packages/nodes-base/nodes/Google/Drive/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Drive/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, IPollFunctions, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, IPollFunctions, NodeApiError } from 'n8n-workflow'; import moment from 'moment-timezone'; diff --git a/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.ts index 26a5277b37..99e29122d2 100644 --- a/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.ts @@ -57,7 +57,7 @@ export async function googleApiRequestAllItems( // tslint:disable-next-line:no-any body: any = {}, qs: IDataObject = {}, - headers: IDataObject = {}, + _headers: IDataObject = {}, uri: string | null = null, // tslint:disable-next-line:no-any ): Promise { 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 1cb2d7e947..37f5896607 100644 --- a/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GoogleFirebaseRealtimeDatabase.node.ts +++ b/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GoogleFirebaseRealtimeDatabase.node.ts @@ -7,7 +7,6 @@ import { INodePropertyOptions, INodeType, INodeTypeDescription, - JsonObject, NodeApiError, NodeOperationError, } from 'n8n-workflow'; 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 7a6dbb9398..62ec6edd45 100644 --- a/packages/nodes-base/nodes/Google/Gmail/v2/GmailV2.node.ts +++ b/packages/nodes-base/nodes/Google/Gmail/v2/GmailV2.node.ts @@ -2,7 +2,6 @@ import { IExecuteFunctions } from 'n8n-core'; import { - IBinaryKeyData, IDataObject, ILoadOptionsFunctions, INodeExecutionData, @@ -785,9 +784,12 @@ export class GmailV2 implements INodeType { } //------------------------------------------------------------------// - const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { - itemData: { item: i }, - }); + const executionData = this.helpers.constructExecutionMetaData( + this.helpers.returnJsonArray(responseData), + { + itemData: { item: i }, + }, + ); returnData.push(...executionData); } catch (error) { error.message = `${error.message} (item ${i})`; diff --git a/packages/nodes-base/nodes/Google/Perspective/GooglePerspective.node.ts b/packages/nodes-base/nodes/Google/Perspective/GooglePerspective.node.ts index b4c783b755..38589a1e84 100644 --- a/packages/nodes-base/nodes/Google/Perspective/GooglePerspective.node.ts +++ b/packages/nodes-base/nodes/Google/Perspective/GooglePerspective.node.ts @@ -1,7 +1,6 @@ import { IExecuteFunctions } from 'n8n-core'; import { - IDataObject, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, diff --git a/packages/nodes-base/nodes/Google/Sheet/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Sheet/GenericFunctions.ts index 4d885db711..b5f3a755cd 100644 --- a/packages/nodes-base/nodes/Google/Sheet/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Sheet/GenericFunctions.ts @@ -2,12 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { - ICredentialTestFunctions, - IDataObject, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { ICredentialTestFunctions, IDataObject, NodeApiError } from 'n8n-workflow'; import moment from 'moment-timezone'; diff --git a/packages/nodes-base/nodes/Google/Sheet/GoogleSheet.ts b/packages/nodes-base/nodes/Google/Sheet/GoogleSheet.ts index c09e4a3a17..b6cb4e1666 100644 --- a/packages/nodes-base/nodes/Google/Sheet/GoogleSheet.ts +++ b/packages/nodes-base/nodes/Google/Sheet/GoogleSheet.ts @@ -401,7 +401,7 @@ export class GoogleSheet { if (itemKey === undefined || itemKey === null) { // Item does not have the indexKey so we can ignore it or append it if upsert true if (upsert) { - const data = await this.appendSheetData( + const _data = await this.appendSheetData( [inputItem], this.encodeRange(range), keyRowIndex, @@ -417,7 +417,7 @@ export class GoogleSheet { if (itemKeyIndex === -1) { // Key does not exist in the Sheet so it can not be updated so skip it or append it if upsert true if (upsert) { - const data = await this.appendSheetData( + const _data = await this.appendSheetData( [inputItem], this.encodeRange(range), keyRowIndex, diff --git a/packages/nodes-base/nodes/Google/Sheet/GoogleSheets.node.ts b/packages/nodes-base/nodes/Google/Sheet/GoogleSheets.node.ts index b30b2ae27c..960e38d10b 100644 --- a/packages/nodes-base/nodes/Google/Sheet/GoogleSheets.node.ts +++ b/packages/nodes-base/nodes/Google/Sheet/GoogleSheets.node.ts @@ -1031,7 +1031,7 @@ export class GoogleSheets implements INodeType { const usePathForKeyRow = (options.usePathForKeyRow || false) as boolean; // Convert data into array format - const data = await sheet.appendSheetData( + const _data = await sheet.appendSheetData( setData, sheet.encodeRange(range), keyRow, @@ -1143,7 +1143,7 @@ export class GoogleSheets implements INodeType { } } - const data = await sheet.spreadsheetBatchUpdate(requests); + const _data = await sheet.spreadsheetBatchUpdate(requests); const items = this.getInputData(); return this.prepareOutputData(items); @@ -1296,7 +1296,7 @@ export class GoogleSheets implements INodeType { }); } - const data = await sheet.batchUpdate(updateData, valueInputMode); + const _data = await sheet.batchUpdate(updateData, valueInputMode); } else { const keyName = this.getNodeParameter('key', 0) as string; const keyRow = parseInt(this.getNodeParameter('keyRow', 0) as string, 10); @@ -1307,7 +1307,7 @@ export class GoogleSheets implements INodeType { setData.push(item.json); }); - const data = await sheet.updateSheetData( + const _data = await sheet.updateSheetData( setData, keyName, range, diff --git a/packages/nodes-base/nodes/Google/Slides/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Slides/GenericFunctions.ts index 1472fdb40f..16e8b60c4a 100644 --- a/packages/nodes-base/nodes/Google/Slides/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Slides/GenericFunctions.ts @@ -2,12 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { - ICredentialDataDecryptedObject, - IDataObject, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import moment from 'moment-timezone'; diff --git a/packages/nodes-base/nodes/Google/Translate/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Translate/GenericFunctions.ts index 8d92cafea1..1f56da5402 100644 --- a/packages/nodes-base/nodes/Google/Translate/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Translate/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import moment from 'moment-timezone'; diff --git a/packages/nodes-base/nodes/Gotify/GenericFunctions.ts b/packages/nodes-base/nodes/Gotify/GenericFunctions.ts index 0325aea550..0c53fefc15 100644 --- a/packages/nodes-base/nodes/Gotify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Gotify/GenericFunctions.ts @@ -12,7 +12,7 @@ export async function gotifyApiRequest( body: any = {}, qs: IDataObject = {}, uri?: string | undefined, - option = {}, + _option = {}, // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('gotifyApi'); diff --git a/packages/nodes-base/nodes/Grafana/Grafana.node.ts b/packages/nodes-base/nodes/Grafana/Grafana.node.ts index a7868e0847..5fcfec781a 100644 --- a/packages/nodes-base/nodes/Grafana/Grafana.node.ts +++ b/packages/nodes-base/nodes/Grafana/Grafana.node.ts @@ -1,11 +1,8 @@ import { IExecuteFunctions } from 'n8n-core'; import { - ICredentialsDecrypted, - ICredentialTestFunctions, IDataObject, ILoadOptionsFunctions, - INodeCredentialTestResult, INodeExecutionData, INodePropertyOptions, INodeType, diff --git a/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts b/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts index 8bc8160368..a438611401 100644 --- a/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts +++ b/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts @@ -5,7 +5,6 @@ import { INodeExecutionData, INodeType, INodeTypeDescription, - JsonObject, NodeApiError, NodeOperationError, } from 'n8n-workflow'; diff --git a/packages/nodes-base/nodes/Gumroad/GenericFunctions.ts b/packages/nodes-base/nodes/Gumroad/GenericFunctions.ts index 135dd80329..279644ef07 100644 --- a/packages/nodes-base/nodes/Gumroad/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Gumroad/GenericFunctions.ts @@ -6,7 +6,7 @@ import { ILoadOptionsFunctions, IWebhookFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function gumroadApiRequest( this: diff --git a/packages/nodes-base/nodes/Harvest/GenericFunctions.ts b/packages/nodes-base/nodes/Harvest/GenericFunctions.ts index 61e842cb72..56747a0767 100644 --- a/packages/nodes-base/nodes/Harvest/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Harvest/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function harvestApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts b/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts index 70a6b0a9ec..efd4182b93 100644 --- a/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts +++ b/packages/nodes-base/nodes/HelpScout/HelpScout.node.ts @@ -114,7 +114,7 @@ export class HelpScout implements INodeType { ); for (const tag of tags) { const tagName = tag.name; - const tagId = tag.id; + const _tagId = tag.id; returnData.push({ name: tagName, value: tagName, @@ -453,7 +453,7 @@ export class HelpScout implements INodeType { //https://developer.helpscout.com/mailbox-api/endpoints/conversations/threads/chat if (operation === 'create') { const conversationId = this.getNodeParameter('conversationId', i) as string; - const type = this.getNodeParameter('type', i) as string; + const _type = this.getNodeParameter('type', i) as string; const text = this.getNodeParameter('text', i) as string; const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject; const attachments = this.getNodeParameter('attachmentsUi', i) as IDataObject; diff --git a/packages/nodes-base/nodes/HighLevel/GenericFunctions.ts b/packages/nodes-base/nodes/HighLevel/GenericFunctions.ts index dfa31f163f..c87c4fe334 100644 --- a/packages/nodes-base/nodes/HighLevel/GenericFunctions.ts +++ b/packages/nodes-base/nodes/HighLevel/GenericFunctions.ts @@ -40,7 +40,7 @@ function dateToIsoSupressMillis(dateTime: string) { export async function taskPostReceiceAction( this: IExecuteSingleFunctions, items: INodeExecutionData[], - response: IN8nHttpFullResponse, + _response: IN8nHttpFullResponse, ): Promise { const contactId = this.getNodeParameter('contactId'); items.forEach((item) => (item.json.contactId = contactId)); diff --git a/packages/nodes-base/nodes/HomeAssistant/GenericFunctions.ts b/packages/nodes-base/nodes/HomeAssistant/GenericFunctions.ts index 6efb65e990..2b0d7cdd8d 100644 --- a/packages/nodes-base/nodes/HomeAssistant/GenericFunctions.ts +++ b/packages/nodes-base/nodes/HomeAssistant/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, INodePropertyOptions, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, INodePropertyOptions, NodeApiError } from 'n8n-workflow'; export async function homeAssistantApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts b/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts index 56a2c3235f..601c4b7394 100644 --- a/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts +++ b/packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts @@ -24,9 +24,9 @@ const extractFunctions: { } = { attribute: ($: Cheerio, valueData: IValueData): string | undefined => $.attr(valueData.attribute!), - html: ($: Cheerio, valueData: IValueData): string | undefined => $.html() || undefined, - text: ($: Cheerio, valueData: IValueData): string | undefined => $.text(), - value: ($: Cheerio, valueData: IValueData): string | undefined => $.val(), + html: ($: Cheerio, _valueData: IValueData): string | undefined => $.html() || undefined, + text: ($: Cheerio, _valueData: IValueData): string | undefined => $.text(), + value: ($: Cheerio, _valueData: IValueData): string | undefined => $.val(), }; /** diff --git a/packages/nodes-base/nodes/Hubspot/HubspotTrigger.node.ts b/packages/nodes-base/nodes/Hubspot/HubspotTrigger.node.ts index b61269430c..f3a42de481 100644 --- a/packages/nodes-base/nodes/Hubspot/HubspotTrigger.node.ts +++ b/packages/nodes-base/nodes/Hubspot/HubspotTrigger.node.ts @@ -7,22 +7,13 @@ import { INodeType, INodeTypeDescription, IWebhookResponseData, - NodeApiError, NodeOperationError, } from 'n8n-workflow'; -import { - companyFields, - contactFields, - dealFields, - hubspotApiRequest, - propertyEvents, -} from './GenericFunctions'; +import { hubspotApiRequest, propertyEvents } from './GenericFunctions'; import { createHash } from 'crypto'; -import { capitalCase } from 'change-case'; - export class HubspotTrigger implements INodeType { description: INodeTypeDescription = { displayName: 'HubSpot Trigger', diff --git a/packages/nodes-base/nodes/HumanticAI/GenericFunctions.ts b/packages/nodes-base/nodes/HumanticAI/GenericFunctions.ts index b67b048845..bcd225ad7f 100644 --- a/packages/nodes-base/nodes/HumanticAI/GenericFunctions.ts +++ b/packages/nodes-base/nodes/HumanticAI/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function humanticAiApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Hunter/GenericFunctions.ts b/packages/nodes-base/nodes/Hunter/GenericFunctions.ts index 26315d498d..f0858da88e 100644 --- a/packages/nodes-base/nodes/Hunter/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Hunter/GenericFunctions.ts @@ -5,7 +5,7 @@ import { IHookFunctions, ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function hunterApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Intercom/GenericFunctions.ts b/packages/nodes-base/nodes/Intercom/GenericFunctions.ts index dea51de529..0f0bd982d5 100644 --- a/packages/nodes-base/nodes/Intercom/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Intercom/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function intercomApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/InvoiceNinja/ClientInterface.ts b/packages/nodes-base/nodes/InvoiceNinja/ClientInterface.ts index 6143bb7157..44f2984fc5 100644 --- a/packages/nodes-base/nodes/InvoiceNinja/ClientInterface.ts +++ b/packages/nodes-base/nodes/InvoiceNinja/ClientInterface.ts @@ -1,5 +1,3 @@ -import { IDataObject } from 'n8n-workflow'; - export interface IContact { first_name?: string; last_name?: string; diff --git a/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts b/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts index c4d4d4c499..a630278931 100644 --- a/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts +++ b/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts @@ -1365,7 +1365,7 @@ const compareItems = ( obj2: INodeExecutionData, keys: string[], disableDotNotation: boolean, - node: INode, + _node: INode, ) => { let result = true; for (const key of keys) { diff --git a/packages/nodes-base/nodes/Jira/GenericFunctions.ts b/packages/nodes-base/nodes/Jira/GenericFunctions.ts index b51c2d28de..b99519900d 100644 --- a/packages/nodes-base/nodes/Jira/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Jira/GenericFunctions.ts @@ -7,13 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { - ICredentialDataDecryptedObject, - IDataObject, - JsonObject, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, JsonObject, NodeApiError } from 'n8n-workflow'; export async function jiraSoftwareCloudApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/JotForm/GenericFunctions.ts b/packages/nodes-base/nodes/JotForm/GenericFunctions.ts index 05e3b1a0b7..d4e9ffb69e 100644 --- a/packages/nodes-base/nodes/JotForm/GenericFunctions.ts +++ b/packages/nodes-base/nodes/JotForm/GenericFunctions.ts @@ -6,7 +6,7 @@ import { ILoadOptionsFunctions, IWebhookFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function jotformApiRequest( this: diff --git a/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts b/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts index 45e451f4db..de252c1057 100644 --- a/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts +++ b/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts @@ -165,8 +165,8 @@ export class JotFormTrigger implements INodeType { const form = new formidable.IncomingForm({}); - return new Promise((resolve, reject) => { - form.parse(req, async (err, data, files) => { + return new Promise((resolve, _reject) => { + form.parse(req, async (err, data, _files) => { // tslint:disable-next-line:no-any const rawRequest = jsonParse(data.rawRequest as string); data.rawRequest = rawRequest; diff --git a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts index 079d98e7a3..f91a22b7e5 100644 --- a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts +++ b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts @@ -1,15 +1,6 @@ import { IExecuteFunctions } from 'n8n-core'; -import { - ICredentialsDecrypted, - ICredentialTestFunctions, - IDataObject, - INodeCredentialTestResult, - INodeExecutionData, - INodeType, - INodeTypeDescription, - JsonObject, -} from 'n8n-workflow'; +import { IDataObject, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow'; import { downloadAttachments, diff --git a/packages/nodes-base/nodes/Line/Line.node.ts b/packages/nodes-base/nodes/Line/Line.node.ts index ee5460fa09..19e90fe6e3 100644 --- a/packages/nodes-base/nodes/Line/Line.node.ts +++ b/packages/nodes-base/nodes/Line/Line.node.ts @@ -62,7 +62,6 @@ export class Line implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; 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; diff --git a/packages/nodes-base/nodes/Linear/Linear.node.ts b/packages/nodes-base/nodes/Linear/Linear.node.ts index 4aab27ccc8..9b89efbac1 100644 --- a/packages/nodes-base/nodes/Linear/Linear.node.ts +++ b/packages/nodes-base/nodes/Linear/Linear.node.ts @@ -159,7 +159,6 @@ export class Linear implements INodeType { const returnData: INodeExecutionData[] = []; 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; for (let i = 0; i < length; i++) { diff --git a/packages/nodes-base/nodes/LingvaNex/GenericFunctions.ts b/packages/nodes-base/nodes/LingvaNex/GenericFunctions.ts index b9f0c03229..ba2987ccb0 100644 --- a/packages/nodes-base/nodes/LingvaNex/GenericFunctions.ts +++ b/packages/nodes-base/nodes/LingvaNex/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function lingvaNexApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts b/packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts index 64d43fd23b..2aafe8db65 100644 --- a/packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts +++ b/packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts @@ -10,7 +10,7 @@ export async function linkedInApiRequest( // tslint:disable-next-line:no-any body: any = {}, binary?: boolean, - headers?: object, + _headers?: object, // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUrl = { diff --git a/packages/nodes-base/nodes/MQTT/MqttTrigger.node.ts b/packages/nodes-base/nodes/MQTT/MqttTrigger.node.ts index ec4561f148..e71fb9ed5f 100644 --- a/packages/nodes-base/nodes/MQTT/MqttTrigger.node.ts +++ b/packages/nodes-base/nodes/MQTT/MqttTrigger.node.ts @@ -135,7 +135,7 @@ export class MqttTrigger implements INodeType { async function manualTriggerFunction() { await new Promise((resolve, reject) => { client.on('connect', () => { - client.subscribe(topicsQoS as ISubscriptionMap, (err, granted) => { + client.subscribe(topicsQoS as ISubscriptionMap, (err, _granted) => { if (err) { reject(err); } diff --git a/packages/nodes-base/nodes/Magento/GenericFunctions.ts b/packages/nodes-base/nodes/Magento/GenericFunctions.ts index b1c386a5d3..505d25ba47 100644 --- a/packages/nodes-base/nodes/Magento/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Magento/GenericFunctions.ts @@ -19,7 +19,7 @@ export async function magentoApiRequest( body: any = {}, qs: IDataObject = {}, uri?: string, - headers: IDataObject = {}, + _headers: IDataObject = {}, option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { diff --git a/packages/nodes-base/nodes/Magento/Magento2.node.ts b/packages/nodes-base/nodes/Magento/Magento2.node.ts index 9de582f327..231c89088c 100644 --- a/packages/nodes-base/nodes/Magento/Magento2.node.ts +++ b/packages/nodes-base/nodes/Magento/Magento2.node.ts @@ -1,13 +1,8 @@ -import { OptionsWithUri } from 'request'; - import { IExecuteFunctions } from 'n8n-core'; import { - ICredentialsDecrypted, - ICredentialTestFunctions, IDataObject, ILoadOptionsFunctions, - INodeCredentialTestResult, INodeExecutionData, INodePropertyOptions, INodeType, @@ -314,7 +309,6 @@ export class Magento2 implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; const length = items.length; - const timezone = this.getTimezone(); let responseData; const resource = this.getNodeParameter('resource', 0) as string; const operation = this.getNodeParameter('operation', 0) as string; @@ -654,10 +648,11 @@ export class Magento2 implements INodeType { const attributeSetId = this.getNodeParameter('attributeSetId', i) as string; const price = this.getNodeParameter('price', i) as number; - const { customAttributes, category, ...rest } = this.getNodeParameter( - 'additionalFields', - i, - ) as { + const { + customAttributes, + category: _category, + ...rest + } = this.getNodeParameter('additionalFields', i) as { customAttributes: { customAttribute: CustomAttribute[]; }; diff --git a/packages/nodes-base/nodes/Mailchimp/GenericFunctions.ts b/packages/nodes-base/nodes/Mailchimp/GenericFunctions.ts index bdecbed95f..a0536573bb 100644 --- a/packages/nodes-base/nodes/Mailchimp/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mailchimp/GenericFunctions.ts @@ -16,7 +16,7 @@ export async function mailchimpApiRequest( // tslint:disable-next-line:no-any body: any = {}, qs: IDataObject = {}, - headers?: object, + _headers?: object, // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0) as string; diff --git a/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts b/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts index 6cdc52ce0d..8926a1c366 100644 --- a/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts +++ b/packages/nodes-base/nodes/Mailchimp/MailchimpTrigger.node.ts @@ -8,7 +8,6 @@ import { INodeTypeDescription, IWebhookResponseData, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; import { mailchimpApiRequest } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/MailerLite/GenericFunctions.ts b/packages/nodes-base/nodes/MailerLite/GenericFunctions.ts index bc9002ee55..1c4be40f71 100644 --- a/packages/nodes-base/nodes/MailerLite/GenericFunctions.ts +++ b/packages/nodes-base/nodes/MailerLite/GenericFunctions.ts @@ -16,7 +16,7 @@ export async function mailerliteApiRequest( // tslint:disable-next-line:no-any body: any = {}, qs: IDataObject = {}, - option = {}, + _option = {}, // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('mailerLiteApi'); diff --git a/packages/nodes-base/nodes/Mailgun/Mailgun.node.ts b/packages/nodes-base/nodes/Mailgun/Mailgun.node.ts index 2cb22c085c..34024c7aa8 100644 --- a/packages/nodes-base/nodes/Mailgun/Mailgun.node.ts +++ b/packages/nodes-base/nodes/Mailgun/Mailgun.node.ts @@ -5,7 +5,6 @@ import { INodeType, INodeTypeDescription, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; export class Mailgun implements INodeType { @@ -179,7 +178,11 @@ export class Mailgun implements INodeType { let responseData; try { - responseData = await this.helpers.requestWithAuthentication.call(this, 'mailgunApi', options); + responseData = await this.helpers.requestWithAuthentication.call( + this, + 'mailgunApi', + options, + ); } catch (error) { throw new NodeApiError(this.getNode(), error); } diff --git a/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts b/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts index 9232b4763a..2135a2a568 100644 --- a/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts +++ b/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts @@ -7,7 +7,6 @@ import { INodePropertyOptions, INodeType, INodeTypeDescription, - JsonObject, NodeOperationError, } from 'n8n-workflow'; diff --git a/packages/nodes-base/nodes/Mandrill/GenericFunctions.ts b/packages/nodes-base/nodes/Mandrill/GenericFunctions.ts index ae848dea6f..16e09ae5d4 100644 --- a/packages/nodes-base/nodes/Mandrill/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mandrill/GenericFunctions.ts @@ -3,7 +3,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-core'; import _ from 'lodash'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError } from 'n8n-workflow'; export async function mandrillApiRequest( this: IExecuteFunctions | IHookFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts b/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts index 4752805f2f..bf33d153b6 100644 --- a/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts +++ b/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts @@ -8,7 +8,6 @@ import { INodeType, INodeTypeDescription, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; import { diff --git a/packages/nodes-base/nodes/Matrix/GenericFunctions.ts b/packages/nodes-base/nodes/Matrix/GenericFunctions.ts index 2107885144..6aa2c6a68d 100644 --- a/packages/nodes-base/nodes/Matrix/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Matrix/GenericFunctions.ts @@ -7,18 +7,6 @@ import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } fro import _ from 'lodash'; import { v4 as uuid } from 'uuid'; -interface MessageResponse { - chunk: Message[]; -} - -interface Message { - content: object; - room_id: string; - sender: string; - type: string; - user_id: string; -} - export async function matrixApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/restore/execute.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/restore/execute.ts index c1ba543cf5..505cf8b865 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/channel/restore/execute.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/channel/restore/execute.ts @@ -2,7 +2,7 @@ import { IExecuteFunctions } from 'n8n-core'; import { IDataObject, INodeExecutionData } from 'n8n-workflow'; -import { apiRequest, apiRequestAllItems } from '../../../transport'; +import { apiRequest } from '../../../transport'; export async function restore( this: IExecuteFunctions, diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/versionDescription.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/versionDescription.ts index f7464f2fdd..a58b465e1f 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/versionDescription.ts @@ -1,5 +1,5 @@ /* eslint-disable n8n-nodes-base/node-filename-against-convention */ -import { INodeProperties, INodeTypeDescription } from 'n8n-workflow'; +import { INodeTypeDescription } from 'n8n-workflow'; import * as channel from './channel'; import * as message from './message'; import * as reaction from './reaction'; diff --git a/packages/nodes-base/nodes/Mattermost/v1/transport/index.ts b/packages/nodes-base/nodes/Mattermost/v1/transport/index.ts index fccdc45302..1d182f9c02 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/transport/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/transport/index.ts @@ -1,12 +1,6 @@ import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { - GenericValue, - IDataObject, - IHttpRequestMethods, - IHttpRequestOptions, - NodeOperationError, -} from 'n8n-workflow'; +import { GenericValue, IDataObject, IHttpRequestMethods, IHttpRequestOptions } from 'n8n-workflow'; /** * Make an API request to Mattermost diff --git a/packages/nodes-base/nodes/Mautic/GenericFunctions.ts b/packages/nodes-base/nodes/Mautic/GenericFunctions.ts index 96b566282c..0cdea199b4 100644 --- a/packages/nodes-base/nodes/Mautic/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mautic/GenericFunctions.ts @@ -78,7 +78,6 @@ export async function mauticApiRequestAllItems( const returnData: IDataObject[] = []; let responseData; - let data: IDataObject[] = []; query.limit = 30; query.start = 0; @@ -88,7 +87,6 @@ export async function mauticApiRequestAllItems( //@ts-ignore returnData.push.apply(returnData, values); query.start += query.limit; - data = []; } while ( responseData.total !== undefined && returnData.length - parseInt(responseData.total, 10) < 0 diff --git a/packages/nodes-base/nodes/Medium/GenericFunctions.ts b/packages/nodes-base/nodes/Medium/GenericFunctions.ts index daae21f6ae..6a35e05ac5 100644 --- a/packages/nodes-base/nodes/Medium/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Medium/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function mediumApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/MessageBird/GenericFunctions.ts b/packages/nodes-base/nodes/MessageBird/GenericFunctions.ts index ce63f8079d..7e71ff4a70 100644 --- a/packages/nodes-base/nodes/MessageBird/GenericFunctions.ts +++ b/packages/nodes-base/nodes/MessageBird/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IHookFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; /** * Make an API request to Message Bird diff --git a/packages/nodes-base/nodes/Metabase/DatabasesDescription.ts b/packages/nodes-base/nodes/Metabase/DatabasesDescription.ts index 9f3772c1ee..0f39920679 100644 --- a/packages/nodes-base/nodes/Metabase/DatabasesDescription.ts +++ b/packages/nodes-base/nodes/Metabase/DatabasesDescription.ts @@ -1,4 +1,4 @@ -import { IN8nHttpFullResponse, INodeProperties } from 'n8n-workflow'; +import { INodeProperties } from 'n8n-workflow'; export const databasesOperations: INodeProperties[] = [ { @@ -329,28 +329,3 @@ export const databasesFields: INodeProperties[] = [ default: true, }, ]; - -type MetabaseDatabaseResult = IN8nHttpFullResponse & { - body: Array<{ - data: Array<{ - id: number; - name: string; - description: string; - details: MetabaseDatabaseDetail; - timezone: string; - creator_id: number; - created_at: string; - updated_at: string; - engine: string; - is_full_sync: string; - }>; - }>; -}; - -type MetabaseDatabaseDetail = { - host?: string; - port?: number; - user?: string; - ssl?: boolean; - db?: string; -}; diff --git a/packages/nodes-base/nodes/Microsoft/Excel/MicrosoftExcel.node.ts b/packages/nodes-base/nodes/Microsoft/Excel/MicrosoftExcel.node.ts index 295178adca..50bacb51fd 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/MicrosoftExcel.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/MicrosoftExcel.node.ts @@ -8,7 +8,6 @@ import { INodeType, INodeTypeDescription, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; import { diff --git a/packages/nodes-base/nodes/Microsoft/GraphSecurity/MicrosoftGraphSecurity.node.ts b/packages/nodes-base/nodes/Microsoft/GraphSecurity/MicrosoftGraphSecurity.node.ts index 32809e1c2d..7f6f24ad0e 100644 --- a/packages/nodes-base/nodes/Microsoft/GraphSecurity/MicrosoftGraphSecurity.node.ts +++ b/packages/nodes-base/nodes/Microsoft/GraphSecurity/MicrosoftGraphSecurity.node.ts @@ -123,7 +123,7 @@ export class MicrosoftGraphSecurity implements INodeType { .then((response) => response.value)) as Array<{ controlScores: object[] }>; if (!includeControlScores) { - responseData = responseData.map(({ controlScores, ...rest }) => rest); + responseData = responseData.map(({ controlScores: _controlScores, ...rest }) => rest); } } } else if (resource === 'secureScoreControlProfile') { diff --git a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts index 9b24420fea..abb93dc831 100644 --- a/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts +++ b/packages/nodes-base/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.ts @@ -65,7 +65,6 @@ export class MicrosoftOneDrive implements INodeType { const items = this.getInputData(); const returnData: INodeExecutionData[] = []; 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; diff --git a/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts b/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts index 540b08602a..f7166ffbe6 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts @@ -7,7 +7,6 @@ import { INodePropertyOptions, INodeType, INodeTypeDescription, - JsonObject, } from 'n8n-workflow'; import { microsoftApiRequest, microsoftApiRequestAllItems } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Microsoft/ToDo/GenericFunctions.ts b/packages/nodes-base/nodes/Microsoft/ToDo/GenericFunctions.ts index e79bbad1d1..9101bb5505 100644 --- a/packages/nodes-base/nodes/Microsoft/ToDo/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Microsoft/ToDo/GenericFunctions.ts @@ -11,7 +11,7 @@ export async function microsoftApiRequest( body: IDataObject = {}, qs: IDataObject = {}, uri?: string, - headers: IDataObject = {}, + _headers: IDataObject = {}, option: IDataObject = { json: true }, ) { const options: OptionsWithUri = { diff --git a/packages/nodes-base/nodes/Mindee/Mindee.node.ts b/packages/nodes-base/nodes/Mindee/Mindee.node.ts index bb93f2e26f..2c817dc2ab 100644 --- a/packages/nodes-base/nodes/Mindee/Mindee.node.ts +++ b/packages/nodes-base/nodes/Mindee/Mindee.node.ts @@ -152,7 +152,6 @@ export class Mindee implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; const length = items.length; - const qs: IDataObject = {}; let responseData; const version = this.getNodeParameter('apiVersion', 0) as number; const resource = this.getNodeParameter('resource', 0) as string; diff --git a/packages/nodes-base/nodes/Mocean/GenericFunctions.ts b/packages/nodes-base/nodes/Mocean/GenericFunctions.ts index 41e454731b..b2d6251eae 100644 --- a/packages/nodes-base/nodes/Mocean/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mocean/GenericFunctions.ts @@ -1,6 +1,6 @@ import { IExecuteFunctions, IHookFunctions } from 'n8n-core'; -import { IDataObject, JsonObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, JsonObject, NodeApiError } from 'n8n-workflow'; /** * Make an API request to Twilio diff --git a/packages/nodes-base/nodes/MondayCom/GenericFunctions.ts b/packages/nodes-base/nodes/MondayCom/GenericFunctions.ts index 2adbc2a6b9..d3450bc0f9 100644 --- a/packages/nodes-base/nodes/MondayCom/GenericFunctions.ts +++ b/packages/nodes-base/nodes/MondayCom/GenericFunctions.ts @@ -2,13 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { - IDataObject, - IHookFunctions, - IWebhookFunctions, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, IHookFunctions, IWebhookFunctions, NodeApiError } from 'n8n-workflow'; import { get } from 'lodash'; diff --git a/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts b/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts index e083152107..fa3f615ec0 100644 --- a/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts +++ b/packages/nodes-base/nodes/MondayCom/MondayCom.node.ts @@ -230,7 +230,6 @@ export class MondayCom implements INodeType { const returnData: INodeExecutionData[] = []; 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; for (let i = 0; i < length; i++) { diff --git a/packages/nodes-base/nodes/MongoDb/mongoDb.types.ts b/packages/nodes-base/nodes/MongoDb/mongoDb.types.ts index f1a7db0044..f49f63a27d 100644 --- a/packages/nodes-base/nodes/MongoDb/mongoDb.types.ts +++ b/packages/nodes-base/nodes/MongoDb/mongoDb.types.ts @@ -1,5 +1,3 @@ -import { CredentialInformation } from 'n8n-workflow'; - /** * Credentials object for Mongo, if using individual parameters */ diff --git a/packages/nodes-base/nodes/MonicaCrm/GenericFunctions.ts b/packages/nodes-base/nodes/MonicaCrm/GenericFunctions.ts index 6973826833..46a9c67616 100644 --- a/packages/nodes-base/nodes/MonicaCrm/GenericFunctions.ts +++ b/packages/nodes-base/nodes/MonicaCrm/GenericFunctions.ts @@ -1,4 +1,4 @@ -import { Credentials, IExecuteFunctions } from 'n8n-core'; +import { IExecuteFunctions } from 'n8n-core'; import { IDataObject, ILoadOptionsFunctions, NodeApiError, NodeOperationError } from 'n8n-workflow'; diff --git a/packages/nodes-base/nodes/Msg91/GenericFunctions.ts b/packages/nodes-base/nodes/Msg91/GenericFunctions.ts index f796602b9d..e935e3b1d5 100644 --- a/packages/nodes-base/nodes/Msg91/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Msg91/GenericFunctions.ts @@ -1,6 +1,6 @@ import { IExecuteFunctions, IHookFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; /** * Make an API request to MSG91 diff --git a/packages/nodes-base/nodes/MySql/MySql.node.ts b/packages/nodes-base/nodes/MySql/MySql.node.ts index c145c11454..f24c62ca45 100644 --- a/packages/nodes-base/nodes/MySql/MySql.node.ts +++ b/packages/nodes-base/nodes/MySql/MySql.node.ts @@ -293,19 +293,21 @@ export class MySql implements INodeType { return connection.query(rawQuery); }); - returnItems = (await Promise.all(queryQueue) as mysql2.OkPacket[][]).reduce((collection, result, index) => { - const [rows] = result; + returnItems = ((await Promise.all(queryQueue)) as mysql2.OkPacket[][]).reduce( + (collection, result, index) => { + const [rows] = result; - const executionData = this.helpers.constructExecutionMetaData( - this.helpers.returnJsonArray(rows as unknown as IDataObject[]), - { itemData: { item: index } }, - ); + const executionData = this.helpers.constructExecutionMetaData( + this.helpers.returnJsonArray(rows as unknown as IDataObject[]), + { itemData: { item: index } }, + ); - collection.push(...executionData); - - return collection; - }, [] as INodeExecutionData[]); + collection.push(...executionData); + return collection; + }, + [] as INodeExecutionData[], + ); } catch (error) { if (this.continueOnFail()) { returnItems = this.helpers.returnJsonArray({ error: error.message }); @@ -324,15 +326,16 @@ export class MySql implements INodeType { const columnString = this.getNodeParameter('columns', 0) as string; const columns = columnString.split(',').map((column) => column.trim()); const insertItems = copyInputItems(items, columns); - const insertPlaceholder = `(${columns.map((column) => '?').join(',')})`; + const insertPlaceholder = `(${columns.map((_column) => '?').join(',')})`; const options = this.getNodeParameter('options', 0) as IDataObject; const insertIgnore = options.ignore as boolean; const insertPriority = options.priority as string; - const insertSQL = `INSERT ${insertPriority || ''} ${insertIgnore ? 'IGNORE' : '' - } INTO ${table}(${columnString}) VALUES ${items - .map((item) => insertPlaceholder) - .join(',')};`; + const insertSQL = `INSERT ${insertPriority || ''} ${ + insertIgnore ? 'IGNORE' : '' + } INTO ${table}(${columnString}) VALUES ${items + .map((_item) => insertPlaceholder) + .join(',')};`; const queryItems = insertItems.reduce( (collection, item) => collection.concat(Object.values(item as any)), // tslint:disable-line:no-any [], diff --git a/packages/nodes-base/nodes/Netlify/GenericFunctions.ts b/packages/nodes-base/nodes/Netlify/GenericFunctions.ts index 834d9de2a0..b609e43f3c 100644 --- a/packages/nodes-base/nodes/Netlify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Netlify/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function netlifyApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Notion/GenericFunctions.ts b/packages/nodes-base/nodes/Notion/GenericFunctions.ts index d51bd83b4c..74c7af01e8 100644 --- a/packages/nodes-base/nodes/Notion/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Notion/GenericFunctions.ts @@ -9,8 +9,6 @@ import { import { IBinaryKeyData, - ICredentialDataDecryptedObject, - ICredentialTestFunctions, IDataObject, IDisplayOptions, INodeExecutionData, diff --git a/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts b/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts index 745c1f55a7..ed44cd01dc 100644 --- a/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts +++ b/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts @@ -1,12 +1,8 @@ import { IExecuteFunctions } from 'n8n-core'; import { - ICredentialDataDecryptedObject, - ICredentialsDecrypted, - ICredentialTestFunctions, IDataObject, ILoadOptionsFunctions, - INodeCredentialTestResult, INodeExecutionData, INodePropertyOptions, INodeType, diff --git a/packages/nodes-base/nodes/OneSimpleApi/GenericFunctions.ts b/packages/nodes-base/nodes/OneSimpleApi/GenericFunctions.ts index 4cee639308..42bf45f14e 100644 --- a/packages/nodes-base/nodes/OneSimpleApi/GenericFunctions.ts +++ b/packages/nodes-base/nodes/OneSimpleApi/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function oneSimpleApiRequest( this: IExecuteFunctions, diff --git a/packages/nodes-base/nodes/Onfleet/GenericFunctions.ts b/packages/nodes-base/nodes/Onfleet/GenericFunctions.ts index 8a1b1ed9d5..fb4d0c04cd 100644 --- a/packages/nodes-base/nodes/Onfleet/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Onfleet/GenericFunctions.ts @@ -1,5 +1,4 @@ import { - ICredentialDataDecryptedObject, IDataObject, IExecuteFunctions, IHookFunctions, diff --git a/packages/nodes-base/nodes/Onfleet/descriptions/WebhookDescription.ts b/packages/nodes-base/nodes/Onfleet/descriptions/WebhookDescription.ts index ccbb75bd32..a94c7e690a 100644 --- a/packages/nodes-base/nodes/Onfleet/descriptions/WebhookDescription.ts +++ b/packages/nodes-base/nodes/Onfleet/descriptions/WebhookDescription.ts @@ -58,7 +58,7 @@ const triggerField = { displayName: 'Trigger', name: 'trigger', type: 'options', - options: Object.entries(webhookMapping).map(([key, value]) => { + options: Object.entries(webhookMapping).map(([_key, value]) => { return { name: value.name, value: value.key, diff --git a/packages/nodes-base/nodes/Orbit/GenericFunctions.ts b/packages/nodes-base/nodes/Orbit/GenericFunctions.ts index e4d8a98437..f5a5ba79b3 100644 --- a/packages/nodes-base/nodes/Orbit/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Orbit/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import { IRelation } from './Interfaces'; diff --git a/packages/nodes-base/nodes/Oura/GenericFunctions.ts b/packages/nodes-base/nodes/Oura/GenericFunctions.ts index 0eefbd1041..368690b58d 100644 --- a/packages/nodes-base/nodes/Oura/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Oura/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function ouraApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Paddle/GenericFunctions.ts b/packages/nodes-base/nodes/Paddle/GenericFunctions.ts index 128bbb64d7..1ac516e75c 100644 --- a/packages/nodes-base/nodes/Paddle/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Paddle/GenericFunctions.ts @@ -8,7 +8,7 @@ import { IWebhookFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function paddleApiRequest( this: @@ -21,8 +21,8 @@ export async function paddleApiRequest( method: string, // tslint:disable-next-line:no-any body: any = {}, - query?: IDataObject, - uri?: string, + _query?: IDataObject, + _uri?: string, // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('paddleApi'); diff --git a/packages/nodes-base/nodes/PagerDuty/GenericFunctions.ts b/packages/nodes-base/nodes/PagerDuty/GenericFunctions.ts index 969409ea3e..d6d61b7cd1 100644 --- a/packages/nodes-base/nodes/PagerDuty/GenericFunctions.ts +++ b/packages/nodes-base/nodes/PagerDuty/GenericFunctions.ts @@ -2,13 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { - IDataObject, - IHookFunctions, - IWebhookFunctions, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, IHookFunctions, IWebhookFunctions, NodeApiError } from 'n8n-workflow'; import { snakeCase } from 'change-case'; diff --git a/packages/nodes-base/nodes/PayPal/PayPalTrigger.node.ts b/packages/nodes-base/nodes/PayPal/PayPalTrigger.node.ts index 3db5263983..715e5d4fdc 100644 --- a/packages/nodes-base/nodes/PayPal/PayPalTrigger.node.ts +++ b/packages/nodes-base/nodes/PayPal/PayPalTrigger.node.ts @@ -8,7 +8,6 @@ import { INodeTypeDescription, IWebhookResponseData, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; import { payPalApiRequest, upperFist } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/PayPal/PaymentInteface.ts b/packages/nodes-base/nodes/PayPal/PaymentInteface.ts index b77bbc06de..53b2ec1457 100644 --- a/packages/nodes-base/nodes/PayPal/PaymentInteface.ts +++ b/packages/nodes-base/nodes/PayPal/PaymentInteface.ts @@ -1,5 +1,3 @@ -import { IDataObject } from 'n8n-workflow'; - export enum RecipientType { email = 'EMAIL', phone = 'PHONE', diff --git a/packages/nodes-base/nodes/Peekalink/GenericFunctions.ts b/packages/nodes-base/nodes/Peekalink/GenericFunctions.ts index 633245fbac..2fba88679d 100644 --- a/packages/nodes-base/nodes/Peekalink/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Peekalink/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function peekalinkApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Peekalink/Peekalink.node.ts b/packages/nodes-base/nodes/Peekalink/Peekalink.node.ts index e602a54a37..a28fdc4658 100644 --- a/packages/nodes-base/nodes/Peekalink/Peekalink.node.ts +++ b/packages/nodes-base/nodes/Peekalink/Peekalink.node.ts @@ -61,7 +61,6 @@ export class Peekalink implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; const length = items.length; - const qs: IDataObject = {}; let responseData; const operation = this.getNodeParameter('operation', 0) as string; diff --git a/packages/nodes-base/nodes/Phantombuster/GenericFunctions.ts b/packages/nodes-base/nodes/Phantombuster/GenericFunctions.ts index bf6a1eb8a0..db7215e1a1 100644 --- a/packages/nodes-base/nodes/Phantombuster/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Phantombuster/GenericFunctions.ts @@ -11,14 +11,11 @@ export async function phantombusterApiRequest( // tslint:disable-next-line:no-any body: any = {}, qs: IDataObject = {}, - option = {}, + _option = {}, // tslint:disable-next-line:no-any ): Promise { - const credentials = await this.getCredentials('phantombusterApi'); - const options: OptionsWithUri = { - headers: { - }, + headers: {}, method, body, qs, @@ -30,7 +27,7 @@ export async function phantombusterApiRequest( delete options.body; } //@ts-ignore - return await this.helpers.requestWithAuthentication.call(this, 'phantombusterApi',options); + return await this.helpers.requestWithAuthentication.call(this, 'phantombusterApi', options); } catch (error) { throw new NodeApiError(this.getNode(), error); } diff --git a/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts b/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts index 75e066d3be..1861c08d5c 100644 --- a/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts +++ b/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts @@ -90,7 +90,6 @@ export class PhilipsHue implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; 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; diff --git a/packages/nodes-base/nodes/Plivo/GenericFunctions.ts b/packages/nodes-base/nodes/Plivo/GenericFunctions.ts index ea6dd9b112..f511d41813 100644 --- a/packages/nodes-base/nodes/Plivo/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Plivo/GenericFunctions.ts @@ -1,6 +1,6 @@ import { IExecuteFunctions, IHookFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import { OptionsWithUri } from 'request'; diff --git a/packages/nodes-base/nodes/PostBin/GenericFunctions.ts b/packages/nodes-base/nodes/PostBin/GenericFunctions.ts index 02975b0220..b396453e8f 100644 --- a/packages/nodes-base/nodes/PostBin/GenericFunctions.ts +++ b/packages/nodes-base/nodes/PostBin/GenericFunctions.ts @@ -97,7 +97,7 @@ function parseBinId(context: IExecuteSingleFunctions) { export async function transformBinReponse( this: IExecuteSingleFunctions, items: INodeExecutionData[], - response: IN8nHttpFullResponse, + _response: IN8nHttpFullResponse, ): Promise { items.forEach( (item) => diff --git a/packages/nodes-base/nodes/PostHog/GenericFunctions.ts b/packages/nodes-base/nodes/PostHog/GenericFunctions.ts index fdc8f330ff..72de1695cc 100644 --- a/packages/nodes-base/nodes/PostHog/GenericFunctions.ts +++ b/packages/nodes-base/nodes/PostHog/GenericFunctions.ts @@ -11,7 +11,7 @@ export async function posthogApiRequest( // tslint:disable-next-line:no-any body: any = {}, qs: IDataObject = {}, - option = {}, + _option = {}, // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('postHogApi'); diff --git a/packages/nodes-base/nodes/PostHog/PostHog.node.ts b/packages/nodes-base/nodes/PostHog/PostHog.node.ts index 58efb13d50..8db359b861 100644 --- a/packages/nodes-base/nodes/PostHog/PostHog.node.ts +++ b/packages/nodes-base/nodes/PostHog/PostHog.node.ts @@ -75,7 +75,6 @@ export class PostHog implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; 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; diff --git a/packages/nodes-base/nodes/Postgres/Postgres.node.ts b/packages/nodes-base/nodes/Postgres/Postgres.node.ts index 1ecd8c0581..bd72e7f8f6 100644 --- a/packages/nodes-base/nodes/Postgres/Postgres.node.ts +++ b/packages/nodes-base/nodes/Postgres/Postgres.node.ts @@ -12,7 +12,7 @@ import { import pgPromise from 'pg-promise'; -import { pgInsert, pgInsertV2, pgQuery, pgQueryV2, pgUpdate } from './Postgres.node.functions'; +import { pgInsertV2, pgQueryV2, pgUpdate } from './Postgres.node.functions'; export class Postgres implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Postmark/GenericFunctions.ts b/packages/nodes-base/nodes/Postmark/GenericFunctions.ts index 10ec0b3222..a243ef4d27 100644 --- a/packages/nodes-base/nodes/Postmark/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Postmark/GenericFunctions.ts @@ -2,13 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { - IDataObject, - IHookFunctions, - IWebhookFunctions, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, IHookFunctions, IWebhookFunctions, NodeApiError } from 'n8n-workflow'; export async function postmarkApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/ProfitWell/GenericFunctions.ts b/packages/nodes-base/nodes/ProfitWell/GenericFunctions.ts index 4278e1e386..7ff64f102f 100644 --- a/packages/nodes-base/nodes/ProfitWell/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ProfitWell/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function profitWellApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Pushcut/Pushcut.node.ts b/packages/nodes-base/nodes/Pushcut/Pushcut.node.ts index 7afcdfb3c9..090291dee8 100644 --- a/packages/nodes-base/nodes/Pushcut/Pushcut.node.ts +++ b/packages/nodes-base/nodes/Pushcut/Pushcut.node.ts @@ -168,7 +168,6 @@ export class Pushcut implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; 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; diff --git a/packages/nodes-base/nodes/Pushover/GenericFunctions.ts b/packages/nodes-base/nodes/Pushover/GenericFunctions.ts index f404c7123c..87e49a9ef5 100644 --- a/packages/nodes-base/nodes/Pushover/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Pushover/GenericFunctions.ts @@ -1,5 +1,3 @@ -import { OptionsWithUri } from 'request'; - import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core'; import { IDataObject, IHttpRequestMethods, IHttpRequestOptions, NodeApiError } from 'n8n-workflow'; @@ -11,7 +9,7 @@ export async function pushoverApiRequest( // tslint:disable-next-line:no-any body: any = {}, qs: IDataObject = {}, - option = {}, + _option = {}, // tslint:disable-next-line:no-any ): Promise { const options: IHttpRequestOptions = { diff --git a/packages/nodes-base/nodes/Pushover/Pushover.node.ts b/packages/nodes-base/nodes/Pushover/Pushover.node.ts index a5fee3a1d3..d5b83abd64 100644 --- a/packages/nodes-base/nodes/Pushover/Pushover.node.ts +++ b/packages/nodes-base/nodes/Pushover/Pushover.node.ts @@ -301,7 +301,6 @@ export class Pushover implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; 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; diff --git a/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts b/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts index ba959b6995..f77aeedf20 100644 --- a/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts +++ b/packages/nodes-base/nodes/QuickBase/QuickBase.node.ts @@ -120,7 +120,6 @@ export class QuickBase implements INodeType { const returnData: INodeExecutionData[] = []; const length = items.length; const qs: IDataObject = {}; - const headers: IDataObject = {}; let responseData; const resource = this.getNodeParameter('resource', 0) as string; const operation = this.getNodeParameter('operation', 0) as string; @@ -392,7 +391,10 @@ export class QuickBase implements INodeType { if (operation === 'update') { const tableId = this.getNodeParameter('tableId', 0) as string; - const { fieldsLabelKey, fieldsIdKey } = await getFieldsObject.call(this, tableId); + const { fieldsLabelKey: _fieldsLabelKey, fieldsIdKey } = await getFieldsObject.call( + this, + tableId, + ); const simple = this.getNodeParameter('simple', 0) as boolean; diff --git a/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts b/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts index 4701741e1c..ccd20489a0 100644 --- a/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts +++ b/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts @@ -50,7 +50,7 @@ import { capitalCase } from 'change-case'; import { isEmpty } from 'lodash'; -import { DateFieldsUi, QuickBooksOAuth2Credentials, TransactionFields } from './types'; +import { QuickBooksOAuth2Credentials, TransactionFields } from './types'; export class QuickBooks implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Reddit/GenericFunctions.ts b/packages/nodes-base/nodes/Reddit/GenericFunctions.ts index 8ad63ab84f..55d03339b3 100644 --- a/packages/nodes-base/nodes/Reddit/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Reddit/GenericFunctions.ts @@ -1,6 +1,6 @@ import { IExecuteFunctions, IHookFunctions } from 'n8n-core'; -import { IDataObject, JsonObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, JsonObject, NodeApiError } from 'n8n-workflow'; import { OptionsWithUri } from 'request'; diff --git a/packages/nodes-base/nodes/Redis/Redis.node.ts b/packages/nodes-base/nodes/Redis/Redis.node.ts index b246bee865..5a7f5ee804 100644 --- a/packages/nodes-base/nodes/Redis/Redis.node.ts +++ b/packages/nodes-base/nodes/Redis/Redis.node.ts @@ -513,7 +513,7 @@ export class Redis implements INodeType { try { const client = await redis.createClient(redisOptions); // tslint:disable-next-line: no-any - const data = await new Promise((resolve, reject): any => { + const _data = await new Promise((resolve, reject): any => { client.on('connect', async () => { client.ping('ping', (error, pong) => { if (error) reject(error); @@ -677,7 +677,7 @@ export class Redis implements INodeType { reject(err); }); - client.on('ready', async (err: Error | null) => { + client.on('ready', async (_err: Error | null) => { client.select(credentials.database as number); try { if (operation === 'info') { diff --git a/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts b/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts index bd79bc73a8..5ccef91b6c 100644 --- a/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts +++ b/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts @@ -88,7 +88,7 @@ export class RssFeedRead implements INodeType { function validateURL(url: string) { try { - const parseUrl = new URL(url); + const _parseUrl = new URL(url); return true; } catch (err) { return false; diff --git a/packages/nodes-base/nodes/Salesmate/GenericFunctions.ts b/packages/nodes-base/nodes/Salesmate/GenericFunctions.ts index e721bb1258..3b2231ed5b 100644 --- a/packages/nodes-base/nodes/Salesmate/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Salesmate/GenericFunctions.ts @@ -6,7 +6,7 @@ import { ILoadOptionsFunctions, IWebhookFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function salesmateApiRequest( this: @@ -21,7 +21,7 @@ export async function salesmateApiRequest( body: any = {}, qs: IDataObject = {}, uri?: string, - option: IDataObject = {}, + _option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('salesmateApi'); diff --git a/packages/nodes-base/nodes/SeaTable/GenericFunctions.ts b/packages/nodes-base/nodes/SeaTable/GenericFunctions.ts index 71c5be2814..be6f1a1617 100644 --- a/packages/nodes-base/nodes/SeaTable/GenericFunctions.ts +++ b/packages/nodes-base/nodes/SeaTable/GenericFunctions.ts @@ -243,10 +243,6 @@ export function rowDeleteInternalColumns(row: IRow): IRow { return row; } -export function rowsDeleteInternalColumns(rows: IRow[]) { - rows = rows.map(rowDeleteInternalColumns); -} - function rowFormatColumn(input: unknown): boolean | number | string | string[] | null { if (null === input || undefined === input) { return null; diff --git a/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts b/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts index cb4f674fa3..4d23e36609 100644 --- a/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts +++ b/packages/nodes-base/nodes/SeaTable/SeaTableTrigger.node.ts @@ -1,7 +1,6 @@ import { IPollFunctions } from 'n8n-core'; import { - IDataObject, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, diff --git a/packages/nodes-base/nodes/SecurityScorecard/GenericFunctions.ts b/packages/nodes-base/nodes/SecurityScorecard/GenericFunctions.ts index 69d412aee8..89a83223a8 100644 --- a/packages/nodes-base/nodes/SecurityScorecard/GenericFunctions.ts +++ b/packages/nodes-base/nodes/SecurityScorecard/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function scorecardApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Segment/GenericFunctions.ts b/packages/nodes-base/nodes/Segment/GenericFunctions.ts index 8d963ac853..03c1c5c260 100644 --- a/packages/nodes-base/nodes/Segment/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Segment/GenericFunctions.ts @@ -6,7 +6,7 @@ import { ILoadOptionsFunctions, IWebhookFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function segmentApiRequest( this: @@ -20,7 +20,7 @@ export async function segmentApiRequest( body: any = {}, // tslint:disable-line:no-any qs: IDataObject = {}, uri?: string, - option: IDataObject = {}, + _option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { diff --git a/packages/nodes-base/nodes/Segment/Segment.node.ts b/packages/nodes-base/nodes/Segment/Segment.node.ts index d1f3df69ee..3f66095c12 100644 --- a/packages/nodes-base/nodes/Segment/Segment.node.ts +++ b/packages/nodes-base/nodes/Segment/Segment.node.ts @@ -74,7 +74,6 @@ export class Segment implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; 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; diff --git a/packages/nodes-base/nodes/SendInBlue/AttributeDescription.ts b/packages/nodes-base/nodes/SendInBlue/AttributeDescription.ts index 2ec5524fd0..5343543262 100644 --- a/packages/nodes-base/nodes/SendInBlue/AttributeDescription.ts +++ b/packages/nodes-base/nodes/SendInBlue/AttributeDescription.ts @@ -1,7 +1,6 @@ import { IExecuteSingleFunctions, IHttpRequestOptions, - INodeExecutionData, INodeProperties, JsonObject, } from 'n8n-workflow'; diff --git a/packages/nodes-base/nodes/SendInBlue/EmailDescription.ts b/packages/nodes-base/nodes/SendInBlue/EmailDescription.ts index 241a4e56a3..f161818bf1 100644 --- a/packages/nodes-base/nodes/SendInBlue/EmailDescription.ts +++ b/packages/nodes-base/nodes/SendInBlue/EmailDescription.ts @@ -1,4 +1,4 @@ -import { IExecuteSingleFunctions, IHttpRequestOptions, INodeProperties } from 'n8n-workflow'; +import { INodeProperties } from 'n8n-workflow'; import { SendInBlueNode } from './GenericFunctions'; export const emailOperations: INodeProperties[] = [ diff --git a/packages/nodes-base/nodes/SendInBlue/SendInBlueTrigger.node.ts b/packages/nodes-base/nodes/SendInBlue/SendInBlueTrigger.node.ts index 57e4a71dda..8a9a20f77a 100644 --- a/packages/nodes-base/nodes/SendInBlue/SendInBlueTrigger.node.ts +++ b/packages/nodes-base/nodes/SendInBlue/SendInBlueTrigger.node.ts @@ -6,7 +6,6 @@ import { INodeTypeDescription, IWebhookFunctions, IWebhookResponseData, - NodeOperationError, } from 'n8n-workflow'; import { SendInBlueWebhookApi } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/SendInBlue/SenderDescrition.ts b/packages/nodes-base/nodes/SendInBlue/SenderDescrition.ts index 550d0465e7..c14cbf10b2 100644 --- a/packages/nodes-base/nodes/SendInBlue/SenderDescrition.ts +++ b/packages/nodes-base/nodes/SendInBlue/SenderDescrition.ts @@ -1,4 +1,4 @@ -import { IExecuteSingleFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow'; +import { INodeProperties } from 'n8n-workflow'; export const senderOperations: INodeProperties[] = [ { diff --git a/packages/nodes-base/nodes/Sendy/GenericFunctions.ts b/packages/nodes-base/nodes/Sendy/GenericFunctions.ts index 96b2bd22ca..15df82202f 100644 --- a/packages/nodes-base/nodes/Sendy/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Sendy/GenericFunctions.ts @@ -11,7 +11,7 @@ export async function sendyApiRequest( // tslint:disable-next-line:no-any body: any = {}, qs: IDataObject = {}, - option = {}, + _option = {}, // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('sendyApi'); diff --git a/packages/nodes-base/nodes/Sendy/Sendy.node.ts b/packages/nodes-base/nodes/Sendy/Sendy.node.ts index d562a4e560..1b3b123a6d 100644 --- a/packages/nodes-base/nodes/Sendy/Sendy.node.ts +++ b/packages/nodes-base/nodes/Sendy/Sendy.node.ts @@ -65,7 +65,6 @@ export class Sendy implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; 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; diff --git a/packages/nodes-base/nodes/ServiceNow/GenericFunctions.ts b/packages/nodes-base/nodes/ServiceNow/GenericFunctions.ts index 088f9611f1..7a30f18313 100644 --- a/packages/nodes-base/nodes/ServiceNow/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ServiceNow/GenericFunctions.ts @@ -112,7 +112,7 @@ export async function serviceNowDownloadAttachment( return binaryData; } -export const mapEndpoint = (resource: string, operation: string) => { +export const mapEndpoint = (resource: string, _operation: string) => { const resourceEndpoint = new Map([ ['attachment', 'sys_dictionary'], ['tableRecord', 'sys_dictionary'], diff --git a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts index 4a5f7f7e9b..9d39ff8d76 100644 --- a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts +++ b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts @@ -7,7 +7,6 @@ import { INodePropertyOptions, INodeType, INodeTypeDescription, - JsonObject, NodeOperationError, } from 'n8n-workflow'; diff --git a/packages/nodes-base/nodes/Shopify/GenericFunctions.ts b/packages/nodes-base/nodes/Shopify/GenericFunctions.ts index 3c014d71f4..74558de796 100644 --- a/packages/nodes-base/nodes/Shopify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Shopify/GenericFunctions.ts @@ -1,7 +1,6 @@ import { OptionsWithUri } from 'request'; import { - BINARY_ENCODING, IExecuteFunctions, IExecuteSingleFunctions, IHookFunctions, diff --git a/packages/nodes-base/nodes/Signl4/Signl4.node.ts b/packages/nodes-base/nodes/Signl4/Signl4.node.ts index 3528a56c79..e98df22493 100644 --- a/packages/nodes-base/nodes/Signl4/Signl4.node.ts +++ b/packages/nodes-base/nodes/Signl4/Signl4.node.ts @@ -233,7 +233,6 @@ export class Signl4 implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; 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; diff --git a/packages/nodes-base/nodes/Sms77/GenericFunctions.ts b/packages/nodes-base/nodes/Sms77/GenericFunctions.ts index 9b8997cefb..cb73b4af04 100644 --- a/packages/nodes-base/nodes/Sms77/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Sms77/GenericFunctions.ts @@ -1,6 +1,6 @@ import { IExecuteFunctions, IHookFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import { OptionsWithUri } from 'request'; diff --git a/packages/nodes-base/nodes/Sms77/Sms77.node.ts b/packages/nodes-base/nodes/Sms77/Sms77.node.ts index 809683dcd8..f4d3571734 100644 --- a/packages/nodes-base/nodes/Sms77/Sms77.node.ts +++ b/packages/nodes-base/nodes/Sms77/Sms77.node.ts @@ -1,12 +1,6 @@ import { IExecuteFunctions } from 'n8n-core'; -import { - IDataObject, - INodeExecutionData, - INodeType, - INodeTypeDescription, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow'; import { sms77ApiRequest } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Snowflake/GenericFunctions.ts b/packages/nodes-base/nodes/Snowflake/GenericFunctions.ts index accb3c1cbd..389187e3bc 100644 --- a/packages/nodes-base/nodes/Snowflake/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Snowflake/GenericFunctions.ts @@ -4,7 +4,7 @@ import snowflake from 'snowflake-sdk'; export function connect(conn: snowflake.Connection) { return new Promise((resolve, reject) => { - conn.connect((err, conn) => { + conn.connect((err, _conn) => { if (!err) { // @ts-ignore resolve(); @@ -17,7 +17,7 @@ export function connect(conn: snowflake.Connection) { export function destroy(conn: snowflake.Connection) { return new Promise((resolve, reject) => { - conn.destroy((err, conn) => { + conn.destroy((err, _conn) => { if (!err) { // @ts-ignore resolve(); diff --git a/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts b/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts index 5bc0ea2f31..2e566a6e31 100644 --- a/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts +++ b/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts @@ -189,7 +189,7 @@ export class Snowflake implements INodeType { const columnString = this.getNodeParameter('columns', 0) as string; const columns = columnString.split(',').map((column) => column.trim()); const query = `INSERT INTO ${table}(${columns.join(',')}) VALUES (${columns - .map((column) => '?') + .map((_column) => '?') .join(',')})`; const data = copyInputItems(items, columns); const binds = data.map((element) => Object.values(element)); diff --git a/packages/nodes-base/nodes/Spotify/GenericFunctions.ts b/packages/nodes-base/nodes/Spotify/GenericFunctions.ts index ae038d2137..20655a9410 100644 --- a/packages/nodes-base/nodes/Spotify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Spotify/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IHookFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import { get } from 'lodash'; diff --git a/packages/nodes-base/nodes/Ssh/Ssh.node.ts b/packages/nodes-base/nodes/Ssh/Ssh.node.ts index 3f15c3655a..0b5c45ecc7 100644 --- a/packages/nodes-base/nodes/Ssh/Ssh.node.ts +++ b/packages/nodes-base/nodes/Ssh/Ssh.node.ts @@ -2,7 +2,6 @@ import { IExecuteFunctions } from 'n8n-core'; import { IBinaryData, - IDataObject, INodeExecutionData, INodeType, INodeTypeDescription, diff --git a/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts b/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts index 105ed3a410..c135e8bffe 100644 --- a/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts +++ b/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts @@ -9,14 +9,12 @@ import { INodeTypeDescription, } from 'n8n-workflow'; -import { storyblokApiRequest, storyblokApiRequestAllItems, validateJSON } from './GenericFunctions'; +import { storyblokApiRequest, storyblokApiRequestAllItems } from './GenericFunctions'; import { storyContentFields, storyContentOperations } from './StoryContentDescription'; import { storyManagementFields, storyManagementOperations } from './StoryManagementDescription'; -import { v4 as uuidv4 } from 'uuid'; - export class Storyblok implements INodeType { description: INodeTypeDescription = { displayName: 'Storyblok', diff --git a/packages/nodes-base/nodes/Strava/StravaTrigger.node.ts b/packages/nodes-base/nodes/Strava/StravaTrigger.node.ts index d78cac239f..cf34431716 100644 --- a/packages/nodes-base/nodes/Strava/StravaTrigger.node.ts +++ b/packages/nodes-base/nodes/Strava/StravaTrigger.node.ts @@ -1,12 +1,6 @@ import { IHookFunctions, IWebhookFunctions } from 'n8n-core'; -import { - IDataObject, - INodeType, - INodeTypeDescription, - IWebhookResponseData, - NodeApiError, -} from 'n8n-workflow'; +import { IDataObject, INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow'; import { stravaApiRequest } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Stripe/StripeTrigger.node.ts b/packages/nodes-base/nodes/Stripe/StripeTrigger.node.ts index b007265a7b..04f267f9e1 100644 --- a/packages/nodes-base/nodes/Stripe/StripeTrigger.node.ts +++ b/packages/nodes-base/nodes/Stripe/StripeTrigger.node.ts @@ -7,7 +7,6 @@ import { INodeTypeDescription, IWebhookResponseData, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; import { stripeApiRequest } from './helpers'; diff --git a/packages/nodes-base/nodes/Stripe/helpers.ts b/packages/nodes-base/nodes/Stripe/helpers.ts index 35dabb827f..b7ce635fc1 100644 --- a/packages/nodes-base/nodes/Stripe/helpers.ts +++ b/packages/nodes-base/nodes/Stripe/helpers.ts @@ -1,6 +1,6 @@ import { IExecuteFunctions, IHookFunctions } from 'n8n-core'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError } from 'n8n-workflow'; import { flow, isEmpty, omit } from 'lodash'; diff --git a/packages/nodes-base/nodes/Supabase/GenericFunctions.ts b/packages/nodes-base/nodes/Supabase/GenericFunctions.ts index 7d98e391c1..48f06b3ceb 100644 --- a/packages/nodes-base/nodes/Supabase/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Supabase/GenericFunctions.ts @@ -55,7 +55,6 @@ export async function supabaseApiRequest( delete options.body; } return await this.helpers.requestWithAuthentication.call(this, 'supabaseApi', options); - } catch (error) { throw new NodeApiError(this.getNode(), error); } @@ -75,6 +74,7 @@ export function getFilters( includeNoneOption = true, filterTypeDisplayName = 'Filter', filterFixedCollectionDisplayName = 'Filters', + // eslint-disable-next-line @typescript-eslint/no-unused-vars filterStringDisplayName = 'Filters (String)', mustMatchOptions = [ { diff --git a/packages/nodes-base/nodes/SurveyMonkey/GenericFunctions.ts b/packages/nodes-base/nodes/SurveyMonkey/GenericFunctions.ts index 7df2925ea9..8bb1621cc4 100644 --- a/packages/nodes-base/nodes/SurveyMonkey/GenericFunctions.ts +++ b/packages/nodes-base/nodes/SurveyMonkey/GenericFunctions.ts @@ -2,13 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { - IDataObject, - IHookFunctions, - IWebhookFunctions, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, IHookFunctions, IWebhookFunctions, NodeApiError } from 'n8n-workflow'; export async function surveyMonkeyApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts b/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts index 0d4b7d63f7..4012fa711c 100644 --- a/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts +++ b/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts @@ -10,7 +10,6 @@ import { INodeTypeDescription, IWebhookResponseData, jsonParse, - NodeApiError, NodeOperationError, } from 'n8n-workflow'; @@ -496,7 +495,7 @@ export class SurveyMonkeyTrigger implements INodeType { return {}; } - return new Promise((resolve, reject) => { + return new Promise((resolve, _reject) => { const data: Buffer[] = []; req.on('data', (chunk) => { diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/create/execute.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/create/execute.ts index 0aa4dbca54..43a33f6858 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/create/execute.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/ticket/create/execute.ts @@ -10,7 +10,7 @@ export async function createTicket( ): Promise { const id = this.getNodeParameter('customerId', index) as IDataObject; const subject = this.getNodeParameter('subject', index) as IDataObject; - const { assetId, dueDate, issueType, status, contactId } = this.getNodeParameter( + const { assetId, issueType, status, contactId } = this.getNodeParameter( 'additionalFields', index, ) as IDataObject; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/methods/loadOptions.ts b/packages/nodes-base/nodes/SyncroMSP/v1/methods/loadOptions.ts index 71fbb0c3fa..c28ad76133 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/methods/loadOptions.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/methods/loadOptions.ts @@ -1,9 +1,4 @@ -import { - IDataObject, - ILoadOptionsFunctions, - INodePropertyOptions, - NodeOperationError, -} from 'n8n-workflow'; +import { ILoadOptionsFunctions, INodePropertyOptions, NodeOperationError } from 'n8n-workflow'; import { apiRequestAllItems } from '../transport'; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/transport/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/transport/index.ts index 28ffee3493..b7da0d4f9e 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/transport/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/transport/index.ts @@ -7,7 +7,6 @@ import { IDataObject, IHttpRequestOptions, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; /** diff --git a/packages/nodes-base/nodes/Taiga/TaigaTrigger.node.ts b/packages/nodes-base/nodes/Taiga/TaigaTrigger.node.ts index 45e8c19c78..ede704902a 100644 --- a/packages/nodes-base/nodes/Taiga/TaigaTrigger.node.ts +++ b/packages/nodes-base/nodes/Taiga/TaigaTrigger.node.ts @@ -1,5 +1,4 @@ import { - ICredentialDataDecryptedObject, IDataObject, ILoadOptionsFunctions, INodePropertyOptions, diff --git a/packages/nodes-base/nodes/Telegram/GenericFunctions.ts b/packages/nodes-base/nodes/Telegram/GenericFunctions.ts index 479c58d441..8e17e10221 100644 --- a/packages/nodes-base/nodes/Telegram/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Telegram/GenericFunctions.ts @@ -7,7 +7,7 @@ import { import { OptionsWithUri } from 'request'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; // Interface in n8n export interface IMarkupKeyboard { diff --git a/packages/nodes-base/nodes/TheHive/GenericFunctions.ts b/packages/nodes-base/nodes/TheHive/GenericFunctions.ts index c769000dd3..e940916a30 100644 --- a/packages/nodes-base/nodes/TheHive/GenericFunctions.ts +++ b/packages/nodes-base/nodes/TheHive/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, jsonParse, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, jsonParse, NodeApiError } from 'n8n-workflow'; import moment from 'moment'; import { Eq } from './QueryFunctions'; diff --git a/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts b/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts index 8d288e5197..7eeb47465d 100644 --- a/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts +++ b/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts @@ -1,7 +1,6 @@ import { IExecuteFunctions } from 'n8n-core'; import { - IDataObject, INodeExecutionData, INodeType, INodeTypeDescription, diff --git a/packages/nodes-base/nodes/Todoist/OperationHandler.ts b/packages/nodes-base/nodes/Todoist/OperationHandler.ts index 367272a192..23998e6f7a 100644 --- a/packages/nodes-base/nodes/Todoist/OperationHandler.ts +++ b/packages/nodes-base/nodes/Todoist/OperationHandler.ts @@ -74,7 +74,7 @@ export class DeleteHandler implements OperationHandler { async handleOperation(ctx: Context, itemIndex: number): Promise { const id = ctx.getNodeParameter('taskId', itemIndex) as string; - const responseData = await todoistApiRequest.call(ctx, 'DELETE', `/tasks/${id}`); + await todoistApiRequest.call(ctx, 'DELETE', `/tasks/${id}`); return { success: true, diff --git a/packages/nodes-base/nodes/Todoist/Todoist.node.ts b/packages/nodes-base/nodes/Todoist/Todoist.node.ts index a3ab2253e8..168109a9ba 100644 --- a/packages/nodes-base/nodes/Todoist/Todoist.node.ts +++ b/packages/nodes-base/nodes/Todoist/Todoist.node.ts @@ -1,4 +1,3 @@ -import { response } from 'express'; import { IExecuteFunctions } from 'n8n-core'; import { @@ -13,20 +12,21 @@ import { import { todoistApiRequest } from './GenericFunctions'; import { OperationType, TodoistService } from './Service'; -interface IBodyCreateTask { - content?: string; - description?: string; - project_id?: number; - section_id?: number; - parent_id?: number; - order?: number; - label_ids?: number[]; - priority?: number; - due_string?: string; - due_datetime?: string; - due_date?: string; - due_lang?: string; -} + +// interface IBodyCreateTask { +// content?: string; +// description?: string; +// project_id?: number; +// section_id?: number; +// parent_id?: number; +// order?: number; +// label_ids?: number[]; +// priority?: number; +// due_string?: string; +// due_datetime?: string; +// due_date?: string; +// due_lang?: string; +// } export class Todoist implements INodeType { description: INodeTypeDescription = { diff --git a/packages/nodes-base/nodes/Toggl/GenericFunctions.ts b/packages/nodes-base/nodes/Toggl/GenericFunctions.ts index 5b0c7c928c..2ebeb189b0 100644 --- a/packages/nodes-base/nodes/Toggl/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Toggl/GenericFunctions.ts @@ -9,7 +9,7 @@ import { ITriggerFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function togglApiRequest( this: diff --git a/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts b/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts index ae41695097..585167ceba 100644 --- a/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts +++ b/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import { get } from 'lodash'; diff --git a/packages/nodes-base/nodes/Trello/Trello.node.ts b/packages/nodes-base/nodes/Trello/Trello.node.ts index ad1050adfe..5e5d434efc 100644 --- a/packages/nodes-base/nodes/Trello/Trello.node.ts +++ b/packages/nodes-base/nodes/Trello/Trello.node.ts @@ -34,10 +34,6 @@ interface TrelloBoardType { desc: string; } -// We retrieve the same fields. This is just to make it clear it's not actually -// getting boards back. -type TrelloCardType = TrelloBoardType; - export class Trello implements INodeType { description: INodeTypeDescription = { displayName: 'Trello', diff --git a/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts b/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts index c184695249..cf3941832f 100644 --- a/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts +++ b/packages/nodes-base/nodes/Trello/TrelloTrigger.node.ts @@ -1,11 +1,6 @@ import { IHookFunctions, IWebhookFunctions } from 'n8n-core'; -import { - INodeType, - INodeTypeDescription, - IWebhookResponseData, - NodeOperationError, -} from 'n8n-workflow'; +import { INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow'; import { apiRequest } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Twake/GenericFunctions.ts b/packages/nodes-base/nodes/Twake/GenericFunctions.ts index d671073f42..30d46ce2ba 100644 --- a/packages/nodes-base/nodes/Twake/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Twake/GenericFunctions.ts @@ -1,5 +1,5 @@ import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { NodeApiError } from 'n8n-workflow'; import { OptionsWithUri } from 'request'; @@ -14,10 +14,7 @@ export async function twakeApiRequest( body: object, query?: object, uri?: string, - // tslint:disable-next-line:no-any -): Promise { - const authenticationMethod = this.getNodeParameter('twakeVersion', 0, 'twakeCloudApi') as string; - +) { const options: OptionsWithUri = { headers: {}, method, diff --git a/packages/nodes-base/nodes/Twake/Twake.node.ts b/packages/nodes-base/nodes/Twake/Twake.node.ts index be6c5de01d..666335e5cc 100644 --- a/packages/nodes-base/nodes/Twake/Twake.node.ts +++ b/packages/nodes-base/nodes/Twake/Twake.node.ts @@ -185,7 +185,6 @@ export class Twake implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; 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; diff --git a/packages/nodes-base/nodes/Twilio/GenericFunctions.ts b/packages/nodes-base/nodes/Twilio/GenericFunctions.ts index e000559707..3c335285f3 100644 --- a/packages/nodes-base/nodes/Twilio/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Twilio/GenericFunctions.ts @@ -1,6 +1,6 @@ import { IExecuteFunctions, IHookFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import { OptionsWithUri } from 'request'; diff --git a/packages/nodes-base/nodes/Twitter/GenericFunctions.ts b/packages/nodes-base/nodes/Twitter/GenericFunctions.ts index 3bef8e0026..bcdc637bb8 100644 --- a/packages/nodes-base/nodes/Twitter/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Twitter/GenericFunctions.ts @@ -193,7 +193,7 @@ export async function uploadAttachments( // data has not been uploaded yet, so wait for it to be ready if (response.processing_info) { const { check_after_secs } = response.processing_info as IDataObject; - await new Promise((resolve, reject) => { + await new Promise((resolve, _reject) => { setTimeout(() => { // @ts-ignore resolve(); diff --git a/packages/nodes-base/nodes/Typeform/GenericFunctions.ts b/packages/nodes-base/nodes/Typeform/GenericFunctions.ts index 2cb885ccaa..0e9a4659fa 100644 --- a/packages/nodes-base/nodes/Typeform/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Typeform/GenericFunctions.ts @@ -77,7 +77,7 @@ export async function apiRequestAllItems( endpoint: string, body: IDataObject, query?: IDataObject, - dataKey?: string, + _dataKey?: string, // tslint:disable-next-line:no-any ): Promise { if (query === undefined) { diff --git a/packages/nodes-base/nodes/UProc/GenericFunctions.ts b/packages/nodes-base/nodes/UProc/GenericFunctions.ts index 2082d7e79d..2aa7ad121b 100644 --- a/packages/nodes-base/nodes/UProc/GenericFunctions.ts +++ b/packages/nodes-base/nodes/UProc/GenericFunctions.ts @@ -1,5 +1,3 @@ -import { OptionsWithUri } from 'request'; - import { IExecuteFunctions, IExecuteSingleFunctions, @@ -15,7 +13,7 @@ export async function uprocApiRequest( body: any = {}, // tslint:disable-line:no-any qs: IDataObject = {}, uri?: string, - option: IDataObject = {}, + _option: IDataObject = {}, // tslint:disable-next-line:no-any ): Promise { const options: IHttpRequestOptions = { diff --git a/packages/nodes-base/nodes/UProc/UProc.node.ts b/packages/nodes-base/nodes/UProc/UProc.node.ts index 90524b205f..b0913df085 100644 --- a/packages/nodes-base/nodes/UProc/UProc.node.ts +++ b/packages/nodes-base/nodes/UProc/UProc.node.ts @@ -101,7 +101,7 @@ export class UProc implements INodeType { return field.name; }); - const requestPromises = []; + const _requestPromises = []; for (let i = 0; i < length; i++) { try { const toolKey = tool.replace(/([A-Z]+)/g, '-$1').toLowerCase(); diff --git a/packages/nodes-base/nodes/UnleashedSoftware/GenericFunctions.ts b/packages/nodes-base/nodes/UnleashedSoftware/GenericFunctions.ts index f9aced9c05..2a30e83e6d 100644 --- a/packages/nodes-base/nodes/UnleashedSoftware/GenericFunctions.ts +++ b/packages/nodes-base/nodes/UnleashedSoftware/GenericFunctions.ts @@ -7,7 +7,7 @@ import { ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; import { createHmac } from 'crypto'; diff --git a/packages/nodes-base/nodes/Uplead/GenericFunctions.ts b/packages/nodes-base/nodes/Uplead/GenericFunctions.ts index 8ec8c1d88c..9653414ca6 100644 --- a/packages/nodes-base/nodes/Uplead/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Uplead/GenericFunctions.ts @@ -5,7 +5,7 @@ import { IHookFunctions, ILoadOptionsFunctions, } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function upleadApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/UrlScanIo/UrlScanIo.node.ts b/packages/nodes-base/nodes/UrlScanIo/UrlScanIo.node.ts index 0af23227c6..71608b9bab 100644 --- a/packages/nodes-base/nodes/UrlScanIo/UrlScanIo.node.ts +++ b/packages/nodes-base/nodes/UrlScanIo/UrlScanIo.node.ts @@ -8,8 +8,6 @@ import { NodeOperationError, } from 'n8n-workflow'; -import { OptionsWithUri } from 'request'; - import { scanFields, scanOperations } from './descriptions'; import { handleListing, normalizeId, urlScanIoApiRequest } from './GenericFunctions'; diff --git a/packages/nodes-base/nodes/Vero/GenericFunctions.ts b/packages/nodes-base/nodes/Vero/GenericFunctions.ts index aeb7593d50..2a7ef47763 100644 --- a/packages/nodes-base/nodes/Vero/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Vero/GenericFunctions.ts @@ -1,6 +1,6 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function veroApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Vero/Vero.node.ts b/packages/nodes-base/nodes/Vero/Vero.node.ts index 39787de432..3d84bda629 100644 --- a/packages/nodes-base/nodes/Vero/Vero.node.ts +++ b/packages/nodes-base/nodes/Vero/Vero.node.ts @@ -5,7 +5,6 @@ import { INodeType, INodeTypeDescription, NodeApiError, - NodeOperationError, } from 'n8n-workflow'; import { validateJSON, veroApiRequest } from './GenericFunctions'; import { userFields, userOperations } from './UserDescription'; diff --git a/packages/nodes-base/nodes/Vonage/GenericFunctions.ts b/packages/nodes-base/nodes/Vonage/GenericFunctions.ts index c586b5a800..78b3cfeffd 100644 --- a/packages/nodes-base/nodes/Vonage/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Vonage/GenericFunctions.ts @@ -11,7 +11,7 @@ export async function vonageApiRequest( // tslint:disable-next-line:no-any body: any = {}, qs: IDataObject = {}, - option = {}, + _option = {}, // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('vonageApi'); diff --git a/packages/nodes-base/nodes/Vonage/Vonage.node.ts b/packages/nodes-base/nodes/Vonage/Vonage.node.ts index daab2fc53f..c6962ffee1 100644 --- a/packages/nodes-base/nodes/Vonage/Vonage.node.ts +++ b/packages/nodes-base/nodes/Vonage/Vonage.node.ts @@ -398,7 +398,6 @@ export class Vonage implements INodeType { const items = this.getInputData(); const returnData: IDataObject[] = []; 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; diff --git a/packages/nodes-base/nodes/Wait/Wait.node.ts b/packages/nodes-base/nodes/Wait/Wait.node.ts index b5192bb3ec..6b575c42be 100644 --- a/packages/nodes-base/nodes/Wait/Wait.node.ts +++ b/packages/nodes-base/nodes/Wait/Wait.node.ts @@ -679,7 +679,7 @@ export class Wait implements INodeType { // @ts-ignore const form = new formidable.IncomingForm({ multiples: true }); - return new Promise((resolve, reject) => { + return new Promise((resolve, _reject) => { form.parse(req, async (err, data, files) => { const returnItem: INodeExecutionData = { binary: {}, @@ -735,7 +735,7 @@ export class Wait implements INodeType { } if (options.binaryData === true) { - return new Promise((resolve, reject) => { + return new Promise((resolve, _reject) => { const binaryPropertyName = options.binaryPropertyName || 'data'; const data: Buffer[] = []; @@ -864,7 +864,7 @@ export class Wait implements INodeType { if (waitValue < 65000) { // If wait time is shorter than 65 seconds leave execution active because // we just check the database every 60 seconds. - return new Promise((resolve, reject) => { + return new Promise((resolve, _reject) => { setTimeout(() => { resolve([this.getInputData()]); }, waitValue); diff --git a/packages/nodes-base/nodes/Webflow/Webflow.node.ts b/packages/nodes-base/nodes/Webflow/Webflow.node.ts index 5033a1194b..f2cef266c9 100644 --- a/packages/nodes-base/nodes/Webflow/Webflow.node.ts +++ b/packages/nodes-base/nodes/Webflow/Webflow.node.ts @@ -135,7 +135,6 @@ export class Webflow implements INodeType { const resource = this.getNodeParameter('resource', 0) as string; const operation = this.getNodeParameter('operation', 0) as string; - const qs: IDataObject = {}; let responseData; const returnData: INodeExecutionData[] = []; diff --git a/packages/nodes-base/nodes/Webhook/Webhook.node.ts b/packages/nodes-base/nodes/Webhook/Webhook.node.ts index 6ea1fddc59..8eb2ec7eb0 100644 --- a/packages/nodes-base/nodes/Webhook/Webhook.node.ts +++ b/packages/nodes-base/nodes/Webhook/Webhook.node.ts @@ -491,7 +491,7 @@ export class Webhook implements INodeType { // @ts-ignore const form = new formidable.IncomingForm({ multiples: true }); - return new Promise((resolve, reject) => { + return new Promise((resolve, _reject) => { form.parse(req, async (err, data, files) => { const returnItem: INodeExecutionData = { binary: {}, @@ -547,7 +547,7 @@ export class Webhook implements INodeType { } if (options.binaryData === true) { - return new Promise((resolve, reject) => { + return new Promise((resolve, _reject) => { const binaryPropertyName = options.binaryPropertyName || 'data'; const data: Buffer[] = []; diff --git a/packages/nodes-base/nodes/Wise/GenericFunctions.ts b/packages/nodes-base/nodes/Wise/GenericFunctions.ts index 59219a1dfa..6aeb215d78 100644 --- a/packages/nodes-base/nodes/Wise/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Wise/GenericFunctions.ts @@ -6,7 +6,6 @@ import { IDataObject, IHttpRequestOptions, ILoadOptionsFunctions, - INodeExecutionData, NodeApiError, } from 'n8n-workflow'; diff --git a/packages/nodes-base/nodes/WooCommerce/GenericFunctions.ts b/packages/nodes-base/nodes/WooCommerce/GenericFunctions.ts index f88fcd582c..3ec28cda5f 100644 --- a/packages/nodes-base/nodes/WooCommerce/GenericFunctions.ts +++ b/packages/nodes-base/nodes/WooCommerce/GenericFunctions.ts @@ -8,12 +8,7 @@ import { IWebhookFunctions, } from 'n8n-core'; -import { - ICredentialDataDecryptedObject, - IDataObject, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { ICredentialDataDecryptedObject, IDataObject, NodeApiError } from 'n8n-workflow'; import { ICouponLine, IFeeLine, ILineItem, IShoppingLine } from './OrderInterface'; diff --git a/packages/nodes-base/nodes/Wordpress/GenericFunctions.ts b/packages/nodes-base/nodes/Wordpress/GenericFunctions.ts index 506a8fb942..573e48420d 100644 --- a/packages/nodes-base/nodes/Wordpress/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Wordpress/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function wordpressApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Zammad/Zammad.node.ts b/packages/nodes-base/nodes/Zammad/Zammad.node.ts index 5b13e9b751..48ddd38a7e 100644 --- a/packages/nodes-base/nodes/Zammad/Zammad.node.ts +++ b/packages/nodes-base/nodes/Zammad/Zammad.node.ts @@ -440,7 +440,7 @@ export class Zammad implements INodeType { .call(this, 'GET', '/users/search', {}, qs, limit) .then((responseData) => { return responseData.map((user) => { - const { preferences, ...rest } = user; + const { _preferences, ...rest } = user; return rest; }); }); diff --git a/packages/nodes-base/nodes/Zendesk/ZendeskTrigger.node.ts b/packages/nodes-base/nodes/Zendesk/ZendeskTrigger.node.ts index 2bffd348be..5c772ea930 100644 --- a/packages/nodes-base/nodes/Zendesk/ZendeskTrigger.node.ts +++ b/packages/nodes-base/nodes/Zendesk/ZendeskTrigger.node.ts @@ -1,5 +1,3 @@ -import { parse as urlParse } from 'url'; - import { IHookFunctions, IWebhookFunctions } from 'n8n-core'; import { diff --git a/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts b/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts index 459a6e1f98..e3c0ebfd23 100644 --- a/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts +++ b/packages/nodes-base/nodes/Zoho/ZohoCrm.node.ts @@ -23,7 +23,6 @@ import { adjustSalesOrderPayload, adjustVendorPayload, getFields, - getModuleName, getPicklistOptions, handleListing, throwOnEmptyUpdate, @@ -66,7 +65,6 @@ import { vendorFields, vendorOperations, } from './descriptions'; -import { exchangeFields } from '../Marketstack/descriptions'; export class ZohoCrm implements INodeType { description: INodeTypeDescription = { @@ -336,7 +334,6 @@ export class ZohoCrm implements INodeType { const resource = this.getNodeParameter('resource', 0) as CamelCaseResource; const operation = this.getNodeParameter('operation', 0) as string; - const resolveData = this.getNodeParameter('resolveData', 0, false) as boolean; let responseData; diff --git a/packages/nodes-base/nodes/Zoom/GenericFunctions.ts b/packages/nodes-base/nodes/Zoom/GenericFunctions.ts index 6fc67aef36..77f588b19a 100644 --- a/packages/nodes-base/nodes/Zoom/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Zoom/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function zoomApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, @@ -70,7 +70,7 @@ export async function zoomApiRequestAllItems( return returnData; } function wait() { - return new Promise((resolve, reject) => { + return new Promise((resolve, _reject) => { setTimeout(() => { resolve(true); }, 1000); diff --git a/packages/nodes-base/nodes/Zulip/GenericFunctions.ts b/packages/nodes-base/nodes/Zulip/GenericFunctions.ts index 8220ce49db..a5c2bc838d 100644 --- a/packages/nodes-base/nodes/Zulip/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Zulip/GenericFunctions.ts @@ -2,13 +2,7 @@ import { OptionsWithUri } from 'request'; import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { - IDataObject, - IHookFunctions, - IWebhookFunctions, - NodeApiError, - NodeOperationError, -} from 'n8n-workflow'; +import { IDataObject, IHookFunctions, IWebhookFunctions, NodeApiError } from 'n8n-workflow'; export async function zulipApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, diff --git a/packages/nodes-base/nodes/Zulip/Zulip.node.ts b/packages/nodes-base/nodes/Zulip/Zulip.node.ts index 3e172507a1..8e35bdd3be 100644 --- a/packages/nodes-base/nodes/Zulip/Zulip.node.ts +++ b/packages/nodes-base/nodes/Zulip/Zulip.node.ts @@ -130,7 +130,6 @@ export class Zulip implements INodeType { const returnData: IDataObject[] = []; 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; for (let i = 0; i < length; i++) { diff --git a/packages/nodes-base/nodes/utils/allCurrencies.ts b/packages/nodes-base/nodes/utils/allCurrencies.ts index 44b5522a4e..9e8d31403a 100644 --- a/packages/nodes-base/nodes/utils/allCurrencies.ts +++ b/packages/nodes-base/nodes/utils/allCurrencies.ts @@ -1,4 +1,4 @@ -const allCurrencies = [ +export const allCurrencies = [ { name: 'Euro', value: 'eur' }, { name: 'United States Dollar', value: 'usd' }, { name: 'British Pound Sterling', value: 'gbp' },