Clears the version cache for a specific hostname or all hostnames.
Optionalhostname: string
Optional hostname to clear. If omitted, clears all cached versions.
Discovers the API version for a given hostname.
Makes a GET request to https://{hostname}/api/versions and returns the latest
compatible version. Results are cached per hostname; the cache entry is removed
on failure so the next call retries.
The TrueNAS system hostname (e.g., "truenas.local")
Observable that emits the selected ApiVersion
Discovers available API versions from TrueNAS systems.
Performs a
fetchGET to the/api/versionsendpoint and:This is the framework-agnostic replacement for the app's Angular
HttpClientservice. Becausefetchresolves (rather than rejects) on non-2xx responses and throws aTypeErroron network/CORS/unreachable failures, the error contract differs from the original: a network/CORS/unreachable failure surfaces as a VersionDiscoveryNetworkError — the sentinel the client factory keys on for its CORS fallback (replacing the oldHttpErrorResponse.status === 0check).