@openfin/core 25.68.26

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 (227) hide show
  1. package/LICENSE +13 -0
  2. package/NOTICE +16 -0
  3. package/OpenFin.d.ts +1340 -0
  4. package/README.md +41 -0
  5. package/docs.README(OLD).md +82 -0
  6. package/fin.d.ts +4 -0
  7. package/package.json +33 -0
  8. package/resources/win/OpenFinRVM.exe +0 -0
  9. package/src/api/application/Factory.d.ts +145 -0
  10. package/src/api/application/Factory.js +229 -0
  11. package/src/api/application/Instance.d.ts +302 -0
  12. package/src/api/application/Instance.js +412 -0
  13. package/src/api/application/index.d.ts +3 -0
  14. package/src/api/application/index.js +15 -0
  15. package/src/api/base.d.ts +43 -0
  16. package/src/api/base.js +177 -0
  17. package/src/api/clipboard/index.d.ts +69 -0
  18. package/src/api/clipboard/index.js +88 -0
  19. package/src/api/events/application.d.ts +69 -0
  20. package/src/api/events/application.js +2 -0
  21. package/src/api/events/base.d.ts +17 -0
  22. package/src/api/events/base.js +2 -0
  23. package/src/api/events/channel.d.ts +10 -0
  24. package/src/api/events/channel.js +2 -0
  25. package/src/api/events/emitterMap.d.ts +11 -0
  26. package/src/api/events/emitterMap.js +35 -0
  27. package/src/api/events/eventAggregator.d.ts +5 -0
  28. package/src/api/events/eventAggregator.js +43 -0
  29. package/src/api/events/externalApplication.d.ts +5 -0
  30. package/src/api/events/externalApplication.js +2 -0
  31. package/src/api/events/frame.d.ts +9 -0
  32. package/src/api/events/frame.js +2 -0
  33. package/src/api/events/globalHotkey.d.ts +10 -0
  34. package/src/api/events/globalHotkey.js +2 -0
  35. package/src/api/events/platform.d.ts +18 -0
  36. package/src/api/events/platform.js +2 -0
  37. package/src/api/events/system.d.ts +22 -0
  38. package/src/api/events/system.js +2 -0
  39. package/src/api/events/view.d.ts +56 -0
  40. package/src/api/events/view.js +2 -0
  41. package/src/api/events/webcontents.d.ts +48 -0
  42. package/src/api/events/webcontents.js +2 -0
  43. package/src/api/events/window.d.ts +169 -0
  44. package/src/api/events/window.js +2 -0
  45. package/src/api/external-application/Factory.d.ts +26 -0
  46. package/src/api/external-application/Factory.js +40 -0
  47. package/src/api/external-application/Instance.d.ts +102 -0
  48. package/src/api/external-application/Instance.js +109 -0
  49. package/src/api/external-application/index.d.ts +3 -0
  50. package/src/api/external-application/index.js +15 -0
  51. package/src/api/fin.d.ts +49 -0
  52. package/src/api/fin.js +43 -0
  53. package/src/api/frame/Factory.d.ts +36 -0
  54. package/src/api/frame/Factory.js +69 -0
  55. package/src/api/frame/Instance.d.ts +121 -0
  56. package/src/api/frame/Instance.js +130 -0
  57. package/src/api/frame/index.d.ts +3 -0
  58. package/src/api/frame/index.js +15 -0
  59. package/src/api/global-hotkey/index.d.ts +38 -0
  60. package/src/api/global-hotkey/index.js +58 -0
  61. package/src/api/interappbus/channel/channel.d.ts +26 -0
  62. package/src/api/interappbus/channel/channel.js +77 -0
  63. package/src/api/interappbus/channel/channels-docs.d.ts +318 -0
  64. package/src/api/interappbus/channel/channels-docs.js +376 -0
  65. package/src/api/interappbus/channel/client.d.ts +22 -0
  66. package/src/api/interappbus/channel/client.js +84 -0
  67. package/src/api/interappbus/channel/connection-manager.d.ts +28 -0
  68. package/src/api/interappbus/channel/connection-manager.js +244 -0
  69. package/src/api/interappbus/channel/index.d.ts +22 -0
  70. package/src/api/interappbus/channel/index.js +121 -0
  71. package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +13 -0
  72. package/src/api/interappbus/channel/protocols/classic/message-receiver.js +73 -0
  73. package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +22 -0
  74. package/src/api/interappbus/channel/protocols/classic/strategy.js +84 -0
  75. package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +20 -0
  76. package/src/api/interappbus/channel/protocols/combined/strategy.js +58 -0
  77. package/src/api/interappbus/channel/protocols/index.d.ts +44 -0
  78. package/src/api/interappbus/channel/protocols/index.js +2 -0
  79. package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +10 -0
  80. package/src/api/interappbus/channel/protocols/protocol-manager.js +43 -0
  81. package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +23 -0
  82. package/src/api/interappbus/channel/protocols/rtc/endpoint.js +135 -0
  83. package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +30 -0
  84. package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +131 -0
  85. package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +22 -0
  86. package/src/api/interappbus/channel/protocols/rtc/strategy.js +87 -0
  87. package/src/api/interappbus/channel/protocols/strategy-types.d.ts +13 -0
  88. package/src/api/interappbus/channel/protocols/strategy-types.js +2 -0
  89. package/src/api/interappbus/channel/protocols/strategy.d.ts +15 -0
  90. package/src/api/interappbus/channel/protocols/strategy.js +2 -0
  91. package/src/api/interappbus/channel/provider.d.ts +31 -0
  92. package/src/api/interappbus/channel/provider.js +165 -0
  93. package/src/api/interappbus/index.d.ts +85 -0
  94. package/src/api/interappbus/index.js +175 -0
  95. package/src/api/interop/Factory.d.ts +37 -0
  96. package/src/api/interop/Factory.js +54 -0
  97. package/src/api/interop/InteropBroker.d.ts +363 -0
  98. package/src/api/interop/InteropBroker.js +914 -0
  99. package/src/api/interop/InteropClient.d.ts +268 -0
  100. package/src/api/interop/InteropClient.js +450 -0
  101. package/src/api/interop/SessionContextGroupBroker.d.ts +26 -0
  102. package/src/api/interop/SessionContextGroupBroker.js +107 -0
  103. package/src/api/interop/SessionContextGroupClient.d.ts +20 -0
  104. package/src/api/interop/SessionContextGroupClient.js +85 -0
  105. package/src/api/interop/fdc3/fdc3-1.2.d.ts +187 -0
  106. package/src/api/interop/fdc3/fdc3-1.2.js +385 -0
  107. package/src/api/interop/fdc3/fdc3.js +17 -0
  108. package/src/api/interop/fdc3/utils.d.ts +6 -0
  109. package/src/api/interop/fdc3/utils.js +17 -0
  110. package/src/api/interop/index.d.ts +4 -0
  111. package/src/api/interop/index.js +16 -0
  112. package/src/api/interop/utils.d.ts +11 -0
  113. package/src/api/interop/utils.js +36 -0
  114. package/src/api/me.d.ts +35 -0
  115. package/src/api/me.js +60 -0
  116. package/src/api/platform/Factory.d.ts +109 -0
  117. package/src/api/platform/Factory.js +188 -0
  118. package/src/api/platform/Instance.d.ts +122 -0
  119. package/src/api/platform/Instance.js +299 -0
  120. package/src/api/platform/common-utils.d.ts +6 -0
  121. package/src/api/platform/common-utils.js +16 -0
  122. package/src/api/platform/index.d.ts +3 -0
  123. package/src/api/platform/index.js +15 -0
  124. package/src/api/platform/layout/Factory.d.ts +108 -0
  125. package/src/api/platform/layout/Factory.js +189 -0
  126. package/src/api/platform/layout/Instance.d.ts +48 -0
  127. package/src/api/platform/layout/Instance.js +99 -0
  128. package/src/api/platform/layout/index.d.ts +3 -0
  129. package/src/api/platform/layout/index.js +15 -0
  130. package/src/api/platform/layout/shapes.d.ts +11 -0
  131. package/src/api/platform/layout/shapes.js +2 -0
  132. package/src/api/snapshot-source/Factory.d.ts +36 -0
  133. package/src/api/snapshot-source/Factory.js +65 -0
  134. package/src/api/snapshot-source/Instance.d.ts +30 -0
  135. package/src/api/snapshot-source/Instance.js +134 -0
  136. package/src/api/snapshot-source/index.d.ts +3 -0
  137. package/src/api/snapshot-source/index.js +15 -0
  138. package/src/api/snapshot-source/utils.d.ts +1 -0
  139. package/src/api/snapshot-source/utils.js +5 -0
  140. package/src/api/system/application.d.ts +6 -0
  141. package/src/api/system/application.js +2 -0
  142. package/src/api/system/entity.d.ts +11 -0
  143. package/src/api/system/entity.js +2 -0
  144. package/src/api/system/index.d.ts +957 -0
  145. package/src/api/system/index.js +1241 -0
  146. package/src/api/system/installedApps.d.ts +6 -0
  147. package/src/api/system/installedApps.js +2 -0
  148. package/src/api/system/log.d.ts +11 -0
  149. package/src/api/system/log.js +2 -0
  150. package/src/api/system/process.d.ts +15 -0
  151. package/src/api/system/process.js +2 -0
  152. package/src/api/system/proxy.d.ts +15 -0
  153. package/src/api/system/proxy.js +2 -0
  154. package/src/api/system/queryPermissionTypes.d.ts +1 -0
  155. package/src/api/system/queryPermissionTypes.js +2 -0
  156. package/src/api/system/registry-info.d.ts +7 -0
  157. package/src/api/system/registry-info.js +2 -0
  158. package/src/api/system/window.d.ts +16 -0
  159. package/src/api/system/window.js +2 -0
  160. package/src/api/view/Factory.d.ts +49 -0
  161. package/src/api/view/Factory.js +103 -0
  162. package/src/api/view/Instance.d.ts +379 -0
  163. package/src/api/view/Instance.js +415 -0
  164. package/src/api/view/index.d.ts +3 -0
  165. package/src/api/view/index.js +15 -0
  166. package/src/api/webcontents/main.d.ts +36 -0
  167. package/src/api/webcontents/main.js +82 -0
  168. package/src/api/window/Factory.d.ts +44 -0
  169. package/src/api/window/Factory.js +91 -0
  170. package/src/api/window/Instance.d.ts +966 -0
  171. package/src/api/window/Instance.js +1202 -0
  172. package/src/api/window/bounds-changed.d.ts +10 -0
  173. package/src/api/window/bounds-changed.js +6 -0
  174. package/src/api/window/index.d.ts +5 -0
  175. package/src/api/window/index.js +17 -0
  176. package/src/api/window/shapes.d.ts +13 -0
  177. package/src/api/window/shapes.js +2 -0
  178. package/src/environment/environment.d.ts +28 -0
  179. package/src/environment/environment.js +4 -0
  180. package/src/environment/node-env.d.ts +25 -0
  181. package/src/environment/node-env.js +64 -0
  182. package/src/environment/openfin-env.d.ts +29 -0
  183. package/src/environment/openfin-env.js +105 -0
  184. package/src/mock.d.ts +4 -0
  185. package/src/mock.js +91 -0
  186. package/src/shapes/ERROR_BOX_TYPES.d.ts +6 -0
  187. package/src/shapes/ERROR_BOX_TYPES.js +10 -0
  188. package/src/shapes/EntityType.d.ts +1 -0
  189. package/src/shapes/EntityType.js +2 -0
  190. package/src/shapes/LayoutPresetType.d.ts +1 -0
  191. package/src/shapes/LayoutPresetType.js +2 -0
  192. package/src/shapes/Platform.d.ts +112 -0
  193. package/src/shapes/Platform.js +16 -0
  194. package/src/shapes/WebOptions.d.ts +12 -0
  195. package/src/shapes/WebOptions.js +2 -0
  196. package/src/shapes/WindowOptions.d.ts +42 -0
  197. package/src/shapes/WindowOptions.js +2 -0
  198. package/src/shapes/protocol.d.ts +178 -0
  199. package/src/shapes/protocol.js +2 -0
  200. package/src/transport/fin_store.d.ts +4 -0
  201. package/src/transport/fin_store.js +16 -0
  202. package/src/transport/transport-errors.d.ts +17 -0
  203. package/src/transport/transport-errors.js +39 -0
  204. package/src/transport/transport.d.ts +57 -0
  205. package/src/transport/transport.js +195 -0
  206. package/src/transport/wire.d.ts +76 -0
  207. package/src/transport/wire.js +39 -0
  208. package/src/util/asyncFilter.d.ts +1 -0
  209. package/src/util/asyncFilter.js +7 -0
  210. package/src/util/errors.d.ts +9 -0
  211. package/src/util/errors.js +14 -0
  212. package/src/util/exhaustive.d.ts +1 -0
  213. package/src/util/exhaustive.js +7 -0
  214. package/src/util/http.d.ts +11 -0
  215. package/src/util/http.js +83 -0
  216. package/src/util/normalize-config.d.ts +3 -0
  217. package/src/util/normalize-config.js +47 -0
  218. package/src/util/promises.d.ts +5 -0
  219. package/src/util/promises.js +27 -0
  220. package/src/util/ref-counter.d.ts +7 -0
  221. package/src/util/ref-counter.js +51 -0
  222. package/src/util/runtimeVersioning.d.ts +3 -0
  223. package/src/util/runtimeVersioning.js +25 -0
  224. package/src/util/utilTypes.d.ts +8 -0
  225. package/src/util/utilTypes.js +2 -0
  226. package/src/util/validate.d.ts +3 -0
  227. package/src/util/validate.js +11 -0
