-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[Components] FreshChat - new component #18944
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds a new Freshchat action that lists messages in a conversation (supports fromTime and maxResults) and bumps the component package version. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action as Freshchat List Messages Action
participant Runtime as Platform Runtime
participant App as Freshchat App SDK
participant API as Freshchat API
User->>Action: invoke run({ conversationId, fromTime, maxResults })
Action->>Runtime: call getPaginatedResults(fn: app.listMessages, args)
Runtime->>App: listMessages(args: { conversation_id, from_time, ... })
App->>API: HTTP request to /messages (paginated)
API-->>App: paginated message pages
App-->>Runtime: aggregated results
Runtime-->>Action: messages array
Action-->>User: return full response + summary (message_count, ...)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches❌ Failed checks (2 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (3)📚 Learning: 2024-10-08T15:33:38.240ZApplied to files:
📚 Learning: 2025-07-09T18:07:12.426ZApplied to files:
📚 Learning: 2024-12-12T19:23:09.039ZApplied to files:
⏰ 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 (7)
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: 0
🧹 Nitpick comments (1)
components/freshchat/actions/list-messages/list-messages.mjs (1)
31-36: Consider adding a format example forfromTime.The description mentions ISO 8601 format, but providing an example would improve usability.
Apply this diff to add a format example:
fromTime: { type: "string", label: "From Time", - description: "UTC datetime to retrieve messages after this timestamp (ISO 8601 format)", + description: "UTC datetime to retrieve messages after this timestamp (ISO 8601 format, e.g., `2025-11-03T21:18:06Z`)", optional: true, },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/freshchat/actions/list-messages/list-messages.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
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/freshchat/actions/list-messages/list-messages.mjs
⏰ 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: Verify TypeScript components
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (2)
components/freshchat/actions/list-messages/list-messages.mjs (2)
3-13: LGTM! Metadata and annotations are well-configured.The action metadata is properly structured with appropriate annotations for a read-only list operation.
44-67: LGTM! The run method is correctly implemented.The implementation properly:
- Handles parameter conversion from camelCase to snake_case (
fromTime→from_time)- Uses pagination via
getPaginatedResults- Exports a clear summary message
- Returns the full response
The code aligns with the PR objectives to retrieve conversation history using conversation_id.
8f82abb to
54869dd
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 (2)
components/freshchat/actions/list-messages/list-messages.mjs(1 hunks)components/freshchat/package.json(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.
Applied to files:
components/freshchat/package.json
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
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/freshchat/actions/list-messages/list-messages.mjs
⏰ 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: Verify TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (3)
components/freshchat/package.json (1)
3-3: LGTM! Appropriate version bump.The minor version bump from 0.1.1 to 0.2.0 correctly reflects the addition of a new action to the component.
components/freshchat/actions/list-messages/list-messages.mjs (2)
1-13: LGTM! Well-structured action metadata.The action definition follows Pipedream conventions with appropriate annotations for a read-only list operation. The documentation link and metadata are correctly configured.
52-63: Code verified as correct.The Freshchat API list messages endpoint accepts
from_timeas a query parameter, and the response includes amessagesarray andpaginationobject. The implementation correctly:
- Uses
resourceKey: "messages"to access the messages array- Passes
from_timein the params object- Relies on the
paginate()method's proper handling of the pagination metadataNo issues found. The code follows the API specification correctly.
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.
One description improvement we could make, but moving it to QA nonetheless
|
Hi everyone, all test cases are passed! Ready for release! Test reports
|
54869dd to
c8ba2ff
Compare
|
/approve |
WHY
Resolves #18936
Summary by CodeRabbit