@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
@@ -55,6 +55,9 @@ let contextGroups = [
55
55
  *
56
56
  * The Interop Broker is responsible for keeping track of the Interop state of the Platform, and for directing messages to the proper locations.
57
57
  *
58
+ * @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.
59
+ * Standard types for {@link https://fdc3.finos.org/ FDC3} do not appear in OpenFin’s API documentation, to avoid duplication.
60
+ *
58
61
  * ---
59
62
  *
60
63
  * There are 2 ways to inject custom functionality into the Interop Broker:
@@ -124,7 +127,7 @@ let contextGroups = [
124
127
  * ---
125
128
  * **2. Overriding**
126
129
  *
127
- * 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.
130
+ * 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.
128
131
  *
129
132
  * 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.
130
133
  *
@@ -165,10 +168,11 @@ let contextGroups = [
165
168
  *
166
169
  * ---
167
170
  *
168
- * @hideconstructor
169
- * @class
170
171
  */
171
172
  class InteropBroker extends base_1.Base {
173
+ /**
174
+ * @internal
175
+ */
172
176
  constructor(wire, getProvider, options) {
173
177
  // Tip from Pierre and Michael from the overrideCheck work: Don't use bound methods for overrideable InteropBroker functions.
174
178
  super(wire);
@@ -261,9 +265,9 @@ class InteropBroker extends base_1.Base {
261
265
  */
262
266
  /**
263
267
  * Sets a context for the context group of the incoming current entity.
264
- * @param { SetContextOptions } setContextOptions - New context to set.
265
- * @param { ClientIdentity } clientIdentity - Identity of the client sender.
266
- * @return { void }
268
+ * @param setContextOptions - New context to set.
269
+ * @param clientIdentity - Identity of the client sender.
270
+ *
267
271
  */
268
272
  setContext({ context }, clientIdentity) {
269
273
  this.wire.sendAction('interop-broker-set-context').catch((e) => {
@@ -305,9 +309,12 @@ class InteropBroker extends base_1.Base {
305
309
  }
306
310
  /**
307
311
  * Get current context for a client subscribed to a Context Group.
308
- * @param { GetContextOptions } getContextOptions - Options for getting context
309
- * @param { ClientIdentity } clientIdentity - Identity of the client sender.
310
- * @return { Context }
312
+ *
313
+ * @remarks It takes an optional Context Type argument and returns the last context of that type.
314
+ *
315
+ * @param getContextOptions - Options for getting context
316
+ * @param clientIdentity - Identity of the client sender.
317
+ *
311
318
  */
312
319
  getCurrentContext(getCurrentContextOptions, clientIdentity) {
313
320
  var _a;
@@ -334,9 +341,9 @@ class InteropBroker extends base_1.Base {
334
341
  * If no target is specified, it adds the sender to the context group.
335
342
  * joinContextGroup is responsible for checking connections at the incoming identity. It calls {@link InteropBroker#addClientToContextGroup InteropBroker.addClientToContextGroup} to actually group the client.
336
343
  * Used by Platform Windows.
337
- * @return { Promise<void> }
338
- * @param { JoinContextGroupOptions } joinContextGroupOptions - Id of the Context Group and identity of the entity to join to the group.
339
- * @param { ClientIdentity } senderIdentity - Identity of the client sender.
344
+ *
345
+ * @param joinContextGroupOptions - Id of the Context Group and identity of the entity to join to the group.
346
+ * @param senderIdentity - Identity of the client sender.
340
347
  */
341
348
  async joinContextGroup({ contextGroupId, target }, senderIdentity) {
342
349
  this.wire.sendAction('interop-broker-join-context-group').catch((e) => {
@@ -379,9 +386,9 @@ class InteropBroker extends base_1.Base {
379
386
  /**
380
387
  * Helper function for {@link InteropBroker#joinContextGroup InteropBroker.joinContextGroup}. Does the work of actually adding the client to the Context Group.
381
388
  * Used by Platform Windows.
382
- * @return { Promise<void> }
383
- * @param { AddClientToContextGroupOptions } addClientToContextGroupOptions - Contains the contextGroupId
384
- * @param { ClientIdentity } clientIdentity - Identity of the client sender.
389
+ *
390
+ * @param addClientToContextGroupOptions - Contains the contextGroupId
391
+ * @param clientIdentity - Identity of the client sender.
385
392
  */
386
393
  async addClientToContextGroup({ contextGroupId }, clientIdentity) {
387
394
  this.wire.sendAction('interop-broker-add-client-to-context-group').catch((e) => {
@@ -420,11 +427,13 @@ class InteropBroker extends base_1.Base {
420
427
  /**
421
428
  * Removes the specified target from a context group.
422
429
  * If no target is specified, it removes the sender from their context group.
423
- * removeFromContextGroup is responsible for checking connections at the incoming identity. It calls {@link InteropBroker#removeClientFromContextGroup InteropBroker.removeClientFromContextGroup} to actually ungroup the client.
424
- * Used by Platform Windows.
425
- * @return { Promise<void> }
426
- * @param { RemoveFromContextGroupOptions } removeFromContextGroupOptions - Contains the target identity to remove.
427
- * @param { ClientIdentity } senderIdentity - Identity of the client sender.
430
+ * removeFromContextGroup is responsible for checking connections at the incoming identity.
431
+ *
432
+ * @remarks It calls {@link InteropBroker#removeClientFromContextGroup InteropBroker.removeClientFromContextGroup} to actually ungroup
433
+ * the client. Used by Platform Windows.
434
+ *
435
+ * @param removeFromContextGroupOptions - Contains the target identity to remove.
436
+ * @param senderIdentity - Identity of the client sender.
428
437
  */
429
438
  async removeFromContextGroup({ target }, senderIdentity) {
430
439
  this.wire.sendAction('interop-broker-remove-from-context-group').catch((e) => {
@@ -463,7 +472,7 @@ class InteropBroker extends base_1.Base {
463
472
  /**
464
473
  * Helper function for {@link InteropBroker#removeFromContextGroup InteropBroker.removeFromContextGroup}. Does the work of actually removing the client from the Context Group.
465
474
  * Used by Platform Windows.
466
- * @return { Promise<void> }
475
+ *
467
476
  * @property { ClientIdentity } clientIdentity - Identity of the client sender.
468
477
  */
469
478
  async removeClientFromContextGroup(clientIdentity) {
@@ -480,7 +489,7 @@ class InteropBroker extends base_1.Base {
480
489
  /**
481
490
  * 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.
482
491
  * Used by Platform Windows.
483
- * @return { Promise<ContextGroupInfo[]>}
492
+ *
484
493
  */
485
494
  // eslint-disable-next-line class-methods-use-this
486
495
  getContextGroups() {
@@ -495,9 +504,11 @@ class InteropBroker extends base_1.Base {
495
504
  // Used to by platform windows to get display metadata for a context group.
496
505
  /**
497
506
  * Gets display info for a context group
498
- * Used by Platform Windows.
499
- * @param { GetInfoForContextGroupOptions } getInfoForContextGroupOptions - Contains contextGroupId, the context group you wish to get display info for.
500
- * @return { Promise<ContextGroupInfo>}
507
+ *
508
+ * @remarks Used by Platform Windows.
509
+ *
510
+ * @param getInfoForContextGroupOptions - Contains contextGroupId, the context group you wish to get display info for.
511
+ *
501
512
  */
502
513
  getInfoForContextGroup({ contextGroupId }) {
503
514
  this.wire.sendAction('interop-broker-get-info-for-context-group').catch((e) => {
@@ -508,9 +519,12 @@ class InteropBroker extends base_1.Base {
508
519
  // Used by platform windows to get all clients for a context group.
509
520
  /**
510
521
  * Gets all clients for a context group.
511
- * Used by Platform Windows.
512
- * @param { GetAllClientsInContextGroupOptions } getAllClientsInContextGroupOptions - Contains contextGroupId, the context group you wish to get clients for.
513
- * @return { Promise<ClientIdentity[]>}
522
+ *
523
+ * @remarks **This is primarily used for platform windows. Views within a platform should not have to use this API.**
524
+ * Returns the Interop-Broker-defined context groups available for an entity to join.
525
+ *
526
+ * @param getAllClientsInContextGroupOptions - Contains contextGroupId, the context group you wish to get clients for.
527
+ *
514
528
  */
515
529
  getAllClientsInContextGroup({ contextGroupId }) {
516
530
  this.wire.sendAction('interop-broker-get-all-clients-in-context-group').catch((e) => {
@@ -526,10 +540,40 @@ class InteropBroker extends base_1.Base {
526
540
  /**
527
541
  * Responsible for launching of applications that can handle a given intent, and delegation of intents to those applications.
528
542
  * Must be overridden.
529
- * @param { Intent } intent The combination of an action and a context that is passed to an application for resolution.
530
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
531
- * @return { Promise<unknown> }
532
- * @tutorial interop.handleFiredIntent
543
+ *
544
+ * @remarks To make this call FDC3-Compliant it would need to return an IntentResolution.
545
+ *
546
+ * ```js
547
+ * interface IntentResolution {
548
+ * source: TargetApp;
549
+ * // deprecated, not assignable from intent listeners
550
+ * data?: object;
551
+ * version: string;
552
+ * }
553
+ * ```
554
+ *
555
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
556
+ *
557
+ * @param intent The combination of an action and a context that is passed to an application for resolution.
558
+ * @param clientIdentity Identity of the Client making the request.
559
+ *
560
+ * @example
561
+ * ```js
562
+ * // override call so we set intent target and create view that will handle it
563
+ * fin.Platform.init({
564
+ * interopOverride: async (InteropBroker) => {
565
+ * class Override extends InteropBroker {
566
+ * async handleFiredIntent(intent) {
567
+ * super.setIntentTarget(intent, { uuid: 'platform-uuid', name: 'intent-view' });
568
+ * const platform = fin.Platform.getCurrentSync();
569
+ * const win = fin.Window.wrapSync({ name: 'foo', uuid: 'platform-uuid' });
570
+ * const createdView = await platform.createView({ url: 'http://openfin.co', name: 'intent-view' }, win.identity);
571
+ * }
572
+ * }
573
+ * return new Override();
574
+ * }
575
+ * });
576
+ * ```
533
577
  */
534
578
  // eslint-disable-next-line class-methods-use-this
535
579
  async handleFiredIntent(intent, clientIdentity) {
@@ -540,9 +584,9 @@ class InteropBroker extends base_1.Base {
540
584
  /**
541
585
  * Should be called in {@link InteropBroker#handleFiredIntent InteropBroker.handleFiredIntent}.
542
586
  * While handleFiredIntent is responsible for launching applications, setIntentTarget is used to tell the InteropBroker which application should receive the intent when it is ready.
543
- * @param { Intent } intent The combination of an action and a context that is passed to an application for resolution.
544
- * @param { Identity } target - Identity of the target that will handle the intent.
545
- * @return { Promise<void> }
587
+ * @param intent The combination of an action and a context that is passed to an application for resolution.
588
+ * @param target - Identity of the target that will handle the intent.
589
+ *
546
590
  */
547
591
  async setIntentTarget(intent, target) {
548
592
  this.wire.sendAction('interop-broker-set-intent-target').catch((e) => {
@@ -581,11 +625,39 @@ class InteropBroker extends base_1.Base {
581
625
  }
582
626
  /**
583
627
  * Responsible for returning information on a particular Intent.
584
- * Must be overridden.
585
- * @param { InfoForIntentOptions } options
586
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
587
- * @return { Promise<unknown> }
588
- * @tutorial interop.handleInfoForIntent
628
+ *
629
+ * @remarks Whenever InteropClient.getInfoForIntent is called this function will fire. The options argument gives you
630
+ * access to the intent name and any optional context that was passed and clientIdentity is the identity of the client
631
+ * that made the call. Ideally here you would fetch the info for the intent and return it with the shape that the
632
+ * InteropClient.getInfoForIntent call is expecting.
633
+ *
634
+ * To make this call FDC3-Compliant it would need to return an App Intent:
635
+ *
636
+ * ```js
637
+ * // {
638
+ * // intent: { name: "StartChat", displayName: "Chat" },
639
+ * // apps: [{ name: "Skype" }, { name: "Symphony" }, { name: "Slack" }]
640
+ * // }
641
+ * ```
642
+ *
643
+ * More information on the AppIntent type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/AppIntent).
644
+ *
645
+ * @param options
646
+ * @param clientIdentity Identity of the Client making the request.
647
+ *
648
+ * @example
649
+ * ```js
650
+ * fin.Platform.init({
651
+ * interopOverride: async (InteropBroker) => {
652
+ * class Override extends InteropBroker {
653
+ * async handleInfoForIntent(options, clientIdentity) {
654
+ * // Your code goes here.
655
+ * }
656
+ * }
657
+ * return new Override();
658
+ * }
659
+ * });
660
+ * ```
589
661
  */
590
662
  // eslint-disable-next-line class-methods-use-this
591
663
  async handleInfoForIntent(options, clientIdentity) {
@@ -596,10 +668,42 @@ class InteropBroker extends base_1.Base {
596
668
  /**
597
669
  * Responsible for returning information on which Intents are meant to handle a specific Context.
598
670
  * Must be overridden.
599
- * @param { Context } context Data passed between entities and applications.
600
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
601
- * @return { Promise<unknown> }
602
- * @tutorial interop.handleInfoForIntentsByContext
671
+ *
672
+ * @remarks Responsible for returning information on which Intents are meant to handle a specific Context. Must be overridden.
673
+ *
674
+ * 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.
675
+ *
676
+ * To make this call FDC3-Compliant it would need to return an array of AppIntents:
677
+ *
678
+ * ```js
679
+ * // [{
680
+ * // intent: { name: "StartCall", displayName: "Call" },
681
+ * // apps: [{ name: "Skype" }]
682
+ * // },
683
+ * // {
684
+ * // intent: { name: "StartChat", displayName: "Chat" },
685
+ * // apps: [{ name: "Skype" }, { name: "Symphony" }, { name: "Slack" }]
686
+ * // }];
687
+ * ```
688
+ *
689
+ * More information on the AppIntent type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/AppIntent).
690
+ *
691
+ * @param context Data passed between entities and applications.
692
+ * @param clientIdentity Identity of the Client making the request.
693
+ *
694
+ * @example
695
+ * ```js
696
+ * fin.Platform.init({
697
+ * interopOverride: async (InteropBroker) => {
698
+ * class Override extends InteropBroker {
699
+ * async handleInfoForIntentsByContext(context, clientIdentity) {
700
+ * // Your code goes here.
701
+ * }
702
+ * }
703
+ * return new Override();
704
+ * }
705
+ * });
706
+ * ```
603
707
  */
604
708
  // eslint-disable-next-line class-methods-use-this
605
709
  async handleInfoForIntentsByContext(context, clientIdentity) {
@@ -610,10 +714,39 @@ class InteropBroker extends base_1.Base {
610
714
  /**
611
715
  * Responsible for resolving an Intent based on a specific Context.
612
716
  * Must be overridden.
613
- * @param { ContextForIntent } contextForIntent Data passed between entities and applications.
614
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
615
- * @return { Promise<unknown> }
616
- * @tutorial interop.handleFiredIntentForContext
717
+ *
718
+ * @remarks Whenever InteropClient.fireIntentForContext is called this function will fire. The contextForIntent argument
719
+ * gives you access to the context that will be resolved to an intent. It also can optionally contain any metadata relevant
720
+ * to resolving it, like a specific app the client wants the context to be handled by. The clientIdentity is the identity
721
+ * of the client that made the call.
722
+ *
723
+ * To make this call FDC3-Compliant it would need to return an IntentResolution:
724
+ *
725
+ * ```js
726
+ * // {
727
+ * // intent: { name: "StartChat", displayName: "Chat" },
728
+ * // apps: [{ name: "Skype" }, { name: "Symphony" }, { name: "Slack" }]
729
+ * // }
730
+ * ```
731
+ *
732
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
733
+ *
734
+ * @param contextForIntent Data passed between entities and applications.
735
+ * @param clientIdentity Identity of the Client making the request.
736
+ *
737
+ * @example
738
+ * ```js
739
+ * fin.Platform.init({
740
+ * interopOverride: async (InteropBroker) => {
741
+ * class Override extends InteropBroker {
742
+ * async handleFiredIntentForContext(contextForIntent, clientIdentity) {
743
+ * // Your code goes here.
744
+ * }
745
+ * }
746
+ * return new Override();
747
+ * }
748
+ * });
749
+ * ```
617
750
  */
618
751
  // eslint-disable-next-line class-methods-use-this
619
752
  async handleFiredIntentForContext(contextForIntent, clientIdentity) {
@@ -624,8 +757,21 @@ class InteropBroker extends base_1.Base {
624
757
  /**
625
758
  * Provides the identity of any Interop Client that disconnects from the Interop Broker. It is meant to be overriden.
626
759
  * @param clientIdentity
627
- * @return { Promise<void> }
628
- * @tutorial interop.clientDisconnected
760
+ *
761
+ * @example
762
+ * ```js
763
+ * fin.Platform.init({
764
+ * interopOverride: async (InteropBroker) => {
765
+ * class Override extends InteropBroker {
766
+ * async clientDisconnected(clientIdentity) {
767
+ * const { uuid, name } = clientIdentity;
768
+ * console.log(`Client with identity ${uuid}/${name} has been disconnected`);
769
+ * }
770
+ * }
771
+ * return new Override();
772
+ * }
773
+ * });
774
+ * ```
629
775
  */
630
776
  // eslint-disable-next-line class-methods-use-this
631
777
  async clientDisconnected(clientIdentity) {
@@ -635,8 +781,8 @@ class InteropBroker extends base_1.Base {
635
781
  /**
636
782
  * Responsible for resolving an fdc3.open call.
637
783
  * Must be overridden.
638
- * @param { Fdc3OpenOptions } fdc3OpenOptions fdc3.open options
639
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
784
+ * @param fdc3OpenOptions fdc3.open options
785
+ * @param clientIdentity Identity of the Client making the request.
640
786
  */
641
787
  // eslint-disable-next-line class-methods-use-this
642
788
  async fdc3HandleOpen({ app, context }, clientIdentity) {
@@ -647,8 +793,8 @@ class InteropBroker extends base_1.Base {
647
793
  /**
648
794
  * Responsible for resolving the fdc3.findInstances call.
649
795
  * Must be overridden
650
- * @param { AppIdentifier(2) } app AppIdentifier that was passed to fdc3.findInstances
651
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
796
+ * @param app AppIdentifier that was passed to fdc3.findInstances
797
+ * @param clientIdentity Identity of the Client making the request.
652
798
  */
653
799
  // eslint-disable-next-line class-methods-use-this
654
800
  async fdc3HandleFindInstances(app, clientIdentity) {
@@ -659,8 +805,8 @@ class InteropBroker extends base_1.Base {
659
805
  /**
660
806
  * Responsible for resolving the fdc3.getAppMetadata call.
661
807
  * Must be overridden
662
- * @param { AppIdentifier(2) } app AppIdentifier that was passed to fdc3.getAppMetadata
663
- * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
808
+ * @param app AppIdentifier that was passed to fdc3.getAppMetadata
809
+ * @param clientIdentity Identity of the Client making the request.
664
810
  */
665
811
  // eslint-disable-next-line class-methods-use-this
666
812
  async fdc3HandleGetAppMetadata(app, clientIdentity) {
@@ -673,11 +819,31 @@ class InteropBroker extends base_1.Base {
673
819
  * For FDC3 2.0 you would need to override this function and add the contextMetadata as
674
820
  * part of the Context object. Then would you need to call
675
821
  * super.invokeContextHandler passing it this new Context object along with the clientIdentity and handlerId
676
- * @param { ClientIdentity } clientIdentity
677
- * @param { string } handlerId
678
- * @param { Context } context
679
- * @returns { Promise<void> }
680
- * @tutorial interopBroker.invokeContextHandler
822
+ * @param clientIdentity
823
+ * @param handlerId
824
+ * @param context
825
+ *
826
+ * @example
827
+ * ```js
828
+ * fin.Platform.init({
829
+ * interopOverride: async (InteropBroker) => {
830
+ * class Override extends InteropBroker {
831
+ * async invokeContextHandler(options, clientIdentity) {
832
+ * return super.invokeContextHandler(clientIdentity, handlerId, {
833
+ * ...context,
834
+ * contextMetadata: {
835
+ * source: {
836
+ * appId: 'openfin-app',
837
+ * instanceId: '3D54D456D9HT0'
838
+ * }
839
+ * }
840
+ * });
841
+ * }
842
+ * }
843
+ * return new Override();
844
+ * }
845
+ * });
846
+ * ```
681
847
  */
682
848
  async invokeContextHandler(clientIdentity, handlerId, context) {
683
849
  const provider = await this.getProvider();
@@ -693,11 +859,35 @@ class InteropBroker extends base_1.Base {
693
859
  * For FDC3 2.0 you would need to override this function and add the contextMetadata as
694
860
  * part of the Context object inside the Intent object. Then would you need to call
695
861
  * super.invokeIntentHandler passing it this new Intent object along with the clientIdentity and handlerId
696
- * @param { ClientIdentity } ClientIdentity
697
- * @param { string } handlerId
698
- * @param { Context } context
699
- * @returns { Promise<void> }
700
- * @tutorial interopBroker.invokeIntentHandler
862
+ * @param ClientIdentity
863
+ * @param handlerId
864
+ * @param context
865
+ *
866
+ * @example
867
+ * ```js
868
+ * fin.Platform.init({
869
+ * interopOverride: async (InteropBroker) => {
870
+ * class Override extends InteropBroker {
871
+ * async invokeIntentHandler(options, clientIdentity) {
872
+ * const { context } = intent;
873
+ * return super.invokeIntentHandler(clientIdentity, handlerId, {
874
+ * ...intent,
875
+ * context: {
876
+ * ...context,
877
+ * contextMetadata: {
878
+ * source: {
879
+ * appId: 'openfin-app',
880
+ * instanceId: '3D54D456D9HT0'
881
+ * }
882
+ * }
883
+ * }
884
+ * });
885
+ * }
886
+ * }
887
+ * return new Override();
888
+ * }
889
+ * });
890
+ * ```
701
891
  */
702
892
  async invokeIntentHandler(clientIdentity, handlerId, intent) {
703
893
  const provider = await this.getProvider();
@@ -705,10 +895,10 @@ class InteropBroker extends base_1.Base {
705
895
  }
706
896
  /**
707
897
  * Responsible for resolving fdc3.getInfo for FDC3 2.0
708
- * Would need to return the optionalFeatures and appMetadata for the {@link ImplementationMetadata ImplementationMetadata}.
898
+ * Would need to return the optionalFeatures and appMetadata for the {@link https://fdc3.finos.org/docs/api/ref/Metadata#implementationmetadata ImplementationMetadata}.
709
899
  * Must be overridden.
710
900
  * @param clientIdentity
711
- * @returns { Promise<ImplementationMetadata(2)> }
901
+ *
712
902
  */
713
903
  // eslint-disable-next-line class-methods-use-this
714
904
  async fdc3HandleGetInfo(payload, clientIdentity) {
@@ -732,8 +922,46 @@ class InteropBroker extends base_1.Base {
732
922
  *
733
923
  * FDC3 2.0: Use the endpointId in the ClientInfo as the instanceId when generating
734
924
  * an AppIdentifier.
735
- * @return { Promise<Array<ClientInfo>> }
736
- * @tutorial interop.getAllClientInfo
925
+ *
926
+ * @remarks FDC3 2.0 Note: When needing an instanceId to generate an AppIdentifier use this call to
927
+ * get the endpointId and use it as the instanceId. In the Example below we override handleFiredIntent
928
+ * and then call super.getAllClientInfo to generate the AppIdentifier for the IntentResolution.
929
+ *
930
+ *
931
+ * @example
932
+ * ```js
933
+ * // FDC3 2.0 Example:
934
+ * fin.Platform.init({
935
+ * interopOverride: async (InteropBroker, ...args) => {
936
+ * class Override extends InteropBroker {
937
+ * async handleFiredIntent(intent) {
938
+ * super.setIntentTarget(intent, { uuid: 'platform-uuid', name: 'intent-view' });
939
+ * const platform = fin.Platform.getCurrentSync();
940
+ * const win = fin.Window.wrapSync({ name: 'foo', uuid: 'platform-uuid' });
941
+ * const createdView = await platform.createView({ url: 'http://openfin.co', name: 'intent-view' }, win.identity);
942
+ *
943
+ * const allClientInfo = await super.getAllClientInfo();
944
+ *
945
+ * const infoForTarget = allClientInfo.find((clientInfo) => {
946
+ * return clientInfo.uuid === 'platform-uuid' && clientInfo.name === 'intent-view';
947
+ * });
948
+ *
949
+ * const source = {
950
+ * appId: 'intent-view',
951
+ * instanceId: infoForTarget.endpointId
952
+ * }
953
+ *
954
+ * return {
955
+ * source,
956
+ * intent: intent.name
957
+ * }
958
+ *
959
+ * }
960
+ * }
961
+ * return new Override(...args);
962
+ * }
963
+ * });
964
+ * ```
737
965
  */
738
966
  async getAllClientInfo() {
739
967
  const provider = await this.getProvider();