/**
 * Generated by orval v8.5.3 🍺
 * Do not edit manually.
 * Api
 * API specification
 * OpenAPI spec version: 0.1.0
 */
import type { CostLedgerRefundState } from "./costLedgerRefundState";

/**
 * Honest post-work accounting stored after the job completes
 */
export interface CostLedger {
  actualInputTokens?: number;
  actualOutputTokens?: number;
  /** Sum of actualInputTokens + actualOutputTokens */
  totalTokens?: number;
  /** Raw Anthropic token cost (no infra, no margin) */
  actualCostUsd?: number;
  /** What we honestly charged in USD (actual token cost + DO infra + margin) */
  actualChargeUsd?: number;
  /** Original estimate used to create the work invoice */
  estimatedCostUsd?: number;
  /** Honest sats charge (actual cost converted at the locked BTC price) */
  actualAmountSats?: number;
  /** Amount the user originally paid in sats */
  workAmountSats?: number;
  /** Sats owed back to the user (workAmountSats - actualAmountSats, >= 0) */
  refundAmountSats?: number;
  /** Lifecycle of the refund for this job */
  refundState?: CostLedgerRefundState;
  marginPct?: number;
  /** BTC/USD price locked at invoice creation time */
  btcPriceUsd?: number;
}
