UNPKG

@clipwhisperer/common

Version:

ClipWhisperer Common - Shared library providing core utilities, database schemas, authentication, bucket management, and common functionality across all ClipWhisperer microservices

121 lines (109 loc) 2.23 kB
/** * Job Type Definitions * Common job input/output types used across services */ import { Engine, OutputFormat, VoiceId } from "@aws-sdk/client-polly"; /** * Base job input interface */ export interface BaseJobInput { [key: string]: any; } /** * Base job output interface */ export interface BaseJobOutput { [key: string]: any; } /** * Narrator job input type */ export interface NarratorJobInput { engine: Engine; text: string; outputFormat: OutputFormat; voiceId: VoiceId; } /** * Narrator job output type */ export interface NarratorJobOutput { audioId: string; audioFile: string; usedVoice?: VoiceId; usedEngine?: Engine; } /** * Scraper job input type (YouTube) */ export interface ScraperJobInput { videoId: string; url: string; metadata: Record<string, string>; } /** * Scraper job output type */ export interface ScraperJobOutput { videoId: string; downloadPath: string; metadata: Record<string, string>; duration?: number; fileSize?: number; } /** * Reddit scraper job input type */ export interface RedditScraperJobInput { subreddit: string; postId: string; postTitle: string; } /** * Generic audio synthesis input */ export interface AudioSynthesisInput { text: string; voiceId?: string; engine?: string; outputFormat?: string; metadata?: Record<string, string>; } /** * Generic audio synthesis output */ export interface AudioSynthesisOutput { audioId: string; audioUrl: string; duration: number; fileSize?: number; metadata: Record<string, string>; } /** * Video rendering input */ export interface VideoRenderingInput { videoId: string; audioUrl: string; backgroundVideoPath?: string; textOverlay?: { text: string; timing: Array<{ word: string; startTime: number; endTime: number; }>; }; config?: Record<string, any>; metadata?: Record<string, string>; } /** * Video rendering output */ export interface VideoRenderingOutput { videoId: string; outputPath: string; duration: number; fileSize: number; metadata: Record<string, string>; }