export type PBEpisodeProcessorConfig = {cutIntroAudioUrl?: string | undefined, cutOutroAudioUrl?: string | undefined, addIntroAudioUrl?: string | undefined, addOutroAudioUrl?: string | undefined, aiTitleSummary?: boolean | undefined, customPromptTitle?: string | undefined, customPromptDescription?: string | undefined, removeBackgroundMusic?: boolean | undefined, removeAds?: boolean | undefined, extractInterviews?: boolean | undefined, interviewMinLengthMinutes?: number | undefined, customPromptInterviewTitle?: string | undefined, customPromptInterviewDescription?: string | undefined}; export type CreateApiPodcastBotPodcastsPodcastKeyEpisodesEpisodeKeyReprocessCustomArgs = {podcastKey: string, episodeKey: string, body: PBEpisodeProcessorConfig}; export type CreateApiPodcastBotPodcastsPodcastKeyEpisodesEpisodeKeyReprocessCustomOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Reprocess episode with custom presets * * POST /podcast-bot/podcasts/{podcastKey}/episodes/{episodeKey}/reprocess/custom */ export const createApiPodcastBotPodcastsPodcastKeyEpisodesEpisodeKeyReprocessCustom = async (args: CreateApiPodcastBotPodcastsPodcastKeyEpisodesEpisodeKeyReprocessCustomArgs, options?: CreateApiPodcastBotPodcastsPodcastKeyEpisodesEpisodeKeyReprocessCustomOptions) => { const {baseUrl = "https://api.zeno.fm", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/podcast-bot/podcasts/${encodeURIComponent(String(args.podcastKey))}/episodes/${encodeURIComponent(String(args.episodeKey))}/reprocess/custom${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };