Skip to content

armgit / uzu

Public Imported from GitHub
0

A high-performance inference engine for AI models

662 B
Raw Blame
import type { UpdateStatus } from "@/types/update";

export type CheckForUpdateResult = {
  currentVersion: string;
  latestVersion?: string;
  hasUpdate: boolean;
  hasDownloadable?: boolean;
  reason?: string;
};

export type UpdaterService = {
  checkForUpdate(): Promise<CheckForUpdateResult>;
  getUpdateStatus(): Promise<UpdateStatus>;
  startUpdateDownload(version: string): Promise<{ ok: boolean; error?: string }>;
  applyUpdate(): Promise<{ ok: boolean; error?: string }>;
  onUpdateDownloadDone(cb: (payload: { version: string }) => void): () => void;
  onUpdateDownloadError(cb: (payload: { version: string; error: string }) => void): () => void;
};