MCPcopy Create free account
hub / github.com/Noumena-Network/code / makeApiKeyRetrySession

Function makeApiKeyRetrySession

src/services/api/withRetry.test.ts:152–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150}
151
152function makeApiKeyRetrySession(): ResolvedAuthSession {
153 return {
154 principalKind: 'api_key_user',
155 principalSource: 'direct_api_key_env',
156 sessionState: 'usable',
157 headersKind: 'api_key',
158 providerAuthKind: 'noumena_first_party',
159 providerPlan: {
160 mode: 'noumena_managed',
161 source: 'direct_api_key_env',
162 staticKeyEnvVarName: 'NOUMENA_API_KEY',
163 },
164 isInteractive: true,
165 canRefresh: false,
166 canReauthenticateInteractively: false,
167 identity: {
168 email: null,
169 accountUuid: null,
170 organizationUuid: null,
171 organizationName: null,
172 },
173 subscription: {
174 subscriptionName: null,
175 subscriptionType: null,
176 rateLimitTier: null,
177 },
178 scopes: [],
179 hasUsableToken: false,
180 hasUsableApiKey: true,
181 accessToken: null,
182 accessTokenExpiresAt: null,
183 refreshTokenPresent: false,
184 apiKey: 'test-api-key',
185 rawAuthTokenSource: null,
186 rawApiKeySource: 'NOUMENA_API_KEY',
187 recoveryAction: 'none',
188 recoveryMessage: null,
189 sourceDetails: {
190 usedLegacyCompat: false,
191 usedEnvVar: true,
192 usedFileDescriptor: false,
193 usedHelper: false,
194 },
195 }
196}
197
198async function withMockCurrentSession<T>(
199 session: ResolvedAuthSession,

Callers 1

withRetry.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected