Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented Nov 26, 2025

WHY

Resolves #19172

Summary by CodeRabbit

  • New Features

    • New Trengo actions to get articles, blocks, categories, and help centers; new actions to list blocks, categories, and help centers with optional max results
    • Expanded Trengo integration methods and selectable IDs (categories, articles, blocks) for richer help-center access
  • Chores

    • Multiple action/source version bumps and Trengo package version updated to 0.7.0

✏️ Tip: You can customize this high-level summary in your review settings.

@jcortes jcortes self-assigned this Nov 26, 2025
@vercel
Copy link

vercel bot commented Nov 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Nov 28, 2025 2:40pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 28, 2025 2:40pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

Adds new Trengo help-center actions (list and get for help centers, categories, articles, blocks), propDefinitions for category/article/block IDs, and new Trengo app methods that wrap API endpoints to support these actions.

Changes

Cohort / File(s) Summary
New get-item actions
components/trengo/actions/get-article/get-article.mjs, components/trengo/actions/get-block/get-block.mjs, components/trengo/actions/get-category/get-category.mjs, components/trengo/actions/get-help-center/get-help-center.mjs
New action modules exporting action descriptors with metadata, props (including app and hierarchical ID propDefinitions), and async run functions that call corresponding this.app.* methods, export a success summary, and return API responses.
New list-items actions
components/trengo/actions/list-all-blocks/list-all-blocks.mjs, components/trengo/actions/list-all-categories/list-all-categories.mjs, components/trengo/actions/list-help-centers/list-help-centers.mjs
New actions that stream resources via a shared resourcesStream helper, accumulate items into arrays, enforce an optional maxResults cap, export a summary with item count, and return collected arrays.
App methods and propDefinitions
components/trengo/trengo.app.mjs
Added propDefinitions for categoryId, articleId, blockId with async option loaders (paginated), and new API wrapper methods: listQuickReplies, getHelpCenter, listCategories, getCategory, getArticle, listBlocks, getBlock delegating to _makeRequest with templated paths.
Version bumps
components/trengo/actions/*, components/trengo/sources/*, components/trengo/package.json
Multiple action/source modules had their version fields incremented; components/trengo/package.json package version bumped from 0.6.00.7.0.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas to verify:
    • Correct interpolation of path parameters in the new app methods and that parameters match action prop names
    • Consistency and correctness of propDefinition option loaders (pagination, label/value mapping)
    • Proper use of resourcesStream (early termination when maxResults is reached) and error handling in list actions
    • Exports and annotation consistency across new action modules
    • Ensure package version bump aligns with publishing/release expectations

Possibly related PRs

  • Trengo new components #17792 — Overlapping Trengo integration changes (list-articles and related trengo.app methods/propDefinitions), likely code-level related.

Suggested labels

User submitted

Suggested reviewers

  • lcaresia
  • GTFalcao

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description only contains "Resolves #19172" which references the linked issue but provides no additional context about the changes, implementation details, or why these changes were made beyond linking the issue. Expand the description to explain the implementation approach, list the new actions added, and highlight key technical decisions or considerations.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title "[ACTION] trengo - Helpcenter" refers to adding Helpcenter-related actions for Trengo, which directly aligns with the changeset that introduces multiple new action modules (get-article, get-block, get-category, get-help-center, list-all-blocks, list-all-categories, list-help-centers) and extends the trengo.app.mjs with supporting methods and propDefinitions.
Linked Issues check ✅ Passed The PR implements all required Helpcenter endpoints: list-help-centers, list-all-categories, list-all-blocks, get-help-center, get-category, get-article, and get-block actions, plus supporting propDefinitions (categoryId, articleId, blockId) and app methods that align with the API endpoints specified in issue #19172.
Out of Scope Changes check ✅ Passed While the PR includes many version bumps across existing actions and sources (attach-label, close-ticket, create-contact, find-contacts, get-label, get-message, list-articles, list-labels, list-messages, list-tickets, log-a-voice-call, send-a-message, send-a-team-chat-message, send-a-ticket-message, send-a-whatsapp-message-template, and multiple sources), these appear to be routine maintenance version increments likely accompanying the component version bump from 0.6.0 to 0.7.0 in package.json. Core functionality remains unchanged for these existing modules.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch trengo-new-components-helpcenter

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jcortes jcortes force-pushed the trengo-new-components-helpcenter branch from d990148 to f7256bc Compare November 26, 2025 20:23
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
components/trengo/sources/new-internal-note/new-internal-note.mjs (1)

7-20: Version bump looks fine; summary string is misleading for this source

The version update to 0.0.7 is consistent with the broader Trengo package bump and doesn’t change behavior, so that part looks good.

However, the summary currently says New ticket label added event, which doesn’t match this source’s purpose (“New Internal Note Event”). That can confuse users reading step summaries.

Consider updating the summary text to better reflect the event type, e.g.:

-        summary: `New ticket label added event: ${event?.body?.message}`,
+        summary: `New internal note added: ${event?.body?.message}`,
components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs (1)

7-68: Validation logic looks good; fix typo in configuration error message

The bump to version: "0.0.8" is in line with the other Trengo actions and doesn’t change runtime behavior. The validation around threadId / toUserId and body / attachmentIds is sound.

There’s a minor typo in the configuration error string:

-      throw new ConfigurationError("Either `Body` or `Attachement IDs` should be set!");
+      throw new ConfigurationError("Either `Body` or `Attachment IDs` should be set!");

Fixing this keeps user-facing errors polished.

components/trengo/sources/new-outbound-message/new-outbound-message.mjs (1)

7-24: Outbound message source version bump is fine; correct typo in summary

The version increase to 0.0.7 is consistent with the rest of the Trengo sources and doesn’t affect behavior.

The summary string has a small typo:

-        summary: `New outbund message event: ${event?.body?.message}`,
+        summary: `New outbound message event: ${event?.body?.message}`,

This will read better in emitted event summaries.

components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs (1)

7-80: WhatsApp template action behavior unchanged; align $summary text with action purpose

The bump to version: "0.0.8" matches the rest of the Trengo actions and doesn’t alter runtime behavior. The validation around recepientPhoneNumber / ticketId and param key/value pairing is consistent.

The exported summary currently reads as if a contact was created:

$.export("$summary", `The contact has been created. (${resp.name} ID:${resp.id})`);

For an action named “Send A WhatsApp Message Template”, that’s likely confusing or incorrect. A more accurate and robust summary would avoid assuming a contact creation payload, for example:

-    $.export("$summary", `The contact has been created. (${resp.name} ID:${resp.id})`);
+    $.export("$summary", "WhatsApp template message has been sent.");

This keeps the step output aligned with what the action actually does.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 10ad254 and f7256bc.

📒 Files selected for processing (33)
  • components/trengo/actions/attach-label/attach-label.mjs (1 hunks)
  • components/trengo/actions/create-contact/create-contact.mjs (1 hunks)
  • components/trengo/actions/find-contacts/find-contacts.mjs (1 hunks)
  • components/trengo/actions/get-article/get-article.mjs (1 hunks)
  • components/trengo/actions/get-block/get-block.mjs (1 hunks)
  • components/trengo/actions/get-category/get-category.mjs (1 hunks)
  • components/trengo/actions/get-help-center/get-help-center.mjs (1 hunks)
  • components/trengo/actions/get-label/get-label.mjs (1 hunks)
  • components/trengo/actions/get-message/get-message.mjs (1 hunks)
  • components/trengo/actions/list-all-blocks/list-all-blocks.mjs (1 hunks)
  • components/trengo/actions/list-all-categories/list-all-categories.mjs (1 hunks)
  • components/trengo/actions/list-all-help-centers/list-all-help-centers.mjs (1 hunks)
  • components/trengo/actions/list-articles/list-articles.mjs (1 hunks)
  • components/trengo/actions/list-labels/list-labels.mjs (1 hunks)
  • components/trengo/actions/list-messages/list-messages.mjs (1 hunks)
  • components/trengo/actions/list-tickets/list-tickets.mjs (1 hunks)
  • components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs (1 hunks)
  • components/trengo/actions/send-a-message/send-a-message.mjs (1 hunks)
  • components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs (1 hunks)
  • components/trengo/actions/send-a-ticket-message/send-a-ticket-message.mjs (1 hunks)
  • components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs (1 hunks)
  • components/trengo/package.json (1 hunks)
  • components/trengo/sources/new-inbound-message/new-inbound-message.mjs (1 hunks)
  • components/trengo/sources/new-internal-note/new-internal-note.mjs (1 hunks)
  • components/trengo/sources/new-outbound-message/new-outbound-message.mjs (1 hunks)
  • components/trengo/sources/phone-call-ended/phone-call-ended.mjs (1 hunks)
  • components/trengo/sources/phone-call-missed/phone-call-missed.mjs (1 hunks)
  • components/trengo/sources/phone-call-started/phone-call-started.mjs (1 hunks)
  • components/trengo/sources/ticket-closed/ticket-closed.mjs (1 hunks)
  • components/trengo/sources/ticket-label-added/ticket-label-added.mjs (1 hunks)
  • components/trengo/sources/ticket-reopened/ticket-reopened.mjs (1 hunks)
  • components/trengo/sources/voice-call-recorded/voice-call-recorded.mjs (1 hunks)
  • components/trengo/trengo.app.mjs (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.

Applied to files:

  • components/trengo/actions/send-a-message/send-a-message.mjs
  • components/trengo/actions/get-message/get-message.mjs
  • components/trengo/actions/send-a-ticket-message/send-a-ticket-message.mjs
📚 Learning: 2024-07-04T18:11:59.822Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.

Applied to files:

  • components/trengo/actions/list-all-categories/list-all-categories.mjs
  • components/trengo/actions/list-all-help-centers/list-all-help-centers.mjs
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.

Applied to files:

  • components/trengo/trengo.app.mjs
🧬 Code graph analysis (5)
components/trengo/actions/list-all-categories/list-all-categories.mjs (2)
components/trengo/actions/list-all-blocks/list-all-blocks.mjs (1)
  • response (24-27)
components/trengo/trengo.app.mjs (7)
  • response (75-79)
  • response (165-169)
  • response (181-185)
  • response (199-204)
  • response (218-223)
  • response (237-242)
  • response (256-261)
components/trengo/actions/get-help-center/get-help-center.mjs (9)
components/trengo/actions/get-article/get-article.mjs (1)
  • response (33-37)
components/trengo/actions/get-block/get-block.mjs (1)
  • response (33-37)
components/trengo/actions/get-category/get-category.mjs (1)
  • response (33-37)
components/trengo/actions/get-label/get-label.mjs (1)
  • response (24-27)
components/trengo/actions/get-message/get-message.mjs (1)
  • response (33-37)
components/trengo/actions/list-all-blocks/list-all-blocks.mjs (1)
  • response (24-27)
components/trengo/actions/list-all-categories/list-all-categories.mjs (1)
  • response (24-27)
components/trengo/actions/list-all-help-centers/list-all-help-centers.mjs (1)
  • response (18-20)
components/trengo/trengo.app.mjs (7)
  • response (75-79)
  • response (165-169)
  • response (181-185)
  • response (199-204)
  • response (218-223)
  • response (237-242)
  • response (256-261)
components/trengo/actions/get-article/get-article.mjs (10)
components/trengo/actions/attach-label/attach-label.mjs (1)
  • response (30-36)
components/trengo/actions/get-block/get-block.mjs (1)
  • response (33-37)
components/trengo/actions/get-category/get-category.mjs (1)
  • response (33-37)
components/trengo/actions/get-help-center/get-help-center.mjs (1)
  • response (24-27)
components/trengo/actions/get-label/get-label.mjs (1)
  • response (24-27)
components/trengo/actions/get-message/get-message.mjs (1)
  • response (33-37)
components/trengo/actions/list-all-blocks/list-all-blocks.mjs (1)
  • response (24-27)
components/trengo/actions/list-all-categories/list-all-categories.mjs (1)
  • response (24-27)
components/trengo/actions/list-all-help-centers/list-all-help-centers.mjs (1)
  • response (18-20)
components/trengo/trengo.app.mjs (7)
  • response (75-79)
  • response (165-169)
  • response (181-185)
  • response (199-204)
  • response (218-223)
  • response (237-242)
  • response (256-261)
components/trengo/actions/list-all-blocks/list-all-blocks.mjs (4)
components/trengo/actions/get-block/get-block.mjs (1)
  • response (33-37)
components/trengo/actions/list-all-categories/list-all-categories.mjs (1)
  • response (24-27)
components/trengo/actions/list-all-help-centers/list-all-help-centers.mjs (1)
  • response (18-20)
components/trengo/trengo.app.mjs (7)
  • response (75-79)
  • response (165-169)
  • response (181-185)
  • response (199-204)
  • response (218-223)
  • response (237-242)
  • response (256-261)
components/trengo/actions/list-all-help-centers/list-all-help-centers.mjs (2)
components/trengo/actions/list-all-blocks/list-all-blocks.mjs (1)
  • response (24-27)
components/trengo/trengo.app.mjs (7)
  • response (75-79)
  • response (165-169)
  • response (181-185)
  • response (199-204)
  • response (218-223)
  • response (237-242)
  • response (256-261)
⏰ 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). (3)
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (26)
components/trengo/actions/create-contact/create-contact.mjs (1)

6-6: Version bump approved.

Coordinated version increment from 0.0.7 to 0.0.8 as part of the @pipedream/trengo 0.6.0 release.

components/trengo/actions/list-articles/list-articles.mjs (1)

7-7: Version bump approved.

Coordinated version increment from 0.0.5 to 0.0.6 as part of the @pipedream/trengo 0.6.0 release.

components/trengo/sources/ticket-label-added/ticket-label-added.mjs (1)

7-7: Version bump approved.

Coordinated version increment from 0.0.6 to 0.0.7 as part of the @pipedream/trengo 0.6.0 release.

components/trengo/actions/find-contacts/find-contacts.mjs (1)

7-7: Version bump approved.

Coordinated version increment from 0.0.7 to 0.0.8 as part of the @pipedream/trengo 0.6.0 release.

components/trengo/actions/get-label/get-label.mjs (1)

7-7: Version bump approved.

Coordinated version increment from 0.0.2 to 0.0.3 as part of the @pipedream/trengo 0.6.0 release.

components/trengo/actions/list-messages/list-messages.mjs (1)

8-8: Version bump approved.

Coordinated version increment from 0.0.4 to 0.0.5 as part of the @pipedream/trengo 0.6.0 release.

components/trengo/actions/get-message/get-message.mjs (1)

7-7: Version bump approved.

Coordinated version increment from 0.0.2 to 0.0.3 as part of the @pipedream/trengo 0.6.0 release.

components/trengo/actions/attach-label/attach-label.mjs (1)

7-7: Version bump approved.

Coordinated version increment from 0.0.2 to 0.0.3 as part of the @pipedream/trengo 0.6.0 release.

components/trengo/sources/new-inbound-message/new-inbound-message.mjs (1)

7-7: LGTM! Routine version bump.

The version increment is appropriate for maintaining consistency across the Trengo integration package update.

components/trengo/package.json (1)

3-3: LGTM! Minor version bump for new features.

The version increment from 0.5.0 to 0.6.0 correctly reflects the addition of new help-center actions per semantic versioning.

components/trengo/sources/ticket-reopened/ticket-reopened.mjs (1)

7-7: LGTM! Routine version bump.

The patch version increment is appropriate for coordinated release.

components/trengo/actions/send-a-message/send-a-message.mjs (1)

6-6: LGTM! Routine version bump.

The patch version increment is appropriate for coordinated release.

components/trengo/sources/phone-call-missed/phone-call-missed.mjs (1)

7-7: LGTM! Routine version bump.

The patch version increment is appropriate for coordinated release.

components/trengo/sources/ticket-closed/ticket-closed.mjs (1)

7-7: LGTM! Routine version bump.

The patch version increment is appropriate for coordinated release.

components/trengo/sources/phone-call-ended/phone-call-ended.mjs (1)

7-7: LGTM! Routine version bump.

The patch version increment is appropriate for coordinated release.

components/trengo/actions/send-a-ticket-message/send-a-ticket-message.mjs (1)

5-5: LGTM! Routine version bump.

The patch version increment is appropriate for coordinated release.

components/trengo/sources/voice-call-recorded/voice-call-recorded.mjs (1)

7-22: Voice call recorded source version bump is consistent and non-breaking

This is a straightforward metadata bump to version: "0.0.6" with no behavioral changes. getMeta and getEvent remain consistent with the source’s purpose.

components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs (1)

6-76: Log voice call action version bump is safe

The update to version: "0.0.8" is consistent with the broader Trengo action set. Props and the run implementation (mapping to this.app.logVoiceCall) are unchanged and remain coherent.

components/trengo/actions/list-tickets/list-tickets.mjs (1)

8-104: List tickets action version bump preserves existing behavior

Bumping version to 0.0.5 keeps this action aligned with the other Trengo updates. The streaming of tickets via utils.getResourcesStream and the maxResults short‑circuit remain unchanged and look correct.

components/trengo/sources/phone-call-started/phone-call-started.mjs (1)

7-22: Phone call started source version bump is straightforward

Updating version to 0.0.7 keeps this source in sync with the other Trengo sources. getMeta and getEvent remain appropriate for the “New Phone Call Started Event” webhook.

components/trengo/actions/get-category/get-category.mjs (1)

1-41: Get Category action is correctly wired and follows existing patterns

  • helpCenterId and dependent categoryId props match the new propDefinitions in the app.
  • run delegates to this.app.getCategory with the expected arguments and exports a clear success summary.

No functional issues spotted here.

components/trengo/actions/get-block/get-block.mjs (1)

1-41: Get Block action matches app contract and similar actions

The props (helpCenterId, dependent blockId) and run implementation calling this.app.getBlock are consistent with the app methods and other Trengo actions. Summary message is clear and accurate.

components/trengo/actions/get-help-center/get-help-center.mjs (1)

1-31: Get Help Center action is straightforward and consistent

The action correctly exposes helpCenterId, calls this.app.getHelpCenter with $ and the ID, and exports an appropriate success summary. This aligns with existing Trengo “get-*” actions.

components/trengo/actions/get-article/get-article.mjs (1)

1-41: Get Article action correctly leverages dependent props and app method

  • helpCenterId and dependent articleId props are wired to the corresponding app propDefinitions.
  • run delegates to this.app.getArticle with the right parameters and exports a clear success summary.

Looks consistent with the rest of the Trengo actions.

components/trengo/trengo.app.mjs (2)

211-267: New help-center-related ID propDefinitions are consistent and paginated

  • categoryId, articleId, and blockId follow the same pattern as existing ID props (ticketId, labelId, messageId): integer type, clear labels/descriptions, and async options that page using page + 1.
  • Each options resolver accepts helpCenterId and forwards it to the corresponding list method, which matches how the actions’ dependent props are defined.

No issues detected with these propDefinitions.


431-484: Helpcenter methods map cleanly to the documented endpoints

  • getHelpCenter, listCategories, getCategory, getArticle, listBlocks, and getBlock all delegate to _makeRequest with paths that align with the help-center endpoints described in the issue.
  • listQuickReplies is implemented in the same style as other simple list methods and keeps the app API cohesive.

These additions look correct and consistent with the existing Trengo app design.

@jcortes jcortes force-pushed the trengo-new-components-helpcenter branch from f7256bc to 0ea6461 Compare November 26, 2025 21:21
@jcortes jcortes requested a review from michelle0927 November 26, 2025 21:21
michelle0927
michelle0927 previously approved these changes Nov 26, 2025
Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jcortes jcortes force-pushed the trengo-new-components-helpcenter branch from 0f6c108 to f87954a Compare November 28, 2025 14:40
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs (1)

53-53: Fix typo in error message.

The error message contains a typo: "Attachement" should be "Attachment".

Apply this diff to correct the typo:

-      throw new ConfigurationError("Either `Body` or `Attachement IDs` should be set!");
+      throw new ConfigurationError("Either `Body` or `Attachment IDs` should be set!");
components/trengo/sources/new-outbound-message/new-outbound-message.mjs (1)

19-19: Fix typo in summary message.

The word "outbund" should be "outbound".

Apply this diff:

-        summary: `New outbund message event: ${event?.body?.message}`,
+        summary: `New outbound message event: ${event?.body?.message}`,
♻️ Duplicate comments (2)
components/trengo/actions/list-all-blocks/list-all-blocks.mjs (1)

1-50: List All Blocks action correctly streams, caps, and summarizes results

The action cleanly uses utils.getResourcesStream with this.app.listBlocks, honors maxResults as an optional cap, and exports a count-based, pluralized summary before returning the accumulated blocks array. This addresses earlier pagination and summary concerns and matches the established list-all-* patterns.

components/trengo/actions/list-all-categories/list-all-categories.mjs (1)

1-50: List All Categories action correctly streams categories and reports count

The action wires helpCenterId into this.app.listCategories, uses utils.getResourcesStream to traverse all pages, optionally caps results via maxResults, and exports a count-based, properly pluralized summary before returning the accumulated categories array. This aligns with the updated list-all-* conventions and addresses earlier feedback.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0f6c108 and f87954a.

📒 Files selected for processing (34)
  • components/trengo/actions/attach-label/attach-label.mjs (1 hunks)
  • components/trengo/actions/close-ticket/close-ticket.mjs (1 hunks)
  • components/trengo/actions/create-contact/create-contact.mjs (1 hunks)
  • components/trengo/actions/find-contacts/find-contacts.mjs (1 hunks)
  • components/trengo/actions/get-article/get-article.mjs (1 hunks)
  • components/trengo/actions/get-block/get-block.mjs (1 hunks)
  • components/trengo/actions/get-category/get-category.mjs (1 hunks)
  • components/trengo/actions/get-help-center/get-help-center.mjs (1 hunks)
  • components/trengo/actions/get-label/get-label.mjs (1 hunks)
  • components/trengo/actions/get-message/get-message.mjs (1 hunks)
  • components/trengo/actions/list-all-blocks/list-all-blocks.mjs (1 hunks)
  • components/trengo/actions/list-all-categories/list-all-categories.mjs (1 hunks)
  • components/trengo/actions/list-articles/list-articles.mjs (1 hunks)
  • components/trengo/actions/list-help-centers/list-help-centers.mjs (1 hunks)
  • components/trengo/actions/list-labels/list-labels.mjs (1 hunks)
  • components/trengo/actions/list-messages/list-messages.mjs (1 hunks)
  • components/trengo/actions/list-tickets/list-tickets.mjs (1 hunks)
  • components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs (1 hunks)
  • components/trengo/actions/send-a-message/send-a-message.mjs (1 hunks)
  • components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs (1 hunks)
  • components/trengo/actions/send-a-ticket-message/send-a-ticket-message.mjs (1 hunks)
  • components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs (1 hunks)
  • components/trengo/package.json (1 hunks)
  • components/trengo/sources/new-inbound-message/new-inbound-message.mjs (1 hunks)
  • components/trengo/sources/new-internal-note/new-internal-note.mjs (1 hunks)
  • components/trengo/sources/new-outbound-message/new-outbound-message.mjs (1 hunks)
  • components/trengo/sources/phone-call-ended/phone-call-ended.mjs (1 hunks)
  • components/trengo/sources/phone-call-missed/phone-call-missed.mjs (1 hunks)
  • components/trengo/sources/phone-call-started/phone-call-started.mjs (1 hunks)
  • components/trengo/sources/ticket-closed/ticket-closed.mjs (1 hunks)
  • components/trengo/sources/ticket-label-added/ticket-label-added.mjs (1 hunks)
  • components/trengo/sources/ticket-reopened/ticket-reopened.mjs (1 hunks)
  • components/trengo/sources/voice-call-recorded/voice-call-recorded.mjs (1 hunks)
  • components/trengo/trengo.app.mjs (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.

Applied to files:

  • components/trengo/actions/list-messages/list-messages.mjs
  • components/trengo/actions/send-a-message/send-a-message.mjs
  • components/trengo/actions/send-a-ticket-message/send-a-ticket-message.mjs
  • components/trengo/sources/new-outbound-message/new-outbound-message.mjs
  • components/trengo/actions/get-message/get-message.mjs
📚 Learning: 2024-07-04T18:11:59.822Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.

Applied to files:

  • components/trengo/actions/list-messages/list-messages.mjs
  • components/trengo/actions/list-all-categories/list-all-categories.mjs
  • components/trengo/actions/list-all-blocks/list-all-blocks.mjs
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 16954
File: components/salesloft/salesloft.app.mjs:14-23
Timestamp: 2025-06-04T17:52:05.780Z
Learning: In the Salesloft API integration (components/salesloft/salesloft.app.mjs), the _makeRequest method returns response.data which directly contains arrays for list endpoints like listPeople, listCadences, listUsers, and listAccounts. The propDefinitions correctly call .map() directly on these responses without needing to destructure a nested data property.

Applied to files:

  • components/trengo/trengo.app.mjs
🧬 Code graph analysis (5)
components/trengo/actions/get-article/get-article.mjs (8)
components/trengo/actions/attach-label/attach-label.mjs (1)
  • response (30-36)
components/trengo/actions/close-ticket/close-ticket.mjs (1)
  • response (30-36)
components/trengo/actions/get-block/get-block.mjs (1)
  • response (33-37)
components/trengo/actions/get-category/get-category.mjs (1)
  • response (33-37)
components/trengo/actions/get-help-center/get-help-center.mjs (1)
  • response (24-27)
components/trengo/actions/get-label/get-label.mjs (1)
  • response (24-27)
components/trengo/actions/get-message/get-message.mjs (1)
  • response (33-37)
components/trengo/trengo.app.mjs (8)
  • response (75-79)
  • response (165-169)
  • response (181-185)
  • response (199-204)
  • response (217-221)
  • response (235-240)
  • response (254-259)
  • response (273-278)
components/trengo/actions/list-all-categories/list-all-categories.mjs (7)
components/trengo/actions/find-contacts/find-contacts.mjs (1)
  • resourcesStream (26-33)
components/trengo/actions/list-all-blocks/list-all-blocks.mjs (2)
  • resourcesStream (32-37)
  • length (44-44)
components/trengo/actions/list-articles/list-articles.mjs (2)
  • resourcesStream (56-66)
  • length (73-73)
components/trengo/actions/list-help-centers/list-help-centers.mjs (2)
  • resourcesStream (26-29)
  • length (36-36)
components/trengo/actions/list-labels/list-labels.mjs (2)
  • resourcesStream (26-31)
  • length (38-38)
components/trengo/actions/list-messages/list-messages.mjs (2)
  • resourcesStream (32-37)
  • length (44-44)
components/trengo/actions/list-tickets/list-tickets.mjs (2)
  • resourcesStream (79-92)
  • length (99-99)
components/trengo/actions/get-block/get-block.mjs (3)
components/trengo/actions/get-help-center/get-help-center.mjs (1)
  • response (24-27)
components/trengo/actions/get-label/get-label.mjs (1)
  • response (24-27)
components/trengo/trengo.app.mjs (8)
  • response (75-79)
  • response (165-169)
  • response (181-185)
  • response (199-204)
  • response (217-221)
  • response (235-240)
  • response (254-259)
  • response (273-278)
components/trengo/actions/list-all-blocks/list-all-blocks.mjs (7)
components/trengo/actions/find-contacts/find-contacts.mjs (1)
  • resourcesStream (26-33)
components/trengo/actions/list-all-categories/list-all-categories.mjs (2)
  • resourcesStream (32-37)
  • length (44-44)
components/trengo/actions/list-articles/list-articles.mjs (2)
  • resourcesStream (56-66)
  • length (73-73)
components/trengo/actions/list-help-centers/list-help-centers.mjs (2)
  • resourcesStream (26-29)
  • length (36-36)
components/trengo/actions/list-labels/list-labels.mjs (2)
  • resourcesStream (26-31)
  • length (38-38)
components/trengo/actions/list-messages/list-messages.mjs (2)
  • resourcesStream (32-37)
  • length (44-44)
components/trengo/actions/list-tickets/list-tickets.mjs (2)
  • resourcesStream (79-92)
  • length (99-99)
components/trengo/actions/list-help-centers/list-help-centers.mjs (7)
components/trengo/actions/find-contacts/find-contacts.mjs (1)
  • resourcesStream (26-33)
components/trengo/actions/list-all-blocks/list-all-blocks.mjs (2)
  • resourcesStream (32-37)
  • length (44-44)
components/trengo/actions/list-all-categories/list-all-categories.mjs (2)
  • resourcesStream (32-37)
  • length (44-44)
components/trengo/actions/list-articles/list-articles.mjs (2)
  • resourcesStream (56-66)
  • length (73-73)
components/trengo/actions/list-labels/list-labels.mjs (2)
  • resourcesStream (26-31)
  • length (38-38)
components/trengo/actions/list-messages/list-messages.mjs (2)
  • resourcesStream (32-37)
  • length (44-44)
components/trengo/actions/list-tickets/list-tickets.mjs (2)
  • resourcesStream (79-92)
  • length (99-99)
⏰ 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). (3)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (31)
components/trengo/actions/send-a-ticket-message/send-a-ticket-message.mjs (1)

5-5: Version bump is appropriate.

The version has been incremented from "0.0.2" to "0.0.3" as part of a broader versioning pass for the Trengo component. Since no functional or structural changes are made to this action, the patch-level bump is suitable.

components/trengo/actions/get-label/get-label.mjs (1)

7-7: Version bump without corresponding logic changes — verify versioning strategy.

Line 7 shows a version bump from 0.0.3 to 0.0.4, but the enriched summary confirms "no changes to logic, API, or props." Per semantic versioning conventions, version increments should align with changes to the public API or implementation.

Is this version bump part of a batch versioning strategy across the Trengo module (e.g., updating all action versions to reflect a new module release)? If so, please clarify the rationale. Alternatively, if this file was not intended to be modified, ensure only files with substantive changes are included in the PR.

components/trengo/sources/phone-call-started/phone-call-started.mjs (1)

7-7: Version bump is appropriate.

The version update from 0.0.7 to 0.0.8 aligns with the new help-center features being introduced in this PR.

components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs (1)

7-7: Version bump aligns with PR pattern.

The version update from 0.0.8 to 0.0.9 is consistent with the broader PR-wide action version updates and is appropriate for this change.

components/trengo/sources/voice-call-recorded/voice-call-recorded.mjs (1)

7-7: LGTM: Version bump is coordinated with package update.

The version increment aligns with the package-wide bump to 0.7.0.

components/trengo/sources/new-internal-note/new-internal-note.mjs (1)

7-7: LGTM: Version bump is coordinated with package update.

The version increment aligns with the package-wide bump to 0.7.0.

components/trengo/sources/ticket-closed/ticket-closed.mjs (1)

7-7: LGTM: Version bump is coordinated with package update.

The version increment aligns with the package-wide bump to 0.7.0.

components/trengo/sources/new-inbound-message/new-inbound-message.mjs (1)

7-7: LGTM: Version bump is coordinated with package update.

The version increment aligns with the package-wide bump to 0.7.0.

components/trengo/actions/find-contacts/find-contacts.mjs (1)

7-7: LGTM: Version bump is coordinated with package update.

The version increment aligns with the package-wide bump to 0.7.0.

components/trengo/sources/ticket-reopened/ticket-reopened.mjs (1)

7-7: LGTM: Version bump is coordinated with package update.

The version increment aligns with the package-wide bump to 0.7.0.

components/trengo/actions/list-tickets/list-tickets.mjs (1)

8-8: LGTM: Version bump is coordinated with package update.

The version increment aligns with the package-wide bump to 0.7.0.

components/trengo/package.json (1)

3-3: All new help-center action files exist and are properly integrated—the original review concern is invalid.

The verification confirms that all 7 expected new action files are present in the repository:

  • components/trengo/actions/get-article/get-article.mjs
  • components/trengo/actions/get-block/get-block.mjs
  • components/trengo/actions/get-category/get-category.mjs
  • components/trengo/actions/get-help-center/get-help-center.mjs
  • components/trengo/actions/list-all-blocks/list-all-blocks.mjs
  • components/trengo/actions/list-all-categories/list-all-categories.mjs
  • components/trengo/actions/list-help-centers/list-help-centers.mjs

Additionally, all required propDefinitions (categoryId, articleId, blockId) and methods (getHelpCenters, listCategories, getArticle, getCategory, listBlocks, getBlock, getHelpCenter) are present and correctly implemented in trengo.app.mjs.

The version bump (0.6.0 → 0.7.0) correctly follows semver for backward-compatible feature additions, and all corresponding implementation files are in place.

components/trengo/actions/list-messages/list-messages.mjs (1)

8-8: LGTM! Routine version bump.

components/trengo/actions/list-articles/list-articles.mjs (1)

7-7: LGTM! Routine version bump.

components/trengo/sources/new-outbound-message/new-outbound-message.mjs (1)

7-7: LGTM! Routine version bump.

components/trengo/actions/attach-label/attach-label.mjs (1)

7-7: LGTM! Routine version bump.

components/trengo/actions/create-contact/create-contact.mjs (1)

6-6: LGTM! Routine version bump.

components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs (1)

7-7: LGTM! Routine version bump.

components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs (1)

6-6: LGTM! Routine version bump.

components/trengo/sources/phone-call-ended/phone-call-ended.mjs (1)

7-7: LGTM! Routine version bump.

components/trengo/actions/send-a-message/send-a-message.mjs (1)

6-6: Version bump to 0.0.9 is fine

Metadata-only change; behavior and props remain unchanged and consistent with existing patterns.

components/trengo/sources/phone-call-missed/phone-call-missed.mjs (1)

7-7: Source version 0.0.8 accepted

Pure version bump; webhook handling and metadata are unchanged and remain correct.

components/trengo/actions/close-ticket/close-ticket.mjs (1)

7-7: Action version 0.0.2 looks appropriate

No logic changes; run implementation for closing tickets is still correct and consistent with other actions.

components/trengo/actions/list-labels/list-labels.mjs (1)

8-8: Label listing action version bump is acceptable

This is a metadata-only bump to 0.0.4; pagination and summary logic remain intact.

components/trengo/actions/get-message/get-message.mjs (1)

7-7: Get Message action version 0.0.4 approved

No behavioral differences; existing implementation continues to look correct.

components/trengo/sources/ticket-label-added/ticket-label-added.mjs (1)

7-7: Ticket label added source version bump is OK

Functional logic is unchanged; updating to 0.0.8 is consistent with the rest of the Trengo sources.

components/trengo/actions/get-block/get-block.mjs (1)

1-40: New Get Block action is correctly wired

Props, dependent blockId options (scoped by helpCenterId), and the run implementation calling app.getBlock all follow the existing Trengo action conventions and look correct.

components/trengo/actions/get-help-center/get-help-center.mjs (1)

1-30: New Get Help Center action matches existing patterns

helpCenterId prop and run method delegating to app.getHelpCenter are straightforward and consistent with the other Trengo GET actions; no issues found.

components/trengo/actions/get-category/get-category.mjs (1)

1-41: Get Category action wiring and dependency resolution look correct

Props correctly scope categoryId by helpCenterId, and run() cleanly delegates to this.app.getCategory while exporting a clear success summary. No issues from a correctness or UX standpoint.

components/trengo/actions/get-article/get-article.mjs (1)

1-41: Get Article action mirrors existing Get- patterns and looks correct*

Prop wiring (including scoping articleId by helpCenterId) and the run() method’s delegation to this.app.getArticle are consistent with other Trengo “Get …” actions, with an appropriate read-only summary.

components/trengo/actions/list-help-centers/list-help-centers.mjs (1)

1-42: List Help Centers action implements streaming + maxResults pattern correctly

The action streams help centers via utils.getResourcesStream, respects the optional maxResults cap, and returns the accumulated list with a clear, count-based summary message and correct pluralization. This aligns well with other Trengo list-* actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ACTION] trengo - Helpcenter

3 participants