fix(web-player): follow the API types where they are nullable

The checked-in schema was stale and typed artist, description and externalId
as always present, so the code trusted values the API returns as null. The
regenerated schema tells the truth; the API-shaped types now admit null and it
is normalised on the way into the player, where the state stays non-null.
This commit is contained in:
2026-07-20 20:20:34 +02:00
parent 68ec3a2aae
commit 9cd916c098
12 changed files with 505 additions and 24 deletions
@@ -7,8 +7,8 @@
interface Props {
id: string | number;
title: string;
artist?: string;
coverSrc?: string;
artist?: string | null;
coverSrc?: string | null;
coverSize?: 'small' | 'medium' | 'large';
hue: number;
explicit?: boolean;
@@ -7,7 +7,7 @@
trackId: string | number;
hue: number;
size?: 'small' | 'medium' | 'large';
src?: string;
src?: string | null;
alt?: string;
class?: string;
children?: Snippet;
@@ -5,7 +5,9 @@
value?: string;
id?: string;
name?: string;
type?: 'text' | 'search';
type?: 'text' | 'search' | 'number';
min?: number;
max?: number;
placeholder?: string;
maxlength?: number;
required?: boolean;
@@ -20,6 +22,8 @@
id,
name,
type = 'text',
min,
max,
placeholder,
maxlength,
required = false,
@@ -40,6 +44,8 @@
{id}
{name}
{type}
{min}
{max}
{placeholder}
{maxlength}
{required}
@@ -5,7 +5,7 @@
interface Props {
id: string;
name: string;
description?: string;
description?: string | null;
trackIds: (string | number)[];
updatedAt: string;
index?: number;
@@ -6,8 +6,8 @@
interface Props {
trackId: string | number;
title: string;
artist?: string;
coverSrc?: string;
artist?: string | null;
coverSrc?: string | null;
coverSize?: string;
hue: number;
explicit?: boolean;