import type { VideoExecutionPayload } from './types.js'; export declare const FLOW_ACCOUNT_BASE = "https://api.useapi.net/v1/google-flow"; export declare const FLOW_ACCOUNT_FIXTURE_ENV = "VCLAW_FLOW_ACCOUNT_FIXTURE"; export declare const FLOW_CREDIT_CURRENCY = "credits"; export interface FlowAccountVideoModel { key: string; displayName?: string; resolution?: string; videoLengthSeconds?: number; creditCost?: number; } export interface FlowAccount { credits: { credits: number; userPaygateTier?: string; sku?: string; serviceTier?: string; topUpCredits?: number; subscriptionCredits?: number; }; models: { videoModels: FlowAccountVideoModel[]; }; } export type FlowAccountSource = 'live' | 'fixture'; export declare class FlowAccountError extends Error { } /** Pure: validate the parts of the account payload this module reads. */ export declare function parseFlowAccount(raw: unknown): FlowAccount; export declare function fetchFlowAccount(options: { token: string; email: string; fetchImpl?: typeof fetch; base?: string; }): Promise; export declare function readFlowAccountFixture(path: string): Promise; /** * Resolve the account table from the environment: an explicit fixture file * (`VCLAW_FLOW_ACCOUNT_FIXTURE`, a test seam — the caller decides whether a * fixture may stand in for the live table) or the live endpoint via * `USEAPI_API_TOKEN` + `USEAPI_ACCOUNT_EMAIL`. Returns `null` when neither is * configured so the caller can decide whether that is fatal. */ export declare function loadFlowAccount(env: NodeJS.ProcessEnv, options?: { fetchImpl?: typeof fetch; }): Promise<{ account: FlowAccount; source: FlowAccountSource; } | null>; /** The durations Flow renders; the transport drops any other value and Flow renders 8 s. */ export declare const FLOW_DURATIONS: ReadonlySet; export type FlowVeoModel = NonNullable; export type FlowOperation = 't2v' | 'i2v' | 'i2v-fl' | 'r2v' | 'edit'; export interface FlowPriceQuery { veoModel: FlowVeoModel; operation: FlowOperation; aspect: 'landscape' | 'portrait'; durationSeconds: number; /** omni-flash only; Veo rows are 720p and carry no resolution marker. */ resolution?: '360p' | '720p'; } export interface FlowPriceMatch { creditCost: number; /** The first matched row — the record of which table row priced this. */ modelKey: string; matchedKeys: string[]; } /** * Pure: price one render against the account's table. Refuses (throws) when * the account lists no row for the combination, or when the matching rows * disagree on price — a quote is never a guess. */ export declare function matchFlowPrice(account: FlowAccount, query: FlowPriceQuery): FlowPriceMatch; export declare function flowAspectForRatio(aspectRatio: string): 'landscape' | 'portrait'; /** * Pure: derive the price query for one execution task, mirroring how the * veo-useapi transport builds its request (`native-veo.ts` buildPrompt): a V2V * reference is an edit; saved Flow characters or omni ingredients are R2V; an * image reference on Veo is the I2V start frame; otherwise T2V. */ export declare function flowPriceQueryForTask(payload: VideoExecutionPayload, task: VideoExecutionPayload['tasks'][number]): FlowPriceQuery; export interface FlowPayloadQuote { unitCost: number; perTask: Array<{ sceneIndex: number; query: FlowPriceQuery; match: FlowPriceMatch; clips: number; cost: number; }>; } /** Pure: price a whole payload — every task, every clip it asks for. */ export declare function quoteFlowPayload(account: FlowAccount, payload: VideoExecutionPayload): FlowPayloadQuote; //# sourceMappingURL=flow-account.d.ts.map