mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Extract poll context out of NodeExecutionFunctions (no-changelog) (#11449)
This commit is contained in:
committed by
GitHub
parent
ce963e8824
commit
2104fa1733
@@ -731,11 +731,8 @@ export interface ICredentialTestFunctions {
|
||||
};
|
||||
}
|
||||
|
||||
interface BaseHelperFunctions {
|
||||
export interface BaseHelperFunctions {
|
||||
createDeferredPromise: <T = void>() => IDeferredPromise<T>;
|
||||
}
|
||||
|
||||
interface JsonHelperFunctions {
|
||||
returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
||||
}
|
||||
|
||||
@@ -756,6 +753,7 @@ export interface BinaryHelperFunctions {
|
||||
mimeType?: string,
|
||||
): Promise<IBinaryData>;
|
||||
setBinaryDataBuffer(data: IBinaryData, binaryData: Buffer): Promise<IBinaryData>;
|
||||
/** @deprecated */
|
||||
copyBinaryFile(): Promise<never>;
|
||||
binaryToBuffer(body: Buffer | Readable): Promise<Buffer>;
|
||||
binaryToString(body: Buffer | Readable, encoding?: BufferEncoding): Promise<string>;
|
||||
@@ -985,8 +983,7 @@ export type IExecuteFunctions = ExecuteFunctions.GetNodeParameterFn &
|
||||
BinaryHelperFunctions &
|
||||
DeduplicationHelperFunctions &
|
||||
FileSystemHelperFunctions &
|
||||
SSHTunnelFunctions &
|
||||
JsonHelperFunctions & {
|
||||
SSHTunnelFunctions & {
|
||||
normalizeItems(items: INodeExecutionData | INodeExecutionData[]): INodeExecutionData[];
|
||||
constructExecutionMetaData(
|
||||
inputData: INodeExecutionData[],
|
||||
@@ -1081,8 +1078,7 @@ export interface IPollFunctions
|
||||
helpers: RequestHelperFunctions &
|
||||
BaseHelperFunctions &
|
||||
BinaryHelperFunctions &
|
||||
SchedulingFunctions &
|
||||
JsonHelperFunctions;
|
||||
SchedulingFunctions;
|
||||
}
|
||||
|
||||
export interface ITriggerFunctions
|
||||
@@ -1102,8 +1098,7 @@ export interface ITriggerFunctions
|
||||
BaseHelperFunctions &
|
||||
BinaryHelperFunctions &
|
||||
SSHTunnelFunctions &
|
||||
SchedulingFunctions &
|
||||
JsonHelperFunctions;
|
||||
SchedulingFunctions;
|
||||
}
|
||||
|
||||
export interface IHookFunctions
|
||||
@@ -1140,10 +1135,7 @@ export interface IWebhookFunctions extends FunctionsBaseWithRequiredKeys<'getMod
|
||||
getResponseObject(): express.Response;
|
||||
getWebhookName(): string;
|
||||
nodeHelpers: NodeHelperFunctions;
|
||||
helpers: RequestHelperFunctions &
|
||||
BaseHelperFunctions &
|
||||
BinaryHelperFunctions &
|
||||
JsonHelperFunctions;
|
||||
helpers: RequestHelperFunctions & BaseHelperFunctions & BinaryHelperFunctions;
|
||||
}
|
||||
|
||||
export interface INodeCredentialsDetails {
|
||||
@@ -1641,6 +1633,7 @@ export abstract class Node {
|
||||
abstract description: INodeTypeDescription;
|
||||
execute?(context: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
||||
webhook?(context: IWebhookFunctions): Promise<IWebhookResponseData>;
|
||||
poll?(context: IPollFunctions): Promise<INodeExecutionData[][] | null>;
|
||||
}
|
||||
|
||||
export interface IVersionedNodeType {
|
||||
|
||||
Reference in New Issue
Block a user