import { youtube_v3 } from 'googleapis'; import { TranscriptSegment, TranscriptOptions, FormattedTranscript, ResearchSourceMetadata, ResearchTranscript } from './types/youtube-types.js'; interface BasicVideoInfo { title?: string; channel_id?: string; author?: string; channel?: { id: string; name: string; url: string; } | null; thumbnail?: Array<{ url: string; }>; } export declare function createResearchSourceMetadata(videoId: string, basicInfo: BasicVideoInfo): ResearchSourceMetadata; export declare class YouTubeService { private static readonly transcriptCache; private static innertubePromise?; youtube: youtube_v3.Youtube; private apiKey; constructor(apiKey?: string); get hasApiKey(): boolean; requireApiKey(): void; private getInnertube; private fetchTranscriptSource; searchVideos(query: string, maxResults?: number, options?: { channelId?: string; order?: string; type?: string; videoDuration?: string; publishedAfter?: string; publishedBefore?: string; videoCaption?: string; videoDefinition?: string; regionCode?: string; }): Promise; getVideoDetails(videoId: string): Promise; getChannelDetails(channelId: string): Promise; getComments(videoId: string, maxResults?: number, options?: { order?: 'time' | 'relevance'; pageToken?: string; includeReplies?: boolean; }): Promise; getTranscript(videoId: string, language?: string): Promise; getTranscript(videoId: string, options: TranscriptOptions): Promise; getResearchTranscript(videoId: string, options?: TranscriptOptions): Promise; getEnhancedTranscript(videoId: string | string[], options?: TranscriptOptions): Promise; private processTranscript; private filterByTimeRange; private filterBySearchText; private formatTranscript; /** * Extracts key moments from a transcript based on content analysis * @param videoId Video ID to analyze * @param maxMoments Maximum number of key moments to extract * @returns A formatted transcript with key moments and their timestamps */ getKeyMomentsTranscript(videoId: string, maxMoments?: number): Promise; /** * Divides a video transcript into segments and prepares it for segment-by-segment analysis * @param videoId Video ID to segment * @param segmentCount Number of segments to divide the transcript into * @returns A formatted transcript with segments marked by timestamps */ getSegmentedTranscript(videoId: string, segmentCount?: number): Promise; private formatTimestamp; private generateTranscriptCacheKey; private loadTranscriptSource; } export {};