[INT-TYPE-004] Create TrackStatus enum aligned with backend
This commit is contained in:
parent
6aff5a7383
commit
8b4ef0abae
4 changed files with 22 additions and 9 deletions
|
|
@ -296,7 +296,8 @@
|
|||
"description": "Track.status utilise des strings arbitraires. Créer un enum aligné avec le backend.",
|
||||
"priority": "P1",
|
||||
"priority_rank": 7,
|
||||
"status": "todo",
|
||||
"status": "completed",
|
||||
"completed_at": "2025-01-27T13:15:00Z",
|
||||
"estimated_hours": 1,
|
||||
"side": "both_sides",
|
||||
"files_to_modify": [
|
||||
|
|
@ -1088,13 +1089,13 @@
|
|||
},
|
||||
"progress_tracking": {
|
||||
"total_tasks": 32,
|
||||
"completed": 6,
|
||||
"completed": 7,
|
||||
"in_progress": 0,
|
||||
"todo": 26,
|
||||
"todo": 25,
|
||||
"blocked": 0,
|
||||
"completion_percentage": 19,
|
||||
"last_updated": "2025-01-27T13:00:00Z",
|
||||
"completion_percentage": 22,
|
||||
"last_updated": "2025-01-27T13:15:00Z",
|
||||
"estimated_completion_date": null,
|
||||
"estimated_hours_remaining": 38
|
||||
"estimated_hours_remaining": 37
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,19 @@
|
|||
/**
|
||||
* Track Types
|
||||
* T0260: Types TypeScript pour les tracks et l'upload
|
||||
* INT-TYPE-004: TrackStatus enum aligned with backend (models/track_status.go)
|
||||
*/
|
||||
|
||||
export type TrackStatus = 'uploading' | 'processing' | 'completed' | 'failed';
|
||||
/**
|
||||
* TrackStatus enum - aligned with backend TrackStatus constants
|
||||
* Backend values: uploading, processing, completed, failed
|
||||
*/
|
||||
export enum TrackStatus {
|
||||
Uploading = 'uploading',
|
||||
Processing = 'processing',
|
||||
Completed = 'completed',
|
||||
Failed = 'failed',
|
||||
}
|
||||
|
||||
export interface Track {
|
||||
// UUID from backend - always string
|
||||
|
|
|
|||
|
|
@ -108,7 +108,8 @@ export const trackSchema = z.object({
|
|||
waveform_path: z.string().optional().nullable(),
|
||||
cover_art_path: z.string().optional().nullable(),
|
||||
is_public: z.boolean(),
|
||||
status: z.enum(['uploading', 'processing', 'completed', 'failed']),
|
||||
// INT-TYPE-004: TrackStatus enum aligned with backend
|
||||
status: z.enum(['uploading', 'processing', 'completed', 'failed']), // Matches TrackStatus enum
|
||||
status_message: z.string().optional().nullable(),
|
||||
stream_status: z.enum(['pending', 'processing', 'ready', 'error']),
|
||||
stream_manifest_url: z.string().url().optional().nullable(),
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ export interface Track {
|
|||
waveform_path?: string;
|
||||
cover_art_path?: string; // Backend uses cover_art_path (not cover_art_url)
|
||||
is_public: boolean;
|
||||
status: 'uploading' | 'processing' | 'completed' | 'failed';
|
||||
// INT-TYPE-004: TrackStatus enum aligned with backend
|
||||
status: 'uploading' | 'processing' | 'completed' | 'failed'; // Use TrackStatus enum from features/tracks/types/track.ts
|
||||
status_message?: string;
|
||||
stream_status: 'pending' | 'processing' | 'ready' | 'error';
|
||||
stream_manifest_url?: string;
|
||||
|
|
|
|||
Loading…
Reference in a new issue