CUB-195: add useSSE hook and Zustand camera store for live SSE events

This commit is contained in:
rex-bot
2026-05-20 22:56:46 +00:00
parent 5bbfc11597
commit fa0956c6fd
7 changed files with 303 additions and 4 deletions
+21
View File
@@ -1,5 +1,26 @@
// RemoteRig TypeScript types
/** Full camera status from GET /api/v1/cameras and SSE events */
export interface CameraStatus {
camera_id: string
friendly_name: string
battery_pct: number | null
video_remaining_sec: number | null
recording: boolean
mode: string
resolution: string
fps: number
online: boolean
last_seen: string // ISO 8601
}
/** SSE event envelope from /api/v1/events/stream */
export interface SSEEvent {
type: string
ts: string
payload?: unknown
}
export interface Camera {
id: string
name: string