MCPcopy Index your code
hub / github.com/simstudioai/sim / listUserWorkspaces

Function listUserWorkspaces

apps/sim/lib/workspaces/utils.ts:129–137  ·  view source on GitHub ↗
(userId: string, scope: WorkspaceScope = 'active')

Source from the content-addressed store, hash-verified

127}
128
129export async function listUserWorkspaces(userId: string, scope: WorkspaceScope = 'active') {
130 const rows = await listAccessibleWorkspaceRowsForUser(userId, scope)
131
132 return rows.map(({ workspace: ws, permissionType }) => ({
133 workspaceId: ws.id,
134 workspaceName: ws.name,
135 role: ws.ownerId === userId ? 'owner' : permissionType,
136 }))
137}
138
139export interface ReassignBilledAccountResult {
140 reassigned: Array<{ workspaceId: string; newBilledAccountUserId: string }>

Callers 1

Calls 1

Tested by

no test coverage detected