MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / tierFromLookupKey

Function tierFromLookupKey

server/src/db/organization-db.ts:214–220  ·  view source on GitHub ↗
(lookupKey: string | null | undefined)

Source from the content-addressed store, hash-verified

212 * Matches the tier portion of keys like "aao_membership_professional_250".
213 */
214export function tierFromLookupKey(lookupKey: string | null | undefined): MembershipTier | null {
215 if (!lookupKey) return null;
216 for (const [prefix, tier] of LOOKUP_KEY_TIERS) {
217 if (lookupKey.startsWith(prefix)) return tier;
218 }
219 return null;
220}
221
222/**
223 * Input shape for `resolveMembershipTier`. Kept as a named type so the

Callers 3

resolveMembershipTierFunction · 0.85
buildSubscriptionUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected