Skip to content

feat: messaging commands - #178

Open
manchuck wants to merge 1 commit into
mainfrom
messaging-commands
Open

feat: messaging commands#178
manchuck wants to merge 1 commit into
mainfrom
messaging-commands

Conversation

@manchuck

@manchuck manchuck commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

This adds new commands for sending messages.

@manchuck
manchuck force-pushed the messaging-commands branch 2 times, most recently from 5c328e4 to 867ede4 Compare August 18, 2026 19:43
@manchuck
manchuck marked this pull request as ready for review August 18, 2026 19:53
@manchuck
manchuck requested review from dragonmantank and superchilled and a lite review from Copilot August 18, 2026 19:53
@manchuck
manchuck requested a review from jdortiz August 18, 2026 19:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 send subcommands that construct @vonage/messages message objects and send them via SDK.messages.send.
  • Introduces shared message flag definitions and a sendMessage helper 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 uses url (and argv.id is 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.

Comment thread __tests__/commands/message/send/helpers.js
Comment thread __tests__/commands/message/send/whatsapp/message.send.whatsapp.template.test.js Outdated
Comment thread __tests__/commands/message/send/whatsapp/message.send.whatsapp.sticker.test.js Outdated
Comment thread src/commands/message/send/viber/file.js
Comment thread src/commands/message/send/viber/file.js
Comment thread src/commands/message/send/rcs/video.js
Comment thread src/commands/message/send/messenger/common.js
Comment thread src/commands/message/send/rcs/image.js
Comment thread src/commands/message/send/rcs/text.js
Comment thread src/commands/message/send/sms.js Outdated
@manchuck
manchuck force-pushed the messaging-commands branch from 867ede4 to 66dfcb3 Compare August 18, 2026 20:06
@manchuck
manchuck force-pushed the messaging-commands branch from 66dfcb3 to 3f93067 Compare August 18, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants