Skip to main content

Module types

Module types 

Source
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.
SpendWindow
One rolling spend window: dollars drawn against a dollar cap.

Functions§

apply_subscription
Fold /alpha/billing/subscriptions into a snapshot: plan label and the allowance its tier includes.
parse_credits
Parse /alpha/billing/credits.
plan_credits
plan_label