diff --git a/VEZA_INTEGRATION_PERFECTION_TODOLIST_TEMPLATE.json b/VEZA_INTEGRATION_PERFECTION_TODOLIST_TEMPLATE.json index 18f7c65eb..9b5add9b5 100644 --- a/VEZA_INTEGRATION_PERFECTION_TODOLIST_TEMPLATE.json +++ b/VEZA_INTEGRATION_PERFECTION_TODOLIST_TEMPLATE.json @@ -268,7 +268,8 @@ "description": "Playlist.id doit être string (UUID) partout.", "priority": "P1", "priority_rank": 6, - "status": "todo", + "status": "completed", + "completed_at": "2025-01-27T13:00:00Z", "estimated_hours": 1.5, "side": "frontend_only", "files_to_modify": [ @@ -1087,13 +1088,13 @@ }, "progress_tracking": { "total_tasks": 32, - "completed": 5, + "completed": 6, "in_progress": 0, - "todo": 27, + "todo": 26, "blocked": 0, - "completion_percentage": 16, - "last_updated": "2025-01-27T12:45:00Z", + "completion_percentage": 19, + "last_updated": "2025-01-27T13:00:00Z", "estimated_completion_date": null, - "estimated_hours_remaining": 39.5 + "estimated_hours_remaining": 38 } } diff --git a/apps/web/src/features/playlists/types.ts b/apps/web/src/features/playlists/types.ts index fcfec5a5c..fd60a14bc 100644 --- a/apps/web/src/features/playlists/types.ts +++ b/apps/web/src/features/playlists/types.ts @@ -5,9 +5,12 @@ /** * Interface représentant une playlist + * INT-TYPE-003: Playlist.id is UUID (string) from backend - always string */ export interface Playlist { + // UUID from backend - always string id: string; + // UUID from backend - always string user_id: string; title: string; description?: string; @@ -26,10 +29,14 @@ export interface Playlist { /** * Interface représentant un track dans une playlist + * INT-TYPE-003: All IDs are UUID (string) from backend - always string */ export interface PlaylistTrack { + // UUID from backend - always string id: string; + // UUID from backend - always string playlist_id: string; + // UUID from backend - always string track_id: string; position: number; added_at: string; diff --git a/apps/web/src/schemas/apiSchemas.ts b/apps/web/src/schemas/apiSchemas.ts index 744e521b0..7b468cf30 100644 --- a/apps/web/src/schemas/apiSchemas.ts +++ b/apps/web/src/schemas/apiSchemas.ts @@ -123,10 +123,11 @@ export type Track = z.infer; /** * Playlist schema + * INT-TYPE-003: Playlist.id is UUID (string) from backend - always string */ export const playlistSchema = z.object({ - id: uuidSchema, - user_id: uuidSchema, + id: uuidSchema, // UUID from backend - always string + user_id: uuidSchema, // UUID from backend - always string title: z.string().min(1), description: z.string().optional().nullable(), is_public: z.boolean(), @@ -245,11 +246,12 @@ export type Notification = z.infer; /** * PlaylistTrack schema + * INT-TYPE-003: All IDs are UUID (string) from backend - always string */ export const playlistTrackSchema = z.object({ - id: uuidSchema, - playlist_id: uuidSchema, - track_id: uuidSchema, + id: uuidSchema, // UUID from backend - always string + playlist_id: uuidSchema, // UUID from backend - always string + track_id: uuidSchema, // UUID from backend - always string position: z.number().int().nonnegative(), added_by: uuidSchema, added_at: isoDateSchema, @@ -261,10 +263,14 @@ export type PlaylistTrack = z.infer; /** * PlaylistCollaborator schema */ +/** + * PlaylistCollaborator schema + * INT-TYPE-003: All IDs are UUID (string) from backend - always string + */ export const playlistCollaboratorSchema = z.object({ - id: uuidSchema, - playlist_id: uuidSchema, - user_id: uuidSchema, + id: uuidSchema, // UUID from backend - always string + playlist_id: uuidSchema, // UUID from backend - always string + user_id: uuidSchema, // UUID from backend - always string role: z.enum(['owner', 'editor', 'viewer']), created_at: isoDateSchema, user: userSchema.optional(), diff --git a/apps/web/src/types/api.ts b/apps/web/src/types/api.ts index 51a939037..7d5e69241 100644 --- a/apps/web/src/types/api.ts +++ b/apps/web/src/types/api.ts @@ -397,7 +397,9 @@ export interface LibraryState { } export interface Playlist { + // UUID from backend - always string id: string; + // UUID from backend - always string user_id: string; title: string; // Backend uses 'title' in JSON, but column is 'name' description?: string; @@ -415,8 +417,11 @@ export interface Playlist { } export interface PlaylistTrack { + // UUID from backend - always string id: string; + // UUID from backend - always string playlist_id: string; + // UUID from backend - always string track_id: string; position: number; added_by: string; @@ -425,8 +430,11 @@ export interface PlaylistTrack { } export interface PlaylistCollaborator { + // UUID from backend - always string id: string; + // UUID from backend - always string playlist_id: string; + // UUID from backend - always string user_id: string; role: 'owner' | 'editor' | 'viewer'; created_at: string;