import type { ActualCostSource, CostAttribution, CostLimit } from '@fabric-harness/sdk'; import type { DatabricksStatementClient, StatementPoll } from './sql-exec.js'; export interface DatabricksActualCostSourceOptions { /** Cache TTL in milliseconds. Default 60_000. */ cacheTtlMs?: number; /** Tag key prefix for filtering usage rows. Default `'fabric'`. */ tagPrefix?: string; /** Polling configuration for statement execution. */ poll?: StatementPoll; } export interface DatabricksCostReconciliationOptions { scopeKey: string; estimatedUsd: number; usageOccurredAt: string | number | Date; attribution?: CostAttribution; actualSource: ActualCostSource; /** Billing export delay before a comparison is meaningful. Default 24 hours. */ accountingDelayMs?: number; maxDriftUsd?: number; maxDriftPercent?: number; unavailable?: 'fail-open' | 'fail-closed'; now?: () => number; onDrift?: (result: DatabricksCostReconciliationResult) => void | Promise; } export interface DatabricksCostReconciliationResult { scopeKey: string; status: 'pending-accounting' | 'within-threshold' | 'drift' | 'unavailable'; enforcement: 'allow' | 'deny'; estimatedUsd: number; actualUsd?: number; driftUsd?: number; driftPercent?: number; actualsFetchedAt?: string; nextCheckAt?: string; error?: string; } /** Compare immediate estimates with delayed System Tables actuals and apply an explicit outage policy. */ export declare function reconcileDatabricksCost(options: DatabricksCostReconciliationOptions): Promise; /** * Create a Databricks-backed `ActualCostSource` that queries `system.billing.usage` * joined to `system.billing.list_prices` for real spend data. * * Results are cached per-scope-key for `cacheTtlMs` (default 60s) to avoid * hammering the SQL warehouse. */ export declare function databricksActualCostSource(client: DatabricksStatementClient, warehouseId: string, options?: DatabricksActualCostSourceOptions): ActualCostSource; export declare function databricksTenantCostLimit(client: DatabricksStatementClient, warehouseId: string, tenantId: string, options: { perHourUsd?: number; perDayUsd?: number; perMonthUsd?: number; cacheTtlMs?: number; onExceed?: 'throw' | 'approve'; }): CostLimit; //# sourceMappingURL=cost-budget-actuals.d.ts.map