import { request, BASE } from "./client"; // ── Types ──────────────────────────────────────────────────────────────────── export interface ShortsTemplateConfig { show_intro: boolean; intro_text: string; intro_duration_secs: number; show_outro: boolean; outro_text: string; outro_duration_secs: number; accent_color: string; font_family: string; } export type ShortsTemplateUpdate = ShortsTemplateConfig; // ── API functions ──────────────────────────────────────────────────────────── export function fetchShortsTemplate( creatorId: string, ): Promise { return request( `${BASE}/admin/creators/${encodeURIComponent(creatorId)}/shorts-template`, ); } export function updateShortsTemplate( creatorId: string, config: ShortsTemplateUpdate, ): Promise { return request( `${BASE}/admin/creators/${encodeURIComponent(creatorId)}/shorts-template`, { method: "PUT", body: JSON.stringify(config), }, ); }