Skip to content

CostReport

Per-phase attribution for one sandbox, measured or projected.

get complete(): boolean;

False whenever any phase has no published rate.

boolean


get fullyMeasured(): boolean;

True only if every duration was timed. An estimate is never this.

boolean


get items(): LineItem[];

LineItem[]


get label(): string;

string


get priced(): LineItem[];

The line items with a published rate.

LineItem[]


get rates(): RateTable;

RateTable


get size(): SizeClass;

SizeClass


get staleness(): string | null;

The staleness warning the table carried when this was computed.

string | null


get total(): Total;

The total, which is a lower bound whenever anything is unpriced.

Total


get unpriced(): LineItem[];

The line items with no published rate.

LineItem[]

byPhase(phase: string): LineItem[];

The line items belonging to one phase.

The string is judged by the core’s own [CostPhase::from_str], which is where the closed set lives. This file used to carry its own seven-element table for it, as did bindings/microvms-py/src/cost.rs — two parallel lists over one enum, which would have gone stale the first time a phase was added and would have disagreed with each other in whichever direction was edited first.

Parameter Type
phase string

LineItem[]


render(): string;

Plain text, leading with what the dollars are rather than with the dollars.

string


toJson(): string;

Core’s JSON shape for a report, as a JSON string: the one microvm cost --json and Python’s to_dict emit (#255).

A string for the same reason [LineItem::to_json] is: the unpriced line item omits its usd key, which no typed return shape can express.

string

This page is generated from bindings/microvms-js/index.d.ts by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run dts. mise run dts:check fails when the committed file no longer matches the source.