namespace VideoStudy.Shared; /// /// Request model for video analysis /// public class AnalysisRequest { public string VideoUrl { get; set; } = string.Empty; public string Language { get; set; } = "en"; // Input language (subtitles) public string? OutputLanguage { get; set; } // Output language (tutorial). null = same as Language public string Mode { get; set; } = "fast"; // fast or advanced public string? TranscriptText { get; set; } // Optional: if client already transcribed it public double DurationSeconds { get; set; } } /// /// Response model containing analysis results /// public class AnalysisResponse { public string VideoTitle { get; set; } = string.Empty; public string DocumentTitle { get; set; } = string.Empty; // New public string Category { get; set; } = "OTHER"; // New public string Transcript { get; set; } = string.Empty; public List KeyMoments { get; set; } = []; public string Analysis { get; set; } = string.Empty; public List TutorialSections { get; set; } = []; public List DebugSteps { get; set; } = []; public string? RawLlmResponse { get; set; } public byte[]? PdfData { get; set; } public string Status { get; set; } = "success"; public string? ErrorMessage { get; set; } } public class TutorialSection { public string Title { get; set; } = string.Empty; public string Content { get; set; } = string.Empty; public string? ImageTimestamp { get; set; } // "HH:MM:SS" public int? ImageTimeSeconds { get; set; } public byte[]? ImageData { get; set; } // For internal use during PDF generation } /// /// Represents a key moment in the video /// public class KeyMoment { public string Timestamp { get; set; } = string.Empty; public string Description { get; set; } = string.Empty; public int StartSeconds { get; set; } public string Explanation { get; set; } = string.Empty; } /// /// Progress update for long-running operations /// public class ProgressUpdate { public double PercentComplete { get; set; } public string Message { get; set; } = string.Empty; public string Stage { get; set; } = string.Empty; } public class VideoInfo { public string Title { get; set; } = string.Empty; public TimeSpan Duration { get; set; } public string Url { get; set; } = string.Empty; public string ThumbnailUrl { get; set; } = string.Empty; public string Author { get; set; } = string.Empty; } public class Transcription { public string FullText { get; set; } = string.Empty; public List Segments { get; set; } = []; public string Language { get; set; } = "en"; } public class TranscriptionSegment { public string Timestamp { get; set; } = string.Empty; public string Text { get; set; } = string.Empty; public double StartSeconds { get; set; } public double EndSeconds { get; set; } } public class ProcessingResult { public Transcription Transcription { get; set; } = new(); public List KeyMoments { get; set; } = []; public List ScreenshotPaths { get; set; } = []; } public class DownloadProgress { public double PercentComplete { get; set; } public string Status { get; set; } = string.Empty; } public interface IPdfSaver { Task SavePdfAsync(byte[] pdfData, string suggestedFileName); }