Interface: UsageMetric
Defined in: types/usage.ts:45
A single named usage metric with percentage and optional reset information.
Example
// Claude's session usage metric
{
name: 'Current Session',
percentage: 35,
percentageType: 'used',
resetTime: '2026-02-18T15:00:00Z',
resetText: 'Resets in 2h 15m',
category: 'session',
}
Properties
category?
optionalcategory:string
Defined in: types/usage.ts:69
Optional category for grouping metrics in the UI (e.g., "session", "billing")
name
name:
string
Defined in: types/usage.ts:47
Display name for this metric (e.g., "Current Session", "Weekly")
percentage
percentage:
number
Defined in: types/usage.ts:53
Usage as a percentage (0-100).
Interpretation depends on percentageType.
percentageType
percentageType:
"used"|"remaining"
Defined in: types/usage.ts:60
Whether the percentage represents amount used or amount remaining.
'used': 75% means 75% consumed, 25% left'remaining': 75% means 75% left, 25% consumed
resetText?
optionalresetText:string
Defined in: types/usage.ts:66
Human-readable reset text (e.g., "Resets in 2h 15m")
resetTime?
optionalresetTime:string
Defined in: types/usage.ts:63
ISO date string for when this metric resets