@openfin/core 33.76.31 → 33.76.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/openfin-core-33.76.36.tgz +0 -0
  2. package/package.json +1 -1
  3. package/src/OpenFin.d.ts +27 -16
  4. package/src/api/application/Factory.d.ts +148 -100
  5. package/src/api/application/Factory.js +148 -100
  6. package/src/api/application/Instance.d.ts +477 -106
  7. package/src/api/application/Instance.js +474 -106
  8. package/src/api/application/index.d.ts +9 -0
  9. package/src/api/application/index.js +9 -0
  10. package/src/api/base.d.ts +69 -0
  11. package/src/api/base.js +69 -0
  12. package/src/api/clipboard/index.d.ts +111 -31
  13. package/src/api/clipboard/index.js +111 -31
  14. package/src/api/events/application.d.ts +12 -0
  15. package/src/api/events/application.js +12 -0
  16. package/src/api/events/channel.d.ts +5 -0
  17. package/src/api/events/channel.js +5 -0
  18. package/src/api/events/externalApplication.d.ts +5 -0
  19. package/src/api/events/externalApplication.js +5 -0
  20. package/src/api/events/frame.d.ts +5 -0
  21. package/src/api/events/globalHotkey.d.ts +5 -0
  22. package/src/api/events/platform.d.ts +9 -1
  23. package/src/api/events/platform.js +8 -0
  24. package/src/api/events/system.d.ts +13 -0
  25. package/src/api/events/system.js +13 -0
  26. package/src/api/events/view.d.ts +19 -9
  27. package/src/api/events/view.js +10 -0
  28. package/src/api/events/webcontents.d.ts +21 -10
  29. package/src/api/events/webcontents.js +11 -0
  30. package/src/api/events/window.d.ts +70 -1
  31. package/src/api/events/window.js +10 -0
  32. package/src/api/external-application/Factory.d.ts +16 -9
  33. package/src/api/external-application/Factory.js +16 -9
  34. package/src/api/external-application/Instance.d.ts +40 -32
  35. package/src/api/external-application/Instance.js +40 -32
  36. package/src/api/external-application/index.d.ts +9 -0
  37. package/src/api/external-application/index.js +9 -0
  38. package/src/api/fin.d.ts +3 -0
  39. package/src/api/fin.js +3 -0
  40. package/src/api/frame/Factory.d.ts +30 -13
  41. package/src/api/frame/Factory.js +30 -13
  42. package/src/api/frame/Instance.d.ts +51 -38
  43. package/src/api/frame/Instance.js +51 -38
  44. package/src/api/frame/index.d.ts +11 -0
  45. package/src/api/frame/index.js +11 -0
  46. package/src/api/global-hotkey/index.d.ts +81 -13
  47. package/src/api/global-hotkey/index.js +81 -13
  48. package/src/api/interappbus/channel/channel.d.ts +257 -0
  49. package/src/api/interappbus/channel/channel.js +257 -0
  50. package/src/api/interappbus/channel/channels-docs.d.ts +59 -57
  51. package/src/api/interappbus/channel/channels-docs.js +71 -68
  52. package/src/api/interappbus/channel/client.d.ts +93 -0
  53. package/src/api/interappbus/channel/client.js +93 -1
  54. package/src/api/interappbus/channel/index.d.ts +164 -0
  55. package/src/api/interappbus/channel/index.js +165 -1
  56. package/src/api/interappbus/channel/provider.d.ts +172 -0
  57. package/src/api/interappbus/channel/provider.js +172 -0
  58. package/src/api/interappbus/index.d.ts +55 -20
  59. package/src/api/interappbus/index.js +55 -20
  60. package/src/api/interop/Factory.d.ts +30 -10
  61. package/src/api/interop/Factory.js +30 -10
  62. package/src/api/interop/InteropBroker.d.ts +298 -70
  63. package/src/api/interop/InteropBroker.js +298 -70
  64. package/src/api/interop/InteropClient.d.ts +286 -62
  65. package/src/api/interop/InteropClient.js +286 -62
  66. package/src/api/interop/SessionContextGroupClient.d.ts +2 -2
  67. package/src/api/interop/SessionContextGroupClient.js +2 -2
  68. package/src/api/interop/fdc3/documentationStub.d.ts +14 -0
  69. package/src/api/interop/fdc3/documentationStub.js +17 -0
  70. package/src/api/interop/fdc3/fdc3-1.2.d.ts +31 -34
  71. package/src/api/interop/fdc3/fdc3-1.2.js +31 -34
  72. package/src/api/interop/fdc3/fdc3-2.0.d.ts +48 -51
  73. package/src/api/interop/fdc3/fdc3-2.0.js +48 -51
  74. package/src/api/interop/index.d.ts +8 -0
  75. package/src/api/interop/index.js +8 -0
  76. package/src/api/platform/Factory.d.ts +121 -65
  77. package/src/api/platform/Factory.js +122 -66
  78. package/src/api/platform/Instance.d.ts +551 -48
  79. package/src/api/platform/Instance.js +551 -49
  80. package/src/api/platform/index.d.ts +9 -0
  81. package/src/api/platform/index.js +9 -0
  82. package/src/api/platform/layout/Factory.d.ts +53 -76
  83. package/src/api/platform/layout/Factory.js +53 -76
  84. package/src/api/platform/layout/Instance.d.ts +158 -23
  85. package/src/api/platform/layout/Instance.js +118 -20
  86. package/src/api/platform/layout/entities/layout-entities.d.ts +222 -30
  87. package/src/api/platform/layout/entities/layout-entities.js +222 -30
  88. package/src/api/platform/layout/index.d.ts +9 -0
  89. package/src/api/platform/layout/index.js +9 -0
  90. package/src/api/platform/provider.d.ts +398 -51
  91. package/src/api/snapshot-source/Factory.d.ts +33 -18
  92. package/src/api/snapshot-source/Factory.js +33 -18
  93. package/src/api/snapshot-source/Instance.d.ts +30 -8
  94. package/src/api/snapshot-source/Instance.js +30 -8
  95. package/src/api/snapshot-source/index.d.ts +9 -0
  96. package/src/api/snapshot-source/index.js +9 -0
  97. package/src/api/system/index.d.ts +1137 -186
  98. package/src/api/system/index.js +1142 -186
  99. package/src/api/view/Factory.d.ts +54 -16
  100. package/src/api/view/Factory.js +54 -16
  101. package/src/api/view/Instance.d.ts +330 -216
  102. package/src/api/view/Instance.js +331 -217
  103. package/src/api/view/index.d.ts +9 -0
  104. package/src/api/view/index.js +9 -0
  105. package/src/api/webcontents/main.d.ts +890 -0
  106. package/src/api/webcontents/main.js +890 -0
  107. package/src/api/window/Factory.d.ts +67 -16
  108. package/src/api/window/Factory.js +67 -16
  109. package/src/api/window/Instance.d.ts +824 -316
  110. package/src/api/window/Instance.js +822 -320
  111. package/src/api/window/index.d.ts +11 -0
  112. package/src/api/window/index.js +11 -0
  113. package/src/namespaces.d.ts +1 -0
  114. package/src/namespaces.js +3 -1
  115. package/src/shapes/protocol.d.ts +4 -0
  116. package/openfin-core-33.76.31.tgz +0 -0
