(
row: ConnectionRow,
)
| 2855 | * not OAuth-backed, or holding no refresh token — so the caller keeps the |
| 2856 | * upstream's own auth failure instead of inventing one. */ |
| 2857 | const forceRefreshConnectionValues = ( |
| 2858 | row: ConnectionRow, |
| 2859 | ): Effect.Effect< |
| 2860 | Record<string, string | null> | null, |
| 2861 | StorageFailure | CredentialResolutionError |
| 2862 | > => |
| 2863 | Effect.gen(function* () { |
| 2864 | if (row.oauth_client == null || row.refresh_item_id == null) return null; |
| 2865 | const provider = credentialProviders.get(row.provider); |
| 2866 | if (!provider) return null; |
| 2867 | const access = yield* refreshConnectionToken(row, provider, "reactive"); |
| 2868 | return { [PRIMARY_INPUT_VARIABLE]: access }; |
| 2869 | }); |
| 2870 | |
| 2871 | /** The primary (`token`) value — the public seam for OAuth + single-input |
| 2872 | * callers that only ever need one value. */ |
no test coverage detected