feat: add linked-transaction (billable expense) tools + surface Line Item ID#191
Open
rathga wants to merge 6 commits into
Open
feat: add linked-transaction (billable expense) tools + surface Line Item ID#191rathga wants to merge 6 commits into
rathga wants to merge 6 commits into
Conversation
…ense prep) create-linked-transaction needs a bill line's sourceLineItemId, and the only way to read line-item IDs via MCP is list-invoices. Until now that tool only printed line items when filtering by invoiceNumbers — but email-imported bills frequently have no InvoiceNumber, so their line-item IDs were unreadable and the billable-expense flow couldn't be driven for them. Add an invoiceIds filter to list-invoices (threaded into the existing getInvoices iDs slot) and return line items for invoiceIds fetches as well, so any bill — numbered or not — can have its Line Item IDs read by ID. This completes the "surface Line Item ID" half of this PR for the no-InvoiceNumber case. Note: PR XeroAPI#110 also introduces an invoiceIds filter (among broader list-invoices filters); this adds the minimal slice needed for the linked-transaction flow and supersedes that part of XeroAPI#110 for this purpose. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
|
Pushed Heads-up on overlap: #110 also introduces an |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds four thin-wrapper tools mapping 1:1 to the SDK: list-linked-transactions, create-linked-transaction, update-linked-transaction, and delete-linked-transaction. These cover the billable-expense flow — marking a cost on a source bill (ACCPAY) line as billable to a customer (stage 1) and allocating it onto that customer's sales invoice line (stage 2). Also surfaces each line's
Line Item IDin formatLineItem, which the flow depends on to obtain source/target line IDs (with a Vitest test, matching the repo's helper-test convention). Mirrors the existing list-credit-notes / create-invoice / update-invoice / delete-payroll-timesheet patterns.🤖 Generated with Claude Code