fix(api-client): declare moved + errors on migrateModels response type

ModelManagement.tsx reads migrationResult.moved (added in #433) but
apiClient.migrateModels() was typed as returning only { source, destination }.
The backend actually returns { moved: int, errors: list[str], source, destination }
(backend/routes/models.py:140, 168). Widen the TS return type so the check
typechecks under the new CI gate from #418.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
James Pine
2026-04-18 03:13:42 -07:00
co-authored by Claude Opus 4.7
parent 882cabc7d2
commit d5763a8abf
+3 -1
View File
@@ -390,7 +390,9 @@ class ApiClient {
return this.request<{ path: string }>('/models/cache-dir');
}
async migrateModels(destination: string): Promise<{ source: string; destination: string }> {
async migrateModels(
destination: string,
): Promise<{ source: string; destination: string; moved: number; errors: string[] }> {
return this.request('/models/migrate', {
method: 'POST',
body: JSON.stringify({ destination }),