@openfin/core 33.76.27 → 33.76.36

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.
Files changed (116) hide show
  1. package/openfin-core-33.76.36.tgz +0 -0
  2. package/package.json +1 -1
  3. package/src/OpenFin.d.ts +27 -16
  4. package/src/api/application/Factory.d.ts +148 -100
  5. package/src/api/application/Factory.js +148 -100
  6. package/src/api/application/Instance.d.ts +477 -106
  7. package/src/api/application/Instance.js +474 -106
  8. package/src/api/application/index.d.ts +9 -0
  9. package/src/api/application/index.js +9 -0
  10. package/src/api/base.d.ts +69 -0
  11. package/src/api/base.js +69 -0
  12. package/src/api/clipboard/index.d.ts +111 -31
  13. package/src/api/clipboard/index.js +111 -31
  14. package/src/api/events/application.d.ts +12 -0
  15. package/src/api/events/application.js +12 -0
  16. package/src/api/events/channel.d.ts +5 -0
  17. package/src/api/events/channel.js +5 -0
  18. package/src/api/events/externalApplication.d.ts +5 -0
  19. package/src/api/events/externalApplication.js +5 -0
  20. package/src/api/events/frame.d.ts +5 -0
  21. package/src/api/events/globalHotkey.d.ts +5 -0
  22. package/src/api/events/platform.d.ts +9 -1
  23. package/src/api/events/platform.js +8 -0
  24. package/src/api/events/system.d.ts +13 -0
  25. package/src/api/events/system.js +13 -0
  26. package/src/api/events/view.d.ts +19 -9
  27. package/src/api/events/view.js +10 -0
  28. package/src/api/events/webcontents.d.ts +21 -10
  29. package/src/api/events/webcontents.js +11 -0
  30. package/src/api/events/window.d.ts +70 -1
  31. package/src/api/events/window.js +10 -0
  32. package/src/api/external-application/Factory.d.ts +16 -9
  33. package/src/api/external-application/Factory.js +16 -9
  34. package/src/api/external-application/Instance.d.ts +40 -32
  35. package/src/api/external-application/Instance.js +40 -32
  36. package/src/api/external-application/index.d.ts +9 -0
  37. package/src/api/external-application/index.js +9 -0
  38. package/src/api/fin.d.ts +3 -0
  39. package/src/api/fin.js +3 -0
  40. package/src/api/frame/Factory.d.ts +30 -13
  41. package/src/api/frame/Factory.js +30 -13
  42. package/src/api/frame/Instance.d.ts +51 -38
  43. package/src/api/frame/Instance.js +51 -38
  44. package/src/api/frame/index.d.ts +11 -0
  45. package/src/api/frame/index.js +11 -0
  46. package/src/api/global-hotkey/index.d.ts +81 -13
  47. package/src/api/global-hotkey/index.js +81 -13
  48. package/src/api/interappbus/channel/channel.d.ts +257 -0
  49. package/src/api/interappbus/channel/channel.js +257 -0
  50. package/src/api/interappbus/channel/channels-docs.d.ts +59 -57
  51. package/src/api/interappbus/channel/channels-docs.js +71 -68
  52. package/src/api/interappbus/channel/client.d.ts +93 -0
  53. package/src/api/interappbus/channel/client.js +93 -1
  54. package/src/api/interappbus/channel/index.d.ts +164 -0
  55. package/src/api/interappbus/channel/index.js +165 -1
  56. package/src/api/interappbus/channel/provider.d.ts +172 -0
  57. package/src/api/interappbus/channel/provider.js +172 -0
  58. package/src/api/interappbus/index.d.ts +55 -20
  59. package/src/api/interappbus/index.js +55 -20
  60. package/src/api/interop/Factory.d.ts +30 -10
  61. package/src/api/interop/Factory.js +30 -10
  62. package/src/api/interop/InteropBroker.d.ts +298 -70
  63. package/src/api/interop/InteropBroker.js +298 -70
  64. package/src/api/interop/InteropClient.d.ts +286 -62
  65. package/src/api/interop/InteropClient.js +286 -62
  66. package/src/api/interop/SessionContextGroupClient.d.ts +2 -2
  67. package/src/api/interop/SessionContextGroupClient.js +2 -2
  68. package/src/api/interop/fdc3/documentationStub.d.ts +14 -0
  69. package/src/api/interop/fdc3/documentationStub.js +17 -0
  70. package/src/api/interop/fdc3/fdc3-1.2.d.ts +31 -34
  71. package/src/api/interop/fdc3/fdc3-1.2.js +31 -34
  72. package/src/api/interop/fdc3/fdc3-2.0.d.ts +48 -51
  73. package/src/api/interop/fdc3/fdc3-2.0.js +48 -51
  74. package/src/api/interop/index.d.ts +8 -0
  75. package/src/api/interop/index.js +8 -0
  76. package/src/api/platform/Factory.d.ts +121 -65
  77. package/src/api/platform/Factory.js +122 -66
  78. package/src/api/platform/Instance.d.ts +551 -48
  79. package/src/api/platform/Instance.js +551 -49
  80. package/src/api/platform/index.d.ts +9 -0
  81. package/src/api/platform/index.js +9 -0
  82. package/src/api/platform/layout/Factory.d.ts +53 -76
  83. package/src/api/platform/layout/Factory.js +53 -76
  84. package/src/api/platform/layout/Instance.d.ts +158 -23
  85. package/src/api/platform/layout/Instance.js +118 -20
  86. package/src/api/platform/layout/entities/layout-entities.d.ts +222 -30
  87. package/src/api/platform/layout/entities/layout-entities.js +222 -30
  88. package/src/api/platform/layout/index.d.ts +9 -0
  89. package/src/api/platform/layout/index.js +9 -0
  90. package/src/api/platform/provider.d.ts +398 -51
  91. package/src/api/snapshot-source/Factory.d.ts +33 -18
  92. package/src/api/snapshot-source/Factory.js +33 -18
  93. package/src/api/snapshot-source/Instance.d.ts +30 -8
  94. package/src/api/snapshot-source/Instance.js +30 -8
  95. package/src/api/snapshot-source/index.d.ts +9 -0
  96. package/src/api/snapshot-source/index.js +9 -0
  97. package/src/api/system/index.d.ts +1137 -186
  98. package/src/api/system/index.js +1142 -186
  99. package/src/api/view/Factory.d.ts +54 -16
  100. package/src/api/view/Factory.js +54 -16
  101. package/src/api/view/Instance.d.ts +330 -216
  102. package/src/api/view/Instance.js +331 -217
  103. package/src/api/view/index.d.ts +9 -0
  104. package/src/api/view/index.js +9 -0
  105. package/src/api/webcontents/main.d.ts +890 -0
  106. package/src/api/webcontents/main.js +890 -0
  107. package/src/api/window/Factory.d.ts +67 -16
  108. package/src/api/window/Factory.js +67 -16
  109. package/src/api/window/Instance.d.ts +824 -316
  110. package/src/api/window/Instance.js +822 -320
  111. package/src/api/window/index.d.ts +11 -0
  112. package/src/api/window/index.js +11 -0
  113. package/src/namespaces.d.ts +1 -0
  114. package/src/namespaces.js +3 -1
  115. package/src/shapes/protocol.d.ts +4 -0
  116. package/openfin-core-33.76.27.tgz +0 -0
