February 13, 20260.1.18Calmony Sanctions Monitor
v0.1.18 — feat: add auto-topup settings UI and API endpoint
Release v0.1.18: Auto-Topup Settings
13 February 2026
What changed
- Auto-Topup UI on the billing page — new section with a toggle to enable/disable, a threshold input ("top up when balance falls below X credits"), a package selector dropdown, a summary card showing what will happen, and a save button with dirty-state tracking.
- New API endpoints —
GET /api/credits/auto-topupreturns current settings and available packages;PUT /api/credits/auto-topupsaves settings with Zod validation and audit logging (IP + user agent). - Bug fix —
getCreditBalance()now returns theautoTopupPackageIdfield that was present in the DB schema but missing from the response. - Stripe dependency added —
stripe^17.0.0 added to prepare for payment integration. - 14 new tests covering authentication, validation, business rules, and success paths for both endpoints.
Why it matters
You can now configure auto-topup directly from the billing page so your monitoring never lapses because you ran out of credits. Set a threshold, pick a package, and credits will be purchased automatically when your balance drops.
Technical notes
- When enabling auto-topup, both
threshold(1–10,000) andpackageIdare required; when disabling, they're optional. - Audit log failures are caught silently so they never break the main save flow.
- Form state initialises from existing account data on page load.
Release Notes
Successfully merged PR #33 and published release v0.1.18.
PR #33: "feat: add auto-topup settings UI and API endpoint"
- Squash merged to main (SHA: 47b4e54)
Release: v0.1.18 — Auto-Topup Settings UI & API
- Tag: v0.1.18
- URL: https://github.com/LetMC/CalmonySanctionsMonitor/releases/tag/v0.1.18
Key changes in this release:
- New Auto-Topup settings section on the billing page with toggle, threshold input, package selector, and save functionality
- New
GETandPUT /api/credits/auto-topupAPI endpoints with Clerk auth, Zod validation, and audit logging - Fixed
getCreditBalance()to return the missingautoTopupPackageIdfield - 14 new test cases covering auth, validation, business rules, and success paths
- Added
stripe(^17.0.0) dependency