Fix expected controller responses

This commit is contained in:
jeffvli
2023-12-03 22:17:01 -08:00
parent f8d109fce4
commit 33b522a2f3
+28 -32
View File
@@ -1149,46 +1149,42 @@ export type FontData = {
};
export type ControllerEndpoint = Partial<{
addToPlaylist: (args: AddToPlaylistArgs) => Promise<AddToPlaylistResponse | Error>;
addToPlaylist: (args: AddToPlaylistArgs) => Promise<AddToPlaylistResponse>;
authenticate: (
url: string,
body: { password: string; username: string },
) => Promise<AuthenticationResponse | Error>;
) => Promise<AuthenticationResponse>;
clearPlaylist: () => void;
createFavorite: (args: FavoriteArgs) => Promise<FavoriteResponse | Error>;
createPlaylist: (args: CreatePlaylistArgs) => Promise<CreatePlaylistResponse | Error>;
deleteFavorite: (args: FavoriteArgs) => Promise<FavoriteResponse | Error>;
deletePlaylist: (args: DeletePlaylistArgs) => Promise<DeletePlaylistResponse | Error>;
getAlbumArtistDetail: (
args: AlbumArtistDetailArgs,
) => Promise<AlbumArtistDetailResponse | Error>;
getAlbumArtistList: (args: AlbumArtistListArgs) => Promise<AlbumArtistListResponse | Error>;
getAlbumDetail: (args: AlbumDetailArgs) => Promise<AlbumDetailResponse | Error>;
getAlbumList: (args: AlbumListArgs) => Promise<AlbumListResponse | Error>;
getAlbumSongList: (args: AlbumDetailArgs) => Promise<SongListResponse | Error>; // TODO
createFavorite: (args: FavoriteArgs) => Promise<FavoriteResponse>;
createPlaylist: (args: CreatePlaylistArgs) => Promise<CreatePlaylistResponse>;
deleteFavorite: (args: FavoriteArgs) => Promise<FavoriteResponse>;
deletePlaylist: (args: DeletePlaylistArgs) => Promise<DeletePlaylistResponse>;
getAlbumArtistDetail: (args: AlbumArtistDetailArgs) => Promise<AlbumArtistDetailResponse>;
getAlbumArtistList: (args: AlbumArtistListArgs) => Promise<AlbumArtistListResponse>;
getAlbumDetail: (args: AlbumDetailArgs) => Promise<AlbumDetailResponse>;
getAlbumList: (args: AlbumListArgs) => Promise<AlbumListResponse>;
getAlbumSongList: (args: AlbumDetailArgs) => Promise<SongListResponse>; // TODO
getArtistDetail: () => void;
getArtistInfo: (args: any) => void;
getArtistList: (args: ArtistListArgs) => Promise<ArtistListResponse | Error>;
getArtistList: (args: ArtistListArgs) => Promise<ArtistListResponse>;
getFavoritesList: () => void;
getFolderItemList: () => void;
getFolderList: () => void;
getFolderSongs: () => void;
getGenreList: (args: GenreListArgs) => Promise<GenreListResponse | Error>;
getLyrics: (args: LyricsArgs) => Promise<LyricsResponse | Error>;
getMusicFolderList: (args: MusicFolderListArgs) => Promise<MusicFolderListResponse | Error>;
getPlaylistDetail: (args: PlaylistDetailArgs) => Promise<PlaylistDetailResponse | Error>;
getPlaylistList: (args: PlaylistListArgs) => Promise<PlaylistListResponse | Error>;
getPlaylistSongList: (args: PlaylistSongListArgs) => Promise<SongListResponse | Error>;
getRandomSongList: (args: RandomSongListArgs) => Promise<SongListResponse | Error>;
getSongDetail: (args: SongDetailArgs) => Promise<SongDetailResponse | Error>;
getSongList: (args: SongListArgs) => Promise<SongListResponse | Error>;
getTopSongs: (args: TopSongListArgs) => Promise<TopSongListResponse | Error>;
getUserList: (args: UserListArgs) => Promise<UserListResponse | Error>;
removeFromPlaylist: (
args: RemoveFromPlaylistArgs,
) => Promise<RemoveFromPlaylistResponse | Error>;
scrobble: (args: ScrobbleArgs) => Promise<ScrobbleResponse | Error>;
search: (args: SearchArgs) => Promise<SearchResponse | Error>;
setRating: (args: SetRatingArgs) => Promise<RatingResponse | Error>;
updatePlaylist: (args: UpdatePlaylistArgs) => Promise<UpdatePlaylistResponse | Error>;
getGenreList: (args: GenreListArgs) => Promise<GenreListResponse>;
getLyrics: (args: LyricsArgs) => Promise<LyricsResponse>;
getMusicFolderList: (args: MusicFolderListArgs) => Promise<MusicFolderListResponse>;
getPlaylistDetail: (args: PlaylistDetailArgs) => Promise<PlaylistDetailResponse>;
getPlaylistList: (args: PlaylistListArgs) => Promise<PlaylistListResponse>;
getPlaylistSongList: (args: PlaylistSongListArgs) => Promise<SongListResponse>;
getRandomSongList: (args: RandomSongListArgs) => Promise<SongListResponse>;
getSongDetail: (args: SongDetailArgs) => Promise<SongDetailResponse>;
getSongList: (args: SongListArgs) => Promise<SongListResponse>;
getTopSongs: (args: TopSongListArgs) => Promise<TopSongListResponse>;
getUserList: (args: UserListArgs) => Promise<UserListResponse>;
removeFromPlaylist: (args: RemoveFromPlaylistArgs) => Promise<RemoveFromPlaylistResponse>;
scrobble: (args: ScrobbleArgs) => Promise<ScrobbleResponse>;
search: (args: SearchArgs) => Promise<SearchResponse>;
setRating: (args: SetRatingArgs) => Promise<RatingResponse>;
updatePlaylist: (args: UpdatePlaylistArgs) => Promise<UpdatePlaylistResponse>;
}>;