Skip to content

Commit

Permalink
Telnyx - Ability to retrieve a message (#11710)
Browse files Browse the repository at this point in the history
* Added the ability to list phone numbers

* Adjusted component/action versions

* eslint

* Updated constants file

* constants.mjs

* version

* Added Retrieve Message action

* Fixed error message details

* versions

---------

Co-authored-by: michelle0927 <michellelbergero@hotmail.com>
Co-authored-by: michelle0927 <michelle0927@users.noreply.github.com>
3 people authored May 6, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
bastelfreak Tim Meusel
1 parent f4dc25d commit ebf40aa
Showing 7 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions components/telnyx/actions/get-message/get-message.mjs
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ export default {
key: "telnyx-get-message",
name: "Retrieve a Message",
description: "Retrieve a message. See documentation [here](https://developers.telnyx.com/api/messaging/get-message)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
telnyxApp,
@@ -17,7 +17,9 @@ export default {
async run({ $ }) {
const message = await this.telnyxApp.getMessage({
$,
id: this.id,
params: {
id: this.id,
},
});
$.export("$summary", `Successfully retrieved message ${message.data.id}.`);
return message;
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ export default {
key: "telnyx-get-messaging-profiles",
name: "Get Messaging Profiles",
description: "Get a list of messaging profiles. See documentation [here](https://developers.telnyx.com/api/messaging/list-messaging-profiles)",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
telnyxApp,
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ export default {
key: "telnyx-get-phone-numbers",
name: "Get Phone Numbers",
description: "Get a list of phone numbers. See documentation [here](https://developers.telnyx.com/api/numbers/list-phone-numbers)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
telnyxApp,
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ export default {
key: "telnyx-send-group-message",
name: "Send Group Message",
description: "Send a group MMS message. See documentation [here](https://developers.telnyx.com/api/messaging/create-group-mms-message)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
telnyxApp,
2 changes: 1 addition & 1 deletion components/telnyx/actions/send-message/send-message.mjs
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ export default {
key: "telnyx-send-message",
name: "Send Message",
description: "Send an SMS or MMS message. See documentation [here](https://developers.telnyx.com/docs/messaging/messages/send-message)",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
telnyxApp,
2 changes: 1 addition & 1 deletion components/telnyx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/telnyx",
"version": "0.2.1",
"version": "0.2.2",
"description": "Pipedream Telnyx Components",
"main": "telnyx.app.mjs",
"keywords": [
2 changes: 1 addition & 1 deletion components/telnyx/telnyx.app.mjs
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ export default {
},
throwFormattedError(error) {
error = error.response;
throw new Error(`${error.status} - ${error.statusText} - ${error.data.message}`);
throw new Error(`${error.status} - ${error.statusText} - ${error.data.errors[0].detail}`);
},
async sendMessage(args) {
return this.makeRequest({

0 comments on commit ebf40aa

Please sign in to comment.