refactor: Setup node context API, and consolidate code between Webhook and Wait nodes (no-changelog) (#6464)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-07-04 16:17:50 +02:00
committed by GitHub
parent 29882a6f39
commit 4c854f4f23
8 changed files with 679 additions and 1094 deletions

View File

@@ -1258,6 +1258,16 @@ export interface INodeType {
};
}
/**
* This class serves as the base for all nodes using the new context API
* having this as a class enables us to identify these instances at runtime
*/
export abstract class Node {
abstract description: INodeTypeDescription;
execute?(context: IExecuteFunctions): Promise<INodeExecutionData[][]>;
webhook?(context: IWebhookFunctions): Promise<IWebhookResponseData>;
}
export interface IVersionedNodeType {
nodeVersions: {
[key: number]: INodeType;