mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): All calls to supplyData should use a distinct context type (no-changelog) (#11421)
This commit is contained in:
committed by
GitHub
parent
04c075a46b
commit
8f5fe05a92
@@ -35,6 +35,7 @@ export type IAllExecuteFunctions =
|
||||
| IExecuteFunctions
|
||||
| IExecutePaginationFunctions
|
||||
| IExecuteSingleFunctions
|
||||
| ISupplyDataFunctions
|
||||
| IHookFunctions
|
||||
| ILoadOptionsFunctions
|
||||
| IPollFunctions
|
||||
@@ -943,7 +944,7 @@ type BaseExecutionFunctions = FunctionsBaseWithRequiredKeys<'getMode'> & {
|
||||
getInputSourceData(inputIndex?: number, inputName?: string): ISourceData;
|
||||
getExecutionCancelSignal(): AbortSignal | undefined;
|
||||
onExecutionCancellation(handler: () => unknown): void;
|
||||
logAiEvent(eventName: AiEvent, msg?: string | undefined): Promise<void>;
|
||||
logAiEvent(eventName: AiEvent, msg?: string | undefined): void;
|
||||
};
|
||||
|
||||
// TODO: Create later own type only for Config-Nodes
|
||||
@@ -1022,6 +1023,27 @@ export interface IExecuteSingleFunctions extends BaseExecutionFunctions {
|
||||
};
|
||||
}
|
||||
|
||||
export type ISupplyDataFunctions = ExecuteFunctions.GetNodeParameterFn &
|
||||
FunctionsBaseWithRequiredKeys<'getMode'> &
|
||||
Pick<
|
||||
IExecuteFunctions,
|
||||
| 'addInputData'
|
||||
| 'addOutputData'
|
||||
| 'getInputConnectionData'
|
||||
| 'getInputData'
|
||||
| 'getNodeOutputs'
|
||||
| 'executeWorkflow'
|
||||
| 'sendMessageToUI'
|
||||
| 'helpers'
|
||||
> & {
|
||||
continueOnFail(): boolean;
|
||||
evaluateExpression(expression: string, itemIndex: number): NodeParameterValueType;
|
||||
getWorkflowDataProxy(itemIndex: number): IWorkflowDataProxyData;
|
||||
getExecutionCancelSignal(): AbortSignal | undefined;
|
||||
onExecutionCancellation(handler: () => unknown): void;
|
||||
logAiEvent(eventName: AiEvent, msg?: string | undefined): void;
|
||||
};
|
||||
|
||||
export interface IExecutePaginationFunctions extends IExecuteSingleFunctions {
|
||||
makeRoutingRequest(
|
||||
this: IAllExecuteFunctions,
|
||||
@@ -1572,7 +1594,7 @@ export class NodeExecutionOutput extends Array {
|
||||
|
||||
export interface INodeType {
|
||||
description: INodeTypeDescription;
|
||||
supplyData?(this: IAllExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
||||
supplyData?(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData>;
|
||||
execute?(
|
||||
this: IExecuteFunctions,
|
||||
): Promise<INodeExecutionData[][] | NodeExecutionWithMetadata[][] | null>;
|
||||
|
||||
Reference in New Issue
Block a user