@openfin/core 25.68.30 → 25.70.2

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 (199) hide show
  1. package/OpenFin.d.ts +30 -826
  2. package/README.md +12 -2
  3. package/package.json +1 -1
  4. package/src/api/application/Factory.d.ts +145 -145
  5. package/src/api/application/Factory.js +229 -229
  6. package/src/api/application/Instance.d.ts +301 -302
  7. package/src/api/application/Instance.js +412 -412
  8. package/src/api/application/index.d.ts +3 -3
  9. package/src/api/application/index.js +15 -15
  10. package/src/api/base.d.ts +43 -43
  11. package/src/api/base.js +177 -177
  12. package/src/api/clipboard/index.d.ts +69 -69
  13. package/src/api/clipboard/index.js +88 -88
  14. package/src/api/events/application.d.ts +69 -0
  15. package/src/api/events/application.js +2 -0
  16. package/src/api/events/base.d.ts +17 -0
  17. package/src/api/events/base.js +2 -0
  18. package/src/api/events/channel.d.ts +10 -11
  19. package/src/api/events/channel.js +2 -2
  20. package/src/api/events/emitterMap.d.ts +11 -11
  21. package/src/api/events/emitterMap.js +35 -35
  22. package/src/api/events/eventAggregator.d.ts +5 -5
  23. package/src/api/events/eventAggregator.js +43 -43
  24. package/src/api/events/externalApplication.d.ts +5 -0
  25. package/src/api/events/externalApplication.js +2 -0
  26. package/src/api/events/frame.d.ts +9 -0
  27. package/src/api/events/frame.js +2 -0
  28. package/src/api/events/globalHotkey.d.ts +10 -0
  29. package/src/api/events/globalHotkey.js +2 -0
  30. package/src/api/events/platform.d.ts +18 -0
  31. package/src/api/events/platform.js +2 -0
  32. package/src/api/events/system.d.ts +22 -0
  33. package/src/api/events/system.js +2 -0
  34. package/src/api/events/view.d.ts +56 -0
  35. package/src/api/events/view.js +2 -0
  36. package/src/api/events/webcontents.d.ts +48 -0
  37. package/src/api/events/webcontents.js +2 -0
  38. package/src/api/events/window.d.ts +176 -0
  39. package/src/api/events/window.js +2 -0
  40. package/src/api/external-application/Factory.d.ts +26 -26
  41. package/src/api/external-application/Factory.js +40 -40
  42. package/src/api/external-application/Instance.d.ts +101 -102
  43. package/src/api/external-application/Instance.js +109 -109
  44. package/src/api/external-application/index.d.ts +3 -3
  45. package/src/api/external-application/index.js +15 -15
  46. package/src/api/fin.d.ts +49 -49
  47. package/src/api/fin.js +43 -43
  48. package/src/api/frame/Factory.d.ts +36 -36
  49. package/src/api/frame/Factory.js +69 -69
  50. package/src/api/frame/Instance.d.ts +121 -121
  51. package/src/api/frame/Instance.js +130 -130
  52. package/src/api/frame/index.d.ts +3 -3
  53. package/src/api/frame/index.js +15 -15
  54. package/src/api/global-hotkey/index.d.ts +38 -38
  55. package/src/api/global-hotkey/index.js +58 -58
  56. package/src/api/interappbus/channel/channel.d.ts +26 -26
  57. package/src/api/interappbus/channel/channel.js +77 -77
  58. package/src/api/interappbus/channel/channels-docs.d.ts +318 -318
  59. package/src/api/interappbus/channel/channels-docs.js +376 -376
  60. package/src/api/interappbus/channel/client.d.ts +22 -22
  61. package/src/api/interappbus/channel/client.js +84 -84
  62. package/src/api/interappbus/channel/connection-manager.d.ts +28 -28
  63. package/src/api/interappbus/channel/connection-manager.js +244 -244
  64. package/src/api/interappbus/channel/index.d.ts +22 -23
  65. package/src/api/interappbus/channel/index.js +121 -121
  66. package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +13 -13
  67. package/src/api/interappbus/channel/protocols/classic/message-receiver.js +73 -73
  68. package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +22 -22
  69. package/src/api/interappbus/channel/protocols/classic/strategy.js +84 -84
  70. package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +20 -20
  71. package/src/api/interappbus/channel/protocols/combined/strategy.js +58 -58
  72. package/src/api/interappbus/channel/protocols/index.d.ts +44 -44
  73. package/src/api/interappbus/channel/protocols/index.js +2 -2
  74. package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +10 -10
  75. package/src/api/interappbus/channel/protocols/protocol-manager.js +43 -43
  76. package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +23 -23
  77. package/src/api/interappbus/channel/protocols/rtc/endpoint.js +135 -135
  78. package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +30 -30
  79. package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +131 -131
  80. package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +22 -22
  81. package/src/api/interappbus/channel/protocols/rtc/strategy.js +87 -87
  82. package/src/api/interappbus/channel/protocols/strategy-types.d.ts +13 -13
  83. package/src/api/interappbus/channel/protocols/strategy-types.js +2 -2
  84. package/src/api/interappbus/channel/protocols/strategy.d.ts +15 -15
  85. package/src/api/interappbus/channel/protocols/strategy.js +2 -2
  86. package/src/api/interappbus/channel/provider.d.ts +31 -31
  87. package/src/api/interappbus/channel/provider.js +160 -160
  88. package/src/api/interappbus/index.d.ts +85 -86
  89. package/src/api/interappbus/index.js +175 -175
  90. package/src/api/interop/Factory.d.ts +37 -37
  91. package/src/api/interop/Factory.js +54 -54
  92. package/src/api/interop/InteropBroker.d.ts +363 -363
  93. package/src/api/interop/InteropBroker.js +914 -914
  94. package/src/api/interop/InteropClient.d.ts +268 -268
  95. package/src/api/interop/InteropClient.js +450 -450
  96. package/src/api/interop/SessionContextGroupBroker.d.ts +26 -26
  97. package/src/api/interop/SessionContextGroupBroker.js +107 -107
  98. package/src/api/interop/SessionContextGroupClient.d.ts +20 -20
  99. package/src/api/interop/SessionContextGroupClient.js +85 -85
  100. package/src/api/interop/fdc3/fdc3-1.2.d.ts +187 -187
  101. package/src/api/interop/fdc3/fdc3-1.2.js +385 -385
  102. package/src/api/interop/fdc3/fdc3.js +17 -17
  103. package/src/api/interop/fdc3/utils.d.ts +6 -6
  104. package/src/api/interop/fdc3/utils.js +17 -17
  105. package/src/api/interop/index.d.ts +4 -4
  106. package/src/api/interop/index.js +16 -16
  107. package/src/api/interop/utils.d.ts +11 -11
  108. package/src/api/interop/utils.js +36 -36
  109. package/src/api/me.d.ts +38 -35
  110. package/src/api/me.js +128 -60
  111. package/src/api/platform/Factory.d.ts +109 -109
  112. package/src/api/platform/Factory.js +188 -188
  113. package/src/api/platform/Instance.d.ts +122 -122
  114. package/src/api/platform/Instance.js +298 -298
  115. package/src/api/platform/common-utils.d.ts +6 -6
  116. package/src/api/platform/common-utils.js +16 -16
  117. package/src/api/platform/index.d.ts +3 -3
  118. package/src/api/platform/index.js +15 -15
  119. package/src/api/platform/layout/Factory.d.ts +108 -108
  120. package/src/api/platform/layout/Factory.js +189 -189
  121. package/src/api/platform/layout/Instance.d.ts +49 -49
  122. package/src/api/platform/layout/Instance.js +99 -99
  123. package/src/api/platform/layout/index.d.ts +2 -2
  124. package/src/api/platform/layout/index.js +14 -14
  125. package/src/api/platform/layout/shapes.d.ts +11 -0
  126. package/src/api/{window → platform/layout}/shapes.js +2 -2
  127. package/src/api/snapshot-source/Factory.d.ts +36 -36
  128. package/src/api/snapshot-source/Factory.js +65 -65
  129. package/src/api/snapshot-source/Instance.d.ts +30 -30
  130. package/src/api/snapshot-source/Instance.js +134 -134
  131. package/src/api/snapshot-source/index.d.ts +3 -3
  132. package/src/api/snapshot-source/index.js +15 -15
  133. package/src/api/snapshot-source/utils.d.ts +1 -1
  134. package/src/api/snapshot-source/utils.js +5 -5
  135. package/src/api/system/index.d.ts +960 -961
  136. package/src/api/system/index.js +1241 -1241
  137. package/src/api/view/Factory.d.ts +49 -49
  138. package/src/api/view/Factory.js +103 -103
  139. package/src/api/view/Instance.d.ts +387 -380
  140. package/src/api/view/Instance.js +422 -415
  141. package/src/api/view/index.d.ts +3 -3
  142. package/src/api/view/index.js +15 -15
  143. package/src/api/webcontents/main.d.ts +36 -36
  144. package/src/api/webcontents/main.js +82 -82
  145. package/src/api/window/Factory.d.ts +44 -44
  146. package/src/api/window/Factory.js +91 -91
  147. package/src/api/window/Instance.d.ts +972 -966
  148. package/src/api/window/Instance.js +1209 -1202
  149. package/src/api/window/index.d.ts +3 -5
  150. package/src/api/window/index.js +15 -17
  151. package/src/environment/environment.d.ts +28 -25
  152. package/src/environment/environment.js +4 -4
  153. package/src/environment/node-env.d.ts +25 -26
  154. package/src/environment/node-env.js +64 -64
  155. package/src/environment/openfin-env.d.ts +29 -30
  156. package/src/environment/openfin-env.js +107 -107
  157. package/src/mock.d.ts +3 -3
  158. package/src/mock.js +91 -90
  159. package/src/shapes/ERROR_BOX_TYPES.d.ts +1 -0
  160. package/src/shapes/ERROR_BOX_TYPES.js +2 -0
  161. package/src/shapes/WebOptions.d.ts +12 -0
  162. package/src/shapes/WebOptions.js +2 -0
  163. package/src/shapes/WindowOptions.d.ts +42 -0
  164. package/src/shapes/WindowOptions.js +2 -0
  165. package/src/shapes/protocol.d.ts +178 -0
  166. package/src/shapes/protocol.js +2 -0
  167. package/src/transport/fin_store.d.ts +4 -4
  168. package/src/transport/fin_store.js +16 -16
  169. package/src/transport/transport-errors.d.ts +18 -18
  170. package/src/transport/transport-errors.js +37 -37
  171. package/src/transport/transport.d.ts +56 -43
  172. package/src/transport/transport.js +181 -181
  173. package/src/transport/wire.d.ts +71 -11
  174. package/src/transport/wire.js +32 -32
  175. package/src/util/asyncFilter.d.ts +1 -1
  176. package/src/util/asyncFilter.js +7 -7
  177. package/src/util/errors.d.ts +9 -5
  178. package/src/util/errors.js +11 -11
  179. package/src/util/exhaustive.d.ts +1 -1
  180. package/src/util/exhaustive.js +7 -7
  181. package/src/util/http.d.ts +11 -11
  182. package/src/util/http.js +83 -83
  183. package/src/util/normalize-config.d.ts +3 -5
  184. package/src/util/normalize-config.js +47 -47
  185. package/src/util/promises.d.ts +5 -5
  186. package/src/util/promises.js +27 -27
  187. package/src/util/ref-counter.d.ts +7 -7
  188. package/src/util/ref-counter.js +51 -51
  189. package/src/util/runtimeVersioning.d.ts +3 -3
  190. package/src/util/runtimeVersioning.js +25 -25
  191. package/src/util/utilTypes.d.ts +8 -8
  192. package/src/util/utilTypes.js +2 -2
  193. package/src/util/validate.d.ts +3 -3
  194. package/src/util/validate.js +11 -11
  195. package/docs.README(OLD).md +0 -82
  196. package/resources/win/OpenFinRVM.exe +0 -0
  197. package/src/api/window/bounds-changed.d.ts +0 -10
  198. package/src/api/window/bounds-changed.js +0 -6
  199. package/src/api/window/shapes.d.ts +0 -13
