Fix pursue_* sibling tools to use documented Lexware endpoints#36
Merged
Conversation
There was a problem hiding this comment.
No blocking findings.
I verified the changed pursue_* tools against the public Lexware endpoint documentation and checked that the removed quotation pursue tool matches the absence of a documented quotation pursue endpoint. Local verification passed with npm test, npm run build, and npm run lint.
Mirror the pursue_invoice fix from PR #33 across the 4 sibling tools that also hit the broken `POST /<resource>/{id}/actions/pursue` path (HTTP 404 on the live API). Rewire each to its documented chained-create endpoint: - pursue_credit_note -> POST /credit-notes?precedingSalesVoucherId={id}[&finalize=true] - pursue_delivery_note -> POST /delivery-notes?precedingSalesVoucherId={id} - pursue_order_confirmation -> POST /order-confirmations?precedingSalesVoucherId={id} - pursue_dunning -> POST /dunnings?precedingSalesVoucherId={id} Remove pursue_quotation entirely: quotations are the start of the Lexware sales-voucher chain and have no documented preceding-voucher endpoint. The prior implementation returned HTTP 404. Total tool count: 65 -> 64. Flip `destructiveHint: true` on pursue_credit_note when finalize=true, because the resulting finalized credit note immediately reduces the preceding invoice's open amount — an irreversible financial side effect on a sibling resource (per security-review). Breaking change: input schema changes from `{ id, version }` to `{ precedingSalesVoucherId, body[, finalize] }`. Callers using the old shape will fail input validation loudly.
0f77d76 to
dbb4008
Compare
There was a problem hiding this comment.
No blocking findings.
I re-reviewed the synchronized head. The only change since my previous review is the lockfile returning to the version already on main, so it is not part of the PR diff. I rechecked the Lexware documented pursue endpoints and reran npm ci, npm test, npm run build, and npm run lint; all passed.
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.
Summary
Mirrors the
pursue_invoicefix from #33 across the 4 sibling tools that also hit the brokenPOST /<resource>/{id}/actions/pursuepath (HTTP 404 on the live Lexware API):pursue_credit_note→POST /credit-notes?precedingSalesVoucherId={id}[&finalize=true]pursue_delivery_note→POST /delivery-notes?precedingSalesVoucherId={id}pursue_order_confirmation→POST /order-confirmations?precedingSalesVoucherId={id}pursue_dunning→POST /dunnings?precedingSalesVoucherId={id}Also removes
pursue_quotation— quotations are the start of the Lexware sales-voucher chain and have no documented preceding-voucher endpoint. Prior implementation returned HTTP 404 unconditionally.Total tool count: 65 → 64, entry-sales 34 → 33.
Breaking change
Input schema for the 4 rewired tools changes from
{ id, version }to{ precedingSalesVoucherId, body }(plus optionalfinalizeboolean onpursue_credit_noteonly — the one endpoint Lexware documents[&finalize=true]on). Callers using the old shape will fail input validation loudly.Security-review fix
Flipped
destructiveHint: trueonpursue_credit_note—finalize=trueimmediately reduces the preceding invoice's open amount, an irreversible financial side effect on a sibling resource.Test plan
npm run buildclean (tsc)npm test— 163/163 tests pass (27 files)npm run lintclean (eslint flat)