Changeset 85512ff for frontend/src/utils/types.ts
- Timestamp:
- 02/14/26 18:21:18 (5 months ago)
- Branches:
- main
- Children:
- ce45c7a
- Parents:
- f5bc95e
- File:
-
- 1 edited
-
frontend/src/utils/types.ts (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/utils/types.ts
rf5bc95e r85512ff 1 1 export interface User { 2 username: string;3 fullName: string;4 email?: string;5 profilePhoto?: string | null;6 isAdmin: boolean;7 isArtist: boolean;2 username: string; 3 fullName: string; 4 email?: string; 5 profilePhoto?: string | null; 6 isAdmin: boolean; 7 isArtist: boolean; 8 8 } 9 9 10 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;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 19 } 20 20 21 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;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 30 } 31 31 32 32 export interface Song extends MusicalEntity { 33 type: "SONG";34 album?: string;35 albumId?: number;36 link?: string;33 type: "SONG"; 34 album?: string; 35 albumId?: number; 36 link?: string; 37 37 } 38 38 39 39 export interface Album extends MusicalEntity { 40 type: "ALBUM";41 songs: Song[];40 type: "ALBUM"; 41 songs: Song[]; 42 42 } 43 43 44 44 export interface Playlist { 45 id: number; 46 name: string; 47 cover: string; 48 creatorName: string; 49 songsInPlaylist: Song[]; 50 isSavedByCurrentUser: boolean; 45 id: number; 46 name: string; 47 cover: string; 48 creatorName: string; 49 creatorUsername: string; 50 songsInPlaylist: Song[]; 51 isSavedByCurrentUser: boolean; 51 52 } 52 53 53 54 export interface BaseNonAdminUser { 54 username: string;55 fullName: string;56 userType: string;57 profilePhoto: string;58 followers: number;59 following: number;60 isFollowedByCurrentUser: boolean;55 username: string; 56 fullName: string; 57 userType: string; 58 profilePhoto: string; 59 followers: number; 60 following: number; 61 isFollowedByCurrentUser: boolean; 61 62 } 62 63 … … 66 67 67 68 export interface SidebarProps { 68 isOpen: boolean; 69 onClose: () => void; 69 isOpen: boolean; 70 onClose: () => void; 71 } 72 73 export interface CreatePlaylistModalProps { 74 isOpen: boolean; 75 onClose: () => void; 76 onSubmit: (playlistName: string) => void; 70 77 } 71 78 72 79 export interface SongContribution { 73 artistName: string;74 role: string;80 artistName: string; 81 role: string; 75 82 } 76 83 77 84 export interface SongReview { 78 id: {79 listenerId: number;80 musicalEntityId: number;81 };82 author: string;83 authorUsername: string;84 grade: number;85 comment: string;85 id: { 86 listenerId: number; 87 musicalEntityId: number; 88 }; 89 author: string; 90 authorUsername: string; 91 grade: number; 92 comment: string; 86 93 } 87 94 88 95 export interface SongDetail extends MusicalEntity { 89 type: "SONG";90 album?: string | null;91 link?: string | null;92 contributions: SongContribution[];93 reviews: SongReview[];96 type: "SONG"; 97 album?: string | null; 98 link?: string | null; 99 contributions: SongContribution[]; 100 reviews: SongReview[]; 94 101 } 95 102 96 103 export interface BasicSong { 97 id: number;98 title: string;99 artist: string;100 artistUsername?: string;101 cover?: string;102 link?: string;103 album?: string;104 albumId?: number;104 id: number; 105 title: string; 106 artist: string; 107 artistUsername?: string; 108 cover?: string; 109 link?: string; 110 album?: string; 111 albumId?: number; 105 112 } 106 113 107 114 export interface BasicPlaylist { 108 id: number;109 name: string;110 songCount: number;115 id: number; 116 name: string; 117 songCount: number; 111 118 } 112 119 113 120 export interface CatalogItem { 114 id: number;115 title: string;116 genre: string;117 cover: string | null;118 type: "SONG" | "ALBUM";119 releaseDate: string;121 id: number; 122 title: string; 123 genre: string; 124 cover: string | null; 125 type: "SONG" | "ALBUM"; 126 releaseDate: string; 120 127 } 121 128 122 129 export interface Contributor { 123 id: number;124 fullName: string;125 role: string;130 id: number; 131 fullName: string; 132 role: string; 126 133 } 127 134 128 135 export interface ArtistSearchResult { 129 id: number;130 username: string;131 fullName: string;132 profilePhoto?: string;136 id: number; 137 username: string; 138 fullName: string; 139 profilePhoto?: string; 133 140 } 134 141 135 142 export interface SongEntry { 136 title: string;137 link: string;138 contributors: Contributor[];143 title: string; 144 link: string; 145 contributors: Contributor[]; 139 146 }
Note:
See TracChangeset
for help on using the changeset viewer.
