MCPcopy Create free account
hub / github.com/freecodexyz/free-code / getSubscriptionType

Function getSubscriptionType

src/utils/auth.ts:1730–1745  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1728}
1729
1730export function getSubscriptionType(): SubscriptionType | null {
1731 // Check for mock subscription type first (ANT-only testing)
1732 if (shouldUseMockSubscription()) {
1733 return getMockSubscriptionType()
1734 }
1735
1736 if (!isAnthropicAuthEnabled()) {
1737 return null
1738 }
1739 const oauthTokens = getClaudeAIOAuthTokens()
1740 if (!oauthTokens) {
1741 return null
1742 }
1743
1744 return oauthTokens.subscriptionType ?? null
1745}
1746
1747export function isMaxSubscriber(): boolean {
1748 return getSubscriptionType() === 'max'

Callers 15

runFunction · 0.85
getPromptFunction · 0.85
_tempFunction · 0.85
UsageFunction · 0.85
ExtraUsageSectionFunction · 0.85
RateLimitMessageFunction · 0.85
NotificationsFunction · 0.85
getPlanModeV2AgentCountFunction · 0.85
user.tsFile · 0.85
hasOpusAccessFunction · 0.85
isMaxSubscriberFunction · 0.85

Calls 3

getMockSubscriptionTypeFunction · 0.85
isAnthropicAuthEnabledFunction · 0.85

Tested by

no test coverage detected