(value: unknown, organizationId: string)
| 256 | }); |
| 257 | |
| 258 | const 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 | |
| 269 | const createdFromResponse = (value: unknown): CreatedApiKey | null => |
| 270 | Option.match(decodeCreateApiKeyResponse(value), { |
no test coverage detected