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:
@@ -5,6 +5,7 @@ import type {
|
||||
ILoadOptionsFunctions,
|
||||
INodeExecutionData,
|
||||
INodePropertyOptions,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
@@ -87,7 +88,7 @@ export async function quickBooksApiRequest(
|
||||
try {
|
||||
return await this.helpers.requestOAuth2.call(this, 'quickBooksOAuth2Api', options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,9 +133,9 @@ export async function quickBooksApiRequestAllItems(
|
||||
try {
|
||||
const nonResource = originalQuery.split(' ')?.pop();
|
||||
if (nonResource === 'CreditMemo' || nonResource === 'Term' || nonResource === 'TaxCode') {
|
||||
returnData.push(...responseData.QueryResponse[nonResource]);
|
||||
returnData.push(...(responseData.QueryResponse[nonResource] as IDataObject[]));
|
||||
} else {
|
||||
returnData.push(...responseData.QueryResponse[capitalCase(resource)]);
|
||||
returnData.push(...(responseData.QueryResponse[capitalCase(resource)] as IDataObject[]));
|
||||
}
|
||||
} catch (error) {
|
||||
return [];
|
||||
@@ -235,7 +236,7 @@ export async function handleBinaryData(
|
||||
const data = await quickBooksApiRequest.call(this, 'GET', endpoint, {}, {}, { encoding: null });
|
||||
|
||||
items[i].binary = items[i].binary ?? {};
|
||||
items[i].binary![binaryProperty] = await this.helpers.prepareBinaryData(data);
|
||||
items[i].binary![binaryProperty] = await this.helpers.prepareBinaryData(data as Buffer);
|
||||
items[i].binary![binaryProperty].fileName = fileName;
|
||||
items[i].binary![binaryProperty].fileExtension = 'pdf';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user