feat: add downloadable release management for desktop client
- 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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user