diff --git a/docs/templates.md b/docs/templates.md index ba24438d..7b36831d 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -7,8 +7,7 @@ This is the list of Functions available in this repo: * [Hello Messaging](https://github.com/twilio-labs/function-templates/blob/main/hello-messaging): Function to get you started with Twilio Prog. Messaging * [Never gonna give you up](https://github.com/twilio-labs/function-templates/blob/main/never-gonna-give-you-up): Never gonna let you down. Plays a song to a phone call * [Forward Call](https://github.com/twilio-labs/function-templates/blob/main/forward-call): Forwards an incoming call to another number -* [Forward Message](https://github.com/twilio-labs/function-templates/blob/main/forward-message): Forwards incoming messages to another number -* [Forward Message to Multiple Numbers](https://github.com/twilio-labs/function-templates/blob/main/forward-message-multiple): Forwards incoming messages to a set of numbers +* [Forward Message](https://github.com/twilio-labs/function-templates/blob/main/forward-message): Forwards incoming messages to another number or to a set of numbers * [Forward Message to Email via SendGrid](https://github.com/twilio-labs/function-templates/blob/main/forward-message-sendgrid): Uses SendGrid to forward incoming messages via email * [Voicemail](https://github.com/twilio-labs/function-templates/blob/main/voicemail): Forwards calls during business hours. Records messages otherwise. * [Forward Message to Email via Sparkpost](https://github.com/twilio-labs/function-templates/blob/main/forward-message-sparkpost): Uses Sparkpost to forward incoming messages via email diff --git a/env-variables.manifest.json b/env-variables.manifest.json index b4e65e6b..5bf275b3 100644 --- a/env-variables.manifest.json +++ b/env-variables.manifest.json @@ -62,35 +62,13 @@ } ], "forward-message": [ - { - "key": "MY_PHONE_NUMBER", - "required": true, - "format": "phone_number", - "description": "Messages sent to your Twilio number will get forwarded to this E.164-formatted phone number", - "link": "https://www.twilio.com/docs/glossary/what-e164", - "default": "+12223334444", - "configurable": true, - "contentKey": null - }, - { - "key": "TWILIO_SMS_WEBHOOK_URL", - "required": true, - "format": "text", - "description": "The path to the webhook", - "link": null, - "default": "/forward-message", - "configurable": false, - "contentKey": null - } - ], - "forward-message-multiple": [ { "key": "FORWARDING_NUMBERS", "required": true, "format": "list(phone_number)", "description": "A list of numbers in E.164 format you want to forward incoming messages to, separated by commas", - "link": null, - "default": "+12223334444,+491761234567", + "link": "https://www.twilio.com/docs/glossary/what-e164", + "default": "+12223334444,+12223335555", "configurable": true, "contentKey": null }, @@ -100,7 +78,7 @@ "format": "text", "description": "The path to the webhook", "link": null, - "default": "/forward-message-multiple", + "default": "/forward-message", "configurable": false, "contentKey": null } @@ -472,7 +450,7 @@ "format": "phone_number", "description": "A comma separated list of numbers in E.164 format that you want to dial in order", "link": null, - "default": "+12223334444,+491761234567", + "default": "+12223334444,+12223335555", "configurable": true, "contentKey": null }, @@ -1288,7 +1266,7 @@ "format": "phone_number", "description": "A comma separated list of numbers in E.164 format that are allowed to trigger a broadcast", "link": null, - "default": "+12223334444,+491761234567", + "default": "+12223334444,+12223335555", "configurable": true, "contentKey": null }, diff --git a/forward-message-multiple/.env b/forward-message-multiple/.env deleted file mode 100644 index e0c54233..00000000 --- a/forward-message-multiple/.env +++ /dev/null @@ -1,8 +0,0 @@ -# description: A list of numbers in E.164 format you want to forward incoming messages to, separated by commas -# format: list(phone_number) -# required: true -FORWARDING_NUMBERS=+12223334444,+491761234567 - -# description: The path to the webhook -# configurable: false -TWILIO_SMS_WEBHOOK_URL=/forward-message-multiple \ No newline at end of file diff --git a/forward-message-multiple/README.md b/forward-message-multiple/README.md deleted file mode 100644 index eb6bdb73..00000000 --- a/forward-message-multiple/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Forward Message to Multiple Numbers - -This Function in `forward-message-multiple.js` will return the TwiML required to forward an incoming SMS message to each number in a comma separated list of numbers set in the environment variables. - -### Environment variables - -This Function expects one environment variable to be set. - -| Variable | Meaning | -| :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `FORWARDING_NUMBERS` | A list of numbers [in E.164 format](https://support.twilio.com/hc/en-us/articles/223183008-Formatting-International-Phone-Numbers) you want to forward incoming messages to, separated by commas | - -### Parameters - -This Function expects the incoming request to be a messaging webhook. The parameters that will be used are `From` and `Body`. diff --git a/forward-message-multiple/assets/index.html b/forward-message-multiple/assets/index.html deleted file mode 100644 index 59976aa7..00000000 --- a/forward-message-multiple/assets/index.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - Get started with your Twilio Functions! - - - - - - - -
-
- - -
-
-
-
-

- -
-

Welcome!

-

Your live application with Twilio is ready to use!

-
-

-
-

Get started with your application

-

- Follow these steps to try out your new app: -

-

- This app will return the - TwiML - required to forward an incoming SMS message to each number in the comma separated list of - numbers set in the environment variables. -

-
    -
  1. Text any message to your Twilio phone number
  2. -
  3. Every phone number you specified should receive the response message from Twilio
  4. -
-
-
- -
-
-

Troubleshooting

-
    -
  • - Check the - - phone number configuration - - and make sure the Twilio phone number you want for your app has a SMS webhook - configured to point at the following URL -
    - - -
    -
  • -
-
-
-
- - - diff --git a/forward-message-multiple/changelog.md b/forward-message-multiple/changelog.md deleted file mode 100644 index 3982d461..00000000 --- a/forward-message-multiple/changelog.md +++ /dev/null @@ -1,8 +0,0 @@ -# Changelog - -## [Unreleased] - -## [1.0.0] -### Added -- Initial release. - diff --git a/forward-message-multiple/functions/forward-message-multiple.protected.js b/forward-message-multiple/functions/forward-message-multiple.protected.js deleted file mode 100644 index e57ef4ce..00000000 --- a/forward-message-multiple/functions/forward-message-multiple.protected.js +++ /dev/null @@ -1,7 +0,0 @@ -exports.handler = function (context, event, callback) { - const twiml = new Twilio.twiml.MessagingResponse(); - context.FORWARDING_NUMBERS.split(/,\s?/).forEach((number) => { - twiml.message({ to: number }, `From: ${event.From}. Body: ${event.Body}`); - }); - callback(null, twiml); -}; diff --git a/forward-message-multiple/package.json b/forward-message-multiple/package.json deleted file mode 100644 index 546763d9..00000000 --- a/forward-message-multiple/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": "1.0.0", - "private": true, - "dependencies": {} -} diff --git a/forward-message-multiple/tests/forward-message-multiple.test.js b/forward-message-multiple/tests/forward-message-multiple.test.js deleted file mode 100644 index 954a405c..00000000 --- a/forward-message-multiple/tests/forward-message-multiple.test.js +++ /dev/null @@ -1,52 +0,0 @@ -const helpers = require('../../test/test-helper'); -const forwardMessageMultiple = - require('../functions/forward-message-multiple.protected').handler; -const Twilio = require('twilio'); - -const context = { - FORWARDING_NUMBERS: 'TwilioNumber1, TwilioNumber2', -}; -const event = { - Body: 'Hello', - From: 'ExternalNumber', -}; - -beforeAll(() => { - helpers.setup(context); -}); - -afterAll(() => { - helpers.teardown(); -}); - -test('returns a MessagingResponse', (done) => { - const callback = (_err, result) => { - expect(result).toBeInstanceOf(Twilio.twiml.MessagingResponse); - done(); - }; - - forwardMessageMultiple(context, event, callback); -}); - -test('forwards the message to both numbers from the context', (done) => { - const callback = (_err, result) => { - const twiml = result.toString(); - expect(twiml).toMatch('to="TwilioNumber1"'); - expect(twiml).toMatch('to="TwilioNumber2"'); - expect(twiml.match(/ { - const callback = (_err, result) => { - expect(result.toString()).toMatch( - `>From: ${event.From}. Body: ${event.Body}` - ); - done(); - }; - - forwardMessageMultiple(context, event, callback); -}); diff --git a/forward-message/.env b/forward-message/.env index 3042406d..e9480f51 100644 --- a/forward-message/.env +++ b/forward-message/.env @@ -1,8 +1,8 @@ -# description: Messages sent to your Twilio number will get forwarded to this E.164-formatted phone number -# format: phone_number +# description: A list of numbers in E.164 format you want to forward incoming messages to, separated by commas +# format: list(phone_number) # required: true # link: https://www.twilio.com/docs/glossary/what-e164 -MY_PHONE_NUMBER=+12223334444 +FORWARDING_NUMBERS=+12223334444,+491761234567 # description: The path to the webhook # configurable: false diff --git a/forward-message/README.md b/forward-message/README.md index 695e882a..dae84c9d 100644 --- a/forward-message/README.md +++ b/forward-message/README.md @@ -1,6 +1,6 @@ # Forward Message -This Function in `forward-message.js` will return the TwiML required to forward an incoming SMS message to a number that is set in the environment variables. +This Function in `forward-message.js` returns the TwiML required to forward an incoming SMS message to a single number or each number in a comma-separated list set in the environment variables. ### Environment variables @@ -8,7 +8,7 @@ This Function expects one environment variable to be set. | Variable | Meaning | | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `MY_PHONE_NUMBER` | The number you want to forward incoming messages to [in E.164 format](https://support.twilio.com/hc/en-us/articles/223183008-Formatting-International-Phone-Numbers) | +| `FORWARDING_NUMBERS` | A list of numbers [in E.164 format](https://support.twilio.com/hc/en-us/articles/223183008-Formatting-International-Phone-Numbers) you want to forward incoming messages to, separated by commas | ### Parameters diff --git a/forward-message/assets/index.html b/forward-message/assets/index.html index 3d77720b..2e754443 100644 --- a/forward-message/assets/index.html +++ b/forward-message/assets/index.html @@ -44,18 +44,18 @@

Get started with your application

-

- Follow these steps to try out your new app: -

This app will return the TwiML - required to forward an incoming SMS message to the number that is set in the environment - variables. + required to forward an incoming SMS message to each number in the comma separated list of + numbers set in the environment variables. +

+

+ Follow these steps to try out your new app:

  1. Text any message to your Twilio phone number
  2. -
  3. Receive the response message from Twilio
  4. +
  5. Every phone number you specified should receive the response message from Twilio
diff --git a/forward-message/changelog.md b/forward-message/changelog.md index 3982d461..c57195ef 100644 --- a/forward-message/changelog.md +++ b/forward-message/changelog.md @@ -2,7 +2,9 @@ ## [Unreleased] -## [1.0.0] +## [1.0.1] ### Added -- Initial release. +- Updated and merged templates for single number and multi-number forwarding. +- Added code comments. +- Updated and added test cases. diff --git a/forward-message/functions/forward-message.protected.js b/forward-message/functions/forward-message.protected.js index 431196da..28264587 100644 --- a/forward-message/functions/forward-message.protected.js +++ b/forward-message/functions/forward-message.protected.js @@ -1,8 +1,36 @@ +/* + * Forward a Message to a Specified Number or List of Numbers + * + * Description: When your Twilio Phone Number associated with this function + * receives an SMS, it will forward the message to the phone number(s) listed + * in FORWARDING_NUMBERS specified in /.env. This will work whether a single + * number or multiple numbers are listed. + * + * Contents: + * 1. Main Handler + */ + +/* + * 1. Main Handler + * + * This is the entry point to your Twilio Function, + * which will create a new MessagingResponse using TwiML + * and forward the incoming SMS to each number specified in + * the FORWARDING_NUMBERS environment variable. + * + * We then use the callback to return from your function + * with the TwiML MessagingResponse you defined earlier. + * In the callback, in non-error situations, the first + * parameter is null and the second parameter + * is the value you want to return. + */ + exports.handler = function (context, event, callback) { const twiml = new Twilio.twiml.MessagingResponse(); - twiml.message( - { to: context.MY_PHONE_NUMBER }, - `From: ${event.From}. Body: ${event.Body}` - ); + + context.FORWARDING_NUMBERS.split(/,\s?/).forEach((number) => { + twiml.message({ to: number }, `From: ${event.From}. Body: ${event.Body}`); + }); + callback(null, twiml); }; diff --git a/forward-message/package.json b/forward-message/package.json index 546763d9..82ca6688 100644 --- a/forward-message/package.json +++ b/forward-message/package.json @@ -1,5 +1,5 @@ { - "version": "1.0.0", + "version": "1.0.1", "private": true, "dependencies": {} } diff --git a/forward-message/tests/forward-message.test.js b/forward-message/tests/forward-message.test.js index b8ba814d..6f14f742 100644 --- a/forward-message/tests/forward-message.test.js +++ b/forward-message/tests/forward-message.test.js @@ -4,8 +4,9 @@ const forwardMessage = const Twilio = require('twilio'); const context = { - MY_PHONE_NUMBER: 'TwilioNumber', + FORWARDING_NUMBERS: 'TwilioNumber1, TwilioNumber2', }; + const event = { Body: 'Hello', From: 'ExternalNumber', @@ -28,19 +29,53 @@ test('returns a MessagingResponse', (done) => { forwardMessage(context, event, callback); }); -test('forwards the message to the number from the context', (done) => { +test('forwards the message to a single number from the context', (done) => { + const singleNumberContext = { + ...context, + FORWARDING_NUMBERS: 'TwilioNumber1', + }; + + const callback = (_err, result) => { + const twiml = result.toString(); + expect(twiml.match(/ { const callback = (_err, result) => { - expect(result.toString()).toMatch(`to="${context.MY_PHONE_NUMBER}"`); + const twiml = result.toString(); + expect(twiml).toMatch('to="TwilioNumber1"'); + expect(twiml).toMatch('to="TwilioNumber2"'); + expect(twiml.match(/ { + const noNumberContext = { + ...context, + FORWARDING_NUMBERS: '', + }; + + const callback = (_err, result) => { + const twiml = result.toString(); + + expect(twiml).toMatch('to=""'); + done(); + }; + + forwardMessage(noNumberContext, event, callback); +}); + test('includes the original From number and Body', (done) => { const callback = (_err, result) => { expect(result.toString()).toMatch( - `>From: ${event.From}. Body: ${event.Body}<` + `>From: ${event.From}. Body: ${event.Body}` ); done(); }; diff --git a/package-lock.json b/package-lock.json index 700597ae..b68ce729 100644 --- a/package-lock.json +++ b/package-lock.json @@ -78,6 +78,7 @@ "verify-prefill", "reminder-message", "passkeys-backend", + "block-spam-calls", "ai-assistants-samples" ], "devDependencies": { @@ -1831,6 +1832,9 @@ "blank": { "version": "1.0.0" }, + "block-spam-calls": { + "version": "1.0.0" + }, "blocklist-call": { "version": "1.0.0" }, @@ -2103,9 +2107,91 @@ } }, "lookup": { - "version": "1.0.0", + "version": "1.0.1", "dependencies": { - "twilio": "^3.61.0" + "twilio": "^5.2.2" + } + }, + "lookup/node_modules/axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "lookup/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "lookup/node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "lookup/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "lookup/node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "lookup/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "lookup/node_modules/twilio": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/twilio/-/twilio-5.2.3.tgz", + "integrity": "sha512-mJRRHdYnNoHLvbFTBGzYgSNe4RMQDQn3vfE8O6NaSbn2GKUPm6n87gfurqB9QHW2G4SZ7Ge3BKM2roqCMqHSbg==", + "dependencies": { + "axios": "^1.6.8", + "dayjs": "^1.11.9", + "https-proxy-agent": "^5.0.0", + "jsonwebtoken": "^9.0.2", + "qs": "^6.9.4", + "scmp": "^2.1.0", + "xmlbuilder": "^13.0.2" + }, + "engines": { + "node": ">=14.0" } }, "magic-links": { @@ -6046,6 +6132,10 @@ "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", "dev": true }, + "node_modules/block-spam-calls": { + "resolved": "block-spam-calls", + "link": true + }, "node_modules/blocklist-call": { "resolved": "blocklist-call", "link": true @@ -14578,9 +14668,9 @@ } }, "node_modules/moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", "engines": { "node": "*" } @@ -19069,7 +19159,7 @@ "voicemail": { "version": "1.0.0", "dependencies": { - "moment": "^2.24.0" + "moment": "^2.30.1" } } }, @@ -22711,6 +22801,9 @@ "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", "dev": true }, + "block-spam-calls": { + "version": "file:block-spam-calls" + }, "blocklist-call": { "version": "file:blocklist-call" }, @@ -28918,7 +29011,75 @@ "lookup": { "version": "file:lookup", "requires": { - "twilio": "^3.61.0" + "twilio": "^5.2.2" + }, + "dependencies": { + "axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "requires": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==" + }, + "twilio": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/twilio/-/twilio-5.2.3.tgz", + "integrity": "sha512-mJRRHdYnNoHLvbFTBGzYgSNe4RMQDQn3vfE8O6NaSbn2GKUPm6n87gfurqB9QHW2G4SZ7Ge3BKM2roqCMqHSbg==", + "requires": { + "axios": "^1.6.8", + "dayjs": "^1.11.9", + "https-proxy-agent": "^5.0.0", + "jsonwebtoken": "^9.0.2", + "qs": "^6.9.4", + "scmp": "^2.1.0", + "xmlbuilder": "^13.0.2" + } + } } }, "lowercase-keys": { @@ -29197,9 +29358,9 @@ } }, "moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" }, "mri": { "version": "1.2.0", @@ -32162,7 +32323,7 @@ "voicemail": { "version": "file:voicemail", "requires": { - "moment": "^2.24.0" + "moment": "^2.30.1" } }, "w3c-xmlserializer": { diff --git a/package.json b/package.json index 0e07a451..7e6fe088 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,6 @@ "forward-call", "forward-message", "forward-message-mailgun", - "forward-message-multiple", "forward-message-sendgrid", "forward-message-sparkpost", "frontline-quickstart", diff --git a/templates.json b/templates.json index 8d7d8a40..9d02716a 100644 --- a/templates.json +++ b/templates.json @@ -33,12 +33,7 @@ { "id": "forward-message", "name": "Forward Message", - "description": "Forwards incoming messages to another number" - }, - { - "id": "forward-message-multiple", - "name": "Forward Message to Multiple Numbers", - "description": "Forwards incoming messages to a set of numbers" + "description": "Forwards incoming messages to another number or set of numbers" }, { "id": "forward-message-sendgrid",