(
row: ConnectionRow,
)
| 2998 | * not OAuth-backed, or holding no refresh token — so the caller keeps the |
| 2999 | * upstream's own auth failure instead of inventing one. */ |
| 3000 | const forceRefreshConnectionValues = ( |
| 3001 | row: ConnectionRow, |
| 3002 | ): Effect.Effect< |
| 3003 | Record<string, string | null> | null, |
| 3004 | StorageFailure | CredentialResolutionError |
| 3005 | > => |
| 3006 | Effect.gen(function* () { |
| 3007 | if (row.oauth_client == null || row.refresh_item_id == null) return null; |
| 3008 | const provider = credentialProviders.get(row.provider); |
| 3009 | if (!provider) return null; |
| 3010 | const access = yield* refreshConnectionToken(row, provider, "reactive"); |
| 3011 | return { [PRIMARY_INPUT_VARIABLE]: access }; |
| 3012 | }); |
| 3013 | |
| 3014 | /** The primary (`token`) value — the public seam for OAuth + single-input |
| 3015 | * callers that only ever need one value. */ |
no test coverage detected