export type Colors = {accent?: string | undefined, background?: string | undefined, text?: string | undefined, barGradientFrom?: string | undefined, barGradientTo?: string | undefined}; export type Text = {episodeLabel?: string | undefined, title?: string | undefined, subtitle?: string | undefined, caption?: string | undefined}; export type Assets = {primaryLogo?: string | undefined, secondaryLogo?: string | undefined, hostPhoto?: string | undefined}; export type Captions = {show?: boolean | undefined, synced?: boolean | undefined, embedded_srt_file?: boolean | undefined}; export type PBVideoConfig = {style?: ('waveformBars' | 'equalizer' | 'radialPulse' | 'hostSplit' | 'hostCentered' | 'podcastCardDotted') | undefined, font?: ('inter' | 'oswald' | 'bebasNeue' | 'montserrat' | 'anton' | 'poppins') | undefined, showEqualizer?: boolean | undefined, fps?: number | undefined, colors?: Colors | undefined, text?: Text | undefined, assets?: Assets | undefined, captions?: Captions | undefined, aspect_ratios?: (Array<'16:9' | '9:16' | '1:1' | '4:5'>) | undefined}; export type UpdateApiPodcastBotPodcastsPodcastKeyVideoConfigArgs = {podcastKey: string, body: PBVideoConfig}; export type UpdateApiPodcastBotPodcastsPodcastKeyVideoConfigOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update podcast video configuration * * PUT /podcast-bot/podcasts/{podcastKey}/videoConfig */ export const updateApiPodcastBotPodcastsPodcastKeyVideoConfig = async (args: UpdateApiPodcastBotPodcastsPodcastKeyVideoConfigArgs, options?: UpdateApiPodcastBotPodcastsPodcastKeyVideoConfigOptions) => { 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))}/videoConfig${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 };