Skip to content

Fix pursue_* sibling tools to use documented Lexware endpoints#36

Merged
lazyants merged 1 commit into
mainfrom
fix/pursue-sibling-endpoints
May 20, 2026
Merged

Fix pursue_* sibling tools to use documented Lexware endpoints#36
lazyants merged 1 commit into
mainfrom
fix/pursue-sibling-endpoints

Conversation

@lazyants
Copy link
Copy Markdown
Owner

Summary

Mirrors the pursue_invoice fix from #33 across the 4 sibling tools that also hit the broken POST /<resource>/{id}/actions/pursue path (HTTP 404 on the live Lexware API):

  • pursue_credit_notePOST /credit-notes?precedingSalesVoucherId={id}[&finalize=true]
  • pursue_delivery_notePOST /delivery-notes?precedingSalesVoucherId={id}
  • pursue_order_confirmationPOST /order-confirmations?precedingSalesVoucherId={id}
  • pursue_dunningPOST /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 optional finalize boolean on pursue_credit_note only — the one endpoint Lexware documents [&finalize=true] on). Callers using the old shape will fail input validation loudly.

Security-review fix

Flipped destructiveHint: true on pursue_credit_notefinalize=true immediately reduces the preceding invoice's open amount, an irreversible financial side effect on a sibling resource.

Test plan

  • npm run build clean (tsc)
  • npm test — 163/163 tests pass (27 files)
  • npm run lint clean (eslint flat)
  • code-simplifier: no changes needed
  • codex:rescue: clean after docs/CHANGELOG fixes
  • /security-review: clean after destructiveHint flip + README header fix
  • Smoke counts updated: full 65→64, entry-sales 34→33
  • README + CHANGELOG updated (Removed + BREAKING Changed entries)

Copy link
Copy Markdown

@lazy-ants-reviewer lazy-ants-reviewer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@lazyants lazyants force-pushed the fix/pursue-sibling-endpoints branch from 0f77d76 to dbb4008 Compare May 20, 2026 16:37
Copy link
Copy Markdown

@lazy-ants-reviewer lazy-ants-reviewer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lazyants lazyants merged commit fce8934 into main May 20, 2026
5 checks passed
@lazyants lazyants deleted the fix/pursue-sibling-endpoints branch May 20, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant