@openfin/core 30.73.6 → 30.73.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/OpenFin.d.ts +1 -1729
- package/fin.d.ts +3 -4
- package/package.json +1 -1
- package/src/GlobalOpenFin.d.ts +4 -0
- package/src/OpenFin.d.ts +2938 -0
- package/src/OpenFin.js +4 -0
- package/src/api/application/Factory.d.ts +2 -0
- package/src/api/application/Factory.js +4 -3
- package/src/api/application/Instance.d.ts +3 -1
- package/src/api/application/Instance.js +1 -0
- package/src/api/application/index.js +7 -3
- package/src/api/base.d.ts +19 -15
- package/src/api/base.js +20 -22
- package/src/api/clipboard/index.d.ts +2 -0
- package/src/api/clipboard/index.js +1 -0
- package/src/api/events/application.d.ts +66 -56
- package/src/api/events/base.d.ts +33 -15
- package/src/api/events/channel.d.ts +13 -8
- package/src/api/events/eventAggregator.js +1 -9
- package/src/api/events/externalApplication.d.ts +10 -5
- package/src/api/events/frame.d.ts +13 -7
- package/src/api/events/globalHotkey.d.ts +11 -10
- package/src/api/events/platform.d.ts +10 -16
- package/src/api/events/system.d.ts +48 -18
- package/src/api/events/typedEventEmitter.d.ts +20 -0
- package/src/api/events/typedEventEmitter.js +2 -0
- package/src/api/events/view.d.ts +38 -54
- package/src/api/events/webcontents.d.ts +55 -28
- package/src/api/events/window.d.ts +148 -134
- package/src/api/external-application/Factory.d.ts +1 -0
- package/src/api/external-application/Instance.d.ts +2 -1
- package/src/api/external-application/index.js +7 -3
- package/src/api/fin.d.ts +3 -1
- package/src/api/fin.js +2 -2
- package/src/api/frame/Factory.d.ts +1 -0
- package/src/api/frame/Factory.js +2 -2
- package/src/api/frame/Instance.d.ts +3 -1
- package/src/api/frame/index.js +7 -3
- package/src/api/global-hotkey/index.d.ts +2 -2
- package/src/api/global-hotkey/index.js +6 -0
- package/src/api/interappbus/channel/channel.d.ts +6 -4
- package/src/api/interappbus/channel/channels-docs.d.ts +22 -0
- package/src/api/interappbus/channel/channels-docs.js +22 -0
- package/src/api/interappbus/channel/client.d.ts +2 -1
- package/src/api/interappbus/channel/client.js +24 -26
- package/src/api/interappbus/channel/connection-manager.d.ts +1 -0
- package/src/api/interappbus/channel/connection-manager.js +30 -28
- package/src/api/interappbus/channel/index.d.ts +6 -4
- package/src/api/interappbus/channel/index.js +34 -19
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +3 -1
- package/src/api/interappbus/channel/protocols/classic/strategy.js +21 -22
- package/src/api/interappbus/channel/protocols/index.d.ts +3 -0
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +3 -1
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +25 -27
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +0 -1
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +3 -1
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +29 -31
- package/src/api/interappbus/channel/protocols/strategy.d.ts +3 -1
- package/src/api/interappbus/channel/provider.d.ts +8 -4
- package/src/api/interappbus/channel/provider.js +140 -139
- package/src/api/interappbus/index.js +1 -1
- package/src/api/interop/Factory.d.ts +2 -0
- package/src/api/interop/Factory.js +20 -2
- package/src/api/interop/InteropBroker.d.ts +62 -39
- package/src/api/interop/InteropBroker.js +114 -55
- package/src/api/interop/InteropClient.d.ts +9 -0
- package/src/api/interop/InteropClient.js +46 -40
- package/src/api/interop/SessionContextGroupBroker.d.ts +1 -0
- package/src/api/interop/SessionContextGroupClient.d.ts +1 -0
- package/src/api/interop/SessionContextGroupClient.js +22 -24
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +9 -7
- package/src/api/interop/fdc3/PrivateChannelClient.js +6 -6
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +1 -0
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +14 -13
- package/src/api/interop/fdc3/fdc3-1.2.js +3 -14
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +24 -21
- package/src/api/interop/fdc3/fdc3-2.0.js +27 -27
- package/src/api/interop/fdc3/fdc3.d.ts +12 -0
- package/src/api/interop/fdc3/overrideCheck.d.ts +4 -0
- package/src/api/interop/fdc3/overrideCheck.js +32 -0
- package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +53 -0
- package/src/api/interop/fdc3/shapes/fdc3v1.js +4 -0
- package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +75 -0
- package/src/api/interop/fdc3/shapes/fdc3v2.js +2 -0
- package/src/api/interop/fdc3/utils.d.ts +15 -5
- package/src/api/interop/fdc3/utils.js +29 -11
- package/src/api/interop/fdc3/versions.d.ts +1 -0
- package/src/api/interop/fdc3/versions.js +2 -0
- package/src/api/interop/index.js +7 -3
- package/src/api/interop/utils.d.ts +2 -0
- package/src/api/interop/utils.js +29 -15
- package/src/api/me.d.ts +3 -1
- package/src/api/platform/Factory.d.ts +6 -0
- package/src/api/platform/Factory.js +14 -5
- package/src/api/platform/Instance.d.ts +18 -3
- package/src/api/platform/Instance.js +30 -13
- package/src/api/platform/common-utils.d.ts +2 -1
- package/src/api/platform/index.js +7 -3
- package/src/api/platform/layout/Factory.d.ts +7 -1
- package/src/api/platform/layout/Factory.js +22 -20
- package/src/api/platform/layout/Instance.d.ts +6 -4
- package/src/api/platform/layout/Instance.js +2 -3
- package/src/api/platform/layout/controllers/splitter-controller.js +1 -1
- package/src/api/platform/layout/controllers/tab-drag-controller.d.ts +1 -0
- package/src/api/platform/layout/controllers/tab-drag-controller.js +1 -1
- package/src/api/platform/layout/index.js +7 -3
- package/src/api/platform/layout/shapes.d.ts +3 -1
- package/src/api/platform/layout/utils/bounds-observer.d.ts +1 -1
- package/src/api/platform/layout/utils/bounds-observer.js +7 -5
- package/src/api/platform/layout/utils/view-overlay.d.ts +1 -0
- package/src/api/platform/provider.d.ts +162 -0
- package/src/api/platform/provider.js +2 -0
- package/src/api/snapshot-source/Factory.d.ts +2 -0
- package/src/api/snapshot-source/Factory.js +2 -1
- package/src/api/snapshot-source/Instance.d.ts +1 -0
- package/src/api/snapshot-source/Instance.js +33 -35
- package/src/api/snapshot-source/index.js +7 -3
- package/src/api/snapshot-source/utils.d.ts +1 -0
- package/src/api/snapshot-source/utils.js +2 -1
- package/src/api/system/index.d.ts +76 -16
- package/src/api/system/index.js +127 -3
- package/src/api/view/Factory.d.ts +1 -0
- package/src/api/view/Factory.js +2 -2
- package/src/api/view/Instance.d.ts +17 -3
- package/src/api/view/Instance.js +20 -0
- package/src/api/view/index.js +7 -3
- package/src/api/webcontents/main.d.ts +20 -5
- package/src/api/webcontents/main.js +10 -0
- package/src/api/window/Factory.d.ts +1 -0
- package/src/api/window/Factory.js +2 -2
- package/src/api/window/Instance.d.ts +26 -3
- package/src/api/window/Instance.js +26 -1
- package/src/api/window/index.js +7 -3
- package/src/browser.d.ts +4 -4
- package/src/environment/browser.d.ts +3 -1
- package/src/environment/environment.d.ts +3 -1
- package/src/environment/node-env.d.ts +3 -1
- package/src/environment/node-env.js +2 -2
- package/src/environment/openfin-env.d.ts +3 -1
- package/src/environment/openfin-env.js +15 -17
- package/src/fdc3.d.ts +3 -0
- package/src/fdc3.js +1 -1
- package/src/mock.d.ts +2 -2
- package/src/mock.js +3 -3
- package/src/namespaces.d.ts +21 -0
- package/src/namespaces.js +24 -0
- package/src/shapes/WebOptions.d.ts +1 -0
- package/src/shapes/WindowOptions.d.ts +1 -0
- package/src/shapes/protocol.d.ts +34 -26
- package/src/transport/transport.d.ts +6 -5
- package/src/transport/transport.js +26 -28
- package/src/transport/wire.d.ts +9 -7
- package/src/util/http.d.ts +1 -1
- package/src/util/http.js +16 -11
- package/src/util/inaccessibleObject.d.ts +2 -0
- package/src/util/inaccessibleObject.js +49 -0
- package/src/util/normalize-config.js +5 -5
package/OpenFin.d.ts
CHANGED
|
@@ -1,1729 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare namespace OpenFin {
|
|
4
|
-
// "wrappable entities"
|
|
5
|
-
export type Application = import('./src/api/application/index').Application;
|
|
6
|
-
export type ExternalApplication = import('./src/api/external-application/index').ExternalApplication;
|
|
7
|
-
export type Frame = import('./src/api/frame/index')._Frame;
|
|
8
|
-
export type ChannelClient = import('./src/api/interappbus/channel/client').default;
|
|
9
|
-
export type ChannelProvider = import('./src/api/interappbus/channel/provider').ChannelProvider;
|
|
10
|
-
export type Platform = import('./src/api/platform/index').Platform;
|
|
11
|
-
export type Layout = import('./src/api/platform/layout/index').Layout;
|
|
12
|
-
export type View = import('./src/api/view/index').View;
|
|
13
|
-
export type Window = import('./src/api/window/index')._Window;
|
|
14
|
-
export type WebContent = View | OpenFin.Window;
|
|
15
|
-
export type InteropClient = import('./src/api/interop/index').InteropClient;
|
|
16
|
-
export type InteropBroker = import('./src/api/interop/index').InteropBroker;
|
|
17
|
-
export type SnapshotSource = import('./src/api/snapshot-source/index').SnapshotSource;
|
|
18
|
-
|
|
19
|
-
export type ApplicationIdentity = {
|
|
20
|
-
// used for applications
|
|
21
|
-
uuid: string;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type Identity = {
|
|
25
|
-
// used for views/windows/frames
|
|
26
|
-
uuid: string;
|
|
27
|
-
name: string;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export type ClientIdentity = {
|
|
31
|
-
uuid: string;
|
|
32
|
-
name: string;
|
|
33
|
-
endpointId: string;
|
|
34
|
-
isLocalEndpointId: boolean; // If true, this connection is from a legacy client.
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export type ClientIdentityMultiRuntime = ClientIdentity & {
|
|
38
|
-
runtimeUuid: string;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export type EntityInfo = {
|
|
42
|
-
uuid: string;
|
|
43
|
-
name: string;
|
|
44
|
-
entityType: EntityType;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export type EntityType = 'window' | 'iframe' | 'external connection' | 'view' | 'unknown';
|
|
48
|
-
|
|
49
|
-
export type Bounds = {
|
|
50
|
-
top: number;
|
|
51
|
-
left: number;
|
|
52
|
-
height: number;
|
|
53
|
-
width: number;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Returned from getBounds call. bottom and right are never used for setting.
|
|
58
|
-
*/
|
|
59
|
-
export type WindowBounds = Bounds & {
|
|
60
|
-
bottom: number;
|
|
61
|
-
right: number;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export type Rectangle = {
|
|
65
|
-
x: number;
|
|
66
|
-
y: number;
|
|
67
|
-
width: number;
|
|
68
|
-
height: number;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export type ApplicationCreationOptions = Partial<ApplicationOptions> & {
|
|
72
|
-
name: string;
|
|
73
|
-
uuid: string;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export type ApplicationOptions = LegacyWinOptionsInAppOptions & {
|
|
77
|
-
disableIabSecureLogging: boolean;
|
|
78
|
-
loadErrorMessage: string;
|
|
79
|
-
mainWindowOptions: WindowCreationOptions;
|
|
80
|
-
name: string;
|
|
81
|
-
nonPersistent: boolean;
|
|
82
|
-
plugins: boolean;
|
|
83
|
-
spellCheck: boolean;
|
|
84
|
-
url: string;
|
|
85
|
-
uuid: string;
|
|
86
|
-
webSecurity: boolean;
|
|
87
|
-
commands: ShortcutOverride[];
|
|
88
|
-
isPlatformController: boolean;
|
|
89
|
-
maxViewPoolSize: number;
|
|
90
|
-
defaultWindowOptions: Partial<WindowOptions>;
|
|
91
|
-
defaultViewOptions: Partial<ViewOptions>;
|
|
92
|
-
snapshot: Snapshot;
|
|
93
|
-
preventQuitOnLastWindowClosed: boolean;
|
|
94
|
-
interopBrokerConfiguration: InteropBrokerOptions;
|
|
95
|
-
apiDiagnostics: boolean;
|
|
96
|
-
defaultDomainSettings: DefaultDomainSettings;
|
|
97
|
-
enableJumpList: boolean;
|
|
98
|
-
enableBeforeUnload: boolean;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
type InteropBrokerOptions = {
|
|
102
|
-
contextGroups?: ContextGroupInfo;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export type ContextGroupInfo = {
|
|
106
|
-
id: string;
|
|
107
|
-
displayMetadata?: DisplayMetadata;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export type DisplayMetadata = {
|
|
111
|
-
/**
|
|
112
|
-
* A user-readable name for this context group, e.g: `"Red"`
|
|
113
|
-
*/
|
|
114
|
-
readonly name?: string;
|
|
115
|
-
/**
|
|
116
|
-
* The color that should be associated within this context group when displaying this context group in a UI, e.g: `0xFF0000`.
|
|
117
|
-
*/
|
|
118
|
-
readonly color?: string;
|
|
119
|
-
/**
|
|
120
|
-
* A URL of an image that can be used to display this context group
|
|
121
|
-
*/
|
|
122
|
-
readonly glyph?: string;
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export type LegacyWinOptionsInAppOptions = Pick<
|
|
126
|
-
WindowCreationOptions,
|
|
127
|
-
| 'accelerator'
|
|
128
|
-
| 'alwaysOnTop'
|
|
129
|
-
| 'api'
|
|
130
|
-
| 'aspectRatio'
|
|
131
|
-
| 'autoShow'
|
|
132
|
-
| 'backgroundColor'
|
|
133
|
-
| 'contentNavigation'
|
|
134
|
-
| 'contextMenu'
|
|
135
|
-
| 'cornerRounding'
|
|
136
|
-
| 'customData'
|
|
137
|
-
| 'customRequestHeaders'
|
|
138
|
-
| 'defaultCentered'
|
|
139
|
-
| 'defaultHeight'
|
|
140
|
-
| 'defaultLeft'
|
|
141
|
-
| 'defaultTop'
|
|
142
|
-
| 'defaultWidth'
|
|
143
|
-
| 'frame'
|
|
144
|
-
| 'hideOnClose'
|
|
145
|
-
| 'icon'
|
|
146
|
-
| 'maxHeight'
|
|
147
|
-
| 'maximizable'
|
|
148
|
-
| 'maxWidth'
|
|
149
|
-
| 'minHeight'
|
|
150
|
-
| 'minimizable'
|
|
151
|
-
| 'minWidth'
|
|
152
|
-
| 'opacity'
|
|
153
|
-
| 'preloadScripts'
|
|
154
|
-
| 'resizable'
|
|
155
|
-
| 'resizeRegion'
|
|
156
|
-
| 'saveWindowState'
|
|
157
|
-
| 'shadow'
|
|
158
|
-
| 'showTaskbarIcon'
|
|
159
|
-
| 'smallWindow'
|
|
160
|
-
| 'state'
|
|
161
|
-
| 'taskbarIconGroup'
|
|
162
|
-
| 'waitForPageLoad'
|
|
163
|
-
>;
|
|
164
|
-
|
|
165
|
-
export type Snapshot = {
|
|
166
|
-
windows: WindowCreationOptions[];
|
|
167
|
-
snapshotDetails?: {
|
|
168
|
-
monitorInfo: MonitorInfo;
|
|
169
|
-
runtimeVersion: string;
|
|
170
|
-
timestamp: string;
|
|
171
|
-
};
|
|
172
|
-
interopSnapshotDetails?: {
|
|
173
|
-
contextGroupStates: ContextGroupStates;
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
export type ContextGroupStates = {
|
|
178
|
-
[key: string]: {
|
|
179
|
-
[key: string]: Context;
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
export type Context = {
|
|
184
|
-
id?: {
|
|
185
|
-
[key: string]: string;
|
|
186
|
-
};
|
|
187
|
-
name?: string;
|
|
188
|
-
type: string;
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
export type MonitorInfo = {
|
|
192
|
-
deviceScaleFactor: number;
|
|
193
|
-
dpi: Point;
|
|
194
|
-
nonPrimaryMonitors: MonitorDetails[];
|
|
195
|
-
primaryMonitor: MonitorDetails;
|
|
196
|
-
reason: string;
|
|
197
|
-
taskbar: TaskBar;
|
|
198
|
-
virtualScreen: DipRect;
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
export type Point = {
|
|
202
|
-
x: number;
|
|
203
|
-
y: number;
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
export type PointTopLeft = {
|
|
207
|
-
top: number;
|
|
208
|
-
left: number;
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
export type RectangleByEdgePositions = {
|
|
212
|
-
top: number;
|
|
213
|
-
left: number;
|
|
214
|
-
bottom: number;
|
|
215
|
-
right: number;
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
export type MonitorDetails = {
|
|
219
|
-
available: DipScaleRects;
|
|
220
|
-
availableRect: RectangleByEdgePositions;
|
|
221
|
-
deviceId: string | number; // Number on mac
|
|
222
|
-
displayDeviceActive: boolean;
|
|
223
|
-
deviceScaleFactor: number;
|
|
224
|
-
monitorRect: RectangleByEdgePositions;
|
|
225
|
-
name: string | number; // Number on mac
|
|
226
|
-
dpi: Point;
|
|
227
|
-
monitor: DipScaleRects;
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
export type DipRect = RectangleByEdgePositions & {
|
|
231
|
-
dipRect: RectangleByEdgePositions;
|
|
232
|
-
scaledRect: RectangleByEdgePositions;
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
export type DipScaleRects = {
|
|
236
|
-
dipRect: RectangleByEdgePositions;
|
|
237
|
-
scaledRect: RectangleByEdgePositions;
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
export type TaskBar = DipScaleRects & {
|
|
241
|
-
edge: string;
|
|
242
|
-
rect: RectangleByEdgePositions;
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
export type WindowCreationOptions = Partial<WindowOptions> & {
|
|
246
|
-
name: string;
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
export type UpdatableWindowOptions = Partial<MutableWindowOptions>;
|
|
250
|
-
|
|
251
|
-
export type WindowOptions = MutableWindowOptions & ConstWindowOptions;
|
|
252
|
-
|
|
253
|
-
export type ViewVisibilityOption = {
|
|
254
|
-
enabled?: boolean;
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
export type ShowViewOnWindowResizeOptions = ViewVisibilityOption & {
|
|
258
|
-
paintIntervalMs?: number;
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
export type ViewVisibilityOptions = {
|
|
262
|
-
showViewsOnWindowResize?: ShowViewOnWindowResizeOptions;
|
|
263
|
-
showViewsOnSplitterDrag?: ViewVisibilityOption;
|
|
264
|
-
showViewsOnTabDrag?: ViewVisibilityOption;
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
export type WindowState = 'maximized' | 'minimized' | 'normal';
|
|
268
|
-
|
|
269
|
-
export type ConstWindowOptions = {
|
|
270
|
-
accelerator: Partial<Accelerator>;
|
|
271
|
-
api: Api;
|
|
272
|
-
applicationIcon: string;
|
|
273
|
-
autoShow: boolean;
|
|
274
|
-
backgroundColor: string;
|
|
275
|
-
contentCreation: ContentCreationOptions;
|
|
276
|
-
contentNavigation: ContentNavigation;
|
|
277
|
-
contentRedirect: Partial<ContentRedirect>;
|
|
278
|
-
customRequestHeaders: CustomRequestHeaders[];
|
|
279
|
-
closeOnLastViewRemoved: boolean;
|
|
280
|
-
defaultCentered: boolean;
|
|
281
|
-
defaultHeight: number;
|
|
282
|
-
defaultLeft: number;
|
|
283
|
-
defaultTop: number;
|
|
284
|
-
defaultWidth: number;
|
|
285
|
-
height: number;
|
|
286
|
-
layout: any;
|
|
287
|
-
modalParentIdentity: Identity;
|
|
288
|
-
name: string;
|
|
289
|
-
permissions: Partial<Permissions>;
|
|
290
|
-
preloadScripts: PreloadScript[];
|
|
291
|
-
processAffinity: string;
|
|
292
|
-
saveWindowState: boolean;
|
|
293
|
-
shadow: boolean;
|
|
294
|
-
smallWindow: boolean;
|
|
295
|
-
state: WindowState;
|
|
296
|
-
taskbarIcon: string;
|
|
297
|
-
taskbarIconGroup: string;
|
|
298
|
-
url: string;
|
|
299
|
-
uuid: string;
|
|
300
|
-
waitForPageLoad: boolean;
|
|
301
|
-
width: number;
|
|
302
|
-
x: number;
|
|
303
|
-
y: number;
|
|
304
|
-
experimental?: any;
|
|
305
|
-
fdc3InteropApi?: string;
|
|
306
|
-
// Platform only
|
|
307
|
-
viewVisibility?: ViewVisibilityOptions;
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
export type MutableWindowOptions = {
|
|
311
|
-
alphaMask: RGB;
|
|
312
|
-
alwaysOnTop: boolean;
|
|
313
|
-
aspectRatio: number;
|
|
314
|
-
contextMenu: boolean;
|
|
315
|
-
// DEPRECATED
|
|
316
|
-
contextMenuSettings: ContextMenuSettings;
|
|
317
|
-
contextMenuOptions: ContextMenuOptions;
|
|
318
|
-
cornerRounding: Partial<CornerRounding>;
|
|
319
|
-
customContext: any;
|
|
320
|
-
customData: any;
|
|
321
|
-
frame: boolean;
|
|
322
|
-
hideOnClose: boolean;
|
|
323
|
-
hotkeys: Hotkey[];
|
|
324
|
-
icon: string;
|
|
325
|
-
includeInSnapshots: boolean;
|
|
326
|
-
maxHeight: number;
|
|
327
|
-
maximizable: boolean;
|
|
328
|
-
maxWidth: number;
|
|
329
|
-
minHeight: number;
|
|
330
|
-
minimizable: boolean;
|
|
331
|
-
minWidth: number;
|
|
332
|
-
opacity: number;
|
|
333
|
-
resizable: boolean;
|
|
334
|
-
resizeRegion: ResizeRegion;
|
|
335
|
-
showBackgroundImages: boolean;
|
|
336
|
-
showTaskbarIcon: boolean;
|
|
337
|
-
interop: InteropConfig;
|
|
338
|
-
workspacePlatform: WorkspacePlatformOptions;
|
|
339
|
-
};
|
|
340
|
-
|
|
341
|
-
export type WorkspacePlatformOptions = {
|
|
342
|
-
/** Leaving this as any for now until we figure out what the shape should look like in Workspace */
|
|
343
|
-
[key: string]: any;
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
export type WebRequestHeader = {
|
|
347
|
-
[key: string]: string;
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
export type CustomRequestHeaders = {
|
|
351
|
-
urlPatterns: string[];
|
|
352
|
-
headers: WebRequestHeader[]; // key=value is added to headers
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
export type WindowOptionDiff = {
|
|
356
|
-
[key in keyof WindowOptions]: {
|
|
357
|
-
oldVal: WindowOptions[key];
|
|
358
|
-
newVal: WindowOptions[key];
|
|
359
|
-
};
|
|
360
|
-
};
|
|
361
|
-
|
|
362
|
-
export type ResizeRegion = {
|
|
363
|
-
size?: number;
|
|
364
|
-
bottomRightCorner?: number;
|
|
365
|
-
sides?: {
|
|
366
|
-
top?: boolean;
|
|
367
|
-
bottom?: boolean;
|
|
368
|
-
left?: boolean;
|
|
369
|
-
right?: boolean;
|
|
370
|
-
};
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
export type Accelerator = {
|
|
374
|
-
devtools: boolean;
|
|
375
|
-
reload: boolean;
|
|
376
|
-
reloadIgnoringCache: boolean;
|
|
377
|
-
zoom: boolean;
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
export type Api = {
|
|
381
|
-
iframe?: {
|
|
382
|
-
crossOriginInjection?: boolean;
|
|
383
|
-
sameOriginInjection?: boolean;
|
|
384
|
-
enableDeprecatedSharedName?: boolean;
|
|
385
|
-
};
|
|
386
|
-
};
|
|
387
|
-
|
|
388
|
-
export type ContentNavigation = {
|
|
389
|
-
whitelist?: string[];
|
|
390
|
-
blacklist?: string[];
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
export type ContentRedirect = {
|
|
394
|
-
whitelist: string[];
|
|
395
|
-
blacklist: string[];
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
export type CornerRounding = {
|
|
399
|
-
height: number;
|
|
400
|
-
width: number;
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
export type DownloadPreloadOption = {
|
|
404
|
-
url: string;
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
export type DownloadPreloadInfo = {
|
|
408
|
-
success: boolean;
|
|
409
|
-
url?: string;
|
|
410
|
-
error: string;
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
export type RGB = {
|
|
414
|
-
red: number;
|
|
415
|
-
blue: number;
|
|
416
|
-
green: number;
|
|
417
|
-
};
|
|
418
|
-
|
|
419
|
-
// DEPRECATED
|
|
420
|
-
export type ContextMenuSettings = {
|
|
421
|
-
enable: boolean;
|
|
422
|
-
devtools?: boolean;
|
|
423
|
-
reload?: boolean;
|
|
424
|
-
};
|
|
425
|
-
|
|
426
|
-
export type Hotkey = {
|
|
427
|
-
keys: string;
|
|
428
|
-
preventDefault?: boolean;
|
|
429
|
-
};
|
|
430
|
-
|
|
431
|
-
export type ShortcutOverride = Hotkey & {
|
|
432
|
-
command: string;
|
|
433
|
-
};
|
|
434
|
-
|
|
435
|
-
export type PreloadScript = {
|
|
436
|
-
mandatory?: boolean;
|
|
437
|
-
state?: 'load-started' | 'load-failed' | 'load-succeeded' | 'failed' | 'succeeded';
|
|
438
|
-
url: string;
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
export type AutoResizeOptions = {
|
|
442
|
-
/**
|
|
443
|
-
* If true, the view's width will grow and shrink together with the window. false
|
|
444
|
-
* by default.
|
|
445
|
-
*/
|
|
446
|
-
width?: boolean;
|
|
447
|
-
/**
|
|
448
|
-
* If true, the view's height will grow and shrink together with the window. false
|
|
449
|
-
* by default.
|
|
450
|
-
*/
|
|
451
|
-
height?: boolean;
|
|
452
|
-
/**
|
|
453
|
-
* If true, the view's x position and width will grow and shrink proportionally with
|
|
454
|
-
* the window. false by default.
|
|
455
|
-
*/
|
|
456
|
-
horizontal?: boolean;
|
|
457
|
-
/**
|
|
458
|
-
* If true, the view's y position and height will grow and shrink proportionally with
|
|
459
|
-
* the window. false by default.
|
|
460
|
-
*/
|
|
461
|
-
vertical?: boolean;
|
|
462
|
-
};
|
|
463
|
-
|
|
464
|
-
export type InteropConfig = {
|
|
465
|
-
currentContextGroup?: string | null;
|
|
466
|
-
providerId?: string;
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
export type ViewInfo = {
|
|
470
|
-
canNavigateBack: boolean;
|
|
471
|
-
canNavigateForward: boolean;
|
|
472
|
-
processAffinity: string;
|
|
473
|
-
title: string;
|
|
474
|
-
url: string;
|
|
475
|
-
favicons: string[];
|
|
476
|
-
};
|
|
477
|
-
|
|
478
|
-
export type UpdatableViewOptions = Partial<MutableViewOptions>;
|
|
479
|
-
|
|
480
|
-
export type ViewCreationOptions = Partial<ViewOptions> & {
|
|
481
|
-
name: string;
|
|
482
|
-
url: string;
|
|
483
|
-
target: Identity;
|
|
484
|
-
};
|
|
485
|
-
|
|
486
|
-
export type MutableViewOptions = {
|
|
487
|
-
autoResize: AutoResizeOptions;
|
|
488
|
-
contextMenu: boolean;
|
|
489
|
-
// DEPRECATED
|
|
490
|
-
contextMenuSettings: ContextMenuSettings;
|
|
491
|
-
contextMenuOptions: ContextMenuOptions;
|
|
492
|
-
backgroundColor: string;
|
|
493
|
-
customData: any;
|
|
494
|
-
customContext: any;
|
|
495
|
-
api: Api;
|
|
496
|
-
contentNavigation: ContentNavigation;
|
|
497
|
-
detachOnClose: boolean;
|
|
498
|
-
isClosable: boolean;
|
|
499
|
-
preventDragOut: boolean;
|
|
500
|
-
// Doesn't get defaulted
|
|
501
|
-
interop?: InteropConfig;
|
|
502
|
-
};
|
|
503
|
-
|
|
504
|
-
export type ViewOptions = ConstViewOptions & MutableViewOptions;
|
|
505
|
-
|
|
506
|
-
export type ConstViewOptions = {
|
|
507
|
-
name: string;
|
|
508
|
-
url: string;
|
|
509
|
-
target: Identity;
|
|
510
|
-
contentCreation: ContentCreationOptions;
|
|
511
|
-
customRequestHeaders: CustomRequestHeaders[];
|
|
512
|
-
bounds: Bounds;
|
|
513
|
-
permissions: Partial<Permissions>;
|
|
514
|
-
processAffinity: string;
|
|
515
|
-
hotkeys: Hotkey[];
|
|
516
|
-
preloadScripts: PreloadScript[];
|
|
517
|
-
manifestUrl: string;
|
|
518
|
-
zoomLevel: number;
|
|
519
|
-
experimental: any;
|
|
520
|
-
fdc3InteropApi?: string;
|
|
521
|
-
enableBeforeUnload: boolean;
|
|
522
|
-
accelerator?: Partial<OpenFin.Accelerator>;
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
export type Certificate = {
|
|
526
|
-
data: string;
|
|
527
|
-
fingerprint: string;
|
|
528
|
-
issuer: CertificatePrincipal;
|
|
529
|
-
issuerCert: Certificate;
|
|
530
|
-
issuerName: string;
|
|
531
|
-
serialNumber: string;
|
|
532
|
-
subject: CertificatePrincipal;
|
|
533
|
-
subjectName: string;
|
|
534
|
-
validExpiry: number;
|
|
535
|
-
validStart: number;
|
|
536
|
-
};
|
|
537
|
-
|
|
538
|
-
type CertificatePrincipal = {
|
|
539
|
-
commonName: string;
|
|
540
|
-
country: string;
|
|
541
|
-
locality: string;
|
|
542
|
-
organizations: string[];
|
|
543
|
-
organizationUnits: string[];
|
|
544
|
-
state: string;
|
|
545
|
-
};
|
|
546
|
-
|
|
547
|
-
export type HostContextChangedPayload = {
|
|
548
|
-
context: any;
|
|
549
|
-
reason: HostContextChangedReasons;
|
|
550
|
-
};
|
|
551
|
-
|
|
552
|
-
export type ApplySnapshotOptions = {
|
|
553
|
-
closeExistingWindows?: boolean;
|
|
554
|
-
closeSnapshotWindows?: boolean;
|
|
555
|
-
skipOutOfBoundsCheck?: boolean;
|
|
556
|
-
};
|
|
557
|
-
|
|
558
|
-
export type ApplySnapshotPayload = {
|
|
559
|
-
snapshot: Snapshot;
|
|
560
|
-
options?: ApplySnapshotOptions;
|
|
561
|
-
};
|
|
562
|
-
export type CreateViewPayload = {
|
|
563
|
-
opts: Partial<ViewOptions>;
|
|
564
|
-
target: Identity;
|
|
565
|
-
targetView?: Identity;
|
|
566
|
-
};
|
|
567
|
-
|
|
568
|
-
export type ReplaceViewPayload = {
|
|
569
|
-
opts: {
|
|
570
|
-
viewToReplace: Identity;
|
|
571
|
-
newView: Partial<ViewOptions>;
|
|
572
|
-
};
|
|
573
|
-
target: Identity;
|
|
574
|
-
};
|
|
575
|
-
|
|
576
|
-
export type CloseViewPayload = {
|
|
577
|
-
view: Identity;
|
|
578
|
-
};
|
|
579
|
-
|
|
580
|
-
export type FetchManifestPayload = {
|
|
581
|
-
manifestUrl: string;
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
export type ReplaceLayoutOpts = {
|
|
585
|
-
layout: LayoutOptions;
|
|
586
|
-
};
|
|
587
|
-
export type ReplaceLayoutPayload = {
|
|
588
|
-
opts: ReplaceLayoutOpts;
|
|
589
|
-
target: Identity;
|
|
590
|
-
};
|
|
591
|
-
|
|
592
|
-
export type SetWindowContextPayload = {
|
|
593
|
-
context: any;
|
|
594
|
-
entityType: EntityType;
|
|
595
|
-
target: Identity;
|
|
596
|
-
};
|
|
597
|
-
|
|
598
|
-
export type LaunchIntoPlatformPayload = {
|
|
599
|
-
manifest: any;
|
|
600
|
-
};
|
|
601
|
-
|
|
602
|
-
export type GetWindowContextPayload = {
|
|
603
|
-
entityType: EntityType;
|
|
604
|
-
target: Identity;
|
|
605
|
-
};
|
|
606
|
-
|
|
607
|
-
export type ApplicationPermissions = {
|
|
608
|
-
setFileDownloadLocation: boolean;
|
|
609
|
-
};
|
|
610
|
-
|
|
611
|
-
export type SystemPermissions = {
|
|
612
|
-
getAllExternalWindows: boolean;
|
|
613
|
-
launchExternalProcess: boolean;
|
|
614
|
-
readRegistryValue:
|
|
615
|
-
| boolean
|
|
616
|
-
| {
|
|
617
|
-
enabled: boolean;
|
|
618
|
-
registryKeys: string[];
|
|
619
|
-
};
|
|
620
|
-
terminateExternalProcess: boolean;
|
|
621
|
-
openUrlWithBrowser: {
|
|
622
|
-
enabled: boolean;
|
|
623
|
-
protocols: string[];
|
|
624
|
-
};
|
|
625
|
-
};
|
|
626
|
-
|
|
627
|
-
export type WebPermission =
|
|
628
|
-
| 'audio'
|
|
629
|
-
| 'video'
|
|
630
|
-
| 'geolocation'
|
|
631
|
-
| 'notifications'
|
|
632
|
-
| 'midiSysex'
|
|
633
|
-
| 'pointerLock'
|
|
634
|
-
| 'fullscreen'
|
|
635
|
-
| 'openExternal'
|
|
636
|
-
| 'clipboard-read'
|
|
637
|
-
| 'clipboard-sanitized-write';
|
|
638
|
-
|
|
639
|
-
export type Permissions = {
|
|
640
|
-
Application?: Partial<ApplicationPermissions>;
|
|
641
|
-
System?: Partial<SystemPermissions>;
|
|
642
|
-
webAPIs?: WebPermission[];
|
|
643
|
-
};
|
|
644
|
-
|
|
645
|
-
export type PlatformWindowCreationOptions = Partial<WindowCreationOptions> & {
|
|
646
|
-
updateStateIfExists?: boolean;
|
|
647
|
-
reason?: WindowCreationReason;
|
|
648
|
-
};
|
|
649
|
-
|
|
650
|
-
export type PlatformWindowOptions = WindowCreationOptions & {
|
|
651
|
-
stylesheetUrl: string;
|
|
652
|
-
};
|
|
653
|
-
|
|
654
|
-
export type PlatformViewCreationOptions = Partial<ViewOptions> & {
|
|
655
|
-
url: string;
|
|
656
|
-
target: Identity;
|
|
657
|
-
};
|
|
658
|
-
|
|
659
|
-
export type ProcessAffinityStrategy = 'same' | 'different';
|
|
660
|
-
|
|
661
|
-
export type PlatformOptions = ApplicationCreationOptions & {
|
|
662
|
-
defaultWindowOptions?: Partial<PlatformWindowOptions>;
|
|
663
|
-
defaultViewOptions?: Partial<PlatformViewCreationOptions>;
|
|
664
|
-
disableDefaultCommands?: boolean;
|
|
665
|
-
viewProcessAffinityStrategy?: ProcessAffinityStrategy;
|
|
666
|
-
providerUrl?: string;
|
|
667
|
-
permissions?: Partial<Permissions>;
|
|
668
|
-
};
|
|
669
|
-
|
|
670
|
-
export type Manifest = {
|
|
671
|
-
appAssets?: {
|
|
672
|
-
alias: string;
|
|
673
|
-
args?: string;
|
|
674
|
-
src: string;
|
|
675
|
-
target?: string;
|
|
676
|
-
version: string;
|
|
677
|
-
}[];
|
|
678
|
-
assetsUrl?: string;
|
|
679
|
-
devtools_port?: number;
|
|
680
|
-
dialogSettings?: {
|
|
681
|
-
bgColor?: number;
|
|
682
|
-
logo?: string;
|
|
683
|
-
progressBarBgColor?: number;
|
|
684
|
-
progressBarBorderColor?: number;
|
|
685
|
-
progressBarFillColor?: number;
|
|
686
|
-
textColor?: number;
|
|
687
|
-
};
|
|
688
|
-
licenseKey: string;
|
|
689
|
-
offlineAccess?: boolean;
|
|
690
|
-
platform?: PlatformOptions;
|
|
691
|
-
proxy?: {
|
|
692
|
-
proxyAddress: string;
|
|
693
|
-
proxyPort: number;
|
|
694
|
-
type: string;
|
|
695
|
-
};
|
|
696
|
-
runtime: {
|
|
697
|
-
arguments?: string;
|
|
698
|
-
fallbackVersion?: string;
|
|
699
|
-
forceLatest?: boolean;
|
|
700
|
-
futureVersion?: string;
|
|
701
|
-
version: string;
|
|
702
|
-
};
|
|
703
|
-
services?: string[];
|
|
704
|
-
shortcut?: {
|
|
705
|
-
'company': string;
|
|
706
|
-
'description'?: string;
|
|
707
|
-
'force'?: boolean;
|
|
708
|
-
'icon': string;
|
|
709
|
-
'name': string;
|
|
710
|
-
'startMenuRootFolder'?: string;
|
|
711
|
-
'target'?: ('desktop' | 'start-menu' | 'automatic-start-up')[];
|
|
712
|
-
'uninstall-shortcut'?: boolean;
|
|
713
|
-
};
|
|
714
|
-
snapshot?: Snapshot;
|
|
715
|
-
splashScreenImage?: string;
|
|
716
|
-
startup_app: WindowOptions;
|
|
717
|
-
supportInformation?: {
|
|
718
|
-
company: string;
|
|
719
|
-
email: string;
|
|
720
|
-
product: string;
|
|
721
|
-
forwardErrorReports?: boolean;
|
|
722
|
-
enableErrorReporting?: boolean;
|
|
723
|
-
};
|
|
724
|
-
};
|
|
725
|
-
|
|
726
|
-
export type LayoutOptions = {
|
|
727
|
-
settings: {
|
|
728
|
-
popoutWholeStack?: boolean;
|
|
729
|
-
constrainDragToContainer?: boolean;
|
|
730
|
-
showPopoutIcon?: boolean;
|
|
731
|
-
showMaximiseIcon?: boolean;
|
|
732
|
-
showCloseIcon?: boolean;
|
|
733
|
-
constrainDragToHeaders?: boolean;
|
|
734
|
-
};
|
|
735
|
-
content: LayoutContent;
|
|
736
|
-
};
|
|
737
|
-
|
|
738
|
-
export type LayoutContent = (LayoutRow | LayoutColumn | LayoutComponent)[];
|
|
739
|
-
|
|
740
|
-
export type LayoutRow = {
|
|
741
|
-
type: 'row';
|
|
742
|
-
content: LayoutContent;
|
|
743
|
-
};
|
|
744
|
-
export type LayoutColumn = {
|
|
745
|
-
type: 'column';
|
|
746
|
-
content: LayoutContent;
|
|
747
|
-
};
|
|
748
|
-
export type LayoutComponent = {
|
|
749
|
-
type: 'component';
|
|
750
|
-
componentName: 'view';
|
|
751
|
-
componentState: {
|
|
752
|
-
name: string;
|
|
753
|
-
url: string;
|
|
754
|
-
title?: string;
|
|
755
|
-
};
|
|
756
|
-
};
|
|
757
|
-
|
|
758
|
-
export type OverrideCallback<T extends any = PlatformProvider, U extends T = T> = (
|
|
759
|
-
arg: Constructor<T>,
|
|
760
|
-
...args: ConstructorParameters<Constructor<T>>
|
|
761
|
-
) => U | Promise<U>;
|
|
762
|
-
|
|
763
|
-
export type Constructor<T = {}> = new (...args: any[]) => T;
|
|
764
|
-
|
|
765
|
-
export type HostContextChangedReasons = 'updated' | 'reparented';
|
|
766
|
-
|
|
767
|
-
export type WindowCreationReason =
|
|
768
|
-
| 'tearout'
|
|
769
|
-
| 'create-view-without-target'
|
|
770
|
-
| 'api-call'
|
|
771
|
-
| 'app-creation'
|
|
772
|
-
| 'restore'
|
|
773
|
-
| 'apply-snapshot';
|
|
774
|
-
|
|
775
|
-
// TODO: Real PlatformProvider type def
|
|
776
|
-
export type PlatformProvider = {
|
|
777
|
-
/**
|
|
778
|
-
* Handles requests to create a window in the current platform.
|
|
779
|
-
* @param { WindowOption } payload Window options for the window to be created.
|
|
780
|
-
* @param { Identity } [identity] If {@link Platform#createWindow Platform.createWindow} was called, the identity of the caller will be here.
|
|
781
|
-
* If `createWindow` was called as part of applying a snapshot or creating a view without a target window, `identity` will be undefined.
|
|
782
|
-
*/
|
|
783
|
-
createWindow(
|
|
784
|
-
options: OpenFin.PlatformWindowCreationOptions,
|
|
785
|
-
identity?: OpenFin.Identity
|
|
786
|
-
): Promise<OpenFin.Window>;
|
|
787
|
-
|
|
788
|
-
/**
|
|
789
|
-
* Gets the current state of windows and their views and returns a snapshot object containing that info.
|
|
790
|
-
* @param { undefined } payload Undefined unless you've defined a custom `getSnapshot` protocol.
|
|
791
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#getSnapshot Platform.getSnapshot}.
|
|
792
|
-
* @return { Promise<Snapshot> } Snapshot of current platform state.
|
|
793
|
-
*/
|
|
794
|
-
getSnapshot(payload: undefined, identity: OpenFin.Identity): Promise<OpenFin.Snapshot>;
|
|
795
|
-
|
|
796
|
-
/**
|
|
797
|
-
* Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
|
|
798
|
-
* Returns an array of windows with modified positions, such that any off-screen windows are positioned in the top left
|
|
799
|
-
* corner of the main monitor.
|
|
800
|
-
* @param { Snapshot } snapshot The snapshot to be applied.
|
|
801
|
-
* @param { WindowOptions[] } outOfBoundsWindows An array of WindowOptions for any windows that would be off-screen.
|
|
802
|
-
* @return { Promise<WindowOptions[]> } An array of WindowOptions with their position modified to fit on screen.
|
|
803
|
-
*/
|
|
804
|
-
positionOutOfBoundsWindows(
|
|
805
|
-
snapshot: OpenFin.Snapshot,
|
|
806
|
-
outOfBoundsWindows: OpenFin.WindowCreationOptions[]
|
|
807
|
-
): Promise<OpenFin.WindowCreationOptions[]>;
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
* Handles requests to apply a snapshot to the current Platform.
|
|
811
|
-
* @param { ApplySnapshotPayload } payload Payload containing the snapshot to be applied, as well as any options.
|
|
812
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#applySnapshot Platform.applySnapshot}.
|
|
813
|
-
* Undefined if called internally (e.g. when opening the initial snapshot).
|
|
814
|
-
* @return { Promise<void> }
|
|
815
|
-
*/
|
|
816
|
-
applySnapshot(payload: OpenFin.ApplySnapshotPayload, identity?: OpenFin.Identity): Promise<void>;
|
|
817
|
-
|
|
818
|
-
/**
|
|
819
|
-
* Closes the current Platform and all child windows and views.
|
|
820
|
-
* @param { undefined } payload Undefined unless you have implemented a custom quite protocol.
|
|
821
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#quit Platform.quit}.
|
|
822
|
-
* @return { Promise<void> }
|
|
823
|
-
*/
|
|
824
|
-
quit(payload: undefined, identity: OpenFin.Identity): Promise<void>;
|
|
825
|
-
|
|
826
|
-
/**
|
|
827
|
-
* Closes a view
|
|
828
|
-
* @param { CloseViewPayload } payload Specifies the `target` view to be closed.
|
|
829
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#closeView Platform.closeView}.
|
|
830
|
-
*/
|
|
831
|
-
closeView(payload: OpenFin.CloseViewPayload, identity?: OpenFin.Identity): Promise<any>;
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* Creates a new view and attaches it to a specified target window.
|
|
835
|
-
* @param { CreateViewPayload } payload Creation options for the new view.
|
|
836
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#createView Platform.createView}.
|
|
837
|
-
* @return { Promise<void> }
|
|
838
|
-
*/
|
|
839
|
-
createView(payload: OpenFin.CreateViewPayload, identity: OpenFin.Identity): Promise<OpenFin.View>;
|
|
840
|
-
|
|
841
|
-
/** Handles requests to fetch manifests in the current platform.
|
|
842
|
-
* @param { FetchManifestPayload } payload Payload containing the manifestUrl to be fetched.
|
|
843
|
-
* @param { Identity } callerIdentity If {@link Platform#fetchManifest Platform.fetchManifest}
|
|
844
|
-
* was called, the identity of the caller will be here.
|
|
845
|
-
* If `fetchManifest` was called internally, `callerIdentity` will be the provider's identity.
|
|
846
|
-
*/
|
|
847
|
-
fetchManifest(payload: OpenFin.FetchManifestPayload, callerIdentity: OpenFin.Identity): Promise<any>;
|
|
848
|
-
|
|
849
|
-
/**
|
|
850
|
-
* Replaces a Platform window's layout with a new layout. Any views that were in the old layout but not the new layout will be destroyed.
|
|
851
|
-
* @param { ReplaceLayoutPayload } payload Contains the `target` window and an `opts` object with a `layout` property to apply.
|
|
852
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#replaceLayout Platform.replaceLayout}.
|
|
853
|
-
* Undefined if `replaceLayout` is called internally (e.g. while applying a snapshot).
|
|
854
|
-
* @return { Promise<void> }
|
|
855
|
-
*/
|
|
856
|
-
replaceLayout(payload: OpenFin.ReplaceLayoutPayload, identity?: OpenFin.Identity): Promise<void>;
|
|
857
|
-
|
|
858
|
-
replaceView(payload: OpenFin.ReplaceViewPayload, identity?: OpenFin.Identity): Promise<void>;
|
|
859
|
-
|
|
860
|
-
launchIntoPlatform(payload: OpenFin.LaunchIntoPlatformPayload): Promise<void>;
|
|
861
|
-
|
|
862
|
-
/**
|
|
863
|
-
* Handles requests to set a window's context. `target` may be a window or a view.
|
|
864
|
-
* If it is a window, that window's `customContext` will be updated.
|
|
865
|
-
* If it is a view, the `customContext` of that view's current host window will be updated.
|
|
866
|
-
* @param { SetWindowContextPayload } payload Object containing the requested `context` update,
|
|
867
|
-
* the `target`'s identity, and the target's `entityType`.
|
|
868
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#setWindowContext Platform.setWindowContext}.
|
|
869
|
-
* Undefined if `setWindowContext` is called internally (e.g. while applying a snapshot).
|
|
870
|
-
* @return { Promise<any> } The new context.
|
|
871
|
-
*/
|
|
872
|
-
setWindowContext(payload: OpenFin.SetWindowContextPayload, identity?: OpenFin.Identity): Promise<any>;
|
|
873
|
-
|
|
874
|
-
/**
|
|
875
|
-
* Handles requests to get a window's context. `target` may be a window or a view.
|
|
876
|
-
* If it is a window, that window's `customContext` will be returned.
|
|
877
|
-
* If it is a view, the `customContext` of that view's current host window will be returned.
|
|
878
|
-
* @param { GetWindowContextPayload } payload Object containing the requested `context` update,
|
|
879
|
-
* the `target`'s identity, and the target's `entityType`.
|
|
880
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#getWindowContext Platform.getWindowContext}.
|
|
881
|
-
* Undefined when `getWindowContext` is called internally
|
|
882
|
-
* (e.g. when getting a window's context for the purpose of raising a "host-context-changed" event on a reparented view).
|
|
883
|
-
* @return { Promise<any> } The new context.
|
|
884
|
-
*/
|
|
885
|
-
getWindowContext(payload: OpenFin.GetWindowContextPayload, identity?: OpenFin.Identity): Promise<any>;
|
|
886
|
-
|
|
887
|
-
/**
|
|
888
|
-
* Called when a window's `customContext` is updated. Responsible for raising the `host-context-updated` event on that window's child views.
|
|
889
|
-
* @param { WindowOptionsChangedEvent<'window', 'options-changed'> } payload The event payload for the window whose context has changed.
|
|
890
|
-
* The new context will be contained as `payload.diff.customContext.newVal`.
|
|
891
|
-
* @return { Promise<HostContextChangedPayload> } The event that it raised.
|
|
892
|
-
*/
|
|
893
|
-
onWindowContextUpdated(
|
|
894
|
-
payload: import('./src/api/events/window').WindowOptionsChangedEvent<'window', 'options-changed'>
|
|
895
|
-
): Promise<OpenFin.HostContextChangedPayload | undefined>;
|
|
896
|
-
|
|
897
|
-
/**
|
|
898
|
-
* Closes a Window.
|
|
899
|
-
* By default it will fire any before unload handler set by a View in the Window.
|
|
900
|
-
* This can be disabled by setting skipBeforeUnload in the options object of the payload.
|
|
901
|
-
* This method is called by {@link Platform#closeWindow Platform.closeWindow}.
|
|
902
|
-
* @param {CloseWindowPayload} payload Object that contains the Window Identity and related options.
|
|
903
|
-
* @param {Identity} callerIdentity
|
|
904
|
-
* @returns {Promise<void>}
|
|
905
|
-
*/
|
|
906
|
-
closeWindow(payload: CloseWindowPayload, callerIdentity: Identity): Promise<void>;
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
* Gets all the Views attached to a Window that should close along with it. This is meant to be overridable
|
|
910
|
-
* in the case where you want to return other Views that may not be attached to the Window that is closing.
|
|
911
|
-
* @param winId Identity of the Window that is closing
|
|
912
|
-
* @returns { Promise<View> }
|
|
913
|
-
*/
|
|
914
|
-
getViewsForWindowClose(windowId: OpenFin.Identity): Promise<OpenFin.View[]>;
|
|
915
|
-
|
|
916
|
-
/**
|
|
917
|
-
* It takes in an array of Views and returns an object specifying which of them are trying to prevent an unload and which are not.
|
|
918
|
-
* @param {View[]} views Array of Views
|
|
919
|
-
* @returns { Promise<ViewStatuses> }
|
|
920
|
-
*/
|
|
921
|
-
checkViewsForPreventUnload(views: OpenFin.View[]): Promise<OpenFin.ViewStatuses>;
|
|
922
|
-
|
|
923
|
-
/**
|
|
924
|
-
* Handle the decision of whether a Window or specific View should close when trying to prevent an unload. This is meant to be overridden.
|
|
925
|
-
* Called in {@link PlatformProvider#closeWindow PlatformProvider.closeWindow}.
|
|
926
|
-
* Normally you would use this method to show a dialog indicating that there are Views that are trying to prevent an unload.
|
|
927
|
-
* By default it will always return all Views passed into it as meaning to close.
|
|
928
|
-
* @param {ViewsPreventingUnloadPayload} payload
|
|
929
|
-
* @tutorial PlatformProvider.getUserDecisionForBeforeUnload
|
|
930
|
-
* @returns {Promise<BeforeUnloadUserDecision>}
|
|
931
|
-
*/
|
|
932
|
-
getUserDecisionForBeforeUnload(
|
|
933
|
-
payload: OpenFin.ViewsPreventingUnloadPayload
|
|
934
|
-
): Promise<OpenFin.BeforeUnloadUserDecision>;
|
|
935
|
-
|
|
936
|
-
/**
|
|
937
|
-
* Handles the closing of a Window and/or its Views. Called in {@link PlatformProvider#closeWindow PlatformProvider.closeWindow}.
|
|
938
|
-
* The return of {@link PlatformProvider#getUserDecisionForBeforeUnload PlatformProvider.getUserDecisionForBeforeUnload} is passed into this method.
|
|
939
|
-
* @param {Identity} winId Identity of the Window
|
|
940
|
-
* @param {BeforeUnloadUserDecision} userDecision Decision object
|
|
941
|
-
* @returns {Promise<void>}
|
|
942
|
-
*/
|
|
943
|
-
handleViewsAndWindowClose(
|
|
944
|
-
windowId: OpenFin.Identity,
|
|
945
|
-
userDecision: OpenFin.BeforeUnloadUserDecision
|
|
946
|
-
): Promise<void>;
|
|
947
|
-
};
|
|
948
|
-
|
|
949
|
-
export type InitPlatformOptions = {
|
|
950
|
-
overrideCallback?: OverrideCallback<PlatformProvider>;
|
|
951
|
-
interopOverride?: OverrideCallback<InteropBroker>;
|
|
952
|
-
};
|
|
953
|
-
|
|
954
|
-
export type ProcessDetails = {
|
|
955
|
-
cpuUsage: number;
|
|
956
|
-
nonPagedPoolUsage: number;
|
|
957
|
-
pageFaultCount: number;
|
|
958
|
-
pagedPoolUsage: number;
|
|
959
|
-
pagefileUsage: number;
|
|
960
|
-
peakNonPagedPoolUsage: number;
|
|
961
|
-
peakPagedPoolUsage: number;
|
|
962
|
-
peakPagefileUsage: number;
|
|
963
|
-
peakWorkingSetSize: number;
|
|
964
|
-
workingSetSize: number;
|
|
965
|
-
privateSetSize: number;
|
|
966
|
-
pid: number;
|
|
967
|
-
};
|
|
968
|
-
|
|
969
|
-
export type FrameProcessDetails = ProcessDetails & {
|
|
970
|
-
url: string;
|
|
971
|
-
entityType: string;
|
|
972
|
-
};
|
|
973
|
-
|
|
974
|
-
export type EntityProcessDetails = FrameProcessDetails & {
|
|
975
|
-
name: string;
|
|
976
|
-
uuid: string;
|
|
977
|
-
iframes: FrameProcessDetails[];
|
|
978
|
-
};
|
|
979
|
-
|
|
980
|
-
export type AppProcessInfo = {
|
|
981
|
-
uuid: string;
|
|
982
|
-
entities: EntityProcessDetails[];
|
|
983
|
-
};
|
|
984
|
-
|
|
985
|
-
export type NonAppProcessDetails = ProcessDetails & {
|
|
986
|
-
name: string;
|
|
987
|
-
};
|
|
988
|
-
|
|
989
|
-
export type SystemProcessInfo = {
|
|
990
|
-
apps: AppProcessInfo[];
|
|
991
|
-
browserProcess: NonAppProcessDetails;
|
|
992
|
-
nonApps: NonAppProcessDetails[];
|
|
993
|
-
};
|
|
994
|
-
|
|
995
|
-
export type ClearCacheOption = {
|
|
996
|
-
appcache?: boolean;
|
|
997
|
-
cache?: boolean;
|
|
998
|
-
cookies?: boolean;
|
|
999
|
-
localStorage?: boolean;
|
|
1000
|
-
};
|
|
1001
|
-
|
|
1002
|
-
export type CookieInfo = {
|
|
1003
|
-
name: string;
|
|
1004
|
-
// expirationDate: Date;
|
|
1005
|
-
domain: string;
|
|
1006
|
-
path: string;
|
|
1007
|
-
};
|
|
1008
|
-
|
|
1009
|
-
export type CookieOption = {
|
|
1010
|
-
name: string;
|
|
1011
|
-
};
|
|
1012
|
-
|
|
1013
|
-
export type CrashReporterOptions = {
|
|
1014
|
-
diagnosticsMode: boolean;
|
|
1015
|
-
};
|
|
1016
|
-
|
|
1017
|
-
export type CrashReporterState = CrashReporterOptions & {
|
|
1018
|
-
isRunning: boolean;
|
|
1019
|
-
diagnosticMode: boolean;
|
|
1020
|
-
};
|
|
1021
|
-
|
|
1022
|
-
export type Time = {
|
|
1023
|
-
user: number;
|
|
1024
|
-
nice: number;
|
|
1025
|
-
sys: number;
|
|
1026
|
-
idle: number;
|
|
1027
|
-
irq: number;
|
|
1028
|
-
};
|
|
1029
|
-
|
|
1030
|
-
export type CpuInfo = {
|
|
1031
|
-
model: string;
|
|
1032
|
-
speed: number;
|
|
1033
|
-
times: Time;
|
|
1034
|
-
};
|
|
1035
|
-
|
|
1036
|
-
export type GpuInfo = {
|
|
1037
|
-
name: string;
|
|
1038
|
-
};
|
|
1039
|
-
|
|
1040
|
-
export type HostSpecs = {
|
|
1041
|
-
aeroGlassEnabled?: boolean;
|
|
1042
|
-
arch: string;
|
|
1043
|
-
cpus: CpuInfo[];
|
|
1044
|
-
gpu: GpuInfo;
|
|
1045
|
-
memory: number;
|
|
1046
|
-
name: string;
|
|
1047
|
-
screenSaver?: boolean;
|
|
1048
|
-
};
|
|
1049
|
-
|
|
1050
|
-
export type PrinterInfo = {
|
|
1051
|
-
name: string;
|
|
1052
|
-
description: string;
|
|
1053
|
-
status: number;
|
|
1054
|
-
isDefault: boolean;
|
|
1055
|
-
};
|
|
1056
|
-
|
|
1057
|
-
export type Dpi = {
|
|
1058
|
-
horizontal?: number;
|
|
1059
|
-
vertical?: number;
|
|
1060
|
-
};
|
|
1061
|
-
|
|
1062
|
-
export type Margins = {
|
|
1063
|
-
marginType?: 'default' | 'none' | 'printableArea' | 'custom';
|
|
1064
|
-
top?: number;
|
|
1065
|
-
bottom?: number;
|
|
1066
|
-
left?: number;
|
|
1067
|
-
right?: number;
|
|
1068
|
-
};
|
|
1069
|
-
|
|
1070
|
-
export type PrintOptions = {
|
|
1071
|
-
silent?: boolean;
|
|
1072
|
-
printBackground?: boolean;
|
|
1073
|
-
deviceName?: string;
|
|
1074
|
-
color?: boolean;
|
|
1075
|
-
margins?: Margins;
|
|
1076
|
-
landscape?: boolean;
|
|
1077
|
-
scaleFactor?: number;
|
|
1078
|
-
pagesPerSheet?: number;
|
|
1079
|
-
collate?: boolean;
|
|
1080
|
-
copies?: number;
|
|
1081
|
-
pageRanges?: Record<string, number>;
|
|
1082
|
-
duplexMode?: 'simplex' | 'shortEdge' | 'longEdge';
|
|
1083
|
-
dpi?: Dpi;
|
|
1084
|
-
};
|
|
1085
|
-
export type WriteRequestType = {
|
|
1086
|
-
data: string;
|
|
1087
|
-
type?: string;
|
|
1088
|
-
};
|
|
1089
|
-
|
|
1090
|
-
export type WriteAnyRequestType = {
|
|
1091
|
-
data: {
|
|
1092
|
-
text?: string;
|
|
1093
|
-
html?: string;
|
|
1094
|
-
rtf?: string;
|
|
1095
|
-
};
|
|
1096
|
-
type?: string;
|
|
1097
|
-
};
|
|
1098
|
-
|
|
1099
|
-
export type SubscriptionOptions = {
|
|
1100
|
-
timestamp?: number;
|
|
1101
|
-
};
|
|
1102
|
-
|
|
1103
|
-
export type SharedWorkerInfo = {
|
|
1104
|
-
id: string;
|
|
1105
|
-
url: string;
|
|
1106
|
-
};
|
|
1107
|
-
|
|
1108
|
-
export type ServiceIdentifier = {
|
|
1109
|
-
name: string;
|
|
1110
|
-
};
|
|
1111
|
-
|
|
1112
|
-
export type ServiceConfiguration = {
|
|
1113
|
-
config: object;
|
|
1114
|
-
name: string;
|
|
1115
|
-
};
|
|
1116
|
-
|
|
1117
|
-
export type RVMInfo = {
|
|
1118
|
-
'action': string;
|
|
1119
|
-
'appLogDirectory': string;
|
|
1120
|
-
'path': string;
|
|
1121
|
-
'start-time': string;
|
|
1122
|
-
'version': string;
|
|
1123
|
-
'working-dir': string;
|
|
1124
|
-
};
|
|
1125
|
-
|
|
1126
|
-
export type RvmLaunchOptions = {
|
|
1127
|
-
noUi?: boolean;
|
|
1128
|
-
userAppConfigArgs?: object;
|
|
1129
|
-
timeToLive?: number;
|
|
1130
|
-
};
|
|
1131
|
-
|
|
1132
|
-
export type ShortCutConfig = {
|
|
1133
|
-
desktop?: boolean;
|
|
1134
|
-
startMenu?: boolean;
|
|
1135
|
-
systemStartup?: boolean;
|
|
1136
|
-
};
|
|
1137
|
-
|
|
1138
|
-
export type TerminateExternalRequestType = {
|
|
1139
|
-
uuid: string;
|
|
1140
|
-
timeout: number;
|
|
1141
|
-
killTree: boolean;
|
|
1142
|
-
};
|
|
1143
|
-
|
|
1144
|
-
export type TrayInfo = {
|
|
1145
|
-
bounds: OpenFin.Rectangle;
|
|
1146
|
-
monitorInfo: OpenFin.MonitorInfo;
|
|
1147
|
-
x: number;
|
|
1148
|
-
y: number;
|
|
1149
|
-
};
|
|
1150
|
-
|
|
1151
|
-
export type Transition = {
|
|
1152
|
-
opacity?: Opacity;
|
|
1153
|
-
position?: Position;
|
|
1154
|
-
size?: Size;
|
|
1155
|
-
};
|
|
1156
|
-
|
|
1157
|
-
export type Size = TransitionBase & {
|
|
1158
|
-
width: number;
|
|
1159
|
-
height: number;
|
|
1160
|
-
};
|
|
1161
|
-
|
|
1162
|
-
export type Opacity = TransitionBase & {
|
|
1163
|
-
opacity: number;
|
|
1164
|
-
};
|
|
1165
|
-
|
|
1166
|
-
export type TransitionBase = {
|
|
1167
|
-
duration: number;
|
|
1168
|
-
relative?: boolean;
|
|
1169
|
-
};
|
|
1170
|
-
|
|
1171
|
-
export type Position = TransitionBase & {
|
|
1172
|
-
left: number;
|
|
1173
|
-
top: number;
|
|
1174
|
-
};
|
|
1175
|
-
|
|
1176
|
-
export type AnchorType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
1177
|
-
|
|
1178
|
-
export type TransitionOptions = {
|
|
1179
|
-
interrupt: boolean;
|
|
1180
|
-
tween?: tween;
|
|
1181
|
-
};
|
|
1182
|
-
|
|
1183
|
-
type tween =
|
|
1184
|
-
| 'linear'
|
|
1185
|
-
| 'ease-in'
|
|
1186
|
-
| 'ease-out'
|
|
1187
|
-
| 'ease-in-out'
|
|
1188
|
-
| 'ease-in-quad'
|
|
1189
|
-
| 'ease-out-quad'
|
|
1190
|
-
| 'ease-in-out-quad'
|
|
1191
|
-
| 'ease-in-cubic'
|
|
1192
|
-
| 'ease-out-cubic'
|
|
1193
|
-
| 'ease-in-out-cubic'
|
|
1194
|
-
| 'ease-out-bounce'
|
|
1195
|
-
| 'ease-in-back'
|
|
1196
|
-
| 'ease-out-back'
|
|
1197
|
-
| 'ease-in-out-back'
|
|
1198
|
-
| 'ease-in-elastic'
|
|
1199
|
-
| 'ease-out-elastic'
|
|
1200
|
-
| 'ease-in-out-elastic';
|
|
1201
|
-
|
|
1202
|
-
export type FindInPageOptions = {
|
|
1203
|
-
forward?: boolean;
|
|
1204
|
-
findNext?: boolean;
|
|
1205
|
-
matchCase?: boolean;
|
|
1206
|
-
wordStart?: boolean;
|
|
1207
|
-
medialCapitalAsWordStart?: boolean;
|
|
1208
|
-
};
|
|
1209
|
-
|
|
1210
|
-
export type FrameInfo = {
|
|
1211
|
-
name: string;
|
|
1212
|
-
uuid: string;
|
|
1213
|
-
entityType: EntityType;
|
|
1214
|
-
parent: Identity;
|
|
1215
|
-
};
|
|
1216
|
-
|
|
1217
|
-
export type ExternalApplicationInfo = {
|
|
1218
|
-
parent: Identity;
|
|
1219
|
-
};
|
|
1220
|
-
|
|
1221
|
-
export type ExternalConnection = {
|
|
1222
|
-
token: string;
|
|
1223
|
-
uuid: string;
|
|
1224
|
-
};
|
|
1225
|
-
|
|
1226
|
-
export type ExternalProcessRequestType = {
|
|
1227
|
-
path?: string;
|
|
1228
|
-
alias?: string;
|
|
1229
|
-
arguments?: string;
|
|
1230
|
-
listener?: LaunchExternalProcessListener;
|
|
1231
|
-
lifetime?: string;
|
|
1232
|
-
certificate?: CertificationInfo;
|
|
1233
|
-
uuid?: string;
|
|
1234
|
-
initialWindowState?: string;
|
|
1235
|
-
cwd?: string;
|
|
1236
|
-
};
|
|
1237
|
-
|
|
1238
|
-
export type CertificationInfo = {
|
|
1239
|
-
serial?: string;
|
|
1240
|
-
subject?: string;
|
|
1241
|
-
publickey?: string;
|
|
1242
|
-
thumbprint?: string;
|
|
1243
|
-
trusted?: boolean;
|
|
1244
|
-
};
|
|
1245
|
-
|
|
1246
|
-
export type ExitCode = {
|
|
1247
|
-
topic: string;
|
|
1248
|
-
uuid: string;
|
|
1249
|
-
exitCode: number;
|
|
1250
|
-
};
|
|
1251
|
-
|
|
1252
|
-
export type LaunchExternalProcessListener = {
|
|
1253
|
-
(code: ExitCode): void;
|
|
1254
|
-
};
|
|
1255
|
-
|
|
1256
|
-
export type ExternalProcessInfo = {
|
|
1257
|
-
pid: number;
|
|
1258
|
-
listener?: LaunchExternalProcessListener;
|
|
1259
|
-
};
|
|
1260
|
-
|
|
1261
|
-
export type AppAssetInfo = {
|
|
1262
|
-
src: string;
|
|
1263
|
-
alias: string;
|
|
1264
|
-
version: string;
|
|
1265
|
-
target?: string;
|
|
1266
|
-
args?: string;
|
|
1267
|
-
mandatory?: boolean;
|
|
1268
|
-
};
|
|
1269
|
-
|
|
1270
|
-
export type RuntimeDownloadOptions = {
|
|
1271
|
-
version: string;
|
|
1272
|
-
};
|
|
1273
|
-
|
|
1274
|
-
export type AppAssetRequest = {
|
|
1275
|
-
alias: string;
|
|
1276
|
-
};
|
|
1277
|
-
|
|
1278
|
-
export type RuntimeDownloadProgress = {
|
|
1279
|
-
downloadedBytes: number;
|
|
1280
|
-
totalBytes: number;
|
|
1281
|
-
};
|
|
1282
|
-
|
|
1283
|
-
export type CertifiedAppInfo = {
|
|
1284
|
-
isRunning: boolean;
|
|
1285
|
-
isOptedIntoCertfiedApp?: boolean;
|
|
1286
|
-
isCertified?: boolean;
|
|
1287
|
-
isSSLCertified?: boolean;
|
|
1288
|
-
isPresentInAppDirectory?: boolean;
|
|
1289
|
-
};
|
|
1290
|
-
export type JumpListCategory = {
|
|
1291
|
-
name?: string;
|
|
1292
|
-
items: Array<JumpListTask | JumpListSeparator>;
|
|
1293
|
-
};
|
|
1294
|
-
|
|
1295
|
-
export type JumpListItem = JumpListTask | JumpListSeparator;
|
|
1296
|
-
|
|
1297
|
-
export type JumpListTask = {
|
|
1298
|
-
type: 'task';
|
|
1299
|
-
title: string;
|
|
1300
|
-
description: string;
|
|
1301
|
-
deepLink: string;
|
|
1302
|
-
iconPath?: string;
|
|
1303
|
-
iconIndex?: number;
|
|
1304
|
-
};
|
|
1305
|
-
|
|
1306
|
-
export type JumpListSeparator = {
|
|
1307
|
-
type: 'separator';
|
|
1308
|
-
};
|
|
1309
|
-
|
|
1310
|
-
export type ApplicationInfo = {
|
|
1311
|
-
initialOptions: OpenFin.ApplicationCreationOptions;
|
|
1312
|
-
launchMode: string;
|
|
1313
|
-
manifest: OpenFin.Manifest & { [key: string]: any };
|
|
1314
|
-
manifestUrl: string;
|
|
1315
|
-
parentUuid?: string;
|
|
1316
|
-
runtime: { version: string };
|
|
1317
|
-
};
|
|
1318
|
-
|
|
1319
|
-
export type ManifestInfo = {
|
|
1320
|
-
uuid: string;
|
|
1321
|
-
manifestUrl: string;
|
|
1322
|
-
};
|
|
1323
|
-
|
|
1324
|
-
export type ClickedMenuResult = {
|
|
1325
|
-
result: 'clicked';
|
|
1326
|
-
data: any;
|
|
1327
|
-
};
|
|
1328
|
-
|
|
1329
|
-
export type ClosedMenuResult = {
|
|
1330
|
-
result: 'closed';
|
|
1331
|
-
};
|
|
1332
|
-
|
|
1333
|
-
export type MenuResult = ClickedMenuResult | ClosedMenuResult;
|
|
1334
|
-
|
|
1335
|
-
export type ShowPopupMenuOptions = {
|
|
1336
|
-
template: MenuItemTemplate[];
|
|
1337
|
-
x?: number;
|
|
1338
|
-
y?: number;
|
|
1339
|
-
};
|
|
1340
|
-
export type MenuItemTemplate = {
|
|
1341
|
-
/**
|
|
1342
|
-
* Can be `normal`, `separator`, `submenu`, or `checkbox`.
|
|
1343
|
-
* Defaults to 'normal' unless a 'submenu' key exists
|
|
1344
|
-
*/
|
|
1345
|
-
type?: 'normal' | 'separator' | 'submenu' | 'checkbox';
|
|
1346
|
-
role?: 'cut' | 'copy' | 'paste' | 'toggleDevTools' | 'reload';
|
|
1347
|
-
label?: string;
|
|
1348
|
-
/**
|
|
1349
|
-
* If false, the menu item will be greyed out and unclickable.
|
|
1350
|
-
*/
|
|
1351
|
-
enabled?: boolean;
|
|
1352
|
-
|
|
1353
|
-
/**
|
|
1354
|
-
* If false, the menu item will be entirely hidden.
|
|
1355
|
-
*/
|
|
1356
|
-
visible?: boolean;
|
|
1357
|
-
/**
|
|
1358
|
-
* Should only be specified for `checkbox` type menu items.
|
|
1359
|
-
*/
|
|
1360
|
-
checked?: boolean;
|
|
1361
|
-
|
|
1362
|
-
/**
|
|
1363
|
-
* Should be specified for `submenu` type menu items. If `submenu` is specified,
|
|
1364
|
-
* the `type: 'submenu'` can be omitted.
|
|
1365
|
-
*/
|
|
1366
|
-
submenu?: MenuItemTemplate[];
|
|
1367
|
-
|
|
1368
|
-
/**
|
|
1369
|
-
* Data to be returned if the user selects the element. Must be serializable
|
|
1370
|
-
*/
|
|
1371
|
-
data?: any;
|
|
1372
|
-
|
|
1373
|
-
/**
|
|
1374
|
-
* Image Data URI with image dimensions inferred from the encoded string
|
|
1375
|
-
*/
|
|
1376
|
-
icon?: string;
|
|
1377
|
-
};
|
|
1378
|
-
|
|
1379
|
-
export type NativeWindowIntegrationProviderAuthorization = {
|
|
1380
|
-
authorizedUuid: string;
|
|
1381
|
-
};
|
|
1382
|
-
|
|
1383
|
-
export type RuntimeInfo = {
|
|
1384
|
-
architecture: string;
|
|
1385
|
-
manifestUrl: string;
|
|
1386
|
-
port: number;
|
|
1387
|
-
securityRealm?: string;
|
|
1388
|
-
version: string;
|
|
1389
|
-
args: object;
|
|
1390
|
-
chromeVersion: string;
|
|
1391
|
-
electronVersion: string;
|
|
1392
|
-
devtoolsPort?: number;
|
|
1393
|
-
};
|
|
1394
|
-
|
|
1395
|
-
export type DefaultDomainSettings = {
|
|
1396
|
-
rules: DefaultDomainSettingsRule[];
|
|
1397
|
-
};
|
|
1398
|
-
|
|
1399
|
-
export type DefaultDomainSettingsRule = {
|
|
1400
|
-
// match pattern is a domain based string type
|
|
1401
|
-
match: string[];
|
|
1402
|
-
options: {
|
|
1403
|
-
downloadSettings: FileDownloadSettings;
|
|
1404
|
-
};
|
|
1405
|
-
};
|
|
1406
|
-
|
|
1407
|
-
export type FileDownloadBehaviorNames = 'prompt' | 'no-prompt' | 'block';
|
|
1408
|
-
|
|
1409
|
-
export type FileDownloadSettings = {
|
|
1410
|
-
rules: DownloadRule[];
|
|
1411
|
-
};
|
|
1412
|
-
|
|
1413
|
-
export type DownloadRule = {
|
|
1414
|
-
behavior: FileDownloadBehaviorNames;
|
|
1415
|
-
// match pattern is a string type
|
|
1416
|
-
match: string[];
|
|
1417
|
-
};
|
|
1418
|
-
|
|
1419
|
-
export type ContextHandler = (context: OpenFin.Context) => void;
|
|
1420
|
-
|
|
1421
|
-
export type Intent<MetadataType = IntentMetadata> = {
|
|
1422
|
-
name: string;
|
|
1423
|
-
context: Context;
|
|
1424
|
-
metadata?: MetadataType;
|
|
1425
|
-
};
|
|
1426
|
-
|
|
1427
|
-
export type IntentMetadata<TargetType = any> = {
|
|
1428
|
-
target?: TargetType;
|
|
1429
|
-
resultType?: string;
|
|
1430
|
-
intentResolutionResultId?: string;
|
|
1431
|
-
};
|
|
1432
|
-
|
|
1433
|
-
export type IntentHandler = (intent: OpenFin.Intent) => void;
|
|
1434
|
-
|
|
1435
|
-
export type ContentCreationBehaviorNames = 'window' | 'view' | 'block' | 'browser';
|
|
1436
|
-
|
|
1437
|
-
type MatchPattern = string;
|
|
1438
|
-
export type ContentCreationRule<T = ContentCreationBehaviorNames> = {
|
|
1439
|
-
behavior: T;
|
|
1440
|
-
match: MatchPattern[];
|
|
1441
|
-
options?: T extends 'window' ? Partial<WindowOptions> : T extends 'view' ? Partial<OpenFin.ViewOptions> : never;
|
|
1442
|
-
};
|
|
1443
|
-
|
|
1444
|
-
export type ContentCreationOptions = {
|
|
1445
|
-
rules: ContentCreationRule[];
|
|
1446
|
-
};
|
|
1447
|
-
export type SnapshotProvider<T> = {
|
|
1448
|
-
getSnapshot: () => Promise<T>;
|
|
1449
|
-
applySnapshot: (snapshot: T) => Promise<void>;
|
|
1450
|
-
};
|
|
1451
|
-
|
|
1452
|
-
export type QueryPermissionResult = {
|
|
1453
|
-
permission: string;
|
|
1454
|
-
state: PermissionState;
|
|
1455
|
-
granted: boolean;
|
|
1456
|
-
rawValue?: unknown;
|
|
1457
|
-
};
|
|
1458
|
-
|
|
1459
|
-
export type SessionContextGroup = {
|
|
1460
|
-
id: string;
|
|
1461
|
-
setContext: (context: OpenFin.Context) => Promise<void>;
|
|
1462
|
-
getCurrentContext: (type?: string) => Promise<OpenFin.Context>;
|
|
1463
|
-
addContextHandler: (
|
|
1464
|
-
handler: OpenFin.ContextHandler,
|
|
1465
|
-
contextType?: string
|
|
1466
|
-
) => Promise<{ unsubscribe: () => void }>;
|
|
1467
|
-
};
|
|
1468
|
-
|
|
1469
|
-
export type MessagingProtocols = import('./src/api/interappbus/channel/protocols/index').MessagingProtocols;
|
|
1470
|
-
|
|
1471
|
-
export type ChannelCreateOptions = {
|
|
1472
|
-
protocols?: MessagingProtocols[];
|
|
1473
|
-
};
|
|
1474
|
-
|
|
1475
|
-
export type ChannelConnectOptions = ChannelCreateOptions & {
|
|
1476
|
-
wait?: boolean;
|
|
1477
|
-
payload?: any;
|
|
1478
|
-
};
|
|
1479
|
-
|
|
1480
|
-
export type ContextForIntent<MetadataType = any> = Context & {
|
|
1481
|
-
metadata?: MetadataType;
|
|
1482
|
-
};
|
|
1483
|
-
|
|
1484
|
-
export type InfoForIntentOptions<MetadataType = IntentMetadata> = {
|
|
1485
|
-
name: string;
|
|
1486
|
-
context?: OpenFin.Context;
|
|
1487
|
-
metadata?: MetadataType;
|
|
1488
|
-
};
|
|
1489
|
-
|
|
1490
|
-
export type FindIntentsByContextOptions<MetadataType = IntentMetadata> = {
|
|
1491
|
-
context: OpenFin.Context;
|
|
1492
|
-
metadata?: MetadataType;
|
|
1493
|
-
};
|
|
1494
|
-
|
|
1495
|
-
export type ProviderIdentity = Identity & {
|
|
1496
|
-
channelId: string;
|
|
1497
|
-
channelName: string;
|
|
1498
|
-
};
|
|
1499
|
-
|
|
1500
|
-
export type RegisterUsageData = {
|
|
1501
|
-
data: unknown;
|
|
1502
|
-
type: string;
|
|
1503
|
-
};
|
|
1504
|
-
|
|
1505
|
-
export interface ViewsPreventingUnloadPayload {
|
|
1506
|
-
windowShouldClose: boolean;
|
|
1507
|
-
windowId: OpenFin.Identity;
|
|
1508
|
-
viewsPreventingUnload: OpenFin.Identity[];
|
|
1509
|
-
viewsNotPreventingUnload: OpenFin.Identity[];
|
|
1510
|
-
closeType: 'view' | 'window';
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
export interface BeforeUnloadUserDecision {
|
|
1514
|
-
windowShouldClose: boolean;
|
|
1515
|
-
viewsToClose: OpenFin.Identity[];
|
|
1516
|
-
}
|
|
1517
|
-
|
|
1518
|
-
export interface ViewStatuses {
|
|
1519
|
-
viewsPreventingUnload: OpenFin.Identity[];
|
|
1520
|
-
viewsNotPreventingUnload: OpenFin.Identity[];
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
export interface CloseWindowPayload {
|
|
1524
|
-
windowId: Identity;
|
|
1525
|
-
options: {
|
|
1526
|
-
skipBeforeUnload?: boolean;
|
|
1527
|
-
};
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
|
-
export type ProxyInfo = {
|
|
1531
|
-
config: ProxyConfig;
|
|
1532
|
-
system: ProxySystemInfo;
|
|
1533
|
-
};
|
|
1534
|
-
|
|
1535
|
-
export type ProxyConfig = {
|
|
1536
|
-
proxyAddress: string;
|
|
1537
|
-
proxyPort: number;
|
|
1538
|
-
type: string;
|
|
1539
|
-
};
|
|
1540
|
-
|
|
1541
|
-
export type ProxySystemInfo = {
|
|
1542
|
-
autoConfigUrl: string;
|
|
1543
|
-
bypass: string;
|
|
1544
|
-
enabled: boolean;
|
|
1545
|
-
proxy: string;
|
|
1546
|
-
};
|
|
1547
|
-
|
|
1548
|
-
export type ChannelAction = (payload: unknown, id: ProviderIdentity | OpenFin.ClientIdentity) => unknown;
|
|
1549
|
-
|
|
1550
|
-
export type ChannelMiddleware = (
|
|
1551
|
-
topic: string,
|
|
1552
|
-
payload: unknown,
|
|
1553
|
-
senderIdentity: ProviderIdentity | OpenFin.ClientIdentity
|
|
1554
|
-
) => Promise<unknown> |unknown;
|
|
1555
|
-
|
|
1556
|
-
export type ErrorMiddleware = (
|
|
1557
|
-
topic: string,
|
|
1558
|
-
error: Error,
|
|
1559
|
-
id: ProviderIdentity | OpenFin.ClientIdentity
|
|
1560
|
-
) => unknown;
|
|
1561
|
-
|
|
1562
|
-
export type ApplicationState = {
|
|
1563
|
-
isPlatform: boolean;
|
|
1564
|
-
isRunning: boolean;
|
|
1565
|
-
uuid: string;
|
|
1566
|
-
parentUuid?: string;
|
|
1567
|
-
};
|
|
1568
|
-
|
|
1569
|
-
export type InstalledApps = {
|
|
1570
|
-
[key: string]: InstallationInfo;
|
|
1571
|
-
};
|
|
1572
|
-
|
|
1573
|
-
export type InstallationInfo = {
|
|
1574
|
-
cachedManifest: any;
|
|
1575
|
-
};
|
|
1576
|
-
|
|
1577
|
-
export type GetLogRequestType = {
|
|
1578
|
-
name: string;
|
|
1579
|
-
endFile?: string;
|
|
1580
|
-
sizeLimit?: number;
|
|
1581
|
-
};
|
|
1582
|
-
|
|
1583
|
-
export type LogInfo = {
|
|
1584
|
-
name: string;
|
|
1585
|
-
size: number;
|
|
1586
|
-
date: string;
|
|
1587
|
-
};
|
|
1588
|
-
|
|
1589
|
-
export type SendApplicationLogResponse = {
|
|
1590
|
-
logId: string;
|
|
1591
|
-
};
|
|
1592
|
-
|
|
1593
|
-
// 2.4 supports string enum types, currently we use 2.2
|
|
1594
|
-
export type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
1595
|
-
|
|
1596
|
-
export type PermissionState = 'granted' | 'denied' | 'unavailable';
|
|
1597
|
-
|
|
1598
|
-
export type RegistryInfo = {
|
|
1599
|
-
data: any;
|
|
1600
|
-
rootKey: string;
|
|
1601
|
-
subkey: string;
|
|
1602
|
-
type: string;
|
|
1603
|
-
value: string;
|
|
1604
|
-
};
|
|
1605
|
-
|
|
1606
|
-
export type ApplicationType = {
|
|
1607
|
-
type: 'application' | 'external-app';
|
|
1608
|
-
uuid: string;
|
|
1609
|
-
};
|
|
1610
|
-
|
|
1611
|
-
export type WindowInfo = {
|
|
1612
|
-
canNavigateBack: boolean;
|
|
1613
|
-
canNavigateForward: boolean;
|
|
1614
|
-
preloadScripts: Array<any>;
|
|
1615
|
-
title: string;
|
|
1616
|
-
url: string;
|
|
1617
|
-
};
|
|
1618
|
-
|
|
1619
|
-
export type ApplicationWindowInfo = {
|
|
1620
|
-
childWindows: Array<WindowDetail>;
|
|
1621
|
-
mainWindow: WindowDetail;
|
|
1622
|
-
uuid: string;
|
|
1623
|
-
};
|
|
1624
|
-
|
|
1625
|
-
export type WindowDetail = {
|
|
1626
|
-
bottom: number;
|
|
1627
|
-
height: number;
|
|
1628
|
-
isShowing: boolean;
|
|
1629
|
-
left: number;
|
|
1630
|
-
name: string;
|
|
1631
|
-
right: number;
|
|
1632
|
-
state: string;
|
|
1633
|
-
top: number;
|
|
1634
|
-
width: number;
|
|
1635
|
-
};
|
|
1636
|
-
|
|
1637
|
-
export type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
|
|
1638
|
-
|
|
1639
|
-
export type InitLayoutOptions = {
|
|
1640
|
-
containerId?: string;
|
|
1641
|
-
};
|
|
1642
|
-
|
|
1643
|
-
export type PresetLayoutOptions = {
|
|
1644
|
-
presetType: LayoutPresetType;
|
|
1645
|
-
};
|
|
1646
|
-
|
|
1647
|
-
export type ResultBehavior = 'close' | 'hide' | 'none';
|
|
1648
|
-
export type PopupBaseBehavior = 'close' | 'hide';
|
|
1649
|
-
|
|
1650
|
-
export type PopupResultBehavior = 'none' | PopupBaseBehavior;
|
|
1651
|
-
|
|
1652
|
-
export type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
|
|
1653
|
-
|
|
1654
|
-
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
1655
|
-
export interface PopupOptions {
|
|
1656
|
-
initialOptions?: Optional<OpenFin.WindowCreationOptions, 'name'>;
|
|
1657
|
-
additionalOptions?: OpenFin.UpdatableWindowOptions;
|
|
1658
|
-
name?: string;
|
|
1659
|
-
url?: string;
|
|
1660
|
-
height?: number;
|
|
1661
|
-
width?: number;
|
|
1662
|
-
x?: number;
|
|
1663
|
-
y?: number;
|
|
1664
|
-
blurBehavior?: PopupBlurBehavior;
|
|
1665
|
-
resultDispatchBehavior?: PopupResultBehavior;
|
|
1666
|
-
hideOnClose?: boolean;
|
|
1667
|
-
focus?: boolean;
|
|
1668
|
-
onPopupReady?: (popupWindow: OpenFin.Window) => any;
|
|
1669
|
-
onPopupResult?: (payload: PopupResult) => any;
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
export type PopupInteraction = 'clicked' | 'dismissed';
|
|
1673
|
-
|
|
1674
|
-
export interface PopupResult<T = any> {
|
|
1675
|
-
identity: {
|
|
1676
|
-
name: string;
|
|
1677
|
-
uuid: string;
|
|
1678
|
-
};
|
|
1679
|
-
result: PopupInteraction;
|
|
1680
|
-
data?: T;
|
|
1681
|
-
lastDispatchResult?: PopupResult;
|
|
1682
|
-
}
|
|
1683
|
-
|
|
1684
|
-
export type SystemEvents = import('./src/api/events/system').SystemEvents;
|
|
1685
|
-
|
|
1686
|
-
export type ApplicationEvents = import('./src/api/events/application').ApplicationEvents;
|
|
1687
|
-
|
|
1688
|
-
export type WindowEvents = import('./src/api/events/window').WindowEvents;
|
|
1689
|
-
|
|
1690
|
-
export type ViewEvents = import('./src/api/events/view').ViewEvents;
|
|
1691
|
-
|
|
1692
|
-
export type GlobalHotkeyEvents = import('./src/api/events/globalHotkey').GlobalHotkeyEvents;
|
|
1693
|
-
|
|
1694
|
-
export type FrameEvents = import('./src/api/events/frame').FrameEvents;
|
|
1695
|
-
|
|
1696
|
-
export type PlatformEvents = import('./src/api/events/platform').PlatformEvents;
|
|
1697
|
-
|
|
1698
|
-
export type ExternalApplicationEvents = import('./src/api/events/externalApplication').ExternalApplicationEvents;
|
|
1699
|
-
|
|
1700
|
-
export type ContextMenuOptions = {
|
|
1701
|
-
template?: Array<PrebuiltContextMenuItem>;
|
|
1702
|
-
enabled?: boolean;
|
|
1703
|
-
};
|
|
1704
|
-
|
|
1705
|
-
export type PrebuiltContextMenuItem =
|
|
1706
|
-
| 'separator'
|
|
1707
|
-
| 'undo'
|
|
1708
|
-
| 'redo'
|
|
1709
|
-
| 'cut'
|
|
1710
|
-
| 'copy'
|
|
1711
|
-
| 'paste'
|
|
1712
|
-
| 'selectAll'
|
|
1713
|
-
| 'spellCheck'
|
|
1714
|
-
| 'inspect'
|
|
1715
|
-
| 'reload'
|
|
1716
|
-
| 'navigateForward'
|
|
1717
|
-
| 'navigateBack'
|
|
1718
|
-
| 'print';
|
|
1719
|
-
|
|
1720
|
-
export type InteropBrokerDisconnectionEvent = {
|
|
1721
|
-
type: string;
|
|
1722
|
-
topic: string;
|
|
1723
|
-
brokerName: string;
|
|
1724
|
-
};
|
|
1725
|
-
|
|
1726
|
-
export type InteropClientOnDisconnectionListener = (
|
|
1727
|
-
InteropBrokerDisconnectionEvent: InteropBrokerDisconnectionEvent
|
|
1728
|
-
) => any;
|
|
1729
|
-
}
|
|
1
|
+
/// <reference path="./src/GlobalOpenFin.d.ts"/>
|