import type * as OpenFin from '../../OpenFin'; import { Base } from '../base'; /** * @PORTED * @typedef {object} ApplicationOptions * @summary Application creation options. * @desc This is the options object required by {@link Application.start Application.start}. * * The following options are required: * * `uuid` is required in the app manifest as well as by {@link Application.start Application.start} * * `name` is optional in the app manifest but required by {@link Application.start Application.start} * * `url` is optional in both the app manifest {@link Application.start Application.start} and but is usually given * (defaults to `"about:blank"` when omitted). * * _This jsdoc typedef mirrors the `ApplicationOption` TypeScript interface in `@types/openfin`._ * * **IMPORTANT NOTE:** * This object inherits all the properties of the window creation {@link Window~options options} object, * which will take priority over those of the same name that may be provided in `mainWindowOptions`. * * @property {boolean} [disableIabSecureLogging=false] * When set to `true` it will disable IAB secure logging for the app. * * @property {string} [loadErrorMessage="There was an error loading the application."] * An error message to display when the application (launched via manifest) fails to load. * A dialog box will be launched with the error message just before the runtime exits. * Load fails such as failed DNS resolutions or aborted connections as well as cancellations, _e.g.,_ `window.stop()`, * will trigger this dialog. * Client response codes such as `404 Not Found` are not treated as fails as they are valid server responses. * * @property {Window~options} [mainWindowOptions] * The options of the main window of the application. * For a description of these options, click the link (in the Type column). * * @property {number} [maxViewPoolSize=1000] * Platforms Only. The maximum number of "detached" or "pooled" Views that can exist in the Platform before being closed. * If you do not wish for views to be pooled on your platform, set this property to zero. * * @property {boolean} [preventQuitOnLastWindowClosed=false] * Platforms Only. Prevent the Platform Provider from quitting automatically when the last Platform Window is closed. * Note: if the Platform Provider is showing, it won't close automatically. * If you want a hidden Platform Provider to remain open after the last Platform Window has been closed, set this property to true. * * @property {string} [name] * The name of the application (and the application's main window). * * If provided, _must_ match `uuid`. * * @property {boolean} [nonPersistent=false] * A flag to configure the application as non-persistent. * Runtime exits when there are no persistent apps running. * * @property {boolean} [plugins=false] * Enable Flash at the application level. * * @property {boolean} [spellCheck=false] * Enable spell check at the application level. * * @property {string} [url="about:blank"] * The url to the application (specifically the application's main window). * * @property {boolean} [enableJumpList=false] * Enables the use of the Jumplists API and the 'pin to taskbar' functionality. * Only relevant in Windows. * * @property {string} uuid * The _Unique Universal Identifier_ (UUID) of the application, unique within the set of all other applications * running in the OpenFin Runtime. * * Note that `name` and `uuid` must match. * * @property {boolean} [webSecurity=true] * When set to `false` it will disable the same-origin policy for the app. */ /** * @lends Application */ export default class ApplicationModule extends Base { /** * Asynchronously returns an Application object that represents an existing application. * @param { Identity } identity * @return {Promise.} * @tutorial Application.wrap * @static */ wrap(identity: OpenFin.ApplicationIdentity): Promise; /** * Synchronously returns an Application object that represents an existing application. * @param { Identity } identity * @return {Application} * @tutorial Application.wrapSync * @static */ wrapSync(identity: OpenFin.ApplicationIdentity): OpenFin.Application; private _create; /** * DEPRECATED method to create a new Application. Use {@link Application.start} instead. * @param { ApplicationOptions } appOptions * @return {Promise.} * @tutorial Application.create * @ignore */ create(appOptions: OpenFin.ApplicationCreationOptions): Promise; /** * Creates and starts a new Application. * @param { ApplicationOptions } appOptions * @return {Promise.} * @tutorial Application.start * @static */ start(appOptions: OpenFin.ApplicationCreationOptions): Promise; /** * Asynchronously starts a batch of applications given an array of application identifiers and manifestUrls. * Returns once the RVM is finished attempting to launch the applications. * @param { Array. } applications * @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use. * @return {Promise.} * @static * @tutorial Application.startManyManifests * @experimental */ startManyManifests(applications: Array, opts?: OpenFin.RvmLaunchOptions): Promise; /** * Asynchronously returns an Application object that represents the current application * @return {Promise.} * @tutorial Application.getCurrent * @static */ getCurrent(): Promise; /** * Synchronously returns an Application object that represents the current application * @return {Application} * @tutorial Application.getCurrentSync * @static */ getCurrentSync(): OpenFin.Application; /** * Retrieves application's manifest and returns a running instance of the application. * @param {string} manifestUrl - The URL of app's manifest. * @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use. * @return {Promise.} * @tutorial Application.startFromManifest * @static */ startFromManifest(manifestUrl: string, opts?: OpenFin.RvmLaunchOptions): Promise; createFromManifest(manifestUrl: string): Promise; private _createFromManifest; }