(
row: ConnectionRow,
)
| 2119 | * not OAuth-backed, or holding no refresh token — so the caller keeps the |
| 2120 | * upstream's own auth failure instead of inventing one. */ |
| 2121 | const forceRefreshConnectionValues = ( |
| 2122 | row: ConnectionRow, |
| 2123 | ): Effect.Effect< |
| 2124 | Record<string, string | null> | null, |
| 2125 | StorageFailure | CredentialResolutionError |
| 2126 | > => |
| 2127 | Effect.gen(function* () { |
| 2128 | if (row.oauth_client == null || row.refresh_item_id == null) return null; |
| 2129 | const provider = credentialProviders.get(row.provider); |
| 2130 | if (!provider) return null; |
| 2131 | const access = yield* refreshConnectionToken(row, provider, "reactive"); |
| 2132 | return { [PRIMARY_INPUT_VARIABLE]: access }; |
| 2133 | }); |
| 2134 | |
| 2135 | /** The primary (`token`) value — the public seam for OAuth + single-input |
| 2136 | * callers that only ever need one value. */ |
no test coverage detected