hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits
| 1 | import { client } from "../client"; |
| 2 | import type { PodcastFormat, PodcastJobReceipt } from "../client"; |
| 3 | |
| 4 | export type PostPodcastJobBody = { |
| 5 | /** A course note's id, never a path — the backend resolves the source. */ |
| 6 | source_id: string; |
| 7 | /** |
| 8 | * Omit for the service's default (`duz_okuma`). `tek_ogretici` and |
| 9 | * `ogrenci_hoca` need the service's LLM key and are refused with |
| 10 | * 409 `llm_unavailable` without it. |
| 11 | */ |
| 12 | format?: PodcastFormat; |
| 13 | }; |
| 14 | |
| 15 | /** |
| 16 | * 202 the moment the service accepts the job — the pipeline then runs in its |
| 17 | * own worker pool, so poll `getPodcastJobById` for progress. 503 when no |
| 18 | * service offers the podcast capability, and then nothing was queued. |
| 19 | */ |
| 20 | export function postPodcastJob(body: PostPodcastJobBody): Promise<PodcastJobReceipt> { |
| 21 | return client<PodcastJobReceipt>("/podcast/jobs", { method: "POST", body }); |
| 22 | } |