[Twilio] Refactor SendSMS, add success/error child nodes, update deps…#897
Open
alexteusz wants to merge 1 commit into
Open
[Twilio] Refactor SendSMS, add success/error child nodes, update deps…#897alexteusz wants to merge 1 commit into
alexteusz wants to merge 1 commit into
Conversation
… (4.1.0) - Update dependencies: extension-tools 0.13->0.17, axios 0.21->1.x, typescript 3.8->4.9, @types/node 13->18; drop qs and @types/axios - Migrate connection to API Key auth (apiKeySid/apiKeySecret/accountSid) - Refactor sendSMS: fix broken auth, move validation into try/catch, replace qs with built-in URLSearchParams, remove dead Authorization header - Add onSuccessSendSMS / onErrorSendSMS child nodes (createCase pattern) - Register child nodes in module.ts - Add esModuleInterop and proper include/exclude to tsconfig - Update README for new connection fields and child node branches Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
There was a problem hiding this comment.
Pull request overview
Refreshes the Twilio extension by migrating to API-Key authentication, refactoring the sendSMS node to add onSuccess/onError child nodes (following the Salesforce createCase pattern), modernizing dependencies (axios v1, native URLSearchParams, TS 4.9), and updating the README accordingly. This is a breaking change requiring users to recreate their Twilio connection.
Changes:
- Connection schema migrated from
accountSid/authTokentoapiKeySid/apiKeySecret/accountSid;sendSMSupdated to use Axios basic auth with the API key and removes the deadAuthorization: 'Basic 'header. - Validation moved inside
try/catchso failures route to the newonErrorSendSMSchild; success routes toonSuccessSendSMS; results stored via a unifiedstoreResulthelper. - Dependencies bumped (
@cognigy/extension-tools0.17,axios1.x, TS 4.9,@types/node18),qsand@types/axiosremoved,tslintmoved to devDeps, lockfile regenerated;tsconfigaddsesModuleInteropandinclude/exclude; README/version updated.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| extensions/twilio/src/connections/twilioConnection.ts | Replaces authToken with apiKeySid/apiKeySecret, retains accountSid. |
| extensions/twilio/src/nodes/sendSMS.ts | Refactor: new auth fields, native URLSearchParams, unified storeResult, success/error child nodes, validation inside try/catch. |
| extensions/twilio/src/module.ts | Registers the new onSuccessSendSMS and onErrorSendSMS child nodes. |
| extensions/twilio/README.md | Documents API-Key auth fields, child nodes, corrects to→body description. |
| extensions/twilio/tsconfig.json | Adds esModuleInterop, include/exclude, drops obsolete watch. |
| extensions/twilio/package.json | Bumps version to 4.1.0; updates deps (axios 1.x, TS 4.9); removes qs/@types/axios; moves tslint to devDeps. |
| extensions/twilio/package-lock.json | Regenerated lockfile (v3) reflecting new deps. |
Files not reviewed (1)
- extensions/twilio/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Refreshes the long-untouched Twilio extension: refactors the SendSMS node, updates
dependencies, and adds On Success / On Error child nodes (following the createCase.ts
pattern from the Salesforce extension).
Changes
Dependencies (version 4.0.1 → 4.1.0)
Connection — migrated to API-Key auth (apiKeySid / apiKeySecret / accountSid)
SendSMS node
Authorization: 'Basic 'headerOther — module.ts registers child nodes; tsconfig adds esModuleInterop; README updated.
Existing users must recreate their Twilio connection with an API Key (SID + Secret) + Account SID.
Verification
npm run build(transpile + tslint + zip) passes cleanly.