@@ -1,302 +1,301 @@
1
- import { EmitterBase } from '../base';
2
- import Transport from '../../transport/transport';
3
- import ApplicationEvents = OpenFin.ApplicationEvents;
4
- /**
5
- * @classdesc An object representing an application. Allows the developer to create,
6
- * execute, show/close an application as well as listen to <a href="tutorial-Application.EventEmitter.html">application events</a>.
7
- * @class
8
- * @hideconstructor
9
- */
10
- export declare class Application extends EmitterBase<ApplicationEvents> {
11
- identity: OpenFin.ApplicationIdentity;
12
- _manifestUrl?: string;
13
- private window;
14
- constructor(wire: Transport, identity: OpenFin.ApplicationIdentity);
15
- private windowListFromIdentityList;
16
- /**
17
- * Adds a listener to the end of the listeners array for the specified event.
18
- * @param { string | symbol } eventType - The type of the event.
19
- * @param { Function } listener - Called whenever an event of the specified type occurs.
20
- * @param { SubOptions } [options] - Option to support event timestamps.
21
- * @return {Promise.<this>}
22
- * @function addListener
23
- * @memberof Application
24
- * @instance
25
- * @tutorial Application.EventEmitter
26
- */
27
- /**
28
- * Adds a listener to the end of the listeners array for the specified event.
29
- * @param { string | symbol } eventType - The type of the event.
30
- * @param { Function } listener - Called whenever an event of the specified type occurs.
31
- * @param { SubOptions } [options] - Option to support event timestamps.
32
- * @return {Promise.<this>}
33
- * @function on
34
- * @memberof Application
35
- * @instance
36
- * @tutorial Application.EventEmitter
37
- */
38
- /**
39
- * 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.
40
- * @param { string | symbol } eventType - The type of the event.
41
- * @param { Function } listener - The callback function.
42
- * @param { SubOptions } [options] - Option to support event timestamps.
43
- * @return {Promise.<this>}
44
- * @function once
45
- * @memberof Application
46
- * @instance
47
- * @tutorial Application.EventEmitter
48
- */
49
- /**
50
- * Adds a listener to the beginning of the listeners array for the specified event.
51
- * @param { string | symbol } eventType - The type of the event.
52
- * @param { Function } listener - The callback function.
53
- * @param { SubOptions } [options] - Option to support event timestamps.
54
- * @return {Promise.<this>}
55
- * @function prependListener
56
- * @memberof Application
57
- * @instance
58
- * @tutorial Application.EventEmitter
59
- */
60
- /**
61
- * 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.
62
- * The listener is added to the beginning of the listeners array.
63
- * @param { string | symbol } eventType - The type of the event.
64
- * @param { Function } listener - The callback function.
65
- * @param { SubOptions } [options] - Option to support event timestamps.
66
- * @return {Promise.<this>}
67
- * @function prependOnceListener
68
- * @memberof Application
69
- * @instance
70
- * @tutorial Application.EventEmitter
71
- */
72
- /**
73
- * Remove a listener from the listener array for the specified event.
74
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
75
- * @param { string | symbol } eventType - The type of the event.
76
- * @param { Function } listener - The callback function.
77
- * @param { SubOptions } [options] - Option to support event timestamps.
78
- * @return {Promise.<this>}
79
- * @function removeListener
80
- * @memberof Application
81
- * @instance
82
- * @tutorial Application.EventEmitter
83
- */
84
- /**
85
- * Removes all listeners, or those of the specified event.
86
- * @param { string | symbol } [eventType] - The type of the event.
87
- * @return {Promise.<this>}
88
- * @function removeAllListeners
89
- * @memberof Application
90
- * @instance
91
- * @tutorial Application.EventEmitter
92
- */
93
- /**
94
- * Determines if the application is currently running.
95
- * @return {Promise.<boolean>}
96
- * @tutorial Application.isRunning
97
- */
98
- /**
99
- * JumpListCategory interface
100
- * @typedef { object } JumpListCategory
101
- * @property { string } name The display title for the category. If omitted, items in this category will be placed into the standard 'Tasks' category. There can be only one such category, and it will always be displayed at the bottom of the JumpList.
102
- * @property { JumpListItem[] } items Array of JumpListItem objects
103
- */
104
- /**
105
- * JumpListItem interface
106
- * @typedef { object } JumpListItem
107
- * @property { string } type One of the following: "task" or "separator". Defaults to task.
108
- * @property { string } title The text to be displayed for the JumpList Item. Should only be set if type is "task".
109
- * @property { string } description Description of the task (displayed in a tooltip). Should only be set if type is "task".
110
- * @property { string } deepLink Deep link to a manifest, i.e: fins://path.to/manifest.json?$$param1=value1. See {@link https://developers.openfin.co/docs/deep-linking deep-linking} for more information.
111
- * @property { string } iconPath The absolute path to an icon to be displayed for the item, which can be an arbitrary resource file that contains an icon (e.g. .ico, .exe, .dll).
112
- * @property { number } iconIndex The index of the icon in the resource file. If a resource file contains multiple icons this value can be used to specify the zero-based index of the icon that should be displayed for this task. If a resource file contains only one icon, this property should be set to zero.
113
- */
114
- isRunning(): Promise<boolean>;
115
- /**
116
- * Closes the application and any child windows created by the application.
117
- * Cleans the application from state so it is no longer found in getAllApplications.
118
- * @param { boolean } [force = false] Close will be prevented from closing when force is false and
119
- * ‘close-requested’ has been subscribed to for application’s main window.
120
- * @return {Promise.<boolean>}
121
- * @tutorial Application.quit
122
- */
123
- quit(force?: boolean): Promise<void>;
124
- private _close;
125
- close(force?: boolean): Promise<void>;
126
- /**
127
- * Retrieves an array of wrapped fin.Windows for each of the application’s child windows.
128
- * @return {Promise.Array.<_Window>}
129
- * @tutorial Application.getChildWindows
130
- */
131
- getChildWindows(): Promise<Array<OpenFin.Window>>;
132
- /**
133
- * Retrieves the JSON manifest that was used to create the application. Invokes the error callback
134
- * if the application was not created from a manifest.
135
- * @return {Promise.<any>}
136
- * @tutorial Application.getManifest
137
- */
138
- getManifest(): Promise<any>;
139
- /**
140
- * Retrieves UUID of the application that launches this application. Invokes the error callback
141
- * if the application was created from a manifest.
142
- * @return {Promise.<string>}
143
- * @tutorial Application.getParentUuid
144
- */
145
- getParentUuid(): Promise<string>;
146
- /**
147
- * Retrieves current application's shortcut configuration.
148
- * @return {Promise.<ShortCutConfig>}
149
- * @tutorial Application.getShortcuts
150
- */
151
- getShortcuts(): Promise<OpenFin.ShortCutConfig>;
152
- /**
153
- * Retrieves current application's views.
154
- * @experimental
155
- * @return {Promise.Array.<View>}
156
- * @tutorial Application.getViews
157
- */
158
- getViews(): Promise<Array<OpenFin.View>>;
159
- /**
160
- * Returns the current zoom level of the application.
161
- * @return {Promise.<number>}
162
- * @tutorial Application.getZoomLevel
163
- */
164
- getZoomLevel(): Promise<number>;
165
- /**
166
- * Returns an instance of the main Window of the application
167
- * @return {Promise.<_Window>}
168
- * @tutorial Application.getWindow
169
- */
170
- getWindow(): Promise<OpenFin.Window>;
171
- /**
172
- * Manually registers a user with the licensing service. The only data sent by this call is userName and appName.
173
- * @param { string } userName - username to be passed to the RVM.
174
- * @param { string } appName - app name to be passed to the RVM.
175
- * @return {Promise.<void>}
176
- * @tutorial Application.registerUser
177
- */
178
- registerUser(userName: string, appName: string): Promise<void>;
179
- /**
180
- * Removes the application’s icon from the tray.
181
- * @return {Promise.<void>}
182
- * @tutorial Application.removeTrayIcon
183
- */
184
- removeTrayIcon(): Promise<void>;
185
- /**
186
- * Restarts the application.
187
- * @return {Promise.<void>}
188
- * @tutorial Application.restart
189
- */
190
- restart(): Promise<void>;
191
- /**
192
- * DEPRECATED method to run the application.
193
- * Needed when starting application via {@link Application.create}, but NOT needed when starting via {@link Application.start}.
194
- * @return {Promise.<void>}
195
- * @tutorial Application.run
196
- * @ignore
197
- */
198
- run(): Promise<void>;
199
- private _run;
200
- /**
201
- * Instructs the RVM to schedule one restart of the application.
202
- * @return {Promise.<void>}
203
- * @tutorial Application.scheduleRestart
204
- */
205
- scheduleRestart(): Promise<void>;
206
- /**
207
- * Sends a message to the RVM to upload the application's logs. On success,
208
- * an object containing logId is returned.
209
- * @return {Promise.<LogInfo>}
210
- * @tutorial Application.sendApplicationLog
211
- */
212
- sendApplicationLog(): Promise<OpenFin.LogInfo>;
213
- /**
214
- * Sets or removes a custom JumpList for the application. Only applicable in Windows OS.
215
- * If categories is null the previously set custom JumpList (if any) will be replaced by the standard JumpList for the app (managed by Windows).
216
- * Note: If the "name" property is omitted it defaults to "tasks".
217
- * @param { Array.<JumpListCategory> | null } jumpListCategories An array of JumpList Categories to populate. If null, remove any existing JumpList configuration and set to Windows default.
218
- * @return { Promise.<void> }
219
- * @tutorial Application.setJumpList
220
- */
221
- setJumpList(jumpListCategories: OpenFin.JumpListCategory[] | null): Promise<void>;
222
- /**
223
- * Adds a customizable icon in the system tray. To listen for a click on the icon use the `tray-icon-clicked` event.
224
- * @param { string } icon Image URL or base64 encoded string to be used as the icon
225
- * @return {Promise.<void>}
226
- * @tutorial Application.setTrayIcon
227
- */
228
- setTrayIcon(icon: string): Promise<void>;
229
- /**
230
- * Sets new application's shortcut configuration. Windows only.
231
- * @param { ShortCutConfig } config New application's shortcut configuration.
232
- * @param { boolean } [config.desktop] - Enable/disable desktop shortcut.
233
- * @param { boolean } [config.startMenu] - Enable/disable start menu shortcut.
234
- * @param { boolean } [config.systemStartup] - Enable/disable system startup shortcut.
235
- * @return {Promise.<void>}
236
- * @tutorial Application.setShortcuts
237
- */
238
- setShortcuts(config: OpenFin.ShortCutConfig): Promise<void>;
239
- /**
240
- * Sets the query string in all shortcuts for this app. Requires RVM 5.5+.
241
- * @param { string } queryString The new query string for this app's shortcuts.
242
- * @return {Promise.<void>}
243
- * @tutorial Application.setShortcutQueryParams
244
- */
245
- setShortcutQueryParams(queryString: string): Promise<void>;
246
- /**
247
- * Sets the zoom level of the application. The original size is 0 and each increment above or below represents zooming 20%
248
- * larger or smaller to default limits of 300% and 50% of original size, respectively.
249
- * @param { number } level The zoom level
250
- * @return {Promise.<void>}
251
- * @tutorial Application.setZoomLevel
252
- */
253
- setZoomLevel(level: number): Promise<void>;
254
- /**
255
- * Sets a username to correlate with App Log Management.
256
- * @param { string } username Username to correlate with App's Log.
257
- * @return {Promise.<void>}
258
- * @tutorial Application.setAppLogUsername
259
- */
260
- setAppLogUsername(username: string): Promise<void>;
261
- /**
262
- * @summary Retrieves information about the system tray. If the system tray is not set, it will throw an error message.
263
- * @desc The only information currently returned is the position and dimensions.
264
- * @return {Promise.<TrayInfo>}
265
- * @tutorial Application.getTrayIconInfo
266
- */
267
- getTrayIconInfo(): Promise<OpenFin.TrayInfo>;
268
- /**
269
- * Closes the application by terminating its process.
270
- * @return {Promise.<void>}
271
- * @tutorial Application.terminate
272
- */
273
- terminate(): Promise<void>;
274
- /**
275
- * Waits for a hanging application. This method can be called in response to an application
276
- * "not-responding" to allow the application to continue and to generate another "not-responding"
277
- * message after a certain period of time.
278
- * @return {Promise.<void>}
279
- * @ignore
280
- */
281
- wait(): Promise<void>;
282
- /**
283
- * Retrieves information about the application.
284
- * @return {Promise.<ApplicationInfo>}
285
- * @tutorial Application.getInfo
286
- */
287
- getInfo(): Promise<OpenFin.ApplicationInfo>;
288
- /**
289
- * Retrieves all process information for entities (windows and views) associated with an application.
290
- * @return {Promise.<AppProcessInfo>}
291
- * @tutorial Application.getProcessInfo
292
- * @experimental
293
- */
294
- getProcessInfo(): Promise<OpenFin.AppProcessInfo>;
295
- /**
296
- * Sets file auto download location.
297
- * @param { string } downloadLocation file auto download location
298
- * @return {Promise.<void>}
299
- * @tutorial Application.setFileDownloadLocation
300
- */
301
- setFileDownloadLocation(downloadLocation: string): Promise<void>;
302
- }
1
+ import { EmitterBase } from '../base';
2
+ import Transport from '../../transport/transport';
3
+ /**
4
+ * @classdesc An object representing an application. Allows the developer to create,
5
+ * execute, show/close an application as well as listen to <a href="tutorial-Application.EventEmitter.html">application events</a>.
6
+ * @class
7
+ * @hideconstructor
8
+ */
9
+ export declare class Application extends EmitterBase<OpenFin.ApplicationEvents> {
10
+ identity: OpenFin.ApplicationIdentity;
11
+ _manifestUrl?: string;
12
+ private window;
13
+ constructor(wire: Transport, identity: OpenFin.ApplicationIdentity);
14
+ private windowListFromIdentityList;
15
+ /**
16
+ * Adds a listener to the end of the listeners array for the specified event.
17
+ * @param { string | symbol } eventType - The type of the event.
18
+ * @param { Function } listener - Called whenever an event of the specified type occurs.
19
+ * @param { SubOptions } [options] - Option to support event timestamps.
20
+ * @return {Promise.<this>}
21
+ * @function addListener
22
+ * @memberof Application
23
+ * @instance
24
+ * @tutorial Application.EventEmitter
25
+ */
26
+ /**
27
+ * Adds a listener to the end of the listeners array for the specified event.
28
+ * @param { string | symbol } eventType - The type of the event.
29
+ * @param { Function } listener - Called whenever an event of the specified type occurs.
30
+ * @param { SubOptions } [options] - Option to support event timestamps.
31
+ * @return {Promise.<this>}
32
+ * @function on
33
+ * @memberof Application
34
+ * @instance
35
+ * @tutorial Application.EventEmitter
36
+ */
37
+ /**
38
+ * 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.
39
+ * @param { string | symbol } eventType - The type of the event.
40
+ * @param { Function } listener - The callback function.
41
+ * @param { SubOptions } [options] - Option to support event timestamps.
42
+ * @return {Promise.<this>}
43
+ * @function once
44
+ * @memberof Application
45
+ * @instance
46
+ * @tutorial Application.EventEmitter
47
+ */
48
+ /**
49
+ * Adds a listener to the beginning of the listeners array for the specified event.
50
+ * @param { string | symbol } eventType - The type of the event.
51
+ * @param { Function } listener - The callback function.
52
+ * @param { SubOptions } [options] - Option to support event timestamps.
53
+ * @return {Promise.<this>}
54
+ * @function prependListener
55
+ * @memberof Application
56
+ * @instance
57
+ * @tutorial Application.EventEmitter
58
+ */
59
+ /**
60
+ * 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.
61
+ * The listener is added to the beginning of the listeners array.
62
+ * @param { string | symbol } eventType - The type of the event.
63
+ * @param { Function } listener - The callback function.
64
+ * @param { SubOptions } [options] - Option to support event timestamps.
65
+ * @return {Promise.<this>}
66
+ * @function prependOnceListener
67
+ * @memberof Application
68
+ * @instance
69
+ * @tutorial Application.EventEmitter
70
+ */
71
+ /**
72
+ * Remove a listener from the listener array for the specified event.
73
+ * Caution: Calling this method changes the array indices in the listener array behind the listener.
74
+ * @param { string | symbol } eventType - The type of the event.
75
+ * @param { Function } listener - The callback function.
76
+ * @param { SubOptions } [options] - Option to support event timestamps.
77
+ * @return {Promise.<this>}
78
+ * @function removeListener
79
+ * @memberof Application
80
+ * @instance
81
+ * @tutorial Application.EventEmitter
82
+ */
83
+ /**
84
+ * Removes all listeners, or those of the specified event.
85
+ * @param { string | symbol } [eventType] - The type of the event.
86
+ * @return {Promise.<this>}
87
+ * @function removeAllListeners
88
+ * @memberof Application
89
+ * @instance
90
+ * @tutorial Application.EventEmitter
91
+ */
92
+ /**
93
+ * Determines if the application is currently running.
94
+ * @return {Promise.<boolean>}
95
+ * @tutorial Application.isRunning
96
+ */
97
+ /**
98
+ * JumpListCategory interface
99
+ * @typedef { object } JumpListCategory
100
+ * @property { string } name The display title for the category. If omitted, items in this category will be placed into the standard 'Tasks' category. There can be only one such category, and it will always be displayed at the bottom of the JumpList.
101
+ * @property { JumpListItem[] } items Array of JumpListItem objects
102
+ */
103
+ /**
104
+ * JumpListItem interface
105
+ * @typedef { object } JumpListItem
106
+ * @property { string } type One of the following: "task" or "separator". Defaults to task.
107
+ * @property { string } title The text to be displayed for the JumpList Item. Should only be set if type is "task".
108
+ * @property { string } description Description of the task (displayed in a tooltip). Should only be set if type is "task".
109
+ * @property { string } deepLink Deep link to a manifest, i.e: fins://path.to/manifest.json?$$param1=value1. See {@link https://developers.openfin.co/docs/deep-linking deep-linking} for more information.
110
+ * @property { string } iconPath The absolute path to an icon to be displayed for the item, which can be an arbitrary resource file that contains an icon (e.g. .ico, .exe, .dll).
111
+ * @property { number } iconIndex The index of the icon in the resource file. If a resource file contains multiple icons this value can be used to specify the zero-based index of the icon that should be displayed for this task. If a resource file contains only one icon, this property should be set to zero.
112
+ */
113
+ isRunning(): Promise<boolean>;
114
+ /**
115
+ * Closes the application and any child windows created by the application.
116
+ * Cleans the application from state so it is no longer found in getAllApplications.
117
+ * @param { boolean } [force = false] Close will be prevented from closing when force is false and
118
+ * ‘close-requested’ has been subscribed to for application’s main window.
119
+ * @return {Promise.<boolean>}
120
+ * @tutorial Application.quit
121
+ */
122
+ quit(force?: boolean): Promise<void>;
123
+ private _close;
124
+ close(force?: boolean): Promise<void>;
125
+ /**
126
+ * Retrieves an array of wrapped fin.Windows for each of the application’s child windows.
127
+ * @return {Promise.Array.<_Window>}
128
+ * @tutorial Application.getChildWindows
129
+ */
130
+ getChildWindows(): Promise<Array<OpenFin.Window>>;
131
+ /**
132
+ * Retrieves the JSON manifest that was used to create the application. Invokes the error callback
133
+ * if the application was not created from a manifest.
134
+ * @return {Promise.<Manifest>}
135
+ * @tutorial Application.getManifest
136
+ */
137
+ getManifest(): Promise<OpenFin.Manifest>;
138
+ /**
139
+ * Retrieves UUID of the application that launches this application. Invokes the error callback
140
+ * if the application was created from a manifest.
141
+ * @return {Promise.<string>}
142
+ * @tutorial Application.getParentUuid
143
+ */
144
+ getParentUuid(): Promise<string>;
145
+ /**
146
+ * Retrieves current application's shortcut configuration.
147
+ * @return {Promise.<ShortCutConfig>}
148
+ * @tutorial Application.getShortcuts
149
+ */
150
+ getShortcuts(): Promise<OpenFin.ShortCutConfig>;
151
+ /**
152
+ * Retrieves current application's views.
153
+ * @experimental
154
+ * @return {Promise.Array.<View>}
155
+ * @tutorial Application.getViews
156
+ */
157
+ getViews(): Promise<Array<OpenFin.View>>;
158
+ /**
159
+ * Returns the current zoom level of the application.
160
+ * @return {Promise.<number>}
161
+ * @tutorial Application.getZoomLevel
162
+ */
163
+ getZoomLevel(): Promise<number>;
164
+ /**
165
+ * Returns an instance of the main Window of the application
166
+ * @return {Promise.<_Window>}
167
+ * @tutorial Application.getWindow
168
+ */
169
+ getWindow(): Promise<OpenFin.Window>;
170
+ /**
171
+ * Manually registers a user with the licensing service. The only data sent by this call is userName and appName.
172
+ * @param { string } userName - username to be passed to the RVM.
173
+ * @param { string } appName - app name to be passed to the RVM.
174
+ * @return {Promise.<void>}
175
+ * @tutorial Application.registerUser
176
+ */
177
+ registerUser(userName: string, appName: string): Promise<void>;
178
+ /**
179
+ * Removes the application’s icon from the tray.
180
+ * @return {Promise.<void>}
181
+ * @tutorial Application.removeTrayIcon
182
+ */
183
+ removeTrayIcon(): Promise<void>;
184
+ /**
185
+ * Restarts the application.
186
+ * @return {Promise.<void>}
187
+ * @tutorial Application.restart
188
+ */
189
+ restart(): Promise<void>;
190
+ /**
191
+ * DEPRECATED method to run the application.
192
+ * Needed when starting application via {@link Application.create}, but NOT needed when starting via {@link Application.start}.
193
+ * @return {Promise.<void>}
194
+ * @tutorial Application.run
195
+ * @ignore
196
+ */
197
+ run(): Promise<void>;
198
+ private _run;
199
+ /**
200
+ * Instructs the RVM to schedule one restart of the application.
201
+ * @return {Promise.<void>}
202
+ * @tutorial Application.scheduleRestart
203
+ */
204
+ scheduleRestart(): Promise<void>;
205
+ /**
206
+ * Sends a message to the RVM to upload the application's logs. On success,
207
+ * an object containing logId is returned.
208
+ * @return {Promise.<SendApplicationLogResponse>}
209
+ * @tutorial Application.sendApplicationLog
210
+ */
211
+ sendApplicationLog(): Promise<OpenFin.SendApplicationLogResponse>;
212
+ /**
213
+ * Sets or removes a custom JumpList for the application. Only applicable in Windows OS.
214
+ * If categories is null the previously set custom JumpList (if any) will be replaced by the standard JumpList for the app (managed by Windows).
215
+ * Note: If the "name" property is omitted it defaults to "tasks".
216
+ * @param { Array.<JumpListCategory> | null } jumpListCategories An array of JumpList Categories to populate. If null, remove any existing JumpList configuration and set to Windows default.
217
+ * @return { Promise.<void> }
218
+ * @tutorial Application.setJumpList
219
+ */
220
+ setJumpList(jumpListCategories: OpenFin.JumpListCategory[] | null): Promise<void>;
221
+ /**
222
+ * Adds a customizable icon in the system tray. To listen for a click on the icon use the `tray-icon-clicked` event.
223
+ * @param { string } icon Image URL or base64 encoded string to be used as the icon
224
+ * @return {Promise.<void>}
225
+ * @tutorial Application.setTrayIcon
226
+ */
227
+ setTrayIcon(icon: string): Promise<void>;
228
+ /**
229
+ * Sets new application's shortcut configuration. Windows only.
230
+ * @param { ShortCutConfig } config New application's shortcut configuration.
231
+ * @param { boolean } [config.desktop] - Enable/disable desktop shortcut.
232
+ * @param { boolean } [config.startMenu] - Enable/disable start menu shortcut.
233
+ * @param { boolean } [config.systemStartup] - Enable/disable system startup shortcut.
234
+ * @return {Promise.<void>}
235
+ * @tutorial Application.setShortcuts
236
+ */
237
+ setShortcuts(config: OpenFin.ShortCutConfig): Promise<void>;
238
+ /**
239
+ * Sets the query string in all shortcuts for this app. Requires RVM 5.5+.
240
+ * @param { string } queryString The new query string for this app's shortcuts.
241
+ * @return {Promise.<void>}
242
+ * @tutorial Application.setShortcutQueryParams
243
+ */
244
+ setShortcutQueryParams(queryString: string): Promise<void>;
245
+ /**
246
+ * Sets the zoom level of the application. The original size is 0 and each increment above or below represents zooming 20%
247
+ * larger or smaller to default limits of 300% and 50% of original size, respectively.
248
+ * @param { number } level The zoom level
249
+ * @return {Promise.<void>}
250
+ * @tutorial Application.setZoomLevel
251
+ */
252
+ setZoomLevel(level: number): Promise<void>;
253
+ /**
254
+ * Sets a username to correlate with App Log Management.
255
+ * @param { string } username Username to correlate with App's Log.
256
+ * @return {Promise.<void>}
257
+ * @tutorial Application.setAppLogUsername
258
+ */
259
+ setAppLogUsername(username: string): Promise<void>;
260
+ /**
261
+ * @summary Retrieves information about the system tray. If the system tray is not set, it will throw an error message.
262
+ * @desc The only information currently returned is the position and dimensions.
263
+ * @return {Promise.<TrayInfo>}
264
+ * @tutorial Application.getTrayIconInfo
265
+ */
266
+ getTrayIconInfo(): Promise<OpenFin.TrayInfo>;
267
+ /**
268
+ * Closes the application by terminating its process.
269
+ * @return {Promise.<void>}
270
+ * @tutorial Application.terminate
271
+ */
272
+ terminate(): Promise<void>;
273
+ /**
274
+ * Waits for a hanging application. This method can be called in response to an application
275
+ * "not-responding" to allow the application to continue and to generate another "not-responding"
276
+ * message after a certain period of time.
277
+ * @return {Promise.<void>}
278
+ * @ignore
279
+ */
280
+ wait(): Promise<void>;
281
+ /**
282
+ * Retrieves information about the application.
283
+ * @return {Promise.<ApplicationInfo>}
284
+ * @tutorial Application.getInfo
285
+ */
286
+ getInfo(): Promise<OpenFin.ApplicationInfo>;
287
+ /**
288
+ * Retrieves all process information for entities (windows and views) associated with an application.
289
+ * @return {Promise.<AppProcessInfo>}
290
+ * @tutorial Application.getProcessInfo
291
+ * @experimental
292
+ */
293
+ getProcessInfo(): Promise<OpenFin.AppProcessInfo>;
294
+ /**
295
+ * Sets file auto download location.
296
+ * @param { string } downloadLocation file auto download location
297
+ * @return {Promise.<void>}
298
+ * @tutorial Application.setFileDownloadLocation
299
+ */
300
+ setFileDownloadLocation(downloadLocation: string): Promise<void>;
301
+ }