@@ -1,2 +1,14 @@
1
1
  "use strict";
2
+ /**
3
+ * Namespace for events that can be transmitted on an OpenFin Application's EventEmitter. Includes events
4
+ * re-propagate from the `Window` (and, transitively, `View`) level, prefixed with `window-` (and also, if applicable, `view-`).
5
+ * For example, a view's "shown" event will fire as 'window-view-shown' at the application level.
6
+ *
7
+ * Application events re-propagate to the system level, prefixed with `application-`. For example,
8
+ * the `closed` event will fire as `application-closed` at the system level. Propagated events from
9
+ * WebContents within an application will *not* transitively re-propagate to the system level, because they are already
10
+ * visible at the system level and contain the identity of the application.
11
+ *
12
+ * @packageDocumentation
13
+ */
2
14
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Namespace for events that can be transmitted on an OpenFin Channel's EventEmitter.
3
+ *
4
+ * @packageDocumentation
5
+ */
1
6
  import { NamedEvent } from './base';
2
7
  /**
3
8
  * A base Channel event.
@@ -1,2 +1,7 @@
1
1
  "use strict";
2
+ /**
3
+ * Namespace for events that can be transmitted on an OpenFin Channel's EventEmitter.
4
+ *
5
+ * @packageDocumentation
6
+ */
2
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Namespace for events that can be transmitted on an OpenFin ExternalApplication's EventEmitter.
3
+ *
4
+ * @packageDocumentation
5
+ */
1
6
  import { BaseEvent } from './base';
