(connection: Connection, verbose: boolean)
| 384 | /** Lean projection for `connections.list`. Summarizes `oauthScope` to a count |
| 385 | * unless `verbose`, where the full grant string is included too. */ |
| 386 | const connectionToListItem = (connection: Connection, verbose: boolean) => ({ |
| 387 | owner: connection.owner, |
| 388 | name: String(connection.name), |
| 389 | integration: String(connection.integration), |
| 390 | template: String(connection.template), |
| 391 | provider: String(connection.provider), |
| 392 | address: String(connection.address), |
| 393 | identityLabel: connection.identityLabel ?? null, |
| 394 | description: connection.description ?? null, |
| 395 | expiresAt: connection.expiresAt ?? null, |
| 396 | oauthClient: connection.oauthClient == null ? null : String(connection.oauthClient), |
| 397 | oauthClientOwner: connection.oauthClientOwner ?? null, |
| 398 | oauthScopeCount: oauthScopeCount(connection.oauthScope), |
| 399 | ...(verbose ? { oauthScope: connection.oauthScope ?? null } : {}), |
| 400 | }); |
| 401 | |
| 402 | const toolToOutput = (toolRow: Tool) => ({ |
| 403 | address: String(toolRow.address), |
no test coverage detected