@openfin/core 33.76.36 → 33.77.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/OpenFin.d.ts +1 -1
- package/README.md +29 -4
- package/fin.d.ts +2 -2
- package/{src → out}/GlobalOpenFin.d.ts +1 -1
- package/out/mock-alpha.d.ts +16112 -0
- package/out/mock-beta.d.ts +16112 -0
- package/out/mock-public.d.ts +16112 -0
- package/out/mock.d.ts +16797 -0
- package/out/mock.js +17111 -0
- package/package.json +30 -23
- package/LICENSE +0 -13
- package/NOTICE +0 -16
- package/openfin-core-33.76.36.tgz +0 -0
- package/src/OpenFin.d.ts +0 -3091
- package/src/OpenFin.js +0 -2
- package/src/api/api-exposer/api-consumer.d.ts +0 -28
- package/src/api/api-exposer/api-consumer.js +0 -28
- package/src/api/api-exposer/api-exposer.d.ts +0 -35
- package/src/api/api-exposer/api-exposer.js +0 -38
- package/src/api/api-exposer/decorators.d.ts +0 -10
- package/src/api/api-exposer/decorators.js +0 -18
- package/src/api/api-exposer/index.d.ts +0 -4
- package/src/api/api-exposer/index.js +0 -20
- package/src/api/api-exposer/strategies/index.d.ts +0 -1
- package/src/api/api-exposer/strategies/index.js +0 -17
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.d.ts +0 -14
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.js +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.d.ts +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.js +0 -23
- package/src/api/api-exposer/strategies/openfin-channels/index.d.ts +0 -2
- package/src/api/api-exposer/strategies/openfin-channels/index.js +0 -18
- package/src/api/application/Factory.d.ts +0 -196
- package/src/api/application/Factory.js +0 -278
- package/src/api/application/Instance.d.ts +0 -692
- package/src/api/application/Instance.js +0 -821
- package/src/api/application/index.d.ts +0 -12
- package/src/api/application/index.js +0 -28
- package/src/api/base.d.ts +0 -117
- package/src/api/base.js +0 -246
- package/src/api/clipboard/index.d.ts +0 -172
- package/src/api/clipboard/index.js +0 -200
- package/src/api/events/application.d.ts +0 -158
- package/src/api/events/application.js +0 -14
- package/src/api/events/base.d.ts +0 -42
- package/src/api/events/base.js +0 -2
- package/src/api/events/channel.d.ts +0 -35
- package/src/api/events/channel.js +0 -7
- package/src/api/events/emitterMap.d.ts +0 -11
- package/src/api/events/emitterMap.js +0 -35
- package/src/api/events/eventAggregator.d.ts +0 -5
- package/src/api/events/eventAggregator.js +0 -35
- package/src/api/events/externalApplication.d.ts +0 -24
- package/src/api/events/externalApplication.js +0 -7
- package/src/api/events/frame.d.ts +0 -35
- package/src/api/events/frame.js +0 -2
- package/src/api/events/globalHotkey.d.ts +0 -25
- package/src/api/events/globalHotkey.js +0 -2
- package/src/api/events/platform.d.ts +0 -34
- package/src/api/events/platform.js +0 -10
- package/src/api/events/system.d.ts +0 -126
- package/src/api/events/system.js +0 -15
- package/src/api/events/typedEventEmitter.d.ts +0 -20
- package/src/api/events/typedEventEmitter.js +0 -2
- package/src/api/events/view.d.ts +0 -92
- package/src/api/events/view.js +0 -12
- package/src/api/events/webcontents.d.ts +0 -277
- package/src/api/events/webcontents.js +0 -13
- package/src/api/events/window.d.ts +0 -421
- package/src/api/events/window.js +0 -12
- package/src/api/external-application/Factory.d.ts +0 -34
- package/src/api/external-application/Factory.js +0 -47
- package/src/api/external-application/Instance.d.ts +0 -110
- package/src/api/external-application/Instance.js +0 -117
- package/src/api/external-application/index.d.ts +0 -12
- package/src/api/external-application/index.js +0 -28
- package/src/api/fin.d.ts +0 -54
- package/src/api/fin.js +0 -45
- package/src/api/frame/Factory.d.ts +0 -54
- package/src/api/frame/Factory.js +0 -86
- package/src/api/frame/Instance.d.ts +0 -136
- package/src/api/frame/Instance.js +0 -143
- package/src/api/frame/index.d.ts +0 -14
- package/src/api/frame/index.js +0 -30
- package/src/api/global-hotkey/index.d.ts +0 -106
- package/src/api/global-hotkey/index.js +0 -132
- package/src/api/interappbus/channel/channel.d.ts +0 -285
- package/src/api/interappbus/channel/channel.js +0 -334
- package/src/api/interappbus/channel/channels-docs.d.ts +0 -342
- package/src/api/interappbus/channel/channels-docs.js +0 -401
- package/src/api/interappbus/channel/client.d.ts +0 -117
- package/src/api/interappbus/channel/client.js +0 -181
- package/src/api/interappbus/channel/connection-manager.d.ts +0 -29
- package/src/api/interappbus/channel/connection-manager.js +0 -246
- package/src/api/interappbus/channel/index.d.ts +0 -189
- package/src/api/interappbus/channel/index.js +0 -333
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/classic/message-receiver.js +0 -73
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/classic/strategy.js +0 -101
- package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +0 -20
- package/src/api/interappbus/channel/protocols/combined/strategy.js +0 -58
- package/src/api/interappbus/channel/protocols/index.d.ts +0 -47
- package/src/api/interappbus/channel/protocols/index.js +0 -2
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +0 -10
- package/src/api/interappbus/channel/protocols/protocol-manager.js +0 -43
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +0 -25
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +0 -141
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +0 -30
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +0 -130
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +0 -85
- package/src/api/interappbus/channel/protocols/strategy-types.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/strategy-types.js +0 -2
- package/src/api/interappbus/channel/protocols/strategy.d.ts +0 -17
- package/src/api/interappbus/channel/protocols/strategy.js +0 -2
- package/src/api/interappbus/channel/provider.d.ts +0 -206
- package/src/api/interappbus/channel/provider.js +0 -338
- package/src/api/interappbus/index.d.ts +0 -120
- package/src/api/interappbus/index.js +0 -210
- package/src/api/interop/Factory.d.ts +0 -57
- package/src/api/interop/Factory.js +0 -96
- package/src/api/interop/InteropBroker.d.ts +0 -665
- package/src/api/interop/InteropBroker.js +0 -1313
- package/src/api/interop/InteropClient.d.ts +0 -502
- package/src/api/interop/InteropClient.js +0 -683
- package/src/api/interop/SessionContextGroupBroker.d.ts +0 -27
- package/src/api/interop/SessionContextGroupBroker.js +0 -108
- package/src/api/interop/SessionContextGroupClient.d.ts +0 -21
- package/src/api/interop/SessionContextGroupClient.js +0 -86
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +0 -20
- package/src/api/interop/fdc3/PrivateChannelClient.js +0 -90
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +0 -55
- package/src/api/interop/fdc3/PrivateChannelProvider.js +0 -276
- package/src/api/interop/fdc3/documentationStub.d.ts +0 -14
- package/src/api/interop/fdc3/documentationStub.js +0 -17
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +0 -205
- package/src/api/interop/fdc3/fdc3-1.2.js +0 -435
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +0 -298
- package/src/api/interop/fdc3/fdc3-2.0.js +0 -479
- package/src/api/interop/fdc3/fdc3.d.ts +0 -12
- package/src/api/interop/fdc3/fdc3.js +0 -35
- package/src/api/interop/fdc3/overrideCheck.d.ts +0 -4
- package/src/api/interop/fdc3/overrideCheck.js +0 -32
- package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +0 -53
- package/src/api/interop/fdc3/shapes/fdc3v1.js +0 -4
- package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +0 -75
- package/src/api/interop/fdc3/shapes/fdc3v2.js +0 -2
- package/src/api/interop/fdc3/utils.d.ts +0 -45
- package/src/api/interop/fdc3/utils.js +0 -239
- package/src/api/interop/fdc3/versions.d.ts +0 -1
- package/src/api/interop/fdc3/versions.js +0 -2
- package/src/api/interop/index.d.ts +0 -12
- package/src/api/interop/index.js +0 -28
- package/src/api/interop/utils.d.ts +0 -18
- package/src/api/interop/utils.js +0 -61
- package/src/api/me.d.ts +0 -40
- package/src/api/me.js +0 -134
- package/src/api/platform/Factory.d.ts +0 -171
- package/src/api/platform/Factory.js +0 -240
- package/src/api/platform/Instance.d.ts +0 -653
- package/src/api/platform/Instance.js +0 -834
- package/src/api/platform/common-utils.d.ts +0 -7
- package/src/api/platform/common-utils.js +0 -16
- package/src/api/platform/index.d.ts +0 -12
- package/src/api/platform/index.js +0 -28
- package/src/api/platform/layout/Factory.d.ts +0 -91
- package/src/api/platform/layout/Factory.js +0 -151
- package/src/api/platform/layout/Instance.d.ts +0 -192
- package/src/api/platform/layout/Instance.js +0 -224
- package/src/api/platform/layout/controllers/layout-content-cache.d.ts +0 -9
- package/src/api/platform/layout/controllers/layout-content-cache.js +0 -54
- package/src/api/platform/layout/controllers/layout-entities-controller.d.ts +0 -119
- package/src/api/platform/layout/controllers/layout-entities-controller.js +0 -287
- package/src/api/platform/layout/entities/layout-entities.d.ts +0 -427
- package/src/api/platform/layout/entities/layout-entities.js +0 -504
- package/src/api/platform/layout/entities/shapes.d.ts +0 -6
- package/src/api/platform/layout/entities/shapes.js +0 -2
- package/src/api/platform/layout/index.d.ts +0 -11
- package/src/api/platform/layout/index.js +0 -27
- package/src/api/platform/layout/layout.constants.d.ts +0 -1
- package/src/api/platform/layout/layout.constants.js +0 -4
- package/src/api/platform/layout/shapes.d.ts +0 -16
- package/src/api/platform/layout/shapes.js +0 -2
- package/src/api/platform/layout/utils/layout-traversal.d.ts +0 -4
- package/src/api/platform/layout/utils/layout-traversal.js +0 -65
- package/src/api/platform/provider.d.ts +0 -510
- package/src/api/platform/provider.js +0 -2
- package/src/api/snapshot-source/Factory.d.ts +0 -53
- package/src/api/snapshot-source/Factory.js +0 -81
- package/src/api/snapshot-source/Instance.d.ts +0 -53
- package/src/api/snapshot-source/Instance.js +0 -154
- package/src/api/snapshot-source/index.d.ts +0 -12
- package/src/api/snapshot-source/index.js +0 -28
- package/src/api/snapshot-source/utils.d.ts +0 -2
- package/src/api/snapshot-source/utils.js +0 -6
- package/src/api/system/index.d.ts +0 -1468
- package/src/api/system/index.js +0 -1851
- package/src/api/view/Factory.d.ts +0 -88
- package/src/api/view/Factory.js +0 -141
- package/src/api/view/Instance.d.ts +0 -601
- package/src/api/view/Instance.js +0 -671
- package/src/api/view/index.d.ts +0 -12
- package/src/api/view/index.js +0 -28
- package/src/api/webcontents/main.d.ts +0 -922
- package/src/api/webcontents/main.js +0 -1046
- package/src/api/window/Factory.d.ts +0 -96
- package/src/api/window/Factory.js +0 -142
- package/src/api/window/Instance.d.ts +0 -1598
- package/src/api/window/Instance.js +0 -1851
- package/src/api/window/index.d.ts +0 -14
- package/src/api/window/index.js +0 -30
- package/src/browser.d.ts +0 -10
- package/src/browser.js +0 -36
- package/src/environment/browser.d.ts +0 -29
- package/src/environment/browser.js +0 -60
- package/src/environment/environment.d.ts +0 -33
- package/src/environment/environment.js +0 -4
- package/src/environment/mockEnvironment.d.ts +0 -27
- package/src/environment/mockEnvironment.js +0 -61
- package/src/environment/node-env.d.ts +0 -29
- package/src/environment/node-env.js +0 -72
- package/src/fdc3.d.ts +0 -3
- package/src/fdc3.js +0 -9
- package/src/mock.d.ts +0 -3
- package/src/mock.js +0 -18
- package/src/namespaces.d.ts +0 -22
- package/src/namespaces.js +0 -26
- package/src/shapes/ERROR_BOX_TYPES.d.ts +0 -1
- package/src/shapes/ERROR_BOX_TYPES.js +0 -2
- package/src/shapes/WebOptions.d.ts +0 -13
- package/src/shapes/WebOptions.js +0 -2
- package/src/shapes/WindowOptions.d.ts +0 -43
- package/src/shapes/WindowOptions.js +0 -2
- package/src/shapes/protocol.d.ts +0 -204
- package/src/shapes/protocol.js +0 -2
- package/src/transport/mockWire.d.ts +0 -11
- package/src/transport/mockWire.js +0 -26
- package/src/transport/transport-errors.d.ts +0 -31
- package/src/transport/transport-errors.js +0 -79
- package/src/transport/transport.d.ts +0 -73
- package/src/transport/transport.js +0 -219
- package/src/transport/wire.d.ts +0 -77
- package/src/transport/wire.js +0 -36
- package/src/util/asyncFilter.d.ts +0 -1
- package/src/util/asyncFilter.js +0 -7
- package/src/util/channel-api-relay.d.ts +0 -13
- package/src/util/channel-api-relay.js +0 -47
- package/src/util/errors.d.ts +0 -10
- package/src/util/errors.js +0 -12
- package/src/util/exhaustive.d.ts +0 -1
- package/src/util/exhaustive.js +0 -7
- package/src/util/http.d.ts +0 -11
- package/src/util/http.js +0 -90
- package/src/util/inaccessibleObject.d.ts +0 -2
- package/src/util/inaccessibleObject.js +0 -49
- package/src/util/lazy.d.ts +0 -34
- package/src/util/lazy.js +0 -54
- package/src/util/normalize-config.d.ts +0 -3
- package/src/util/normalize-config.js +0 -52
- package/src/util/promises.d.ts +0 -5
- package/src/util/promises.js +0 -27
- package/src/util/ref-counter.d.ts +0 -7
- package/src/util/ref-counter.js +0 -52
- package/src/util/reversible-map.d.ts +0 -11
- package/src/util/reversible-map.js +0 -49
- package/src/util/runtimeVersioning.d.ts +0 -3
- package/src/util/runtimeVersioning.js +0 -25
- package/src/util/utilTypes.d.ts +0 -8
- package/src/util/utilTypes.js +0 -2
- package/src/util/validate.d.ts +0 -3
- package/src/util/validate.js +0 -11
|
@@ -1,1468 +0,0 @@
|
|
|
1
|
-
import type * as OpenFin from '../../OpenFin';
|
|
2
|
-
import { EmitterBase } from '../base';
|
|
3
|
-
import { Transport } from '../../transport/transport';
|
|
4
|
-
type Identity = OpenFin.Identity;
|
|
5
|
-
type ProxyInfo = OpenFin.ProxyInfo;
|
|
6
|
-
type ProxyConfig = OpenFin.ProxyConfig;
|
|
7
|
-
type InstalledApps = OpenFin.InstalledApps;
|
|
8
|
-
type LogInfo = OpenFin.LogInfo;
|
|
9
|
-
type LogLevel = OpenFin.LogLevel;
|
|
10
|
-
type GetLogRequestType = OpenFin.GetLogRequestType;
|
|
11
|
-
type RegistryInfo = OpenFin.RegistryInfo;
|
|
12
|
-
type EntityInfo = OpenFin.EntityInfo;
|
|
13
|
-
type Entity = OpenFin.ApplicationType;
|
|
14
|
-
type ApplicationState = OpenFin.ApplicationState;
|
|
15
|
-
type ApplicationWindowInfo = OpenFin.ApplicationWindowInfo;
|
|
16
|
-
type PrinterInfo = OpenFin.PrinterInfo;
|
|
17
|
-
/**
|
|
18
|
-
* An object representing the core of OpenFin Runtime. Allows the developer
|
|
19
|
-
* to perform system-level actions, such as accessing logs, viewing processes,
|
|
20
|
-
* clearing the cache and exiting the runtime as well as listen to {@link OpenFin.SystemEvents system events}.
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
export default class System extends EmitterBase<OpenFin.SystemEvent> {
|
|
24
|
-
/**
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
constructor(wire: Transport);
|
|
28
|
-
private sendExternalProcessRequest;
|
|
29
|
-
/**
|
|
30
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
|
31
|
-
* @param eventType - The type of the event.
|
|
32
|
-
* @param listener - Called whenever an event of the specified type occurs.
|
|
33
|
-
* @param options - Option to support event timestamps.
|
|
34
|
-
*
|
|
35
|
-
* @function addListener
|
|
36
|
-
* @memberof System
|
|
37
|
-
* @instance
|
|
38
|
-
* @tutorial System.EventEmitter
|
|
39
|
-
*/
|
|
40
|
-
/**
|
|
41
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
|
42
|
-
* @param eventType - The type of the event.
|
|
43
|
-
* @param listener - Called whenever an event of the specified type occurs.
|
|
44
|
-
* @param options - Option to support event timestamps.
|
|
45
|
-
*
|
|
46
|
-
* @function on
|
|
47
|
-
* @memberof System
|
|
48
|
-
* @instance
|
|
49
|
-
* @tutorial System.EventEmitter
|
|
50
|
-
*/
|
|
51
|
-
/**
|
|
52
|
-
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
53
|
-
* @param eventType - The type of the event.
|
|
54
|
-
* @param listener - The callback function.
|
|
55
|
-
* @param options - Option to support event timestamps.
|
|
56
|
-
*
|
|
57
|
-
* @function once
|
|
58
|
-
* @memberof System
|
|
59
|
-
* @instance
|
|
60
|
-
* @tutorial System.EventEmitter
|
|
61
|
-
*/
|
|
62
|
-
/**
|
|
63
|
-
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
64
|
-
* @param eventType - The type of the event.
|
|
65
|
-
* @param listener - The callback function.
|
|
66
|
-
* @param options - Option to support event timestamps.
|
|
67
|
-
*
|
|
68
|
-
* @function prependListener
|
|
69
|
-
* @memberof System
|
|
70
|
-
* @instance
|
|
71
|
-
* @tutorial System.EventEmitter
|
|
72
|
-
*/
|
|
73
|
-
/**
|
|
74
|
-
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
75
|
-
* The listener is added to the beginning of the listeners array.
|
|
76
|
-
* @param eventType - The type of the event.
|
|
77
|
-
* @param listener - The callback function.
|
|
78
|
-
* @param options - Option to support event timestamps.
|
|
79
|
-
*
|
|
80
|
-
* @function prependOnceListener
|
|
81
|
-
* @memberof System
|
|
82
|
-
* @instance
|
|
83
|
-
* @tutorial System.EventEmitter
|
|
84
|
-
*/
|
|
85
|
-
/**
|
|
86
|
-
* Remove a listener from the listener array for the specified event.
|
|
87
|
-
* Caution: Calling this method changes the array indices in the listener array behind the listener.
|
|
88
|
-
* @param eventType - The type of the event.
|
|
89
|
-
* @param listener - The callback function.
|
|
90
|
-
* @param options - Option to support event timestamps.
|
|
91
|
-
*
|
|
92
|
-
* @function removeListener
|
|
93
|
-
* @memberof System
|
|
94
|
-
* @instance
|
|
95
|
-
* @tutorial System.EventEmitter
|
|
96
|
-
*/
|
|
97
|
-
/**
|
|
98
|
-
* Removes all listeners, or those of the specified event.
|
|
99
|
-
* @param eventType - The type of the event.
|
|
100
|
-
*
|
|
101
|
-
* @function removeAllListeners
|
|
102
|
-
* @memberof System
|
|
103
|
-
* @instance
|
|
104
|
-
* @tutorial System.EventEmitter
|
|
105
|
-
*/
|
|
106
|
-
/**
|
|
107
|
-
* Returns the version of the runtime. The version contains the major, minor,
|
|
108
|
-
* build and revision numbers.
|
|
109
|
-
*
|
|
110
|
-
* @example
|
|
111
|
-
* ```js
|
|
112
|
-
* fin.System.getVersion().then(v => console.log(v)).catch(err => console.log(err));
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
115
|
-
getVersion(): Promise<string>;
|
|
116
|
-
/**
|
|
117
|
-
* Clears cached data containing application resource
|
|
118
|
-
* files (images, HTML, JavaScript files), cookies, and items stored in the
|
|
119
|
-
* Local Storage.
|
|
120
|
-
* @param options - See below for details.
|
|
121
|
-
*
|
|
122
|
-
* @remarks For more information on the accepted options, see the following pages:
|
|
123
|
-
* * cache: browsing data cache for html files and images ([caching](https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching))
|
|
124
|
-
* * cookies: browser [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies)
|
|
125
|
-
* * localStorage: browser data that can be used across sessions ([local storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage))
|
|
126
|
-
* * appcache: html5 [application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache)
|
|
127
|
-
* @example
|
|
128
|
-
* ```js
|
|
129
|
-
* const clearCacheOptions = {
|
|
130
|
-
* appcache: true,
|
|
131
|
-
* cache: true,
|
|
132
|
-
* cookies: true,
|
|
133
|
-
* localStorage: true
|
|
134
|
-
* };
|
|
135
|
-
* fin.System.clearCache(clearCacheOptions).then(() => console.log('Cache cleared')).catch(err => console.log(err));
|
|
136
|
-
* ```
|
|
137
|
-
*
|
|
138
|
-
*/
|
|
139
|
-
clearCache(options: OpenFin.ClearCacheOption): Promise<void>;
|
|
140
|
-
/**
|
|
141
|
-
* Clears all cached data when OpenFin Runtime exits.
|
|
142
|
-
*
|
|
143
|
-
* @example
|
|
144
|
-
* ```js
|
|
145
|
-
* fin.System.deleteCacheOnExit().then(() => console.log('Deleted Cache')).catch(err => console.log(err));
|
|
146
|
-
* ```
|
|
147
|
-
*/
|
|
148
|
-
deleteCacheOnExit(): Promise<void>;
|
|
149
|
-
/**
|
|
150
|
-
* Exits the Runtime.
|
|
151
|
-
*
|
|
152
|
-
* @example
|
|
153
|
-
* ```js
|
|
154
|
-
* fin.System.exit().then(() => console.log('exit')).catch(err => console.log(err));
|
|
155
|
-
* ```
|
|
156
|
-
*/
|
|
157
|
-
exit(): Promise<void>;
|
|
158
|
-
/**
|
|
159
|
-
* Fetches a JSON manifest using the browser process and returns a Javascript object.
|
|
160
|
-
* @param manifestUrl The URL of the manifest to fetch.
|
|
161
|
-
*
|
|
162
|
-
* @example
|
|
163
|
-
* ```js
|
|
164
|
-
* const manifest = await fin.System.fetchManifest('https://www.path-to-manifest.com');
|
|
165
|
-
* console.log(manifest);
|
|
166
|
-
* ```
|
|
167
|
-
*/
|
|
168
|
-
fetchManifest(manifestUrl: string): Promise<any>;
|
|
169
|
-
/**
|
|
170
|
-
* Writes any unwritten cookies data to disk.
|
|
171
|
-
*
|
|
172
|
-
* @example
|
|
173
|
-
* ```js
|
|
174
|
-
* fin.System.flushCookieStore()
|
|
175
|
-
* .then(() => console.log('success'))
|
|
176
|
-
* .catch(err => console.error(err));
|
|
177
|
-
* ```
|
|
178
|
-
*/
|
|
179
|
-
flushCookieStore(): Promise<void>;
|
|
180
|
-
/**
|
|
181
|
-
* Retrieves an array of data (name, ids, bounds) for all application windows.
|
|
182
|
-
*
|
|
183
|
-
* @example
|
|
184
|
-
* ```js
|
|
185
|
-
* fin.System.getAllWindows().then(wins => console.log(wins)).catch(err => console.log(err));
|
|
186
|
-
* ```
|
|
187
|
-
*/
|
|
188
|
-
getAllWindows(): Promise<Array<ApplicationWindowInfo>>;
|
|
189
|
-
/**
|
|
190
|
-
* Retrieves an array of data for all applications.
|
|
191
|
-
*
|
|
192
|
-
* @example
|
|
193
|
-
* ```js
|
|
194
|
-
* fin.System.getAllApplications().then(apps => console.log(apps)).catch(err => console.log(err));
|
|
195
|
-
* ```
|
|
196
|
-
*/
|
|
197
|
-
getAllApplications(): Promise<Array<ApplicationState>>;
|
|
198
|
-
/**
|
|
199
|
-
* Retrieves the command line argument string that started OpenFin Runtime.
|
|
200
|
-
*
|
|
201
|
-
* @example
|
|
202
|
-
* ```js
|
|
203
|
-
* fin.System.getCommandLineArguments().then(args => console.log(args)).catch(err => console.log(err));
|
|
204
|
-
* ```
|
|
205
|
-
*/
|
|
206
|
-
getCommandLineArguments(): Promise<string>;
|
|
207
|
-
/**
|
|
208
|
-
* Get the current state of the crash reporter.
|
|
209
|
-
*
|
|
210
|
-
* @example
|
|
211
|
-
* ```js
|
|
212
|
-
* fin.System.getCrashReporterState().then(state => console.log(state)).catch(err => console.log(err));
|
|
213
|
-
* ```
|
|
214
|
-
*/
|
|
215
|
-
getCrashReporterState(): Promise<OpenFin.CrashReporterState>;
|
|
216
|
-
/**
|
|
217
|
-
* Start the crash reporter if not already running.
|
|
218
|
-
* @param options - configure crash reporter
|
|
219
|
-
*
|
|
220
|
-
* @remarks You can optionally specify `diagnosticsMode` to have the logs sent to
|
|
221
|
-
* OpenFin on runtime close. (NOTE: `diagnosticsMode` will turn on verbose logging and disable the sandbox
|
|
222
|
-
* for newly launched renderer processes. See https://developers.openfin.co/of-docs/docs/debugging#diagnostics-mode for
|
|
223
|
-
* more details.)
|
|
224
|
-
*
|
|
225
|
-
* @example
|
|
226
|
-
* ```js
|
|
227
|
-
* fin.System.startCrashReporter({diagnosticsMode: true}).then(reporter => console.log(reporter)).catch(err => console.log(err));
|
|
228
|
-
* ```
|
|
229
|
-
*/
|
|
230
|
-
startCrashReporter(options: OpenFin.CrashReporterOptions | {
|
|
231
|
-
diagnosticMode: boolean;
|
|
232
|
-
}): Promise<OpenFin.CrashReporterState>;
|
|
233
|
-
/**
|
|
234
|
-
* Returns a hex encoded hash of the machine id and the currently logged in user name.
|
|
235
|
-
* This is the recommended way to uniquely identify a user / machine combination.
|
|
236
|
-
*
|
|
237
|
-
* @remarks For Windows systems this is a sha256 hash of the machine ID set in the registry key:
|
|
238
|
-
* `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\MachineGuid` and `USERNAME`.
|
|
239
|
-
*
|
|
240
|
-
* For OSX systems, a native-level call is used to get the machine ID.
|
|
241
|
-
*
|
|
242
|
-
* @example
|
|
243
|
-
* ```js
|
|
244
|
-
* fin.System.getUniqueUserId().then(id => console.log(id)).catch(err => console.log(err));
|
|
245
|
-
* ```
|
|
246
|
-
* @static
|
|
247
|
-
*/
|
|
248
|
-
getUniqueUserId(): Promise<string>;
|
|
249
|
-
/**
|
|
250
|
-
* Retrieves a frame info object for the uuid and name passed in
|
|
251
|
-
* @param uuid - The UUID of the target.
|
|
252
|
-
* @param name - The name of the target.
|
|
253
|
-
*
|
|
254
|
-
* @remarks The possible types are 'window', 'iframe', 'external connection' or 'unknown'.
|
|
255
|
-
* @example
|
|
256
|
-
* ```js
|
|
257
|
-
* const entityUuid = 'OpenfinPOC';
|
|
258
|
-
* const entityName = '40c74b5d-ed98-40f7-853f-e3d3c2699175';
|
|
259
|
-
* fin.System.getEntityInfo(entityUuid, entityName).then(info => console.log(info)).catch(err => console.log(err));
|
|
260
|
-
*
|
|
261
|
-
* // example info shape
|
|
262
|
-
* {
|
|
263
|
-
* "uuid": "OpenfinPOC",
|
|
264
|
-
* "name": "40c74b5d-ed98-40f7-853f-e3d3c2699175",
|
|
265
|
-
* "parent": {
|
|
266
|
-
* "uuid": "OpenfinPOC",
|
|
267
|
-
* "name": "OpenfinPOC"
|
|
268
|
-
* },
|
|
269
|
-
* "entityType": "iframe"
|
|
270
|
-
* }
|
|
271
|
-
* ```
|
|
272
|
-
*/
|
|
273
|
-
getEntityInfo(uuid: string, name: string): Promise<EntityInfo>;
|
|
274
|
-
/**
|
|
275
|
-
* Gets the value of a given environment variable on the computer on which the runtime is installed
|
|
276
|
-
*
|
|
277
|
-
* @example
|
|
278
|
-
* ```js
|
|
279
|
-
* fin.System.getEnvironmentVariable('HOME').then(env => console.log(env)).catch(err => console.log(err));
|
|
280
|
-
* ```
|
|
281
|
-
*/
|
|
282
|
-
getEnvironmentVariable(envName: string): Promise<string>;
|
|
283
|
-
/**
|
|
284
|
-
* Get current focused window.
|
|
285
|
-
*
|
|
286
|
-
* @example
|
|
287
|
-
* ```js
|
|
288
|
-
* fin.System.getFocusedWindow().then(winInfo => console.log(winInfo)).catch(err => console.log(err));
|
|
289
|
-
* ```
|
|
290
|
-
*/
|
|
291
|
-
getFocusedWindow(): Promise<OpenFin.Identity | null>;
|
|
292
|
-
/**
|
|
293
|
-
* Returns information about the given app's certification status
|
|
294
|
-
*
|
|
295
|
-
* @example
|
|
296
|
-
* ```js
|
|
297
|
-
* const manifestUrl = "http://localhost:1234/app.json"
|
|
298
|
-
* try {
|
|
299
|
-
* const certificationInfo = await fin.System.isAppCertified(manifestUrl);
|
|
300
|
-
* } catch(err) {
|
|
301
|
-
* console.error(err)
|
|
302
|
-
* }
|
|
303
|
-
* ```
|
|
304
|
-
*/
|
|
305
|
-
isAppCertified(manifestUrl: string): Promise<OpenFin.CertifiedAppInfo>;
|
|
306
|
-
/**
|
|
307
|
-
* Returns an array of all the installed runtime versions in an object.
|
|
308
|
-
*
|
|
309
|
-
* @example
|
|
310
|
-
* ```js
|
|
311
|
-
* fin.System.getInstalledRuntimes().then(runtimes => console.log(runtimes)).catch(err => console.log(err));
|
|
312
|
-
* ```
|
|
313
|
-
*/
|
|
314
|
-
getInstalledRuntimes(): Promise<string[]>;
|
|
315
|
-
getInstalledApps(): Promise<InstalledApps>;
|
|
316
|
-
/**
|
|
317
|
-
* Retrieves the contents of the log with the specified filename.
|
|
318
|
-
* @param options A object that id defined by the GetLogRequestType interface
|
|
319
|
-
*
|
|
320
|
-
* @example
|
|
321
|
-
* ```js
|
|
322
|
-
* async function getLog() {
|
|
323
|
-
* const logs = await fin.System.getLogList();
|
|
324
|
-
* return await fin.System.getLog(logs[0]);
|
|
325
|
-
* }
|
|
326
|
-
*
|
|
327
|
-
* getLog().then(log => console.log(log)).catch(err => console.log(err));
|
|
328
|
-
* ```
|
|
329
|
-
*/
|
|
330
|
-
getLog(options: GetLogRequestType): Promise<string>;
|
|
331
|
-
/**
|
|
332
|
-
* Returns a unique identifier (UUID) provided by the machine.
|
|
333
|
-
*
|
|
334
|
-
* @example
|
|
335
|
-
* ```js
|
|
336
|
-
* fin.System.getMachineId().then(id => console.log(id)).catch(err => console.log(err));
|
|
337
|
-
* ```
|
|
338
|
-
*/
|
|
339
|
-
getMachineId(): Promise<string>;
|
|
340
|
-
/**
|
|
341
|
-
* Returns the minimum (inclusive) logging level that is currently being written to the log.
|
|
342
|
-
*
|
|
343
|
-
* @example
|
|
344
|
-
* ```js
|
|
345
|
-
* fin.System.getMinLogLevel().then(level => console.log(level)).catch(err => console.log(err));
|
|
346
|
-
* ```
|
|
347
|
-
*/
|
|
348
|
-
getMinLogLevel(): Promise<LogLevel>;
|
|
349
|
-
/**
|
|
350
|
-
* Retrieves an array containing information for each log file.
|
|
351
|
-
*
|
|
352
|
-
* @example
|
|
353
|
-
* ```js
|
|
354
|
-
* fin.System.getLogList().then(logList => console.log(logList)).catch(err => console.log(err));
|
|
355
|
-
* ```
|
|
356
|
-
*/
|
|
357
|
-
getLogList(): Promise<Array<LogInfo>>;
|
|
358
|
-
/**
|
|
359
|
-
* Retrieves an object that contains data about the monitor setup of the
|
|
360
|
-
* computer that the runtime is running on.
|
|
361
|
-
*
|
|
362
|
-
* @example
|
|
363
|
-
* ```js
|
|
364
|
-
* fin.System.getMonitorInfo().then(monitorInfo => console.log(monitorInfo)).catch(err => console.log(err));
|
|
365
|
-
* ```
|
|
366
|
-
*/
|
|
367
|
-
getMonitorInfo(): Promise<OpenFin.MonitorInfo>;
|
|
368
|
-
/**
|
|
369
|
-
* Returns the mouse in virtual screen coordinates (left, top).
|
|
370
|
-
*
|
|
371
|
-
* @example
|
|
372
|
-
* ```js
|
|
373
|
-
* fin.System.getMousePosition().then(mousePosition => console.log(mousePosition)).catch(err => console.log(err));
|
|
374
|
-
* ```
|
|
375
|
-
*/
|
|
376
|
-
getMousePosition(): Promise<OpenFin.PointTopLeft>;
|
|
377
|
-
/**
|
|
378
|
-
* Retrieves an array of all of the runtime processes that are currently
|
|
379
|
-
* running. Each element in the array is an object containing the uuid
|
|
380
|
-
* and the name of the application to which the process belongs.
|
|
381
|
-
* @deprecated Please use our new set of process APIs:
|
|
382
|
-
* {@link Window._Window#getProcessInfo Window.getProcessInfo}
|
|
383
|
-
* {@link View.View#getProcessInfo View.getProcessInfo}
|
|
384
|
-
* {@link Application.Application#getProcessInfo Application.getProcessInfo}
|
|
385
|
-
* {@link System#getAllProcessInfo System.getAllProcessInfo}
|
|
386
|
-
*
|
|
387
|
-
* @example
|
|
388
|
-
* ```js
|
|
389
|
-
* fin.System.getProcessList().then(ProcessList => console.log(ProcessList)).catch(err => console.log(err));
|
|
390
|
-
* ```
|
|
391
|
-
*/
|
|
392
|
-
getProcessList(): Promise<Array<any>>;
|
|
393
|
-
/**
|
|
394
|
-
* Retrieves all process information.
|
|
395
|
-
*
|
|
396
|
-
* @remarks This includes the browser process and every process associated to all entities (windows and views).
|
|
397
|
-
*
|
|
398
|
-
* @example
|
|
399
|
-
* ```js
|
|
400
|
-
* const allProcessInfo = await fin.System.getAllProcessInfo();
|
|
401
|
-
* ```
|
|
402
|
-
* @experimental
|
|
403
|
-
*/
|
|
404
|
-
getAllProcessInfo(): Promise<OpenFin.SystemProcessInfo>;
|
|
405
|
-
/**
|
|
406
|
-
* Retrieves the Proxy settings.
|
|
407
|
-
*
|
|
408
|
-
* @example
|
|
409
|
-
* ```js
|
|
410
|
-
* fin.System.getProxySettings().then(ProxySetting => console.log(ProxySetting)).catch(err => console.log(err));
|
|
411
|
-
*
|
|
412
|
-
* //This response has the following shape:
|
|
413
|
-
* {
|
|
414
|
-
* config: {
|
|
415
|
-
* proxyAddress: "proxyAddress", //the configured Proxy Address
|
|
416
|
-
* proxyPort: 0, //the configured Proxy port
|
|
417
|
-
* type: "system" //Proxy Type
|
|
418
|
-
* },
|
|
419
|
-
* system: {
|
|
420
|
-
* autoConfigUrl: "",
|
|
421
|
-
* bypass: "",
|
|
422
|
-
* enabled: false,
|
|
423
|
-
* proxy: ""
|
|
424
|
-
* }
|
|
425
|
-
* }
|
|
426
|
-
* ```
|
|
427
|
-
*/
|
|
428
|
-
getProxySettings(): Promise<ProxyInfo>;
|
|
429
|
-
/**
|
|
430
|
-
* Returns information about the running Runtime in an object.
|
|
431
|
-
*
|
|
432
|
-
* @example
|
|
433
|
-
* ```js
|
|
434
|
-
* fin.System.getRuntimeInfo().then(RuntimeInfo => console.log(RuntimeInfo)).catch(err => console.log(err));
|
|
435
|
-
* ```
|
|
436
|
-
*/
|
|
437
|
-
getRuntimeInfo(): Promise<OpenFin.RuntimeInfo>;
|
|
438
|
-
/**
|
|
439
|
-
* Returns information about the running RVM in an object.
|
|
440
|
-
*
|
|
441
|
-
* @example
|
|
442
|
-
* ```js
|
|
443
|
-
* fin.System.getRvmInfo().then(RvmInfo => console.log(RvmInfo)).catch(err => console.log(err));
|
|
444
|
-
* ```
|
|
445
|
-
*/
|
|
446
|
-
getRvmInfo(): Promise<OpenFin.RVMInfo>;
|
|
447
|
-
/**
|
|
448
|
-
* Retrieves system information.
|
|
449
|
-
*
|
|
450
|
-
* @example
|
|
451
|
-
* ```js
|
|
452
|
-
* fin.System.getHostSpecs().then(specs => console.log(specs)).catch(err => console.log(err));
|
|
453
|
-
* ```
|
|
454
|
-
*/
|
|
455
|
-
getHostSpecs(): Promise<OpenFin.HostSpecs>;
|
|
456
|
-
/**
|
|
457
|
-
* Runs an executable or batch file. A path to the file must be included in options.
|
|
458
|
-
* <br> A uuid may be optionally provided. If not provided, OpenFin will create a uuid for the new process.
|
|
459
|
-
* <br> Note: This method is restricted by default and must be enabled via
|
|
460
|
-
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>. Also, this api has an enhanced permission set to make it less dangerous. So application owners can only allow to launch the assets owned by the application, the enabled downloaded files or the restricted executables.
|
|
461
|
-
* @param options A object that is defined in the ExternalProcessRequestType interface
|
|
462
|
-
*
|
|
463
|
-
* @remarks If an unused UUID is provided in options, it will be used. If no UUID is provided, OpenFin will assign one.
|
|
464
|
-
* This api has an enhanced permission set to make it less dangerous. So application owners can only allow to launch the
|
|
465
|
-
* assets owned by the application, the enabled downloaded files or the restricted executables.
|
|
466
|
-
*
|
|
467
|
-
* **Note:** Since _appAssets_ relies on the RVM, which is missing on MAC_OS, 'alias' is not available. Instead provide
|
|
468
|
-
* the full path e.g. _/Applications/Calculator.app/Contents/MacOS/Calculator_.
|
|
469
|
-
*
|
|
470
|
-
* @example
|
|
471
|
-
* Basic Example:
|
|
472
|
-
* ```js
|
|
473
|
-
* fin.System.launchExternalProcess({
|
|
474
|
-
* path: 'notepad',
|
|
475
|
-
* arguments: '',
|
|
476
|
-
* listener: function (result) {
|
|
477
|
-
* console.log('the exit code', result.exitCode);
|
|
478
|
-
* }
|
|
479
|
-
* }).then(processIdentity => {
|
|
480
|
-
* console.log(processIdentity);
|
|
481
|
-
* }).catch(error => {
|
|
482
|
-
* console.log(error);
|
|
483
|
-
* });
|
|
484
|
-
* ```
|
|
485
|
-
*
|
|
486
|
-
* Promise resolution:
|
|
487
|
-
*
|
|
488
|
-
* ```js
|
|
489
|
-
* //This response has the following shape:
|
|
490
|
-
* {
|
|
491
|
-
* uuid: "FB3E6E36-0976-4C2B-9A09-FB2E54D2F1BB" // The mapped UUID which identifies the launched process
|
|
492
|
-
* }
|
|
493
|
-
* ```
|
|
494
|
-
*
|
|
495
|
-
* Listener callback:
|
|
496
|
-
* ```js
|
|
497
|
-
* //This response has the following shape:
|
|
498
|
-
* {
|
|
499
|
-
* topic: "exited", // Or "released" on a call to releaseExternalProcess
|
|
500
|
-
* uuid: "FB3E6E36-0976-4C2B-9A09-FB2E54D2F1BB", // The mapped UUID which identifies the launched process
|
|
501
|
-
* exitCode: 0 // Process exit code
|
|
502
|
-
* }
|
|
503
|
-
* ```
|
|
504
|
-
*
|
|
505
|
-
* By specifying a lifetime, an external process can live as long the window/application that launched it or
|
|
506
|
-
* persist after the application exits. The default value is null, which is equivalent to 'persist', meaning
|
|
507
|
-
* the process lives on after the application exits:
|
|
508
|
-
*
|
|
509
|
-
* ```js
|
|
510
|
-
* fin.System.launchExternalProcess({
|
|
511
|
-
* path: 'notepad',
|
|
512
|
-
* arguments: '',
|
|
513
|
-
* listener: (result) => {
|
|
514
|
-
* console.log('the exit code', result.exitCode);
|
|
515
|
-
* },
|
|
516
|
-
* lifetime: 'window'
|
|
517
|
-
* }).then(processIdentity => {
|
|
518
|
-
* console.log(processIdentity);
|
|
519
|
-
* }).catch(error => {
|
|
520
|
-
* console.log(error);
|
|
521
|
-
* });
|
|
522
|
-
* ```
|
|
523
|
-
*
|
|
524
|
-
* Note: A process that exits when the window/application exits cannot be released via fin.desktop.System.releaseExternalProcess.
|
|
525
|
-
*
|
|
526
|
-
* By specifying a cwd, it will set current working directory when launching an external process:
|
|
527
|
-
*
|
|
528
|
-
* ```js
|
|
529
|
-
* fin.System.launchExternalProcess({
|
|
530
|
-
* path: 'cmd.exe',
|
|
531
|
-
* cwd: 'c:\\temp',
|
|
532
|
-
* arguments: '',
|
|
533
|
-
* listener: (result) => {
|
|
534
|
-
* console.log('the exit code', result.exitCode);
|
|
535
|
-
* }
|
|
536
|
-
* }).then(processIdentity => {
|
|
537
|
-
* console.log(processIdentity);
|
|
538
|
-
* }).catch(error => {
|
|
539
|
-
* console.log(error);
|
|
540
|
-
* });
|
|
541
|
-
* ```
|
|
542
|
-
*
|
|
543
|
-
* Example using an alias from app.json appAssets property:
|
|
544
|
-
*
|
|
545
|
-
* ```json
|
|
546
|
-
* "appAssets": [
|
|
547
|
-
* {
|
|
548
|
-
* "src": "exe.zip",
|
|
549
|
-
* "alias": "myApp",
|
|
550
|
-
* "version": "4.12.8",
|
|
551
|
-
* "target": "myApp.exe",
|
|
552
|
-
* "args": "a b c d"
|
|
553
|
-
* },
|
|
554
|
-
* ]
|
|
555
|
-
* ```
|
|
556
|
-
*
|
|
557
|
-
* ```js
|
|
558
|
-
* // When called, if no arguments are passed then the arguments (if any)
|
|
559
|
-
* // are taken from the 'app.json' file, from the 'args' parameter
|
|
560
|
-
* // of the 'appAssets' Object with the relevant 'alias'.
|
|
561
|
-
* fin.System.launchExternalProcess({
|
|
562
|
-
* //Additionally note that the executable found in the zip file specified in appAssets
|
|
563
|
-
* //will default to the one mentioned by appAssets.target
|
|
564
|
-
* //If the the path below refers to a specific path it will override this default
|
|
565
|
-
* alias: 'myApp',
|
|
566
|
-
* listener: (result) => {
|
|
567
|
-
* console.log('the exit code', result.exitCode);
|
|
568
|
-
* }
|
|
569
|
-
* }).then(processIdentity => {
|
|
570
|
-
* console.log(processIdentity);
|
|
571
|
-
* }).catch(error => {
|
|
572
|
-
* console.log(error);
|
|
573
|
-
* });
|
|
574
|
-
* ```
|
|
575
|
-
*
|
|
576
|
-
* Example using an alias but overriding the arguments:
|
|
577
|
-
*
|
|
578
|
-
* ```json
|
|
579
|
-
* "appAssets": [
|
|
580
|
-
* {
|
|
581
|
-
* "src": "exe.zip",
|
|
582
|
-
* "alias": "myApp",
|
|
583
|
-
* "version": "4.12.8",
|
|
584
|
-
* "target": "myApp.exe",
|
|
585
|
-
* "args": "a b c d"
|
|
586
|
-
* },
|
|
587
|
-
* ]
|
|
588
|
-
* ```
|
|
589
|
-
*
|
|
590
|
-
* ```js
|
|
591
|
-
* // If 'arguments' is passed as a parameter it takes precedence
|
|
592
|
-
* // over any 'args' set in the 'app.json'.
|
|
593
|
-
* fin.System.launchExternalProcess({
|
|
594
|
-
* alias: 'myApp',
|
|
595
|
-
* arguments: 'e f g',
|
|
596
|
-
* listener: (result) => {
|
|
597
|
-
* console.log('the exit code', result.exitCode);
|
|
598
|
-
* }
|
|
599
|
-
* }).then(processIdentity => {
|
|
600
|
-
* console.log(processIdentity);
|
|
601
|
-
* }).catch(error => {
|
|
602
|
-
* console.log(error);
|
|
603
|
-
* });
|
|
604
|
-
* ```
|
|
605
|
-
*
|
|
606
|
-
* It is now possible to optionally perform any combination of the following certificate checks
|
|
607
|
-
* against an absolute target via `fin.desktop.System.launchExternalProcess()`:
|
|
608
|
-
*
|
|
609
|
-
* ```js
|
|
610
|
-
* "certificate": {
|
|
611
|
-
* "serial": "3c a5 ...", // A hex string with or without spaces
|
|
612
|
-
* "subject": "O=OpenFin INC., L=New York, ...", // An internally tokenized and comma delimited string allowing partial or full checks of the subject fields
|
|
613
|
-
* "publickey": "3c a5 ...", // A hex string with or without spaces
|
|
614
|
-
* "thumbprint": "3c a5 ...", // A hex string with or without spaces
|
|
615
|
-
* "trusted": true // A boolean indicating that the certificate is trusted and not revoked
|
|
616
|
-
* }
|
|
617
|
-
* ```
|
|
618
|
-
*
|
|
619
|
-
* Providing this information as part of the default configurations for assets in an application's manifest
|
|
620
|
-
* will be added in a future RVM update:
|
|
621
|
-
*
|
|
622
|
-
* ```js
|
|
623
|
-
* fin.System.launchExternalProcess({
|
|
624
|
-
* path: 'C:\\Users\\ExampleUser\\AppData\\Local\\OpenFin\\OpenFinRVM.exe',
|
|
625
|
-
* arguments: '--version',
|
|
626
|
-
* certificate: {
|
|
627
|
-
* trusted: true,
|
|
628
|
-
* subject: 'O=OpenFin INC., L=New York, S=NY, C=US',
|
|
629
|
-
* thumbprint: '3c a5 28 19 83 05 fe 69 88 e6 8f 4b 3a af c5 c5 1b 07 80 5b'
|
|
630
|
-
* },
|
|
631
|
-
* listener: (result) => {
|
|
632
|
-
* console.log('the exit code', result.exitCode);
|
|
633
|
-
* }
|
|
634
|
-
* }).then(processIdentity => {
|
|
635
|
-
* console.log(processIdentity);
|
|
636
|
-
* }).catch(error => {
|
|
637
|
-
* console.log(error);
|
|
638
|
-
* });
|
|
639
|
-
* ```
|
|
640
|
-
*
|
|
641
|
-
* It is possible to launch files that have been downloaded by the user by listening to the window
|
|
642
|
-
* `file-download-completed` event and using the `fileUuid` provided by the event:
|
|
643
|
-
*
|
|
644
|
-
* ```js
|
|
645
|
-
* const win = fin.Window.getCurrentSync();
|
|
646
|
-
* win.addListener('file-download-completed', (evt) => {
|
|
647
|
-
* if (evt.state === 'completed') {
|
|
648
|
-
* fin.System.launchExternalProcess({
|
|
649
|
-
* fileUuid: evt.fileUuid,
|
|
650
|
-
* arguments: '',
|
|
651
|
-
* listener: (result) => {
|
|
652
|
-
* console.log('the exit code', result.exitCode);
|
|
653
|
-
* }
|
|
654
|
-
* }).then(processIdentity => {
|
|
655
|
-
* console.log(processIdentity);
|
|
656
|
-
* }).catch(error => {
|
|
657
|
-
* console.log(error);
|
|
658
|
-
* });
|
|
659
|
-
* }
|
|
660
|
-
* });
|
|
661
|
-
* ```
|
|
662
|
-
*
|
|
663
|
-
* Launching assets specified in the app manifest:
|
|
664
|
-
*
|
|
665
|
-
* Sample appAssets section in app.json
|
|
666
|
-
* ```js
|
|
667
|
-
* "appAssets": [
|
|
668
|
-
* {
|
|
669
|
-
* "src": "http://filesamples.com/exe.zip",
|
|
670
|
-
* "alias": "myApp",
|
|
671
|
-
* "version": "4.12.8",
|
|
672
|
-
* "target": "myApp.exe",
|
|
673
|
-
* "args": "a b c d"
|
|
674
|
-
* },
|
|
675
|
-
* {
|
|
676
|
-
* "src": "http://examples.com/exe.zip",
|
|
677
|
-
* "alias": "myApp2",
|
|
678
|
-
* "version": "5.12.8",
|
|
679
|
-
* "target": "myApp2.exe",
|
|
680
|
-
* "args": "a b c"
|
|
681
|
-
* }
|
|
682
|
-
* ]
|
|
683
|
-
* ```
|
|
684
|
-
*
|
|
685
|
-
* This permission allows for launching of all assets specified in the above appAssets section. ("myApp" and "myApp2"):
|
|
686
|
-
*
|
|
687
|
-
* ```js
|
|
688
|
-
* "permissions": {
|
|
689
|
-
* "System": {
|
|
690
|
-
* "launchExternalProcess": {
|
|
691
|
-
* "enabled": true,
|
|
692
|
-
* "assets": {
|
|
693
|
-
* "enabled": true
|
|
694
|
-
* }
|
|
695
|
-
* }
|
|
696
|
-
* }
|
|
697
|
-
* }
|
|
698
|
-
* ```
|
|
699
|
-
*
|
|
700
|
-
* This permission allows for launching of _only_ the "myApp" asset in the above appAssets section, as defined in `srcRules`:
|
|
701
|
-
* ```js
|
|
702
|
-
* "permissions": {
|
|
703
|
-
* "System": {
|
|
704
|
-
* "launchExternalProcess": {
|
|
705
|
-
* "enabled": true,
|
|
706
|
-
* "assets": {
|
|
707
|
-
* "enabled": true
|
|
708
|
-
* "srcRules": [
|
|
709
|
-
* {
|
|
710
|
-
* "match": [
|
|
711
|
-
* "*://filesamples.com/*"
|
|
712
|
-
* ],
|
|
713
|
-
* "behavior": "allow"
|
|
714
|
-
* },
|
|
715
|
-
* {
|
|
716
|
-
* "match": [
|
|
717
|
-
* "<all_urls>"
|
|
718
|
-
* ],
|
|
719
|
-
* "behavior": "block"
|
|
720
|
-
* }
|
|
721
|
-
* ]
|
|
722
|
-
* }
|
|
723
|
-
* }
|
|
724
|
-
* }
|
|
725
|
-
* }
|
|
726
|
-
* ```
|
|
727
|
-
*
|
|
728
|
-
* Launching downloaded files:
|
|
729
|
-
* ```js
|
|
730
|
-
* "permissions": {
|
|
731
|
-
* "System": {
|
|
732
|
-
* "launchExternalProcess": {
|
|
733
|
-
* "enabled": true,
|
|
734
|
-
* "downloads": {
|
|
735
|
-
* "enabled": true
|
|
736
|
-
* }
|
|
737
|
-
* }
|
|
738
|
-
* }
|
|
739
|
-
* }
|
|
740
|
-
* ```
|
|
741
|
-
*
|
|
742
|
-
* This permission allows to launch all the executables:
|
|
743
|
-
* ```js
|
|
744
|
-
* "permissions": {
|
|
745
|
-
* "System": {
|
|
746
|
-
* "launchExternalProcess": {
|
|
747
|
-
* "enabled": true,
|
|
748
|
-
* "executables": {
|
|
749
|
-
* "enabled": true
|
|
750
|
-
* }
|
|
751
|
-
* }
|
|
752
|
-
* }
|
|
753
|
-
* }
|
|
754
|
-
* ```
|
|
755
|
-
*
|
|
756
|
-
*
|
|
757
|
-
* This permission only allows launching of executables whose file paths match the corresponding `pathRules`:
|
|
758
|
-
* ```js
|
|
759
|
-
* "permissions": {
|
|
760
|
-
* "System": {
|
|
761
|
-
* "launchExternalProcess": {
|
|
762
|
-
* "enabled": true,
|
|
763
|
-
* "executables": {
|
|
764
|
-
* "enabled": true
|
|
765
|
-
* "pathRules": [
|
|
766
|
-
* {
|
|
767
|
-
* "match": [
|
|
768
|
-
* "/Windows/System32/*.exe"
|
|
769
|
-
* ],
|
|
770
|
-
* "behavior": "allow"
|
|
771
|
-
* },
|
|
772
|
-
* {
|
|
773
|
-
* "match": [
|
|
774
|
-
* "*.exe"
|
|
775
|
-
* ],
|
|
776
|
-
* "behavior": "block"
|
|
777
|
-
* }
|
|
778
|
-
* ]
|
|
779
|
-
* }
|
|
780
|
-
* }
|
|
781
|
-
* }
|
|
782
|
-
* }
|
|
783
|
-
* ```
|
|
784
|
-
*/
|
|
785
|
-
launchExternalProcess(options: OpenFin.ExternalProcessRequestType): Promise<Identity>;
|
|
786
|
-
/**
|
|
787
|
-
* Monitors a running process. A pid for the process must be included in options.
|
|
788
|
-
* <br> A uuid may be optionally provided. If not provided, OpenFin will create a uuid for the new process.
|
|
789
|
-
* @param options See tutorial for more details
|
|
790
|
-
*
|
|
791
|
-
* @remarks If an unused uuid is provided in options, it will be used. If no uuid is provided, OpefinFin will assign a uuid.
|
|
792
|
-
* @example
|
|
793
|
-
* ```js
|
|
794
|
-
* fin.System.monitorExternalProcess({
|
|
795
|
-
* pid: 10208,
|
|
796
|
-
* uuid: 'my-external-process', // optional
|
|
797
|
-
* listener: function (result) {
|
|
798
|
-
* console.log('the exit code', result.exitCode);
|
|
799
|
-
* }
|
|
800
|
-
* }).then(processIdentity => console.log(processIdentity)).catch(err => console.log(err));
|
|
801
|
-
* ```
|
|
802
|
-
*/
|
|
803
|
-
monitorExternalProcess(options: OpenFin.ExternalProcessInfo): Promise<Identity>;
|
|
804
|
-
/**
|
|
805
|
-
* Writes the passed message into both the log file and the console.
|
|
806
|
-
* @param level The log level for the entry. Can be either "info", "warning" or "error"
|
|
807
|
-
* @param message The log message text
|
|
808
|
-
*
|
|
809
|
-
* @example
|
|
810
|
-
* ```js
|
|
811
|
-
* fin.System.log("info", "An example log message").then(() => console.log('Log info message')).catch(err => console.log(err));
|
|
812
|
-
* ```
|
|
813
|
-
*/
|
|
814
|
-
log(level: string, message: string): Promise<void>;
|
|
815
|
-
/**
|
|
816
|
-
* Opens the passed URL in the default web browser.
|
|
817
|
-
*
|
|
818
|
-
* @remarks It only supports http(s) and fin(s) protocols by default.
|
|
819
|
-
* In order to use other custom protocols, they have to be enabled via
|
|
820
|
-
* [API security settings](https://developers.openfin.co/docs/api-security).
|
|
821
|
-
* File protocol and file path are not supported.
|
|
822
|
-
* @param url The URL to open
|
|
823
|
-
*
|
|
824
|
-
* @example
|
|
825
|
-
* ```js
|
|
826
|
-
* fin.System.openUrlWithBrowser('https://cdn.openfin.co/docs/javascript/stable/tutorial-System.openUrlWithBrowser.html')
|
|
827
|
-
* .then(() => console.log('Opened URL'))
|
|
828
|
-
* .catch(err => console.log(err));
|
|
829
|
-
* ```
|
|
830
|
-
*
|
|
831
|
-
* Example of permission definition to enable non-default protocols:
|
|
832
|
-
*
|
|
833
|
-
* Note: permission definition should be specified in an app manifest file if there is no DOS settings.
|
|
834
|
-
* Otherwise it has to be specified in both DOS and app manifest files.
|
|
835
|
-
*
|
|
836
|
-
* ```js
|
|
837
|
-
* "permissions": {
|
|
838
|
-
* "System": {
|
|
839
|
-
* "openUrlWithBrowser": {
|
|
840
|
-
* "enabled": true,
|
|
841
|
-
* "protocols": [ "msteams", "slack"]
|
|
842
|
-
* }
|
|
843
|
-
* }
|
|
844
|
-
* }
|
|
845
|
-
* ```
|
|
846
|
-
*/
|
|
847
|
-
openUrlWithBrowser(url: string): Promise<void>;
|
|
848
|
-
/**
|
|
849
|
-
* Removes the process entry for the passed UUID obtained from a prior call
|
|
850
|
-
* of fin.System.launchExternalProcess().
|
|
851
|
-
* @param uuid The UUID for a process obtained from a prior call to fin.desktop.System.launchExternalProcess()
|
|
852
|
-
*
|
|
853
|
-
* @example
|
|
854
|
-
* ```js
|
|
855
|
-
* fin.System.launchExternalProcess({
|
|
856
|
-
* path: "notepad",
|
|
857
|
-
* listener: function (result) {
|
|
858
|
-
* console.log("The exit code", result.exitCode);
|
|
859
|
-
* }
|
|
860
|
-
* })
|
|
861
|
-
* .then(identity => fin.System.releaseExternalProcess(identity.uuid))
|
|
862
|
-
* .then(() => console.log('Process has been unmapped!'))
|
|
863
|
-
* .catch(err => console.log(err));
|
|
864
|
-
* ```
|
|
865
|
-
*/
|
|
866
|
-
releaseExternalProcess(uuid: string): Promise<void>;
|
|
867
|
-
/**
|
|
868
|
-
* Shows the Chromium Developer Tools for the specified window
|
|
869
|
-
* @param identity This is a object that is defined by the Identity interface
|
|
870
|
-
*
|
|
871
|
-
* @tutorial System.showDeveloperTools
|
|
872
|
-
*/
|
|
873
|
-
showDeveloperTools(identity: Identity): Promise<void>;
|
|
874
|
-
/**
|
|
875
|
-
* Attempt to close an external process. The process will be terminated if it
|
|
876
|
-
* has not closed after the elapsed timeout in milliseconds.<br>
|
|
877
|
-
* Note: This method is restricted by default and must be enabled via
|
|
878
|
-
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
|
879
|
-
* @param options A object defined in the TerminateExternalRequestType interface
|
|
880
|
-
*
|
|
881
|
-
* @example
|
|
882
|
-
* ```js
|
|
883
|
-
* fin.System.launchExternalProcess({
|
|
884
|
-
* path: "notepad",
|
|
885
|
-
* listener: function (result) {
|
|
886
|
-
* console.log("The exit code", result.exitCode);
|
|
887
|
-
* }
|
|
888
|
-
* })
|
|
889
|
-
* .then(identity => fin.System.terminateExternalProcess({uuid: identity.uuid, timeout:2000, killTree: false}))
|
|
890
|
-
* .then(() => console.log('Terminate the process'))
|
|
891
|
-
* .catch(err => console.log(err));
|
|
892
|
-
* ```
|
|
893
|
-
*/
|
|
894
|
-
terminateExternalProcess(options: OpenFin.TerminateExternalRequestType): Promise<void>;
|
|
895
|
-
/**
|
|
896
|
-
* Update the OpenFin Runtime Proxy settings.
|
|
897
|
-
* @param options A config object defined in the ProxyConfig interface
|
|
898
|
-
*
|
|
899
|
-
* @example
|
|
900
|
-
* ```js
|
|
901
|
-
* fin.System.updateProxySettings({proxyAddress:'127.0.0.1', proxyPort:8080, type:'http'})
|
|
902
|
-
* .then(() => console.log('Update proxy successfully'))
|
|
903
|
-
* .catch(err => console.error(err));
|
|
904
|
-
* ```
|
|
905
|
-
*/
|
|
906
|
-
updateProxySettings(options: ProxyConfig): Promise<void>;
|
|
907
|
-
/**
|
|
908
|
-
* Downloads the given application asset<br>
|
|
909
|
-
* Note: This method is restricted by default and must be enabled via
|
|
910
|
-
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
|
911
|
-
* @param appAsset App asset object
|
|
912
|
-
*
|
|
913
|
-
* @example
|
|
914
|
-
* ```js
|
|
915
|
-
* async function downloadAsset() {
|
|
916
|
-
* const appAsset = {
|
|
917
|
-
* src: `${ location.origin }/assets.zip`,
|
|
918
|
-
* alias: 'dirApp',
|
|
919
|
-
* version: '1.23.24',
|
|
920
|
-
* target: 'assets/run.bat'
|
|
921
|
-
* };
|
|
922
|
-
*
|
|
923
|
-
* return fin.System.downloadAsset(appAsset, (progress => {
|
|
924
|
-
* //Print progress as we download the asset.
|
|
925
|
-
* const downloadedPercent = Math.floor((progress.downloadedBytes / progress.totalBytes) * 100);
|
|
926
|
-
* console.log(`Downloaded ${downloadedPercent}%`);
|
|
927
|
-
* }));
|
|
928
|
-
* }
|
|
929
|
-
*
|
|
930
|
-
* downloadAsset()
|
|
931
|
-
* .then(() => console.log('Success'))
|
|
932
|
-
* .catch(err => console.error(err));
|
|
933
|
-
*
|
|
934
|
-
* ```
|
|
935
|
-
*/
|
|
936
|
-
downloadAsset(appAsset: OpenFin.AppAssetInfo, progressListener: (progress: OpenFin.RuntimeDownloadProgress) => void): Promise<void>;
|
|
937
|
-
/**
|
|
938
|
-
* Downloads a version of the runtime.
|
|
939
|
-
* @param options - Download options.
|
|
940
|
-
* @param progressListener - called as the runtime is downloaded with progress information.
|
|
941
|
-
*
|
|
942
|
-
* @remarks Only supported in an OpenFin Render process.
|
|
943
|
-
*
|
|
944
|
-
* @example
|
|
945
|
-
* ```js
|
|
946
|
-
* var downloadOptions = {
|
|
947
|
-
* //Specific version number required, if given a release channel the call will produce an error.
|
|
948
|
-
* version: '9.61.30.1'
|
|
949
|
-
* };
|
|
950
|
-
*
|
|
951
|
-
* function onProgress(progress) {
|
|
952
|
-
* console.log(`${Math.floor((progress.downloadedBytes / progress.totalBytes) * 100)}%`);
|
|
953
|
-
* }
|
|
954
|
-
*
|
|
955
|
-
* fin.System.downloadRuntime(downloadOptions, onProgress).then(() => {
|
|
956
|
-
* console.log('Download complete');
|
|
957
|
-
* }).catch(err => {
|
|
958
|
-
* console.log(`Download Failed, we could retry: ${err.message}`);
|
|
959
|
-
* console.log(err);
|
|
960
|
-
* });
|
|
961
|
-
* ```
|
|
962
|
-
*/
|
|
963
|
-
downloadRuntime(options: OpenFin.RuntimeDownloadOptions, progressListener: (progress: OpenFin.RuntimeDownloadProgress) => void): Promise<void>;
|
|
964
|
-
/**
|
|
965
|
-
* Download preload scripts from given URLs
|
|
966
|
-
* @param scripts - URLs of preload scripts. See tutorial for more details.
|
|
967
|
-
*
|
|
968
|
-
* @example
|
|
969
|
-
* ```js
|
|
970
|
-
* const scripts = [
|
|
971
|
-
* { url: 'http://.../preload.js' },
|
|
972
|
-
* { url: 'http://.../preload2.js' }
|
|
973
|
-
* ];
|
|
974
|
-
*
|
|
975
|
-
* fin.System.downloadPreloadScripts(scripts).then(results => {
|
|
976
|
-
* results.forEach(({url, success, error}) => {
|
|
977
|
-
* console.log(`URL: ${url}`);
|
|
978
|
-
* console.log(`Success: ${success}`);
|
|
979
|
-
* if (error) {
|
|
980
|
-
* console.log(`Error: ${error}`);
|
|
981
|
-
* }
|
|
982
|
-
* });
|
|
983
|
-
* });
|
|
984
|
-
* ```
|
|
985
|
-
*/
|
|
986
|
-
downloadPreloadScripts(scripts: Array<OpenFin.DownloadPreloadOption>): Promise<Array<OpenFin.DownloadPreloadInfo>>;
|
|
987
|
-
/**
|
|
988
|
-
* Retrieves an array of data (name, ids, bounds) for all application windows.
|
|
989
|
-
*
|
|
990
|
-
* @example
|
|
991
|
-
* ```js
|
|
992
|
-
* fin.System.getAllExternalApplications()
|
|
993
|
-
* .then(externalApps => console.log('Total external apps: ' + externalApps.length))
|
|
994
|
-
* .catch(err => console.log(err));
|
|
995
|
-
* ```
|
|
996
|
-
*/
|
|
997
|
-
getAllExternalApplications(): Promise<Array<Identity>>;
|
|
998
|
-
/**
|
|
999
|
-
* Retrieves app asset information.
|
|
1000
|
-
* @param options
|
|
1001
|
-
*
|
|
1002
|
-
* @example
|
|
1003
|
-
* ```js
|
|
1004
|
-
* fin.System.getAppAssetInfo({alias:'procexp'}).then(assetInfo => console.log(assetInfo)).catch(err => console.log(err));
|
|
1005
|
-
* ```
|
|
1006
|
-
*/
|
|
1007
|
-
getAppAssetInfo(options: OpenFin.AppAssetRequest): Promise<OpenFin.AppAssetInfo>;
|
|
1008
|
-
/**
|
|
1009
|
-
* Get additional info of cookies.
|
|
1010
|
-
* @param options - See tutorial for more details.
|
|
1011
|
-
*
|
|
1012
|
-
* @example
|
|
1013
|
-
* ```js
|
|
1014
|
-
* fin.System.getCookies({name: 'myCookie'}).then(cookies => console.log(cookies)).catch(err => console.log(err));
|
|
1015
|
-
* ```
|
|
1016
|
-
*/
|
|
1017
|
-
getCookies(options: OpenFin.CookieOption): Promise<Array<OpenFin.CookieInfo>>;
|
|
1018
|
-
/**
|
|
1019
|
-
* Set the minimum log level above which logs will be written to the OpenFin log
|
|
1020
|
-
* @param The minimum level (inclusive) above which all calls to log will be written
|
|
1021
|
-
*
|
|
1022
|
-
* @example
|
|
1023
|
-
* ```js
|
|
1024
|
-
* fin.System.setMinLogLevel("verbose").then(() => console.log("log level is set to verbose")).catch(err => console.log(err));
|
|
1025
|
-
* ```
|
|
1026
|
-
*/
|
|
1027
|
-
setMinLogLevel(level: LogLevel): Promise<void>;
|
|
1028
|
-
/**
|
|
1029
|
-
* Retrieves the UUID of the computer on which the runtime is installed
|
|
1030
|
-
* @param uuid The uuid of the running application
|
|
1031
|
-
*
|
|
1032
|
-
* @example
|
|
1033
|
-
* ```js
|
|
1034
|
-
* fin.System.resolveUuid('OpenfinPOC').then(entity => console.log(entity)).catch(err => console.log(err));
|
|
1035
|
-
* ```
|
|
1036
|
-
*/
|
|
1037
|
-
resolveUuid(uuid: string): Promise<Entity>;
|
|
1038
|
-
/**
|
|
1039
|
-
* Retrieves an array of data for all external applications
|
|
1040
|
-
* @param requestingIdentity This object is described in the Identity typedef
|
|
1041
|
-
* @param data Any data type to pass to the method
|
|
1042
|
-
*
|
|
1043
|
-
* @ignore
|
|
1044
|
-
*/
|
|
1045
|
-
executeOnRemote(requestingIdentity: Identity, data: any): Promise<any>;
|
|
1046
|
-
/**
|
|
1047
|
-
* Reads the specifed value from the registry.
|
|
1048
|
-
* @remarks This method is restricted by default and must be enabled via
|
|
1049
|
-
* [API security settings](https://developers.openfin.co/docs/api-security).
|
|
1050
|
-
* @param rootKey - The registry root key.
|
|
1051
|
-
* @param subkey - The registry key.
|
|
1052
|
-
* @param value - The registry value name.
|
|
1053
|
-
*
|
|
1054
|
-
* @example
|
|
1055
|
-
* ```js
|
|
1056
|
-
* fin.System.readRegistryValue("HKEY_LOCAL_MACHINE", "HARDWARE\\DESCRIPTION\\System", "BootArchitecture").then(val => console.log(val)).catch(err => console.log(err));
|
|
1057
|
-
* ```
|
|
1058
|
-
*
|
|
1059
|
-
* See {@link https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx here} for Window's error code definitions.
|
|
1060
|
-
*
|
|
1061
|
-
* Example payloads of different registry types:
|
|
1062
|
-
*
|
|
1063
|
-
* See list of types {@link https://msdn.microsoft.com/en-us/library/windows/desktop/ms724884(v=vs.85).aspx here}.
|
|
1064
|
-
*
|
|
1065
|
-
* ```js
|
|
1066
|
-
* // REG_DWORD
|
|
1067
|
-
* {
|
|
1068
|
-
* data: 1,
|
|
1069
|
-
* rootKey: "HKEY_LOCAL_MACHINE",
|
|
1070
|
-
* subkey: "Foo\Bar",
|
|
1071
|
-
* type: "REG_DWORD",
|
|
1072
|
-
* value: "Baz"
|
|
1073
|
-
* }
|
|
1074
|
-
*
|
|
1075
|
-
* // REG_QWORD
|
|
1076
|
-
* {
|
|
1077
|
-
* data: 13108146671334112,
|
|
1078
|
-
* rootKey: "HKEY_LOCAL_MACHINE",
|
|
1079
|
-
* subkey: "Foo\Bar",
|
|
1080
|
-
* type: "REG_QWORD",
|
|
1081
|
-
* value: "Baz"
|
|
1082
|
-
* }
|
|
1083
|
-
*
|
|
1084
|
-
* // REG_SZ
|
|
1085
|
-
* {
|
|
1086
|
-
* data: "FooBarBaz",
|
|
1087
|
-
* rootKey: "HKEY_LOCAL_MACHINE",
|
|
1088
|
-
* subkey: "Foo\Bar",
|
|
1089
|
-
* type: "REG_SZ",
|
|
1090
|
-
* value: "Baz"
|
|
1091
|
-
* }
|
|
1092
|
-
*
|
|
1093
|
-
* // REG_EXPAND_SZ
|
|
1094
|
-
* {
|
|
1095
|
-
* data: "C:\User\JohnDoe\AppData\Local",
|
|
1096
|
-
* rootKey: "HKEY_CURRENT_USER",
|
|
1097
|
-
* subkey: "Foo\Bar",
|
|
1098
|
-
* type: "REG_EXPAND_SZ",
|
|
1099
|
-
* value: "Baz"
|
|
1100
|
-
* }
|
|
1101
|
-
*
|
|
1102
|
-
* // REG_MULTI_SZ
|
|
1103
|
-
* {
|
|
1104
|
-
* data: [
|
|
1105
|
-
* "Foo",
|
|
1106
|
-
* "Bar",
|
|
1107
|
-
* "Baz"
|
|
1108
|
-
* ],
|
|
1109
|
-
* rootKey: "HKEY_CURRENT_USER",
|
|
1110
|
-
* subkey: "Foo\Bar",
|
|
1111
|
-
* type: "REG_MULTI_SZ",
|
|
1112
|
-
* value: "Baz"
|
|
1113
|
-
* }
|
|
1114
|
-
*
|
|
1115
|
-
* // REG_BINARY
|
|
1116
|
-
* {
|
|
1117
|
-
* data: {
|
|
1118
|
-
* data: [
|
|
1119
|
-
* 255,
|
|
1120
|
-
* 255,
|
|
1121
|
-
* 0,
|
|
1122
|
-
* 43,
|
|
1123
|
-
* 55,
|
|
1124
|
-
* 0,
|
|
1125
|
-
* 0,
|
|
1126
|
-
* 255,
|
|
1127
|
-
* 255
|
|
1128
|
-
* ],
|
|
1129
|
-
* type: "Buffer"
|
|
1130
|
-
* },
|
|
1131
|
-
* rootKey: "HKEY_CURRENT_USER",
|
|
1132
|
-
* subkey: "Foo\Bar",
|
|
1133
|
-
* type: "REG_BINARY",
|
|
1134
|
-
* value: "Baz"
|
|
1135
|
-
* }
|
|
1136
|
-
* ```
|
|
1137
|
-
*/
|
|
1138
|
-
readRegistryValue(rootKey: string, subkey: string, value: string): Promise<RegistryInfo>;
|
|
1139
|
-
/**
|
|
1140
|
-
* This function call will register a unique id and produce a token.
|
|
1141
|
-
* The token can be used to broker an external connection.
|
|
1142
|
-
* @param uuid - A UUID for the remote connection.
|
|
1143
|
-
*
|
|
1144
|
-
* @example
|
|
1145
|
-
* ```js
|
|
1146
|
-
* fin.System.registerExternalConnection("remote-connection-uuid").then(conn => console.log(conn)).catch(err => console.log(err));
|
|
1147
|
-
*
|
|
1148
|
-
*
|
|
1149
|
-
* // object comes back with
|
|
1150
|
-
* // token: "0489EAC5-6404-4F0D-993B-92BB8EAB445D", // this will be unique each time
|
|
1151
|
-
* // uuid: "remote-connection-uuid"
|
|
1152
|
-
*
|
|
1153
|
-
* ```
|
|
1154
|
-
*/
|
|
1155
|
-
registerExternalConnection(uuid: string): Promise<OpenFin.ExternalConnection>;
|
|
1156
|
-
/**
|
|
1157
|
-
* Returns the json blob found in the [desktop owner settings](https://openfin.co/documentation/desktop-owner-settings/)
|
|
1158
|
-
* for the specified service.
|
|
1159
|
-
* @param serviceIdentifier An object containing a name key that identifies the service.
|
|
1160
|
-
*
|
|
1161
|
-
* @remarks More information about desktop services can be found [here](https://developers.openfin.co/docs/desktop-services).
|
|
1162
|
-
* This call will reject if the desktop owner settings file is not present, not correctly formatted, or if the service requested is not configured or configured incorrectly.
|
|
1163
|
-
*
|
|
1164
|
-
* @example
|
|
1165
|
-
* ```js
|
|
1166
|
-
* // Here we are using the [layouts](https://github.com/HadoukenIO/layouts-service) service.
|
|
1167
|
-
* fin.System.getServiceConfiguration({name:'layouts'}).then(console.log).catch(console.error);
|
|
1168
|
-
* ```
|
|
1169
|
-
*/
|
|
1170
|
-
getServiceConfiguration(serviceIdentifier: OpenFin.ServiceIdentifier): Promise<OpenFin.ServiceConfiguration>;
|
|
1171
|
-
protected getSystemAppConfig(name: string): Promise<any>;
|
|
1172
|
-
/**
|
|
1173
|
-
* Registers a system shutdown handler so user can do some cleanup before system is shutting down.
|
|
1174
|
-
* @remarks Once system shutdown starts, you are unable to cancel it.
|
|
1175
|
-
* @param handler system shutdown handler
|
|
1176
|
-
*
|
|
1177
|
-
* @example
|
|
1178
|
-
* ```js
|
|
1179
|
-
* fin.System.registerShutdownHandler((shutdownEvent) => {
|
|
1180
|
-
* // save state or cleanup
|
|
1181
|
-
* console.log('do some cleanup before shutdown');
|
|
1182
|
-
* // Notify app is ready for termination.
|
|
1183
|
-
* shutdownEvent.proceed();
|
|
1184
|
-
* })
|
|
1185
|
-
* .then(() => console.log('Shutdown handler registered!'))
|
|
1186
|
-
* .catch(err => console.log(err));
|
|
1187
|
-
* ```
|
|
1188
|
-
* @experimental
|
|
1189
|
-
*/
|
|
1190
|
-
registerShutdownHandler(handler: OpenFin.SystemShutdownHandler): Promise<void>;
|
|
1191
|
-
/**
|
|
1192
|
-
* Signals the RVM to perform a health check and returns the results as json.
|
|
1193
|
-
*
|
|
1194
|
-
* @remarks Requires RVM 5.5+
|
|
1195
|
-
*
|
|
1196
|
-
* @example
|
|
1197
|
-
* ```js
|
|
1198
|
-
* try {
|
|
1199
|
-
* const results = await fin.System.runRvmHealthCheck();
|
|
1200
|
-
* console.log(results);
|
|
1201
|
-
* } catch(e) {
|
|
1202
|
-
* console.error(e);
|
|
1203
|
-
* }
|
|
1204
|
-
* ```
|
|
1205
|
-
*/
|
|
1206
|
-
runRvmHealthCheck(): Promise<string[]>;
|
|
1207
|
-
/**
|
|
1208
|
-
* Launch application using a manifest URL/path. It differs from Application.startFromManifest in that this API can accept a manifest using the fin protocol.
|
|
1209
|
-
* @param manifestUrl - The manifest's URL or path.
|
|
1210
|
-
* @param opts - Parameters that the RVM will use.
|
|
1211
|
-
*
|
|
1212
|
-
* @experimental
|
|
1213
|
-
* @remarks Supports protocols http/s and fin/s, and also a local path.
|
|
1214
|
-
*
|
|
1215
|
-
* Note: This API is Windows only.
|
|
1216
|
-
*
|
|
1217
|
-
* @example
|
|
1218
|
-
*
|
|
1219
|
-
* This API can handle most manifest types. Some examples below.
|
|
1220
|
-
*
|
|
1221
|
-
* Traditional:
|
|
1222
|
-
* ```js
|
|
1223
|
-
* const manifest = await fin.System.launchManifest(
|
|
1224
|
-
* 'https://demoappdirectory.openf.in/desktop/config/apps/OpenFin/HelloOpenFin/app.json');
|
|
1225
|
-
* console.log(manifest);
|
|
1226
|
-
* ```
|
|
1227
|
-
*
|
|
1228
|
-
* Platform:
|
|
1229
|
-
* ```js
|
|
1230
|
-
* const manifest = await fin.System.launchManifest('https://openfin.github.io/platform-api-project-seed/public.json');
|
|
1231
|
-
* console.log(manifest);
|
|
1232
|
-
* ```
|
|
1233
|
-
*
|
|
1234
|
-
* Launching traditional manifest into a platform:
|
|
1235
|
-
* ```js
|
|
1236
|
-
* const manifest = await fin.System.launchManifest(
|
|
1237
|
-
* 'https://openfin.github.io/platform-api-project-seed/public.json?\
|
|
1238
|
-
* $$appManifestUrl=https://demoappdirectory.openf.in/desktop/config/\
|
|
1239
|
-
* apps/OpenFin/HelloOpenFin/app.json');
|
|
1240
|
-
* console.log(manifest);
|
|
1241
|
-
* ```
|
|
1242
|
-
*
|
|
1243
|
-
* Launching with RVM options:
|
|
1244
|
-
* ```js
|
|
1245
|
-
* const manifest = await fin.System.launchManifest('https://openfin.github.io/platform-api-project-seed/public.json',
|
|
1246
|
-
* { noUi: true, userAppConfigArgs: { abc: '123', xyz: '789' } });
|
|
1247
|
-
* console.log(manifest);
|
|
1248
|
-
* ```
|
|
1249
|
-
*
|
|
1250
|
-
* Local Path:
|
|
1251
|
-
* ```js
|
|
1252
|
-
* const manifest = await fin.System.launchManifest('file://c:\\path\\to\\manifest\\file.json');
|
|
1253
|
-
* console.log(manifest);
|
|
1254
|
-
* ```
|
|
1255
|
-
*
|
|
1256
|
-
* Launching with RVM 'subscribe' option:
|
|
1257
|
-
*
|
|
1258
|
-
* This option allows users to subscribe to app version resolver events when
|
|
1259
|
-
* calling launchManifest with fallbackManifests specified.
|
|
1260
|
-
*
|
|
1261
|
-
* ```js
|
|
1262
|
-
* fin.System.launchManifest('fins://system-apps/notifications/app.json', { subscribe: (launch) => {
|
|
1263
|
-
* launch.on('app-version-progress', (progress) => {
|
|
1264
|
-
* console.log("Trying manifest " + progress.manifest)
|
|
1265
|
-
* });
|
|
1266
|
-
*
|
|
1267
|
-
* launch.on('runtime-status', (status) => {
|
|
1268
|
-
* console.log("Runtime status: " + JSON.stringify(status));
|
|
1269
|
-
* });
|
|
1270
|
-
*
|
|
1271
|
-
* // RVM has successfully found the target runtime version
|
|
1272
|
-
* launch.on('app-version-complete', (complete) => {
|
|
1273
|
-
* console.log("Parent app " + complete.srcManifest + " resolved to " + complete.manifest);
|
|
1274
|
-
* launch.removeAllListeners();
|
|
1275
|
-
* });
|
|
1276
|
-
*
|
|
1277
|
-
* // RVM failed to find an available runtime version
|
|
1278
|
-
* launch.on('app-version-error', (error) => {
|
|
1279
|
-
* console.log("Failed to resolve " + error.srcManifest + " from the fallbackManifests");
|
|
1280
|
-
* launch.removeAllListeners();
|
|
1281
|
-
* });
|
|
1282
|
-
* }
|
|
1283
|
-
* });
|
|
1284
|
-
* ```
|
|
1285
|
-
* @static
|
|
1286
|
-
*/
|
|
1287
|
-
launchManifest(manifestUrl: string, opts?: OpenFin.RvmLaunchOptions): Promise<OpenFin.Manifest>;
|
|
1288
|
-
/**
|
|
1289
|
-
* Query permission of a secured api in current context.
|
|
1290
|
-
* @param apiName - The full name of a secured API.
|
|
1291
|
-
*
|
|
1292
|
-
* @example
|
|
1293
|
-
* ```js
|
|
1294
|
-
* fin.System.queryPermissionForCurrentContext('System.launchExternalProcess').then(result => console.log(result)).catch(err => console.log(err));
|
|
1295
|
-
*
|
|
1296
|
-
* //This response has the following shape:
|
|
1297
|
-
* {
|
|
1298
|
-
* permission: 'System.launchExternalProcess', // api full name
|
|
1299
|
-
* state: 'granted', // state of permission
|
|
1300
|
-
* granted: true
|
|
1301
|
-
* }
|
|
1302
|
-
* ```
|
|
1303
|
-
*/
|
|
1304
|
-
queryPermissionForCurrentContext(apiName: string): Promise<OpenFin.QueryPermissionResult>;
|
|
1305
|
-
enableNativeWindowIntegrationProvider(permissions: any): Promise<OpenFin.NativeWindowIntegrationProviderAuthorization>;
|
|
1306
|
-
/**
|
|
1307
|
-
* (Internal) Register the usage of a component with a platform
|
|
1308
|
-
* @param options - Object with data and type
|
|
1309
|
-
*
|
|
1310
|
-
* @example
|
|
1311
|
-
* ```js
|
|
1312
|
-
* async function registerUsage() {
|
|
1313
|
-
* const app = await fin.System.getCurrent();
|
|
1314
|
-
* return await fin.System.registerUsage({
|
|
1315
|
-
* type: 'workspace-licensing',
|
|
1316
|
-
* // example values for the following data object
|
|
1317
|
-
* data: {
|
|
1318
|
-
* apiVersion: '1.0',
|
|
1319
|
-
* componentName: 'home',
|
|
1320
|
-
* componentVersion: '1.0',
|
|
1321
|
-
* allowed: true,
|
|
1322
|
-
* rejectionCode: ''
|
|
1323
|
-
* }
|
|
1324
|
-
* });
|
|
1325
|
-
* }
|
|
1326
|
-
*
|
|
1327
|
-
* registerUsage().then(() => console.log('Successfully registered component application')).catch(err => console.log(err));
|
|
1328
|
-
* ```
|
|
1329
|
-
*/
|
|
1330
|
-
registerUsage({ data, type }: OpenFin.RegisterUsageData): Promise<void>;
|
|
1331
|
-
/**
|
|
1332
|
-
* Returns an array with all printers of the caller and not all the printers on the desktop.
|
|
1333
|
-
*
|
|
1334
|
-
* @example
|
|
1335
|
-
* ```js
|
|
1336
|
-
* fin.System.getPrinters()
|
|
1337
|
-
* .then((printers) => {
|
|
1338
|
-
* printers.forEach((printer) => {
|
|
1339
|
-
* if (printer.isDefault) {
|
|
1340
|
-
* console.log(printer);
|
|
1341
|
-
* }
|
|
1342
|
-
* });
|
|
1343
|
-
* })
|
|
1344
|
-
* .catch((err) => {
|
|
1345
|
-
* console.log(err);
|
|
1346
|
-
* });
|
|
1347
|
-
* ```
|
|
1348
|
-
*/
|
|
1349
|
-
getPrinters(): Promise<PrinterInfo[]>;
|
|
1350
|
-
/**
|
|
1351
|
-
* Updates Process Logging values: periodic interval and outlier detection entries and interval.
|
|
1352
|
-
* @param options Process Logging updatable options.
|
|
1353
|
-
*
|
|
1354
|
-
* @remarks When enabling verbose mode, additional process information is logged to the debug.log:
|
|
1355
|
-
*
|
|
1356
|
-
* 1. Periodically process usage (memory, cpu, etc) will be logged for each PID along with the windows, views and
|
|
1357
|
-
* iframes that belong to them. The default is every 30 seconds. Updatable by passing the interval option.
|
|
1358
|
-
* 2. When Windows and Views are created or navigated the PID they belong to and their options will be logged.
|
|
1359
|
-
* 3. When Windows and Views are destroyed their last known process usage will be logged.
|
|
1360
|
-
* 4. Whenever an outlier memory usage is detected it will be logged. By default, on an interval of 5 seconds we will
|
|
1361
|
-
* collect process usage for all PIDs and when 144 such entries are collected, we will start analyzing the data for any
|
|
1362
|
-
* possible outliers in the following entries. The interval and maximum number of entries stored in the running buffer
|
|
1363
|
-
* can be updatable by passing the outlierDetection.interval and outlierDetection.entries options.
|
|
1364
|
-
*
|
|
1365
|
-
* @example
|
|
1366
|
-
*
|
|
1367
|
-
* ```js
|
|
1368
|
-
* await fin.System.updateProcessLoggingOptions({
|
|
1369
|
-
* interval: 10,
|
|
1370
|
-
* outlierDetection: {
|
|
1371
|
-
* interval: 15,
|
|
1372
|
-
* entries: 200
|
|
1373
|
-
* }
|
|
1374
|
-
* });
|
|
1375
|
-
* ```
|
|
1376
|
-
*/
|
|
1377
|
-
updateProcessLoggingOptions(options: OpenFin.ProcessLoggingOptions): Promise<void>;
|
|
1378
|
-
/**
|
|
1379
|
-
* Returns domain settings for the current application.
|
|
1380
|
-
* Initial settings are configured with the defaultDomainSettings application option via manifest.
|
|
1381
|
-
* Domain settings can be overwritten during runtime with System.setDomainSettings.
|
|
1382
|
-
* @example
|
|
1383
|
-
* ```js
|
|
1384
|
-
* const domainSettings = await fin.System.getDomainSettings();
|
|
1385
|
-
* // {
|
|
1386
|
-
* // "rules": [
|
|
1387
|
-
* // {
|
|
1388
|
-
* // "match": [
|
|
1389
|
-
* // "https://openfin.co"
|
|
1390
|
-
* // ],
|
|
1391
|
-
* // "options": {
|
|
1392
|
-
* // "downloadSettings": {
|
|
1393
|
-
* // "rules": [
|
|
1394
|
-
* // {
|
|
1395
|
-
* // "match": [
|
|
1396
|
-
* // "<all_urls>"
|
|
1397
|
-
* // ],
|
|
1398
|
-
* // "behavior": "prompt"
|
|
1399
|
-
* // }
|
|
1400
|
-
* // ]
|
|
1401
|
-
* // }
|
|
1402
|
-
* // }
|
|
1403
|
-
* // }
|
|
1404
|
-
* // ]
|
|
1405
|
-
* // }
|
|
1406
|
-
* ```
|
|
1407
|
-
*/
|
|
1408
|
-
getDomainSettings(): Promise<OpenFin.DefaultDomainSettings>;
|
|
1409
|
-
/**
|
|
1410
|
-
* Sets the domain settings for the current application.
|
|
1411
|
-
* @param domainSettings - domain settings object
|
|
1412
|
-
* @example
|
|
1413
|
-
* ```js
|
|
1414
|
-
* const domainSettings = await fin.System.getDomainSettings();
|
|
1415
|
-
* // {
|
|
1416
|
-
* // "rules": [
|
|
1417
|
-
* // {
|
|
1418
|
-
* // "match": [
|
|
1419
|
-
* // "https://openfin.co"
|
|
1420
|
-
* // ],
|
|
1421
|
-
* // "options": {
|
|
1422
|
-
* // "downloadSettings": {
|
|
1423
|
-
* // "rules": [
|
|
1424
|
-
* // {
|
|
1425
|
-
* // "match": [
|
|
1426
|
-
* // "<all_urls>"
|
|
1427
|
-
* // ],
|
|
1428
|
-
* // "behavior": "prompt"
|
|
1429
|
-
* // }
|
|
1430
|
-
* // ]
|
|
1431
|
-
* // }
|
|
1432
|
-
* // }
|
|
1433
|
-
* // }
|
|
1434
|
-
* // ]
|
|
1435
|
-
* // }
|
|
1436
|
-
*
|
|
1437
|
-
* // Valid rule behaviors are 'prompt' and 'no-prompt'
|
|
1438
|
-
* domainSettings.rules[0].options.downloadSettings.rules[0].behavior = 'no-prompt';
|
|
1439
|
-
*
|
|
1440
|
-
* await fin.System.setDomainSettings(domainSettings);
|
|
1441
|
-
*
|
|
1442
|
-
* const newDomainSettings = await fin.System.getDomainSettings();
|
|
1443
|
-
* // {
|
|
1444
|
-
* // "rules": [
|
|
1445
|
-
* // {
|
|
1446
|
-
* // "match": [
|
|
1447
|
-
* // "https://openfin.co"
|
|
1448
|
-
* // ],
|
|
1449
|
-
* // "options": {
|
|
1450
|
-
* // "downloadSettings": {
|
|
1451
|
-
* // "rules": [
|
|
1452
|
-
* // {
|
|
1453
|
-
* // "match": [
|
|
1454
|
-
* // "<all_urls>"
|
|
1455
|
-
* // ],
|
|
1456
|
-
* // "behavior": "no-prompt"
|
|
1457
|
-
* // }
|
|
1458
|
-
* // ]
|
|
1459
|
-
* // }
|
|
1460
|
-
* // }
|
|
1461
|
-
* // }
|
|
1462
|
-
* // ]
|
|
1463
|
-
* // }
|
|
1464
|
-
* ```
|
|
1465
|
-
*/
|
|
1466
|
-
setDomainSettings(domainSettings: OpenFin.DefaultDomainSettings): Promise<void>;
|
|
1467
|
-
}
|
|
1468
|
-
export {};
|