2
7
  /**
3
8
  * Generated when an external application has authenticated and is connected.
@@ -1,2 +1,7 @@
1
1
  "use strict";
2
+ /**
3
+ * Namespace for events that can be transmitted on an OpenFin ExternalApplication's EventEmitter.
4
+ *
5
+ * @packageDocumentation
6
+ */
2
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Namespace for events that can be transmitted on an OpenFin Frame's EventEmitter.
3
+ *
4
+ * @packageDocumentation
5
+ */
1
6
  import { NamedEvent } from './base';
2
7
  /**
3
8
  * The base frame event.
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Namespace for events that can be transmitted on an OpenFin GlobalHotkey's EventEmitter.
3
+ *
4
+ * @packageDocumentation
5
+ */
1
6
  import { BaseEvent } from './base';
2
7
  /**
3
8
  * Generated when a hotkey has been registered with the operating system.
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Namespace for events that can be transmitted on an OpenFin Platform's EventEmitter.
3
+ *
4
+ * The Platform `EventEmitter` is a superset of the Application's `EventEmitter`,
5
+ * meaning it can listen to all Application events, along with some Platform-specific events.
6
+ *
7
+ * @packageDocumentation
8
+ */
1
9
  import { ApplicationEvent } from './application';
2
10
  import { BaseEvent } from './base';
3
11
  /**
@@ -8,7 +16,7 @@ export type PlatformApiReadyEvent = BaseEvent & {
8
16
  type: 'platform-api-ready';
9
17
  };
10
18
  /**
11
- * Generated when a <a href="tutorial-Platform.applySnapshot.html">platform.ApplySnapshot</a> call is resolved.
19
+ * Generated when a platform.ApplySnapshot call is resolved.
12
20
  * @remarks The call is resolved when the following conditions are met for all windows in the snapshot:
13
21
  * 1. The window has been created
14
22
  * 2. The window has a responsive API
@@ -1,2 +1,10 @@
1
1
  "use strict";
2
+ /**
3
+ * Namespace for events that can be transmitted on an OpenFin Platform's EventEmitter.
4
+ *
5
+ * The Platform `EventEmitter` is a superset of the Application's `EventEmitter`,
6
+ * meaning it can listen to all Application events, along with some Platform-specific events.
7
+ *
8
+ * @packageDocumentation
9
+ */
2
10
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,16 @@
1
+ /**
2
+ * Namespace for runtime-wide OpenFin events that transmit on the OpenFin System event emitter. Includes events
3
+ * re-propagated from individual applications, windows, and views (prefixed with `application-`, `window-`, and `view-`). All
4
+ * event propagations are visible at the System level, regardless of source, so transitive re-propagations (e.g. from view to window)
5
+ * are visible in their entirety. Propagated events from WebContents (windows, views, frames) to the Application level will *not*
6
+ * transitively re-propagate to the System level, because they are already visible at the system level and contain the identity
7
+ * of the application.
8
+ *
9
+ * For example, an application's "closed" event will fire as 'application-closed' at the system level. A view's 'shown' event
10
+ * will be visible as both 'view-shown' and 'window-view-shown' at the system level, but *not* as `application-window-view-shown`.
11
+ *
12
+ * @packageDocumentation
13
+ */
1
14
  import type * as OpenFin from '../../OpenFin';
2
15
  import { PropagatedApplicationEvent } from './application';
3
16
  import { BaseEvent, IdentityEvent } from './base';
@@ -1,2 +1,15 @@
1
1
  "use strict";
2
+ /**
3
+ * Namespace for runtime-wide OpenFin events that transmit on the OpenFin System event emitter. Includes events
4
+ * re-propagated from individual applications, windows, and views (prefixed with `application-`, `window-`, and `view-`). All
5
+ * event propagations are visible at the System level, regardless of source, so transitive re-propagations (e.g. from view to window)
6
+ * are visible in their entirety. Propagated events from WebContents (windows, views, frames) to the Application level will *not*
7
+ * transitively re-propagate to the System level, because they are already visible at the system level and contain the identity
8
+ * of the application.
9
+ *
10
+ * For example, an application's "closed" event will fire as 'application-closed' at the system level. A view's 'shown' event
11
+ * will be visible as both 'view-shown' and 'window-view-shown' at the system level, but *not* as `application-window-view-shown`.
12
+ *
13
+ * @packageDocumentation
14
+ */
2
15
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +1,20 @@
1
+ /**
2
+ * Namespace for events that can be transmitted on an OpenFin View's EventEmitter.
3
+ *
4
+ * View events fall into two categories: propagated and non-propagated. Propagated events will
5
+ * be re-emitted on the parent window of the target view, prefixed with "view-". For example,
6
+ * the "shown" event will be re-emitted on the parent window as "view-shown". Non-propagated events
7
+ * will not be re-emitted on the parent window.
8
+ *
9
+ * @packageDocumentation
10
+ */
1
11
  import type * as OpenFin from '../../OpenFin';
