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

Function orgCreatedFromResponse

apps/cloud/src/auth/api-keys.ts:258–267  ·  view source on GitHub ↗
(value: unknown, organizationId: string)

Source from the content-addressed store, hash-verified

256 });
257
258const orgCreatedFromResponse = (value: unknown, organizationId: string): CreatedApiKey | null =>
259 Option.match(decodeCreateOrgApiKeyResponse(value), {
260 onNone: () => null,
261 onSome: (response) => {
262 const apiKey =
263 "value" in response ? response : "apiKey" in response ? response.apiKey : response.api_key;
264 const summary = summaryFromOrgApiKey(apiKey, organizationId);
265 return summary ? { ...summary, value: apiKey.value } : null;
266 },
267 });
268
269const createdFromResponse = (value: unknown): CreatedApiKey | null =>
270 Option.match(decodeCreateApiKeyResponse(value), {

Callers 1

ApiKeyServiceClass · 0.85

Calls 1

summaryFromOrgApiKeyFunction · 0.85

Tested by

no test coverage detected