MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getSubscriptionType

Function getSubscriptionType

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

Source from the content-addressed store, hash-verified

1660}
1661
1662export function getSubscriptionType(): SubscriptionType | null {
1663 // Check for mock subscription type first (ANT-only testing)
1664 if (shouldUseMockSubscription()) {
1665 return getMockSubscriptionType()
1666 }
1667
1668 if (!isAnthropicAuthEnabled()) {
1669 return null
1670 }
1671 const oauthTokens = getClaudeAIOAuthTokens()
1672 if (!oauthTokens) {
1673 return null
1674 }
1675
1676 return oauthTokens.subscriptionType ?? null
1677}
1678
1679export function isMaxSubscriber(): boolean {
1680 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