import type { AlbumRaw, Album } from "./album"; import type { Artist, ArtistRaw } from "./artist"; import type { MusicVideo, MusicVideoRaw } from "./musicvideo"; import type { SongRaw, Song } from "./song"; export type SearchType = "activities" | "albums" | "apple-curators" | "artists" | "curators" | "music-videos" | "playlists" | "record-labels" | "songs" | "stations"; interface SearchRawTypeMap { songs: SongRaw; albums: AlbumRaw; artists: ArtistRaw; "music-videos": MusicVideoRaw; } interface SearchParsedTypeMap { songs: Song; albums: Album; artists: Artist; "music-videos": MusicVideo; } type KnownSearchType = keyof SearchRawTypeMap & SearchType; type MappedRawResult = { [K in SearchType]: K extends KnownSearchType ? { href: string; next?: string; data: SearchRawTypeMap[K][]; } : { href: string; next?: string; data: any[]; }; }; type MappedParsedResult = { [K in SearchType]: K extends KnownSearchType ? SearchParsedTypeMap[K][] : any[]; }; export type SearchParams = { term: string; types: SearchType[]; l?: string; limit?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25; offset?: number; with?: string[]; }; export interface SearchResultRaw { results: Partial; meta: { results: { order: SearchType[]; rawOrder: SearchType[]; }; }; } export interface SearchResult { nextOffset: number | null; results: Partial; } export {}; //# sourceMappingURL=search.d.ts.map