From 2bf22171c788b20878a79633bd1c994905209663 Mon Sep 17 00:00:00 2001
From: licui
Date: Fri, 26 Oct 2018 11:23:48 -0400
Subject: [PATCH 01/13] add 34 folder
---
.../v34/_v2/api/application/application.d.ts | 223 ++
types/openfin/v34/_v2/api/base.d.ts | 43 +
.../v34/_v2/api/clipboard/clipboard.d.ts | 70 +
.../v34/_v2/api/clipboard/write-request.d.ts | 12 +
.../external-application.d.ts | 36 +
types/openfin/v34/_v2/api/fin.d.ts | 27 +
types/openfin/v34/_v2/api/frame/frame.d.ts | 51 +
.../v34/_v2/api/global-hotkey/index.d.ts | 33 +
.../_v2/api/interappbus/channel/channel.d.ts | 31 +
.../_v2/api/interappbus/channel/client.d.ts | 6 +
.../_v2/api/interappbus/channel/index.d.ts | 33 +
.../_v2/api/interappbus/channel/provider.d.ts | 13 +
.../v34/_v2/api/interappbus/interappbus.d.ts | 80 +
.../_v2/api/notification/notification.d.ts | 71 +
.../v34/_v2/api/system/application.d.ts | 4 +
.../v34/_v2/api/system/clearCacheOption.d.ts | 6 +
types/openfin/v34/_v2/api/system/cookie.d.ts | 8 +
.../_v2/api/system/crashReporterOption.d.ts | 4 +
.../v34/_v2/api/system/download-asset.d.ts | 18 +
.../v34/_v2/api/system/download-preload.d.ts | 8 +
types/openfin/v34/_v2/api/system/entity.d.ts | 11 +
.../v34/_v2/api/system/external-process.d.ts | 22 +
.../v34/_v2/api/system/host-specs.d.ts | 22 +
types/openfin/v34/_v2/api/system/log.d.ts | 11 +
types/openfin/v34/_v2/api/system/monitor.d.ts | 39 +
types/openfin/v34/_v2/api/system/point.d.ts | 8 +
types/openfin/v34/_v2/api/system/process.d.ts | 15 +
types/openfin/v34/_v2/api/system/proxy.d.ts | 14 +
.../v34/_v2/api/system/registry-info.d.ts | 7 +
.../v34/_v2/api/system/runtime-info.d.ts | 7 +
types/openfin/v34/_v2/api/system/rvm.d.ts | 5 +
types/openfin/v34/_v2/api/system/system.d.ts | 475 ++++
types/openfin/v34/_v2/api/system/window.d.ts | 14 +
.../v34/_v2/api/window/bounds-changed.d.ts | 14 +
types/openfin/v34/_v2/api/window/bounds.d.ts | 9 +
.../v34/_v2/api/window/transition.d.ts | 24 +
types/openfin/v34/_v2/api/window/window.d.ts | 759 +++++++
.../v34/_v2/environment/environment.d.ts | 10 +
.../openfin/v34/_v2/environment/node-env.d.ts | 11 +
.../v34/_v2/environment/openfin-env.d.ts | 11 +
.../_v2/environment/openfin-renderer-api.d.ts | 6 +
types/openfin/v34/_v2/identity.d.ts | 4 +
types/openfin/v34/_v2/launcher/launcher.d.ts | 15 +
.../openfin/v34/_v2/launcher/nix-launch.d.ts | 14 +
types/openfin/v34/_v2/launcher/util.d.ts | 8 +
.../openfin/v34/_v2/launcher/win-launch.d.ts | 4 +
types/openfin/v34/_v2/main.d.ts | 11 +
types/openfin/v34/_v2/of-main.d.ts | 1 +
types/openfin/v34/_v2/transport/elipc.d.ts | 13 +
.../v34/_v2/transport/port-discovery.d.ts | 17 +
.../v34/_v2/transport/transport-errors.d.ts | 17 +
.../openfin/v34/_v2/transport/transport.d.ts | 48 +
.../openfin/v34/_v2/transport/websocket.d.ts | 14 +
types/openfin/v34/_v2/transport/wire.d.ts | 71 +
.../v34/_v2/util/normalize-config.d.ts | 3 +
types/openfin/v34/_v2/util/promises.d.ts | 5 +
types/openfin/v34/_v2/util/ref-counter.d.ts | 7 +
types/openfin/v34/index.d.ts | 1907 +++++++++++++++++
types/openfin/v34/openfin-tests.ts | 800 +++++++
types/openfin/v34/tsconfig.json | 81 +
types/openfin/v34/tslint.json | 18 +
61 files changed, 5329 insertions(+)
create mode 100644 types/openfin/v34/_v2/api/application/application.d.ts
create mode 100644 types/openfin/v34/_v2/api/base.d.ts
create mode 100644 types/openfin/v34/_v2/api/clipboard/clipboard.d.ts
create mode 100644 types/openfin/v34/_v2/api/clipboard/write-request.d.ts
create mode 100644 types/openfin/v34/_v2/api/external-application/external-application.d.ts
create mode 100644 types/openfin/v34/_v2/api/fin.d.ts
create mode 100644 types/openfin/v34/_v2/api/frame/frame.d.ts
create mode 100644 types/openfin/v34/_v2/api/global-hotkey/index.d.ts
create mode 100644 types/openfin/v34/_v2/api/interappbus/channel/channel.d.ts
create mode 100644 types/openfin/v34/_v2/api/interappbus/channel/client.d.ts
create mode 100644 types/openfin/v34/_v2/api/interappbus/channel/index.d.ts
create mode 100644 types/openfin/v34/_v2/api/interappbus/channel/provider.d.ts
create mode 100644 types/openfin/v34/_v2/api/interappbus/interappbus.d.ts
create mode 100644 types/openfin/v34/_v2/api/notification/notification.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/application.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/clearCacheOption.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/cookie.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/crashReporterOption.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/download-asset.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/download-preload.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/entity.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/external-process.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/host-specs.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/log.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/monitor.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/point.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/process.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/proxy.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/registry-info.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/runtime-info.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/rvm.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/system.d.ts
create mode 100644 types/openfin/v34/_v2/api/system/window.d.ts
create mode 100644 types/openfin/v34/_v2/api/window/bounds-changed.d.ts
create mode 100644 types/openfin/v34/_v2/api/window/bounds.d.ts
create mode 100644 types/openfin/v34/_v2/api/window/transition.d.ts
create mode 100644 types/openfin/v34/_v2/api/window/window.d.ts
create mode 100644 types/openfin/v34/_v2/environment/environment.d.ts
create mode 100644 types/openfin/v34/_v2/environment/node-env.d.ts
create mode 100644 types/openfin/v34/_v2/environment/openfin-env.d.ts
create mode 100644 types/openfin/v34/_v2/environment/openfin-renderer-api.d.ts
create mode 100644 types/openfin/v34/_v2/identity.d.ts
create mode 100644 types/openfin/v34/_v2/launcher/launcher.d.ts
create mode 100644 types/openfin/v34/_v2/launcher/nix-launch.d.ts
create mode 100644 types/openfin/v34/_v2/launcher/util.d.ts
create mode 100644 types/openfin/v34/_v2/launcher/win-launch.d.ts
create mode 100644 types/openfin/v34/_v2/main.d.ts
create mode 100644 types/openfin/v34/_v2/of-main.d.ts
create mode 100644 types/openfin/v34/_v2/transport/elipc.d.ts
create mode 100644 types/openfin/v34/_v2/transport/port-discovery.d.ts
create mode 100644 types/openfin/v34/_v2/transport/transport-errors.d.ts
create mode 100644 types/openfin/v34/_v2/transport/transport.d.ts
create mode 100644 types/openfin/v34/_v2/transport/websocket.d.ts
create mode 100644 types/openfin/v34/_v2/transport/wire.d.ts
create mode 100644 types/openfin/v34/_v2/util/normalize-config.d.ts
create mode 100644 types/openfin/v34/_v2/util/promises.d.ts
create mode 100644 types/openfin/v34/_v2/util/ref-counter.d.ts
create mode 100644 types/openfin/v34/index.d.ts
create mode 100644 types/openfin/v34/openfin-tests.ts
create mode 100644 types/openfin/v34/tsconfig.json
create mode 100644 types/openfin/v34/tslint.json
diff --git a/types/openfin/v34/_v2/api/application/application.d.ts b/types/openfin/v34/_v2/api/application/application.d.ts
new file mode 100644
index 0000000000..616501834d
--- /dev/null
+++ b/types/openfin/v34/_v2/api/application/application.d.ts
@@ -0,0 +1,223 @@
+import { EmitterBase, Base, Reply, RuntimeEvent } from '../base';
+import { Identity } from '../../identity';
+import { _Window } from '../window/window';
+import { Point } from '../system/point';
+import { MonitorInfo } from '../system/monitor';
+import Transport from '../../transport/transport';
+import Bounds from '../window/bounds';
+export interface TrayIconClickReply extends Point, Reply<'application', 'tray-icon-clicked'> {
+ button: number;
+ monitorInfo: MonitorInfo;
+}
+export interface ApplicationInfo {
+ initialOptions: object;
+ launchMode: string;
+ manifest: object;
+ manifestUrl: string;
+ parentUuid?: string;
+ runtime: object;
+}
+export declare class NavigationRejectedReply extends Reply<'window-navigation-rejected', void> {
+ sourceName: string;
+ url: string;
+}
+export interface ConfigInterface {
+ desktop?: boolean;
+ startMenu?: boolean;
+ systemStartup?: boolean;
+}
+export interface TrayInfo {
+ bounds: Bounds;
+ monitorInfo: MonitorInfo;
+ x: number;
+ y: number;
+}
+export default class ApplicationModule extends Base {
+ /**
+ * Returns an Application object that represents an existing application.
+ * @param { Identity } indentity
+ * @return {Promise.}
+ * @tutorial Application.wrap
+ */
+ wrap(identity: Identity): Promise;
+ /**
+ * Creates a new Application.
+ * @param {*} appOptions
+ * @return {Promise.}
+ * @tutorial Application.create
+ */
+ create(appOptions: any): Promise;
+ /**
+ * Returns an Application object that represents the current application
+ * @return {Promise.}
+ * @tutorial Application.getCurrent
+ */
+ getCurrent(): Promise;
+ /**
+ * Retrieves application's manifest and returns a wrapped application.
+ * @param {string} manifestUrl - The URL of app's manifest.
+ * @return {Promise.}
+ * @tutorial Application.createFromManifest
+ */
+ createFromManifest(manifestUrl: string): Promise;
+}
+/**
+ * @classdesc An object representing an application. Allows the developer to create,
+ * execute, show/close an application as well as listen to application events.
+ * @class
+ */
+export declare class Application extends EmitterBase {
+ identity: Identity;
+ _manifestUrl?: string;
+ private window;
+ constructor(wire: Transport, identity: Identity);
+ protected runtimeEventComparator: (listener: RuntimeEvent) => boolean;
+ private windowListFromIdentityList;
+ /**
+ * Determines if the application is currently running.
+ * @return {Promise.}
+ * @tutorial Application.isRunning
+ */
+ isRunning(): Promise;
+ /**
+ * Closes the application and any child windows created by the application.
+ * @param { boolean } [force = false] Close will be prevented from closing when force is false and
+ * ‘close-requested’ has been subscribed to for application’s main window.
+ * @return {Promise.}
+ * @tutorial Application.close
+ */
+ close(force?: boolean): Promise;
+ /**
+ * Retrieves an array of wrapped fin.Windows for each of the application’s child windows.
+ * @return {Promise.Array.<_Window>}
+ * @tutorial Application.getChildWindows
+ */
+ getChildWindows(): Promise>;
+ /**
+ * Retrieves an array of active window groups for all of the application's windows. Each group is
+ * represented as an array of wrapped fin.Windows.
+ * @return {Promise.Array.Array.<_Window>}
+ * @tutorial Application.getGroups
+ */
+ getGroups(): Promise>>;
+ /**
+ * Retrieves the JSON manifest that was used to create the application. Invokes the error callback
+ * if the application was not created from a manifest.
+ * @return {Promise.}
+ * @tutorial Application.getManifest
+ */
+ getManifest(): Promise;
+ /**
+ * Retrieves UUID of the application that launches this application. Invokes the error callback
+ * if the application was created from a manifest.
+ * @return {Promise.}
+ * @tutorial Application.getParentUuid
+ */
+ getParentUuid(): Promise;
+ /**
+ * Retrieves current application's shortcut configuration.
+ * @return {Promise.}
+ * @tutorial Application.getShortcuts
+ */
+ getShortcuts(): Promise;
+ /**
+ * Returns an instance of the main Window of the application
+ * @return {Promise.<_Window>}
+ * @tutorial Application.getWindow
+ */
+ getWindow(): Promise<_Window>;
+ /**
+ * Manually registers a user with the licensing service. The only data sent by this call is userName and appName.
+ * @param { string } userName - username to be passed to the RVM.
+ * @param { string } appName - app name to be passed to the RVM.
+ * @return {Promise.}
+ * @tutorial Application.registerUser
+ */
+ registerUser(userName: string, appName: string): Promise;
+ /**
+ * Removes the application’s icon from the tray.
+ * @return {Promise.}
+ * @tutorial Application.removeTrayIcon
+ */
+ removeTrayIcon(): Promise;
+ /**
+ * Restarts the application.
+ * @return {Promise.}
+ * @tutorial Application.restart
+ */
+ restart(): Promise;
+ /**
+ * Runs the application. When the application is created, run must be called.
+ * @return {Promise.}
+ * @tutorial Application.run
+ */
+ run(): Promise;
+ /**
+ * Instructs the RVM to schedule one restart of the application.
+ * @return {Promise.}
+ * @tutorial Application.scheduleRestart
+ */
+ scheduleRestart(): Promise;
+ /**
+ * Adds a customizable icon in the system tray and notifies the application when clicked.
+ * @param { string } iconUrl Image URL to be used as the icon
+ * @return {Promise.}
+ * @tutorial Application.setTrayIcon
+ */
+ setTrayIcon(iconUrl: string): Promise;
+ /**
+ * Sets new application's shortcut configuration.
+ * @param { Object } config New application's shortcut configuration.
+ * @param {Boolean} [config.desktop] - Enable/disable desktop shortcut.
+ * @param {Boolean} [config.startMenu] - Enable/disable start menu shortcut.
+ * @param {Boolean} [config.systemStartup] - Enable/disable system startup shortcut.
+ * @return {Promise.}
+ * @tutorial Application.setShortcuts
+ */
+ setShortcuts(config: ConfigInterface): Promise;
+ /**
+ * @summary Retrieves information about the system tray.
+ * @desc The only information currently returned is the position and dimensions.
+ * @return {Promise.}
+ * @tutorial Application.getTrayIconInfo
+ */
+ getTrayIconInfo(): Promise;
+ /**
+ * Closes the application by terminating its process.
+ * @return {Promise.}
+ * @tutorial Application.terminate
+ */
+ terminate(): Promise;
+ /**
+ * Waits for a hanging application. This method can be called in response to an application
+ * "not-responding" to allow the application to continue and to generate another "not-responding"
+ * message after a certain period of time.
+ * @return {Promise.}
+ * @ignore
+ */
+ wait(): Promise;
+ /**
+ * Retrieves information about the application.
+ * @return {Promise.}
+ * @tutorial Application.getInfo
+ */
+ getInfo(): Promise;
+}
+export interface Application {
+ on(type: 'closed', listener: (data: Reply<'application', 'closed'>) => void): Promise;
+ on(type: 'initialized', listener: (data: Reply<'application', 'initialized'>) => void): Promise;
+ on(type: 'connected', listener: (data: Reply<'application', 'connected'>) => void): Promise;
+ on(type: 'crashed', listener: (data: Reply<'application', 'crashed'>) => void): Promise;
+ on(type: 'error', listener: (data: Reply<'application', 'error'>) => void): Promise;
+ on(type: 'not-responding', listener: (data: Reply<'application', 'not-responding'>) => void): Promise;
+ on(type: 'out-of-memory', listener: (data: Reply<'application', 'out-of-memory'>) => void): Promise;
+ on(type: 'responding', listener: (data: Reply<'application', 'responding'>) => void): Promise;
+ on(type: 'started', listener: (data: Reply<'application', 'started'>) => void): Promise;
+ on(type: 'run-requested', listener: (data: Reply<'application', 'run-requested'>) => void): Promise;
+ on(type: 'window-navigation-rejected', listener: (data: NavigationRejectedReply) => void): Promise;
+ on(type: 'window-created', listener: (data: Reply<'application', 'window-created'>) => void): Promise;
+ on(type: 'window-closed', listener: (data: Reply<'application', 'window-closed'>) => void): Promise;
+ on(type: 'tray-icon-clicked', listener: (data: TrayIconClickReply) => void): Promise;
+ on(type: 'removeListener', listener: (eventType: string) => void): Promise;
+ on(type: 'newListener', listener: (eventType: string) => void): Promise;
+}
diff --git a/types/openfin/v34/_v2/api/base.d.ts b/types/openfin/v34/_v2/api/base.d.ts
new file mode 100644
index 0000000000..1f17e1f24f
--- /dev/null
+++ b/types/openfin/v34/_v2/api/base.d.ts
@@ -0,0 +1,43 @@
+///
+import Transport, { Message } from '../transport/transport';
+import { Identity } from '../identity';
+import { EventEmitter } from 'events';
+export interface RuntimeEvent extends Identity {
+ topic: string;
+ type: string | symbol;
+}
+export declare class Base {
+ wire: Transport;
+ constructor(wire: Transport);
+ private _topic;
+ protected topic: string;
+ readonly me: Identity;
+ protected isNodeEnvironment: () => boolean;
+ protected isOpenFinEnvironment: () => boolean;
+ protected runtimeEventComparator: (listener: RuntimeEvent) => boolean;
+}
+export declare class EmitterBase extends Base {
+ protected identity: Identity;
+ protected emitter: EventEmitter;
+ listeners: (event: string | symbol) => Function[];
+ listenerCount: (type: string | symbol) => number;
+ constructor(wire: Transport);
+ emit: (eventName: string | symbol, ...args: any[]) => void;
+ protected onmessage: (message: Message) => boolean;
+ protected registerEventListener: (listener: RuntimeEvent) => Promise>;
+ protected deregisterEventListener: (listener: RuntimeEvent) => Promise>;
+ on(eventType: string, listener: (...args: any[]) => void): Promise;
+ addListener: (eventType: string, listener: (...args: any[]) => void) => Promise;
+ once(eventType: string, listener: (...args: any[]) => void): Promise;
+ prependListener(eventType: string, listener: (...args: any[]) => void): Promise;
+ prependOnceListener(eventType: string, listener: (...args: any[]) => void): Promise;
+ removeListener(eventType: string, listener: (...args: any[]) => void): Promise;
+ protected deregisterAllListeners: (eventType: string | symbol) => Promise>;
+ removeAllListeners(eventType?: string): Promise;
+}
+export declare class Reply implements Identity {
+ topic: TOPIC;
+ type: TYPE;
+ uuid: string;
+ name?: string;
+}
diff --git a/types/openfin/v34/_v2/api/clipboard/clipboard.d.ts b/types/openfin/v34/_v2/api/clipboard/clipboard.d.ts
new file mode 100644
index 0000000000..11b466dea0
--- /dev/null
+++ b/types/openfin/v34/_v2/api/clipboard/clipboard.d.ts
@@ -0,0 +1,70 @@
+import { Base } from '../base';
+import { WriteRequestType, WriteAnyRequestType } from './write-request';
+/**
+ * WriteRequestType interface
+ * @typedef { Object } WriteRequestType
+ * @property { string } name The name of the running application
+ * @property { string } uuid The uuid of the running application
+ */
+/**
+ * The Clipboard API allows reading and writing to the clipboard in multiple formats.
+ * @namespace
+*/
+export default class Clipboard extends Base {
+ /**
+ * Writes data into the clipboard as plain text
+ * @param { WriteRequestType } writeObj This object is described in the WriteRequestType typeof
+ * @return {Promise.}
+ * @tutorial Clipboard.writeText
+ */
+ writeText(writeObj: WriteRequestType): Promise;
+ /**
+ * Read the content of the clipboard as plain text
+ * @param { string } type Clipboard Type
+ * @return {Promise.}
+ * @tutorial Clipboard.readText
+ */
+ readText(type?: string): Promise;
+ /**
+ * Writes data into the clipboard as Html
+ * @param { WriteRequestType } writeObj This object is described in the WriteRequestType typedef
+ * @return {Promise.}
+ * @tutorial Clipboard.writeHtml
+ */
+ writeHtml(writeObj: WriteRequestType): Promise;
+ /**
+ * Read the content of the clipboard as Html
+ * @param { string } type Clipboard Type
+ * @return {Promise.}
+ * @tutorial Clipboard.readHtml
+ */
+ readHtml(type?: string): Promise;
+ /**
+ * Writes data into the clipboard as Rtf
+ * @param { WriteRequestType } writeObj This object is described in the WriteRequestType typedef
+ * @return {Promise.}
+ * @tutorial Clipboard.writeRtf
+ */
+ writeRtf(writeObj: WriteRequestType): Promise;
+ /**
+ * Read the content of the clipboard as Rtf
+ * @param { string } type Clipboard Type
+ * @return {Promise.}
+ * @tutorial Clipboard.readRtf
+ */
+ readRtf(type?: string): Promise;
+ /**
+ * Writes data into the clipboard
+ * @param { WriteRequestType } writeObj This object is described in the WriteRequestType typedef
+ * @return {Promise.}
+ * @tutorial Clipboard.write
+ */
+ write(writeObj: WriteAnyRequestType): Promise;
+ /**
+ * Reads available formats for the clipboard type
+ * @param { string } type Clipboard Type
+ * @return {Promise.Array.}
+ * @tutorial Clipboard.getAvailableFormats
+ */
+ getAvailableFormats(type?: string): Promise>;
+}
diff --git a/types/openfin/v34/_v2/api/clipboard/write-request.d.ts b/types/openfin/v34/_v2/api/clipboard/write-request.d.ts
new file mode 100644
index 0000000000..a2fc5c333e
--- /dev/null
+++ b/types/openfin/v34/_v2/api/clipboard/write-request.d.ts
@@ -0,0 +1,12 @@
+export interface WriteRequestType {
+ data: string;
+ type?: string;
+}
+export interface WriteAnyRequestType {
+ data: {
+ text?: string;
+ html?: string;
+ rtf?: string;
+ };
+ type?: string;
+}
diff --git a/types/openfin/v34/_v2/api/external-application/external-application.d.ts b/types/openfin/v34/_v2/api/external-application/external-application.d.ts
new file mode 100644
index 0000000000..2d1f46e0f3
--- /dev/null
+++ b/types/openfin/v34/_v2/api/external-application/external-application.d.ts
@@ -0,0 +1,36 @@
+import { Base, EmitterBase, Reply } from '../base';
+import { Identity } from '../../identity';
+import Transport from '../../transport/transport';
+export interface ExternalApplicationInfo {
+ parent: Identity;
+}
+export default class ExternalApplicationModule extends Base {
+ /**
+ * Returns an External Application object that represents an existing external application.
+ * @param {string} uuid The UUID of the external application to be wrapped
+ * @return {Promise.}
+ */
+ wrap(uuid: string): Promise;
+}
+/**
+ * @classdesc An ExternalApplication object representing an application. Allows
+ * the developer to create, execute, show and close an external application as
+ * well as listen to application events.
+ * @class
+ */
+export declare class ExternalApplication extends EmitterBase {
+ identity: Identity;
+ constructor(wire: Transport, identity: Identity);
+ /**
+ * Retrieves information about the external application.
+ * @return {Promise.}
+ * @tutorial ExternalApplication.getInfo
+ */
+ getInfo(): Promise;
+}
+export interface ExternalApplication {
+ on(type: 'connected', listener: (data: Reply<'externalapplication', 'connected'>) => void): Promise;
+ on(type: 'disconnected', listener: (data: Reply<'externalapplication', 'disconnected'>) => void): Promise;
+ on(type: 'removeListener', listener: (eventType: string) => void): Promise;
+ on(type: 'newListener', listener: (eventType: string) => void): Promise;
+}
diff --git a/types/openfin/v34/_v2/api/fin.d.ts b/types/openfin/v34/_v2/api/fin.d.ts
new file mode 100644
index 0000000000..1bec2ffb4f
--- /dev/null
+++ b/types/openfin/v34/_v2/api/fin.d.ts
@@ -0,0 +1,27 @@
+///
+import Transport from '../transport/transport';
+import { EventEmitter } from 'events';
+import System from './system/system';
+import _WindowModule from './window/window';
+import Application from './application/application';
+import InterApplicationBus from './interappbus/interappbus';
+import _NotificationModule from './notification/notification';
+import Clipbpard from './clipboard/clipboard';
+import ExternalApplication from './external-application/external-application';
+import _FrameModule from './frame/frame';
+import GlobalHotkey from './global-hotkey';
+import { Identity } from '../identity';
+export default class Fin extends EventEmitter {
+ private wire;
+ System: System;
+ Window: _WindowModule;
+ Application: Application;
+ InterApplicationBus: InterApplicationBus;
+ Notification: _NotificationModule;
+ Clipboard: Clipbpard;
+ ExternalApplication: ExternalApplication;
+ Frame: _FrameModule;
+ GlobalHotkey: GlobalHotkey;
+ readonly me: Identity;
+ constructor(wire: Transport);
+}
diff --git a/types/openfin/v34/_v2/api/frame/frame.d.ts b/types/openfin/v34/_v2/api/frame/frame.d.ts
new file mode 100644
index 0000000000..4a5ab971de
--- /dev/null
+++ b/types/openfin/v34/_v2/api/frame/frame.d.ts
@@ -0,0 +1,51 @@
+import { Base, EmitterBase } from '../base';
+import { Identity } from '../../identity';
+import Transport from '../../transport/transport';
+export declare type EntityType = 'window' | 'iframe' | 'external connection' | 'unknown';
+export interface FrameInfo {
+ uuid: string;
+ name: string;
+ entityType: EntityType;
+ parent: Identity;
+}
+export default class _FrameModule extends Base {
+ /**
+ * Gets a reference to the specified frame. The frame does not have to exist
+ * @param {string} uuid - uuid of the frame you want to wrap
+ * @param {string} name - name of the frame you want to wrap
+ * @return {Promise.<_Frame>}
+ */
+ wrap(uuid: string, name: string): Promise<_Frame>;
+ /**
+ * Get a reference to the current frame
+ * @return {Promise.<_Frame>}
+ */
+ getCurrent(): Promise<_Frame>;
+}
+/**
+ * @classdesc Represents a way to interact with `iframes`. Facilitates discovery of current context
+ * (iframe or main window) as well as the ability to listen for frame-specific events.
+ * @class
+ * @alias Frame
+ */
+export declare class _Frame extends EmitterBase {
+ identity: Identity;
+ constructor(wire: Transport, identity: Identity);
+ /**
+ * Returns a frame info object for the represented frame
+ * @return {Promise.}
+ * @tutorial Frame.getInfo
+ */
+ getInfo(): Promise;
+ /**
+ * Returns a frame info object representing the window that the referenced iframe is
+ * currently embedded in
+ * @return {Promise.}
+ * @tutorial Frame.getParentWindow
+ */
+ getParentWindow(): Promise;
+}
+export interface _Frame {
+ on(type: 'connected', listener: (eventType: string) => void): Promise;
+ on(type: 'disconnected', listener: (eventType: string) => void): Promise;
+}
diff --git a/types/openfin/v34/_v2/api/global-hotkey/index.d.ts b/types/openfin/v34/_v2/api/global-hotkey/index.d.ts
new file mode 100644
index 0000000000..148ddff7e9
--- /dev/null
+++ b/types/openfin/v34/_v2/api/global-hotkey/index.d.ts
@@ -0,0 +1,33 @@
+import { EmitterBase } from '../base';
+import Transport from '../../transport/transport';
+/**
+ * The GlobalHotkey module can register/unregister a global hotkeys.
+ * @namespace
+ */
+export default class GlobalHotkey extends EmitterBase {
+ constructor(wire: Transport);
+ /**
+ * Registers a global hotkey with the operating system.
+ * @return {Promise.}
+ * @tutorial GlobalHotkey.register
+ */
+ register(hotkey: string, listener: (...args: any[]) => void): Promise;
+ /**
+ * Unregisters a global hotkey with the operating system.
+ * @return {Promise.}
+ * @tutorial GlobalHotkey.unregister
+ */
+ unregister(hotkey: string): Promise;
+ /**
+ * Unregisters all global hotkeys for the current application.
+ * @return {Promise.}
+ * @tutorial GlobalHotkey.unregisterAll
+ */
+ unregisterAll(): Promise;
+ /**
+ * Checks if a given hotkey has been registered
+ * @return {Promise.}
+ * @tutorial GlobalHotkey.isRegistered
+ */
+ isRegistered(hotkey: string): Promise;
+}
diff --git a/types/openfin/v34/_v2/api/interappbus/channel/channel.d.ts b/types/openfin/v34/_v2/api/interappbus/channel/channel.d.ts
new file mode 100644
index 0000000000..1c9a502e12
--- /dev/null
+++ b/types/openfin/v34/_v2/api/interappbus/channel/channel.d.ts
@@ -0,0 +1,31 @@
+import { Identity } from '../../../identity';
+import Transport, { Message } from '../../../transport/transport';
+export interface ProviderIdentity extends Identity {
+ channelId: string;
+ isExternal?: boolean;
+ channelName: string;
+}
+export declare type Action = (() => any) | ((payload: any) => any) | ((payload: any, id: ProviderIdentity) => any);
+export declare type Middleware = (() => any) | ((action: string) => any) | ((action: string, payload: any) => any) | ((action: string, payload: any, id: ProviderIdentity) => any);
+export interface ChannelMessagePayload extends Identity {
+ action: string;
+ payload: any;
+}
+export declare class ChannelBase {
+ protected subscriptions: any;
+ defaultAction: (action?: string, payload?: any, senderIdentity?: ProviderIdentity) => any;
+ private preAction;
+ private postAction;
+ private errorMiddleware;
+ private defaultSet;
+ protected send: (to: Identity, action: string, payload: any) => Promise>;
+ protected providerIdentity: ProviderIdentity;
+ constructor(providerIdentity: ProviderIdentity, send: Transport['sendAction']);
+ processAction(action: string, payload: any, senderIdentity: ProviderIdentity): Promise;
+ beforeAction(func: Action): void;
+ onError(func: (e: any, action: string, id: Identity) => any): void;
+ afterAction(func: Action): void;
+ remove(action: string): void;
+ setDefaultAction(func: (action?: string, payload?: any, senderIdentity?: ProviderIdentity) => any): void;
+ register(topic: string, listener: Action): boolean;
+}
diff --git a/types/openfin/v34/_v2/api/interappbus/channel/client.d.ts b/types/openfin/v34/_v2/api/interappbus/channel/client.d.ts
new file mode 100644
index 0000000000..d1c128a349
--- /dev/null
+++ b/types/openfin/v34/_v2/api/interappbus/channel/client.d.ts
@@ -0,0 +1,6 @@
+import { ChannelBase, ProviderIdentity } from './channel';
+import Transport from '../../../transport/transport';
+export declare class ChannelClient extends ChannelBase {
+ constructor(providerIdentity: ProviderIdentity, send: Transport['sendAction']);
+ dispatch(action: string, payload?: any): Promise;
+}
diff --git a/types/openfin/v34/_v2/api/interappbus/channel/index.d.ts b/types/openfin/v34/_v2/api/interappbus/channel/index.d.ts
new file mode 100644
index 0000000000..1297d2c5ea
--- /dev/null
+++ b/types/openfin/v34/_v2/api/interappbus/channel/index.d.ts
@@ -0,0 +1,33 @@
+import { ChannelClient } from './client';
+import { Identity } from '../../../identity';
+import { ChannelProvider } from './provider';
+import { EmitterBase } from '../../base';
+import Transport, { Message, Payload } from '../../../transport/transport';
+import { ProviderIdentity } from './channel';
+export interface Options {
+ wait?: boolean;
+ uuid: string;
+ name?: string;
+ payload?: any;
+}
+export interface ChannelPayload {
+ payload: Payload;
+}
+export interface ChannelMessage {
+ senderIdentity: Identity;
+ ackToSender: any;
+ providerIdentity: Identity;
+ connectAction: boolean;
+}
+export declare class Channel extends EmitterBase {
+ private channelMap;
+ constructor(wire: Transport);
+ getAllChannels(): Promise;
+ onChannelConnect(listener: Function): Promise;
+ onChannelDisconnect(listener: Function): Promise;
+ connect(options: Options): Promise;
+ create(channelName?: string): Promise;
+ onmessage: (msg: Message) => boolean;
+ private processChannelMessage;
+ private processChannelConnection;
+}
diff --git a/types/openfin/v34/_v2/api/interappbus/channel/provider.d.ts b/types/openfin/v34/_v2/api/interappbus/channel/provider.d.ts
new file mode 100644
index 0000000000..a869928ac2
--- /dev/null
+++ b/types/openfin/v34/_v2/api/interappbus/channel/provider.d.ts
@@ -0,0 +1,13 @@
+import { ChannelBase, ProviderIdentity } from './channel';
+import Transport from '../../../transport/transport';
+export declare type ConnectionListener = (adapterIdentity: ProviderIdentity, connectionMessage?: any) => any;
+export declare class ChannelProvider extends ChannelBase {
+ private connectListener;
+ private disconnectListener;
+ connections: ProviderIdentity[];
+ constructor(providerIdentity: ProviderIdentity, send: Transport['sendAction']);
+ dispatch(to: ProviderIdentity, action: string, payload: any): Promise;
+ processConnection(senderId: ProviderIdentity, payload: any): Promise;
+ publish(action: string, payload: any): Promise[];
+ onConnection(listener: ConnectionListener): void;
+}
diff --git a/types/openfin/v34/_v2/api/interappbus/interappbus.d.ts b/types/openfin/v34/_v2/api/interappbus/interappbus.d.ts
new file mode 100644
index 0000000000..48aaf7430c
--- /dev/null
+++ b/types/openfin/v34/_v2/api/interappbus/interappbus.d.ts
@@ -0,0 +1,80 @@
+///
+import { Base } from '../base';
+import { Identity } from '../../identity';
+import Transport, { Message } from '../../transport/transport';
+import { EventEmitter } from 'events';
+import { Channel } from './channel/index';
+/**
+ * A messaging bus that allows for pub/sub messaging between different applications.
+ * @namespace
+*/
+export default class InterApplicationBus extends Base {
+ Channel: Channel;
+ events: {
+ subscriberAdded: string;
+ subscriberRemoved: string;
+ };
+ private refCounter;
+ protected emitter: EventEmitter;
+ on: any;
+ removeAllListeners: any;
+ constructor(wire: Transport);
+ /**
+ * Publishes a message to all applications running on OpenFin Runtime that
+ * are subscribed to the specified topic.
+ * @param { string } topic The topic on which the message is sent
+ * @param { any } message The message to be published. Can be either a primitive
+ * data type (string, number, or boolean) or composite data type (object, array)
+ * that is composed of other primitive or composite data types
+ * @return {Promise.}
+ * @tutorial InterApplicationBus.publish
+ */
+ publish(topic: string, message: any): Promise;
+ /**
+ * Sends a message to a specific application on a specific topic.
+ * @param { object } destination The uuid of the application to which the message is sent
+ * @param { string } topic The topic on which the message is sent
+ * @param { any } message The message to be sent. Can be either a primitive data
+ * type (string, number, or boolean) or composite data type (object, array) that
+ * is composed of other primitive or composite data types
+ * @return {Promise.}
+ * @tutorial InterApplicationBus.send
+ */
+ send(destination: Identity, topic: string, message: any): Promise;
+ /**
+ * Subscribes to messages from the specified application on the specified topic.
+ * If the subscription is for a uuid, [name], topic combination that has already
+ * been published to upon subscription you will receive the last 20 missed messages
+ * in the order they were published.
+ * @param { Identity } source This object is described in the Identity in the typedef
+ * @param { string } topic The topic on which the message is sent
+ * @param { function } listener A function that is called when a message has
+ * been received. It is passed the message, uuid and name of the sending application.
+ * The message can be either a primitive data type (string, number, or boolean) or
+ * composite data type (object, array) that is composed of other primitive or composite
+ * data types
+ * @return {Promise.}
+ * @tutorial InterApplicationBus.subcribe
+ */
+ subscribe(source: Identity, topic: string, listener: any): Promise;
+ /**
+ * Unsubscribes to messages from the specified application on the specified topic.
+ * @param { Identity } source This object is described in the Identity in the typedef
+ * @param { string } topic The topic on which the message is sent
+ * @param { function } listener A callback previously registered with subscribe()
+ * @return {Promise.}
+ * @tutorial InterApplicationBus.unsubscribe
+ */
+ unsubscribe(source: Identity, topic: string, listener: any): Promise;
+ private processMessage;
+ private emitSubscriverEvent;
+ protected createSubscriptionKey(uuid: string, name: string, topic: string): string;
+ protected onmessage(message: Message): boolean;
+}
+export declare class InterAppPayload {
+ sourceUuid: string;
+ sourceWindowName: string;
+ topic: string;
+ destinationUuid?: string;
+ message?: any;
+}
diff --git a/types/openfin/v34/_v2/api/notification/notification.d.ts b/types/openfin/v34/_v2/api/notification/notification.d.ts
new file mode 100644
index 0000000000..8deec180ba
--- /dev/null
+++ b/types/openfin/v34/_v2/api/notification/notification.d.ts
@@ -0,0 +1,71 @@
+import { Base, EmitterBase } from '../base';
+import { Identity } from '../../identity';
+import Transport from '../../transport/transport';
+export declare class NotificationOptions {
+ url: string;
+ message: string;
+ timeout: string | number;
+ notificationId: number;
+ uuidOfProxiedApp: string;
+ ignoreMouseOver: boolean;
+ constructor(options: any, identity: Identity, notificationId: number);
+}
+export interface NotificationCallback {
+ message?: any;
+}
+/**
+ * @classdesc A Notification object represents a window on OpenFin Runtime which
+ * is shown briefly to the user on the bottom-right corner of the primary monitor.
+ * A notification is typically used to alert the user of some important event which
+ * requires his or her attention. Notifications are a child or your application that
+ * are controlled by the runtime.
+ * @class
+ * @alias Notification
+ */
+export declare class _Notification extends EmitterBase {
+ private listenerList;
+ private unhookAllListeners;
+ private buildLocalPayload;
+ protected options: NotificationOptions;
+ protected generalListener: (msg: any) => void;
+ protected notificationId: number;
+ protected onmessage: (message: any) => boolean;
+ constructor(wire: Transport, options: NotificationOptions);
+ url: string;
+ timeout: number | string;
+ message: any;
+ /**
+ * Invoked when the notification is shown
+ * @return {Promise.}
+ * @tutorial Notification.show
+ */
+ show(): Promise;
+ /**
+ * Sends a message to the notification.
+ * @param { any } message The message to be sent to the notification.
+ * Can be either a primitive data type (string, number, or boolean)
+ * or composite data type (object, array) that is composed of other
+ * primitive or composite data types
+ * @return {Promise.}
+ * @tutorial Notification.sendMessage
+ */
+ sendMessage(message: any): Promise;
+ /**
+ * Closes the notification
+ * @return {Promise.}
+ * @tutorial Notification.close
+ */
+ close(): Promise;
+}
+export default class _NotificationModule extends Base {
+ private nextNoteId;
+ private genNoteId;
+ events: {
+ show: string;
+ close: string;
+ error: string;
+ click: string;
+ message: string;
+ };
+ create(options: any): _Notification;
+}
diff --git a/types/openfin/v34/_v2/api/system/application.d.ts b/types/openfin/v34/_v2/api/system/application.d.ts
new file mode 100644
index 0000000000..9d7ea09b67
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/application.d.ts
@@ -0,0 +1,4 @@
+export interface ApplicationInfo {
+ isRunning: boolean;
+ uuid: string;
+}
diff --git a/types/openfin/v34/_v2/api/system/clearCacheOption.d.ts b/types/openfin/v34/_v2/api/system/clearCacheOption.d.ts
new file mode 100644
index 0000000000..6bae8116b7
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/clearCacheOption.d.ts
@@ -0,0 +1,6 @@
+export interface ClearCacheOption {
+ appcache?: boolean;
+ cache?: boolean;
+ cookies?: boolean;
+ localStorage?: boolean;
+}
diff --git a/types/openfin/v34/_v2/api/system/cookie.d.ts b/types/openfin/v34/_v2/api/system/cookie.d.ts
new file mode 100644
index 0000000000..1d229232c6
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/cookie.d.ts
@@ -0,0 +1,8 @@
+export interface CookieInfo {
+ name: string;
+ domain: string;
+ path: string;
+}
+export interface CookieOption {
+ name: string;
+}
diff --git a/types/openfin/v34/_v2/api/system/crashReporterOption.d.ts b/types/openfin/v34/_v2/api/system/crashReporterOption.d.ts
new file mode 100644
index 0000000000..7d512fdd7b
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/crashReporterOption.d.ts
@@ -0,0 +1,4 @@
+export interface CrashReporterOption {
+ diagnosticMode: boolean;
+ isRunning?: boolean;
+}
diff --git a/types/openfin/v34/_v2/api/system/download-asset.d.ts b/types/openfin/v34/_v2/api/system/download-asset.d.ts
new file mode 100644
index 0000000000..be513f5f0e
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/download-asset.d.ts
@@ -0,0 +1,18 @@
+export interface AppAssetInfo {
+ src: string;
+ alias: string;
+ version: string;
+ target?: string;
+ args?: string;
+ mandatory?: boolean;
+}
+export interface RuntimeDownloadOptions {
+ version: string;
+}
+export interface AppAssetRequest {
+ alias: string;
+}
+export interface RuntimeDownloadProgress {
+ downloadedBytes: number;
+ totalBytes: number;
+}
diff --git a/types/openfin/v34/_v2/api/system/download-preload.d.ts b/types/openfin/v34/_v2/api/system/download-preload.d.ts
new file mode 100644
index 0000000000..a7e635bcb8
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/download-preload.d.ts
@@ -0,0 +1,8 @@
+export interface DownloadPreloadOption {
+ url: string;
+}
+export interface DownloadPreloadInfo {
+ success: boolean;
+ url?: string;
+ error: string;
+}
diff --git a/types/openfin/v34/_v2/api/system/entity.d.ts b/types/openfin/v34/_v2/api/system/entity.d.ts
new file mode 100644
index 0000000000..50011a64f3
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/entity.d.ts
@@ -0,0 +1,11 @@
+import { Identity } from '../../identity';
+export interface Entity {
+ type: string;
+ uuid: string;
+}
+export interface EntityInfo {
+ name: string;
+ uuid: string;
+ parent: Identity;
+ entityType: string;
+}
diff --git a/types/openfin/v34/_v2/api/system/external-process.d.ts b/types/openfin/v34/_v2/api/system/external-process.d.ts
new file mode 100644
index 0000000000..8a68f1eae3
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/external-process.d.ts
@@ -0,0 +1,22 @@
+export interface ExternalProcessRequestType {
+ path: string;
+ arguments: string;
+ listener: LaunchExternalProcessListener;
+}
+export interface ExitCode {
+ topic: string;
+ uuid: string;
+ exitCode: number;
+}
+export interface LaunchExternalProcessListener {
+ (code: ExitCode): void;
+}
+export interface TerminateExternalRequestType {
+ uuid: string;
+ timeout: number;
+ killTree: boolean;
+}
+export interface ExternalConnection {
+ token: string;
+ uuid: string;
+}
diff --git a/types/openfin/v34/_v2/api/system/host-specs.d.ts b/types/openfin/v34/_v2/api/system/host-specs.d.ts
new file mode 100644
index 0000000000..2c5a134aea
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/host-specs.d.ts
@@ -0,0 +1,22 @@
+export interface Time {
+ user: number;
+ nice: number;
+ sys: number;
+ idle: number;
+ irq: number;
+}
+export interface CpuInfo {
+ model: string;
+ speed: number;
+ times: Time;
+}
+export interface GpuInfo {
+ name: string;
+}
+export interface HostSpecs {
+ cpu: CpuInfo[];
+ memory: number;
+ arch: string;
+ name: string;
+ gpu: GpuInfo;
+}
diff --git a/types/openfin/v34/_v2/api/system/log.d.ts b/types/openfin/v34/_v2/api/system/log.d.ts
new file mode 100644
index 0000000000..9b03b28c57
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/log.d.ts
@@ -0,0 +1,11 @@
+export interface GetLogRequestType {
+ name: string;
+ endFile?: string;
+ sizeLimit?: number;
+}
+export interface LogInfo {
+ name: string;
+ size: number;
+ date: string;
+}
+export declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
diff --git a/types/openfin/v34/_v2/api/system/monitor.d.ts b/types/openfin/v34/_v2/api/system/monitor.d.ts
new file mode 100644
index 0000000000..ea4aed799c
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/monitor.d.ts
@@ -0,0 +1,39 @@
+import { Point } from './point';
+export interface MonitorInfo {
+ deviceScaleFactor: number;
+ dpi: Point;
+ nonPrimaryMonitors: Array;
+ primaryMonitor: MonitorDetails;
+ reason: string;
+ taskBar: TaskBar;
+ virtualScreen: DipRect;
+}
+export interface MonitorDetails {
+ available: DipScaleRects;
+ availableRect: Rect;
+ deviceId: string;
+ displayDeviceActive: boolean;
+ deviceScaleFactor: number;
+ monitorRect: Rect;
+ name: number;
+ dpi: Point;
+ monitor: DipScaleRects;
+}
+export interface Rect {
+ bottom: number;
+ left: number;
+ right: number;
+ top: number;
+}
+export interface DipRect extends Rect {
+ dipRect: Rect;
+ scaledRect: Rect;
+}
+export interface DipScaleRects {
+ dipRect: Rect;
+ scaledRect: Rect;
+}
+export interface TaskBar extends DipScaleRects {
+ edge: string;
+ rect: Rect;
+}
diff --git a/types/openfin/v34/_v2/api/system/point.d.ts b/types/openfin/v34/_v2/api/system/point.d.ts
new file mode 100644
index 0000000000..b9830ce514
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/point.d.ts
@@ -0,0 +1,8 @@
+export interface Point {
+ x: number;
+ y: number;
+}
+export interface PointTopLeft {
+ top: number;
+ left: number;
+}
diff --git a/types/openfin/v34/_v2/api/system/process.d.ts b/types/openfin/v34/_v2/api/system/process.d.ts
new file mode 100644
index 0000000000..8a513ceecd
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/process.d.ts
@@ -0,0 +1,15 @@
+export interface ProcessInfo {
+ cpuUsage: number;
+ name: string;
+ nonPagedPoolUsage: number;
+ pageFaultCount: number;
+ pagedPoolUsage: number;
+ pagefileUsage: number;
+ peakNonPagedPoolUsage: number;
+ peakPagedPoolUsage: number;
+ peakPagefileUsage: number;
+ peakWorkingSetSize: number;
+ processId: number;
+ uuid: string;
+ workingSetSize: number;
+}
diff --git a/types/openfin/v34/_v2/api/system/proxy.d.ts b/types/openfin/v34/_v2/api/system/proxy.d.ts
new file mode 100644
index 0000000000..597afa6548
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/proxy.d.ts
@@ -0,0 +1,14 @@
+export interface ProxyInfo {
+ config: ProxyConfig;
+ system: {
+ autoConfigUrl: string;
+ bypass: '';
+ enabled: boolean;
+ proxy: string;
+ };
+}
+export interface ProxyConfig {
+ proxyAddress: string;
+ proxyPort: number;
+ type: string;
+}
diff --git a/types/openfin/v34/_v2/api/system/registry-info.d.ts b/types/openfin/v34/_v2/api/system/registry-info.d.ts
new file mode 100644
index 0000000000..a48ed34959
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/registry-info.d.ts
@@ -0,0 +1,7 @@
+export interface RegistryInfo {
+ data: any;
+ rootKey: string;
+ subkey: string;
+ type: string;
+ value: string;
+}
diff --git a/types/openfin/v34/_v2/api/system/runtime-info.d.ts b/types/openfin/v34/_v2/api/system/runtime-info.d.ts
new file mode 100644
index 0000000000..1508f87ef3
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/runtime-info.d.ts
@@ -0,0 +1,7 @@
+export interface RuntimeInfo {
+ architecture: string;
+ manifestUrl: string;
+ port: number;
+ securityRealm?: string;
+ version: string;
+}
diff --git a/types/openfin/v34/_v2/api/system/rvm.d.ts b/types/openfin/v34/_v2/api/system/rvm.d.ts
new file mode 100644
index 0000000000..42fc0b94db
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/rvm.d.ts
@@ -0,0 +1,5 @@
+export interface RVMInfo {
+ action: string;
+ 'start-time': string;
+ version: string;
+}
diff --git a/types/openfin/v34/_v2/api/system/system.d.ts b/types/openfin/v34/_v2/api/system/system.d.ts
new file mode 100644
index 0000000000..8c0bc7d3b6
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/system.d.ts
@@ -0,0 +1,475 @@
+import { EmitterBase } from '../base';
+import { ApplicationInfo } from './application';
+import { WindowInfo } from './window';
+import { Identity } from '../../identity';
+import { MonitorInfo } from './monitor';
+import { PointTopLeft } from './point';
+import { GetLogRequestType, LogInfo, LogLevel } from './log';
+import { ProxyInfo, ProxyConfig } from './proxy';
+import { ProcessInfo } from './process';
+import { AppAssetInfo, AppAssetRequest, RuntimeDownloadOptions, RuntimeDownloadProgress } from './download-asset';
+import { RVMInfo } from './rvm';
+import { RuntimeInfo } from './runtime-info';
+import { Entity, EntityInfo } from './entity';
+import { HostSpecs } from './host-specs';
+import { ExternalProcessRequestType, TerminateExternalRequestType, ExternalConnection } from './external-process';
+import Transport from '../../transport/transport';
+import { CookieInfo, CookieOption } from './cookie';
+import { RegistryInfo } from './registry-info';
+import { DownloadPreloadOption, DownloadPreloadInfo } from './download-preload';
+import { ClearCacheOption } from './clearCacheOption';
+import { CrashReporterOption } from './crashReporterOption';
+/**
+ * AppAssetInfo interface
+ * @typedef { Object } AppAssetInfo
+ * @property { string } src The URL to a zip file containing the package files (executables, dlls, etc…)
+ * @property { string } alias The name of the asset
+ * @property { string } version The version of the package
+ * @property { string } target Specify default executable to launch. This option can be overridden in launchExternalProcess
+ * @property { args } args The default command line arguments for the aforementioned target.
+ * @property { boolean } mandatory When set to true, the app will fail to load if the asset cannot be downloaded.
+ * When set to false, the app will continue to load if the asset cannot be downloaded. (Default: true)
+ */
+/**
+ * AppAssetRequest interface
+ * @typedef { Object } AppAssetRequest
+ * @property { string } alias The name of the asset
+ */
+/**
+ * CookieInfo interface
+ * @typedef { Object } CookieInfo
+ * @property { string } name The name of the cookie
+ * @property { string } domain The domain of the cookie
+ * @property { string } path The path of the cookie
+ */
+/**
+ * CookieOption interface
+ * @typedef { Object } CookieOption
+ * @property { string } name The name of the cookie
+ */
+/**
+ * ExternalConnection interface
+ * @typedef { Object } ExternalConnection
+ * @property { string } token The token to broker an external connection
+ * @property { string } uuid The uuid of the external connection
+ */
+/**
+* ExternalProcessRequestType interface
+* @typedef { Object } ExternalProcessRequestType
+* @property { string } path The file path to where the running application resides
+* @property { string } arguments The argument passed to the running application
+* @property { Object } listener This is described in the {LaunchExternalProcessListner} type definition
+*/
+/**
+ * Entity interface
+ * @typedef { Object } Entity
+ * @property { string } type The type of the entity
+ * @property { string } uuid The uuid of the entity
+ */
+/**
+ * EntityInfo interface
+ * @typedef { Object } EntityInfo
+ * @property { string } name The name of the entity
+ * @property { string } uuid The uuid of the entity
+ * @property { Identity } parent The parent of the entity
+ * @property { string } entityType The type of the entity
+ */
+/**
+* GetLogRequestType interface
+* @typedef { Object } GetLogRequestType
+* @property { string } name The name of the running application
+* @property { number } endFile The file length of the log file
+* @property { number } sizeLimit The set size limit of the log file
+*/
+/**
+ * Identity interface
+ * @typedef { Object } Identity
+ * @property { string } name The name of the application
+ * @property { string } uuid The uuid of the application
+ */
+/**
+ * @typedef { verbose | info | warning | error | fatal } LogLevel
+ * @summary Log verbosity levels.
+ * @desc Describes the minimum level (inclusive) above which logs will be written
+ *
+ * @property { string } verbose all logs written
+ * @property { string } info info and above
+ * @property { string } warning warning and above
+ * @property { string } error error and above
+ * @property { string } fatal fatal only, indicates a crash is imminent
+ */
+/**
+ * ProxyConfig interface
+ * @typedef { Object } ProxyConfig
+ * @property { numder } proxyPort The port number of the running application
+ * @property { string } proxyAddress The address of the running application
+ * @property { string } type
+ */
+/**
+ * RegistryInfo interface
+ * @typedef { Object } RegistryInfo
+ * @property { any } data The registry data
+ * @property { string } rootKey The registry root key
+ * @property { string } subkey The registry key
+ * @property { string } type The registry type
+ * @property { string } value The registry value name
+ */
+/**
+ * RuntimeDownloadOptions interface
+ * @typedef { Object } RuntimeDownloadOptions
+ * @desc These are the options object required by the downloadRuntime function.
+ * @property { string } version The given version to download
+ */
+/**
+ * TerminateExternalRequestType interface
+ * @typedef { Object } TerminateExternalRequestType
+ * @property { string } uuid The uuid of the running application
+ * @property { number } timeout Time out period before the running application terminates
+ * @property { boolean } killtree Value to terminate the running application
+ */
+/**
+ * DownloadPreloadOption interface
+ * @typedef { Object } DownloadPreloadOption
+ * @desc These are the options object required by the downloadPreloadScripts function
+ * @property { string } url url to the preload script
+ */
+/**
+ * DownloadPreloadInfo interface
+ * @typedef { Object } DownloadPreloadInfo
+ * @desc downloadPreloadScripts function return value
+ * @property { string } url url to the preload script
+ * @property { string } error error during preload script acquisition
+ * @property { boolean } succeess download operation success
+ */
+/**
+ * @typedef { Object } ClearCacheOption
+ * @summary Clear cache options.
+ * @desc These are the options required by the clearCache function.
+ *
+ * @property {boolean} appcache html5 application cache
+ * @property {boolean} cache browser data cache for html files and images
+ * @property {boolean} cookies browser cookies
+ * @property {boolean} localStorage browser data that can be used across sessions
+ */
+/**
+* CrashReporterOption interface
+* @typedef { Object } CrashReporterOption
+* @property { boolean } diagnosticMode In diagnostic mode the crash reporter will send diagnostic logs to
+* the OpenFin reporting service on runtime shutdown
+* @property { boolean } isRunning check if it's running
+*/
+/**
+ * An object representing the core of OpenFin Runtime. Allows the developer
+ * to perform system-level actions, such as accessing logs, viewing processes,
+ * clearing the cache and exiting the runtime.
+ * @namespace
+ */
+export default class System extends EmitterBase {
+ constructor(wire: Transport);
+ /**
+ * Returns the version of the runtime. The version contains the major, minor,
+ * build and revision numbers.
+ * @return {Promise.}
+ * @tutorial System.getVersion
+ */
+ getVersion(): Promise;
+ /**
+ * Clears cached data containing application resource
+ * files (images, HTML, JavaScript files), cookies, and items stored in the
+ * Local Storage.
+ * @param { ClearCacheOption } options - See tutorial for more details.
+ * @return {Promise.}
+ * @tutorial System.clearCache
+ */
+ clearCache(options: ClearCacheOption): Promise;
+ /**
+ * Clears all cached data when OpenFin Runtime exits.
+ * @return {Promise.}
+ * @tutorial System.deleteCacheOnExit
+ */
+ deleteCacheOnExit(): Promise;
+ /**
+ * Exits the Runtime.
+ * @return {Promise.}
+ * @tutorial System.exit
+ */
+ exit(): Promise;
+ /**
+ * Writes any unwritten cookies data to disk.
+ * @return {Promise.}
+ * @tutorial System.flushCookieStore
+ */
+ flushCookieStore(): Promise;
+ /**
+ * Retrieves an array of data (name, ids, bounds) for all application windows.
+ * @return {Promise.Array.}
+ * @tutorial System.getAllWindows
+ */
+ getAllWindows(): Promise>;
+ /**
+ * Retrieves an array of data for all applications.
+ * @return {Promise.Array.}
+ * @tutorial System.getAllApplications
+ */
+ getAllApplications(): Promise>;
+ /**
+ * Retrieves the command line argument string that started OpenFin Runtime.
+ * @return {Promise.}
+ * @tutorial System.getCommandLineArguments
+ */
+ getCommandLineArguments(): Promise;
+ /**
+ * Get the current state of the crash reporter.
+ * @return {Promise.}
+ * @tutorial System.getCrashReporterState
+ */
+ getCrashReporterState(): Promise;
+ /**
+ * Returns a unique identifier (UUID) for the machine (SHA256 hash of the system's MAC address).
+ * This call will return the same value on subsequent calls on the same machine(host).
+ * The values will be different on different machines, and should be considered globally unique.
+ * @return {Promise.}
+ * @tutorial System.getDeviceId
+ */
+ getDeviceId(): Promise;
+ /**
+ * Start the crash reporter for the browser process if not already running.
+ * You can optionally specify `diagnosticMode` to have the logs sent to
+ * OpenFin on runtime close
+ *
+ * @param { CrashReporterOption } options - configure crash reporter
+ * @return {Promise.}
+ * @tutorial System.startCrashReporter
+ */
+ startCrashReporter(options: CrashReporterOption): Promise;
+ /**
+ * Returns a hex encoded hash of the mac address and the currently logged in user name
+ * @return {Promise.}
+ * @tutorial System.getDeviceUserId
+ */
+ getDeviceUserId(): Promise;
+ /**
+ * Retrieves a frame info object for the uuid and name passed in
+ * @param { string } uuid - The UUID of the target.
+ * @param { string } name - The name of the target.
+ * @return {Promise.}
+ * @tutorial System.getEntityInfo
+ */
+ getEntityInfo(uuid: string, name: string): Promise;
+ /**
+ * Gets the value of a given environment variable on the computer on which the runtime is installed
+ * @return {Promise.}
+ * @tutorial System.getEnvironmentVariable
+ */
+ getEnvironmentVariable(envName: string): Promise;
+ /**
+ * Get current focused window.
+ * @return {Promise.}
+ * @tutorial System.getFocusedWindow
+ */
+ getFocusedWindow(): Promise;
+ /**
+ * Retrieves the contents of the log with the specified filename.
+ * @param { GetLogRequestType } options A object that id defined by the GetLogRequestType interface
+ * @return {Promise.}
+ * @tutorial System.getLog
+ */
+ getLog(options: GetLogRequestType): Promise;
+ /**
+ * Returns the minimum (inclusive) logging level that is currently being written to the log.
+ * @return {Promise.}
+ * @tutorial System.getMinLogLevel
+ */
+ getMinLogLevel(): Promise;
+ /**
+ * Retrieves an array containing information for each log file.
+ * @return {Promise.Array}
+ * @tutorial System.getLogList
+ */
+ getLogList(): Promise>;
+ /**
+ * Retrieves an object that contains data about the monitor setup of the
+ * computer that the runtime is running on.
+ * @return {Promise.}
+ * @tutorial System.getMonitorInfo
+ */
+ getMonitorInfo(): Promise;
+ /**
+ * Returns the mouse in virtual screen coordinates (left, top).
+ * @return {Promise.}
+ * @tutorial System.getMousePosition
+ */
+ getMousePosition(): Promise;
+ /**
+ * Retrieves an array of all of the runtime processes that are currently
+ * running. Each element in the array is an object containing the uuid
+ * and the name of the application to which the process belongs.
+ * @return {Promise.Array.}
+ * @tutorial System.getProcessList
+ */
+ getProcessList(): Promise>;
+ /**
+ * Retrieves the Proxy settings.
+ * @return {Promise.}
+ * @tutorial System.getProxySettings
+ */
+ getProxySettings(): Promise;
+ /**
+ * Returns information about the running Runtime in an object.
+ * @return {Promise.}
+ * @tutorial System.getRuntimeInfo
+ */
+ getRuntimeInfo(): Promise;
+ /**
+ * Returns information about the running RVM in an object.
+ * @return {Promise.}
+ * @tutorial System.getRvmInfo
+ */
+ getRvmInfo(): Promise;
+ /**
+ * Retrieves system information.
+ * @return {Promise.}
+ * @tutorial System.getHostSpecs
+ */
+ getHostSpecs(): Promise;
+ /**
+ * Runs an executable or batch file.
+ * @param { ExternalProcessRequestType } options A object that is defined in the ExternalProcessRequestType interface
+ * @return {Promise.}
+ * @tutorial System.launchExternalProcess
+ */
+ launchExternalProcess(options: ExternalProcessRequestType): Promise;
+ /**
+ * Monitors a running process.
+ * @param { number } pid See tutorial for more details
+ * @return {Promise.}
+ * @tutorial System.monitorExternalProcess
+ */
+ monitorExternalProcess(pid: number): Promise;
+ /**
+ * Writes the passed message into both the log file and the console.
+ * @param { string } level The log level for the entry. Can be either "info", "warning" or "error"
+ * @param { string } message The log message text
+ * @return {Promise.}
+ * @tutorial System.log
+ */
+ log(level: string, message: string): Promise;
+ /**
+ * Opens the passed URL in the default web browser.
+ * @param { string } url The URL to open
+ * @return {Promise.}
+ * @tutorial System.openUrlWithBrowser
+ */
+ openUrlWithBrowser(url: string): Promise;
+ /**
+ * Removes the process entry for the passed UUID obtained from a prior call
+ * of fin.System.launchExternalProcess().
+ * @param { string } uuid The UUID for a process obtained from a prior call to fin.desktop.System.launchExternalProcess()
+ * @return {Promise.}
+ * @tutorial System.releaseExternalProcess
+ */
+ releaseExternalProcess(uuid: string): Promise;
+ /**
+ * Shows the Chromium Developer Tools for the specified window
+ * @param { Identity } identity This is a object that is defined by the Identity interface
+ * @return {Promise.}
+ * @tutorial System.showDeveloperTools
+ */
+ showDeveloperTools(identity: Identity): Promise;
+ /**
+ * Attempt to close an external process. The process will be terminated if it
+ * has not closed after the elapsed timeout in milliseconds.
+ * @param { TerminateExternalRequestType } options A object defined in the TerminateExternalRequestType interface
+ * @return {Promise.}
+ * @tutorial System.terminateExternalProcess
+ */
+ terminateExternalProcess(options: TerminateExternalRequestType): Promise;
+ /**
+ * Update the OpenFin Runtime Proxy settings.
+ * @param { ProxyConfig } options A config object defined in the ProxyConfig interface
+ * @return {Promise.}
+ * @tutorial System.updateProxySettings
+ */
+ updateProxySettings(options: ProxyConfig): Promise;
+ /**
+ * Downloads the given application asset
+ * @param { AppAssetInfo } appAsset App asset object
+ * @return {Promise.}
+ * @tutorial System.downloadAsset
+ */
+ downloadAsset(appAsset: AppAssetInfo, progressListener: (progress: RuntimeDownloadProgress) => void): Promise;
+ /**
+ * Downloads a version of the runtime.
+ * @param { RuntimeDownloadOptions } options - Download options.
+ * @param {Function} [progressListener] - called as the runtime is downloaded with progress information.
+ * @return {Promise.}
+ * @tutorial System.downloadRuntime
+ */
+ downloadRuntime(options: RuntimeDownloadOptions, progressListener: (progress: RuntimeDownloadProgress) => void): Promise;
+ /**
+ * Download preload scripts from given URLs
+ * @param {DownloadPreloadOption[]} scripts - URLs of preload scripts. See tutorial for more details.
+ * @return {Promise.Array}
+ * @tutorial System.downloadPreloadScripts
+ */
+ downloadPreloadScripts(scripts: Array): Promise>;
+ /**
+ * Retrieves an array of data (name, ids, bounds) for all application windows.
+ * @return {Promise.Array.}
+ * @tutorial System.getAllExternalApplications
+ */
+ getAllExternalApplications(): Promise>;
+ /**
+ * Retrieves app asset information.
+ * @param { AppAssetRequest } options
+ * @return {Promise.}
+ * @tutorial System.getAppAssetInfo
+ */
+ getAppAssetInfo(options: AppAssetRequest): Promise;
+ /**
+ * Get additional info of cookies.
+ * @param { CookieOption } options - See tutorial for more details.
+ * @return {Promise.Array.}
+ * @tutorial System.getCookies
+ */
+ getCookies(options: CookieOption): Promise>;
+ /**
+ * Set the minimum log level above which logs will be written to the OpenFin log
+ * @param { LogLevel } The minimum level (inclusive) above which all calls to log will be written
+ * @return {Promise.}
+ * @tutorial System.setMinLogLevel
+ */
+ setMinLogLevel(level: LogLevel): Promise;
+ /**
+ * Retrieves the UUID of the computer on which the runtime is installed
+ * @param { string } uuid The uuid of the running application
+ * @return {Promise.}
+ * @tutorial System.resolveUuid
+ */
+ resolveUuid(uuid: string): Promise;
+ /**
+ * Retrieves an array of data for all external applications
+ * @param { Identity } requestingIdentity This object is described in the Identity typedef
+ * @param { any } data Any data type to pass to the method
+ * @return {Promise.}
+ * @ignore
+ */
+ executeOnRemote(requestingIdentity: Identity, data: any): Promise;
+ /**
+ * Reads the specifed value from the registry.
+ * @param { string } rootKey - The registry root key.
+ * @param { string } subkey - The registry key.
+ * @param { string } value - The registry value name.
+ * @return {Promise.}
+ * @tutorial System.readRegistryValue
+ */
+ readRegistryValue(rootKey: string, subkey: string, value: string): Promise;
+ /**
+ * This function call will register a unique id and produce a token.
+ * The token can be used to broker an external connection.
+ * @param { string } uuid - A UUID for the remote connection.
+ * @return {Promise.}
+ * @tutorial System.registerExternalConnection
+ */
+ registerExternalConnection(uuid: string): Promise;
+}
diff --git a/types/openfin/v34/_v2/api/system/window.d.ts b/types/openfin/v34/_v2/api/system/window.d.ts
new file mode 100644
index 0000000000..886084fad6
--- /dev/null
+++ b/types/openfin/v34/_v2/api/system/window.d.ts
@@ -0,0 +1,14 @@
+export interface WindowInfo {
+ uuid: string;
+ mainWindow: WindowDetail;
+ childWindows: Array;
+}
+export interface WindowDetail {
+ name: string;
+ top: number;
+ right: number;
+ bottom: number;
+ height: number;
+ width: number;
+ left: number;
+}
diff --git a/types/openfin/v34/_v2/api/window/bounds-changed.d.ts b/types/openfin/v34/_v2/api/window/bounds-changed.d.ts
new file mode 100644
index 0000000000..f7801da3fc
--- /dev/null
+++ b/types/openfin/v34/_v2/api/window/bounds-changed.d.ts
@@ -0,0 +1,14 @@
+import { Reply } from '../base';
+export default class BoundsChangedReply extends Reply<'window', 'bounds-changed'> {
+ changeType: BoundsChangeType;
+ deferred: boolean;
+ height: number;
+ width: number;
+ top: number;
+ left: number;
+}
+export declare const enum BoundsChangeType {
+ POSITION = 0,
+ SIZE = 1,
+ POSITION_AND_SIZE = 2
+}
diff --git a/types/openfin/v34/_v2/api/window/bounds.d.ts b/types/openfin/v34/_v2/api/window/bounds.d.ts
new file mode 100644
index 0000000000..40822c4aa3
--- /dev/null
+++ b/types/openfin/v34/_v2/api/window/bounds.d.ts
@@ -0,0 +1,9 @@
+interface Bounds {
+ height: number;
+ width: number;
+ top: number;
+ left: number;
+ right?: number;
+ bottom?: number;
+}
+export default Bounds;
diff --git a/types/openfin/v34/_v2/api/window/transition.d.ts b/types/openfin/v34/_v2/api/window/transition.d.ts
new file mode 100644
index 0000000000..c16440c80d
--- /dev/null
+++ b/types/openfin/v34/_v2/api/window/transition.d.ts
@@ -0,0 +1,24 @@
+export interface TransitionBase {
+ duration: number;
+ relative?: boolean;
+}
+export interface Opacity extends TransitionBase {
+ opacity: number;
+}
+export interface Position extends TransitionBase {
+ left: number;
+ top: number;
+}
+export interface Size extends TransitionBase {
+ width: number;
+ height: number;
+}
+export interface TransitionOptions {
+ interrupt: boolean;
+ tween?: string;
+}
+export interface Transition {
+ opacity?: Opacity;
+ position?: Position;
+ size?: Size;
+}
diff --git a/types/openfin/v34/_v2/api/window/window.d.ts b/types/openfin/v34/_v2/api/window/window.d.ts
new file mode 100644
index 0000000000..8d597a6446
--- /dev/null
+++ b/types/openfin/v34/_v2/api/window/window.d.ts
@@ -0,0 +1,759 @@
+import { Base, EmitterBase, RuntimeEvent } from '../base';
+import { Identity } from '../../identity';
+import Bounds from './bounds';
+import BoundsChangedReply from './bounds-changed';
+import { Transition, TransitionOptions } from './transition';
+import { Application } from '../application/application';
+import Transport from '../../transport/transport';
+export default class _WindowModule extends Base {
+ private instance;
+ /**
+ * Returns a Window object that represents an existing window.
+ * @param { Identity } indentity
+ * @return {Promise.<_Window>}
+ * @tutorial Window.wrap
+ */
+ wrap(identity: Identity): Promise<_Window>;
+ /**
+ * Creates a new Window.
+ * @param { * } options - Window creation options
+ * @return {Promise.<_Window>}
+ * @tutorial Window.create
+ */
+ create(options: any): Promise<_Window>;
+ /**
+ * Returns a Window object that represents the current window
+ * @return {Promise.}
+ * @tutorial window.getCurrent
+ */
+ getCurrent(): Promise<_Window>;
+}
+export interface CloseEventShape {
+ name: string;
+ uuid: string;
+ type: string;
+ topic: string;
+}
+export interface WindowInfo {
+ canNavigateBack: boolean;
+ canNavigateForward: boolean;
+ preloadScripts: Array;
+ title: string;
+ url: string;
+}
+export interface FrameInfo {
+ name: string;
+ uuid: string;
+ entityType: string;
+ parent?: Identity;
+}
+/**
+ * @typedef {object} Transition
+ * @property {Opacity} opacity - The Opacity transition
+ * @property {Position} position - The Position transition
+ * @property {Size} size - The Size transition
+*/
+/**
+ * @typedef {object} TransitionOptions
+ * @property {boolean} interrupt - This option interrupts the current animation. When false it pushes
+this animation onto the end of the animation queue.
+ * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
+ */
+/**
+ * @typedef {object} Size
+ * @property {number} duration - The total time in milliseconds this transition should take.
+ * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
+ * @property {number} width - Optional if height is present. Defaults to the window's current width.
+ * @property {number} height - Optional if width is present. Defaults to the window's current height.
+ */
+/**
+ * @typedef {object} Position
+ * @property {number} duration - The total time in milliseconds this transition should take.
+ * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
+ * @property {number} left - Defaults to the window's current left position in virtual screen coordinates.
+ * @property {number} top - Defaults to the window's current top position in virtual screen coordinates.
+ */
+/**
+ * @typedef {object} Opacity
+ * @property {number} duration - The total time in milliseconds this transition should take.
+ * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
+ * @property {number} opacity - This value is clamped from 0.0 to 1.0.
+*/
+/**
+ * Bounds is a interface that has the properties of height,
+ * width, left, top which are all numbers
+ * @typedef { Object } Bounds
+ * @property { number } height Get the application height bound
+ * @property { number } width Get the application width bound
+ * @property { number } top Get the application top bound
+ * @property { number } left Get the application left bound
+ * @property { number } right Get the application right bound
+ * @property { number } bottom Get the application bottom bound
+ */
+/**
+ * @classdesc A basic window that wraps a native HTML window. Provides more fine-grained
+ * control over the window state such as the ability to minimize, maximize, restore, etc.
+ * By default a window does not show upon instantiation; instead the window's show() method
+ * must be invoked manually. The new window appears in the same process as the parent window.
+ * @class
+ * @alias Window
+*/
+export declare class _Window extends EmitterBase {
+ identity: Identity;
+ /**
+ * Raised when a window within this application requires credentials from the user.
+ *
+ * @event Window#auth-requested
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {object} authInfo
+ * @property {string} authInfo.host - Host server.
+ * @property {boolean} authInfo.isProxy - Indicates if the request involves a proxy.
+ * @property {number} authInfo.port - Port number.
+ * @property {string} authInfo.realm - Authentication request realm.
+ * @property {string} authInfo.scheme - Authentication scheme.
+ */
+ /**
+ * Raised when a window loses focus.
+ *
+ * @event Window#blurred
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised after changes in a window's size and/or position.
+ *
+ * @event Window#bounds-changed
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {number} changeType - Describes what kind of change occurred.
+ 0 means a change in position.
+ 1 means a change in size.
+ 2 means a change in position and size.
+ * @property {string} deferred - Indicated whether pending changes have been applied.
+ * @property {number} height - New height of the window.
+ * @property {number} left - New left most coordinate of the window.
+ * @property {number} top - New top most coordinate of the window.
+ * @property {number} width - New width of the window.
+ */
+ /**
+ * Raised when a window has been prevented from closing. A window will be prevented from closing by default,
+ either through the API or by a user when ‘close-requested’ has been subscribed to and the Window.close(force) flag is false.
+ *
+ * @event Window#close-requested
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised when a window has closed.
+ *
+ * @event Window#closed
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised when a window has crashed.
+ *
+ * @event Window#crashed
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised when the frame is disabled after all prevent user changes in window's size and/or position have completed.
+ *
+ * @event Window#disabled-frame-bounds-changed
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {number} changeType - Describes what kind of change occurred.
+ 0 means a change in position.
+ 1 means a change in size.
+ 2 means a change in position and size.
+ * @property {string} deferred - Indicated whether pending changes have been applied.
+ * @property {number} height - New height of the window.
+ * @property {number} left - New left most coordinate of the window.
+ * @property {number} top - New top most coordinate of the window.
+ * @property {number} width - New width of the window.
+ */
+ /**
+ * Raised when the frame is disabled during prevented user changes to a window's size and/or position.
+ *
+ * @event Window#disabled-frame-bounds-changing
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {number} changeType - Describes what kind of change occurred.
+ 0 means a change in position.
+ 1 means a change in size.
+ 2 means a change in position and size.
+ * @property {string} deferred - Indicated whether pending changes have been applied.
+ * @property {number} height - New height of the window.
+ * @property {number} left - New left most coordinate of the window.
+ * @property {number} top - New top most coordinate of the window.
+ * @property {number} width - New width of the window.
+ */
+ /**
+ * Raised when the window has been embedded.
+ *
+ * @event Window#embedded
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised when an external process has exited.
+ *
+ * @event Window#external-process-exited
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {string} processUuid - The process handle UUID.
+ * @property {number} exitCode - The process exit code
+ */
+ /**
+ * Raised when an external process has started.
+ *
+ * @event Window#external-process-started
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {string} processUuid - The process handle UUID.
+ */
+ /**
+ * Raised when a window's frame becomes disabled.
+ *
+ * @event Window#frame-disabled
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised when a window's frame becomes enabled.
+ *
+ * @event Window#frame-enabled
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised when a window joins/leaves a group and/or when the group a window is a member of changes.
+ *
+ * @event Window#group-changed
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {string} source - Which group array the window that the event listener was registered on is included in:
+ 'source' The window is included in sourceGroup.
+ 'target' The window is included in targetGroup.
+ 'nothing' The window is not included in sourceGroup nor targetGroup.
+ * @property {string} reason - The reason this event was triggered.
+ 'leave' A window has left the group due to a leave or merge with group.
+ 'join' A window has joined the group.
+ 'merge' Two groups have been merged together.
+ 'disband' There are no other windows in the group.
+ * @property {string} name - Name of the window.
+ * @property {legacyWindowIdentity[]} sourceGroup - All the windows in the group the sourceWindow originated from.
+ * @property {string} sourceWindowAppUuid - UUID of the application the sourceWindow belongs to the
+ source window is the window in which (merge/join/leave)group(s) was called.
+ * @property {string} sourceWindowName - Name of the sourcewindow.
+ The source window is the window in which (merge/join/leave)group(s) was called.
+ * @property {legacyWindowIdentity[]} targetGroup - All the windows in the group the targetWindow orginated from.
+ * @property {string} targetWindowAppUuid - UUID of the application the targetWindow belongs to.
+ The target window is the window that was passed into (merge/join)group(s).
+ * @property {string} targetWindowName - Name of the targetWindow.
+ The target window is the window that was passed into (merge/join)group(s).
+ */
+ /**
+ * Raised when a window has been hidden.
+ *
+ * @event Window#hidden
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {string} reason - Action prompted the close The reasons are:
+ "hide"
+ "hide-on-close"
+ */
+ /**
+ * Raised when a window is initialized.
+ *
+ * @event Window#initialized
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised when a window is maximized.
+ *
+ * @event Window#maximized
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised when a window is minimized.
+ *
+ * @event Window#minimized
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised when window navigation is rejected as per ContentNavigation whitelist/blacklist rules.
+ *
+ * @event Window#navigation-rejected
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {string} sourceName - source of navigation window name.
+ * @property {string} url - Blocked content url.
+ */
+ /**
+ * Raised when a window is out of memory.
+ *
+ * @event Window#out-of-memory
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised after the execution of all of a window's preload scripts. Contains
+ information about all window's preload scripts' final states.
+ *
+ * @event Window#preload-scripts-state-changed
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {preloadScriptState[]} preloadState - An array of all final preload scripts' states
+ */
+ /**
+ * Raised during the execution of a window's preload script. Contains information
+ about a single window's preload script's state, for which the event has been raised.
+ *
+ * @event Window#preload-scripts-state-changing
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {preloadScriptState[]} preloadState - An array of all final preload scripts' states
+ */
+ /**
+ * Raised when an HTTP load was cancelled or failed.
+ *
+ * @event Window#resource-load-failed
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {number} errorCode - The Chromium error code.
+ * @property {string} errorDescription - The Chromium error description.
+ * @property {string} validatedURL - The url attempted.
+ * @property {boolean} isMainFrame - Was the attempt made from the main frame.
+ */
+ /**
+ * Raised when an HTTP resource request has received response details.
+ *
+ * @event Window#resource-response-received
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {boolean} status - Status of the request.
+ * @property {string} newUrl - The URL of the responded resource.
+ * @property {string} originalUrl - The requested URL.
+ * @property {number} httpResponseCode - The HTTP Response code.
+ * @property {string} requestMethod - The HTTP request method.
+ * @property {string} referrer - The HTTP referrer.
+ * @property {object} headers - The HTTP headers.
+ * @property {string} resourceType - Resource type:
+ "mainFrame", "subFrame",
+ "styleSheet", "script", "image",
+ "object", "xhr", or "other"
+ */
+ /**
+ * Raised when a window has reloaded.
+ *
+ * @event Window#reloaded
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ * @property {string} url - Url has has been reloaded.
+ */
+ /**
+ * Raised when a window is displayed after having been minimized or
+ when a window leaves the maximize state without minimizing.
+ *
+ * @event Window#restored
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised when a window has been prevented from showing.
+ A window will be prevented from showing by default, either through the API or by a user when
+ ‘show-requested’ has been subscribed to on the window or 'window-show-requested'
+ on the parent application and the Window.show(force) flag is false.
+ *
+ * @event Window#show-requested
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * Raised when a window been shown.
+ *
+ * @event Window#shown
+ * @type {object}
+ * @property {string} name - Name of the window.
+ * @property {string} uuid - UUID of the application that the window belongs to.
+ */
+ /**
+ * @typedef {object} legacyWindowIdentity
+ * @summary Object summary
+ * @desc Object description
+ * @property {string} appUuid - The UUID of the application this window entry belongs to.
+ * @property {string} windowName - The name of this window entry.
+ */
+ /**
+ * @typedef {object} preloadScriptState
+ * @summary Object summary
+ * @desc Object description
+ * @property {string} url - The url of the preload script.
+ * @property {string} state - The preload script state:
+ "load-failed", "failed", "succeeded"
+ */
+ private nativeWindow;
+ constructor(wire: Transport, identity: Identity);
+ createWindow(options: any): Promise<_Window>;
+ protected runtimeEventComparator: (listener: RuntimeEvent) => boolean;
+ private windowListFromNameList;
+ /**
+ * Retrieves an array of frame info objects representing the main frame and any
+ * iframes that are currently on the page.
+ * @return {Promise.>}
+ * @tutorial Window.getAllFrames
+ */
+ getAllFrames(): Promise>;
+ /**
+ * Gets the current bounds (top, left, width, height) of the window.
+ * @return {Promise.}
+ * @tutorial Window.getBounds
+ */
+ getBounds(): Promise;
+ /**
+ * Returns the native JavaScript "window" object for the window.
+ * @return {Promise.}
+ * @tutorial Window.getNativeWindow
+ */
+ getNativeWindow(): Promise;
+ /**
+ * Gives focus to the window.
+ * @return {Promise.}
+ * @emits _Window#focused
+ * @tutorial Window.focus
+ */
+ focus(): Promise;
+ /**
+ * Removes focus from the window.
+ * @return {Promise.}
+ * @tutorial Window.blur
+ */
+ blur(): Promise;
+ /**
+ * Brings the window to the front of the window stack.
+ * @return {Promise.}
+ * @tutorial Window.bringToFront
+ */
+ bringToFront(): Promise;
+ /**
+ * Performs the specified window transitions.
+ * @param {Transition} transitions - Describes the animations to perform. See the tutorial.
+ * @param {TransitionOptions} options - Options for the animation. See the tutorial.
+ * @return {Promise.}
+ * @tutorial Window.animate
+ */
+ animate(transitions: Transition, options: TransitionOptions): Promise;
+ /**
+ * Hides the window.
+ * @return {Promise.}
+ * @tutorial Window.hide
+ */
+ hide(): Promise;
+ /**
+ * closes the window application
+ * @param { boolean } [force = false] Close will be prevented from closing when force is false and
+ * ‘close-requested’ has been subscribed to for application’s main window.
+ * @return {Promise.}
+ * @tutorial Window.close
+ */
+ close(force?: boolean): Promise;
+ /**
+ * Returns then running applications uuid
+ * @return {Promise.}
+ * @tutorial Window.getNativeId
+ */
+ getNativeId(): Promise;
+ /**
+ * Prevents a user from changing a window's size/position when using the window's frame.
+ * @return {Promise.}
+ * @tutorial Window.disableFrame
+ */
+ disableFrame(): Promise;
+ /**
+ * Re-enables user changes to a window's size/position when using the window's frame.
+ * @return {Promise.}
+ * @tutorial Window.enableFrame
+ */
+ enableFrame(): Promise;
+ /**
+ * Executes Javascript on the window, restricted to windows you own or windows owned by
+ * applications you have created.
+ * @param { string } code JavaScript code to be executed on the window.
+ * @return {Promise.