export type PBPodcastProcessingPresets = {removeBackgroundMusic?: boolean | undefined, introAudioUrl?: string | undefined, outroAudioUrl?: string | undefined, aiTitleSummary?: boolean | undefined, customPromptTitle?: string | undefined, customPromptDescription?: string | undefined}; export type UpdateApiPodcastBotPodcastsPodcastKeyProcessingPresetsArgs = {podcastKey: string, body: PBPodcastProcessingPresets}; export type UpdateApiPodcastBotPodcastsPodcastKeyProcessingPresetsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update podcast processing presets * * PUT /podcast-bot/podcasts/{podcastKey}/processingPresets */ export const updateApiPodcastBotPodcastsPodcastKeyProcessingPresets = async (args: UpdateApiPodcastBotPodcastsPodcastKeyProcessingPresetsArgs, options?: UpdateApiPodcastBotPodcastsPodcastKeyProcessingPresetsOptions) => { const {baseUrl = "https://api.zeno.fm", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/podcast-bot/podcasts/${encodeURIComponent(String(args.podcastKey))}/processingPresets${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", 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 undefined };