mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
||||
|
||||
import type { IDataObject, IHookFunctions } from 'n8n-workflow';
|
||||
import type { IDataObject, IHookFunctions, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
export async function kitemakerRequest(
|
||||
@@ -24,7 +24,7 @@ export async function kitemakerRequest(
|
||||
const responseData = await this.helpers.request.call(this, options);
|
||||
|
||||
if (responseData.errors) {
|
||||
throw new NodeApiError(this.getNode(), responseData);
|
||||
throw new NodeApiError(this.getNode(), responseData as JsonObject);
|
||||
}
|
||||
|
||||
return responseData;
|
||||
@@ -56,7 +56,7 @@ export async function kitemakerRequestAllItems(
|
||||
do {
|
||||
responseData = await kitemakerRequest.call(this, body);
|
||||
body.variables.cursor = responseData.data[group].cursor;
|
||||
returnData.push(...responseData.data[group][items]);
|
||||
returnData.push(...(responseData.data[group][items] as IDataObject[]));
|
||||
|
||||
if (!returnAll && returnData.length > limit) {
|
||||
return returnData.slice(0, limit);
|
||||
@@ -66,8 +66,9 @@ export async function kitemakerRequestAllItems(
|
||||
return returnData;
|
||||
}
|
||||
|
||||
export type LoadOptions = { name?: string; username?: string; title?: string; id: string };
|
||||
export function createLoadOptions(
|
||||
resources: Array<{ name?: string; username?: string; title?: string; id: string }>,
|
||||
resources: LoadOptions[],
|
||||
): Array<{ name: string; value: string }> {
|
||||
return resources.map((option) => {
|
||||
if (option.username) return { name: option.username, value: option.id };
|
||||
|
||||
Reference in New Issue
Block a user