begin reorganizing domain types

This commit is contained in:
jeffvli
2025-07-06 15:04:14 -07:00
parent c36735575f
commit 9147b041f3
20 changed files with 1400 additions and 1165 deletions
+11 -11
View File
@@ -3,17 +3,17 @@ import { z } from 'zod';
import { JFAlbum, JFGenre, JFMusicFolder, JFPlaylist } from '/@/shared/api/jellyfin.types';
import { jfType } from '/@/shared/api/jellyfin/jellyfin-types';
import { LibraryItem } from '/@/shared/types/domain-types';
import { Album } from '/@/shared/types/domain/album-domain-types';
import { AlbumArtist, RelatedArtist } from '/@/shared/types/domain/artist-domain-types';
import { Genre } from '/@/shared/types/domain/genre-domain-types';
import { Playlist } from '/@/shared/types/domain/playlist-domain-types';
import {
Album,
AlbumArtist,
Genre,
LibraryItem,
MusicFolder,
Playlist,
RelatedArtist,
Song,
} from '/@/shared/types/domain-types';
import { ServerListItem, ServerType } from '/@/shared/types/types';
ServerListItem,
ServerMusicFolder,
ServerType,
} from '/@/shared/types/domain/server-domain-types';
import { Song } from '/@/shared/types/domain/song-domain-types';
const getStreamUrl = (args: {
container?: string;
@@ -432,7 +432,7 @@ const normalizePlaylist = (
};
};
const normalizeMusicFolder = (item: JFMusicFolder): MusicFolder => {
const normalizeMusicFolder = (item: JFMusicFolder): ServerMusicFolder => {
return {
id: item.Id,
name: item.Name,
@@ -4,17 +4,14 @@ import z from 'zod';
import { NDGenre } from '/@/shared/api/navidrome.types';
import { ndType } from '/@/shared/api/navidrome/navidrome-types';
import { ssType } from '/@/shared/api/subsonic/subsonic-types';
import {
Album,
AlbumArtist,
Genre,
LibraryItem,
Playlist,
RelatedArtist,
Song,
User,
} from '/@/shared/types/domain-types';
import { ServerListItem, ServerType } from '/@/shared/types/types';
import { LibraryItem } from '/@/shared/types/domain-types';
import { Album } from '/@/shared/types/domain/album-domain-types';
import { AlbumArtist, RelatedArtist } from '/@/shared/types/domain/artist-domain-types';
import { Genre } from '/@/shared/types/domain/genre-domain-types';
import { Playlist } from '/@/shared/types/domain/playlist-domain-types';
import { ServerListItem, ServerType } from '/@/shared/types/domain/server-domain-types';
import { Song } from '/@/shared/types/domain/song-domain-types';
import { User } from '/@/shared/types/domain/user-domain-types';
const getImageUrl = (args: { url: null | string }) => {
const { url } = args;
+6 -11
View File
@@ -2,17 +2,12 @@ import { nanoid } from 'nanoid';
import { z } from 'zod';
import { ssType } from '/@/shared/api/subsonic/subsonic-types';
import {
Album,
AlbumArtist,
Genre,
LibraryItem,
Playlist,
QueueSong,
RelatedArtist,
ServerListItem,
ServerType,
} from '/@/shared/types/domain-types';
import { LibraryItem, QueueSong } from '/@/shared/types/domain-types';
import { Album } from '/@/shared/types/domain/album-domain-types';
import { AlbumArtist, RelatedArtist } from '/@/shared/types/domain/artist-domain-types';
import { Genre } from '/@/shared/types/domain/genre-domain-types';
import { Playlist } from '/@/shared/types/domain/playlist-domain-types';
import { ServerListItem, ServerType } from '/@/shared/types/domain/server-domain-types';
const getCoverArtUrl = (args: {
baseUrl: string | undefined;
+1 -1
View File
@@ -4,7 +4,7 @@ import semverCoerce from 'semver/functions/coerce';
import semverGte from 'semver/functions/gte';
import { z } from 'zod';
import { ServerListItem } from '/@/shared/types/domain-types';
import { ServerListItem } from '/@/shared/types/domain/server-domain-types';
import { ServerFeature } from '/@/shared/types/features-types';
// Since ts-rest client returns a strict response type, we need to add the headers to the body object