// AUTO-GENERATED - DO NOT EDIT // Source: .workflow/versions/vXXX/contracts/api_contract.yml // Generated: 2025-12-19T06:08:18.855166 // ============================================================================ // Shared API Types // Both frontend and backend MUST import from this file // ============================================================================ // === Error Types === export interface ApiError { error: string; message?: string; code?: string; } export interface ValidationError { error: string; details: string[]; } // === Domain Types === export interface User { /** Unique user identifier */ id: string; /** User email address for login */ email: string; /** User's display name */ name: string; } export interface Recording { /** Unique recording identifier */ id: string; /** Owner of this recording */ userId: string; /** Recording title (auto-generated or user-edited) */ title: string; /** Path to audio file in MinIO/S3 */ audioFilePath: string; /** Recording duration in seconds */ duration: number; /** Full transcript from Whisper STT */ transcript?: string; /** AI-generated summary from Gemini */ summary?: string; /** Whether currently transcribing */ isTranscribing: boolean; } export interface GeneratedApp { /** Unique app identifier */ id: string; /** Owner of this app */ userId: string; /** Source recording that triggered generation */ recordingId: string; /** App title from AI analysis */ title: string; /** App description */ description?: string; /** Complete HTML/CSS/JS for iframe rendering */ htmlContent: string; /** Product Requirements Document (PRD) generated by AI */ prdContent?: string; /** UI/UX design notes from AI */ uiUxDesign?: string; /** Type of app determined by AI (e.g., todo, calculator, form) */ appType?: string; /** Generation status */ status: 'generating' | 'completed' | 'failed'; } export interface RegisterUserRequest { /** User email address */ email: string; /** User display name */ name: string; /** Password (min 8 characters) */ password: string; } export interface LoginUserRequest { /** User email */ email: string; /** User password */ password: string; } export interface LogoutUserRequest { } export interface LogoutUserResponse { success: boolean; } export interface GetCurrentUserRequest { } export interface ListRecordingsRequest { } export interface CreateRecordingRequest { /** Audio file (webm, mp3, wav) */ audio: unknown; /** Recording title (auto-generated if not provided) */ title?: string; /** Duration in seconds */ duration: number; } export interface GetRecordingRequest { } export interface DeleteRecordingRequest { } export interface TranscribeRecordingRequest { } export interface SummarizeRecordingRequest { } export interface ListAppsRequest { } export interface GenerateAppRequest { /** Source recording ID */ recordingId: string; } export interface GetAppRequest { } export interface DeleteAppRequest { } // === API Paths === export const API_PATHS = { REGISTER_USER: '/api/auth/register' as const, LOGIN_USER: '/api/auth/login' as const, LOGOUT_USER: '/api/auth/logout' as const, GET_CURRENT_USER: '/api/auth/me' as const, LIST_RECORDINGS: '/api/recordings' as const, CREATE_RECORDING: '/api/recordings' as const, GET_RECORDING: '/api/recordings/[id]' as const, DELETE_RECORDING: '/api/recordings/[id]' as const, TRANSCRIBE_RECORDING: '/api/recordings/[id]/transcribe' as const, SUMMARIZE_RECORDING: '/api/recordings/[id]/summarize' as const, LIST_APPS: '/api/apps' as const, GENERATE_APP: '/api/apps/generate' as const, GET_APP: '/api/apps/[id]' as const, DELETE_APP: '/api/apps/[id]' as const, } as const;