-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New Components - zoho_desk #17979
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
New Components - zoho_desk #17979
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis update introduces new instant event sources for Zoho Desk: "New Article (Instant)", "Updated Article (Instant)", and "Deleted Article (Instant)". A reusable webhook handler is added to support these sources, and the Zoho Desk app gains webhook management methods. Several other files receive minor version bumps and import path updates, but no logic changes. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ZohoDeskSource (Instant)
participant CommonWebhook
participant ZohoDeskApp
participant ZohoDeskAPI
User->>ZohoDeskSource (Instant): Activate source
ZohoDeskSource (Instant)->>CommonWebhook: activate()
CommonWebhook->>ZohoDeskApp: createWebhook(endpoint, subscriptions)
ZohoDeskApp->>ZohoDeskAPI: POST /webhooks
ZohoDeskAPI-->>ZohoDeskApp: Webhook ID
ZohoDeskApp-->>CommonWebhook: Webhook ID
CommonWebhook-->>ZohoDeskSource (Instant): Activation complete
ZohoDeskAPI-)CommonWebhook: Send webhook event (e.g., Article_Add)
CommonWebhook->>ZohoDeskSource (Instant): run(event)
ZohoDeskSource (Instant)->>CommonWebhook: generateMeta(payload)
CommonWebhook->>User: Emit event with metadata
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15–25 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Poem
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ 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)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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 (2)
components/zoho_desk/package.json (1)
3-3
: Minor → minor (+0.0.9) feels large for patch-only changesAll individual components only jumped a patch level. Consider publishing
0.1.x
instead of0.2.0
unless the new webhook framework is deemed a minor feature.components/zoho_desk/sources/deleted-article-instant/test-event.mjs (1)
1-3
: Consider enriching the test event data for better testing coverage.The current test event only contains an
id
field, which may be insufficient for comprehensive testing. Consider adding additional fields that would typically be available in a deleted article webhook payload, such as:
deletedTime
or similar timestamptitle
for better identificationdeletedBy
user informationAlso, add a trailing comma after the
id
property for consistency:export default { - "id" : "123456789044" + "id": "123456789044", }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (29)
components/zoho_desk/actions/add-ticket-attachment/add-ticket-attachment.mjs
(1 hunks)components/zoho_desk/actions/add-ticket-comment/add-ticket-comment.mjs
(1 hunks)components/zoho_desk/actions/create-account/create-account.mjs
(1 hunks)components/zoho_desk/actions/create-contact/create-contact.mjs
(1 hunks)components/zoho_desk/actions/create-ticket/create-ticket.mjs
(1 hunks)components/zoho_desk/actions/find-contact/find-contact.mjs
(1 hunks)components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs
(1 hunks)components/zoho_desk/actions/search-ticket/search-ticket.mjs
(1 hunks)components/zoho_desk/actions/send-email-reply/send-email-reply.mjs
(1 hunks)components/zoho_desk/actions/update-contact/update-contact.mjs
(1 hunks)components/zoho_desk/actions/update-ticket/update-ticket.mjs
(1 hunks)components/zoho_desk/package.json
(1 hunks)components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs
(1 hunks)components/zoho_desk/sources/common/common-webhook.mjs
(1 hunks)components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs
(1 hunks)components/zoho_desk/sources/deleted-article-instant/test-event.mjs
(1 hunks)components/zoho_desk/sources/new-account/new-account.mjs
(1 hunks)components/zoho_desk/sources/new-agent/new-agent.mjs
(1 hunks)components/zoho_desk/sources/new-article-instant/new-article-instant.mjs
(1 hunks)components/zoho_desk/sources/new-article-instant/test-event.mjs
(1 hunks)components/zoho_desk/sources/new-contact/new-contact.mjs
(1 hunks)components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs
(1 hunks)components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs
(1 hunks)components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs
(1 hunks)components/zoho_desk/sources/new-ticket/new-ticket.mjs
(1 hunks)components/zoho_desk/sources/updated-article-instant/test-event.mjs
(1 hunks)components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs
(1 hunks)components/zoho_desk/sources/updated-ticket/updated-ticket.mjs
(1 hunks)components/zoho_desk/zoho_desk.app.mjs
(1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2024-10-10T19:18:27.998Z
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
Applied to files:
components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs
components/zoho_desk/sources/updated-ticket/updated-ticket.mjs
components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs
components/zoho_desk/sources/new-account/new-account.mjs
components/zoho_desk/sources/new-contact/new-contact.mjs
components/zoho_desk/sources/new-agent/new-agent.mjs
components/zoho_desk/sources/deleted-article-instant/test-event.mjs
components/zoho_desk/sources/new-ticket/new-ticket.mjs
components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs
components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs
components/zoho_desk/sources/new-article-instant/test-event.mjs
components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs
components/zoho_desk/sources/updated-article-instant/test-event.mjs
components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs
components/zoho_desk/sources/new-article-instant/new-article-instant.mjs
📚 Learning: 2025-01-23T03:55:15.166Z
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
Applied to files:
components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs
components/zoho_desk/sources/updated-ticket/updated-ticket.mjs
components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs
components/zoho_desk/sources/new-account/new-account.mjs
components/zoho_desk/sources/new-contact/new-contact.mjs
components/zoho_desk/sources/new-agent/new-agent.mjs
components/zoho_desk/sources/new-ticket/new-ticket.mjs
components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs
components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs
components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs
components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs
components/zoho_desk/sources/new-article-instant/new-article-instant.mjs
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common-webhook-methods.mjs:1-71
Timestamp: 2024-10-08T15:33:38.240Z
Learning: The `common-webhook-methods.mjs` object is designed to be extended, similar to an abstract class, and intentionally does not implement certain methods like `generateWebhookMeta` and `getEventType` to enforce implementation in subclasses.
Applied to files:
components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs
components/zoho_desk/sources/updated-ticket/updated-ticket.mjs
components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs
components/zoho_desk/sources/new-account/new-account.mjs
components/zoho_desk/sources/new-contact/new-contact.mjs
components/zoho_desk/sources/new-agent/new-agent.mjs
components/zoho_desk/sources/new-ticket/new-ticket.mjs
components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs
components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs
components/zoho_desk/sources/new-article-instant/test-event.mjs
components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs
components/zoho_desk/sources/updated-article-instant/test-event.mjs
components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs
components/zoho_desk/sources/common/common-webhook.mjs
components/zoho_desk/sources/new-article-instant/new-article-instant.mjs
components/zoho_desk/zoho_desk.app.mjs
📚 Learning: 2024-10-30T15:24:39.294Z
Learnt from: jcortes
PR: PipedreamHQ/pipedream#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/zoho_desk/actions/create-account/create-account.mjs
components/zoho_desk/actions/create-ticket/create-ticket.mjs
components/zoho_desk/sources/new-account/new-account.mjs
components/zoho_desk/actions/create-contact/create-contact.mjs
components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs
📚 Learning: 2024-07-24T02:05:59.531Z
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12697
File: components/salesforce_rest_api/sources/common.mjs:97-98
Timestamp: 2024-07-24T02:05:59.531Z
Learning: The `processTimerEvent` method in the `components/salesforce_rest_api/sources/common.mjs` file is intentionally left unimplemented to enforce that subclasses must implement this method, similar to an abstract class in object-oriented programming.
Applied to files:
components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs
📚 Learning: 2025-06-04T17:52:05.780Z
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#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/zoho_desk/zoho_desk.app.mjs
🧬 Code Graph Analysis (1)
components/zoho_desk/sources/common/common-webhook.mjs (1)
components/zoho_desk/sources/common/common-polling.mjs (1)
meta
(45-45)
⏰ 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 (41)
components/zoho_desk/sources/updated-ticket/updated-ticket.mjs (1)
1-1
: LGTM! Import refactoring aligns with polling/webhook separation.The import path change to
common-polling.mjs
and version increment are consistent with the broader refactoring to separate polling and webhook-based source logic.Also applies to: 9-9
components/zoho_desk/sources/new-ticket-attachment/new-ticket-attachment.mjs (1)
1-1
: LGTM! Consistent with the polling source refactoring pattern.The import path update and version increment maintain consistency with other polling-based sources in this refactoring.
Also applies to: 9-9
components/zoho_desk/sources/new-agent/new-agent.mjs (1)
1-1
: LGTM! Import refactoring is consistent.The changes align with the polling source refactoring pattern across the Zoho Desk components.
Also applies to: 9-9
components/zoho_desk/sources/new-contact/new-contact.mjs (1)
1-1
: LGTM! Refactoring changes are consistent.The import path update to
common-polling.mjs
and version increment follow the established pattern for this refactoring.Also applies to: 9-9
components/zoho_desk/zoho_desk.app.mjs (2)
148-154
: LGTM! Webhook creation method follows established patterns.The
createWebhook
method is well-implemented, using the existingmakeRequest
infrastructure and following the same patterns as other API methods in the file.
155-163
: LGTM! Webhook deletion method properly requires webhookId parameter.The
deleteWebhook
method correctly destructures the requiredwebhookId
parameter and uses the established patterns for API method implementation.components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs (2)
9-9
: Version bump looks goodPatch-level increment accurately reflects a non-functional import tweak.
1-1
: Import path verified and correctThe file
components/zoho_desk/sources/common/common-polling.mjs
exists, so the relative import in
components/zoho_desk/sources/new-ticket-message/new-ticket-message.mjs
(import common from "../common/common-polling.mjs";
) resolves as expected. No changes needed.components/zoho_desk/sources/new-account/new-account.mjs (2)
9-9
: Patch version bump acknowledgedNothing further.
1-1
: Import Path VerifiedThe
common-polling.mjs
helper exists atcomponents/zoho_desk/sources/common/common-polling.mjs
, and all sources—includingnew-account.mjs
—correctly import it via../common/common-polling.mjs
. No further changes needed.components/zoho_desk/actions/add-ticket-attachment/add-ticket-attachment.mjs (1)
10-10
: Version increment acknowledgedNo logic changes detected.
components/zoho_desk/actions/find-contact/find-contact.mjs (1)
8-8
: Version bump only — LGTMcomponents/zoho_desk/actions/update-ticket/update-ticket.mjs (1)
8-8
: Version bump LGTMPatch increment only; no functional impact detected.
Confirm the change is reflected incomponents/zoho_desk/CHANGELOG.md
(or equivalent).components/zoho_desk/actions/search-ticket/search-ticket.mjs (1)
8-8
: Version bump LGTMConsistent patch release; nothing else modified.
Just make sure release notes cover the bump.components/zoho_desk/actions/create-ticket/create-ticket.mjs (1)
8-8
: Version bump LGTMThe
0.0.3
patch aligns with other actions.
No additional feedback.components/zoho_desk/actions/create-account/create-account.mjs (1)
8-8
: Version bump LGTMTrivial metadata change; implementation untouched.
components/zoho_desk/actions/find-or-create-contact/find-or-create-contact.mjs (1)
8-8
: Version bump LGTMNo logic changes; patch version increment is appropriate.
components/zoho_desk/actions/update-contact/update-contact.mjs (1)
8-8
: Patch-level version bump looks goodVersion increment to
0.0.3
keeps semver semantics and stays in sync with the suite of Zoho Desk actions. No further action required.components/zoho_desk/actions/add-ticket-comment/add-ticket-comment.mjs (1)
8-8
: Consistent version bump
0.0.3
aligns with the coordinated patch release across actions. Nothing else changed—safe to merge.components/zoho_desk/actions/create-contact/create-contact.mjs (1)
8-8
: Version updated correctlyPatch bump to
0.0.3
matches the rest of the actions; no issues detected.components/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs (1)
1-1
: Import path confirmed
The filecomponents/zoho_desk/sources/common/common-polling.mjs
exists and matches the import incomponents/zoho_desk/sources/changed-ticket-status/changed-ticket-status.mjs
. No further action required.components/zoho_desk/actions/send-email-reply/send-email-reply.mjs (1)
8-8
: Patch bump acknowledged
version: "0.0.3"
is consistent with related modules—no additional feedback.components/zoho_desk/sources/new-ticket-comment/new-ticket-comment.mjs (1)
1-1
: LGTM! Clean refactoring to separate polling and webhook common modules.The import path update to
common-polling.mjs
and version bump align with the architectural improvement to distinguish between polling-based and webhook-based source patterns.Also applies to: 9-9
components/zoho_desk/sources/new-ticket/new-ticket.mjs (1)
1-1
: LGTM! Consistent with the polling module refactor.The changes mirror the pattern applied across other polling-based sources, maintaining consistency in the codebase architecture.
Also applies to: 9-9
components/zoho_desk/sources/new-article-instant/test-event.mjs (1)
1-103
: Excellent comprehensive test event coverage!This test event provides thorough coverage of the Zoho Desk article data structure, including all key fields like timestamps, user information, metrics, translations, and metadata. This will be valuable for testing and as documentation for developers.
components/zoho_desk/sources/updated-article-instant/updated-article-instant.mjs (1)
1-29
: Well-implemented webhook-based source following established patterns.The implementation correctly:
- Extends the common webhook base with proper method overrides
- Subscribes to the appropriate
Article_Update
event- Generates unique metadata using article ID and modification timestamp
- Follows naming conventions (no "New" prefix for update events per learned patterns)
- Imports and exposes the sample emit for testing
The code is clean, follows the established webhook source architecture, and aligns with the PR objectives for article event support.
components/zoho_desk/sources/new-article-instant/new-article-instant.mjs (4)
1-2
: LGTM!The imports correctly reference the common webhook base and test event module following established patterns.
4-11
: LGTM!Component configuration follows established conventions. The "New" prefix is appropriate since this source specifically emits events for new articles only.
12-26
: LGTM!Methods implementation correctly overrides the abstract methods from the common webhook base:
getSubscriptions()
properly subscribes toArticle_Add
eventsgenerateMeta()
creates appropriate metadata using the article's ID, title, and creation time
27-27
: LGTM!Proper assignment of sample event data for testing and documentation.
components/zoho_desk/sources/deleted-article-instant/deleted-article-instant.mjs (4)
1-2
: LGTM!Imports follow the same pattern as other instant sources.
4-11
: LGTM!Component configuration is appropriate. The name correctly omits the "New" prefix since this source emits events for deleted items rather than new items.
27-27
: LGTM!Consistent sample event assignment pattern.
19-25
: Please verify deleted-article webhook payload for a timestamp field before using Date.now().We need to ensure timestamp handling is consistent with the new-article source:
• Inspect the payload in
components/zoho_desk/sources/deleted-article-instant/test-event.mjs
(or real webhook) for a date field (e.g.deletedTime
,createdTime
, etc.).
• If a timestamp exists, replacets: Date.now()
withts: Date.parse(payload.<timestampField>)
.
• If no timestamp is provided by Zoho, usingDate.now()
is acceptable but document this behavior.components/zoho_desk/sources/updated-article-instant/test-event.mjs (1)
1-103
: LGTM!Comprehensive and realistic test fixture for Zoho Desk article update events. The structure includes all relevant metadata, user information, and article properties that would be expected from the Zoho Desk API.
components/zoho_desk/sources/common/common-webhook.mjs (6)
1-2
: LGTM!Appropriate imports for webhook functionality and error handling.
4-17
: LGTM!Props configuration is appropriate for webhook handling. The info alert about plan requirements is particularly helpful for users.
18-36
: LGTM!Proper webhook lifecycle management with activation creating webhooks and deactivation cleaning them up. Good defensive programming with the conditional check before deletion.
38-43
: LGTM!Clean helper methods for webhook ID persistence following established patterns.
44-49
: LGTM!Proper abstract method pattern using ConfigurationError to enforce implementation in subclasses, consistent with established patterns in the codebase.
51-67
: LGTM!Well-structured webhook event handler with proper HTTP response, validation, and event emission. The immediate HTTP 200 response prevents webhook timeouts while processing events asynchronously.
Resolves #17806
Summary by CodeRabbit
New Features
Chores