feat: add downloadable release management for desktop client
Frontend CI / Frontend (push) Successful in 4m1s
Backend CI / Backend (push) Failing after 8m51s

- Extend DesktopClientReleaseCheckResponse with platform, arch, and channel fields.
- Introduce DesktopClientDownloadableRelease and DesktopClientDownloadableReleaseListResponse interfaces for managing downloadable releases.
- Implement ListDownloadable method in DesktopClientReleaseService to retrieve downloadable releases based on the specified channel.
- Update DesktopClientReleaseCheckResult to include platform, arch, and channel information.
- Add resolveInstallerDownloadURL method to handle download URL resolution for releases.
- Create new endpoint in DesktopReleaseHandler for listing downloadable releases.
- Update router to include the new downloadable releases route.
- Enhance tests to cover the new functionality for resolving download URLs and listing downloadable releases.
This commit is contained in:
2026-05-31 19:28:35 +08:00
parent de9c52be6d
commit d6866cd85b
8 changed files with 1419 additions and 201 deletions
+27 -1
View File
@@ -145,6 +145,9 @@ export interface DesktopClientReleaseCheckResponse {
update_available: boolean
latest_version: string
current_version: string
platform?: 'darwin' | 'win32' | 'linux' | string
arch?: 'universal' | 'x64' | 'arm64' | 'ia32' | string
channel?: string
min_supported_version: string | null
force_update: boolean
download_source: 'oss' | 'custom'
@@ -164,10 +167,33 @@ export interface DesktopClientReleaseCheckResponse {
}
export interface DesktopClientReleaseDownloadURLResponse {
download_url: string
download_url?: string | null
expires_in?: number | null
}
export interface DesktopClientDownloadableRelease {
id: number
platform: 'darwin' | 'win32' | 'linux' | string
arch: 'universal' | 'x64' | 'arm64' | 'ia32' | string
channel: string
version: string
download_url?: string | null
file_name?: string | null
file_size_bytes?: number | null
sha256?: string | null
release_notes?: string | null
published_at?: string | null
updated_at: string
force_update: boolean
min_supported_version?: string | null
download_source: 'oss' | 'custom' | string
oss_object_key?: string | null
}
export interface DesktopClientDownloadableReleaseListResponse {
items: DesktopClientDownloadableRelease[]
}
export type DesktopClientUpdateStage =
| 'idle'
| 'checking'