(
row: ConnectionRow,
)
| 3039 | * not OAuth-backed, or holding no refresh token — so the caller keeps the |
| 3040 | * upstream's own auth failure instead of inventing one. */ |
| 3041 | const forceRefreshConnectionValues = ( |
| 3042 | row: ConnectionRow, |
| 3043 | ): Effect.Effect< |
| 3044 | Record<string, string | null> | null, |
| 3045 | StorageFailure | CredentialResolutionError |
| 3046 | > => |
| 3047 | Effect.gen(function* () { |
| 3048 | if (row.oauth_client == null || row.refresh_item_id == null) return null; |
| 3049 | const provider = credentialProviders.get(row.provider); |
| 3050 | if (!provider) return null; |
| 3051 | const access = yield* refreshConnectionToken(row, provider, "reactive"); |
| 3052 | return { [PRIMARY_INPUT_VARIABLE]: access }; |
| 3053 | }); |
| 3054 | |
| 3055 | /** The primary (`token`) value — the public seam for OAuth + single-input |
| 3056 | * callers that only ever need one value. */ |
no test coverage detected