(
row: ConnectionRow,
)
| 2685 | * not OAuth-backed, or holding no refresh token — so the caller keeps the |
| 2686 | * upstream's own auth failure instead of inventing one. */ |
| 2687 | const forceRefreshConnectionValues = ( |
| 2688 | row: ConnectionRow, |
| 2689 | ): Effect.Effect< |
| 2690 | Record<string, string | null> | null, |
| 2691 | StorageFailure | CredentialResolutionError |
| 2692 | > => |
| 2693 | Effect.gen(function* () { |
| 2694 | if (row.oauth_client == null || row.refresh_item_id == null) return null; |
| 2695 | const provider = credentialProviders.get(row.provider); |
| 2696 | if (!provider) return null; |
| 2697 | const access = yield* refreshConnectionToken(row, provider, "reactive"); |
| 2698 | return { [PRIMARY_INPUT_VARIABLE]: access }; |
| 2699 | }); |
| 2700 | |
| 2701 | /** The primary (`token`) value — the public seam for OAuth + single-input |
| 2702 | * callers that only ever need one value. */ |
no test coverage detected