MarcosNicolau / whatsapp-business-sdk

Node.js connector for the WhatsApp Business APIs with TypeScript support, integration tests and more.
MIT License
77 stars 21 forks source link

Decouple sending messages and business number setup #41

Closed lukas-becker0 closed 1 month ago

lukas-becker0 commented 1 month ago

Since only the phone number id and the token are necessary to send messages I think it would make sense to decouple the client logic so that we have one client just for sending messages and another for the business number setup stuff.

In our case for example the service which is sending and receiving messages is not handling the phone number setup.

MarcosNicolau commented 1 month ago

Mmmm... I don't know about that, I'd prefer to avoid such breaking change. Do other libraries actually split that the logic?

lukas-becker0 commented 1 month ago

Alright fair enough, this was just a suggestion, for our use case we are currently using our own http client. ATM we are using your lib only for the typescript types for the message and webhook objects.

Although I think we could avoid breaking changes by keeping the existing client and just letting it use the e.g. messaging and registration clients.