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

Function checkAdminRequestEligibility

src/services/api/adminRequests.ts:102–119  ·  view source on GitHub ↗
(
  requestType: AdminRequestType,
)

Source from the content-addressed store, hash-verified

100 * Check if a specific admin request type is allowed for this org.
101 */
102export async function checkAdminRequestEligibility(
103 requestType: AdminRequestType,
104): Promise<AdminRequestEligibilityResponse | null> {
105 const { accessToken, orgUUID } = await prepareApiRequest()
106
107 const headers = {
108 ...getOAuthHeaders(accessToken),
109 'x-organization-uuid': orgUUID,
110 }
111
112 const url = `${getOauthConfig().BASE_API_URL}/api/oauth/organizations/${orgUUID}/admin_requests/eligibility?request_type=${requestType}`
113
114 const response = await axios.get<AdminRequestEligibilityResponse>(url, {
115 headers,
116 })
117
118 return response.data
119}
120

Callers 1

runExtraUsageFunction · 0.85

Calls 3

prepareApiRequestFunction · 0.85
getOAuthHeadersFunction · 0.85
getOauthConfigFunction · 0.85

Tested by

no test coverage detected