/** * Workspaces API Client * User-scoped workspace discovery — does NOT require X-Workspace-Id header. */ import { apiGet } from "./client"; /** * A workspace entry from the user's membership list. * Matches WorkspaceResponseDto from the API. */ export interface UserWorkspace { id: string; name: string; ownerId: string; role: string; createdAt: string; } /** * Fetch all workspaces the authenticated user is a member of. * The API auto-provisions a default workspace if the user has none. */ export async function fetchUserWorkspaces(): Promise { return apiGet("/api/workspaces"); }