-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[ACTION] trengo - Helpcenter #19277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[ACTION] trengo - Helpcenter #19277
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughThis pull request adds six new Trengo action modules for retrieving help center resources (articles, blocks, categories, and help centers), extends the Trengo app client with corresponding API methods and propDefinitions, updates the package version to 0.6.0, and bumps action and source versions across the integration. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (32)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2025-10-20T01:01:02.970ZApplied to files:
📚 Learning: 2024-07-04T18:11:59.822ZApplied to files:
🧬 Code graph analysis (6)components/trengo/actions/get-help-center/get-help-center.mjs (7)
components/trengo/actions/get-category/get-category.mjs (7)
components/trengo/actions/get-article/get-article.mjs (7)
components/trengo/actions/list-all-categories/list-all-categories.mjs (5)
components/trengo/actions/get-block/get-block.mjs (7)
components/trengo/trengo.app.mjs (7)
⏰ 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)
🔇 Additional comments (27)
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. Comment |
d990148 to
f7256bc
Compare
There was a problem hiding this 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 sourceThe version update to
0.0.7is 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 messageThe bump to
version: "0.0.8"is in line with the other Trengo actions and doesn’t change runtime behavior. The validation aroundthreadId/toUserIdandbody/attachmentIdsis 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 summaryThe version increase to
0.0.7is 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$summarytext with action purposeThe bump to
version: "0.0.8"matches the rest of the Trengo actions and doesn’t alter runtime behavior. The validation aroundrecepientPhoneNumber/ticketIdand 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
📒 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.mjscomponents/trengo/actions/get-message/get-message.mjscomponents/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.mjscomponents/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-breakingThis is a straightforward metadata bump to
version: "0.0.6"with no behavioral changes.getMetaandgetEventremain 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 safeThe update to
version: "0.0.8"is consistent with the broader Trengo action set. Props and therunimplementation (mapping tothis.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 behaviorBumping
versionto0.0.5keeps this action aligned with the other Trengo updates. The streaming of tickets viautils.getResourcesStreamand themaxResultsshort‑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 straightforwardUpdating
versionto0.0.7keeps this source in sync with the other Trengo sources.getMetaandgetEventremain 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
helpCenterIdand dependentcategoryIdprops match the new propDefinitions in the app.rundelegates tothis.app.getCategorywith 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 actionsThe props (
helpCenterId, dependentblockId) andrunimplementation callingthis.app.getBlockare 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 consistentThe action correctly exposes
helpCenterId, callsthis.app.getHelpCenterwith$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
helpCenterIdand dependentarticleIdprops are wired to the corresponding app propDefinitions.rundelegates tothis.app.getArticlewith 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, andblockIdfollow the same pattern as existing ID props (ticketId,labelId,messageId): integer type, clear labels/descriptions, and asyncoptionsthat page usingpage + 1.- Each options resolver accepts
helpCenterIdand 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, andgetBlockall delegate to_makeRequestwith paths that align with the help-center endpoints described in the issue.listQuickRepliesis 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.
components/trengo/actions/list-all-help-centers/list-all-help-centers.mjs
Outdated
Show resolved
Hide resolved
components/trengo/actions/list-all-help-centers/list-all-help-centers.mjs
Outdated
Show resolved
Hide resolved
f7256bc to
0ea6461
Compare
michelle0927
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
WHY
Resolves #19172
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.