Skip to content

feat(#550): add InvoiceVersionTracker for invoice version history - #599

Merged
Kingsman-99 merged 2 commits into
Stellar-split:mainfrom
Ebuka042-pixel:feature/550-invoice-version-tracker
Jul 30, 2026
Merged

feat(#550): add InvoiceVersionTracker for invoice version history#599
Kingsman-99 merged 2 commits into
Stellar-split:mainfrom
Ebuka042-pixel:feature/550-invoice-version-tracker

Conversation

@Ebuka042-pixel

Copy link
Copy Markdown
Contributor
  • Add src/invoiceVersionTracker.ts with InvoiceVersionTracker class
    • record(invoiceId, newSnapshot, changedBy) creates immutable version
    • getHistory(invoiceId) returns all versions in ascending order
    • diff(invoiceId, fromVersion, toVersion) returns structured InvoiceDiff
    • Uses src/diff.ts diffInvoices() + src/splitPreview.ts for change summary
    • InMemoryVersionStore default; swappable VersionStore interface for persistence
  • Add updateInvoice(invoiceId, updates, changedBy) to StellarSplitClient
    • Calls tracker.record() before overwriting stored invoice state
  • Add versionTracker to StellarSplitClientConfig
  • Export from src/index.ts
  • Add unit tests in test/invoiceVersionTracker.test.ts

…n history

- Add src/invoiceVersionTracker.ts with InvoiceVersionTracker class
  - record(invoiceId, newSnapshot, changedBy) creates immutable version
  - getHistory(invoiceId) returns all versions in ascending order
  - diff(invoiceId, fromVersion, toVersion) returns structured InvoiceDiff
  - Uses src/diff.ts diffInvoices() + src/splitPreview.ts for change summary
  - InMemoryVersionStore default; swappable VersionStore interface for persistence
- Add updateInvoice(invoiceId, updates, changedBy) to StellarSplitClient
  - Calls tracker.record() before overwriting stored invoice state
- Add versionTracker to StellarSplitClientConfig
- Export from src/index.ts
- Add unit tests in test/invoiceVersionTracker.test.ts
  - Asserts 3 sequential updates produce 3 history entries
  - Asserts diff(1, 3) captures all intermediate changes
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@Ebuka042-pixel Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Kingsman-99
Kingsman-99 merged commit 96982a5 into Stellar-split:main Jul 30, 2026
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.

Invoice Version History Diff Tracker

2 participants