export interface Song { id: string; name: string; artist: string; album: string; duration: number; // seconds coverUrl: string; platform: "netease" | "qq"; } export interface SongWithUrl extends Song { url: string; } export interface Playlist { id: string; name: string; coverUrl: string; songCount: number; platform: "netease" | "qq"; } export interface Album { id: string; name: string; artist: string; coverUrl: string; songCount: number; platform: "netease" | "qq"; } export interface LyricLine { time: number; // seconds text: string; translation?: string; } export interface SearchResult { songs: Song[]; playlists: Playlist[]; albums: Album[]; } export interface QrCodeResult { qrUrl: string; qrImg?: string; // base64 data URL of QR image key: string; } export interface AuthStatus { loggedIn: boolean; nickname?: string; avatarUrl?: string; } export interface MusicProvider { readonly platform: "netease" | "qq"; search(query: string, limit?: number): Promise; getSongUrl(songId: string): Promise; getSongDetail(songId: string): Promise; getPlaylistSongs(playlistId: string): Promise; getRecommendPlaylists(): Promise; getAlbumSongs(albumId: string): Promise; getLyrics(songId: string): Promise; getQrCode(): Promise; checkQrCodeStatus( key: string ): Promise<"waiting" | "scanned" | "confirmed" | "expired">; loginWithSms?(phone: string, code: string): Promise; sendSmsCode?(phone: string): Promise; setCookie(cookie: string): void; getCookie(): string; getAuthStatus(): Promise; getPersonalFm?(): Promise; }