Files
otunes/lib/data.ts
T

42 lines
638 B
TypeScript

export type Artist = {
id: string
name: string
photo: string | null
}
export type Album = {
id: string
title: string
artist: Artist
cover: string | null
}
export type Song = {
id: string
title: string
artist: Artist
album: Pick<Album, "id" | "title" | "cover">
durationSeconds: number
explicit?: boolean
}
export type Playlist = {
id: string
title: string
owner: string
cover: string | null
}
export type AlbumTrack = {
id: string
title: string
track: number
durationSeconds: number
}
export type AlbumDetail = Album & {
year: number | null
genre: string | null
tracks: AlbumTrack[]
}