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 PbClip = {label?: string | undefined, video?: PBVideoConfig | undefined, clip_generation?: string | undefined, count?: number | undefined, min_clip_duration?: number | undefined, max_clip_duration?: number | undefined, segment_types?: Array | undefined}; export type PBAutoClipConfig = {video?: PBVideoConfig | undefined, generate_chapters?: boolean | undefined, clip_generation?: string | undefined, max_clips?: number | undefined, min_clip_duration?: number | undefined, max_clip_duration?: number | undefined, padding_seconds?: number | undefined, segment_types?: Array | undefined, clip_groups?: Array | undefined}; export type UpdateApiPodcastBotPodcastsPodcastKeyAutoClipsConfigArgs = {podcastKey: string, body: PBAutoClipConfig}; export type UpdateApiPodcastBotPodcastsPodcastKeyAutoClipsConfigOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update podcast auto-clips configuration * * PUT /podcast-bot/podcasts/{podcastKey}/autoClipsConfig */ export const updateApiPodcastBotPodcastsPodcastKeyAutoClipsConfig = async (args: UpdateApiPodcastBotPodcastsPodcastKeyAutoClipsConfigArgs, options?: UpdateApiPodcastBotPodcastsPodcastKeyAutoClipsConfigOptions) => { 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))}/autoClipsConfig${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 };