mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)
This commit is contained in:
@@ -6,6 +6,7 @@ import type {
|
||||
INodePropertyOptions,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
import { leadFields, leadOperations } from './LeadDescription';
|
||||
@@ -82,7 +83,7 @@ export class Intercom implements INodeType {
|
||||
try {
|
||||
response = await intercomApiRequest.call(this, '/companies', 'GET');
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
const companies = response.companies;
|
||||
for (const company of companies) {
|
||||
@@ -201,7 +202,7 @@ export class Intercom implements INodeType {
|
||||
try {
|
||||
responseData = await intercomApiRequest.call(this, '/contacts', 'POST', body);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
if (operation === 'get') {
|
||||
@@ -224,7 +225,7 @@ export class Intercom implements INodeType {
|
||||
responseData = responseData.contacts;
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
@@ -248,7 +249,7 @@ export class Intercom implements INodeType {
|
||||
responseData = responseData.contacts;
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
if (operation === 'delete') {
|
||||
@@ -262,7 +263,7 @@ export class Intercom implements INodeType {
|
||||
responseData = await intercomApiRequest.call(this, '/contacts', 'DELETE', {}, qs);
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -377,7 +378,7 @@ export class Intercom implements INodeType {
|
||||
try {
|
||||
responseData = await intercomApiRequest.call(this, '/users', 'POST', body, qs);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
if (operation === 'get') {
|
||||
@@ -399,7 +400,7 @@ export class Intercom implements INodeType {
|
||||
responseData = await intercomApiRequest.call(this, '/users', 'GET', {}, qs);
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
@@ -423,7 +424,7 @@ export class Intercom implements INodeType {
|
||||
responseData = responseData.users;
|
||||
}
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
if (operation === 'delete') {
|
||||
@@ -614,7 +615,7 @@ export class Intercom implements INodeType {
|
||||
}
|
||||
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData),
|
||||
this.helpers.returnJsonArray(responseData as IDataObject),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user