diff --git a/web/src/lib/api/types.ts b/web/src/lib/api/types.ts index ac41e346..c58ded2f 100644 --- a/web/src/lib/api/types.ts +++ b/web/src/lib/api/types.ts @@ -192,9 +192,19 @@ export type LidarrRootFolder = { }; // testLidarrConnection always returns 200; callers branch on `.ok`. +// On success the response carries the live profile + folder lists so the +// integrations page can pre-fill its dropdowns on first-time setup +// without a separate round-trip. export type LidarrTestResult = - | { ok: true; version: string } - | { ok: false; error: string }; + | { + ok: true; + version: string; + quality_profiles?: { id: number; name: string }[]; + metadata_profiles?: { id: number; name: string }[]; + root_folders?: { path: string; accessible: boolean; free_space: number }[]; + list_errors?: Record; + } + | { ok: false; error: string }; // Lidarr quarantine ------------------------------------------------------