(userId: string | undefined)
| 24 | * individual belonging to a paid org/workspace is entitled. |
| 25 | */ |
| 26 | export async function isApiExecutionEntitled(userId: string | undefined): Promise<boolean> { |
| 27 | if (!isApiExecutionGateActive() || !userId) return true |
| 28 | |
| 29 | const subscription = await getHighestPrioritySubscription(userId) |
| 30 | return isPaid(subscription?.plan) |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Workspace-scoped variant of {@link isApiExecutionEntitled} that gates on the |
no test coverage detected