BillTracker/client
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
..
components refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
contexts theme correctness 2026-05-28 01:30:40 -05:00
hooks refactor(ts): convert React Query hooks to TypeScript (TS10) 2026-07-03 22:13:05 -05:00
lib feat(ts): type the Tracker API response with branded Dollars (A1) 2026-07-03 22:21:45 -05:00
pages refactor(ts): convert the API client to TypeScript (TS9) 2026-07-03 22:09:04 -05:00
public/img refactor: component splits, PWA support, CommandPalette 2026-05-28 20:53:22 -05:00
App.jsx feat(query): global background-refetch error toast (P1) 2026-07-03 20:56:31 -05:00
api.ts feat(ts): type the Tracker API response with branded Dollars (A1) 2026-07-03 22:21:45 -05:00
index.css feat(settings): safe-to-spend toggle, move notifications from Profile to Settings, fix dark-mode readability 2026-06-12 01:52:48 -05:00
main.jsx v0.24.3: Session fixes, activity log corrections, UI polish 2026-05-11 13:39:48 -05:00
types.ts feat(ts): type the Tracker API response with branded Dollars (A1) 2026-07-03 22:21:45 -05:00