Files
aidio-description/dist/server/db/jobStore.d.ts

44 lines
1.7 KiB
TypeScript
Raw Permalink Normal View History

export interface OutputOptions {
audio: boolean;
subtitles: boolean;
muxed: boolean;
2026-05-15 04:10:06 +02:00
muxMode: 'separate' | 'mixed';
}
export interface Job {
id: string;
video_path: string;
video_filename: string;
status: 'pending' | 'queued' | 'processing' | 'paused' | 'completed' | 'failed' | 'cancelled';
config: string;
progress: number;
current_index: number;
total_units: number;
segments: string;
last_context: string;
current_time_position: number;
error: string | null;
created_at: string;
updated_at: string;
completed_at: string | null;
output_audio: string | null;
output_subtitles_srt: string | null;
output_subtitles_vtt: string | null;
output_muxed: string | null;
output_options: string;
}
export declare function getAllJobs(): Job[];
export declare function getJob(id: string): Job | undefined;
export declare function createJob(videoPath: string, filename: string, config: object, outputOptions: OutputOptions): Job;
export declare function updateJobStatus(id: string, status: Job['status'], error?: string): void;
export declare function saveCheckpoint(id: string, segments: string, currentIndex: number, totalUnits: number, currentTimePosition: number, lastContext: string, progress: number): void;
export declare function saveJobOutputs(id: string, outputs: {
audio?: string;
subtitlesSrt?: string;
subtitlesVtt?: string;
muxed?: string;
}): void;
export declare function deleteJob(id: string): void;
export declare function getConfigValue(key: string): string | undefined;
export declare function setConfigValue(key: string, value: string): void;
export declare function getAllConfig(): Record<string, string>;