import type { AppVersions, NrfutilModules, NrfutilModuleVersion, UrlString } from './MetaFiles'; import { LOCAL, type SourceName } from './sources'; export interface AppSpec { name: string; source: SourceName; } interface BaseApp { name: string; displayName: string; description: string; iconPath: string; } interface Downloadable { source: SourceName; homepage?: UrlString; versions?: AppVersions; releaseNotes?: string; latestVersion: string; } interface Installed { currentVersion: string; engineVersion?: string; repositoryUrl?: UrlString; html?: string; nrfutil?: NrfutilModules; nrfutilCore?: NrfutilModuleVersion; fixedSize?: { width: number; height: number; }; installed: { publishTimestamp?: string; path: string; shasum?: string; }; } export interface LocalApp extends Installed, BaseApp { source: typeof LOCAL; } export interface InstalledDownloadableApp extends BaseApp, Installed, Downloadable { isWithdrawn: false; } export interface UninstalledDownloadableApp extends BaseApp, Downloadable { isWithdrawn: false; } export interface WithdrawnApp extends BaseApp, Installed, Downloadable { isWithdrawn: true; } export type DownloadableApp = InstalledDownloadableApp | UninstalledDownloadableApp | WithdrawnApp; export type LaunchableApp = LocalApp | InstalledDownloadableApp | WithdrawnApp; export type App = LocalApp | DownloadableApp; export declare const channel: { getDownloadableApps: string; installDownloadableApp: string; }; export declare const isDownloadable: (app?: App) => app is DownloadableApp; export declare const isInstalled: (app?: App) => app is LaunchableApp; export declare const isWithdrawn: (app?: App) => app is WithdrawnApp; export declare const isUpdatable: (app?: App) => app is InstalledDownloadableApp; export type GetDownloadableAppsResult = { apps: DownloadableApp[]; }; export declare const forRenderer: { registerGetDownloadableApps: (handler: (() => GetDownloadableAppsResult) | (() => Promise)) => void; registerInstallDownloadableApp: (handler: ((app: DownloadableApp, version?: string | undefined) => DownloadableApp) | ((app: DownloadableApp, version?: string | undefined) => Promise)) => void; }; export declare const inMain: { getDownloadableApps: () => Promise; installDownloadableApp: (app: DownloadableApp, version?: string | undefined) => Promise; isDownloadable: (app?: App) => app is DownloadableApp; isInstalled: (app?: App) => app is LaunchableApp; isWithdrawn: (app?: App) => app is WithdrawnApp; isUpdatable: (app?: App) => app is InstalledDownloadableApp; }; export {}; //# sourceMappingURL=apps.d.ts.map