feat(web/api): playlists helper + types + query keys (M7 #352 slice 1)

Wire shapes mirror the server's snake_case envelope. URL helpers use
the existing apiFetch + ApiError surface so error codes (not_found,
not_authorized, bad_request, server_error) propagate via the same
copyForCode chain as everything else.
This commit is contained in:
2026-05-03 11:12:46 -04:00
parent c331168d3b
commit b9830cc9cc
4 changed files with 190 additions and 0 deletions
+2
View File
@@ -38,6 +38,8 @@ export const qk = {
home: () => ['home'] as const,
albumsAlpha: () => ['albumsAlpha'] as const,
artistTracks: (artistId: string) => ['artistTracks', artistId] as const,
playlists: () => ['playlists'] as const,
playlist: (id: string) => ['playlist', id] as const,
};
export function createArtistsQuery(sort: ArtistSort) {