1declare namespace ICommon { 2 /** 支持搜索的媒体类型 */ 3 export type SupportMediaType = 'music' | 'album' | 'artist'; 4 5 /** 媒体定义 */ 6 export type SupportMediaItemBase = { 7 music: IMusic.IMusicItemBase; 8 album: IAlbum.IAlbumItemBase; 9 artist: IArtist.IArtistItemBase; 10 }; 11 12 export type IUnique = { 13 id: string; 14 [k: string | symbol]: any; 15 }; 16 17 export type IMediaBase = { 18 id: string; 19 platform: string; 20 $?: any; 21 [k: symbol]: any; 22 [k: string]: any; 23 }; 24 25 /** 一些额外信息 */ 26 export type IMediaMeta = { 27 lrc?: string; 28 associatedLrc?: IMediaBase; 29 headers?: Record<string, any>; 30 url?: string; 31 id?: string; 32 platform?: string; 33 qualities?: IMusic.IQuality; 34 $?: { 35 local?: { 36 localLrc?: string; 37 [k: string]: any; 38 }; 39 [k: string]: any; 40 }; 41 [k: string]: any; 42 [k: symbol]: any; 43 }; 44 45 export type WithMusicList<T> = T & { 46 musicList?: IMusic.IMusicItem[]; 47 }; 48 49 export type PaginationResponse<T> = { 50 isEnd?: boolean; 51 data?: T[]; 52 }; 53} 54