import { EventEmitter2 } from '@nestjs/event-emitter'; import { UpdatePhase, UpdateStatusType } from '../system.constants'; export type InstallType = 'image' | 'npm'; export interface VersionInfo { current: string; latest: string | null; updateAvailable: boolean; updateType: 'patch' | 'minor' | 'major' | null; } export interface ReleaseAsset { name: string; downloadUrl: string; size: number; } export interface PanelVersionInfo { latest: string | null; assets: ReleaseAsset[]; } export interface UpdateStatusInfo { status: UpdateStatusType; phase: UpdatePhase | null; progressPercent: number | null; message: string | null; error: string | null; startedAt: Date | null; } export interface ReleaseNotes { version: string; body: string | null; url: string; publishedAt: string | null; } export declare class UpdateService { private readonly eventEmitter; private readonly logger; private readonly NPM_REGISTRY_URL; private readonly GITHUB_API_URL; private readonly GITHUB_VERSION_JSON_URL; private readonly GITHUB_PRERELEASE_API_URL; private cachedServerInfo; private cachedPanelInfo; private serverCacheTimestamp; private panelCacheTimestamp; private cachedReleaseNotes; private readonly CACHE_TTL_MS; private updateStatus; private updateLockAcquiredAt; private readonly UPDATE_LOCK_TIMEOUT_MS; private static readonly FETCH_TIMEOUT_MS; private static readonly IMAGE_BASE_DIR; private static readonly IMAGE_CURRENT_LINK; private static readonly IMAGE_MARKER_FILE; constructor(eventEmitter: EventEmitter2); getCurrentVersion(): string; getInstallType(): InstallType; getInstalledVersions(): string[]; getImageBaseDir(): string; getStatus(): UpdateStatusInfo; isUpdateInProgress(): boolean; acquireUpdateLock(): boolean; releaseUpdateLock(): void; setStatus(partial: Partial): void; checkServerUpdate(channel?: 'latest' | 'beta' | 'alpha'): Promise; private fetchLatestVersionFromGitHub; private fetchLatestVersionFromNpm; fetchReleaseNotes(version: string): Promise; fetchServerReleaseAsset(version: string): Promise; private fetchGitHubRelease; scheduledUpdateCheck(): Promise; invalidateServerCache(): void; checkPanelUpdate(prerelease?: boolean): Promise; fetchPanelRelease(version: string): Promise; private mapReleaseAssets; }