diff --git a/src/renderer/api/types.ts b/src/renderer/api/types.ts index 5165c7fb1..ac75ad12d 100644 --- a/src/renderer/api/types.ts +++ b/src/renderer/api/types.ts @@ -124,7 +124,7 @@ export interface BasePaginatedResponse { error?: string | any; items: T; startIndex: number; - totalRecordCount: number; + totalRecordCount: number | null; } export type AuthenticationResponse = { @@ -370,7 +370,10 @@ export type AlbumListQuery = { navidrome?: Partial>; }; artistIds?: string[]; + genre?: string; limit?: number; + maxYear?: number; + minYear?: number; musicFolderId?: string; searchTerm?: string; sortBy: AlbumListSort; @@ -826,6 +829,11 @@ export type UpdatePlaylistBody = { comment?: string; genres?: Genre[]; name: string; + owner?: string; + ownerId?: string; + public?: boolean; + rules?: Record; + sync?: boolean; }; export type UpdatePlaylistArgs = { @@ -1139,3 +1147,48 @@ export type FontData = { postscriptName: string; style: string; }; + +export type ControllerEndpoint = Partial<{ + addToPlaylist: (args: AddToPlaylistArgs) => Promise; + authenticate: ( + url: string, + body: { password: string; username: string }, + ) => Promise; + clearPlaylist: () => void; + createFavorite: (args: FavoriteArgs) => Promise; + createPlaylist: (args: CreatePlaylistArgs) => Promise; + deleteFavorite: (args: FavoriteArgs) => Promise; + deletePlaylist: (args: DeletePlaylistArgs) => Promise; + getAlbumArtistDetail: ( + args: AlbumArtistDetailArgs, + ) => Promise; + getAlbumArtistList: (args: AlbumArtistListArgs) => Promise; + getAlbumDetail: (args: AlbumDetailArgs) => Promise; + getAlbumList: (args: AlbumListArgs) => Promise; + getAlbumSongList: (args: AlbumDetailArgs) => Promise; // TODO + getArtistDetail: () => void; + getArtistInfo: (args: any) => void; + getArtistList: (args: ArtistListArgs) => Promise; + getFavoritesList: () => void; + getFolderItemList: () => void; + getFolderList: () => void; + getFolderSongs: () => void; + getGenreList: (args: GenreListArgs) => Promise; + getLyrics: (args: LyricsArgs) => Promise; + getMusicFolderList: (args: MusicFolderListArgs) => Promise; + getPlaylistDetail: (args: PlaylistDetailArgs) => Promise; + getPlaylistList: (args: PlaylistListArgs) => Promise; + getPlaylistSongList: (args: PlaylistSongListArgs) => Promise; + getRandomSongList: (args: RandomSongListArgs) => Promise; + getSongDetail: (args: SongDetailArgs) => Promise; + getSongList: (args: SongListArgs) => Promise; + getTopSongs: (args: TopSongListArgs) => Promise; + getUserList: (args: UserListArgs) => Promise; + removeFromPlaylist: ( + args: RemoveFromPlaylistArgs, + ) => Promise; + scrobble: (args: ScrobbleArgs) => Promise; + search: (args: SearchArgs) => Promise; + setRating: (args: SetRatingArgs) => Promise; + updatePlaylist: (args: UpdatePlaylistArgs) => Promise; +}>;