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

@@ -169,12 +169,13 @@ export async function componentsRequest(
return requestOptions;
}
export const sanitizePhoneNumber = (phoneNumber: string) => phoneNumber.replace(/[\-\(\)\+]/g, '');
export async function cleanPhoneNumber(
this: IExecuteSingleFunctions,
requestOptions: IHttpRequestOptions,
): Promise<IHttpRequestOptions> {
let phoneNumber = this.getNodeParameter('recipientPhoneNumber') as string;
phoneNumber = phoneNumber.replace(/[\-\(\)\+]/g, '');
const phoneNumber = sanitizePhoneNumber(this.getNodeParameter('recipientPhoneNumber') as string);
if (!requestOptions.body) {
requestOptions.body = {};