import type { SupabaseClient } from '@supabase/supabase-js'; import type { StepUsage } from './types.js'; export interface CostLogContext { runId: string; userId: string; projectId?: string; presetId?: string; lang?: string; theme?: string; captureType?: 'fullpage' | 'element'; elementName?: string; targetId?: string; captureId?: string | null; viewportWidth?: number | null; viewportHeight?: number | null; } export declare function insertCostLogs(supabase: SupabaseClient, ctx: CostLogContext, steps: StepUsage[]): Promise; export declare function updateCostLogCaptureContext(supabase: SupabaseClient, costLogIds: string[], params: { captureId?: string | null; targetId?: string | null; viewportWidth?: number | null; viewportHeight?: number | null; }): Promise; /** * Retry resolution for previously failed cost logs. * Designed to be called by a reconciliation cron job. */ export declare function reconcileUnresolvedCosts(supabase: SupabaseClient, apiKey: string): Promise<{ retried: number; resolved: number; }>; export declare function resolveAllCosts(supabase: SupabaseClient, entries: Array<{ costLogId: string; generationId: string | null; }>, apiKey: string, serviceClient?: SupabaseClient): Promise;