(organizationId: string)
| 7 | * sources whose underlying tables are workspace-scoped rather than org-scoped. |
| 8 | */ |
| 9 | export async function getOrganizationWorkspaceIds(organizationId: string): Promise<string[]> { |
| 10 | const rows = await db |
| 11 | .select({ id: workspace.id }) |
| 12 | .from(workspace) |
| 13 | .where(eq(workspace.organizationId, organizationId)) |
| 14 | return rows.map((row) => row.id) |
| 15 | } |