export type RequestHeaders = { [key: string]: string }; export type RequestQuery = { [key: string]: string }; export type RequestBodyData = { [key: string]: string }; export type RequestConfig = { scheme: string; host: string; port: number; path?: string; headers?: RequestHeaders; query?: RequestQuery; bodyData?: RequestBodyData; }; export type Method = "get" | "post"; export type ObjectResponse = { [key: string]: any }; export type StringResponse = string; export type Response = ObjectResponse | StringResponse; type PlusStatus = { hasPlus: boolean; isTutorialCompleted: boolean; }; type Subscription = { expires: string; vendor: string; vendorHelpUrl: string; productId: string; orderId: number; finished: boolean; }; type SubscriptionStatus = { autoRenewable: Array; nonAutoRenewableRemainder: { [key: string]: any }; canStartTrial: boolean; mcdonalds: boolean; }; type Permissions = { until: string; values: Array; default: Array; }; type PassportPhone = { phone: string; }; type Account = { now: string; uid: number; login: string; region: number; fullName: string; secondName: string; firstName: string; displayName: string; birthday: string; serviceAvailable: boolean; hostedUser: boolean; "passport-phones": Array; registeredAt: string; }; export type GetAccountStatusResponse = { account: Account; permissions: Permissions; subscription: SubscriptionStatus; subeditor: boolean; subeditorLevel: number; plus: PlusStatus; defaultEmail: string; }; type GeneratedPlaylistType = | "rewind20" | "playlistOfTheDay" | "missedLikes" | "origin" | "family" | "recentTracks" | "neverHeard" | "podcasts" | "kinopoisk" | string; type GeneratedPlaylist = { type: GeneratedPlaylistType; ready: boolean; notify: boolean; data: Playlist; }; type FeedDayEventTitle = { type: string; text: string; }; type FeedDayEventAugmentedArtist = { artist: Artist; subscribed: true; }; type FeedDayEventArtist = { augmentedArtist: FeedDayEventAugmentedArtist; playsDurationMillis: number; }; type FeedDayEvent = { id: string; type: string; typeForFrom: string; title: Array; artists?: Array; likedTrack?: Track; tracks?: Array; radioIsAvailable?: boolean; genre?: GenreId; albums?: Array; similarToGenre?: GenreId; similarGenre?: GenreId; similarToArtist?: Artist; similarArtists?: Array; artist?: Artist; socialTracks?: Array; }; type FeedDayTrackToPlayWithAds = { type: string; track: Track; }; type FeedDay = { day: string; events: Array; tracksToPlay: Array; tracksToPlayWithAds: Array; }; export type GetFeedResponse = { nextRevision: string; canGetMoreEvents: boolean; pumpkin: boolean; isWizardPassed: boolean; generatedPlaylists: Array; headlines: Array; today: string; days: Array; }; type Visibility = "public" | "private" | string; type Sex = "male" | "female" | string; type PlaylistOwner = { uid: number; login: string; name: string; verified: boolean; sex: Sex; }; type PlaylistTrack = { id: number; timestamp: string; recent: boolean; track: Track; }; type PlaylistCoverType = "mosaic" | string; type PlaylistCover = { error?: string; type?: PlaylistCoverType; itemsUri?: Array; custom?: boolean; }; export type Playlist = { owner: PlaylistOwner; playlistUuid: string; available: boolean; uid: number; kind: number; title: string; revision: number; snapshot: number; trackCount: number; visibility: Visibility; collective: boolean; created: string; modified: string; isBanner: boolean; isPremiere: boolean; durationMs: number; cover: PlaylistCover; ogImage: string; tags: Array; prerolls: Array; lastOwnerPlaylists: Array; tracks?: Array; }; type GenreId = | "all" | "pop" | "allrock" | "indie" | "metal" | "alternative" | "electronics" | "dance" | "rap" | "rnb" | "jazz" | "blues" | "reggae" | "ska" | "punk" | "folk" | "estrada" | "shanson" | "country" | "soundtrack" | "relax" | "children" | "naturesounds" | "bard" | "forchildren" | "fairytales" | "poemsforchildren" | "podcasts" | "classicalmusic" | "audiobooks" | "other" | string; type RadioIcon = { backgroundColor: string; imageUrl: string; }; type Genre = { id: GenreId; weight: number; composerTop: boolean; title: string; fullTitle: string; titles: { [key: string]: { title: string } }; images: { [key: string]: string }; showInMenu: boolean; showInRegions?: Array; urlPart?: string; color?: string; radioIcon?: RadioIcon; subGenres?: Array; }; export type GetGenresResponse = Array; export type SearchType = "artist" | "album" | "track" | "all"; export type ApiConfig = { oauth: { CLIENT_ID: string; CLIENT_SECRET: string; }; fake_device: { DEVICE_ID: string; UUID: string; PACKAGE_NAME: string; }; }; export type ApiInitConfig = { access_token?: string; uid?: number; username?: string; password?: string; }; type ArtistCoverType = "from-artist-photos" | string; type ArtistCover = { type: ArtistCoverType; prefix: string; uri: string; }; type ArtistCounts = { tracks: number; directAlbums: number; alsoAlbums: number; alsoTracks: number; }; type Region = "RUSSIA_PREMIUM" | "RUSSIA" | string; type AlbumType = "compilation" | string; type TrackPosition = { volume: number; index: number }; type Label = { id: number; name: string } | string; export type AlbumVolume = Array; export type Album = { id: number; storageDir: string; coverUri: string; trackCount: number; available: boolean; availableForPremiumUsers: boolean; title: string; genre: GenreId; type: AlbumType; trackPosition: TrackPosition; artists: Array; availableRegions: Array; labels: Array