Skip to content

IAV-1044/feat(credentials): add WhatsApp OAuth2 credential type support

salaheddine zidani a demandé de fusionner feature/IAV-1044 vers develop

Summary

This MR introduces a new WHATSAPP_OAUTH credential type to the credential management system, disambiguating WhatsApp standard API credentials from WhatsApp OAuth2-based credentials.

Changes

mapN8NTypeToCredentialType (reverse mapping — N8N type → internal enum):

Previously, any N8N type string containing "whatsapp" was unconditionally mapped to CredentialType.WHATSAPP. This has been split into two distinct branches:

  • If the type contains "whatsapp" but not "oauth"CredentialType.WHATSAPP
  • If the type contains both "whatsapp" and "oauth"CredentialType.WHATSAPP_OAUTH (new)

mapCredentialTypeToN8NType (forward mapping — internal enum → N8N type):

A new case has been added to the switch statement:

case WHATSAPP_OAUTH -> "whatsAppOAuthApi";

Testing

  • Create a credential with type WHATSAPP — should map to whatsAppApi as before
  • Create a credential with type WHATSAPP_OAUTH — should map to whatsAppOAuthApi

Related Issues

Closes IAV-1044

Rapports de requête de fusion