(value: unknown)
| 267 | }); |
| 268 | |
| 269 | const 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 | |
| 280 | export class ApiKeyService extends Context.Service< |
| 281 | ApiKeyService, |
no test coverage detected