MCPcopy
hub / github.com/simstudioai/sim / isApiExecutionEntitled

Function isApiExecutionEntitled

apps/sim/lib/billing/core/api-access.ts:26–31  ·  view source on GitHub ↗
(userId: string | undefined)

Source from the content-addressed store, hash-verified

24 * individual belonging to a paid org/workspace is entitled.
25 */
26export 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

Callers 2

api-access.test.tsFile · 0.90

Calls 3

isPaidFunction · 0.90
isApiExecutionGateActiveFunction · 0.85

Tested by

no test coverage detected