From 78fb9b5ab7f75b67eaafa30c3bc7acabc33b8059 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Tue, 23 Sep 2025 18:28:43 -0700 Subject: [PATCH] require response from detail/list endpoints --- src/shared/types/domain-types.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/shared/types/domain-types.ts b/src/shared/types/domain-types.ts index 23655ffb..dfae356b 100644 --- a/src/shared/types/domain-types.ts +++ b/src/shared/types/domain-types.ts @@ -277,7 +277,7 @@ export interface GenreListQuery extends BaseQuery { } // Genre List -export type GenreListResponse = BasePaginatedResponse | null | undefined; +export type GenreListResponse = BasePaginatedResponse; export type GenresResponse = Genre[]; @@ -434,7 +434,7 @@ export interface AlbumListQuery extends BaseQuery { } // Album List -export type AlbumListResponse = BasePaginatedResponse | null | undefined; +export type AlbumListResponse = BasePaginatedResponse; type AlbumListSortMap = { jellyfin: Record; @@ -527,7 +527,7 @@ export type AlbumDetailArgs = BaseEndpointArgs & { query: AlbumDetailQuery }; export type AlbumDetailQuery = { id: string }; // Album Detail -export type AlbumDetailResponse = Album | null | undefined; +export type AlbumDetailResponse = Album; export type AlbumInfo = { imageUrl: null | string; @@ -557,7 +557,7 @@ export interface SongListQuery extends BaseQuery { } // Song List -export type SongListResponse = BasePaginatedResponse | null | undefined; +export type SongListResponse = BasePaginatedResponse; type SongListSortMap = { jellyfin: Record; @@ -659,14 +659,14 @@ export interface AlbumArtistListQuery extends BaseQuery { } // Album Artist List -export type AlbumArtistListResponse = BasePaginatedResponse | null | undefined; +export type AlbumArtistListResponse = BasePaginatedResponse; export type SongDetailArgs = BaseEndpointArgs & { query: SongDetailQuery }; export type SongDetailQuery = { id: string }; // Song Detail -export type SongDetailResponse = null | Song | undefined; +export type SongDetailResponse = Song; type AlbumArtistListSortMap = { jellyfin: Record; @@ -753,7 +753,7 @@ export interface ArtistListQuery extends BaseQuery { } // Artist List -export type ArtistListResponse = BasePaginatedResponse | null | undefined; +export type ArtistListResponse = BasePaginatedResponse; type ArtistListSortMap = { jellyfin: Record; @@ -883,7 +883,7 @@ export interface PlaylistListQuery extends BaseQuery { } // Playlist List -export type PlaylistListResponse = BasePaginatedResponse | null | undefined; +export type PlaylistListResponse = BasePaginatedResponse; export type RatingQuery = { item: AnyLibraryItems; @@ -991,7 +991,7 @@ export type MusicFolderListArgs = BaseEndpointArgs; export type MusicFolderListQuery = null; // Music Folder List -export type MusicFolderListResponse = BasePaginatedResponse | null | undefined; +export type MusicFolderListResponse = BasePaginatedResponse; export type PlaylistDetailArgs = BaseEndpointArgs & { query: PlaylistDetailQuery }; @@ -1014,7 +1014,7 @@ export type PlaylistSongListQueryClientSide = { }; // Playlist Songs -export type PlaylistSongListResponse = BasePaginatedResponse | null | undefined; +export type PlaylistSongListResponse = BasePaginatedResponse; export type UserListArgs = BaseEndpointArgs & { query: UserListQuery }; @@ -1031,7 +1031,7 @@ export interface UserListQuery extends BaseQuery { // User list // Playlist List -export type UserListResponse = BasePaginatedResponse | null | undefined; +export type UserListResponse = BasePaginatedResponse; type UserListSortMap = { jellyfin: Record; @@ -1128,7 +1128,7 @@ export type ScrobbleQuery = { }; // Scrobble -export type ScrobbleResponse = null | undefined; +export type ScrobbleResponse = null; export type SearchAlbumArtistsQuery = { albumArtistLimit?: number; @@ -1183,7 +1183,7 @@ export type TopSongListQuery = { }; // Top Songs List -export type TopSongListResponse = BasePaginatedResponse | null | undefined; +export type TopSongListResponse = BasePaginatedResponse; export const instanceOfCancellationError = (error: any) => { return 'revert' in error;