(
row: ConnectionRow,
)
| 1782 | * not OAuth-backed, or holding no refresh token — so the caller keeps the |
| 1783 | * upstream's own auth failure instead of inventing one. */ |
| 1784 | const forceRefreshConnectionValues = ( |
| 1785 | row: ConnectionRow, |
| 1786 | ): Effect.Effect< |
| 1787 | Record<string, string | null> | null, |
| 1788 | StorageFailure | CredentialResolutionError |
| 1789 | > => |
| 1790 | Effect.gen(function* () { |
| 1791 | if (row.oauth_client == null || row.refresh_item_id == null) return null; |
| 1792 | const provider = credentialProviders.get(row.provider); |
| 1793 | if (!provider) return null; |
| 1794 | const access = yield* refreshConnectionToken(row, provider, "reactive"); |
| 1795 | return { [PRIMARY_INPUT_VARIABLE]: access }; |
| 1796 | }); |
| 1797 | |
| 1798 | /** The primary (`token`) value — the public seam for OAuth + single-input |
| 1799 | * callers that only ever need one value. */ |
no test coverage detected