(
row: ConnectionRow,
)
| 2024 | * not OAuth-backed, or holding no refresh token — so the caller keeps the |
| 2025 | * upstream's own auth failure instead of inventing one. */ |
| 2026 | const forceRefreshConnectionValues = ( |
| 2027 | row: ConnectionRow, |
| 2028 | ): Effect.Effect< |
| 2029 | Record<string, string | null> | null, |
| 2030 | StorageFailure | CredentialResolutionError |
| 2031 | > => |
| 2032 | Effect.gen(function* () { |
| 2033 | if (row.oauth_client == null || row.refresh_item_id == null) return null; |
| 2034 | const provider = credentialProviders.get(row.provider); |
| 2035 | if (!provider) return null; |
| 2036 | const access = yield* refreshConnectionToken(row, provider, "reactive"); |
| 2037 | return { [PRIMARY_INPUT_VARIABLE]: access }; |
| 2038 | }); |
| 2039 | |
| 2040 | /** The primary (`token`) value — the public seam for OAuth + single-input |
| 2041 | * callers that only ever need one value. */ |
no test coverage detected