Overview
useFetchMutualWorkspaces returns a callable that fetches one page of the workspaces both the current user and another user are in — their workspaces in common. The actor is derived from the bearer token — no actingUserId is sent. Each row’s reasons is the current user’s standing on it.
Usage Example
Parameters
string
required
The other user’s ID. An ID that matches no user returns an empty page; your own ID returns your own workspaces.
"reachable" | "direct" | null
"reachable" (the default): workspaces each of you can open, by any reason. "direct": workspaces each of you owns or has a member row on. null is left out of the request."desc" | "asc" | null
Order by creation time:
"desc" (the default) newest first, "asc" oldest first. null is left out of the request.number
Page number. Defaults to
1.number
Results per page. Defaults to
20.WorkspaceIncludeParam
A single value or an array. The only value is
"memberCount": it adds each row’s direct member count.Returns
Returns aPaginatedResponse<Workspace> ({ data, pagination }).

