import 'jest-extended'; import { Playlist } from './libs/shared/interfaces/src/lib/playlist.interface'; declare module 'video.js' { export interface VideoJsPlayer { hlsQualitySelector(options?: Record): void; } } declare global { interface Window { electron: { getAppVersion: () => Promise; platform: string; fetchPlaylistByUrl: ( url: string, title?: string ) => Promise; updatePlaylistFromFilePath: ( filePath: string, title: string ) => Promise; openPlaylistFromFile: () => Promise; saveFileDialog: ( defaultPath: string, filters?: { name: string; extensions: string[] }[] ) => Promise; writeFile: ( filePath: string, content: string ) => Promise<{ success: boolean }>; setUserAgent: (userAgent: string, referer?: string) => void; openInMpv: ( url: string, title: string, userAgent: string, referer?: string, origin?: string ) => void; openInVlc: ( url: string, title: string, userAgent: string, referer?: string, origin?: string ) => void; autoUpdatePlaylists: (playlists: Playlist[]) => Promise; fetchEpg: ( urls: string[] ) => Promise<{ success: boolean; message?: string }>; getChannelPrograms: (channelId: string) => Promise; getEpgChannels: () => Promise; getEpgChannelsByRange: ( skip: number, limit: number ) => Promise; forceFetchEpg: ( url: string ) => Promise<{ success: boolean; message?: string }>; updateSettings: (settings: any) => Promise; setMpvPlayerPath: (mpvPlayerPath: string) => Promise; setVlcPlayerPath: (vlcPlayerPath: string) => Promise; stalkerRequest: (payload: { url: string; macAddress: string; params: Record; }) => Promise; xtreamRequest: (payload: { url: string; params: Record; }) => Promise<{ payload: any; action: string }>; // Database operations dbCreatePlaylist: (playlist: any) => Promise<{ success: boolean }>; dbGetPlaylist: (playlistId: string) => Promise; dbUpdatePlaylist: ( playlistId: string, updates: any ) => Promise<{ success: boolean }>; dbDeletePlaylist: ( playlistId: string ) => Promise<{ success: boolean }>; dbDeleteXtreamContent: ( playlistId: string ) => Promise<{ success: boolean; favoritedXtreamIds: number[]; recentlyViewedXtreamIds: { xtreamId: number; viewedAt: string }[]; }>; dbRestoreXtreamUserData: ( playlistId: string, favoritedXtreamIds: number[], recentlyViewedXtreamIds: { xtreamId: number; viewedAt: string }[] ) => Promise<{ success: boolean }>; dbHasCategories: ( playlistId: string, type: string ) => Promise; dbGetCategories: ( playlistId: string, type: string ) => Promise; dbSaveCategories: ( playlistId: string, categories: any[], type: string ) => Promise<{ success: boolean }>; dbHasContent: ( playlistId: string, type: string ) => Promise; dbGetContent: (playlistId: string, type: string) => Promise; dbSaveContent: ( playlistId: string, streams: any[], type: string ) => Promise<{ success: boolean; count: number }>; dbSearchContent: ( playlistId: string, searchTerm: string, types: string[] ) => Promise; dbGlobalSearch: ( searchTerm: string, types: string[] ) => Promise; dbGetRecentlyViewed: () => Promise; dbClearRecentlyViewed: () => Promise<{ success: boolean }>; // Favorites dbAddFavorite: ( contentId: number, playlistId: string ) => Promise<{ success: boolean }>; dbRemoveFavorite: ( contentId: number, playlistId: string ) => Promise<{ success: boolean }>; dbIsFavorite: ( contentId: number, playlistId: string ) => Promise; dbGetFavorites: (playlistId: string) => Promise; // Recently viewed (playlist-specific) dbGetRecentItems: (playlistId: string) => Promise; dbAddRecentItem: ( contentId: number, playlistId: string ) => Promise<{ success: boolean }>; dbClearPlaylistRecentItems: ( playlistId: string ) => Promise<{ success: boolean }>; dbRemoveRecentItem: ( contentId: number, playlistId: string ) => Promise<{ success: boolean }>; dbGetContentByXtreamId: ( xtreamId: number, playlistId: string ) => Promise; // Remote control onChannelChange?: ( callback: (data: { direction: 'up' | 'down' }) => void ) => void; getLocalIpAddresses: () => Promise; }; process: NodeJS.Process; require: NodeRequire; } } // SystemJS module definition declare const nodeModule: NodeModule; interface NodeModule { id: string; }