import IPostMessage from '../../IPostMessage';
import IApp, { AppType } from './IApp';
/**
 * The `sos.management.app` API groups together methods for managing the signageOS application installed on the system.
 *
 * <details>
 *     <summary>App Management Capabilities</summary>
 * 		| Capability | Description |
 * 		|:------------|:-------------|
 * 		| `APP_UPGRADE` | If the signageOS application can upgrade itself to a specific version |
 *
 * 		If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
 * </details>
 */
export default class App implements IApp {
    private messagePrefix;
    private postMessage;
    /** @internal */
    constructor(messagePrefix: string, postMessage: IPostMessage<any>);
    /**
     * The `getType()` method returns the type of the platform the application is running on.
     *
     * :::info
     * - If you need to get a specific Android brand or Raspberry Pi model, use the `sos.management.firmware.getType()`.
     * - `default` type is always Emulator.
     * :::
     *
     * @returns {Promise<AppType>} Resolves to the type of the application platform.
     * @since 4.0.0
     *
     * @example
     * const appType = await sos.management.app.getType();
     * console.log(appType); // tizen, linux, webos, etc.
     */
    getType(): Promise<AppType>;
    /**
     * The `getVersion()` method returns the version of the Core App that is currently running on the device.
     *
     * @returns {Promise<string>} Resolves to the version of the Core application.
     * @since 4.0.0
     *
     * @example
     * const version = await sos.management.app.getVersion();
     * console.log(`Current application version is: ${version}`); // e.g. '4.0.0', '5.2.1', etc.
     */
    getVersion(): Promise<string>;
    /**
     * The `upgrade(version, baseUrl?)` method upgrades the signageOS application using version and baseUrl. Platform users can install the general
     * application version directly with passing just the version number. Optionally, the baseUrl can be passed as an argument to specify the server
     * where the application files are accessible.
     *
     * @param version The version of the application being installed.
     * @param [baseUrl='https://2.signageos.io'] Optional server URL where application files are located.
     * @returns {Promise<void>} A promise that resolves when the upgrade starts.
     * @throws {Error} If the upgrade fails.
     * @since 4.0.0
     *
     * @example // {@link https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/app-upgrade | How to upgrade application via applets}
     *
     * @example
     * await sos.management.app.upgrade('4.0.0', 'https://2.signageos.io')
     */
    upgrade(version: string, baseUrl?: string): Promise<void>;
    /**
     * The `upgrade(baseUrl, version)` does the same as `upgrade(version, baseUrl)`.
     *
     * @alias upgrade(version: string, baseUrl?: string)
     *
     * @param baseUrl The server URL where application files are located.
     * @param version The version of the application being installed.
     *
     * @since 4.0.0
     */
    upgrade(baseUrl: string, version: string): Promise<void>;
    /**
     * The `upgrade(appUri)` method upgrades the signageOS application with the provided `appUri`. Open users can upgrade the app passing FQN
     * URI where the application's main file is located.
     *
     * This file type/extension differs for every platform. E.g.:
     * - SSSP: http://example.com/apps/sssp_config.xml or http://example.com/apps/ApplicationName.zip
     * - Tizen: http://example.com/apps/sssp_config.xml or http://example.com/apps/ApplicationName.wgt
     * - Webos 1, 2: http://example.com/apps/ApplicationName.zip
     * - Webos 3+: http://example.com/apps/ApplicationName.ipk
     * - Brightsign: http://example.com/apps/ApplicationName.zip
     * - Linux: http://example.com/apps/ApplicationName.apk
     * - Android: http://example.com/apps/ApplicationName.apk
     * - ChromeOS: Not supported
     *
     * :::tip
     * Check our latest versions in our [changelogs](https://docs.signageos.io/hc/en-us/sections/4409161443730-Core-Apps).
     * :::
     *
     * @param appUri FQN uri where the application's main file is located.
     * @returns {Promise<void>} A promise that resolves when the upgrade starts.
     * @throws {Error} If the upgrade fails.
     * @since 4.0.0
     *
     * @example // {@link https://github.com/signageos/applet-examples/tree/master/examples/management-js-api/app-upgrade | How to upgrade application via applets}
     *
     * @example
     * // Upgrade the application to a specific version
     * await sos.management.app.upgrade('http://example.com/apps/ApplicationName.zip')
     *  .then(() => {
     * 		console.log('Application upgrade started successfully.');
     *  })
     *  .catch((error) => {
     * 		console.error('Failed to start application upgrade:', error);
     *  });
     */
    upgrade(appUri: string): Promise<void>;
    private getMessage;
}
