diff --git a/web/src/lib/api/client.ts b/web/src/lib/api/client.ts index 528b204e..364e63db 100644 --- a/web/src/lib/api/client.ts +++ b/web/src/lib/api/client.ts @@ -1,5 +1,6 @@ import type { Workspace, + DeletedWorkspace, WorkspaceCreate, WorkspaceUpdate, Collection, @@ -615,6 +616,17 @@ export const api = { delete: (slug: string) => request(`/workspaces/${slug}`, { method: 'DELETE' }), + // restore un-deletes a soft-deleted workspace that's still inside the + // purge window, returning the restored Workspace. Mirrors + // POST /workspaces/{slug}/restore (TASK-1970). + restore: (slug: string) => + request(`/workspaces/${slug}/restore`, { method: 'POST' }), + + // listDeleted returns the caller's soft-deleted workspaces still inside + // the restore window, each with purge_at + days_left. Backs the + // restore UI (GET /workspaces/deleted, TASK-1970). + listDeleted: () => request('/workspaces/deleted'), + reorder: (updates: { slug: string; sort_order: number }[]) => request('/workspaces/reorder', { method: 'PUT',