feat: messaging commands - #178
Open
manchuck wants to merge 1 commit into
Open
Conversation
manchuck
force-pushed
the
messaging-commands
branch
2 times, most recently
from
August 18, 2026 19:43
5c328e4 to
867ede4
Compare
manchuck
marked this pull request as ready for review
August 18, 2026 19:53
manchuck
requested review from
dragonmantank and
superchilled
and
a lite review from Copilot
August 18, 2026 19:53
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new vonage message send ... command tree for sending Messages API payloads across multiple channels (SMS, MMS, WhatsApp, RCS, Messenger, Viber), along with shared flag definitions and new automated tests.
Changes:
- Adds channel-specific
sendsubcommands that construct@vonage/messagesmessage objects and send them viaSDK.messages.send. - Introduces shared message flag definitions and a
sendMessagehelper around the SDK call. - Adds a broad set of node:test test cases and test helpers for the new commands.
Reviewed changes
Copilot reviewed 77 out of 77 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| src/messageFlags.js | Shared yargs options for Messages API fields + shared sendMessage helper. |
| src/commands/message/send.js | Adds the message send command group. |
| src/commands/message.js | Adds the top-level message command group. |
| src/commands/message/send/sms.js | Implements vonage message send sms. |
| src/commands/message/send/mms.js | Adds MMS command group (mms <command>). |
| src/commands/message/send/mms/common.js | Shared MMS options (URL/caption/common flags). |
| src/commands/message/send/mms/audio.js | Implements mms audio send command. |
| src/commands/message/send/mms/content.js | Implements mms content send command. |
| src/commands/message/send/mms/file.js | Implements mms file send command. |
| src/commands/message/send/mms/image.js | Implements mms image send command. |
| src/commands/message/send/mms/text.js | Implements mms text send command. |
| src/commands/message/send/mms/vcard.js | Implements mms vcard send command. |
| src/commands/message/send/mms/video.js | Implements mms video send command. |
| src/commands/message/send/whatsapp.js | Adds WhatsApp command group (whatsapp <command>). |
| src/commands/message/send/whatsapp/common.js | Shared WhatsApp options + message builder helper. |
| src/commands/message/send/whatsapp/audio.js | Implements whatsapp audio send command. |
| src/commands/message/send/whatsapp/custom.js | Implements whatsapp custom send command. |
| src/commands/message/send/whatsapp/file.js | Implements whatsapp file send command. |
| src/commands/message/send/whatsapp/image.js | Implements whatsapp image send command. |
| src/commands/message/send/whatsapp/reaction.js | Implements whatsapp reaction send command. |
| src/commands/message/send/whatsapp/sticker.js | Implements whatsapp sticker send command. |
| src/commands/message/send/whatsapp/template.js | Implements whatsapp template send command (with parameter validation). |
| src/commands/message/send/whatsapp/text.js | Implements whatsapp text send command. |
| src/commands/message/send/whatsapp/video.js | Implements whatsapp video send command. |
| src/commands/message/send/rcs.js | Adds RCS command group (rcs <command>). |
| src/commands/message/send/rcs/common.js | Shared RCS options + message builder helper. |
| src/commands/message/send/rcs/custom.js | Implements rcs custom send command. |
| src/commands/message/send/rcs/file.js | Implements rcs file send command. |
| src/commands/message/send/rcs/image.js | Implements rcs image send command. |
| src/commands/message/send/rcs/text.js | Implements rcs text send command. |
| src/commands/message/send/rcs/video.js | Implements rcs video send command. |
| src/commands/message/send/messenger.js | Adds Messenger command group (messenger <command>). |
| src/commands/message/send/messenger/common.js | Shared Messenger options + message builder helper. |
| src/commands/message/send/messenger/audio.js | Implements messenger audio send command. |
| src/commands/message/send/messenger/file.js | Implements messenger file send command. |
| src/commands/message/send/messenger/image.js | Implements messenger image send command. |
| src/commands/message/send/messenger/text.js | Implements messenger text send command. |
| src/commands/message/send/messenger/video.js | Implements messenger video send command. |
| src/commands/message/send/viber.js | Adds Viber command group (viber <command>). |
| src/commands/message/send/viber/common.js | Shared Viber options + Viber service builder helper. |
| src/commands/message/send/viber/file.js | Implements viber file send command. |
| src/commands/message/send/viber/image.js | Implements viber image send command. |
| src/commands/message/send/viber/text.js | Implements viber text send command. |
| src/commands/message/send/viber/video.js | Implements viber video send command. |
| tests/helpers.js | Extends test helpers (console mocking + Messages SDK stubs/assertions). |
| tests/commands/message/send/helpers.js | Adds test helpers for send-command tests. |
| tests/commands/message/send/message.send.sms.test.js | Adds SMS send command tests. |
| tests/commands/message/send/mms/message.send.mms.audio.test.js | Adds MMS audio send tests. |
| tests/commands/message/send/mms/message.send.mms.content.test.js | Adds MMS content send tests. |
| tests/commands/message/send/mms/message.send.mms.file.test.js | Adds MMS file send tests. |
| tests/commands/message/send/mms/message.send.mms.image.test.js | Adds MMS image send tests. |
| tests/commands/message/send/mms/message.send.mms.text.test.js | Adds MMS text send tests. |
| tests/commands/message/send/mms/message.send.mms.vcard.test.js | Adds MMS vCard send tests. |
| tests/commands/message/send/mms/message.send.mms.video.test.js | Adds MMS video send tests. |
| tests/commands/message/send/rcs/message.send.rcs.custom.test.js | Adds RCS custom send tests. |
| tests/commands/message/send/rcs/message.send.rcs.file.test.js | Adds RCS file send tests. |
| tests/commands/message/send/rcs/message.send.rcs.image.test.js | Adds RCS image send tests. |
| tests/commands/message/send/rcs/message.send.rcs.text.test.js | Adds RCS text send tests. |
| tests/commands/message/send/rcs/message.send.rcs.video.test.js | Adds RCS video send tests. |
| tests/commands/message/send/messenger/message.send.messenger.audio.test.js | Adds Messenger audio send tests. |
| tests/commands/message/send/messenger/message.send.messenger.file.test.js | Adds Messenger file send tests. |
| tests/commands/message/send/messenger/message.send.messenger.image.test.js | Adds Messenger image send tests. |
| tests/commands/message/send/messenger/message.send.messenger.text.test.js | Adds Messenger text send tests. |
| tests/commands/message/send/messenger/message.send.messenger.video.test.js | Adds Messenger video send tests. |
| tests/commands/message/send/viber/message.send.viber.file.test.js | Adds Viber file send tests. |
| tests/commands/message/send/viber/message.send.viber.image.test.js | Adds Viber image send tests. |
| tests/commands/message/send/viber/message.send.viber.text.test.js | Adds Viber text send tests. |
| tests/commands/message/send/viber/message.send.viber.video.test.js | Adds Viber video send tests. |
| tests/commands/message/send/whatsapp/message.send.whatsapp.audio.test.js | Adds WhatsApp audio send tests. |
| tests/commands/message/send/whatsapp/message.send.whatsapp.custom.test.js | Adds WhatsApp custom send tests. |
| tests/commands/message/send/whatsapp/message.send.whatsapp.file.test.js | Adds WhatsApp file send tests. |
| tests/commands/message/send/whatsapp/message.send.whatsapp.image.test.js | Adds WhatsApp image send tests. |
| tests/commands/message/send/whatsapp/message.send.whatsapp.reaction.test.js | Adds WhatsApp reaction send tests. |
| tests/commands/message/send/whatsapp/message.send.whatsapp.sticker.test.js | Adds WhatsApp sticker send tests. |
| tests/commands/message/send/whatsapp/message.send.whatsapp.template.test.js | Adds WhatsApp template send tests. |
| tests/commands/message/send/whatsapp/message.send.whatsapp.text.test.js | Adds WhatsApp text send tests. |
| tests/commands/message/send/whatsapp/message.send.whatsapp.video.test.js | Adds WhatsApp video send tests. |
Suppressed comments (1)
tests/commands/message/send/whatsapp/message.send.whatsapp.sticker.test.js:62
- In the "by url" test case, the expected payload still asserts
sticker: { id: argv.id }even though this path usesurl(andargv.idis undefined).
assertSentMessage(sendMock, WhatsAppSticker, {
to: argv.to,
from: argv.from,
sticker: { id: argv.id },
category: argv.category,
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
manchuck
force-pushed
the
messaging-commands
branch
from
August 18, 2026 20:06
867ede4 to
66dfcb3
Compare
manchuck
force-pushed
the
messaging-commands
branch
from
August 18, 2026 21:00
66dfcb3 to
3f93067
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds new commands for sending messages.