(
row: ConnectionRow,
)
| 2487 | * not OAuth-backed, or holding no refresh token — so the caller keeps the |
| 2488 | * upstream's own auth failure instead of inventing one. */ |
| 2489 | const forceRefreshConnectionValues = ( |
| 2490 | row: ConnectionRow, |
| 2491 | ): Effect.Effect< |
| 2492 | Record<string, string | null> | null, |
| 2493 | StorageFailure | CredentialResolutionError |
| 2494 | > => |
| 2495 | Effect.gen(function* () { |
| 2496 | if (row.oauth_client == null || row.refresh_item_id == null) return null; |
| 2497 | const provider = credentialProviders.get(row.provider); |
| 2498 | if (!provider) return null; |
| 2499 | const access = yield* refreshConnectionToken(row, provider, "reactive"); |
| 2500 | return { [PRIMARY_INPUT_VARIABLE]: access }; |
| 2501 | }); |
| 2502 | |
| 2503 | /** The primary (`token`) value — the public seam for OAuth + single-input |
| 2504 | * callers that only ever need one value. */ |
no test coverage detected