export interface Channel { id: number; youtubeId: string; bilibiliSpaceId?: string; name: string; description?: string; photo?: string; publishedAt: Date; twitter?: string; views?: number; subscribers?: number; videos?: number; } export interface VideoBase { id: number; status: 'past' | 'live' | 'upcoming' | 'missing' | 'new'; youtubeId?: string; bilibiliId?: string; title: string; thumbnail?: string; publishedAt?: Date; scheduledDate?: Date; startDate?: Date; endDate?: Date; viewers?: number; channel: Channel; } export interface EndedLivestream extends VideoBase { status: 'past'; scheduledDate?: Date; startDate: Date; endDate: Date; viewers: undefined; } export interface LiveLivestream extends VideoBase { status: 'live'; scheduledDate?: Date; startDate: Date; endDate: undefined; } export interface UpcomingLivestream extends VideoBase { status: 'upcoming'; scheduledDate: Date; startDate: undefined; endDate: undefined; viewers: undefined; } export interface LivestreamData { live: Array; upcoming: Array; ended: Array; cached: boolean; } export interface ChannelData { channels: Array; total: number; count: number; } export interface Comment { id: string; message: string; } export interface Video extends VideoBase { isUploaded?: boolean; isCaptioned?: boolean; durationSecs?: number; comments?: Array; } export interface VideoData { videos: Array