Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented Nov 26, 2025

WHY

Resolves #19172

Summary by CodeRabbit

  • New Features

    • Added Trengo actions to retrieve articles, blocks, categories, and help centers; actions to list blocks, categories, and help centers with optional max-results and streaming support
    • Expanded Trengo integration: new selectable IDs (category, article, block) and new API methods for listing/getting help-center resources
  • Chores

    • Multiple action/source version bumps and Trengo package 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 Dec 1, 2025 1:23pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Dec 1, 2025 1:23pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

Adds Trengo help-center actions (list/get for help centers, categories, articles, blocks), new propDefinitions for category/article/block IDs with paginated option loaders, and new Trengo app methods that wrap the corresponding API endpoints.

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 descriptors with metadata, props (app + hierarchical ID propDefinitions), and async run methods that call this.app.* (getArticle/getBlock/getCategory/getHelpCenter), 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 create resource streams from this.app.* (listBlocks/listCategories/getHelpCenters), accumulate items into arrays, respect optional maxResults, export a summary with count, and return collected arrays.
App methods & propDefinitions
components/trengo/trengo.app.mjs
Added propDefinitions: categoryId, articleId, blockId with async paginated option loaders. Added API wrapper methods: listQuickReplies, getHelpCenter, listCategories, getCategory, getArticle, listBlocks, getBlock delegating to _makeRequest with templated paths.
Version bumps & package
components/trengo/actions/*, components/trengo/sources/*, components/trengo/package.json
Multiple action/source modules had version fields incremented. Package version bumped components/trengo/package.json: 0.6.00.7.0.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Action as Action (user trigger)
    participant App as Trengo App (this.app)
    participant API as Trengo API

    Note over Action,App: Get/list actions invoke app wrappers
    Action->>App: call e.g. getArticle({ $, helpCenterId, articleId })\nor listCategories({ helpCenterId, page })
    App->>API: HTTP GET /help_center/{helpCenterId}/... (templated path)
    API-->>App: 200 OK (paginated items or item)
    alt streaming list with maxResults
        App->>Action: yields items via resources stream
        Action->>Action: accumulate until maxResults reached (stop)
    end
    App-->>Action: return response (item or array)
    Action->>Action: $.export("$summary", "Successfully retrieved ...")
    Action-->>Caller: return data
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Focus review on:
    • Correct path interpolation and parameter names in new app methods vs. action props
    • Pagination logic in propDefinition option loaders (page handling + label/value mapping)
    • resourcesStream usage and early termination when maxResults is reached
    • Consistency of exported summaries and annotations across new actions
    • Package version bump alignment

Possibly related PRs

Suggested labels

User submitted

Suggested reviewers

  • lcaresia

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description only includes 'Resolves #19172' and does not follow the template structure which requires a 'WHY' section with meaningful context. Add a detailed 'WHY' section explaining the motivation for the Helpcenter actions implementation beyond just the issue reference.
Out of Scope Changes check ⚠️ Warning The PR includes version bumps across multiple existing action and source modules unrelated to the Helpcenter implementation, which are out of scope for the primary objective. Separate version bump changes into a dedicated maintenance PR; keep this PR focused solely on the new Helpcenter actions and required app.mjs additions.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title '[ACTION] trengo - Helpcenter' is related to the main changes which add Helpcenter-related actions to the Trengo integration, but it is vague and lacks specificity about what actions were added.
Linked Issues check ✅ Passed The PR successfully implements all required Helpcenter endpoints: list/get help centers [#19172], list/get categories [#19172], list/get articles [#19172], and list/get blocks [#19172], with proper app.mjs support methods and action 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

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f87954a and 93bcb9e.

📒 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/get-message/get-message.mjs
  • components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs
  • components/trengo/actions/send-a-message/send-a-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-blocks/list-all-blocks.mjs
  • components/trengo/actions/list-all-categories/list-all-categories.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 (6)
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)
components/trengo/actions/get-block/get-block.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-article/get-article.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/get-article/get-article.mjs (5)
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/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/get-category/get-category.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-article/get-article.mjs (1)
  • response (33-37)
components/trengo/actions/get-block/get-block.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/trengo.app.mjs (6)
components/trengo/actions/close-ticket/close-ticket.mjs (1)
  • response (30-36)
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-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-help-center/get-help-center.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-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/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)
⏰ 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). (4)
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (33)
components/trengo/sources/new-inbound-message/new-inbound-message.mjs (1)

7-7: Version bump is consistent and safe

The version update to 0.0.8 is isolated and aligns with the broader Trengo package versioning changes in this PR. No behavioral impact in this source.

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

6-6: Version bump looks correct

Version increment to "0.0.9" is consistent with a metadata-only release; no functional changes introduced in this file.

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

6-6: Verify the version bump rationale.

The version has been incremented from "0.0.8" to "0.0.9", but the create-contact action itself has no functional changes. While the PR summary indicates coordinated version increments across multiple Trengo actions (likely due to new app methods and propDefinitions), please confirm that this version bump is intentional and aligns with your versioning strategy.

If this version bump is unrelated to changes in this specific action, consider reverting it or clarifying the versioning policy for the Trengo integration.

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

5-5: Version bump aligns with release scope.

The version increment from 0.0.2 to 0.0.3 is consistent with the PR's intent to release new Helpcenter actions. No functional changes are present in this file—only metadata.

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

1-68: LGTM: Existing action code unchanged; version bump appropriate.

This file retains all existing functionality and validation logic. The version bump from 0.0.8 to 0.0.9 aligns with the broader component updates in this PR. However, I notice this file contains only an existing team-chat-message action rather than the new help-center actions described in the PR objectives.

Clarification needed: Are the new help-center actions (list/get help centers, categories, articles, blocks) in separate files not included in this review? The PR summary mentions multiple new action modules being added (e.g., get-article, get-block, get-category, get-help-center, list-all-blocks, list-all-categories), but they are not visible in this provided file.

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

7-7: LGTM! Version bump is appropriate for the package release.

The version increment from "0.0.7" to "0.0.8" is appropriate for this release, which includes new Trengo help center actions across the package.

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

7-7: Clarify the version bump rationale and PR scope.

The version has been bumped from 0.0.7 to 0.0.8, but the file contains no functional changes—only a metadata update. While the enriched summary mentions this is part of a broader versioning strategy across Trengo modules, the PR objectives focus on implementing Helpcenter actions, which are unrelated to this phone-call-ended source.

This raises two concerns:

  1. Version bump justification: Typically, version bumps should accompany functional changes or bug fixes. A metadata-only change may not warrant a version increment.
  2. Scope clarity: If this PR is intended for Helpcenter implementation, the broad versioning updates across unrelated modules may indicate mixed concerns in a single PR.

Please clarify:

  • Is the version bump part of an intentional cross-module versioning strategy (e.g., coordinated release cycle)?
  • Does this PR's scope include both Helpcenter implementation and version updates across all Trengo modules, or is this a side effect?

If version updates are incidental to the Helpcenter work, consider separating them into a dedicated maintenance PR to keep concerns isolated.

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

7-7: LGTM! Version bump is appropriate for this release.

The version increment from 0.0.8 to 0.0.9 is a metadata-only change with no functional impact. This is part of the broader release that adds new Helpcenter actions to the Trengo app.

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

7-7: Version bump only; behavior unchanged.

The source’s behavior and event metadata are unchanged; updating the version to 0.0.6 is consistent with the broader Trengo source version refresh in this PR.

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

7-7: Version bump aligns with other Trengo sources.

Only the version is updated to 0.0.6; event handling and metadata remain the same, so no behavioral change is introduced.

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

8-8: Version bump with existing pagination logic intact.

Changing the action version to 0.0.6 leaves the streaming pagination and maxResults handling untouched and correct.

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

8-8: Version bump is consistent with the Trengo action set.

The action logic (streaming labels with maxResults) is unchanged; updating the version to 0.0.4 simply aligns this action with the coordinated Trengo version refresh in this PR.

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

7-7: Article listing behavior unchanged with new version.

The version increment to 0.0.7 leaves the help-center article listing, filters, and pagination logic intact and correct.

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

7-7: Stable get-label behavior with updated version.

Updating the action version to 0.0.4 doesn’t alter the call to this.app.getLabel or the exported summary; behavior remains consistent.

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

6-6: Voice-call logging action version-only change.

The increment to 0.0.9 keeps the existing payload mapping and summary for logVoiceCall untouched; no behavioral change is introduced.

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

7-7: LGTM!

Version bump aligns with the broader Trengo integration updates in this PR.

components/trengo/package.json (1)

3-3: LGTM!

Minor version bump appropriately reflects the addition of new Helpcenter actions and expanded API methods.

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

7-7: LGTM!

Version bump is consistent with the broader Trengo integration updates.

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

7-7: LGTM!

Version bump aligns with the broader Trengo integration updates.

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

7-7: LGTM!

Version bump is consistent with the broader Trengo integration updates.

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

8-8: LGTM!

Version bump is appropriate for coordinated release consistency across the Trengo integration.

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

7-7: LGTM!

Version bump aligns with the coordinated release update across Trengo actions.

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

7-7: LGTM!

Version bump maintains consistency with the broader Trengo integration release.

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

7-7: LGTM!

Version bump is appropriate for the coordinated Trengo integration release.

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

1-42: LGTM!

The action implementation correctly follows the established streaming pattern used across the Trengo integration. The use of utils.getResourcesStream, maxResults capping, and count-based summary with singular/plural handling all align with existing list actions like list-labels, list-messages, and list-articles.

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

1-41: LGTM!

The action correctly implements dependent prop resolution (articleId depends on helpCenterId) and follows the established pattern for single-item retrieval actions. The propDefinition wiring and run method are consistent with similar actions like get-block and get-category.

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

1-31: LGTM!

The action follows the established pattern for simple single-item retrieval. The implementation is clean and consistent with similar actions like get-label and get-message.

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

30-50: LGTM!

The implementation correctly follows the established streaming pattern used across all Trengo list actions. The count-based summary with singular/plural handling ("category" vs "categories") has been properly implemented, addressing the previous review feedback.

Regarding the past comment about manual pagination: the current approach using utils.getResourcesStream with maxResults is actually the standard pattern throughout the codebase. All similar list actions (list-labels, list-messages, list-articles, list-tickets, list-help-centers) use this same streaming approach rather than manual page props, making this implementation consistent with established conventions.

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

228-284: PropDefinitions follow established patterns correctly.

The new categoryId, articleId, and blockId propDefinitions are consistent with existing Trengo propDefinitions (e.g., ticketId, labelId, helpCenterId). They correctly:

  • Accept helpCenterId as a dependency parameter
  • Implement paginated async options with page + 1
  • Map API responses to { label, value } pairs

Note: A previous review suggested adding safe fallbacks for labels (e.g., category.name || String(category.id)), which remains a valid optional UX improvement but is not required for functionality.


463-516: API method wrappers are correctly implemented.

All seven new methods (listQuickReplies, getHelpCenter, listCategories, getCategory, getArticle, listBlocks, getBlock) follow the established pattern used by existing methods in this app:

  • Proper parameter destructuring with defaults
  • Correct path template construction
  • Delegation to _makeRequest with merged args

The endpoints align with the Trengo API documentation referenced in issue #19172.

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

1-41: LGTM!

The action correctly implements the "Get Block" functionality following the established Trengo action pattern. The prop wiring properly chains dependencies (blockId depends on helpCenterId), and the run method cleanly delegates to this.app.getBlock.

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

1-41: LGTM!

The action correctly implements the "Get Category" functionality following the same pattern as other Trengo get actions. Props are properly wired with categoryId depending on helpCenterId, and the implementation cleanly delegates to this.app.getCategory.

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

7-7: Version bump is appropriate.

The version increment from 0.0.6 to 0.0.7 aligns with the overall package version bump in this PR and reflects the addition of new help-center functionality to the Trengo integration.


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!

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.

@vunguyenhung
Copy link
Collaborator

Hi everyone, all test cases are passed! Ready for release!

Test reports

@jcortes jcortes force-pushed the trengo-new-components-helpcenter branch from f87954a to 93bcb9e Compare December 1, 2025 13:23
@jcortes
Copy link
Collaborator Author

jcortes commented Dec 1, 2025

/approve

@jcortes jcortes merged commit 1ad1bce into master Dec 1, 2025
10 checks passed
@jcortes jcortes deleted the trengo-new-components-helpcenter branch December 1, 2025 15:34
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

4 participants