-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[ACTION] trengo - list quick replies #19271
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?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds a new Trengo action to list quick replies, a constants file exposing FILTER_TYPES (MESSAGING, EMAIL), and bumps the Trengo component version in package.json. The action accepts an optional filterType and calls the app SDK method to retrieve quick replies. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
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: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (5)
components/trengo/sources/new-internal-note/new-internal-note.mjs (1)
7-20: Summary text does not match internal note event type.The source is "New Internal Note Event", but
summarystill says "New ticket label added event", which is confusing for users inspecting emitted events. Consider aligning the text with the event type.- summary: `New ticket label added event: ${event?.body?.message}`, + summary: `New internal note event: ${event?.body?.message}`,components/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs (1)
7-54: Fix typo in configuration error message.The validation logic is sound, but the thrown message contains a typo: "Attachement". This is user-facing and worth correcting.
- throw new ConfigurationError("Either `Body` or `Attachement IDs` should be set!"); + throw new ConfigurationError("Either `Body` or `Attachment IDs` should be set!");components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs (1)
22-27: Optional: Fix typo in prop name.The prop name
recepientPhoneNumberis misspelled (should berecipientPhoneNumber). While this is pre-existing code and not introduced by this PR, consider fixing it for API consistency.components/trengo/sources/new-outbound-message/new-outbound-message.mjs (1)
19-19: Optional: Fix typo in summary message.The word "outbund" should be "outbound". While this is pre-existing code and not introduced by this PR, consider fixing it for better user experience.
Apply this diff to fix the typo:
- summary: `New outbund message event: ${event?.body?.message}`, + summary: `New outbound message event: ${event?.body?.message}`,components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs (1)
78-79: Summary message text doesn’t reflect the action behaviorThe summary says “The contact has been created”, but this action sends a WhatsApp template message, not a contact-creation call. This can confuse users inspecting step output.
Consider updating to something aligned with the action, for example:
- $.export("$summary", `The contact has been created. (${resp.name} ID:${resp.id})`); - return resp; + $.export("$summary", "WhatsApp template message sent successfully"); + return resp;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (27)
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-label/get-label.mjs(1 hunks)components/trengo/actions/get-message/get-message.mjs(1 hunks)components/trengo/actions/list-all-quick-replies/list-all-quick-replies.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(1 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-whatsapp-message-template/send-a-whatsapp-message-template.mjscomponents/trengo/actions/get-message/get-message.mjscomponents/trengo/actions/send-a-ticket-message/send-a-ticket-message.mjscomponents/trengo/actions/list-messages/list-messages.mjscomponents/trengo/actions/send-a-message/send-a-message.mjscomponents/trengo/actions/send-a-team-chat-message/send-a-team-chat-message.mjs
📚 Learning: 2024-10-30T15:24:39.294Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
Applied to files:
components/trengo/actions/create-contact/create-contact.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
🧬 Code graph analysis (1)
components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs (4)
components/trengo/actions/attach-label/attach-label.mjs (1)
response(30-36)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 (4)
response(75-79)response(165-169)response(181-185)response(199-204)
⏰ 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 (23)
components/trengo/sources/voice-call-recorded/voice-call-recorded.mjs (1)
7-7: Version bump only; behavior remains consistent.The version metadata update to
0.0.6matches the broader Trengo package bump and introduces no functional changes.components/trengo/package.json (1)
3-3: Package version bump looks consistent with component updates.Updating
@pipedream/trengoto0.6.0aligns with the new action and multiple component version bumps in this PR.components/trengo/sources/phone-call-started/phone-call-started.mjs (1)
7-7: Source version increment is straightforward.The bump to
0.0.7preserves existing behavior for the phone call started webhook source.components/trengo/sources/ticket-label-added/ticket-label-added.mjs (1)
7-7: Ticket label source version bump is consistent and safe.The metadata update to
0.0.7matches the existing ticket-label-added semantics without altering behavior.components/trengo/actions/get-label/get-label.mjs (1)
7-7: Read-only get-label action version bump looks good.Incrementing the action version to
0.0.3keeps the existinggetLabelbehavior unchanged and consistent with the documentation link.components/trengo/actions/list-articles/list-articles.mjs (1)
7-7: LGTM: Routine version bump.Version increment from 0.0.5 to 0.0.6 is appropriate as part of the package update that introduces new functionality (list-all-quick-replies action).
components/trengo/actions/log-a-voice-call/log-a-voice-call.mjs (1)
6-6: LGTM: Routine version bump.Version increment from 0.0.7 to 0.0.8 is appropriate as part of the package update.
components/trengo/actions/create-contact/create-contact.mjs (1)
6-6: LGTM: Routine version bump.Version increment from 0.0.7 to 0.0.8 is appropriate as part of the package update.
components/trengo/sources/ticket-reopened/ticket-reopened.mjs (1)
7-7: LGTM: Routine version bump.Version increment from 0.0.4 to 0.0.5 is appropriate as part of the package update.
components/trengo/sources/new-outbound-message/new-outbound-message.mjs (1)
7-7: LGTM: Routine version bump.Version increment from 0.0.6 to 0.0.7 is appropriate as part of the package update.
components/trengo/actions/send-a-message/send-a-message.mjs (1)
6-6: LGTM: Routine version bump.Version increment from 0.0.7 to 0.0.8 is appropriate as part of the package update.
components/trengo/sources/phone-call-ended/phone-call-ended.mjs (1)
7-7: LGTM: Routine version bump.Version increment from 0.0.6 to 0.0.7 is appropriate as part of the package update.
components/trengo/sources/ticket-closed/ticket-closed.mjs (1)
7-7: LGTM: Routine version bump.Version increment from 0.0.4 to 0.0.5 is appropriate as part of the package update.
components/trengo/actions/list-messages/list-messages.mjs (1)
8-8: LGTM!Version bump aligns with the package version update.
components/trengo/actions/find-contacts/find-contacts.mjs (1)
7-7: LGTM!Version bump aligns with the package version update.
components/trengo/actions/list-labels/list-labels.mjs (1)
8-8: LGTM!Version bump aligns with the package version update.
components/trengo/actions/attach-label/attach-label.mjs (1)
7-7: LGTM!Version bump aligns with the package version update.
components/trengo/actions/get-message/get-message.mjs (1)
7-7: LGTM!Version bump aligns with the package version update.
components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs (1)
7-7: Version bump is consistent with the rest of the Trengo actionsIncrementing the action version to
0.0.8without behavior changes is consistent with the coordinated release across this package.components/trengo/actions/list-tickets/list-tickets.mjs (1)
8-8: Version bump aligns with coordinated Trengo releaseUpdating the action version to
0.0.5with no logic changes is consistent with the other Trengo actions in this PR.components/trengo/actions/send-a-ticket-message/send-a-ticket-message.mjs (1)
5-5: Metadata version bump looks goodThe version increment to
0.0.2with unchanged behavior is consistent with other Trengo action updates in this PR.components/trengo/sources/new-inbound-message/new-inbound-message.mjs (1)
7-7: Source version bump is straightforwardIncrementing the source version to
0.0.7without changing logic is consistent with the rest of the Trengo components in this PR.components/trengo/trengo.app.mjs (1)
374-379: NewlistQuickReplieswrapper is consistent with existing API helpersThe new method correctly delegates to
_makeRequestwithpath: "/quick_replies"and matches the style of other list/get helpers likelistLabelsandgetTickets. This is a clean addition to the app API.
components/trengo/sources/phone-call-missed/phone-call-missed.mjs
Outdated
Show resolved
Hide resolved
components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs
Outdated
Show resolved
Hide resolved
627b570 to
f0fc852
Compare
lcaresia
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!
|
@jcortes Approved and moved to QA, but have conflits to resolve. |
f0fc852 to
082ccc3
Compare
082ccc3 to
917acc8
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs(1 hunks)components/trengo/common/constants.mjs(1 hunks)components/trengo/package.json(1 hunks)
⏰ 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 (3)
components/trengo/package.json (1)
3-3: LGTM! Version bump is appropriate.The minor version bump from 0.7.0 to 0.8.0 correctly reflects the addition of new functionality (the list quick replies action).
components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs (1)
25-33: Method exists and parameter appears intentional, but API documentation lacks confirmation.The
listQuickRepliesmethod is properly defined intrengo.app.mjs(lines 463–468) and accepts thetypeparameter as passed. ThefilterTypeproperty referencesconstants.FILTER_TYPESwith defined options (MESSAGING,/quick_repliesendpoint does not document query parameters—including thetypeparameter. Verify that the API actually accepts this parameter, as it may be undocumented or the endpoint may ignore it.components/trengo/common/constants.mjs (1)
1-6: Verify FILTER_TYPES values against Trengo API documentation for list quick replies endpoint.The FILTER_TYPES constant defines "MESSAGING" and "EMAIL" as filter values for the
typeparameter in the list quick replies endpoint. Trengo API documentation for this endpoint does not publicly expose the exact valid values for this parameter. Additionally, Trengo's typical API patterns use lowercase channel types (email, chat, facebook, twitter, sms, voice, help_center, whatsapp), whereas "MESSAGING" and "EMAIL" are uppercase and "MESSAGING" is not listed as a standard Trengo channel type. Confirm these values are correct by testing against the live Trengo API or consulting the detailed API specification directly.
components/trengo/actions/list-all-quick-replies/list-all-quick-replies.mjs
Show resolved
Hide resolved
|
Hi everyone, all test cases are passed! Ready for release! Test reports
|
WHY
Resolves #19173
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.