mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor: Reduce usage of IExecuteSingleFunctions (no-changelog) (#6944)
This commit is contained in:
@@ -1,15 +1,10 @@
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
IExecuteSingleFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
IDataObject,
|
||||
} from 'n8n-workflow';
|
||||
import type { IExecuteFunctions, ILoadOptionsFunctions, IDataObject } from 'n8n-workflow';
|
||||
import { jsonParse } from 'n8n-workflow';
|
||||
import type { ICollection } from './CollectionInterface';
|
||||
import { cockpitApiRequest } from './GenericFunctions';
|
||||
|
||||
export async function createCollectionEntry(
|
||||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
resourceName: string,
|
||||
data: IDataObject,
|
||||
id?: string,
|
||||
@@ -29,7 +24,7 @@ export async function createCollectionEntry(
|
||||
}
|
||||
|
||||
export async function getAllCollectionEntries(
|
||||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
resourceName: string,
|
||||
options: IDataObject,
|
||||
): Promise<any> {
|
||||
@@ -85,7 +80,7 @@ export async function getAllCollectionEntries(
|
||||
}
|
||||
|
||||
export async function getAllCollectionNames(
|
||||
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
): Promise<string[]> {
|
||||
return cockpitApiRequest.call(this, 'GET', '/collections/listCollections', {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user