Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / StatementColumnMap

Interface: StatementColumnMap

Defined in: packages/core/src/engine/reconcile-statement.ts:879

Column mapping for statementFromRows: each field names the KEY in the caller's raw rows that carries the value. Provider export formats change without notice and differ per tenant surface (CSV headers, JSON field names, locale-shaped numbers), so this module deliberately ships NO per-provider schema knowledge: the caller states the mapping in one place and the normalizer applies one fail-closed validation to whatever the export actually contained, naming the row and the column of anything that cannot be evidence.

Properties

PropertyTypeDescriptionDefined in
cachedInputTokens?string-packages/core/src/engine/reconcile-statement.ts:890
cacheWriteTokens?string-packages/core/src/engine/reconcile-statement.ts:891
component?stringKey of the billing component name; required for kind: 'categories'.packages/core/src/engine/reconcile-statement.ts:887
componentsUsd?Partial<Record<BillingComponent, string>>Keys of a per-component dollar split, one column per component.packages/core/src/engine/reconcile-statement.ts:894
inputTokens?stringKeys of the provider-reported token counts.packages/core/src/engine/reconcile-statement.ts:889
model?stringKey of the provider-side model name.packages/core/src/engine/reconcile-statement.ts:883
outputTokens?string-packages/core/src/engine/reconcile-statement.ts:892
responseId?stringKey of the provider response id; required for kind: 'requests'.packages/core/src/engine/reconcile-statement.ts:881
usd?stringKey of the row's billed dollars; for kind: 'categories' required.packages/core/src/engine/reconcile-statement.ts:885