@@ -9,6 +9,9 @@ type Identity = OpenFin.Identity;
9
9
  *
10
10
  * The Interop Broker is responsible for keeping track of the Interop state of the Platform, and for directing messages to the proper locations.
11
11
  *
12
+ * @remarks This class contains some types related to FDC3 that are specific to OpenFin. {@link https://developers.openfin.co/of-docs/docs/fdc3-support-in-openfin OpenFin's FDC3 support} is forward- and backward-compatible.
13
+ * Standard types for {@link https://fdc3.finos.org/ FDC3} do not appear in OpenFin’s API documentation, to avoid duplication.
14
+ *
12
15
  * ---
13
16
  *
14
17
  * There are 2 ways to inject custom functionality into the Interop Broker:
@@ -78,7 +81,7 @@ type Identity = OpenFin.Identity;
78
81
  * ---
79
82
  * **2. Overriding**
80
83
  *
81
- * Similarly to how [Platform Overriding]{@link https://developers.openfin.co/docs/platform-customization#section-customizing-platform-behavior} works, you can override functions in the Interop Broker in `fin.Platform.init`. An example of that is shown below. Overriding `isConnectionAuthorized` and `isActionAuthorized` will allow you to control allowed connections and allowed actions.
84
+ * Similarly to how {@link https://developers.openfin.co/docs/platform-customization#section-customizing-platform-behavior Platform Overriding} works, you can override functions in the Interop Broker in `fin.Platform.init`. An example of that is shown below. Overriding `isConnectionAuthorized` and `isActionAuthorized` will allow you to control allowed connections and allowed actions.
82
85
  *
83
86
  * However, if there is custom functionality you wish to include in the Interop Broker, please let us know. We would like to provide better configuration options so that you don't have to continually maintain your own override code.
84
87
  *
@@ -119,8 +122,6 @@ type Identity = OpenFin.Identity;
119
122
  *
120
123
  * ---
121
124
  *
122
- * @hideconstructor
123
- * @class
124
125
  */
125
126
  export declare class InteropBroker extends Base {
126
127
  private getProvider;
@@ -131,6 +132,9 @@ export declare class InteropBroker extends Base {
131
132
  private sessionContextGroupMap;
132
133
  private channel;
133
134
  private logging;
135
+ /**
136
+ * @internal
137
+ */
134
138
  constructor(wire: Transport, getProvider: () => Promise<OpenFin.ChannelProvider>, options?: any);
135
139
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
136
140
  new (): InteropBroker;
@@ -187,18 +191,21 @@ export declare class InteropBroker extends Base {
187
191
  */
188
192
  /**
189
193
  * Sets a context for the context group of the incoming current entity.
190
- * @param { SetContextOptions } setContextOptions - New context to set.
191
- * @param { ClientIdentity } clientIdentity - Identity of the client sender.
192
- * @return { void }
194
+ * @param setContextOptions - New context to set.
195
+ * @param clientIdentity - Identity of the client sender.
196
+ *
193
197
  */
194
198
  setContext({ context }: {
195
199
  context: OpenFin.Context;
196
200
  }, clientIdentity: OpenFin.ClientIdentity): void;
197
201
  /**
198
202
  * Get current context for a client subscribed to a Context Group.
199
- * @param { GetContextOptions } getContextOptions - Options for getting context
200
- * @param { ClientIdentity } clientIdentity - Identity of the client sender.
201
- * @return { Context }
203
+ *
204
+ * @remarks It takes an optional Context Type argument and returns the last context of that type.
205
+ *
206
+ * @param getContextOptions - Options for getting context
207
+ * @param clientIdentity - Identity of the client sender.
208
+ *
202
209
  */
203
210
  getCurrentContext(getCurrentContextOptions: {
204
211
  contextType: string;
@@ -208,9 +215,9 @@ export declare class InteropBroker extends Base {
208
215
  * If no target is specified, it adds the sender to the context group.
209
216
  * joinContextGroup is responsible for checking connections at the incoming identity. It calls {@link InteropBroker#addClientToContextGroup InteropBroker.addClientToContextGroup} to actually group the client.
210
217
  * Used by Platform Windows.
211
- * @return { Promise<void> }
212
- * @param { JoinContextGroupOptions } joinContextGroupOptions - Id of the Context Group and identity of the entity to join to the group.
213
- * @param { ClientIdentity } senderIdentity - Identity of the client sender.
218
+ *
219
+ * @param joinContextGroupOptions - Id of the Context Group and identity of the entity to join to the group.
220
+ * @param senderIdentity - Identity of the client sender.
214
221
  */
215
222
  joinContextGroup({ contextGroupId, target }: {
216
223
  contextGroupId: string;
@@ -219,9 +226,9 @@ export declare class InteropBroker extends Base {
219
226
  /**
220
227
  * Helper function for {@link InteropBroker#joinContextGroup InteropBroker.joinContextGroup}. Does the work of actually adding the client to the Context Group.
221
228
  * Used by Platform Windows.
222
- * @return { Promise<void> }
223
- * @param { AddClientToContextGroupOptions } addClientToContextGroupOptions - Contains the contextGroupId
224
- * @param { ClientIdentity } clientIdentity - Identity of the client sender.
229
+ *
230
+ * @param addClientToContextGroupOptions - Contains the contextGroupId
231
+ * @param clientIdentity - Identity of the client sender.
225
232
  */
226
233
  addClientToContextGroup({ contextGroupId }: {
227
234
  contextGroupId: string;
@@ -229,11 +236,13 @@ export declare class InteropBroker extends Base {
229
236
  /**
230
237
  * Removes the specified target from a context group.
231
238
  * If no target is specified, it removes the sender from their context group.
232
- * removeFromContextGroup is responsible for checking connections at the incoming identity. It calls {@link InteropBroker#removeClientFromContextGroup InteropBroker.removeClientFromContextGroup} to actually ungroup the client.
233
- * Used by Platform Windows.
234
- * @return { Promise<void> }
235
- * @param { RemoveFromContextGroupOptions } removeFromContextGroupOptions - Contains the target identity to remove.
236
- * @param { ClientIdentity } senderIdentity - Identity of the client sender.
239
+ * removeFromContextGroup is responsible for checking connections at the incoming identity.
240
+ *
241
+ * @remarks It calls {@link InteropBroker#removeClientFromContextGroup InteropBroker.removeClientFromContextGroup} to actually ungroup
242
+ * the client. Used by Platform Windows.
243
+ *
244
+ * @param removeFromContextGroupOptions - Contains the target identity to remove.
245
+ * @param senderIdentity - Identity of the client sender.
237
246
  */
238
247
  removeFromContextGroup({ target }: {
239
248
  target: OpenFin.Identity;
@@ -241,30 +250,35 @@ export declare class InteropBroker extends Base {
241
250
  /**
242
251
  * Helper function for {@link InteropBroker#removeFromContextGroup InteropBroker.removeFromContextGroup}. Does the work of actually removing the client from the Context Group.
243
252
  * Used by Platform Windows.
244
- * @return { Promise<void> }
253
+ *
245
254
  * @property { ClientIdentity } clientIdentity - Identity of the client sender.
246
255
  */
247
256
  removeClientFromContextGroup(clientIdentity: OpenFin.ClientIdentity): Promise<void>;
248
257
  /**
249
258
  * Returns the Interop-Broker-defined context groups available for an entity to join. Because this function is used in the rest of the Interop Broker to fetch the Context Groups, overriding this allows you to customize the Context Groups for the Interop Broker. However, we recommend customizing the context groups through configuration instead.
250
259
  * Used by Platform Windows.
251
- * @return { Promise<ContextGroupInfo[]>}
260
+ *
252
261
  */
253
262
  getContextGroups(): Readonly<OpenFin.ContextGroupInfo[]>;
254
263
  /**
255
264
  * Gets display info for a context group
256
- * Used by Platform Windows.
257
- * @param { GetInfoForContextGroupOptions } getInfoForContextGroupOptions - Contains contextGroupId, the context group you wish to get display info for.
258
- * @return { Promise<ContextGroupInfo>}
265
+ *
266
+ * @remarks Used by Platform Windows.
267
+ *
268
+ * @param getInfoForContextGroupOptions - Contains contextGroupId, the context group you wish to get display info for.
269
+ *
259
270
  */
260
271
  getInfoForContextGroup({ contextGroupId }: {
261
272
  contextGroupId: string;
262
273
  }): OpenFin.ContextGroupInfo | undefined;
263
274
  /**
264
275
  * Gets all clients for a context group.
265
- * Used by Platform Windows.
266
- * @param { GetAllClientsInContextGroupOptions } getAllClientsInContextGroupOptions - Contains contextGroupId, the context group you wish to get clients for.
267
- * @return { Promise<ClientIdentity[]>}
276
+ *
277
+ * @remarks **This is primarily used for platform windows. Views within a platform should not have to use this API.**
278
+ * Returns the Interop-Broker-defined context groups available for an entity to join.
279
+ *
280
+ * @param getAllClientsInContextGroupOptions - Contains contextGroupId, the context group you wish to get clients for.
281
+ *
268
282
  */
269
283
  getAllClientsInContextGroup({ contextGroupId }: {
270
284
  contextGroupId: string;
@@ -272,59 +286,191 @@ export declare class InteropBroker extends Base {
272
286
  /**
273
287
  * Responsible for launching of applications that can handle a given intent, and delegation of intents to those applications.
274
288
  * Must be overridden.
275
- * @param { Intent } intent The combination of an action and a context that is passed to an application for resolution.
276
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
277
- * @return { Promise<unknown> }
278
- * @tutorial interop.handleFiredIntent
289
+ *
290
+ * @remarks To make this call FDC3-Compliant it would need to return an IntentResolution.
291
+ *
292
+ * ```js
293
+ * interface IntentResolution {
294
+ * source: TargetApp;
295
+ * // deprecated, not assignable from intent listeners
296
+ * data?: object;
297
+ * version: string;
298
+ * }
299
+ * ```
300
+ *
301
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
302
+ *
303
+ * @param intent The combination of an action and a context that is passed to an application for resolution.
304
+ * @param clientIdentity Identity of the Client making the request.
305
+ *
306
+ * @example
307
+ * ```js
308
+ * // override call so we set intent target and create view that will handle it
309
+ * fin.Platform.init({
310
+ * interopOverride: async (InteropBroker) => {
311
+ * class Override extends InteropBroker {
312
+ * async handleFiredIntent(intent) {
313
+ * super.setIntentTarget(intent, { uuid: 'platform-uuid', name: 'intent-view' });
314
+ * const platform = fin.Platform.getCurrentSync();
315
+ * const win = fin.Window.wrapSync({ name: 'foo', uuid: 'platform-uuid' });
316
+ * const createdView = await platform.createView({ url: 'http://openfin.co', name: 'intent-view' }, win.identity);
317
+ * }
318
+ * }
319
+ * return new Override();
320
+ * }
321
+ * });
322
+ * ```
279
323
  */
280
324
  handleFiredIntent(intent: OpenFin.Intent, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
281
325
  /**
282
326
  * Should be called in {@link InteropBroker#handleFiredIntent InteropBroker.handleFiredIntent}.
283
327
  * While handleFiredIntent is responsible for launching applications, setIntentTarget is used to tell the InteropBroker which application should receive the intent when it is ready.
284
- * @param { Intent } intent The combination of an action and a context that is passed to an application for resolution.
285
- * @param { Identity } target - Identity of the target that will handle the intent.
286
- * @return { Promise<void> }
328
+ * @param intent The combination of an action and a context that is passed to an application for resolution.
329
+ * @param target - Identity of the target that will handle the intent.
330
+ *
287
331
  */
288
332
  setIntentTarget(intent: OpenFin.Intent, target: OpenFin.Identity): Promise<void>;
289
333
  /**
290
334
  * Responsible for returning information on a particular Intent.
291
- * Must be overridden.
292
- * @param { InfoForIntentOptions } options
293
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
294
- * @return { Promise<unknown> }
295
- * @tutorial interop.handleInfoForIntent
335
+ *
336
+ * @remarks Whenever InteropClient.getInfoForIntent is called this function will fire. The options argument gives you
337
+ * access to the intent name and any optional context that was passed and clientIdentity is the identity of the client
338
+ * that made the call. Ideally here you would fetch the info for the intent and return it with the shape that the
339
+ * InteropClient.getInfoForIntent call is expecting.
340
+ *
341
+ * To make this call FDC3-Compliant it would need to return an App Intent:
342
+ *
343
+ * ```js
344
+ * // {
345
+ * // intent: { name: "StartChat", displayName: "Chat" },
346
+ * // apps: [{ name: "Skype" }, { name: "Symphony" }, { name: "Slack" }]
347
+ * // }
348
+ * ```
349
+ *
350
+ * More information on the AppIntent type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/AppIntent).
351
+ *
352
+ * @param options
353
+ * @param clientIdentity Identity of the Client making the request.
354
+ *
355
+ * @example
356
+ * ```js
357
+ * fin.Platform.init({
358
+ * interopOverride: async (InteropBroker) => {
359
+ * class Override extends InteropBroker {
360
+ * async handleInfoForIntent(options, clientIdentity) {
361
+ * // Your code goes here.
362
+ * }
363
+ * }
364
+ * return new Override();
365
+ * }
366
+ * });
367
+ * ```
296
368
  */
297
369
  handleInfoForIntent(options: OpenFin.InfoForIntentOptions, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
298
370
  /**
299
371
  * Responsible for returning information on which Intents are meant to handle a specific Context.
300
372
  * Must be overridden.
301
- * @param { Context } context Data passed between entities and applications.
302
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
303
- * @return { Promise<unknown> }
304
- * @tutorial interop.handleInfoForIntentsByContext
373
+ *
374
+ * @remarks Responsible for returning information on which Intents are meant to handle a specific Context. Must be overridden.
375
+ *
376
+ * Whenever InteropClient.getInfoForIntentsByContext is called this function will fire. The context argument gives you access to the context that the client wants information on and clientIdentity is the identity of the client that made the call. Ideally here you would fetch the info for any intent that can handle and return it with the shape that the InteropClient.getInfoForIntentsByContext call is expecting.
377
+ *
378
+ * To make this call FDC3-Compliant it would need to return an array of AppIntents:
379
+ *
380
+ * ```js
381
+ * // [{
382
+ * // intent: { name: "StartCall", displayName: "Call" },
383
+ * // apps: [{ name: "Skype" }]
384
+ * // },
385
+ * // {
386
+ * // intent: { name: "StartChat", displayName: "Chat" },
387
+ * // apps: [{ name: "Skype" }, { name: "Symphony" }, { name: "Slack" }]
388
+ * // }];
389
+ * ```
390
+ *
391
+ * More information on the AppIntent type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/AppIntent).
392
+ *
393
+ * @param context Data passed between entities and applications.
394
+ * @param clientIdentity Identity of the Client making the request.
395
+ *
396
+ * @example
397
+ * ```js
398
+ * fin.Platform.init({
399
+ * interopOverride: async (InteropBroker) => {
400
+ * class Override extends InteropBroker {
401
+ * async handleInfoForIntentsByContext(context, clientIdentity) {
402
+ * // Your code goes here.
403
+ * }
404
+ * }
405
+ * return new Override();
406
+ * }
407
+ * });
408
+ * ```
305
409
  */
306
410
  handleInfoForIntentsByContext(context: OpenFin.Context | OpenFin.FindIntentsByContextOptions, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
307
411
  /**
308
412
  * Responsible for resolving an Intent based on a specific Context.
309
413
  * Must be overridden.
310
- * @param { ContextForIntent } contextForIntent Data passed between entities and applications.
311
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
312
- * @return { Promise<unknown> }
313
- * @tutorial interop.handleFiredIntentForContext
414
+ *
415
+ * @remarks Whenever InteropClient.fireIntentForContext is called this function will fire. The contextForIntent argument
416
+ * gives you access to the context that will be resolved to an intent. It also can optionally contain any metadata relevant
417
+ * to resolving it, like a specific app the client wants the context to be handled by. The clientIdentity is the identity
418
+ * of the client that made the call.
419
+ *
420
+ * To make this call FDC3-Compliant it would need to return an IntentResolution:
421
+ *
422
+ * ```js
423
+ * // {
424
+ * // intent: { name: "StartChat", displayName: "Chat" },
425
+ * // apps: [{ name: "Skype" }, { name: "Symphony" }, { name: "Slack" }]
426
+ * // }
427
+ * ```
428
+ *
429
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
430
+ *
431
+ * @param contextForIntent Data passed between entities and applications.
432
+ * @param clientIdentity Identity of the Client making the request.
433
+ *
434
+ * @example
435
+ * ```js
436
+ * fin.Platform.init({
437
+ * interopOverride: async (InteropBroker) => {
438
+ * class Override extends InteropBroker {
439
+ * async handleFiredIntentForContext(contextForIntent, clientIdentity) {
440
+ * // Your code goes here.
441
+ * }
442
+ * }
443
+ * return new Override();
444
+ * }
445
+ * });
446
+ * ```
314
447
  */
315
448
  handleFiredIntentForContext(contextForIntent: OpenFin.ContextForIntent, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
316
449
  /**
317
450
  * Provides the identity of any Interop Client that disconnects from the Interop Broker. It is meant to be overriden.
318
451
  * @param clientIdentity
319
- * @return { Promise<void> }
320
- * @tutorial interop.clientDisconnected
452
+ *
453
+ * @example
454
+ * ```js
455
+ * fin.Platform.init({
456
+ * interopOverride: async (InteropBroker) => {
457
+ * class Override extends InteropBroker {
458
+ * async clientDisconnected(clientIdentity) {
459
+ * const { uuid, name } = clientIdentity;
460
+ * console.log(`Client with identity ${uuid}/${name} has been disconnected`);
461
+ * }
462
+ * }
463
+ * return new Override();
464
+ * }
465
+ * });
466
+ * ```
321
467
  */
322
468
  clientDisconnected(clientIdentity: OpenFin.ClientIdentity): Promise<void>;
323
469
  /**
324
470
  * Responsible for resolving an fdc3.open call.
325
471
  * Must be overridden.
326
- * @param { Fdc3OpenOptions } fdc3OpenOptions fdc3.open options
327
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
472
+ * @param fdc3OpenOptions fdc3.open options
473
+ * @param clientIdentity Identity of the Client making the request.
328
474
  */
329
475
  fdc3HandleOpen({ app, context }: {
330
476
  app: TargetApp | AppIdentifier;
@@ -333,15 +479,15 @@ export declare class InteropBroker extends Base {
333
479
  /**
334
480
  * Responsible for resolving the fdc3.findInstances call.
335
481
  * Must be overridden
336
- * @param { AppIdentifier(2) } app AppIdentifier that was passed to fdc3.findInstances
337
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
482
+ * @param app AppIdentifier that was passed to fdc3.findInstances
483
+ * @param clientIdentity Identity of the Client making the request.
338
484
  */
339
485
  fdc3HandleFindInstances(app: AppIdentifier, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
340
486
  /**
341
487
  * Responsible for resolving the fdc3.getAppMetadata call.
342
488
  * Must be overridden
343
- * @param { AppIdentifier(2) } app AppIdentifier that was passed to fdc3.getAppMetadata
344
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
489
+ * @param app AppIdentifier that was passed to fdc3.getAppMetadata
490
+ * @param clientIdentity Identity of the Client making the request.
345
491
  */
346
492
  fdc3HandleGetAppMetadata(app: AppIdentifier, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
347
493
  /**
@@ -349,11 +495,31 @@ export declare class InteropBroker extends Base {
349
495
  * For FDC3 2.0 you would need to override this function and add the contextMetadata as
350
496
  * part of the Context object. Then would you need to call
351
497
  * super.invokeContextHandler passing it this new Context object along with the clientIdentity and handlerId
352
- * @param { ClientIdentity } clientIdentity
353
- * @param { string } handlerId
354
- * @param { Context } context
355
- * @returns { Promise<void> }
356
- * @tutorial interopBroker.invokeContextHandler
498
+ * @param clientIdentity
499
+ * @param handlerId
500
+ * @param context
501
+ *
502
+ * @example
503
+ * ```js
504
+ * fin.Platform.init({
505
+ * interopOverride: async (InteropBroker) => {
506
+ * class Override extends InteropBroker {
507
+ * async invokeContextHandler(options, clientIdentity) {
508
+ * return super.invokeContextHandler(clientIdentity, handlerId, {
509
+ * ...context,
510
+ * contextMetadata: {
511
+ * source: {
512
+ * appId: 'openfin-app',
513
+ * instanceId: '3D54D456D9HT0'
514
+ * }
515
+ * }
516
+ * });
517
+ * }
518
+ * }
519
+ * return new Override();
520
+ * }
521
+ * });
522
+ * ```
357
523
  */
358
524
  invokeContextHandler(clientIdentity: OpenFin.ClientIdentity, handlerId: string, context: OpenFin.Context): Promise<void>;
359
525
  /**
@@ -361,19 +527,43 @@ export declare class InteropBroker extends Base {
361
527
  * For FDC3 2.0 you would need to override this function and add the contextMetadata as
362
528
  * part of the Context object inside the Intent object. Then would you need to call
363
529
  * super.invokeIntentHandler passing it this new Intent object along with the clientIdentity and handlerId
364
- * @param { ClientIdentity } ClientIdentity
365
- * @param { string } handlerId
366
- * @param { Context } context
367
- * @returns { Promise<void> }
368
- * @tutorial interopBroker.invokeIntentHandler
530
+ * @param ClientIdentity
531
+ * @param handlerId
532
+ * @param context
533
+ *
534
+ * @example
535
+ * ```js
536
+ * fin.Platform.init({
537
+ * interopOverride: async (InteropBroker) => {
538
+ * class Override extends InteropBroker {
539
+ * async invokeIntentHandler(options, clientIdentity) {
540
+ * const { context } = intent;
541
+ * return super.invokeIntentHandler(clientIdentity, handlerId, {
542
+ * ...intent,
543
+ * context: {
544
+ * ...context,
545
+ * contextMetadata: {
546
+ * source: {
547
+ * appId: 'openfin-app',
548
+ * instanceId: '3D54D456D9HT0'
549
+ * }
550
+ * }
551
+ * }
552
+ * });
553
+ * }
554
+ * }
555
+ * return new Override();
556
+ * }
557
+ * });
558
+ * ```
369
559
  */
370
560
  invokeIntentHandler(clientIdentity: OpenFin.ClientIdentity, handlerId: string, intent: OpenFin.Intent): Promise<void>;
371
561
  /**
372
562
  * Responsible for resolving fdc3.getInfo for FDC3 2.0
373
- * Would need to return the optionalFeatures and appMetadata for the {@link ImplementationMetadata ImplementationMetadata}.
563
+ * Would need to return the optionalFeatures and appMetadata for the {@link https://fdc3.finos.org/docs/api/ref/Metadata#implementationmetadata ImplementationMetadata}.
374
564
  * Must be overridden.
375
565
  * @param clientIdentity
376
- * @returns { Promise<ImplementationMetadata(2)> }
566
+ *
377
567
  */
378
568
  fdc3HandleGetInfo(payload: {
379
569
  fdc3Version: string;
@@ -383,8 +573,46 @@ export declare class InteropBroker extends Base {
383
573
  *
384
574
  * FDC3 2.0: Use the endpointId in the ClientInfo as the instanceId when generating
385
575
  * an AppIdentifier.
386
- * @return { Promise<Array<ClientInfo>> }
387
- * @tutorial interop.getAllClientInfo
576
+ *
577
+ * @remarks FDC3 2.0 Note: When needing an instanceId to generate an AppIdentifier use this call to
578
+ * get the endpointId and use it as the instanceId. In the Example below we override handleFiredIntent
579
+ * and then call super.getAllClientInfo to generate the AppIdentifier for the IntentResolution.
580
+ *
581
+ *
582
+ * @example
583
+ * ```js
584
+ * // FDC3 2.0 Example:
585
+ * fin.Platform.init({
586
+ * interopOverride: async (InteropBroker, ...args) => {
587
+ * class Override extends InteropBroker {
588
+ * async handleFiredIntent(intent) {
589
+ * super.setIntentTarget(intent, { uuid: 'platform-uuid', name: 'intent-view' });
590
+ * const platform = fin.Platform.getCurrentSync();
591
+ * const win = fin.Window.wrapSync({ name: 'foo', uuid: 'platform-uuid' });
592
+ * const createdView = await platform.createView({ url: 'http://openfin.co', name: 'intent-view' }, win.identity);
593
+ *
594
+ * const allClientInfo = await super.getAllClientInfo();
595
+ *
596
+ * const infoForTarget = allClientInfo.find((clientInfo) => {
597
+ * return clientInfo.uuid === 'platform-uuid' && clientInfo.name === 'intent-view';
598
+ * });
599
+ *
600
+ * const source = {
601
+ * appId: 'intent-view',
602
+ * instanceId: infoForTarget.endpointId
603
+ * }
604
+ *
605
+ * return {
606
+ * source,
607
+ * intent: intent.name
608
+ * }
609
+ *
610
+ * }
611
+ * }
612
+ * return new Override(...args);
613
+ * }
614
+ * });
615
+ * ```
388
616
  */
389
617
  getAllClientInfo(): Promise<Array<OpenFin.ClientInfo>>;
390
618
  decorateSnapshot(snapshot: OpenFin.Snapshot): OpenFin.Snapshot;