forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits

getPodcastJobResultById.ts12 lines, 601 bytesHistoryRawDownload
1import { client } from "../client";
2import type { PodcastJobArtifacts } from "../client";
3
4/**
5 * A finished job's artifacts — above all the `audio_id` the audio door
6 * streams. A job that has not finished yet is refused with 409 (`not_ready`),
7 * which is a "poll again", not a failure; one the service never heard of is a
8 * 404. Read it only once `getPodcastJobById` reports `done`.
9 */
10export function getPodcastJobResultById(id: string, signal?: AbortSignal): Promise<PodcastJobArtifacts> {
11 return client<PodcastJobArtifacts>(`/podcast/jobs/${encodeURIComponent(id)}/result`, { signal });
12}