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

Function getPlanTypeForLimits

apps/sim/lib/billing/plan-helpers.ts:102–106  ·  view source on GitHub ↗
(plan: string | null | undefined)

Source from the content-addressed store, hash-verified

100 * Max plans (>= 25K credits) are promoted to team-level limits.
101 */
102export function getPlanTypeForLimits(plan: string | null | undefined): PlanCategory {
103 const credits = getPlanTierCredits(plan)
104 if (credits >= 25000 && isPro(plan)) return 'team'
105 return getPlanType(plan)
106}
107
108/**
109 * Build the canonical plan name for a given type and credit tier.

Callers 6

getExecutionTimeoutFunction · 0.90
getRateLimitFunction · 0.90
getWorkspaceTableLimitsFunction · 0.90
getStorageLimitForPlanFunction · 0.90
getUserStorageLimitFunction · 0.90

Calls 3

getPlanTierCreditsFunction · 0.85
isProFunction · 0.85
getPlanTypeFunction · 0.85

Tested by

no test coverage detected