/** * Batch Processing Types */ import type { Model, Size } from './tools.js'; /** * Single job configuration in batch */ export interface BatchJobConfig { prompt: string; output_path?: string; model?: Model; size?: Size; seconds?: number; input_reference?: string; remix_video_id?: string; } /** * Retry policy configuration */ export interface RetryPolicy { max_retries?: number; retry_delay_ms?: number; retry_on_errors?: string[]; } /** * Batch configuration file structure */ export interface BatchConfig { jobs: BatchJobConfig[]; output_dir?: string; max_concurrent?: number; timeout?: number; poll_interval?: number; max_poll_attempts?: number; retry_policy?: RetryPolicy; default_model?: Model; default_size?: Size; default_seconds?: number; } /** * Batch execution options (from CLI or environment) */ export interface BatchExecutionOptions { outputDir?: string; format?: 'text' | 'json'; timeout?: number; maxConcurrent?: number; pollInterval?: number; maxPollAttempts?: number; estimateOnly?: boolean; allowAnyPath?: boolean; } /** * Individual job result */ export interface BatchJobResult { index: number; prompt: string; status: 'completed' | 'failed' | 'cancelled'; output_path?: string; video_url?: string; video_id?: string; error?: string; duration_ms?: number; video_duration?: number; is_remix?: boolean; is_image_to_video?: boolean; } /** * Batch execution result */ export interface BatchResult { total: number; succeeded: number; failed: number; cancelled: number; results: BatchJobResult[]; started_at: string; finished_at: string; total_duration_ms: number; estimated_cost?: number; } /** * Cost estimation result */ export interface CostEstimate { total_jobs: number; estimated_min: number; estimated_max: number; breakdown: CostBreakdownItem[]; } export interface CostBreakdownItem { type: 'text_to_video' | 'image_to_video' | 'remix'; count: number; estimated_cost: number; } /** * Default values for batch processing */ export declare const BATCH_DEFAULTS: { readonly max_concurrent: 2; readonly timeout: 1800000; readonly poll_interval: 15000; readonly max_poll_attempts: 120; readonly retry_max_retries: 2; readonly retry_delay_ms: 1000; readonly retry_on_errors: readonly ["rate_limit", "timeout", "429", "503", "500"]; }; /** * Batch limits */ export declare const BATCH_LIMITS: { readonly min_jobs: 1; readonly max_jobs: 100; readonly min_concurrent: 1; readonly max_concurrent: 5; readonly min_timeout: 60000; readonly max_timeout: 3600000; readonly min_poll_interval: 5000; readonly max_poll_interval: 60000; readonly min_retry: 0; readonly max_retry: 5; readonly min_retry_delay: 100; readonly max_retry_delay: 60000; }; //# sourceMappingURL=batch.d.ts.map