Expand description
Command Code usage response types and schema validation.
Two documents make up a Command Code snapshot. /alpha/billing/credits
carries the credit ledger and the rolling spend windows; the subscription
names the plan. Both are parsed defensively — Command Code publishes no
schema for either, so an additive field must never break a running widget,
and a missing section degrades that section alone.
Structs§
- Credits
- The monthly credit ledger. Command Code reports three separate pools and expects a client to sum them, which is what the official CLI does.
- Snapshot
- Everything the widget shows for Command Code.
- Spend
Window - One rolling spend window: dollars drawn against a dollar cap.
Functions§
- apply_
subscription - Fold
/alpha/billing/subscriptionsinto a snapshot: plan label and the allowance its tier includes. - parse_
credits - Parse
/alpha/billing/credits. - plan_
credits - plan_
label