2
12
  import { NonPropagatedWebContentsEvent, WillPropagateWebContentsEvent } from './webcontents';
3
13
  import { NamedEvent, PropagatedEvent } from './base';
4
14
  /**
5
15
  * A base View event.
6
16
  */
7
- export type BaseViewEvent = {
17
+ export type BaseViewEvent = NamedEvent & {
8
18
  target: OpenFin.Identity;
9
19
  viewIdentity: OpenFin.Identity;
10
20
  };
@@ -13,7 +23,7 @@ export type BaseViewEvent = {
13
23
  * @remarks This event will fire during creation of a View.
14
24
  * In that case, previousTarget identity will be the same as target identity.
15
25
  */
16
- export type TargetChangedEvent = NamedEvent & {
26
+ export type TargetChangedEvent = BaseViewEvent & {
17
27
  type: 'target-changed';
18
28
  previousTarget: OpenFin.Identity;
19
29
  };
@@ -24,44 +34,44 @@ export type NonPropagatedViewEvent = BaseViewEvent & NonPropagatedWebContentsEve
24
34
  /**
25
35
  * Generated when a View is attached to a window.
26
36
  */
27
- export type AttachedEvent = NamedEvent & {
37
+ export type AttachedEvent = BaseViewEvent & {
28
38
  type: 'attached';
29
39
  };
30
40
  /**
31
41
  * Generated when a View is created.
32
42
  */
33
- export type CreatedEvent = NamedEvent & {
43
+ export type CreatedEvent = BaseViewEvent & {
34
44
  type: 'created';
35
45
  };
36
46
  /**
37
47
  * Generated when a View is destroyed.
38
48
  */
39
- export type DestroyedEvent = NamedEvent & {
49
+ export type DestroyedEvent = BaseViewEvent & {
40
50
  type: 'destroyed';
41
51
  };
42
52
  /**
43
53
  * Generated when a View is hidden.
44
54
  */
45
- export type HiddenEvent = NamedEvent & {
55
+ export type HiddenEvent = BaseViewEvent & {
46
56
  type: 'hidden';
47
57
  };
48
58
  /**
49
59
  * Generated when a keyboard shortcut defined in the `hotkeys` array in [View options](OpenFin.ViewOptions.html) is pressed inside the view.
50
60
  * @remarks For reference on keyboard event properties see [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent).
51
61
  */
52
- export type HotkeyEvent = NamedEvent & {
62
+ export type HotkeyEvent = BaseViewEvent & {
53
63
  type: 'hotkey';
54
64
  };
55
65
  /**
56
66
  * Generated when a View is shown. This event will fire during creation of a View.
57
67
  */
58
- export type ShownEvent = NamedEvent & {
68
+ export type ShownEvent = BaseViewEvent & {
59
69
  type: 'shown';
60
70
  };
61
71
  /**
62
72
  * A View event that does propagate to (republish on) parent topics.
63
73
  */
64
- export type WillPropagateViewEvent = BaseViewEvent & (WillPropagateWebContentsEvent | AttachedEvent | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent);
74
+ export type WillPropagateViewEvent = WillPropagateWebContentsEvent | AttachedEvent | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent;
65
75
  /**
66
76
  * A View event.
67
77
  */
@@ -1,2 +1,12 @@
1
1
  "use strict";
2
+ /**
3
+ * Namespace for events that can be transmitted on an OpenFin View's EventEmitter.
4
+ *
5
+ * View events fall into two categories: propagated and non-propagated. Propagated events will
6
+ * be re-emitted on the parent window of the target view, prefixed with "view-". For example,
7
+ * the "shown" event will be re-emitted on the parent window as "view-shown". Non-propagated events
8
+ * will not be re-emitted on the parent window.
9
+ *
10
+ * @packageDocumentation
11
+ */
2
12
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,14 @@
1
+ /**
2
+ * Namespace for events shared by all OpenFin WebContents elements (i.e. windows, views, and frames).
3
+ *
4
+ * WebContents events are divided into two groups: propagating and non-propagating. Propagating events
5
+ * will re-emit on parent entities - e.g., a propagating event in a view will also be emitted on the view's
6
+ * parent window, and propagating events in a window will also be emitted on the window's parent application.
7
+ *
8
+ * Non-propagating events will not re-emit on parent entities.
9
+ *
10
+ * @packageDocumentation
11
+ */
1
12
  import type * as OpenFin from '../../OpenFin';
2
13
  import { NamedEvent } from './base';
3
14
  import { CrashedEvent } from './application';
@@ -127,20 +138,20 @@ export type ContentCreationRulesEvent = NamedEvent & {
127
138
  */
128
139
  url: string;
129
140
  /**
130
- * The features string passed to `window.open()`
131
- */
141
+ * The features string passed to `window.open()`
142
+ */
132
143
  features: string;
133
144
  /**
134
- * The frame name passed to `window.open()`
135
- */
145
+ * The frame name passed to `window.open()`
146
+ */
136
147
  frameName: string;
137
148
  /**
138
149
  * The rule which triggered this event. May be undefined on `child-window-created` where no rule corresponds to the child Window creation
139
150
  */
140
151
  rule: OpenFin.ContentCreationRule;
141
152
  /**
142
- * The features string passed to `window.open()` converted to OpenFin window options
143
- */
153
+ * The features string passed to `window.open()` converted to OpenFin window options
154
+ */
144
155
  parsedFeatures: Partial<OpenFin.WindowOptions>;
145
156
  disposition: string;
146
157
  };
@@ -162,8 +173,8 @@ export type ChildContentOpenedInBrowserEvent = ContentCreationRulesEvent & {
162
173
  export type ChildViewCreatedEvent = ContentCreationRulesEvent & {
163
174
  type: 'child-view-created';
164
175
  /**
165
- * The options the child View was created with.
166
- */
176
+ * The options the child View was created with.
177
+ */
167
178
  childOptions: OpenFin.ViewOptions;
168
179
  };
169
180
  /**
@@ -172,8 +183,8 @@ export type ChildViewCreatedEvent = ContentCreationRulesEvent & {
172
183
  export type ChildWindowCreatedEvent = ContentCreationRulesEvent & {
173
184
  type: 'child-window-created';
174
185
  /**
175
- * The options the child Window was created with.
176
- */
186
+ * The options the child Window was created with.
187
+ */
177
188
  childOptions: OpenFin.WindowOptions;
178
189
  /**
179
190
  * On `child-window-created` rule may be undefined.
@@ -1,2 +1,13 @@
1
1
  "use strict";
2
+ /**
3
+ * Namespace for events shared by all OpenFin WebContents elements (i.e. windows, views, and frames).
4
+ *
5
+ * WebContents events are divided into two groups: propagating and non-propagating. Propagating events
6
+ * will re-emit on parent entities - e.g., a propagating event in a view will also be emitted on the view's
7
+ * parent window, and propagating events in a window will also be emitted on the window's parent application.
8
+ *
9
+ * Non-propagating events will not re-emit on parent entities.
10
+ *
11
+ * @packageDocumentation
12
+ */
2
13
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Namespace for events that can be transmitted on an OpenFin Window's EventEmitter.
3
+ *
4
+ * Window events fall into two categories: propagated and non-propagated. Propagated events will
5
+ * be re-emitted on the parent application of the target window, prefixed with "window-". For example,
6
+ * a window's "reloaded" event will be re-emitted on the parent application as "window-reloaded". Non-propagated
7
+ * events will not be re-emitted on the parent application.
8
+ *
9
+ * @packageDocumentation
10
+ */
1
11
  import type * as OpenFin from '../../OpenFin';
2
12
  import { NamedEvent, PropagatedEvent } from './base';
3
13
  import { BaseViewEvent, PropagatedViewEvent, AttachedEvent as ViewAttachedEvent } from './view';
@@ -12,7 +22,66 @@ export type AlertRequestedEvent = NamedEvent & {
12
22
  };
13
23
  /**
14
24
  * Generated when a window within this application requires credentials from the user.
15
- * @remarks If there is a proxy, please see {@tutorial Proxy.behaviorChange} for more details.
25
+ * @remarks When a proxy exists, our default behavior shows an auth dialog, and asks users to enter their username and password.
26
+ * If you would like to change the default behavior, you can use the 'window-auth-requested' event to override it.
27
+ *
28
+ * Show customized auth dialog instead of default auth dialog:
29
+ * ```js
30
+ *
31
+ * // Sample code to create a login window. Users can create their own login pages
32
+ * async function createAuthUI(identity, loginPageUrl, authInfo) {
33
+ * const winName = 'my-auth-win-' + Date.now();
34
+ * const uriUuid = encodeURIComponent(identity.uuid);
35
+ * const uriName = encodeURIComponent(identity.name);
36
+ *
37
+ * const url = `http://${authInfo.host}:${authInfo.port}`;
38
+ * // login page should handle these query params
39
+ * loginPageUrl = `${loginPageUrl}?uuid=${uriUuid}&name=${uriName}&url=${url}`;
40
+ * await fin.Window.create({
41
+ * url: loginPageUrl,
42
+ * uuid: identity.uuid,
43
+ * name: winName,
44
+ * alwaysOnTop: true,
45
+ * autoShow: true,
46
+ * defaultCentered: true,
47
+ * defaultHeight: 271,
48
+ * defaultTop: true,
49
+ * defaultWidth: 362,
50
+ * frame: false,
51
+ * resizable: false
52
+ * });
53
+ * }
54
+ *
55
+ * const app = fin.Application.getCurrentSync();
56
+ * app.on('window-auth-requested', (event) => {
57
+ * if (event.authInfo.isProxy) {
58
+ * const identity = { uuid: event.uuid, name: event.name};
59
+ * createAuthUI(identity, 'userLoginPageUrl', event.authInfo);
60
+ * }
61
+ *
62
+ * });
63
+ * ```
64
+ *
65
+ * Don't show any auth dialog:
66
+ * ```js
67
+ * const app = fin.Application.getCurrentSync();
68
+ * app.on('window-auth-requested', event => {
69
+ * if (event.authInfo.isProxy) {
70
+ * console.log('no auth dialog');
71
+ * }
72
+ * });
73
+ * ```
74
+ *
75
+ * User defined function. For example, showing a single dialog, alerting a support team and so on:
76
+ * ```js
77
+ * const app = fin.Application.getCurrentSync();
78
+ * app.on('window-auth-requested', event => {
79
+ * if (event.authInfo.isProxy) {
80
+ * // user defined function
81
+ * alert('Do whatever you like');
82
+ * }
83
+ * });
84
+ * ```
16
85
  */
17
86
  export type AuthRequestedEvent = NamedEvent & {
18
87
  type: 'auth-requested';
@@ -1,2 +1,12 @@
1
1
  "use strict";
2
+ /**
3
+ * Namespace for events that can be transmitted on an OpenFin Window's EventEmitter.
4
+ *
5
+ * Window events fall into two categories: propagated and non-propagated. Propagated events will
6
+ * be re-emitted on the parent application of the target window, prefixed with "window-". For example,
7
+ * a window's "reloaded" event will be re-emitted on the parent application as "window-reloaded". Non-propagated
8
+ * events will not be re-emitted on the parent application.
9
+ *
10
+ * @packageDocumentation
11
+ */
2
12
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +1,18 @@
1
1
  import type * as OpenFin from '../../OpenFin';
2
2
  import { Base } from '../base';
3
- /**
4
- * @lends ExternalApplication
5
- */
6
3
  export default class ExternalApplicationModule extends Base {
7
4
  /**
8
5
  * Asynchronously returns an External Application object that represents an external application.
9
6
  * <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
10
7
  * provided its uuid is already known.
11
- * @param {string} uuid The UUID of the external application to be wrapped
12
- * @return {Promise.<ExternalApplication>}
13
- * @tutorial ExternalApplication.wrap
8
+ * @param uuid The UUID of the external application to be wrapped
9
+ *
10
+ * @example
11
+ * ```js
12
+ * fin.ExternalApplication.wrap('javaApp-uuid');
13
+ * .then(extApp => console.log('wrapped external application'))
14
+ * .catch(err => console.log(err));
15
+ * ```
14
16
  * @static
15
17
  */
16
18
  wrap(uuid: string): Promise<OpenFin.ExternalApplication>;
@@ -18,9 +20,14 @@ export default class ExternalApplicationModule extends Base {
18
20
  * Synchronously returns an External Application object that represents an external application.
19
21
  * <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
20
22
  * provided its uuid is already known.
21
- * @param {string} uuid The UUID of the external application to be wrapped
22
- * @return {ExternalApplication}
23
- * @tutorial ExternalApplication.wrapSync
23
+ * @param uuid The UUID of the external application to be wrapped
24
+ *
25
+ * @example
26
+ * ```js
27
+ * const extApp = fin.ExternalApplication.wrapSync('javaApp-uuid');
28
+ * const info = await extApp.getInfo();
29
+ * console.log(info);
30
+ * ```
24
31
  * @static
25
32
  */
26
33
  wrapSync(uuid: string): OpenFin.ExternalApplication;
@@ -2,17 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const base_1 = require("../base");
4
4
  const Instance_1 = require("./Instance");
5
- /**
6
- * @lends ExternalApplication
7
- */
8
5
  class ExternalApplicationModule extends base_1.Base {
9
6
  /**
10
7
  * Asynchronously returns an External Application object that represents an external application.
11
8
  * <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
12
9
  * provided its uuid is already known.
13
- * @param {string} uuid The UUID of the external application to be wrapped
14
- * @return {Promise.<ExternalApplication>}
15
- * @tutorial ExternalApplication.wrap
10
+ * @param uuid The UUID of the external application to be wrapped
11
+ *
12
+ * @example
13
+ * ```js
14
+ * fin.ExternalApplication.wrap('javaApp-uuid');
15
+ * .then(extApp => console.log('wrapped external application'))
16
+ * .catch(err => console.log(err));
17
+ * ```
16
18
  * @static
17
19
  */
18
20
  wrap(uuid) {
@@ -25,9 +27,14 @@ class ExternalApplicationModule extends base_1.Base {
25
27
  * Synchronously returns an External Application object that represents an external application.
26
28
  * <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
27
29
  * provided its uuid is already known.
28
- * @param {string} uuid The UUID of the external application to be wrapped
29
- * @return {ExternalApplication}
30
- * @tutorial ExternalApplication.wrapSync
30
+ * @param uuid The UUID of the external application to be wrapped
31
+ *
32
+ * @example
33
+ * ```js
34
+ * const extApp = fin.ExternalApplication.wrapSync('javaApp-uuid');
35
+ * const info = await extApp.getInfo();
36
+ * console.log(info);
37
+ * ```
31
38
  * @static
32
39
  */
33
40
  wrapSync(uuid) {
@@ -2,26 +2,27 @@ import type * as OpenFin from '../../OpenFin';
2
2
  import { EmitterBase } from '../base';
3
3
  import { Transport } from '../../transport/transport';
4
4
  /**
5
- * @classdesc An ExternalApplication object representing native language adapter connections to the runtime. Allows
6
- * the developer to listen to <a href="tutorial-ExternalApplication.EventEmitter.html">application events.</a>
5
+ * An ExternalApplication object representing native language adapter connections to the runtime. Allows
6
+ * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
7
7
  * Discovery of connections is provided by <a href="tutorial-System.getAllExternalApplications.html">getAllExternalApplications.</a>
8
8
  *
9
9
  * Processes that can be wrapped as `ExternalApplication`s include the following:
10
10
  * - Processes which have connected to an OpenFin runtime via an adapter
11
11
  * - Processes started via `System.launchExternalApplication`
12
12
  * - Processes monitored via `System.monitorExternalProcess`
13
- * @class
14
- * @hideconstructor
15
13
  */
16
14
  export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApplicationEvent> {
17
15
  identity: OpenFin.ApplicationIdentity;
16
+ /**
17
+ * @internal
18
+ */
18
19
  constructor(wire: Transport, identity: OpenFin.ApplicationIdentity);
19
20
  /**
20
21
  * Adds a listener to the end of the listeners array for the specified event.
21
- * @param { string | symbol } eventType - The type of the event.
22
- * @param { Function } listener - Called whenever an event of the specified type occurs.
23
- * @param { SubOptions } [options] - Option to support event timestamps.
24
- * @return {Promise.<this>}
22
+ * @param eventType - The type of the event.
23
+ * @param listener - Called whenever an event of the specified type occurs.
24
+ * @param options - Option to support event timestamps.
25
+ *
25
26
  * @function addListener
26
27
  * @memberof ExternalApplication
27
28
  * @instance
@@ -29,10 +30,10 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
29
30
  */
30
31
  /**
31
32
  * Adds a listener to the end of the listeners array for the specified event.
32
- * @param { string | symbol } eventType - The type of the event.
33
- * @param { Function } listener - Called whenever an event of the specified type occurs.
34
- * @param { SubOptions } [options] - Option to support event timestamps.
35
- * @return {Promise.<this>}
33
+ * @param eventType - The type of the event.
34
+ * @param listener - Called whenever an event of the specified type occurs.
35
+ * @param options - Option to support event timestamps.
36
+ *
36
37
  * @function on
37
38
  * @memberof ExternalApplication
38
39
  * @instance
@@ -40,10 +41,10 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
40
41
  */
41
42
  /**
42
43
  * 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.
43
- * @param { string | symbol } eventType - The type of the event.
44
- * @param { Function } listener - The callback function.
45
- * @param { SubOptions } [options] - Option to support event timestamps.
46
- * @return {Promise.<this>}
44
+ * @param eventType - The type of the event.
45
+ * @param listener - The callback function.
46
+ * @param options - Option to support event timestamps.
47
+ *
47
48
  * @function once
48
49
  * @memberof ExternalApplication
49
50
  * @instance
@@ -51,10 +52,10 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
51
52
  */
52
53
  /**
53
54
  * Adds a listener to the beginning of the listeners array for the specified event.
54
- * @param { string | symbol } eventType - The type of the event.
55
- * @param { Function } listener - The callback function.
56
- * @param { SubOptions } [options] - Option to support event timestamps.
57
- * @return {Promise.<this>}
55
+ * @param eventType - The type of the event.
56
+ * @param listener - The callback function.
57
+ * @param options - Option to support event timestamps.
58
+ *
58
59
  * @function prependListener
59
60
  * @memberof ExternalApplication
60
61
  * @instance
@@ -63,10 +64,10 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
63
64
  /**
64
65
  * 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.
65
66
  * The listener is added to the beginning of the listeners array.
66
- * @param { string | symbol } eventType - The type of the event.
67
- * @param { Function } listener - The callback function.
68
- * @param { SubOptions } [options] - Option to support event timestamps.
69
- * @return {Promise.<this>}
67
+ * @param eventType - The type of the event.
68
+ * @param listener - The callback function.
69
+ * @param options - Option to support event timestamps.
70
+ *
70
71
  * @function prependOnceListener
71
72
  * @memberof ExternalApplication
72
73
  * @instance
@@ -75,10 +76,10 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
75
76
  /**
76
77
  * Remove a listener from the listener array for the specified event.
77
78
  * Caution: Calling this method changes the array indices in the listener array behind the listener.
78
- * @param { string | symbol } eventType - The type of the event.
79
- * @param { Function } listener - The callback function.
80
- * @param { SubOptions } [options] - Option to support event timestamps.
81
- * @return {Promise.<this>}
79
+ * @param eventType - The type of the event.
80
+ * @param listener - The callback function.
81
+ * @param options - Option to support event timestamps.
82
+ *
82
83
  * @function removeListener
83
84
  * @memberof ExternalApplication
84
85
  * @instance
@@ -86,8 +87,8 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
86
87
  */
87
88
  /**
88
89
  * Removes all listeners, or those of the specified event.
89
- * @param { string | symbol } [eventType] - The type of the event.
90
- * @return {Promise.<this>}
90
+ * @param eventType - The type of the event.
91
+ *
91
92
  * @function removeAllListeners
92
93
  * @memberof ExternalApplication
93
94
  * @instance
@@ -95,8 +96,15 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
95
96
  */
96
97
  /**
97
98
  * Retrieves information about the external application.
98
- * @return {Promise.<ExternalApplicationInfo>}
99
- * @tutorial ExternalApplication.getInfo
99
+ *
100
+ * @example
101
+ * ```js
102
+ * async function getInfo() {
103
+ * const extApp = await fin.ExternalApplication.wrap('javaApp-uuid');
104
+ * return await extApp.getInfo();
105
+ * }
106
+ * getInfo().then(info => console.log(info)).catch(err => console.log(err));
107
+ * ```
100
108
  */
101
109
  getInfo(): Promise<OpenFin.ExternalApplicationInfo>;
102
110
  }