MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / createdFromResponse

Function createdFromResponse

apps/cloud/src/auth/api-keys.ts:269–278  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

267 });
268
269const createdFromResponse = (value: unknown): CreatedApiKey | null =>
270 Option.match(decodeCreateApiKeyResponse(value), {
271 onNone: () => null,
272 onSome: (response) => {
273 const apiKey =
274 "value" in response ? response : "apiKey" in response ? response.apiKey : response.api_key;
275 const summary = summaryFromApiKey(apiKey);
276 return summary ? { ...summary, value: apiKey.value } : null;
277 },
278 });
279
280export class ApiKeyService extends Context.Service<
281 ApiKeyService,

Callers 1

ApiKeyServiceClass · 0.85

Calls 1

summaryFromApiKeyFunction · 0.85

Tested by

no test coverage detected