desktop/src/lib/api.ts:1
* Backend IPC types and wrappers. Large token integers use decimal strings; convert to
* number only for chart scaling, retaining strings for exact values.
desktop/src/lib/api.ts:8
/** Tiered archive retention in days; yearly null means lifetime retention. */
desktop/src/lib/api.ts:20
/** null follows locale: Monday for zh, Sunday for en-US/CA. */
desktop/src/lib/api.ts:28
/** Theme: system, light or dark. */
desktop/src/lib/api.ts:32
/** Display alias for this source host; does not change host_id. */
desktop/src/lib/api.ts:34
/** F2 cost estimation, off by default and when absent from historical settings JSON. */
desktop/src/lib/api.ts:105
/** Provider pricing preferences; absent preferences allow only an unambiguous official API reference for the same model. */
desktop/src/lib/api.ts:110
/** Default cache-write TTL tier in minutes; null leaves that component unpriced. */
desktop/src/lib/api.ts:117
/** F2 models.dev catalog refresh, off by default and when absent from historical settings JSON. */
desktop/src/lib/api.ts:119
/** Online cache TTL: 1-365 days, default 3; fresh caches avoid network requests. */
desktop/src/lib/api.ts:123
/** Amount rows by currency in smallest units; keep currencies separate. */
desktop/src/lib/api.ts:140
/** Events priced through official-provider fallback when the recorded provider lacks an exact entry. */
desktop/src/lib/api.ts:191
/** Raw online-response cache metadata for displaying freshness. */
desktop/src/lib/api.ts:199
/** Refresh result: fetched, cache_fresh, fetch_failed_used_cache or fetch_failed_no_cache. */
desktop/src/lib/api.ts:217
/** Intended/actual system-task state; Windows checks due sources each minute. */
desktop/src/lib/api.ts:301
/** null means presence could not be checked; do not hide a real read failure. */
desktop/src/lib/api.ts:315
/** Registered files no longer on disk after Agent cleanup/compaction; only retained application history remains. */
desktop/src/lib/api.ts:317
/** Source collection schedule; null inherits the global interval (M6). */
desktop/src/lib/api.ts:334
/** Collection progress: 0-100 percent and estimated remaining seconds; null ETA means unavailable. */
desktop/src/lib/api.ts:337
/** Completed adapter names in completion order. */
desktop/src/lib/api.ts:361
/** v6 user list and currently selected statistics user. */
desktop/src/lib/api.ts:373
/** Row counts by retention layer and database bytes, including WAL. */
desktop/src/lib/api.ts:384
/** Aggregate exchange-package import counts (M1a). */
desktop/src/lib/api.ts:402
/** Manual tiered-cleanup result. */
desktop/src/lib/api.ts:411
/** Background clear-all start; started=false means a task is already running. */
desktop/src/lib/api.ts:416
/** Background clear-all-progress stages.
* waiting: wait for collection; backup: copy database; clearing: clear transaction;
* cleared: tables cleared with counts/backup path; rescan: full collection started;
* done: rescan finished; failed: stopped with error details; cancelled: cancellation acknowledged. */
desktop/src/lib/api.ts:429
/** Clear-all preview: event count and registered missing source files that cannot be recollected. */
desktop/src/lib/api.ts:436
/** event_details page row; token integers use decimal strings. */
desktop/src/lib/api.ts:459
/** Export user/host options and current values; is_current selects defaults. */
desktop/src/lib/api.ts:467
/** chart_series grouping dimension, queried directly from aggregate tables. */
desktop/src/lib/api.ts:470
/** Grouped time-series row; tokens are decimal strings or null for unknown. */
desktop/src/lib/api.ts:488
/** diagnostic_logs row; time is a millisecond timestamp. */
desktop/src/lib/api.ts:501
/** Generic quota snapshot; retain native units separately from recorded usage. */
desktop/src/lib/api.ts:576
/** Diagnostic logs: null code_filter selects all; a code string selects that category. */
desktop/src/lib/api.ts:580
/** Current API reference, model unit rates and curve; frozen history remains in the response. */
desktop/src/lib/api.ts:589
/** Background models.dev refresh/import; force=true bypasses cache TTL. */
desktop/src/lib/api.ts:611
/** Subscribe to background clear-all stages and return the unsubscribe callback. */
desktop/src/lib/api.ts:616
/** Generic quota overview; agent=null selects all, with native units separate from recorded usage. */
desktop/src/lib/api.ts:619
/** Daily quota trend for (agent, quota_id). */
desktop/src/lib/api.ts:624
/** Parse a backend JSON-string error containing code/message. */
desktop/src/lib/api.ts:631
/* Return the original string when JSON parsing fails. */