diff --git a/VEZA_INTEGRATION_PERFECTION_TODOLIST_TEMPLATE.json b/VEZA_INTEGRATION_PERFECTION_TODOLIST_TEMPLATE.json index c2a53b0fe..005169030 100644 --- a/VEZA_INTEGRATION_PERFECTION_TODOLIST_TEMPLATE.json +++ b/VEZA_INTEGRATION_PERFECTION_TODOLIST_TEMPLATE.json @@ -793,7 +793,8 @@ "description": "Le backend expose cet endpoint mais le frontend ne l'utilise pas.", "priority": "P2", "priority_rank": 24, - "status": "todo", + "status": "completed", + "completed_at": "2025-01-27T17:30:00Z", "estimated_hours": 1, "side": "frontend_only", "files_to_modify": [ @@ -1105,13 +1106,13 @@ }, "progress_tracking": { "total_tasks": 32, - "completed": 23, + "completed": 24, "in_progress": 0, - "todo": 9, + "todo": 8, "blocked": 0, - "completion_percentage": 72, - "last_updated": "2025-01-27T17:15:00Z", + "completion_percentage": 75, + "last_updated": "2025-01-27T17:30:00Z", "estimated_completion_date": null, - "estimated_hours_remaining": 13.5 + "estimated_hours_remaining": 12.5 } } diff --git a/apps/web/src/features/sessions/api/sessionsApi.ts b/apps/web/src/features/sessions/api/sessionsApi.ts new file mode 100644 index 000000000..1918e3f44 --- /dev/null +++ b/apps/web/src/features/sessions/api/sessionsApi.ts @@ -0,0 +1,39 @@ +/** + * Sessions API + * INT-ENDPOINT-001: Frontend service for GET /api/v1/sessions/stats + */ + +import { apiClient } from '@/services/api/client'; + +/** + * SessionStats interface aligned with backend response + * Backend returns: { user_id: string, stats: { total_active: number, unique_users: number } } + * After unwrapping by apiClient: response.data = { user_id: string, stats: { total_active: number, unique_users: number } } + */ +export interface SessionStats { + user_id: string; + stats: { + total_active: number; + unique_users: number; + }; +} + +/** + * Get session statistics + * GET /api/v1/sessions/stats + * + * @returns Promise Session statistics + * @throws ApiError if the request fails + */ +export async function getSessionStats(): Promise { + const response = await apiClient.get('/sessions/stats'); + return response.data; +} + +/** + * Sessions API object + */ +export const sessionsApi = { + getSessionStats, +}; +