-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Xero Accounting - New or Updated Quote #19398
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
WalkthroughAdds a shared base polling source, refactors two polling sources to use it, introduces a new "New or Updated Quote" polling source, adds listQuotes to the app client, bumps package version, and increments versions across many action modules; mostly metadata changes with a few functional polling/source updates. Changes
Sequence Diagram(s)sequenceDiagram
participant Timer
participant Source as Polling Source
participant DB
participant XeroAPI as Xero API
participant Emit as Event Emitter
Timer->>Source: Trigger (interval)
Source->>DB: Read lastDateChecked
alt not set
Source->>DB: Initialize lastDateChecked = now()
end
Source->>XeroAPI: GET /Quotes?modifiedSince={lastDateChecked} (Accept: application/json)
XeroAPI-->>Source: Quotes JSON
loop For each quote (reverse order)
Source->>Source: Format UpdatedDateUTC (slice date)
Source->>DB: Update lastDateChecked
Source->>Emit: Emit event (id, summary, ts, payload)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
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 (7)
components/xero_accounting_api/actions/create-payment/create-payment.mjs (1)
133-137: Bug: Property name mismatch causesaccountCodeto be ignored.The prop is defined as
accountCode(line 29), but it's referenced here asthis.account_code. This will always passundefinedas the account code, breaking the flow when users provide an account code instead of an account ID.} else { data["Account"] = { - Code: this.account_code, + Code: this.accountCode, }; }components/xero_accounting_api/actions/xero-accounting-update-contact/xero-accounting-update-contact.mjs (1)
154-159: Fix typo property names in contact-related modules.The properties
puchasesDefaultAccountCode(line 154) andpuechasesTrackingCategories(line 166) contain typos in their names. These should bepurchasesDefaultAccountCodeandpurchasesTrackingCategoriesto match the API field names and improve code clarity. The same typos exist inxero-accounting-create-or-update-contact.mjs, affecting at least 4 occurrences total across both modules.components/xero_accounting_api/actions/list-credit-notes/list-credit-notes.mjs (1)
7-65: Version bump is fine; consider not swallowing all errors as “No credit notes found”.Current
catchconverts any failure (including auth / config / network errors) into an empty{}with a generic summary, which makes debugging harder. Consider only treating specific “no results” responses this way (e.g., by checking HTTP status or error code) and surfacing other errors.async run({ $ }) { try { const response = await this.xeroAccountingApi.listCreditNotes({ $, tenantId: this.tenantId, modifiedSince: this.modifiedAfter, params: { Where: this.where, order: this.order, page: this.page, }, }); $.export("$summary", `Successfully fetched ${response.CreditNotes.length} credit notes`); return response; - } catch (e) { - $.export("$summary", "No credit notes found"); - return {}; - } + } catch (err) { + // Adjust this condition to match your HTTP/client error shape + if (err?.response?.status === 404) { + $.export("$summary", "No credit notes found"); + return {}; + } + throw err; + } },components/xero_accounting_api/actions/list-invoices/list-invoices.mjs (1)
7-101: Version bump is fine; consider narrowing the generic “No invoices found” catch.As with credit notes, the
catchpath currently hides all failures as “No invoices found”, which can obscure auth or API errors. It’s safer to only treat known “no data” conditions this way and rethrow or surface other errors.async run({ $ }) { try { const response = await this.xeroAccountingApi.listInvoices({ $, tenantId: this.tenantId, modifiedSince: this.modifiedAfter, params: { IDs: this.ids, InvoiceNumbers: this.invoiceNumbers, ContactIDs: this.contactIds, Statuses: this.statuses, Where: this.where, createdByMyApp: this.createdByMyApp, order: this.order, page: this.page, }, }); $.export("$summary", `Successfully fetched ${response.Invoices.length} invoices`); return response; - } catch (e) { - $.export("$summary", "No invoices found"); - return {}; - } + } catch (err) { + // Adjust this condition to match your HTTP/client error shape + if (err?.response?.status === 404) { + $.export("$summary", "No invoices found"); + return {}; + } + throw err; + } },components/xero_accounting_api/actions/create-tracking-category/create-tracking-category.mjs (1)
9-67: Improve error handling and removeconsole.logfrom the catch block.The
catchblock has two issues: it logs the raw error object viaconsole.log(lines 63), and it unsafely accesseserr.response.data.Elements[0].ValidationErrors[0].Messagewithout guarding against missing properties. Either issue will break error handling. Use optional chaining and provide a fallback message instead.async run({ $ }) { try { const response = await this.xeroAccountingApi.createTrackingCategory({ $, tenantId: this.tenantId, data: { Name: this.name, }, }); if (this.options) { const parsedOptions = parseObject(this.options); for (const option of parsedOptions) { const optionResponse = await this.xeroAccountingApi.createTrackingOption({ $, tenantId: this.tenantId, trackingCategoryId: response.TrackingCategories[0].TrackingCategoryID, data: { Name: option, }, }); response.TrackingCategories[0].Options.push(optionResponse.Options[0]); } } $.export("$summary", `Successfully created tracking category with ID: ${response.TrackingCategories[0].TrackingCategoryID}`); return response; } catch (err) { - console.log(err); - throw new ConfigurationError(err.response.data.Elements[0].ValidationErrors[0].Message); + const message = + err?.response?.data?.Elements?.[0]?.ValidationErrors?.[0]?.Message + || err?.message + || "Failed to create tracking category"; + throw new ConfigurationError(message); } },components/xero_accounting_api/actions/update-tracking-category/update-tracking-category.mjs (1)
8-67: Harden error handling to avoid destructuring failures incatch.The
catch ({ response: { data } })destructuring will throw a TypeError if the error lacks aresponseordataproperty (e.g., network errors, SDK errors), masking the original failure. Catch the full error object and use optional chaining to safely access nested properties before constructing theConfigurationErrormessage.- } catch ({ response: { data } }) { - throw new ConfigurationError(data.Elements[0].ValidationErrors[0].Message); + } catch (err) { + const message = + err?.response?.data?.Elements?.[0]?.ValidationErrors?.[0]?.Message + || err?.message + || "Failed to update tracking category"; + throw new ConfigurationError(message); }components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs (1)
9-145: Fix undefinedPurchaseBillIDin summary export.The response from
createInvoicefollows Xero's standard structure withInvoices: [...], soresponse.PurchaseBillIDwill be undefined. Access the ID fromresponse.Invoices[0].InvoiceIDinstead:- $.export("$summary", `Successfully created purchase bill with ID: ${response.PurchaseBillID}`); - return response; + const invoiceId = response?.Invoices?.[0]?.InvoiceID; + $.export( + "$summary", + invoiceId + ? `Successfully created purchase bill with ID: ${invoiceId}` + : "Successfully created purchase bill", + ); + return response;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (45)
components/xero_accounting_api/actions/add-line-item-to-invoice/add-line-item-to-invoice.mjs(1 hunks)components/xero_accounting_api/actions/create-bank-transaction/create-bank-transaction.mjs(1 hunks)components/xero_accounting_api/actions/create-bill/create-bill.mjs(1 hunks)components/xero_accounting_api/actions/create-credit-note/create-credit-note.mjs(1 hunks)components/xero_accounting_api/actions/create-history-note/create-history-note.mjs(1 hunks)components/xero_accounting_api/actions/create-item/create-item.mjs(1 hunks)components/xero_accounting_api/actions/create-payment/create-payment.mjs(1 hunks)components/xero_accounting_api/actions/create-tracking-category/create-tracking-category.mjs(1 hunks)components/xero_accounting_api/actions/create-update-contact/create-update-contact.mjs(1 hunks)components/xero_accounting_api/actions/delete-tracking-category-option/delete-tracking-category-option.mjs(1 hunks)components/xero_accounting_api/actions/delete-tracking-category/delete-tracking-category.mjs(1 hunks)components/xero_accounting_api/actions/download-invoice/download-invoice.mjs(1 hunks)components/xero_accounting_api/actions/email-an-invoice/email-an-invoice.mjs(1 hunks)components/xero_accounting_api/actions/find-invoice/find-invoice.mjs(1 hunks)components/xero_accounting_api/actions/find-or-create-contact/find-or-create-contact.mjs(1 hunks)components/xero_accounting_api/actions/get-bank-statements-report/get-bank-statements-report.mjs(1 hunks)components/xero_accounting_api/actions/get-bank-summary/get-bank-summary.mjs(1 hunks)components/xero_accounting_api/actions/get-contact/get-contact.mjs(1 hunks)components/xero_accounting_api/actions/get-history-of-changes/get-history-of-changes.mjs(1 hunks)components/xero_accounting_api/actions/get-invoice-online-url/get-invoice-online-url.mjs(1 hunks)components/xero_accounting_api/actions/get-invoice/get-invoice.mjs(1 hunks)components/xero_accounting_api/actions/get-item/get-item.mjs(1 hunks)components/xero_accounting_api/actions/get-tenant-connections/get-tenant-connections.mjs(1 hunks)components/xero_accounting_api/actions/get-tracking-category/get-tracking-category.mjs(1 hunks)components/xero_accounting_api/actions/list-contacts/list-contacts.mjs(1 hunks)components/xero_accounting_api/actions/list-credit-notes/list-credit-notes.mjs(1 hunks)components/xero_accounting_api/actions/list-invoices/list-invoices.mjs(1 hunks)components/xero_accounting_api/actions/list-manual-journals/list-manual-journals.mjs(1 hunks)components/xero_accounting_api/actions/list-tracking-categories/list-tracking-categories.mjs(1 hunks)components/xero_accounting_api/actions/make-an-api-call/make-an-api-call.mjs(1 hunks)components/xero_accounting_api/actions/update-tracking-category-option/update-tracking-category-option.mjs(1 hunks)components/xero_accounting_api/actions/update-tracking-category/update-tracking-category.mjs(1 hunks)components/xero_accounting_api/actions/upload-file/upload-file.mjs(1 hunks)components/xero_accounting_api/actions/xero-accounting-create-employee/xero-accounting-create-employee.mjs(1 hunks)components/xero_accounting_api/actions/xero-accounting-create-or-update-contact/xero-accounting-create-or-update-contact.mjs(1 hunks)components/xero_accounting_api/actions/xero-accounting-update-contact/xero-accounting-update-contact.mjs(1 hunks)components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs(1 hunks)components/xero_accounting_api/actions/xero-create-sales-invoice/xero-create-sales-invoice.mjs(1 hunks)components/xero_accounting_api/package.json(1 hunks)components/xero_accounting_api/sources/common/base-polling.mjs(1 hunks)components/xero_accounting_api/sources/new-or-updated-quote/new-or-updated-quote.mjs(1 hunks)components/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs(3 hunks)components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs(3 hunks)components/xero_accounting_api/sources/webhook-event-received/webhook-event-received.mjs(1 hunks)components/xero_accounting_api/xero_accounting_api.app.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 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/xero_accounting_api/sources/webhook-event-received/webhook-event-received.mjs
🧬 Code graph analysis (2)
components/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs (2)
components/xero_accounting_api/sources/new-or-updated-quote/new-or-updated-quote.mjs (1)
lastDateChecked(13-13)components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs (1)
lastDateChecked(13-13)
components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs (2)
components/xero_accounting_api/sources/new-or-updated-quote/new-or-updated-quote.mjs (1)
lastDateChecked(13-13)components/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs (1)
lastDateChecked(13-13)
⏰ 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 (42)
components/xero_accounting_api/actions/find-invoice/find-invoice.mjs (1)
11-11: Verify the rationale for systematic version bumps across 35 actions.This is a patch version bump (0.0.4 → 0.0.5) applied to this action module. According to the PR summary, the primary objective is to add a new "New or Updated Quote" polling source. Verify that this version bump across 35 action modules is intentional and whether it should be coordinated with the core feature changes rather than applied as a blanket metadata update.
components/xero_accounting_api/actions/get-item/get-item.mjs (1)
7-7: Verify the necessity of the version bump.The version has been incremented from
0.2.3to0.2.4, but the code logic, error handling, and runtime behavior remain unchanged. According to the enriched summary, this is part of a broader pattern across 35 action modules, none of which have logic changes.Typically, version bumps accompany functional or feature changes. Please clarify whether this coordinated version bump across unrelated modules is intentional—for example, whether it's tied to an overall package version release or required by Pipedream's versioning policy.
components/xero_accounting_api/actions/get-tenant-connections/get-tenant-connections.mjs (1)
7-7: LGTM!The patch version bump is appropriate for a metadata-only change with no behavioral modifications.
components/xero_accounting_api/actions/list-contacts/list-contacts.mjs (1)
7-7: Verify the rationale for this version bump.The version has been incremented from 0.2.1 to 0.2.2, but the action's code logic remains unchanged. While the AI summary notes this is part of a batch version bump across 35 actions, this particular action is unrelated to the core PR objectives (quote trigger and polling refactors).
Please confirm whether this version bump is intentional as part of a coordinated release strategy or if it should be reverted.
components/xero_accounting_api/actions/create-payment/create-payment.mjs (1)
8-8: LGTM!Version bump is consistent with the PR pattern.
components/xero_accounting_api/actions/xero-accounting-update-contact/xero-accounting-update-contact.mjs (1)
9-9: Version bump approved as routine maintenance.The version bump to
0.1.4is consistent with the PR objective of updating versions across action modules. No functional changes are introduced.components/xero_accounting_api/actions/xero-accounting-create-or-update-contact/xero-accounting-create-or-update-contact.mjs (1)
8-8: Version bump is appropriate as part of coordinated release.The version increment aligns with the broader pattern of updates across the Xero actions in this PR, which includes additions to the shared app client. This change is approved.
components/xero_accounting_api/actions/get-history-of-changes/get-history-of-changes.mjs (1)
8-8: Version bump is appropriate and isolated.The metadata version update is consistent with other action version increments in this PR.
components/xero_accounting_api/actions/make-an-api-call/make-an-api-call.mjs (1)
9-9: Version bump is appropriate and isolated.The metadata version update is consistent with other action version increments in this PR.
components/xero_accounting_api/actions/get-bank-summary/get-bank-summary.mjs (1)
8-8: Version bump is appropriate and isolated.The metadata version update is consistent with other action version increments in this PR.
components/xero_accounting_api/actions/create-credit-note/create-credit-note.mjs (1)
9-9: Version bump is appropriate and isolated.The metadata version update is consistent with other action version increments in this PR.
components/xero_accounting_api/actions/email-an-invoice/email-an-invoice.mjs (1)
8-8: Version bump is appropriate and isolated.The metadata version update is consistent with other action version increments in this PR.
components/xero_accounting_api/actions/update-tracking-category-option/update-tracking-category-option.mjs (1)
8-8: Version bump is appropriate and isolated.The metadata version update is consistent with other action version increments in this PR. Note that this action uses the
0.0.xseries while most others use0.1.x.components/xero_accounting_api/actions/delete-tracking-category/delete-tracking-category.mjs (2)
8-8: Version bump is appropriate and isolated.The metadata version update is consistent with other action version increments in this PR.
43-45: Defensive error handling is well-structured.The optional chaining on line 44 appropriately guards against missing nested error properties, ensuring robust error handling.
components/xero_accounting_api/actions/create-history-note/create-history-note.mjs (2)
8-8: Version bump is appropriate and isolated.The metadata version update is consistent with other action version increments in this PR.
27-41: Quote support was already available in endpoint options.The action already includes "Quotes" among the supported document types (line 40), indicating the app had partial quote infrastructure in place prior to this PR.
components/xero_accounting_api/actions/create-bill/create-bill.mjs (1)
13-13: LGTM!Version bump aligns with the package version update to 0.5.0.
components/xero_accounting_api/actions/create-update-contact/create-update-contact.mjs (1)
9-9: LGTM!Version bump aligns with the package version update to 0.5.0.
components/xero_accounting_api/actions/xero-accounting-create-employee/xero-accounting-create-employee.mjs (1)
9-9: LGTM!Version bump aligns with the package version update to 0.5.0.
components/xero_accounting_api/actions/download-invoice/download-invoice.mjs (1)
9-9: LGTM!Version bump aligns with the package version update to 0.5.0.
components/xero_accounting_api/package.json (1)
3-3: LGTM!Minor version bump from 0.4.0 to 0.5.0 is appropriate for the addition of new functionality (new "New or Updated Quote" source, base-polling module, and
listQuotesmethod) without breaking changes.components/xero_accounting_api/actions/create-item/create-item.mjs (1)
8-8: Version bump only – action behavior unchanged.The version increment is consistent with the rest of the Xero Accounting actions; runtime logic remains the same.
components/xero_accounting_api/actions/upload-file/upload-file.mjs (1)
8-8: Metadata version increment looks consistent.No behavioral changes; upload and streaming logic remain as before.
components/xero_accounting_api/actions/get-bank-statements-report/get-bank-statements-report.mjs (1)
8-8: Bank statements report action version bump is safe.Validation, params, and summary message are unchanged; only the version string is updated.
components/xero_accounting_api/actions/create-bank-transaction/create-bank-transaction.mjs (1)
8-8: LGTM! Version bump aligns with package release.The version increment is appropriate as part of the broader package version update from 0.4.0 to 0.5.0.
components/xero_accounting_api/actions/list-tracking-categories/list-tracking-categories.mjs (1)
7-7: LGTM! Version bump aligns with package release.The version increment is appropriate as part of the broader package version update from 0.4.0 to 0.5.0.
components/xero_accounting_api/actions/get-contact/get-contact.mjs (1)
7-7: LGTM! Version bump aligns with package release.The version increment is appropriate as part of the broader package version update from 0.4.0 to 0.5.0.
components/xero_accounting_api/actions/delete-tracking-category-option/delete-tracking-category-option.mjs (1)
8-8: LGTM! Version bump aligns with package release.The version increment is appropriate as part of the broader package version update from 0.4.0 to 0.5.0.
components/xero_accounting_api/sources/webhook-event-received/webhook-event-received.mjs (1)
8-8: LGTM! Version bump aligns with package release.The version increment is appropriate as part of the broader package version update from 0.4.0 to 0.5.0.
components/xero_accounting_api/actions/find-or-create-contact/find-or-create-contact.mjs (1)
12-12: LGTM! Version bump aligns with package release.The version increment is appropriate as part of the broader package version update from 0.4.0 to 0.5.0.
components/xero_accounting_api/actions/add-line-item-to-invoice/add-line-item-to-invoice.mjs (1)
11-11: LGTM! Version bump aligns with package release.The version increment is appropriate as part of the broader package version update from 0.4.0 to 0.5.0.
components/xero_accounting_api/actions/list-manual-journals/list-manual-journals.mjs (1)
7-7: LGTM! Version bump aligns with package release.The version increment is appropriate as part of the broader package version update from 0.4.0 to 0.5.0.
components/xero_accounting_api/actions/get-invoice-online-url/get-invoice-online-url.mjs (1)
7-7: LGTM!Version bump is consistent with the broader package update in this PR.
components/xero_accounting_api/actions/get-tracking-category/get-tracking-category.mjs (1)
7-7: LGTM!Version bump is consistent with the broader package update in this PR.
components/xero_accounting_api/xero_accounting_api.app.mjs (1)
391-396: LGTM!The new
listQuotesmethod follows the established pattern of other list methods in this app client (e.g.,listContacts,listInvoices). Clean and consistent implementation.components/xero_accounting_api/actions/get-invoice/get-invoice.mjs (1)
7-7: LGTM!Version bump is consistent with the broader package update in this PR.
components/xero_accounting_api/actions/xero-create-sales-invoice/xero-create-sales-invoice.mjs (1)
9-9: LGTM!Version bump is consistent with the broader package update in this PR.
components/xero_accounting_api/sources/common/base-polling.mjs (1)
1-21: LGTM!Good DRY refactoring. Extracting common polling props into a shared base module reduces duplication across sources and ensures consistent configuration (timer interval, tenant selection).
components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs (1)
2-5: LGTM!Good refactoring to use the shared base polling module, reducing code duplication and ensuring consistent polling configuration across sources.
components/xero_accounting_api/sources/new-or-updated-quote/new-or-updated-quote.mjs (1)
12-38: Implementation follows the established pattern.The polling logic correctly:
- Initializes
lastDateCheckedon first run- Uses date-only slice for
modifiedSinceparameter- Processes quotes in reverse chronological order
- Emits with unique ID combining
QuoteIDand timestampcomponents/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs (1)
1-9: Refactor to shared base-polling module looks good.The changes correctly:
- Import and spread the common base-polling module
- Standardize the
modifiedSinceparameter handling- Add explicit
Accept: application/jsonheader- Bump version appropriately
components/xero_accounting_api/sources/new-or-updated-quote/new-or-updated-quote.mjs
Show resolved
Hide resolved
components/xero_accounting_api/sources/new-updated-contact/new-updated-contact.mjs
Show resolved
Hide resolved
components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs
Show resolved
Hide resolved
components/xero_accounting_api/sources/new-updated-invoice/new-updated-invoice.mjs
Show resolved
Hide resolved
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!
|
Hello everyone, I have tested this PR and there're some test cases failed or needed improvement. Please check test reports below for more information:
|
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs (1)
95-117: AlignSent to Contactprop type and validation message with actual inputsTwo small inconsistencies worth fixing:
sentToContactis described as a Boolean but declared astype: "string", which is confusing and may send a string to Xero where a boolean is expected.- The configuration error message mentions a
**Type**parameter that users don’t actually configure (it’s hard‑coded as"ACCPAY").Consider this adjustment:
sentToContact: { label: "Sent to Contact", - type: "string", - description: "Boolean to set whether the invoice in the Xero app should be marked as \"sent\". This can be set only on invoices that have been approved", + type: "boolean", + description: "Boolean to set whether the invoice in the Xero app should be marked as \"sent\". This can be set only on invoices that have been approved", optional: true, }, @@ async run({ $ }) { if ((!this.contactId && !this.contactName) || !this.tenantId || !this.lineItems) { - throw new ConfigurationError("Must provide one of **Contact ID** or **Contact Name**, **Tenant ID**, **Type**, and **Line Items** parameters."); + throw new ConfigurationError("Must provide one of **Contact ID** or **Contact Name**, **Tenant ID**, and **Line Items** parameters."); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs(2 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: Verify TypeScript components
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (1)
components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs (1)
9-9: Version bump is appropriate for this behavioral tweakThe version increment to
0.1.4correctly reflects a small, backward‑compatible behavior change (success summary only). No issues here.
components/xero_accounting_api/actions/xero-create-purchase-bill/xero-create-purchase-bill.mjs
Show resolved
Hide resolved
For Integration QA: |
Resolves #7152
Summary by CodeRabbit
New Features
Refactor
Chores
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.