IAV-1044/feat(credentials): add WhatsApp OAuth2 credential type support
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 towhatsAppApias before -
Create a credential with type WHATSAPP_OAUTH— should map towhatsAppOAuthApi
Related Issues
Closes IAV-1044