import type { DownloadNotification, AppUpdater, AppUpdaterEvents } from "@todesktop/client-electron-updater-types/dist/AppUpdater.js"; import { type NamespaceEvents } from "./utils.js"; /** * Asks the server whether there is an update. * @public */ export declare function checkForUpdates(): Promise; /** * Checks if there's an update and notifies the user. * * @param options - title: title of the notification; body: body of the notification; * @public */ export declare function checkForUpdatesAndNotify(downloadNotification?: DownloadNotification): Promise; /** * Restarts the app and installs the update after it has been downloaded. It should only be called after update-downloaded has been emitted. * * @param options - isSilent: *windows-only* Runs the installer in silent mode. Defaults to `false`; isForceRunAfter: Run the app after finish even on silent install. Not applicable for macOS. Ignored if `isSilent` is set to `false`. * @public */ export declare function quitAndInstall(options?: QuitAndInstallOptions): Promise; declare type QuitAndInstallParams = Parameters; declare type QuitAndInstallOptions = { isSilent?: QuitAndInstallParams[0]; isForceRunAfter?: QuitAndInstallParams[1]; }; /** * Checks if the auto updater is active. * * @public */ export declare function isUpdaterActive(): Promise; /** * Start downloading update manually. You can use this method if `autoDownload` option is set to `false`. * * @public */ export declare function downloadUpdate(): Promise; /** * Whether to allow version downgrade (when a user from the beta channel wants to go back to the stable channel). * * Taken in account only if channel differs (pre-release version component in terms of semantic versioning). * * @public */ export declare function getAllowDowngrade(): Promise; /** * *GitHub provider only.* Get all release notes (from current version to latest), not just the latest. * * @public */ export declare function getAllowPrerelease(): Promise; /** * Whether to automatically download an update. * * @public */ export declare function getAutoDownload(): Promise; /** * Whether to automatically install a downloaded update on app quit (if `quitAndInstall` was not called before). * * @public */ export declare function getAutoInstallOnAppQuit(): Promise; /** * Get the update channel. Not applicable for GitHub. Doesn't return `channel` from the update configuration, only if was previously set. * * @public */ export declare function getChannel(): Promise; /** * @public */ export declare type ElectronUpdaterEvents = NamespaceEvents void; }>; /** * Subcribes to an electronUpdater event. * * @param eventName - The event name to subscribe to. * @param callback - The callback function to execute when the event occurs. * @returns unsubscribe callback. * @public */ export declare const on: (eventName: E, callback: NamespaceEvents void; }>[E], args_0?: { ref?: import("@todesktop/client-util").InstanceRefObject; preventDefault?: boolean; }) => Promise<() => Promise>; /** * Unsubscribes all electronUpdater listeners from a target event. * * @param options - eventName: The event name to unsubscribe from; * @public */ export declare const removeAllListeners: (eventName: E, args_0?: { ref?: import("@todesktop/client-util").InstanceRefObject; }) => Promise; export {};