- Gemini batch transcription (no Deepgram live)
- blobToBase64 helper (shared/lib/audio.ts)
- AudioRecorder: remove onChunk, add maxSeconds/onMaxReached auto-submit
- Timer stops at maxSeconds and triggers auto-submission
- EnregistrementEOPage: audioBase64 to backend, fix race condition step=done
- SimulationFlowProvider: submitEoAudio(audioBase64, mimeType, nclcCible)
- MIME normalization (strip codec params)
- Split CORRECTION_EE_TIMEOUT_MS (60s) / CORRECTION_EO_TIMEOUT_MS (120s)
- PresentationGenereeT1Page: localStorage persistence
Typecheck: OK · Tests: 159/159 ✅
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
23 lines
776 B
TypeScript
23 lines
776 B
TypeScript
/**
|
|
* Appels API du domaine `presentation` — Sprint 4c-2.
|
|
*
|
|
* `POST /presentations/generate` : timeout 25 s (DeepSeek peut mettre 10-20 s),
|
|
* retry désactivé volontairement — un POST non-idempotent qui consomme un
|
|
* appel DeepSeek ne doit pas être rejoué silencieusement sur erreur réseau.
|
|
*/
|
|
|
|
import { apiFetch } from '@/shared/lib/api-client'
|
|
import type { PresentationGenerated, PresentationReponses } from './types'
|
|
|
|
const GENERATE_TIMEOUT_MS = 25_000
|
|
|
|
export function generatePresentation(
|
|
reponses: PresentationReponses,
|
|
): Promise<PresentationGenerated> {
|
|
return apiFetch<PresentationGenerated>('/presentations/generate', {
|
|
method: 'POST',
|
|
body: { reponses },
|
|
timeoutMs: GENERATE_TIMEOUT_MS,
|
|
retry: { max: 0, baseDelayMs: 0 },
|
|
})
|
|
}
|