One phase’s one billing line: what was consumed, and what that costs.
Accessors
Section titled “Accessors”amount
Section titled “amount”Get Signature
Section titled “Get Signature”get amount(): Amount;Returns
Section titled “Returns”displayQuantity
Section titled “displayQuantity”Get Signature
Section titled “Get Signature”get displayQuantity(): string;The quantity at display precision, for a column a human scans.
Returns
Section titled “Returns”string
duration
Section titled “duration”Get Signature
Section titled “Get Signature”get duration(): Duration | null;Returns
Section titled “Returns”Duration | null
Get Signature
Section titled “Get Signature”get line(): string | null;The AWS billing line, or null for a phase with no published rate to attribute it
to.
Returns
Section titled “Returns”string | null
Get Signature
Section titled “Get Signature”get note(): string;Returns
Section titled “Returns”string
Get Signature
Section titled “Get Signature”get phase(): string;Returns
Section titled “Returns”string
quantity
Section titled “quantity”Get Signature
Section titled “Get Signature”get quantity(): string;The consumed quantity, exact, as a string.
Exact so a reader can check the arithmetic against the rate table, which is the only defence against a rate that drifts without anyone noticing.
Returns
Section titled “Returns”string
Get Signature
Section titled “Get Signature”get unit(): string;Returns
Section titled “Returns”string
Methods
Section titled “Methods”toJson()
Section titled “toJson()”toJson(): string;Core’s JSON shape for a line item, as a JSON string.
A string rather than an object because the unpriced case must omit the usd key
entirely, and a #[napi(object)] return type cannot express an absent key — an
Option field serializes as null, which is the one value that gets summed as zero
by anything permissive. A caller does JSON.parse, which is one visible step.
Returns
Section titled “Returns”string
toString()
Section titled “toString()”toString(): string;Returns
Section titled “Returns”string
Provenance
Section titled “Provenance”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.