-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Components - messagebird #15247
base: master
Are you sure you want to change the base?
New Components - messagebird #15247
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis pull request introduces a comprehensive implementation of MessageBird components for Pipedream, including a new application configuration, actions for creating contacts, sending SMS and voice messages, and a source for handling incoming messages. The changes involve creating a new MessageBird app module, defining multiple actions for contact and message management, and implementing a webhook-based message reception source. The project structure has been updated with new files and modifications to the package configuration. Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 13
🧹 Nitpick comments (6)
components/messagebird/sources/new-message-received/test-event.mjs (1)
5-7
: Use consistent test IDsThe test event contains multiple UUIDs and a platform reference that appear to be from a real system. For test events, use consistent, obviously fake IDs to make the test data more recognizable.
- "id": "404544c5-9920-45f1-8990-0855634ab7ac", - "channelId": "52ad151f-f7b4-46f9-a5c6-d3318e650c84", + "id": "test-message-id-123", + "channelId": "test-channel-id-123",Also applies to: 16-17, 34-34
components/messagebird/actions/create-contact/create-contact.mjs (3)
6-6
: Update documentation URL domainThe documentation URL uses 'bird.com' instead of 'messagebird.com'.
- description: "Creates a new contact. [See the documentation](https://docs.bird.com/api/contacts-api/api-reference/manage-workspace-contacts/create-a-contact)", + description: "Creates a new contact. [See the documentation](https://docs.messagebird.com/api/contacts-api/api-reference/manage-workspace-contacts/create-a-contact)",
26-30
: Add input validation for display nameThe display name property lacks validation for length and format. Consider adding constraints to prevent invalid inputs.
displayName: { type: "string", label: "Display Name", description: "The display name for the contact", + validate: (value) => { + if (!value?.trim()) { + return "Display name cannot be empty"; + } + if (value.length > 100) { + return "Display name cannot exceed 100 characters"; + } + }, },
31-36
: Add email format validationThe email property should include format validation to ensure valid email addresses.
email: { type: "string", label: "Email", description: "The email address of the contact", optional: true, + validate: (value) => { + if (value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) { + return "Please enter a valid email address"; + } + }, },components/messagebird/actions/send-sms/send-sms.mjs (1)
6-6
: Update documentation URL domainThe documentation URL uses 'bird.com' instead of 'messagebird.com'.
- description: "Sends an SMS message. [See the documentation](https://docs.bird.com/api/channels-api/supported-channels/programmable-sms/sending-sms-messages)", + description: "Sends an SMS message. [See the documentation](https://docs.messagebird.com/api/channels-api/supported-channels/programmable-sms/sending-sms-messages)",components/messagebird/actions/send-voice-message/send-voice-message.mjs (1)
6-6
: Update documentation URL domainThe documentation URL uses 'bird.com' instead of 'messagebird.com'.
- description: "Send a voice message to any phone number globally. [See the documentation](https://docs.bird.com/api/voice-api/voice-calls-api/initiate-an-outbound-call)", + description: "Send a voice message to any phone number globally. [See the documentation](https://docs.messagebird.com/api/voice-api/voice-calls-api/initiate-an-outbound-call)",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (9)
components/messagebird/.gitignore
(0 hunks)components/messagebird/actions/create-contact/create-contact.mjs
(1 hunks)components/messagebird/actions/send-sms/send-sms.mjs
(1 hunks)components/messagebird/actions/send-voice-message/send-voice-message.mjs
(1 hunks)components/messagebird/app/messagebird.app.ts
(0 hunks)components/messagebird/messagebird.app.mjs
(1 hunks)components/messagebird/package.json
(1 hunks)components/messagebird/sources/new-message-received/new-message-received.mjs
(1 hunks)components/messagebird/sources/new-message-received/test-event.mjs
(1 hunks)
💤 Files with no reviewable changes (2)
- components/messagebird/.gitignore
- components/messagebird/app/messagebird.app.ts
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Verify TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (1)
components/messagebird/package.json (1)
15-17
: Verify platform dependency versionPlease verify if version 3.0.3 of @pipedream/platform is the latest stable version that's compatible with your implementation.
✅ Verification successful
@pipedream/platform dependency is using the latest version
The package is correctly using version 3.0.3, which is confirmed to be the latest available version in the npm registry.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check latest version of @pipedream/platform npm view @pipedream/platform versions --json | jq -r '.[-1]' # Check for any breaking changes in recent versions npm view @pipedream/platform@">3.0.3" version --jsonLength of output: 754
components/messagebird/actions/send-voice-message/send-voice-message.mjs
Show resolved
Hide resolved
components/messagebird/sources/new-message-received/new-message-received.mjs
Outdated
Show resolved
Hide resolved
components/messagebird/sources/new-message-received/new-message-received.mjs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (1)
components/messagebird/sources/new-message-received/new-message-received.mjs (1)
30-46
: Add validation for platform valuesConsider adding validation to ensure the platform value matches MessageBird's supported channels. Also, consider using constants for the platform options to prevent typos and enable easier maintenance.
+const PLATFORM_OPTIONS = { + SMS: "sms", + WHATSAPP: "whatsapp", + EMAIL: "email", + LINE: "line", + INSTAGRAM: "instagram", + FACEBOOK: "facebook", + VIBER: "viber", + LINKEDIN: "linkedin", + TIKTOK: "tiktok", + TELEGRAM: "telegram", +}; platform: { type: "string", label: "Platform", description: "The type of inbound message to watch for", - options: [ - "sms", - "whatsapp", - "email", - "line", - "instagram", - "facebook", - "viber", - "linkedin", - "tiktok", - "telegram", - ], + options: Object.values(PLATFORM_OPTIONS), + validate: (value) => Object.values(PLATFORM_OPTIONS).includes(value), },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
components/messagebird/package.json
(1 hunks)components/messagebird/sources/new-message-received/new-message-received.mjs
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- components/messagebird/package.json
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (1)
components/messagebird/sources/new-message-received/new-message-received.mjs (1)
7-7
: Update documentation URLThe documentation URL appears to be incorrect. It points to
docs.bird.com
instead of the official MessageBird documentation.
components/messagebird/sources/new-message-received/new-message-received.mjs
Show resolved
Hide resolved
components/messagebird/sources/new-message-received/new-message-received.mjs
Show resolved
Hide resolved
components/messagebird/sources/new-message-received/new-message-received.mjs
Show resolved
Hide resolved
components/messagebird/sources/new-message-received/new-message-received.mjs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @michelle0927 lgtm! Ready for QA!
Resolves #15227
Summary by CodeRabbit
New Features
Improvements
Changes
.gitignore
file to allow tracking of specified files.