package/OpenFin.d.ts ADDED
@@ -0,0 +1,1340 @@
1
+ declare namespace OpenFin {
2
+ // "wrappable entities"
3
+ export type Application = import('./src/api/application/index').Application;
4
+ export type ExternalApplication = import('./src/api/external-application/index').ExternalApplication;
5
+ export type Frame = import('./src/api/frame/index')._Frame;
6
+ export type ChannelClient = import('./src/api/interappbus/channel/client').default;
7
+ export type ChannelProvider = import('./src/api/interappbus/channel/provider').ChannelProvider;
8
+ export type Platform = import('./src/api/platform/index').Platform;
9
+ export type Layout = import('./src/api/platform/layout/index').Layout;
10
+ export type View = import('./src/api/view/index').View;
11
+ export type Window = import('./src/api/window/index')._Window;
12
+ export type WebContent = View | Window;
13
+ export type InteropClient = import('./src/api/interop/index').InteropClient;
14
+ export type InteropBroker = import('./src/api/interop/index').InteropBroker;
15
+ export type SnapshotSource = import('./src/api/snapshot-source/index').SnapshotSource;
16
+
17
+ export interface ApplicationIdentity {
18
+ // used for applications
19
+ uuid: string;
20
+ }
21
+
22
+ export interface Identity {
23
+ // used for views/windows/frames
24
+ uuid: string;
25
+ name: string;
26
+ }
27
+
28
+ export interface ClientIdentity {
29
+ uuid: string;
30
+ name: string;
31
+ endpointId: string;
32
+ isLocalEndpointId: boolean; // If true, this connection is from a legacy client.
33
+ }
34
+
35
+ export interface ClientIdentityMultiRuntime extends ClientIdentity {
36
+ runtimeUuid: string;
37
+ }
38
+
39
+ export interface EntityInfo {
40
+ uuid: string;
41
+ name: string;
42
+ entityType: EntityType;
43
+ }
44
+ export type EntityType = import('./src/shapes/EntityType').EntityType;
45
+
46
+ export interface Bounds {
47
+ top: number;
48
+ left: number;
49
+ height: number;
50
+ width: number;
51
+ }
52
+
53
+ /**
54
+ * Returned from getBounds call. bottom and right are never used for setting.
55
+ */
56
+ export interface WindowBounds extends Bounds {
57
+ bottom: number;
58
+ right: number;
59
+ }
60
+
61
+ export interface Rectangle {
62
+ x: number;
63
+ y: number;
64
+ width: number;
65
+ height: number;
66
+ }
67
+
68
+ export interface ApplicationCreationOptions extends Partial<ApplicationOption> {
69
+ name: string;
70
+ uuid: string;
71
+ }
72
+
73
+ export interface ApplicationOption extends LegacyWinOptionsInAppOptions {
74
+ disableIabSecureLogging: boolean;
75
+ loadErrorMessage: string;
76
+ mainWindowOptions: WindowCreationOptions;
77
+ name: string;
78
+ nonPersistent: boolean;
79
+ plugins: boolean;
80
+ spellCheck: boolean;
81
+ url: string;
82
+ uuid: string;
83
+ webSecurity: boolean;
84
+ commands: ShortcutOverride[];
85
+ isPlatformController: boolean;
86
+ maxViewPoolSize: number;
87
+ defaultWindowOptions: Partial<DefaultWindowOptions>;
88
+ defaultViewOptions: Partial<DefaultViewOptions>;
89
+ snapshot: Snapshot;
90
+ preventQuitOnLastWindowClosed: boolean;
91
+ interopBrokerConfiguration: InteropBrokerOptions;
92
+ apiDiagnostics: boolean;
93
+ defaultDomainSettings: DefaultDomainSettings;
94
+ enableJumpList: boolean;
95
+ }
96
+
97
+ interface InteropBrokerOptions {
98
+ contextGroups?: ContextGroupInfo;
99
+ }
100
+
101
+ export interface ContextGroupInfo {
102
+ id: string;
103
+ displayMetadata?: DisplayMetadata;
104
+ }
105
+
106
+ export interface DisplayMetadata {
107
+ /**
108
+ * A user-readable name for this context group, e.g: `"Red"`
109
+ */
110
+ readonly name?: string;
111
+ /**
112
+ * The color that should be associated within this context group when displaying this context group in a UI, e.g: `0xFF0000`.
113
+ */
114
+ readonly color?: string;
115
+ /**
116
+ * A URL of an image that can be used to display this context group
117
+ */
118
+ readonly glyph?: string;
119
+ }
120
+
121
+ export type LegacyWinOptionsInAppOptions = Pick<
122
+ WindowCreationOptions,
123
+ | 'accelerator'
124
+ | 'alwaysOnTop'
125
+ | 'api'
126
+ | 'aspectRatio'
127
+ | 'autoShow'
128
+ | 'backgroundColor'
129
+ | 'contentNavigation'
130
+ | 'contextMenu'
131
+ | 'cornerRounding'
132
+ | 'customData'
133
+ | 'customRequestHeaders'
134
+ | 'defaultCentered'
135
+ | 'defaultHeight'
136
+ | 'defaultLeft'
137
+ | 'defaultTop'
138
+ | 'defaultWidth'
139
+ | 'frame'
140
+ | 'hideOnClose'
141
+ | 'icon'
142
+ | 'maxHeight'
143
+ | 'maximizable'
144
+ | 'maxWidth'
145
+ | 'minHeight'
146
+ | 'minimizable'
147
+ | 'minWidth'
148
+ | 'opacity'
149
+ | 'preloadScripts'
150
+ | 'resizable'
151
+ | 'resizeRegion'
152
+ | 'saveWindowState'
153
+ | 'shadow'
154
+ | 'showTaskbarIcon'
155
+ | 'smallWindow'
156
+ | 'state'
157
+ | 'taskbarIconGroup'
158
+ | 'waitForPageLoad'
159
+ >;
160
+
161
+ export interface Snapshot {
162
+ windows: WindowCreationOptions[];
163
+ snapshotDetails?: {
164
+ monitorInfo: MonitorInfo;
165
+ runtimeVersion: string;
166
+ timestamp: string;
167
+ };
168
+ interopSnapshotDetails?: {
169
+ contextGroupStates: ContextGroupStates;
170
+ };
171
+ }
172
+
173
+ export interface ContextGroupStates {
174
+ [key: string]: {
175
+ [key: string]: Context;
176
+ };
177
+ }
178
+
179
+ export interface Context {
180
+ id?: {
181
+ [key: string]: string;
182
+ };
183
+ name?: string;
184
+ type: string;
185
+ }
186
+
187
+ export interface MonitorInfo {
188
+ deviceScaleFactor: number;
189
+ dpi: Point;
190
+ nonPrimaryMonitors: MonitorDetails[];
191
+ primaryMonitor: MonitorDetails;
192
+ reason: string;
193
+ taskbar: TaskBar;
194
+ virtualScreen: DipRect;
195
+ }
196
+
197
+ export interface Point {
198
+ x: number;
199
+ y: number;
200
+ }
201
+
202
+ export interface PointTopLeft {
203
+ top: number;
204
+ left: number;
205
+ }
206
+
207
+ export interface RectangleByEdgePositions {
208
+ top: number;
209
+ left: number;
210
+ bottom: number;
211
+ right: number;
212
+ }
213
+
214
+ export interface MonitorDetails {
215
+ available: DipScaleRects;
216
+ availableRect: RectangleByEdgePositions;
217
+ deviceId: string | number; // Number on mac
218
+ displayDeviceActive: boolean;
219
+ deviceScaleFactor: number;
220
+ monitorRect: RectangleByEdgePositions;
221
+ name: string | number; // Number on mac
222
+ dpi: Point;
223
+ monitor: DipScaleRects;
224
+ }
225
+
226
+ export interface DipRect extends RectangleByEdgePositions {
227
+ dipRect: RectangleByEdgePositions;
228
+ scaledRect: RectangleByEdgePositions;
229
+ }
230
+
231
+ export interface DipScaleRects {
232
+ dipRect: RectangleByEdgePositions;
233
+ scaledRect: RectangleByEdgePositions;
234
+ }
235
+
236
+ export interface TaskBar extends DipScaleRects {
237
+ edge: string;
238
+ rect: RectangleByEdgePositions;
239
+ }
240
+
241
+ export interface WindowCreationOptions extends Partial<WindowOptions> {
242
+ name: string;
243
+ }
244
+
245
+ export interface DefaultWindowOptions extends WindowOptions {
246
+ permissions: Partial<Permissions>;
247
+ }
248
+
249
+ export interface WindowOptions extends WindowUpdatableOptions {
250
+ accelerator: Partial<Accelerator>;
251
+ api: Api;
252
+ applicationIcon: string;
253
+ autoShow: boolean;
254
+ backgroundColor: string;
255
+ contentCreation: ContentCreationOptions;
256
+ contentNavigation: ContentNavigation;
257
+ contentRedirect: Partial<ContentRedirect>;
258
+ customRequestHeaders: CustomRequestHeaders[];
259
+ closeOnLastViewRemoved: boolean;
260
+ defaultCentered: boolean;
261
+ defaultHeight: number;
262
+ defaultLeft: number;
263
+ defaultTop: number;
264
+ defaultWidth: number;
265
+ height: number;
266
+ hideOnClose: boolean;
267
+ includeInSnapshots: boolean;
268
+ layout: any;
269
+ modalParentIdentity: Identity;
270
+ name: string;
271
+ preloadScripts: PreloadScript[];
272
+ processAffinity: string;
273
+ saveWindowState: boolean;
274
+ shadow: boolean;
275
+ smallWindow: boolean;
276
+ state: 'maximized' | 'minimized' | 'normal';
277
+ taskbarIcon: string;
278
+ taskbarIconGroup: string;
279
+ url: string;
280
+ uuid: string;
281
+ waitForPageLoad: boolean;
282
+ width: number;
283
+ x: number;
284
+ y: number;
285
+ experimental?: any;
286
+ fdc3InteropApi?: string;
287
+ }
288
+
289
+ export interface WindowUpdatableOptions {
290
+ alphaMask: RGB;
291
+ alwaysOnTop: boolean;
292
+ aspectRatio: number;
293
+ contextMenu: boolean;
294
+ contextMenuSettings: ContextMenuSettings;
295
+ cornerRounding: Partial<CornerRounding>;
296
+ customContext: any;
297
+ customData: any;
298
+ frame: boolean;
299
+ hotkeys: Hotkey[];
300
+ icon: string;
301
+ maxHeight: number;
302
+ maximizable: boolean;
303
+ maxWidth: number;
304
+ minHeight: number;
305
+ minimizable: boolean;
306
+ minWidth: number;
307
+ opacity: number;
308
+ resizable: boolean;
309
+ resizeRegion: ResizeRegion;
310
+ showBackgroundImages: boolean;
311
+ showTaskbarIcon: boolean;
312
+ interop: InteropConfig;
313
+ workspacePlatform: WorkspacePlatformOptions;
314
+ }
315
+
316
+ export interface WorkspacePlatformOptions {
317
+ pages: Page[];
318
+ /** Leaving this as any for now until we figure out what the shape should look like in Workspace */
319
+ [key: string]: any;
320
+ }
321
+
322
+ type LayoutSettingsExtended = LayoutOptions['settings'] & {
323
+ reorderEnabled?: boolean;
324
+ };
325
+
326
+ type LayoutComponentStateExtended = LayoutComponent['componentState'] & { name: string; uuid: string };
327
+
328
+ type LayoutComponentExtended = Omit<OpenFin.LayoutComponent, 'componentState'> & {
329
+ componentState: LayoutComponentStateExtended;
330
+ };
331
+
332
+ type LayoutStack = { type: 'stack'; content: LayoutContent };
333
+
334
+ type LayoutContentItemExtended = OpenFin.LayoutRow | OpenFin.LayoutColumn | LayoutComponentExtended | LayoutStack;
335
+
336
+ type LayoutContentExtended = LayoutContentItemExtended[];
337
+
338
+ type LayoutExtended = {
339
+ settings: LayoutSettingsExtended;
340
+ content: LayoutContentExtended;
341
+ };
342
+
343
+ interface PageLayoutDetails {
344
+ /** The id of the machine that created the page. */
345
+ machineId: string;
346
+
347
+ /** The name of the machine that created the page. */
348
+ machineName?: string;
349
+ }
350
+
351
+ type PageLayout = LayoutExtended & { layoutDetails: PageLayoutDetails };
352
+
353
+ interface Page {
354
+ /** A UI friendly title for the page. */
355
+ title: string;
356
+
357
+ /** The unique ID of the page. */
358
+ pageId: string;
359
+
360
+ /** An optional UI friendly description of the page. */
361
+ description?: string;
362
+
363
+ /** A optional UI friendly tooltip for the page. */
364
+ tooltip?: string;
365
+
366
+ /** True if the page is read only. In this state, the page is locked and cannot be unlocked. */
367
+ isReadOnly?: boolean;
368
+
369
+ /** The layout of the page. */
370
+ layout: PageLayout;
371
+ }
372
+
373
+ export interface WebRequestHeader {
374
+ [key: string]: string;
375
+ }
376
+
377
+ export interface CustomRequestHeaders {
378
+ urlPatterns: string[];
379
+ headers: WebRequestHeader[]; // key=value is added to headers
380
+ }
381
+
382
+ export type WindowOptionDiff = {
383
+ [key in keyof WindowOptions]: {
384
+ oldVal: WindowOptions[key];
385
+ newVal: WindowOptions[key];
386
+ };
387
+ };
388
+
389
+ export interface ResizeRegion {
390
+ size?: number;
391
+ bottomRightCorner?: number;
392
+ sides?: {
393
+ top?: boolean;
394
+ bottom?: boolean;
395
+ left?: boolean;
396
+ right?: boolean;
397
+ };
398
+ }
399
+
400
+ export interface Accelerator {
401
+ devtools: boolean;
402
+ reload: boolean;
403
+ reloadIgnoringCache: boolean;
404
+ zoom: boolean;
405
+ }
406
+
407
+ export interface Api {
408
+ iframe?: {
409
+ crossOriginInjection?: boolean;
410
+ sameOriginInjection?: boolean;
411
+ enableDeprecatedSharedName?: boolean;
412
+ };
413
+ }
414
+
415
+ export interface ContentNavigation {
416
+ whitelist?: string[];
417
+ blacklist?: string[];
418
+ }
419
+
420
+ export interface ContentRedirect {
421
+ whitelist: string[];
422
+ blacklist: string[];
423
+ }
424
+
425
+ export interface CornerRounding {
426
+ height: number;
427
+ width: number;
428
+ }
429
+
430
+ export interface DownloadPreloadOption {
431
+ url: string;
432
+ }
433
+
434
+ export interface DownloadPreloadInfo {
435
+ success: boolean;
436
+ url?: string;
437
+ error: string;
438
+ }
439
+
440
+ export interface RGB {
441
+ red: number;
442
+ blue: number;
443
+ green: number;
444
+ }
445
+
446
+ export interface ContextMenuSettings {
447
+ enable: boolean;
448
+ devtools?: boolean;
449
+ reload?: boolean;
450
+ }
451
+
452
+ export interface Hotkey {
453
+ keys: string;
454
+ preventDefault?: boolean;
455
+ }
456
+
457
+ export interface ShortcutOverride extends Hotkey {
458
+ command: string;
459
+ }
460
+
461
+ export interface PreloadScript {
462
+ mandatory?: boolean;
463
+ state?: 'load-started' | 'load-failed' | 'load-succeeded' | 'failed' | 'succeeded';
464
+ url: string;
465
+ }
466
+
467
+ export interface AutoResizeOptions {
468
+ /**
469
+ * If true, the view's width will grow and shrink together with the window. false
470
+ * by default.
471
+ */
472
+ width?: boolean;
473
+ /**
474
+ * If true, the view's height will grow and shrink together with the window. false
475
+ * by default.
476
+ */
477
+ height?: boolean;
478
+ /**
479
+ * If true, the view's x position and width will grow and shrink proportionally with
480
+ * the window. false by default.
481
+ */
482
+ horizontal?: boolean;
483
+ /**
484
+ * If true, the view's y position and height will grow and shrink proportionally with
485
+ * the window. false by default.
486
+ */
487
+ vertical?: boolean;
488
+ }
489
+
490
+ export interface InteropConfig {
491
+ currentContextGroup?: string | null;
492
+ providerId?: string;
493
+ }
494
+
495
+ export interface ViewInfo {
496
+ canNavigateBack: boolean;
497
+ canNavigateForward: boolean;
498
+ processAffinity: string;
499
+ title: string;
500
+ url: string;
501
+ favicons: string[];
502
+ }
503
+ export interface ViewCreationOptions extends Partial<ViewOptions> {
504
+ name: string;
505
+ url: string;
506
+ target: Identity;
507
+ }
508
+
509
+ export interface UpdatableViewOptions {
510
+ autoResize: AutoResizeOptions;
511
+ contextMenuSettings: ContextMenuSettings;
512
+ backgroundColor: string;
513
+ customData: any;
514
+ customContext: any;
515
+ api: Api;
516
+ contentNavigation: ContentNavigation;
517
+ detachOnClose: boolean;
518
+ isClosable: boolean;
519
+ preventDragOut: boolean;
520
+ // Doesn't get defaulted
521
+ interop?: InteropConfig;
522
+ }
523
+
524
+ export interface DefaultViewOptions extends ViewOptions {
525
+ permissions: Partial<Permissions>;
526
+ }
527
+
528
+ export interface ViewOptions extends UpdatableViewOptions {
529
+ name: string;
530
+ url: string;
531
+ target: Identity;
532
+ contentCreation: ContentCreationOptions;
533
+ customRequestHeaders: CustomRequestHeaders[];
534
+ bounds: Bounds;
535
+ processAffinity: string;
536
+ hotkeys: Hotkey[];
537
+ preloadScripts: PreloadScript[];
538
+ manifestUrl: string;
539
+ zoomLevel: number;
540
+ experimental: any;
541
+ fdc3InteropApi?: string;
542
+ }
543
+
544
+ export interface Certificate {
545
+ data: string;
546
+ fingerprint: string;
547
+ issuer: CertificatePrincipal;
548
+ issuerCert: Certificate;
549
+ issuerName: string;
550
+ serialNumber: string;
551
+ subject: CertificatePrincipal;
552
+ subjectName: string;
553
+ validExpiry: number;
554
+ validStart: number;
555
+ }
556
+
557
+ interface CertificatePrincipal {
558
+ commonName: string;
559
+ country: string;
560
+ locality: string;
561
+ organizations: string[];
562
+ organizationUnits: string[];
563
+ state: string;
564
+ }
565
+
566
+ export type HostContextChangedReasons = import('./src/shapes/Platform').HostContextChangedReasons;
567
+ export type WindowCreationReason = import('./src/shapes/Platform').WindowCreationReason;
568
+
569
+ export type HostContextChangedPayload = {
570
+ context: any;
571
+ reason: HostContextChangedReasons;
572
+ };
573
+
574
+ export interface ApplySnapshotOptions {
575
+ closeExistingWindows?: boolean;
576
+ closeSnapshotWindows?: boolean;
577
+ skipOutOfBoundsCheck?: boolean;
578
+ }
579
+
580
+ export interface ApplySnapshotPayload {
581
+ snapshot: Snapshot;
582
+ options?: ApplySnapshotOptions;
583
+ }
584
+ export interface CreateViewPayload {
585
+ opts: Partial<ViewOptions>;
586
+ target: Identity;
587
+ targetView?: Identity;
588
+ }
589
+
590
+ export interface ReplaceViewPayload {
591
+ opts: {
592
+ viewToReplace: Identity;
593
+ newView: Partial<ViewOptions>;
594
+ };
595
+ target: Identity;
596
+ }
597
+
598
+ export interface CloseViewPayload {
599
+ view: Identity;
600
+ }
601
+
602
+ export interface FetchManifestPayload {
603
+ manifestUrl: string;
604
+ }
605
+
606
+ export interface ReplaceLayoutOpts {
607
+ layout: LayoutOptions;
608
+ }
609
+ export interface ReplaceLayoutPayload {
610
+ opts: ReplaceLayoutOpts;
611
+ target: Identity;
612
+ }
613
+
614
+ export interface SetWindowContextPayload {
615
+ context: any;
616
+ entityType: EntityType;
617
+ target: Identity;
618
+ }
619
+
620
+ export interface LaunchIntoPlatformPayload {
621
+ manifest: any;
622
+ }
623
+
624
+ export interface GetWindowContextPayload {
625
+ entityType: EntityType;
626
+ target: Identity;
627
+ }
628
+
629
+ export interface ApplicationPermissions {
630
+ setFileDownloadLocation: boolean;
631
+ }
632
+
633
+ export interface SystemPermissions {
634
+ getAllExternalWindows: boolean;
635
+ launchExternalProcess: boolean;
636
+ readRegistryValue:
637
+ | boolean
638
+ | {
639
+ enabled: boolean;
640
+ registryKeys: string[];
641
+ };
642
+ terminateExternalProcess: boolean;
643
+ openUrlWithBrowser: {
644
+ enabled: boolean;
645
+ protocols: string[];
646
+ };
647
+ }
648
+
649
+ export type WebPermission =
650
+ | 'audio'
651
+ | 'video'
652
+ | 'geolocation'
653
+ | 'notifications'
654
+ | 'midiSysex'
655
+ | 'pointerLock'
656
+ | 'fullscreen'
657
+ | 'openExternal'
658
+ | 'clipboard-read'
659
+ | 'clipboard-sanitized-write';
660
+
661
+ export interface Permissions {
662
+ Application?: Partial<ApplicationPermissions>;
663
+ System?: Partial<SystemPermissions>;
664
+ webAPIs?: WebPermission[];
665
+ }
666
+
667
+ export interface PlatformWindowCreationOptions extends Partial<WindowCreationOptions> {
668
+ updateStateIfExists?: boolean;
669
+ reason?: WindowCreationReason;
670
+ }
671
+
672
+ export interface PlatformWindowOptions extends WindowCreationOptions {
673
+ stylesheetUrl: string;
674
+ }
675
+
676
+ export interface PlatformViewCreationOptions extends Partial<ViewOptions> {
677
+ url: string;
678
+ target: Identity;
679
+ }
680
+
681
+ export type ProcessAffinityStrategy = 'same' | 'different';
682
+
683
+ export interface PlatformOptions extends ApplicationCreationOptions {
684
+ defaultWindowOptions?: Partial<PlatformWindowOptions>;
685
+ defaultViewOptions?: Partial<PlatformViewCreationOptions>;
686
+ disableDefaultCommands?: boolean;
687
+ viewProcessAffinityStrategy?: ProcessAffinityStrategy;
688
+ providerUrl?: string;
689
+ permissions?: Partial<Permissions>;
690
+ }
691
+
692
+ export interface Manifest {
693
+ appAssets?: {
694
+ alias: string;
695
+ args?: string;
696
+ src: string;
697
+ target?: string;
698
+ version: string;
699
+ }[];
700
+ assetsUrl?: string;
701
+ devtools_port?: number;
702
+ dialogSettings?: {
703
+ bgColor?: number;
704
+ logo?: string;
705
+ progressBarBgColor?: number;
706
+ progressBarBorderColor?: number;
707
+ progressBarFillColor?: number;
708
+ textColor?: number;
709
+ };
710
+ licenseKey: string;
711
+ offlineAccess?: boolean;
712
+ platform?: PlatformOptions;
713
+ proxy?: {
714
+ proxyAddress: string;
715
+ proxyPort: number;
716
+ type: string;
717
+ };
718
+ runtime: {
719
+ arguments?: string;
720
+ fallbackVersion?: string;
721
+ forceLatest?: boolean;
722
+ futureVersion?: string;
723
+ version: string;
724
+ };
725
+ services?: string[];
726
+ shortcut?: {
727
+ 'company': string;
728
+ 'description'?: string;
729
+ 'force'?: boolean;
730
+ 'icon': string;
731
+ 'name': string;
732
+ 'startMenuRootFolder'?: string;
733
+ 'target'?: ('desktop' | 'start-menu' | 'automatic-start-up')[];
734
+ 'uninstall-shortcut'?: boolean;
735
+ };
736
+ snapshot?: Snapshot;
737
+ splashScreenImage?: string;
738
+ startup_app: WindowOptions;
739
+ supportInformation?: {
740
+ company: string;
741
+ email: string;
742
+ product: string;
743
+ forwardErrorReports?: boolean;
744
+ enableErrorReporting?: boolean;
745
+ };
746
+ }
747
+
748
+ export interface LayoutOptions {
749
+ settings: {
750
+ popoutWholeStack?: boolean;
751
+ constrainDragToContainer?: boolean;
752
+ showPopoutIcon?: boolean;
753
+ showMaximiseIcon?: boolean;
754
+ showCloseIcon?: boolean;
755
+ constrainDragToHeaders?: boolean;
756
+ };
757
+ content: LayoutContent;
758
+ }
759
+
760
+ export type LayoutContent = (LayoutRow | LayoutColumn | LayoutComponent)[];
761
+
762
+ export interface LayoutRow {
763
+ type: 'row';
764
+ content: LayoutContent;
765
+ }
766
+ export interface LayoutColumn {
767
+ type: 'column';
768
+ content: LayoutContent;
769
+ }
770
+ export interface LayoutComponent {
771
+ type: 'component';
772
+ componentName: 'view';
773
+ componentState: {
774
+ identity: Identity;
775
+ url: string;
776
+ title?: string;
777
+ };
778
+ }
779
+
780
+ export type OverrideCallback<T extends any = PlatformProvider, U extends T = T> = (
781
+ arg: Constructor<T>,
782
+ ...args: ConstructorParameters<Constructor<T>>
783
+ ) => U | Promise<U>;
784
+
785
+ export type Constructor<T = {}> = new (...args: any[]) => T;
786
+
787
+ type PlatformProvider = import('./src/shapes/Platform').PlatformProvider;
788
+ export interface InitPlatformOptions {
789
+ overrideCallback?: OverrideCallback<PlatformProvider>;
790
+ interopOverride?: OverrideCallback<InteropBroker>;
791
+ }
792
+
793
+ export interface ProcessDetails {
794
+ cpuUsage: number;
795
+ nonPagedPoolUsage: number;
796
+ pageFaultCount: number;
797
+ pagedPoolUsage: number;
798
+ pagefileUsage: number;
799
+ peakNonPagedPoolUsage: number;
800
+ peakPagedPoolUsage: number;
801
+ peakPagefileUsage: number;
802
+ peakWorkingSetSize: number;
803
+ workingSetSize: number;
804
+ privateSetSize: number;
805
+ pid: number;
806
+ }
807
+
808
+ export interface FrameProcessDetails extends ProcessDetails {
809
+ url: string;
810
+ entityType: string;
811
+ }
812
+
813
+ export interface EntityProcessDetails extends FrameProcessDetails {
814
+ name: string;
815
+ uuid: string;
816
+ iframes: FrameProcessDetails[];
817
+ }
818
+
819
+ export interface AppProcessInfo {
820
+ uuid: string;
821
+ entities: EntityProcessDetails[];
822
+ }
823
+
824
+ export interface NonAppProcessDetails extends ProcessDetails {
825
+ name: string;
826
+ }
827
+
828
+ export interface SystemProcessInfo {
829
+ apps: AppProcessInfo[];
830
+ browserProcess: NonAppProcessDetails;
831
+ nonApps: NonAppProcessDetails[];
832
+ }
833
+
834
+ export interface ClearCacheOption {
835
+ appcache?: boolean;
836
+ cache?: boolean;
837
+ cookies?: boolean;
838
+ localStorage?: boolean;
839
+ }
840
+
841
+ export interface CookieInfo {
842
+ name: string;
843
+ // expirationDate: Date;
844
+ domain: string;
845
+ path: string;
846
+ }
847
+
848
+ export interface CookieOption {
849
+ name: string;
850
+ }
851
+
852
+ export interface CrashReporterOptions {
853
+ diagnosticsMode: boolean;
854
+ }
855
+
856
+ export interface CrashReporterState extends CrashReporterOptions {
857
+ isRunning: boolean;
858
+ diagnosticMode: boolean;
859
+ }
860
+
861
+ export interface Time {
862
+ user: number;
863
+ nice: number;
864
+ sys: number;
865
+ idle: number;
866
+ irq: number;
867
+ }
868
+
869
+ export interface CpuInfo {
870
+ model: string;
871
+ speed: number;
872
+ times: Time;
873
+ }
874
+
875
+ export interface GpuInfo {
876
+ name: string;
877
+ }
878
+
879
+ export interface HostSpecs {
880
+ aeroGlassEnabled?: boolean;
881
+ arch: string;
882
+ cpus: CpuInfo[];
883
+ gpu: GpuInfo;
884
+ memory: number;
885
+ name: string;
886
+ screenSaver?: boolean;
887
+ }
888
+
889
+ export interface PrinterInfo {
890
+ name: string;
891
+ description: string;
892
+ status: number;
893
+ isDefault: boolean;
894
+ }
895
+
896
+ export interface Dpi {
897
+ horizontal?: number;
898
+ vertical?: number;
899
+ }
900
+
901
+ export interface Margins {
902
+ marginType?: 'default' | 'none' | 'printableArea' | 'custom';
903
+ top?: number;
904
+ bottom?: number;
905
+ left?: number;
906
+ right?: number;
907
+ }
908
+
909
+ export interface PrintOptions {
910
+ silent?: boolean;
911
+ printBackground?: boolean;
912
+ deviceName?: string;
913
+ color?: boolean;
914
+ margins?: Margins;
915
+ landscape?: boolean;
916
+ scaleFactor?: number;
917
+ pagesPerSheet?: number;
918
+ collate?: boolean;
919
+ copies?: number;
920
+ pageRanges?: Record<string, number>;
921
+ duplexMode?: 'simplex' | 'shortEdge' | 'longEdge';
922
+ dpi?: Dpi;
923
+ }
924
+ export interface WriteRequestType {
925
+ data: string;
926
+ type?: string;
927
+ }
928
+
929
+ export interface WriteAnyRequestType {
930
+ data: {
931
+ text?: string;
932
+ html?: string;
933
+ rtf?: string;
934
+ };
935
+ type?: string;
936
+ }
937
+
938
+ export interface SubscriptionOptions {
939
+ timestamp?: number;
940
+ }
941
+
942
+ export interface SharedWorkerInfo {
943
+ id: string;
944
+ url: string;
945
+ }
946
+
947
+ export interface ServiceIdentifier {
948
+ name: string;
949
+ }
950
+
951
+ export interface ServiceConfiguration {
952
+ config: object;
953
+ name: string;
954
+ }
955
+
956
+ export interface RVMInfo {
957
+ 'action': string;
958
+ 'appLogDirectory': string;
959
+ 'path': string;
960
+ 'start-time': string;
961
+ 'version': string;
962
+ 'working-dir': string;
963
+ }
964
+
965
+ export interface RvmLaunchOptions {
966
+ noUi?: boolean;
967
+ userAppConfigArgs?: object;
968
+ }
969
+
970
+ export interface ShortCutConfig {
971
+ desktop?: boolean;
972
+ startMenu?: boolean;
973
+ systemStartup?: boolean;
974
+ }
975
+
976
+ export interface TerminateExternalRequestType {
977
+ uuid: string;
978
+ timeout: number;
979
+ killTree: boolean;
980
+ }
981
+
982
+ export interface TrayInfo {
983
+ bounds: OpenFin.Rectangle;
984
+ monitorInfo: OpenFin.MonitorInfo;
985
+ x: number;
986
+ y: number;
987
+ }
988
+
989
+ export interface Transition {
990
+ opacity?: Opacity;
991
+ position?: Position;
992
+ size?: Size;
993
+ }
994
+
995
+ export interface Size extends TransitionBase {
996
+ width: number;
997
+ height: number;
998
+ }
999
+
1000
+ export interface Opacity extends TransitionBase {
1001
+ opacity: number;
1002
+ }
1003
+
1004
+ export interface TransitionBase {
1005
+ duration: number;
1006
+ relative?: boolean;
1007
+ }
1008
+
1009
+ export interface Position extends TransitionBase {
1010
+ left: number;
1011
+ top: number;
1012
+ }
1013
+
1014
+ export type AnchorType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
1015
+
1016
+ export interface TransitionOptions {
1017
+ interrupt: boolean;
1018
+ tween?: tween;
1019
+ }
1020
+
1021
+ type tween =
1022
+ | 'linear'
1023
+ | 'ease-in'
1024
+ | 'ease-out'
1025
+ | 'ease-in-out'
1026
+ | 'ease-in-quad'
1027
+ | 'ease-out-quad'
1028
+ | 'ease-in-out-quad'
1029
+ | 'ease-in-cubic'
1030
+ | 'ease-out-cubic'
1031
+ | 'ease-in-out-cubic'
1032
+ | 'ease-out-bounce'
1033
+ | 'ease-in-back'
1034
+ | 'ease-out-back'
1035
+ | 'ease-in-out-back'
1036
+ | 'ease-in-elastic'
1037
+ | 'ease-out-elastic'
1038
+ | 'ease-in-out-elastic';
1039
+
1040
+ export interface FindInPageOptions {
1041
+ forward?: boolean;
1042
+ findNext?: boolean;
1043
+ matchCase?: boolean;
1044
+ wordStart?: boolean;
1045
+ medialCapitalAsWordStart?: boolean;
1046
+ }
1047
+
1048
+ export interface FrameInfo {
1049
+ name: string;
1050
+ uuid: string;
1051
+ entityType: EntityType;
1052
+ parent: Identity;
1053
+ }
1054
+
1055
+ export interface ExternalApplicationInfo {
1056
+ parent: Identity;
1057
+ }
1058
+
1059
+ export interface ExternalConnection {
1060
+ token: string;
1061
+ uuid: string;
1062
+ }
1063
+
1064
+ export interface ExternalProcessRequestType {
1065
+ path?: string;
1066
+ alias?: string;
1067
+ arguments?: string;
1068
+ listener?: LaunchExternalProcessListener;
1069
+ lifetime?: string;
1070
+ certificate?: CertificationInfo;
1071
+ uuid?: string;
1072
+ initialWindowState?: string;
1073
+ cwd?: string;
1074
+ }
1075
+
1076
+ export interface CertificationInfo {
1077
+ serial?: string;
1078
+ subject?: string;
1079
+ publickey?: string;
1080
+ thumbprint?: string;
1081
+ trusted?: boolean;
1082
+ }
1083
+
1084
+ export interface ExitCode {
1085
+ topic: string;
1086
+ uuid: string;
1087
+ exitCode: number;
1088
+ }
1089
+
1090
+ export interface LaunchExternalProcessListener {
1091
+ (code: ExitCode): void;
1092
+ }
1093
+
1094
+ export interface ExternalProcessInfo {
1095
+ pid: number;
1096
+ listener?: LaunchExternalProcessListener;
1097
+ }
1098
+
1099
+ export interface AppAssetInfo {
1100
+ src: string;
1101
+ alias: string;
1102
+ version: string;
1103
+ target?: string;
1104
+ args?: string;
1105
+ mandatory?: boolean;
1106
+ }
1107
+
1108
+ export interface RuntimeDownloadOptions {
1109
+ version: string;
1110
+ }
1111
+
1112
+ export interface AppAssetRequest {
1113
+ alias: string;
1114
+ }
1115
+
1116
+ export interface RuntimeDownloadProgress {
1117
+ downloadedBytes: number;
1118
+ totalBytes: number;
1119
+ }
1120
+
1121
+ export interface CertifiedAppInfo {
1122
+ isRunning: boolean;
1123
+ isOptedIntoCertfiedApp?: boolean;
1124
+ isCertified?: boolean;
1125
+ isSSLCertified?: boolean;
1126
+ isPresentInAppDirectory?: boolean;
1127
+ }
1128
+ export interface JumpListCategory {
1129
+ name?: string;
1130
+ items: Array<JumpListTask | JumpListSeparator>;
1131
+ }
1132
+
1133
+ export type JumpListItem = JumpListTask | JumpListSeparator;
1134
+
1135
+ export interface JumpListTask {
1136
+ type: 'task';
1137
+ title: string;
1138
+ description: string;
1139
+ deepLink: string;
1140
+ iconPath?: string;
1141
+ iconIndex?: number;
1142
+ }
1143
+
1144
+ export interface JumpListSeparator {
1145
+ type: 'separator';
1146
+ }
1147
+ export interface ApplicationInfo {
1148
+ initialOptions: OpenFin.ApplicationCreationOptions;
1149
+ launchMode: string;
1150
+ manifest: OpenFin.Manifest & { [key: string]: any };
1151
+ manifestUrl: string;
1152
+ parentUuid?: string;
1153
+ runtime: { version: string };
1154
+ }
1155
+
1156
+ export interface LogInfo {
1157
+ logId: string;
1158
+ }
1159
+
1160
+ export interface ManifestInfo {
1161
+ uuid: string;
1162
+ manifestUrl: string;
1163
+ }
1164
+
1165
+ export interface ClickedMenuResult {
1166
+ result: 'clicked';
1167
+ data: any;
1168
+ }
1169
+
1170
+ export interface ClosedMenuResult {
1171
+ result: 'closed';
1172
+ }
1173
+
1174
+ export type MenuResult = ClickedMenuResult | ClosedMenuResult;
1175
+
1176
+ export interface ShowPopupMenuOptions {
1177
+ template: MenuItemTemplate[];
1178
+ x?: number;
1179
+ y?: number;
1180
+ }
1181
+ export interface MenuItemTemplate {
1182
+ /**
1183
+ * Can be `normal`, `separator`, `submenu`, or `checkbox`.
1184
+ * Defaults to 'normal' unless a 'submenu' key exists
1185
+ */
1186
+ type?: 'normal' | 'separator' | 'submenu' | 'checkbox';
1187
+ label?: string;
1188
+ /**
1189
+ * If false, the menu item will be greyed out and unclickable.
1190
+ */
1191
+ enabled?: boolean;
1192
+
1193
+ /**
1194
+ * If false, the menu item will be entirely hidden.
1195
+ */
1196
+ visible?: boolean;
1197
+ /**
1198
+ * Should only be specified for `checkbox` type menu items.
1199
+ */
1200
+ checked?: boolean;
1201
+
1202
+ /**
1203
+ * Should be specified for `submenu` type menu items. If `submenu` is specified,
1204
+ * the `type: 'submenu'` can be omitted.
1205
+ */
1206
+ submenu?: MenuItemTemplate[];
1207
+
1208
+ /**
1209
+ * Data to be returned if the user selects the element. Must be serializable
1210
+ */
1211
+ data: any;
1212
+
1213
+ /**
1214
+ * Image Data URI with image dimensions inferred from the encoded string
1215
+ */
1216
+ icon?: string;
1217
+ }
1218
+
1219
+ export interface NativeWindowIntegrationProviderAuthorization {
1220
+ authorizedUuid: string;
1221
+ }
1222
+
1223
+ export interface RuntimeInfo {
1224
+ architecture: string;
1225
+ manifestUrl: string;
1226
+ port: number;
1227
+ securityRealm?: string;
1228
+ version: string;
1229
+ args: object;
1230
+ chromeVersion: string;
1231
+ electronVersion: string;
1232
+ devtoolsPort?: number;
1233
+ }
1234
+
1235
+ export interface DefaultDomainSettings {
1236
+ rules: DefaultDomainSettingsRule[];
1237
+ }
1238
+
1239
+ export interface DefaultDomainSettingsRule {
1240
+ // match pattern is a domain based string type
1241
+ match: string[];
1242
+ options: {
1243
+ downloadSettings: FileDownloadSettings;
1244
+ };
1245
+ }
1246
+
1247
+ export type FileDownloadBehaviorNames = 'prompt' | 'no-prompt' | 'block';
1248
+
1249
+ export interface FileDownloadSettings {
1250
+ rules: DownloadRule[];
1251
+ }
1252
+
1253
+ export interface DownloadRule {
1254
+ behavior: FileDownloadBehaviorNames;
1255
+ // match pattern is a string type
1256
+ match: string[];
1257
+ }
1258
+ export interface ContextSubscription {
1259
+ handler: ContextHandler;
1260
+ contextType?: string;
1261
+ }
1262
+
1263
+ export type ContextHandler = (context: OpenFin.Context) => void;
1264
+
1265
+ export interface Intent<MetadataType = IntentMetadata> {
1266
+ name: string;
1267
+ context: Context;
1268
+ metadata?: MetadataType;
1269
+ }
1270
+
1271
+ export interface IntentMetadata<TargetType = any> {
1272
+ target?: TargetType;
1273
+ }
1274
+
1275
+ export type IntentHandler = (intent: OpenFin.Intent) => void;
1276
+ type MatchPattern = string;
1277
+
1278
+ export type ContentCreationBehaviorNames = 'window' | 'view' | 'block' | 'browser';
1279
+ export interface ContentCreationRule<T = ContentCreationBehaviorNames> {
1280
+ behavior: T;
1281
+ match: MatchPattern[];
1282
+ options?: T extends 'window' ? Partial<WindowOptions> : T extends 'view' ? Partial<OpenFin.ViewOptions> : never;
1283
+ }
1284
+
1285
+ export interface ContentCreationOptions {
1286
+ rules: ContentCreationRule[];
1287
+ }
1288
+ export interface SnapshotProvider<T> {
1289
+ getSnapshot: () => Promise<T>;
1290
+ applySnapshot: (snapshot: T) => Promise<void>;
1291
+ }
1292
+
1293
+ export type PermissionState = import('./src/api/system/queryPermissionTypes').PermissionState;
1294
+ export interface QueryPermissionResult {
1295
+ permission: string;
1296
+ state: PermissionState;
1297
+ granted: boolean;
1298
+ rawValue?: unknown;
1299
+ }
1300
+
1301
+ export interface SessionContextGroup {
1302
+ id: string;
1303
+ setContext: (context: OpenFin.Context) => Promise<void>;
1304
+ getCurrentContext: (type?: string) => Promise<OpenFin.Context>;
1305
+ addContextHandler: (
1306
+ handler: OpenFin.ContextHandler,
1307
+ contextType?: string
1308
+ ) => Promise<{ unsubscribe: () => void }>;
1309
+ }
1310
+
1311
+ export type MessagingProtocols = import('./src/api/interappbus/channel/protocols/index').MessagingProtocols;
1312
+
1313
+ export interface ChannelCreateOptions {
1314
+ protocols?: MessagingProtocols[];
1315
+ }
1316
+
1317
+ export interface ChannelConnectOptions extends ChannelCreateOptions {
1318
+ wait?: boolean;
1319
+ payload?: any;
1320
+ }
1321
+
1322
+ export interface ContextForIntent<MetadataType = any> extends Context {
1323
+ metadata?: MetadataType;
1324
+ }
1325
+
1326
+ export interface InfoForIntentOptions {
1327
+ name: string;
1328
+ context?: OpenFin.Context;
1329
+ }
1330
+
1331
+ export interface ProviderIdentity extends Identity {
1332
+ channelId: string;
1333
+ channelName: string;
1334
+ }
1335
+
1336
+ export interface RegisterUsageData {
1337
+ data: unknown;
1338
+ type: string;
1339
+ }
1340
+ }