BillTracker/client/lib
null 3c7a55c3a1 feat(ts): type the Tracker API response with branded Dollars (A1)
New client/types.ts domain-types module. Types the full /tracker response —
TrackerResponse { summary, bank_tracking, cashflow, rows } — with every money
field branded `Dollars` (the server serializes cents→dollars, verified against
statusService.buildTrackerRow + trackerService.getTracker + buildBankTracking +
buildSafeToSpend). api.tracker() now returns Promise<TrackerResponse>.

TrackerRow + TrackerStatus move to @/types (canonical) and are re-exported from
@/lib/trackerUtils for compat; trackerUtils' row money fields upgrade from plain
`number` to branded `Dollars` (rowThreshold -> Dollars, paymentSummary re-brands
its computed amounts via asDollars so callers can fmt() them directly). This is
the first endpoint where the money brand flows end-to-end: fetch layer -> row
helpers, and (in phase B) into the components that format them.

Nested payloads no typed consumer reads yet (summary.trend, autopay_suggestion/
_stats, sparkline) are left `unknown`, to refine when consumed. asDollars is an
identity at runtime, so behavior is unchanged: typecheck 0, lint 0 errors, build
green, 48 client tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 22:21:45 -05:00
..
billDrafts.ts refactor(ts): convert pure lib utilities to TypeScript (TS7) 2026-07-03 21:59:16 -05:00
billingSchedule.ts refactor(ts): convert pure lib utilities to TypeScript (TS7) 2026-07-03 21:59:16 -05:00
cashflowUtils.test.js feat(cashflow): safe-to-spend projection with timeline, vitest setup, package upgrades 2026-06-12 01:32:28 -05:00
cashflowUtils.ts refactor(ts): convert pure lib utilities to TypeScript (TS7) 2026-07-03 21:59:16 -05:00
money.test.js fix(bill-modal): correctness + toast fallbacks + validator consolidation (BM1) 2026-07-03 18:32:25 -05:00
money.ts feat(ts): branded Cents/Dollars money types — first TS conversion (T2) 2026-07-03 21:36:24 -05:00
money.type-test.ts feat(ts): branded Cents/Dollars money types — first TS conversion (T2) 2026-07-03 21:36:24 -05:00
reorder.ts refactor(ts): convert pure lib utilities to TypeScript (TS7) 2026-07-03 21:59:16 -05:00
trackerTableColumns.ts refactor(ts): convert pure lib utilities to TypeScript (TS7) 2026-07-03 21:59:16 -05:00
trackerUtils.test.js feat(cashflow): safe-to-spend projection with timeline, vitest setup, package upgrades 2026-06-12 01:32:28 -05:00
trackerUtils.ts feat(ts): type the Tracker API response with branded Dollars (A1) 2026-07-03 22:21:45 -05:00
utils.test.js fix(qa): seed demo data amounts, bill amount validation, negative USD format, a11y aria-labels, Playwright E2E setup (batch 0.41.0 QA) 2026-07-02 20:36:09 -05:00
utils.ts refactor(ts): convert client/lib/utils to TypeScript (TS4) 2026-07-03 21:42:46 -05:00
version.ts refactor(ts): convert small hooks + version to TypeScript (TS8) 2026-07-03 22:01:30 -05:00