import { CreditDebitAttribution } from "./credit-debit-attribution.js"; import type { Database } from "./database.js"; /** Usage source and credit debit type of deployment-funded voice transcription. */ export declare const VOICE_TRANSCRIPTION_SOURCE_TYPE = "voice_transcription"; export declare const VOICE_TRANSCRIPTION_DEBIT_TYPE = "voice_transcription_debit"; /** * Idempotency keys for one settled voice-transcription unit. Both derive from * the workspace and the server-built unit id only, so an inline settlement, its * in-process retry, and a later reconciliation converge on the same rows. */ export declare function voiceTranscriptionSettlementKeys(input: { workspaceId: string; sourceId: string; }): { usageIdempotencyKey: string; debitIdempotencyKey: string; }; export type UnsettledVoiceTranscriptionCharge = { sourceId: string; amountMicros: number; attribution: CreditDebitAttribution; }; /** * Voice usage receipts in one workspace whose credit debit never committed * (the debit transaction failed after the receipt was durable). Bounded and * ordered oldest first; `minAgeMilliseconds` leaves an in-flight inline * settlement to finish with its full ledger metadata first. The scan walks the * workspace's `model.cost` index range, so the window is short (3 days) and * the statement is capped at 2 s; a timeout only defers reconciliation. */ export declare function listUnsettledVoiceTranscriptionCharges(db: Database, input: { accountId: string; workspaceId: string; limit?: number; minAgeMilliseconds?: number; }): Promise;