-
Notifications
You must be signed in to change notification settings - Fork 5.5k
18314 twilio #18350
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
18314 twilio #18350
Conversation
- Update Twilio Send Message action adding detailed description for 'from' prop and refactoring phone number validation logic. - Incremented action versions for several Twilio actions.
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
components/twilio/actions/create-verification-service/create-verification-service.mjs (1)
21-21
: Fix stray quote in summary string.Extraneous
"
at the end of the message.Apply:
- $.export("$summary", `Successfully created verification service with SID: ${response.sid}"`); + $.export("$summary", `Successfully created verification service with SID: ${response.sid}`);components/twilio/actions/list-messages/list-messages.mjs (1)
50-57
:from
parsing blocks alphanumeric sender IDs and short codes; remove strict E.164 validation.This rejects valid Twilio senders (alphanumeric IDs, short codes). Align behavior with the prop description and Twilio API by passing
from
through unchanged.Apply:
- let from = this.from; - if (this.from) { - const fromParsed = phone(this.from); - if (!fromParsed || !fromParsed.phoneNumber) { - throw new Error(`Phone number ${this.from} could not be parsed as a valid number.`); - } - from = fromParsed.phoneNumber; - } + const from = this.from;components/twilio/actions/send-message/send-message.mjs (1)
44-48
:to
parsing prevents channel addresses (e.g., whatsapp:+1...); relax validation to match the updatedfrom
guidance.Current logic rejects valid Twilio channel addresses. Parse only when the value looks like a bare phone number; otherwise pass through.
Apply:
- const toParsed = phone(this.to); - if (!toParsed || !toParsed.phoneNumber) { - throw new Error(`Phone number ${this.to} could not be parsed as a valid number.`); - } + let to = this.to; + // Allow channel addresses like "whatsapp:+15554449999" (contain ":") + if (to && !to.includes(":")) { + const toParsed = phone(to); + if (!toParsed || !toParsed.phoneNumber) { + throw new Error(`Recipient ${this.to} could not be parsed as a valid phone number.`); + } + to = toParsed.phoneNumber; + } const data = { - to: toParsed.phoneNumber, + to, from: this.from, body: this.body, mediaUrl: this.mediaUrl, };Also applies to: 49-54
🧹 Nitpick comments (10)
components/twilio/actions/check-verification-token/check-verification-token.mjs (2)
37-39
: Tighten summary message to avoid odd spacing.Produces “Verification code is valid” when true.
Apply:
- $.export("$summary", `Verification code is ${res.valid - ? "" - : "not"} valid`); + $.export("$summary", res.valid + ? "Verification code is valid" + : "Verification code is not valid");
41-46
: Avoid stringifying the whole error object.
JSON.stringify(e)
can be noisy and may leak details; surface a clean message instead.Apply:
- throw new ConfigurationError(JSON.stringify(e)); + const msg = e?.message || e?.body?.message || "Twilio Verify error"; + throw new ConfigurationError(msg);components/twilio/actions/list-transcripts/list-transcripts.mjs (1)
31-45
: Parallelize fetching sentences to reduce latency.Current serial loop can be slow for many transcripts. Consider Promise.all with optional concurrency limiting if rate limits become an issue.
Apply:
- if (this.includeTranscriptText) { - const transcripts = []; - for (const result of results) { - const { - sentences, transcript, - } = await this.twilio.getSentences(result.sid); - transcripts.push({ - ...result, - _version: undefined, - sentences, - transcript, - }); - } - results = transcripts; - } + if (this.includeTranscriptText) { + results = await Promise.all(results.map(async (result) => { + const { sentences, transcript } = await this.twilio.getSentences(result.sid); + return { + ...result, + _version: undefined, + sentences, + transcript, + }; + })); + }components/twilio/actions/make-phone-call/make-phone-call.mjs (2)
120-120
: Remove debug logging.
console.log(toParsed)
is noisy in production logs.Apply:
- console.log(toParsed);
115-128
: Support non-E.164 call destinations (client:/sip:).Current validation blocks valid Twilio destinations like
client:alice
orsip:...
. Keep strict parsing forfrom
, but allow these forto
.Apply:
- const toParsed = phone(this.to); - console.log(toParsed); - if (!toParsed || !toParsed.phoneNumber) { - throw new Error(`Phone number ${this.to} could not be parsed as a valid number.`); - } + const isSpecialTo = typeof this.to === "string" && /^(client:|sip:|conference:|queue:)/i.test(this.to); + let toValue = this.to; + if (!isSpecialTo) { + const toParsed = phone(this.to); + if (!toParsed || !toParsed.phoneNumber) { + throw new Error(`Destination ${this.to} is not a valid phone number or supported Twilio address (client:/sip:/conference:/queue:).`); + } + toValue = toParsed.phoneNumber; + } @@ - const data = { - to: toParsed.phoneNumber, + const data = { + to: toValue, from: fromParsed.phoneNumber,components/twilio/actions/get-transcripts/get-transcripts.mjs (1)
18-34
: Fetch in parallel to improve performance.Two serial loops increase total time. Collapse into one parallelized pass.
Apply:
- const transcripts = []; - for (const sid of this.transcriptSids) { - transcripts.push(await this.twilio.getTranscript(sid)); - } - const results = []; - for (const transcript of transcripts) { - const { - sentences, transcript: fullTranscript, - } = await this.twilio.getSentences(transcript.sid); - results.push({ - ...transcript, - _version: undefined, - sentences, - transcript: fullTranscript, - }); - } + const results = await Promise.all(this.transcriptSids.map(async (sid) => { + const transcript = await this.twilio.getTranscript(sid); + const { sentences, transcript: fullTranscript } = await this.twilio.getSentences(transcript.sid); + return { + ...transcript, + _version: undefined, + sentences, + transcript: fullTranscript, + }; + }));components/twilio/actions/list-messages/list-messages.mjs (1)
18-20
: Prop description and behavior are inconsistent.If you keep E.164 parsing elsewhere, update the text to explicitly state that short codes and alphanumeric IDs are allowed (no E.164 formatting), or relax parsing as suggested above.
components/twilio/actions/send-message/send-message.mjs (3)
18-18
: Nit: fix duplicated word in user-facing description.“…assigns a from value
from
the Messaging Service's…” → “…assigns a from value from the Messaging Service's…”- ... Twilio assigns a from value `from` the Messaging Service's Sender Pool) ... + ... Twilio assigns a from value from the Messaging Service's Sender Pool) ...
12-19
: Follow-up: consider adding Messaging Service SID support.The description references
messaging_service_sid
, but there’s no prop to pass it. Optional enhancement: add amessagingServiceSid
prop and forward it tomessages.create
.
1-61
: Standardize Twiliofrom
phone validation across actionslist-messages and make-phone-call call phone(this.from) and throw on non‑E.164 senders (blocking short codes / alphanumeric IDs); send-message only validates
to
and does not parsefrom
.
Affected: components/twilio/actions/list-messages/list-messages.mjs, components/twilio/actions/make-phone-call/make-phone-call.mjs, components/twilio/actions/send-message/send-message.mjs.
Recommendation: choose one behavior and align code + docs — either allow non‑E.164from
values for messaging (remove/conditionalize phone() onfrom
) or enforce E.164 everywhere and update prop descriptions.
📜 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 (22)
components/twilio/actions/check-verification-token/check-verification-token.mjs
(1 hunks)components/twilio/actions/create-verification-service/create-verification-service.mjs
(1 hunks)components/twilio/actions/delete-call/delete-call.mjs
(1 hunks)components/twilio/actions/delete-message/delete-message.mjs
(1 hunks)components/twilio/actions/download-recording-media/download-recording-media.mjs
(1 hunks)components/twilio/actions/get-call/get-call.mjs
(1 hunks)components/twilio/actions/get-message/get-message.mjs
(1 hunks)components/twilio/actions/get-transcripts/get-transcripts.mjs
(1 hunks)components/twilio/actions/list-calls/list-calls.mjs
(1 hunks)components/twilio/actions/list-message-media/list-message-media.mjs
(1 hunks)components/twilio/actions/list-messages/list-messages.mjs
(1 hunks)components/twilio/actions/list-transcripts/list-transcripts.mjs
(1 hunks)components/twilio/actions/make-phone-call/make-phone-call.mjs
(1 hunks)components/twilio/actions/phone-number-lookup/phone-number-lookup.mjs
(1 hunks)components/twilio/actions/send-message/send-message.mjs
(2 hunks)components/twilio/actions/send-sms-verification/send-sms-verification.mjs
(1 hunks)components/twilio/package.json
(2 hunks)components/twilio/sources/new-call/new-call.mjs
(1 hunks)components/twilio/sources/new-incoming-sms/new-incoming-sms.mjs
(1 hunks)components/twilio/sources/new-phone-number/new-phone-number.mjs
(1 hunks)components/twilio/sources/new-recording/new-recording.mjs
(1 hunks)components/twilio/sources/new-transcript-created/new-transcript-created.mjs
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
- GitHub Check: pnpm publish
- GitHub Check: Ensure component commits modify component versions
🔇 Additional comments (25)
components/twilio/actions/get-call/get-call.mjs (1)
8-8
: Version bump only — LGTM.No runtime changes; safe to ship.
components/twilio/sources/new-transcript-created/new-transcript-created.mjs (1)
8-8
: Version bump only — LGTM.No behavioral changes detected.
components/twilio/actions/get-message/get-message.mjs (1)
8-8
: Version bump only — LGTM.No logic changes; action remains stable.
components/twilio/actions/list-message-media/list-message-media.mjs (2)
8-8
: Version bump only — LGTM.
1-36
: Verify Send Message "from" short-code support
- prop options: components/twilio/twilio.app.mjs — propDefinitions.from.options() returns this.listIncomingPhoneNumbers() and maps number.phoneNumber (dropdown only surfaces incoming phone numbers).
- runtime: components/twilio/actions/send-message/send-message.mjs — run() passes from: this.from directly to client.messages.create with no E.164 validation (free-text short codes will be accepted at runtime).
- Action: confirm whether listIncomingPhoneNumbers returns short codes for your accounts; if not, add short-code fetching to propDefinitions.from.options or explicitly allow/guide free-text short-code input.
components/twilio/sources/new-call/new-call.mjs (1)
9-9
: Version bump only — LGTM.components/twilio/sources/new-incoming-sms/new-incoming-sms.mjs (1)
12-12
: Version bump only — LGTM.components/twilio/actions/list-calls/list-calls.mjs (1)
8-8
: Version bump only — LGTM.components/twilio/actions/delete-message/delete-message.mjs (1)
7-7
: Version bump only — LGTM.components/twilio/actions/download-recording-media/download-recording-media.mjs (1)
11-11
: Version bump looks good.No behavior change; safe to ship.
components/twilio/actions/create-verification-service/create-verification-service.mjs (1)
8-8
: Version bump OK.components/twilio/actions/check-verification-token/check-verification-token.mjs (1)
9-9
: Version bump OK.components/twilio/actions/list-transcripts/list-transcripts.mjs (1)
8-8
: Version bump OK.components/twilio/actions/make-phone-call/make-phone-call.mjs (2)
9-9
: Version bump OK.
12-18
: Follow-up: align sharedfrom
propDefinition with SMS short-code support; keep voicefrom
strict.Automated ripgrep across components/twilio returned no matches for
propDefinition: [twilio, "from"]
— cannot confirm whether SMS Send Message uses an SMS-friendlyfrom
.
- Action: Ensure Send Message (SMS) exposes Twilio Short Codes or a Messaging Service SID prop; keep voice action's
from
strict.- Verify: locate usages of the shared
from
prop and confirm SMS actions use an SMS-specific propDefinition.Run locally and paste output if you want a re-check:
rg -nP "propDefinition:\s*\[\s*twilio\s*,\s*['\"]from['\"]\s*\]" -C2 --glob 'components/twilio/**' rg -nP "propDefinition\s*:\s*\[.*twilio.*\]" -C2 --glob 'components/twilio/**' | rg -n "from"components/twilio/actions/get-transcripts/get-transcripts.mjs (1)
7-7
: Version bump OK.components/twilio/sources/new-recording/new-recording.mjs (1)
8-8
: Version bump OK.components/twilio/sources/new-phone-number/new-phone-number.mjs (1)
8-8
: Version bump OK.components/twilio/actions/list-messages/list-messages.mjs (1)
9-9
: Version bump looks fine.components/twilio/actions/delete-call/delete-call.mjs (1)
7-7
: Version bump only — OK.components/twilio/package.json (2)
3-3
: Package version bump acknowledged.
13-13
: Verify @pipedream/platform ^3.1.0 compatibility (Twilio components)Twilio package.json now depends on @pipedream/platform ^3.1.0 and the Twilio code imports axios, ConfigurationError and DEFAULT_POLLING_SOURCE_TIMER_INTERVAL — confirm these APIs/signatures are unchanged in v3.1.0 (check upstream changelog) and run component/unit/smoke tests.
Files to check:
- components/twilio/package.json
- components/twilio/actions/download-recording-media/download-recording-media.mjs (uses axios)
- components/twilio/actions/check-verification-token/check-verification-token.mjs (uses ConfigurationError)
- components/twilio/sources/common/common-polling.mjs (uses DEFAULT_POLLING_SOURCE_TIMER_INTERVAL)
components/twilio/actions/phone-number-lookup/phone-number-lookup.mjs (1)
8-8
: Version bump only — OK.components/twilio/actions/send-sms-verification/send-sms-verification.mjs (1)
8-8
: Version bump only — OK.components/twilio/actions/send-message/send-message.mjs (1)
10-10
: Version bump noted.
/approve |
* Update Twilio component versions and dependencies - Update Twilio Send Message action adding detailed description for 'from' prop and refactoring phone number validation logic. - Incremented action versions for several Twilio actions. * pnpm update
* Leonardo AI components * added unzoom image action * fixing link errors * more lint fixes * Merging pull request #18359 * fix: pagination prop and params struct * fix: no need for paginate here * chore: update version * chore: cleanup * chore: update package * feat: allow raw response * chore: bump package * fix: buffer response instead * Update components/google_drive/actions/download-file/download-file.mjs Co-authored-by: Jorge Cortes <[email protected]> * versions * pnpm-lock.yaml * pnpm-lock.yaml * pnpm-lock.yaml * feat: add content selector * chore: bump package * fix: comments * chore: bump versions * chore: fix versions * fixes: QA fixes * feat: add cursor to req * package.json --------- Co-authored-by: joao <[email protected]> Co-authored-by: joaocoform <[email protected]> Co-authored-by: Jorge Cortes <[email protected]> Co-authored-by: Michelle Bergeron <[email protected]> Co-authored-by: Luan Cazarine <[email protected]> * Merging pull request #18361 * update siteId prop * pnpm-lock.yaml * package.json version * Google Sheets - update row refresh fields (#18369) * change prop order and refresh fields * bump package.json * Pipedrive - fix app name (#18370) * use pipedriveApp instead of app * bump package.json * Pipedrive - pipelineId integer (#18372) * pipelineId - integer * bump versions * Adding app scaffolding for lightspeed_ecom_c_series * Adding app scaffolding for financial_data * Adding app scaffolding for microsoft_authenticator * Merging pull request #18345 * updates * versions * versions * Merging pull request #18368 * updates * remove console.log * versions * Coinbase Developer Platform - New Wallet Event (#18342) * new component * pnpm-lock.yaml * updates * updates * Hubspot - update search-crm (#18360) * update search-crm * limit results to one page * update version * package.json version * Merging pull request #18347 * widget props * fix version * Adding app scaffolding for rundeck * Merging pull request #18378 * Update Taiga component with new actions and sources - Bump version to 0.1.0 in package.json and add dependency on @pipedream/platform. - Introduce new actions for creating, updating, and deleting issues, tasks, and user stories. - Add sources for tracking changes and deletions of issues and tasks. - Implement utility functions for parsing and cleaning objects in common/utils.mjs. - Enhance prop definitions for better integration with Taiga API. * pnpm update * Refactor Taiga actions to utilize parseObject utility - Added parseObject utility for tags, watchers, and points in update-issue, update-task, and update-userstory actions. - Removed the update-project action as it is no longer needed. - Enhanced base source to include secret key validation for webhook security. * Merging pull request #18382 * add testSources prop * pnpm-lock.yaml * fix * Merging pull request #18323 * Added actions * Added actions * Added actions * Merging pull request #18377 * Added actions * Update components/weaviate/actions/create-class/create-class.mjs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Luan Cazarine <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Merging pull request #18376 * Adding app scaffolding for etrusted * Adding app scaffolding for intelliflo_office * Adding app scaffolding for thoughtspot * Adding app scaffolding for kordiam * Adding app scaffolding for ticketsauce * trustpilot fixes (#18152) * trustpilot fixes * more fixes * update versions * more version updates * fixes * Bump all Trustpilot actions to version 0.1.0 Major improvements and API updates across all actions: - Enhanced private API support with proper authentication - Improved parameter handling and validation - Better error handling and response structures - Added new conversation flow for product reviews - Fixed endpoint URLs to match latest API documentation - Streamlined request/response processing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * up version and clean up sources * merge * fix business ID * delete temp action * Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update components/trustpilot/sources/new-product-reviews/new-product-reviews.mjs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update components/trustpilot/sources/new-service-reviews/new-service-reviews.mjs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * comments * Pagination * fixes * comments * missed some `$`'s * unduplicated * more fixes * final comments * more comments * . --------- Co-authored-by: Claude <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Adding app scaffolding for peekalink * 18314 twilio (#18350) * Update Twilio component versions and dependencies - Update Twilio Send Message action adding detailed description for 'from' prop and refactoring phone number validation logic. - Incremented action versions for several Twilio actions. * pnpm update * Updating LinkedIn API version (#18399) * Merging pull request #18394 * Databricks API - Jobs action components (#18371) * Notion property building improvements (#18381) * validate property types * versions * Google Business - add debug log (#18407) * add debug log * bump versions * Notion API Key - update @pipedream/notion version (#18409) * update @pipedream/notion dependency version * pnpm-lock.yaml * Adding app scaffolding for reduct_video * Adding app scaffolding for shopware * Adding app scaffolding for instamojo * Hubspot - bug fix to sources w/ property changes (#18379) * updates * versions * Google sheets type fix (#18411) * Fixing worksheetId prop type from string to integer * Version bumps --------- Co-authored-by: Leo Vu <[email protected]> * Merging pull request #18393 * new components * remove console.log * versions * update * Merging pull request #18408 * 403 error message * versions * update * Merging pull request #18419 * Changes per PR Review * Removes leonardo_ai_actions.mdc not indented for merging * synced lockfile after install * fully lock form-data for leonardo_ai * conflict solving * lint fixes * Chipped down Readme, implemented async options in gen motion --------- Co-authored-by: jocarino <[email protected]> Co-authored-by: joao <[email protected]> Co-authored-by: joaocoform <[email protected]> Co-authored-by: Jorge Cortes <[email protected]> Co-authored-by: Michelle Bergeron <[email protected]> Co-authored-by: Luan Cazarine <[email protected]> Co-authored-by: michelle0927 <[email protected]> Co-authored-by: Andrew Chuang <[email protected]> Co-authored-by: danhsiung <[email protected]> Co-authored-by: Lucas Caresia <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Job <[email protected]> Co-authored-by: Claude <[email protected]> Co-authored-by: Guilherme Falcão <[email protected]> Co-authored-by: Leo Vu <[email protected]>
Resolves #18314
Summary by CodeRabbit