feat: WhatsApp Business Cloud Node - new operation sendAndWait (#12941)

Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
This commit is contained in:
Michael Kret
2025-02-27 07:20:37 +02:00
committed by GitHub
parent 83d03d53eb
commit 97defb3a83
13 changed files with 457 additions and 74 deletions

View File

@@ -1560,12 +1560,12 @@ export interface SupplyData {
closeFunction?: CloseFunction;
}
type NodeOutput = INodeExecutionData[][] | NodeExecutionWithMetadata[][] | null;
export interface INodeType {
description: INodeTypeDescription;
supplyData?(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData>;
execute?(
this: IExecuteFunctions,
): Promise<INodeExecutionData[][] | NodeExecutionWithMetadata[][] | null>;
execute?(this: IExecuteFunctions): Promise<NodeOutput>;
poll?(this: IPollFunctions): Promise<INodeExecutionData[][] | null>;
trigger?(this: ITriggerFunctions): Promise<ITriggerResponse | undefined>;
webhook?(this: IWebhookFunctions): Promise<IWebhookResponseData>;
@@ -1602,6 +1602,18 @@ export interface INodeType {
[method in WebhookSetupMethodNames]: (this: IHookFunctions) => Promise<boolean>;
};
};
/**
* Defines custom operations for nodes that do not implement an `execute` method, such as declarative nodes.
* This function will be invoked instead of `execute` for a specific resource and operation.
* Should be either `execute` or `customOperations` defined for a node, but not both.
*
* @property customOperations - Maps specific resource and operation to a custom function
*/
customOperations?: {
[resource: string]: {
[operation: string]: (this: IExecuteFunctions) => Promise<NodeOutput>;
};
};
}
/**