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