( workspaceId: string | undefined )
| 36 | * lookup, so the billed-account query only runs when billing is enforced. |
| 37 | */ |
| 38 | export async function isWorkspaceApiExecutionEntitled( |
| 39 | workspaceId: string | undefined |
| 40 | ): Promise<boolean> { |
| 41 | if (!isApiExecutionGateActive() || !workspaceId) return true |
| 42 | |
| 43 | const billedUserId = await getWorkspaceBilledAccountUserId(workspaceId) |
| 44 | return isApiExecutionEntitled(billedUserId ?? undefined) |
| 45 | } |
no test coverage detected