-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
14645 components zoho books #14866
base: master
Are you sure you want to change the base?
14645 components zoho books #14866
Conversation
- Component refactoring Sources - New Customer - New Expense - New Sales Invoice Actions - Create Customer - Create Estimate
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
Warning Rate limit exceeded@luancazarine has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 7 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe changes involve significant updates to the Zoho Books integration modules, particularly in the handling of webhook functionality. The existing base module has been modified to include properties for HTTP and webhook naming, while methods for managing hook IDs have been introduced. New modules for "New Customer," "New Expense," and "New Sales Order" events have been added, each implementing specific methods for generating metadata and handling events. Additionally, the main application module now includes methods for creating and deleting webhooks. Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. 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: 4
🧹 Outside diff range and nitpick comments (4)
components/zoho_books/sources/new-expense-instant/test-event.mjs (1)
66-66
: Provide valid date string for 'last_modified_time'The
last_modified_time
field currently contains an empty string. To ensure accurate testing and avoid parsing errors, consider providing a valid date string.components/zoho_books/sources/new-sales-order-instant/test-event.mjs (1)
1-110
: LGTM! Test event structure is well-defined.The test event provides comprehensive coverage of sales order fields and uses appropriate test data values. The structure aligns with Zoho Books API requirements.
Consider adding comments to document the purpose of this test event file and how it should be used in testing scenarios.
components/zoho_books/sources/new-customer-instant/test-event.mjs (1)
1-114
: LGTM! Comprehensive test event structure with appropriate test data.The test event includes all necessary fields for customer contacts and uses appropriate test values.
Consider:
- Adding a comment header explaining the purpose of this test event
- Using consistent example domains (e.g.,
example.com
) for all email addresses instead ofbowmanfurniture.com
components/zoho_books/zoho_books.app.mjs (1)
606-612
: Consider adding parameter validation for webhook creation.The
createWebhook
method should validate required webhook parameters before making the request.Consider adding parameter validation:
createWebhook(opts = {}) { + const { url, events } = opts.data || {}; + if (!url || !events?.length) { + throw new Error('Webhook URL and at least one event are required'); + } return this._makeRequest({ method: "POST", path: "/settings/webhooks", ...opts, }); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (8)
components/zoho_books/sources/common/base.mjs
(1 hunks)components/zoho_books/sources/new-customer-instant/new-customer-instant.mjs
(1 hunks)components/zoho_books/sources/new-customer-instant/test-event.mjs
(1 hunks)components/zoho_books/sources/new-expense-instant/new-expense-instant.mjs
(1 hunks)components/zoho_books/sources/new-expense-instant/test-event.mjs
(1 hunks)components/zoho_books/sources/new-sales-order-instant/new-sales-order-instant.mjs
(1 hunks)components/zoho_books/sources/new-sales-order-instant/test-event.mjs
(1 hunks)components/zoho_books/zoho_books.app.mjs
(1 hunks)
🔇 Additional comments (6)
components/zoho_books/sources/common/base.mjs (2)
6-11
: Props are defined correctly
The added props http
, db
, and webhookName
are correctly defined and consistent with best practices.
15-19
: Private methods for hook ID management are well implemented
The _getHookId
and _setHookId
methods correctly manage the webhook ID in the database.
components/zoho_books/sources/new-expense-instant/new-expense-instant.mjs (1)
1-26
: The "New Expense (Instant)" module is correctly implemented
The module correctly extends the common base, and methods getEntity
and generateMeta
are properly defined.
components/zoho_books/sources/new-customer-instant/new-customer-instant.mjs (1)
1-26
: The "New Customer (Instant)" module is correctly implemented
The module properly extends the common base, and methods getEntity
and generateMeta
are correctly defined.
components/zoho_books/sources/new-sales-order-instant/new-sales-order-instant.mjs (1)
1-26
: The "New Sales Order (Instant)" module is implemented correctly
Except for the issue noted above, the module correctly extends the common base, and methods are properly defined.
components/zoho_books/zoho_books.app.mjs (1)
613-618
: LGTM! Webhook deletion implementation is clean and follows existing patterns.
The deleteWebhook
method is well-implemented and consistent with other deletion methods in the file.
components/zoho_books/sources/new-sales-order-instant/new-sales-order-instant.mjs
Show resolved
Hide resolved
Hello everyone, I have tested this PR and there're some test cases failed or needed improvement. Please check the test report below for more information |
Hi @vunguyenhung, ZohoBooks has a way to test your webhook in their UI. You can try it by going to Settings -> Automation -> Workflow Actions -> Webhooks, then you select the webhook you want to test and at the bottom of the page click on run. |
Hi @luancazarine, I think we could not release the sources if they don't work from end user perspective. The next action I would say is to maybe ask @malexanderlim or @sergioeliot2039 to connect Zoho book team about this issue, because they already in contact with the Zoho book team (I assume so). Then while waiting for updates, we can move this to Blocked. |
@luancazarine @vunguyenhung I've added you to the thread with Zoho Books. |
Resolves #14645
Summary by CodeRabbit
Release Notes
New Features
createWebhook
anddeleteWebhook
for enhanced integration capabilities.Improvements
Data Structures