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<import("@todesktop/client-electron-updater-types").UpdateCheckResult>;
/**
 * 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<import("@todesktop/client-electron-updater-types").UpdateCheckResult>;
/**
 * 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<void>;
declare type QuitAndInstallParams = Parameters<AppUpdater["quitAndInstall"]>;
declare type QuitAndInstallOptions = {
    isSilent?: QuitAndInstallParams[0];
    isForceRunAfter?: QuitAndInstallParams[1];
};
/**
 * Checks if the auto updater is active.
 *
 * @public
 */
export declare function isUpdaterActive(): Promise<boolean>;
/**
 * Start downloading update manually. You can use this method if `autoDownload` option is set to `false`.
 *
 * @public
 */
export declare function downloadUpdate(): Promise<string[]>;
/**
 * 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<boolean>;
/**
 * *GitHub provider only.* Get all release notes (from current version to latest), not just the latest.
 *
 * @public
 */
export declare function getAllowPrerelease(): Promise<boolean>;
/**
 * Whether to automatically download an update.
 *
 * @public
 */
export declare function getAutoDownload(): Promise<boolean>;
/**
 * Whether to automatically install a downloaded update on app quit (if `quitAndInstall` was not called before).
 *
 * @public
 */
export declare function getAutoInstallOnAppQuit(): Promise<boolean>;
/**
 * 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<string>;
/**
 * @public
 */
export declare type ElectronUpdaterEvents = NamespaceEvents<AppUpdaterEvents & {
    error: (error: string) => 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: <E extends keyof AppUpdaterEvents>(eventName: E, callback: NamespaceEvents<AppUpdaterEvents & {
    error: (error: string) => void;
}>[E], args_0?: {
    ref?: import("@todesktop/client-util").InstanceRefObject;
    preventDefault?: boolean;
}) => Promise<() => Promise<void>>;
/**
 * Unsubscribes all electronUpdater listeners from a target event.
 *
 * @param options - eventName: The event name to unsubscribe from;
 * @public
 */
export declare const removeAllListeners: <E extends keyof AppUpdaterEvents>(eventName: E, args_0?: {
    ref?: import("@todesktop/client-util").InstanceRefObject;
}) => Promise<void>;
export {};
