| 1 | export interface User {
|
|---|
| 2 | username: string;
|
|---|
| 3 | fullName: string;
|
|---|
| 4 | email?: string;
|
|---|
| 5 | profilePhoto?: string | null;
|
|---|
| 6 | isAdmin: boolean;
|
|---|
| 7 | isArtist: boolean;
|
|---|
| 8 | }
|
|---|
| 9 |
|
|---|
| 10 | export interface ArtistContribution {
|
|---|
| 11 | id: number;
|
|---|
| 12 | title: string;
|
|---|
| 13 | genre: string;
|
|---|
| 14 | role: string;
|
|---|
| 15 | entityType: string;
|
|---|
| 16 | isLikedByCurrentUser: boolean;
|
|---|
| 17 | cover?: string | null;
|
|---|
| 18 | link?: string | null;
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
| 21 | export interface MusicalEntity {
|
|---|
| 22 | id: number;
|
|---|
| 23 | title: string;
|
|---|
| 24 | genre: string;
|
|---|
| 25 | type: string;
|
|---|
| 26 | releasedBy: string;
|
|---|
| 27 | artistUsername?: string;
|
|---|
| 28 | cover?: string | null;
|
|---|
| 29 | isLikedByCurrentUser?: boolean;
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | export interface Song extends MusicalEntity {
|
|---|
| 33 | type: "SONG";
|
|---|
| 34 | album?: string;
|
|---|
| 35 | albumId?: number;
|
|---|
| 36 | link?: string;
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 | export interface Album extends MusicalEntity {
|
|---|
| 40 | type: "ALBUM";
|
|---|
| 41 | songs: Song[];
|
|---|
| 42 | }
|
|---|
| 43 |
|
|---|
| 44 | export interface Playlist {
|
|---|
| 45 | id: number;
|
|---|
| 46 | name: string;
|
|---|
| 47 | cover: string;
|
|---|
| 48 | creatorName: string;
|
|---|
| 49 | creatorUsername: string;
|
|---|
| 50 | songsInPlaylist: Song[];
|
|---|
| 51 | isSavedByCurrentUser: boolean;
|
|---|
| 52 | }
|
|---|
| 53 |
|
|---|
| 54 | export interface BaseNonAdminUser {
|
|---|
| 55 | username: string;
|
|---|
| 56 | fullName: string;
|
|---|
| 57 | userType: string;
|
|---|
| 58 | profilePhoto: string;
|
|---|
| 59 | followers: number;
|
|---|
| 60 | following: number;
|
|---|
| 61 | isFollowedByCurrentUser: boolean;
|
|---|
| 62 | }
|
|---|
| 63 |
|
|---|
| 64 | export type UserRegisterType = "ARTIST" | "LISTENER";
|
|---|
| 65 |
|
|---|
| 66 | export type SearchCategory = "songs" | "albums" | "artists" | "users";
|
|---|
| 67 |
|
|---|
| 68 | export interface SidebarProps {
|
|---|
| 69 | isOpen: boolean;
|
|---|
| 70 | onClose: () => void;
|
|---|
| 71 | }
|
|---|
| 72 |
|
|---|
| 73 | export interface CreatePlaylistModalProps {
|
|---|
| 74 | isOpen: boolean;
|
|---|
| 75 | onClose: () => void;
|
|---|
| 76 | onSuccess: () => void | Promise<void>;
|
|---|
| 77 | songId?: number | null;
|
|---|
| 78 | }
|
|---|
| 79 |
|
|---|
| 80 | export interface SongContribution {
|
|---|
| 81 | artistName: string;
|
|---|
| 82 | role: string;
|
|---|
| 83 | }
|
|---|
| 84 |
|
|---|
| 85 | export interface SongReview {
|
|---|
| 86 | id: {
|
|---|
| 87 | listenerId: number;
|
|---|
| 88 | musicalEntityId: number;
|
|---|
| 89 | };
|
|---|
| 90 | author: string;
|
|---|
| 91 | authorUsername: string;
|
|---|
| 92 | grade: number;
|
|---|
| 93 | comment: string;
|
|---|
| 94 | }
|
|---|
| 95 |
|
|---|
| 96 | export interface SongDetail extends MusicalEntity {
|
|---|
| 97 | type: "SONG";
|
|---|
| 98 | album?: string | null;
|
|---|
| 99 | link?: string | null;
|
|---|
| 100 | contributions: SongContribution[];
|
|---|
| 101 | reviews: SongReview[];
|
|---|
| 102 | }
|
|---|
| 103 |
|
|---|
| 104 | export interface BasicSong {
|
|---|
| 105 | id: number;
|
|---|
| 106 | title: string;
|
|---|
| 107 | artist: string;
|
|---|
| 108 | artistUsername?: string;
|
|---|
| 109 | cover?: string;
|
|---|
| 110 | link?: string;
|
|---|
| 111 | album?: string;
|
|---|
| 112 | albumId?: number;
|
|---|
| 113 | }
|
|---|
| 114 |
|
|---|
| 115 | export interface BasicPlaylist {
|
|---|
| 116 | id: number;
|
|---|
| 117 | name: string;
|
|---|
| 118 | songCount: number;
|
|---|
| 119 | }
|
|---|
| 120 |
|
|---|
| 121 | export interface CatalogItem {
|
|---|
| 122 | id: number;
|
|---|
| 123 | title: string;
|
|---|
| 124 | genre: string;
|
|---|
| 125 | cover: string | null;
|
|---|
| 126 | type: "SONG" | "ALBUM";
|
|---|
| 127 | releaseDate: string;
|
|---|
| 128 | }
|
|---|
| 129 |
|
|---|
| 130 | export interface Contributor {
|
|---|
| 131 | id: number;
|
|---|
| 132 | fullName: string;
|
|---|
| 133 | role: string;
|
|---|
| 134 | }
|
|---|
| 135 |
|
|---|
| 136 | export interface ArtistSearchResult {
|
|---|
| 137 | id: number;
|
|---|
| 138 | username: string;
|
|---|
| 139 | fullName: string;
|
|---|
| 140 | profilePhoto?: string;
|
|---|
| 141 | }
|
|---|
| 142 |
|
|---|
| 143 | export interface SongEntry {
|
|---|
| 144 | title: string;
|
|---|
| 145 | link: string;
|
|---|
| 146 | contributors: Contributor[];
|
|---|
| 147 | }
|
|---|