From 917acc82ece74cc044a8c1e095f6294172aaf895 Mon Sep 17 00:00:00 2001 From: Jorge Cortes Date: Wed, 26 Nov 2025 12:03:00 -0500 Subject: [PATCH] [ACTION] trengo - list quick replies --- .../list-all-quick-replies.mjs | 35 +++++++++++++++++++ components/trengo/common/constants.mjs | 6 ++++ components/trengo/package.json | 2 +- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs create mode 100644 components/trengo/common/constants.mjs diff --git a/components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs b/components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs new file mode 100644 index 0000000000000..50dfcedc9b9a7 --- /dev/null +++ b/components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs @@ -0,0 +1,35 @@ +import app from "../../trengo.app.mjs"; +import constants from "../../common/constants.mjs"; + +export default { + key: "trengo-list-all-quick-replies", + name: "List All Quick Replies", + description: "List all quick replies. [See the documentation](https://developers.trengo.com/reference/list-all-quick-replies)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + filterType: { + type: "string", + label: "Type", + description: "Filter by type of quick reply", + optional: true, + options: constants.FILTER_TYPES, + }, + }, + async run({ $ }) { + const response = await this.app.listQuickReplies({ + params: { + type: this.filterType, + }, + }); + $.export("$summary", "Successfully listed quick replies"); + return response; + }, +}; + diff --git a/components/trengo/common/constants.mjs b/components/trengo/common/constants.mjs new file mode 100644 index 0000000000000..2567722f7e15c --- /dev/null +++ b/components/trengo/common/constants.mjs @@ -0,0 +1,6 @@ +export default { + FILTER_TYPES: [ + "MESSAGING", + "EMAIL", + ], +}; diff --git a/components/trengo/package.json b/components/trengo/package.json index 8b292406ed2a5..2f48aea5a17a2 100644 --- a/components/trengo/package.json +++ b/components/trengo/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/trengo", - "version": "0.7.0", + "version": "0.8.0", "description": "Pipedream Trengo Components", "main": "trengo.app.mjs", "keywords": [