require response from detail/list endpoints

This commit is contained in:
jeffvli 2025-09-23 18:28:43 -07:00
parent 8115963264
commit 78fb9b5ab7

View file

@ -277,7 +277,7 @@ export interface GenreListQuery extends BaseQuery<GenreListSort> {
} }
// Genre List // Genre List
export type GenreListResponse = BasePaginatedResponse<Genre[]> | null | undefined; export type GenreListResponse = BasePaginatedResponse<Genre[]>;
export type GenresResponse = Genre[]; export type GenresResponse = Genre[];
@ -434,7 +434,7 @@ export interface AlbumListQuery extends BaseQuery<AlbumListSort> {
} }
// Album List // Album List
export type AlbumListResponse = BasePaginatedResponse<Album[]> | null | undefined; export type AlbumListResponse = BasePaginatedResponse<Album[]>;
type AlbumListSortMap = { type AlbumListSortMap = {
jellyfin: Record<AlbumListSort, JFAlbumListSort | undefined>; jellyfin: Record<AlbumListSort, JFAlbumListSort | undefined>;
@ -527,7 +527,7 @@ export type AlbumDetailArgs = BaseEndpointArgs & { query: AlbumDetailQuery };
export type AlbumDetailQuery = { id: string }; export type AlbumDetailQuery = { id: string };
// Album Detail // Album Detail
export type AlbumDetailResponse = Album | null | undefined; export type AlbumDetailResponse = Album;
export type AlbumInfo = { export type AlbumInfo = {
imageUrl: null | string; imageUrl: null | string;
@ -557,7 +557,7 @@ export interface SongListQuery extends BaseQuery<SongListSort> {
} }
// Song List // Song List
export type SongListResponse = BasePaginatedResponse<Song[]> | null | undefined; export type SongListResponse = BasePaginatedResponse<Song[]>;
type SongListSortMap = { type SongListSortMap = {
jellyfin: Record<SongListSort, JFSongListSort | undefined>; jellyfin: Record<SongListSort, JFSongListSort | undefined>;
@ -659,14 +659,14 @@ export interface AlbumArtistListQuery extends BaseQuery<AlbumArtistListSort> {
} }
// Album Artist List // Album Artist List
export type AlbumArtistListResponse = BasePaginatedResponse<AlbumArtist[]> | null | undefined; export type AlbumArtistListResponse = BasePaginatedResponse<AlbumArtist[]>;
export type SongDetailArgs = BaseEndpointArgs & { query: SongDetailQuery }; export type SongDetailArgs = BaseEndpointArgs & { query: SongDetailQuery };
export type SongDetailQuery = { id: string }; export type SongDetailQuery = { id: string };
// Song Detail // Song Detail
export type SongDetailResponse = null | Song | undefined; export type SongDetailResponse = Song;
type AlbumArtistListSortMap = { type AlbumArtistListSortMap = {
jellyfin: Record<AlbumArtistListSort, JFAlbumArtistListSort | undefined>; jellyfin: Record<AlbumArtistListSort, JFAlbumArtistListSort | undefined>;
@ -753,7 +753,7 @@ export interface ArtistListQuery extends BaseQuery<ArtistListSort> {
} }
// Artist List // Artist List
export type ArtistListResponse = BasePaginatedResponse<AlbumArtist[]> | null | undefined; export type ArtistListResponse = BasePaginatedResponse<AlbumArtist[]>;
type ArtistListSortMap = { type ArtistListSortMap = {
jellyfin: Record<ArtistListSort, JFArtistListSort | undefined>; jellyfin: Record<ArtistListSort, JFArtistListSort | undefined>;
@ -883,7 +883,7 @@ export interface PlaylistListQuery extends BaseQuery<PlaylistListSort> {
} }
// Playlist List // Playlist List
export type PlaylistListResponse = BasePaginatedResponse<Playlist[]> | null | undefined; export type PlaylistListResponse = BasePaginatedResponse<Playlist[]>;
export type RatingQuery = { export type RatingQuery = {
item: AnyLibraryItems; item: AnyLibraryItems;
@ -991,7 +991,7 @@ export type MusicFolderListArgs = BaseEndpointArgs;
export type MusicFolderListQuery = null; export type MusicFolderListQuery = null;
// Music Folder List // Music Folder List
export type MusicFolderListResponse = BasePaginatedResponse<MusicFolder[]> | null | undefined; export type MusicFolderListResponse = BasePaginatedResponse<MusicFolder[]>;
export type PlaylistDetailArgs = BaseEndpointArgs & { query: PlaylistDetailQuery }; export type PlaylistDetailArgs = BaseEndpointArgs & { query: PlaylistDetailQuery };
@ -1014,7 +1014,7 @@ export type PlaylistSongListQueryClientSide = {
}; };
// Playlist Songs // Playlist Songs
export type PlaylistSongListResponse = BasePaginatedResponse<Song[]> | null | undefined; export type PlaylistSongListResponse = BasePaginatedResponse<Song[]>;
export type UserListArgs = BaseEndpointArgs & { query: UserListQuery }; export type UserListArgs = BaseEndpointArgs & { query: UserListQuery };
@ -1031,7 +1031,7 @@ export interface UserListQuery extends BaseQuery<UserListSort> {
// User list // User list
// Playlist List // Playlist List
export type UserListResponse = BasePaginatedResponse<User[]> | null | undefined; export type UserListResponse = BasePaginatedResponse<User[]>;
type UserListSortMap = { type UserListSortMap = {
jellyfin: Record<UserListSort, undefined>; jellyfin: Record<UserListSort, undefined>;
@ -1128,7 +1128,7 @@ export type ScrobbleQuery = {
}; };
// Scrobble // Scrobble
export type ScrobbleResponse = null | undefined; export type ScrobbleResponse = null;
export type SearchAlbumArtistsQuery = { export type SearchAlbumArtistsQuery = {
albumArtistLimit?: number; albumArtistLimit?: number;
@ -1183,7 +1183,7 @@ export type TopSongListQuery = {
}; };
// Top Songs List // Top Songs List
export type TopSongListResponse = BasePaginatedResponse<Song[]> | null | undefined; export type TopSongListResponse = BasePaginatedResponse<Song[]>;
export const instanceOfCancellationError = (error: any) => { export const instanceOfCancellationError = (error: any) => {
return 'revert' in error; return 'revert' in error;