import { youtube_v3 } from "googleapis"; import { CacheService } from "./cache.service.js"; import type { LeanChannelStatistics, LeanChannelTopVideo, LeanTrendingVideo, LeanComment } from "../types/youtube.js"; import { GetVideoCommentsParams } from "../types/tools.js"; export interface VideoOptions { videoId: string; parts?: string[]; } export interface SearchOptions { query: string; maxResults?: number; order?: "relevance" | "date" | "viewCount"; type?: "video" | "channel"; channelId?: string; videoDuration?: "any" | "short" | "medium" | "long"; publishedAfter?: string; recency?: "any" | "pastHour" | "pastDay" | "pastWeek" | "pastMonth" | "pastQuarter" | "pastYear"; regionCode?: string; videoCategoryId?: string; } export interface ChannelOptions { channelId: string; maxResults?: number; includeTags?: boolean; descriptionDetail?: "NONE" | "SNIPPET" | "LONG"; } export interface TrendingOptions { regionCode?: string; categoryId?: string; maxResults?: number; } export declare class YoutubeService { private youtube; private cacheService; private readonly MAX_RESULTS_PER_PAGE; private readonly ABSOLUTE_MAX_RESULTS; private apiCreditsUsed; private apiKey?; constructor(apiKey: string | undefined, cacheService: CacheService); getApiCreditsUsed(): number; resetApiCreditsUsed(): void; private trackCost; private calculatePublishedAfter; getVideo(options: VideoOptions): Promise; searchVideos(options: SearchOptions): Promise; batchFetchChannelStatistics(channelIds: string[]): Promise>; getChannelStatistics(channelId: string): Promise; fetchChannelRecentTopVideos(channelId: string, publishedAfter: string): Promise; getChannelTopVideos(options: ChannelOptions): Promise; getTrendingVideos(options: TrendingOptions): Promise; getVideoComments(options: GetVideoCommentsParams): Promise; getVideoCategories(regionCode?: string): Promise<{ id: string | null | undefined; title: string | null | undefined; }[]>; }