@openfin/fdc3-api 40.200.2 → 41.83.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/fdc3-api.d.ts CHANGED
@@ -2301,8 +2301,6 @@ declare class Channel extends EmitterBase<ChannelEvent> {
2301
2301
 
2302
2302
  declare type Channel_2 = OpenFin.Fin['InterApplicationBus']['Channel'];
2303
2303
 
2304
- declare type Channel_3 = OpenFin.Fin['InterApplicationBus']['Channel'];
2305
-
2306
2304
  declare type ChannelAction = OpenFin.ChannelAction;
2307
2305
 
2308
2306
  declare type ChannelAction_2 = (payload: unknown, id: ProviderIdentity_4 | ClientIdentity) => unknown;
@@ -2993,6 +2991,18 @@ declare type ChildWindowCreatedEvent = ContentCreationRulesEvent & {
2993
2991
  childOptions: OpenFin.WindowOptions;
2994
2992
  };
2995
2993
 
2994
+ /**
2995
+ * Control behavior for Chromium policies
2996
+ *
2997
+ * @interface
2998
+ */
2999
+ declare type ChromiumPolicies = {
3000
+ /**
3001
+ * Disable AutofillAddressEnabled policy for a Window or View.
3002
+ */
3003
+ AutofillAddressEnabled?: PolicyOptions;
3004
+ };
3005
+
2996
3006
  declare interface ClassicProtocolOffer extends ProtocolPacketBase {
2997
3007
  type: 'classic';
2998
3008
  }
@@ -3464,10 +3474,6 @@ declare type ConstViewOptions = {
3464
3474
  * but the properties in the manifest will take precedence if there is any collision.
3465
3475
  */
3466
3476
  manifestUrl: string;
3467
- /**
3468
- * If true, the view's call to the Web Notifications API will be intercepted by the platform. The event `notification-intercepted` will be emitted with the notification object as the payload.
3469
- */
3470
- interceptNotifications: boolean;
3471
3477
  zoomLevel: number;
3472
3478
  experimental: any;
3473
3479
  fdc3InteropApi?: string;
@@ -3511,6 +3517,10 @@ declare type ConstViewOptions = {
3511
3517
  */
3512
3518
  enabled: boolean;
3513
3519
  };
3520
+ /**
3521
+ * Control which options to ignore when creating a Platform View.
3522
+ */
3523
+ excludeOptions: ExcludeOptions;
3514
3524
  };
3515
3525
 
3516
3526
  /**
@@ -3641,12 +3651,6 @@ declare type ConstWindowOptions = {
3641
3651
  */
3642
3652
  downloadShelf: DownloadShelfOptions;
3643
3653
  height: number;
3644
- /**
3645
- * @defaultValue false
3646
- * @remarks
3647
- * When set to `true` the platform will intercept all web notifications and instead raise `notification-intercepted` events.
3648
- */
3649
- interceptNotifications: boolean;
3650
3654
  layout: any;
3651
3655
  /**
3652
3656
  * @experimental
@@ -3725,11 +3729,6 @@ declare type ConstWindowOptions = {
3725
3729
  * @deprecated - use `icon` instead.
3726
3730
  */
3727
3731
  taskbarIcon: string;
3728
- /**
3729
- * Specify a taskbar group for the window.
3730
- * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
3731
- */
3732
- taskbarIconGroup: string;
3733
3732
  /**
3734
3733
  * @defaultValue "about:blank"
3735
3734
  *
@@ -3766,6 +3765,10 @@ declare type ConstWindowOptions = {
3766
3765
  * Controls whether an option is inherited from the parent application. The option is set as part of the window options for the parent application in either the {@link Manifest.startup_app} or {@link Manifest.platform} properties in the manifest or in {@link ApplicationOptions.mainWindowOptions} when calling {@link Application.ApplicationModule.start Application.start}. Use { [option]: false } to disable a specific [option]. All inheritable properties will be inherited by default if omitted.
3767
3766
  */
3768
3767
  inheritance?: Partial<InheritableOptions>;
3768
+ /**
3769
+ * Control which options to ignore when creating a Platform Window.
3770
+ */
3771
+ excludeOptions: ExcludeOptions;
3769
3772
  };
3770
3773
 
3771
3774
  /**
@@ -4772,6 +4775,7 @@ declare interface Environment {
4772
4775
  getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
4773
4776
  fdc3Version?: Version;
4774
4777
  }>;
4778
+ getViewWindowIdentity(fin: OpenFin.Fin<OpenFin.EntityType>, identity: OpenFin.Identity): Promise<OpenFin.Identity>;
4775
4779
  readonly type: EnvironmentType;
4776
4780
  }
4777
4781
 
@@ -4805,7 +4809,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
4805
4809
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
4806
4810
  * from which they propagate).
4807
4811
  */
4808
- declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | NotificationCloseRequested;
4812
+ declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent;
4809
4813
 
4810
4814
  /**
4811
4815
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by the HTMLElement Layout container.
@@ -4845,7 +4849,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4845
4849
  */
4846
4850
  declare type Event_5<Topic extends string> = {
4847
4851
  topic: Topic;
4848
- } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent | NotificationInterceptedEvent);
4852
+ } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent);
4849
4853
 
4850
4854
  /**
4851
4855
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
@@ -4959,6 +4963,18 @@ declare type EventWithId<Event extends AppVersionEvent> = Event extends infer E
4959
4963
  appVersionId: string;
4960
4964
  } : never;
4961
4965
 
4966
+ /**
4967
+ * @interface
4968
+ */
4969
+ declare type ExcludeOptions = {
4970
+ /**
4971
+ * @defaultValue false
4972
+ *
4973
+ * When true, will not merge default preload scripts from {@link ApplicationOptions.defaultWindowOptions} or {@link ApplicationOptions.defaultViewOptions}.
4974
+ */
4975
+ preloadScripts: boolean;
4976
+ };
4977
+
4962
4978
  /**
4963
4979
  * @internal
4964
4980
  *
@@ -4983,6 +4999,105 @@ declare type ExitCode = {
4983
4999
  exitCode: number;
4984
5000
  };
4985
5001
 
5002
+ declare type ExtensionEvent = SecurityRealmEvent & {
5003
+ /**
5004
+ * Runtime extension whose status has been (possibly) modified
5005
+ */
5006
+ extension: string;
5007
+ };
5008
+
5009
+ /**
5010
+ * @interface
5011
+ */
5012
+ declare type ExtensionInfo = {
5013
+ extensionId: string;
5014
+ name: string;
5015
+ enabled: boolean;
5016
+ };
5017
+
5018
+ /**
5019
+ * An event that fires when an extension is installed in the security realm.
5020
+ *
5021
+ * @interface
5022
+ */
5023
+ declare type ExtensionInstalledEvent = ExtensionEvent & {
5024
+ type: 'extension-installed';
5025
+ };
5026
+
5027
+ /**
5028
+ * An event that fires when an extension fails to install in the security realm.
5029
+ *
5030
+ * @interface
5031
+ */
5032
+ declare type ExtensionInstallFailedEvent = ExtensionEvent & {
5033
+ type: 'extension-install-failed';
5034
+ };
5035
+
5036
+ /**
5037
+ * An event that fires when extensions are disabled in the security realm.
5038
+ *
5039
+ * @interface
5040
+ */
5041
+ declare type ExtensionsDisabledEvent = ExtensionsEvent & {
5042
+ type: 'extensions-disabled';
5043
+ };
5044
+
5045
+ /**
5046
+ * An event that fires when extensions are enabled in the security realm.
5047
+ *
5048
+ * @interface
5049
+ */
5050
+ declare type ExtensionsEnabledEvent = ExtensionsEvent & {
5051
+ type: 'extensions-enabled';
5052
+ };
5053
+
5054
+ declare type ExtensionsEvent = SecurityRealmEvent & {
5055
+ /**
5056
+ * Runtime extensions whose status has been (possibly) modified
5057
+ */
5058
+ extensions: string[];
5059
+ };
5060
+
5061
+ /**
5062
+ * An event that fires when requested extensions are not allowed to be installed in the security realm.
5063
+ *
5064
+ * @interface
5065
+ */
5066
+ declare type ExtensionsExcludedEvent = ExtensionsEvent & {
5067
+ type: 'extensions-excluded';
5068
+ };
5069
+
5070
+ /**
5071
+ * An event that fires when extension initialization fails on initial app launch. Users may attempt to
5072
+ * re-initialize extensions by calling {@link System.refreshExtensions}. This event will not fire in response
5073
+ * to manual extension refreshes (users should catch the error normally).
5074
+ */
5075
+ declare type ExtensionsInitializationFailedEvent = Omit<ExtensionsEvent, 'extensions'> & {
5076
+ type: 'extensions-initialization-failed';
5077
+ /**
5078
+ * The error that caused the extension initialization failure
5079
+ */
5080
+ error: Error;
5081
+ };
5082
+
5083
+ /**
5084
+ * An event that fires when extensions are installed in the security realm.
5085
+ *
5086
+ * @interface
5087
+ */
5088
+ declare type ExtensionsInstalledEvent = ExtensionsEvent & {
5089
+ type: 'extensions-installed';
5090
+ };
5091
+
5092
+ /**
5093
+ * An event that fires when extensions fail to install in the security realm.
5094
+ *
5095
+ * @interface
5096
+ */
5097
+ declare type ExtensionsInstallFailedEvent = ExtensionsEvent & {
5098
+ type: 'extensions-install-failed';
5099
+ };
5100
+
4986
5101
  /**
4987
5102
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
4988
5103
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -7992,6 +8107,10 @@ declare type LaunchIntoPlatformPayload = {
7992
8107
  */
7993
8108
  declare class Layout extends Base {
7994
8109
  #private;
8110
+ /**
8111
+ * @internal
8112
+ */
8113
+ static getClient(layout: Layout): Promise<LayoutEntitiesClient>;
7995
8114
  /**
7996
8115
  * @internal
7997
8116
  */
@@ -8097,6 +8216,17 @@ declare class Layout extends Base {
8097
8216
  * ```
8098
8217
  */
8099
8218
  getRootItem(): Promise<OpenFin.ColumnOrRow | OpenFin.TabStack>;
8219
+ /**
8220
+ * Retrieves the OpenFin.TabStack instance which the View belongs to.
8221
+ *
8222
+ * @example
8223
+ * ```js
8224
+ * const viewIdentity = { uuid: 'uuid', name: 'view-name' };
8225
+ * const stack = await fin.View.wrapSync(viewIdentity).getStackByViewIdentity(viewIdentity);
8226
+ * console.log(await stack.getViews());
8227
+ * ```
8228
+ */
8229
+ getStackByViewIdentity(identity: OpenFin.Identity): Promise<OpenFin.TabStack>;
8100
8230
  /**
8101
8231
  * Replaces the specified view with a view with the provided configuration.
8102
8232
  *
@@ -8150,6 +8280,29 @@ declare class Layout extends Base {
8150
8280
  * ```
8151
8281
  */
8152
8282
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
8283
+ /**
8284
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
8285
+ *
8286
+ * @param viewOptions - The options for creating the view.
8287
+ * @param options - Optional parameters for adding the view.
8288
+ * @param options.location - The location where the view should be added.
8289
+ * @param options.targetView - The target view to which the new view should be added.
8290
+ * @returns A promise that resolves to an object containing the identity of the added view.
8291
+ */
8292
+ addView(viewOptions: OpenFin.PlatformViewCreationOptions, { location, targetView }?: {
8293
+ location?: OpenFin.CreateViewTarget['location'];
8294
+ targetView?: OpenFin.Identity;
8295
+ }): Promise<{
8296
+ identity: OpenFin.Identity;
8297
+ }>;
8298
+ /**
8299
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
8300
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
8301
+ *
8302
+ * @param viewIdentity - The identity of the view to close.
8303
+ * @returns A promise that resolves when the view is closed.
8304
+ */
8305
+ closeView(viewIdentity: OpenFin.Identity): Promise<void>;
8153
8306
  }
8154
8307
 
8155
8308
  /**
@@ -8162,7 +8315,7 @@ declare type LayoutColumn = LayoutItemConfig & {
8162
8315
  /**
8163
8316
  * @interface
8164
8317
  */
8165
- declare type LayoutComponent = LayoutItemConfig & {
8318
+ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
8166
8319
  /**
8167
8320
  * Only a component type will have this property and it should be set to view.
8168
8321
  */
@@ -8171,6 +8324,7 @@ declare type LayoutComponent = LayoutItemConfig & {
8171
8324
  * Only a component type will have this property and it represents the view options of a given component.
8172
8325
  */
8173
8326
  componentState?: Partial<ViewCreationOptions>;
8327
+ type: 'component';
8174
8328
  };
8175
8329
 
8176
8330
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
@@ -8254,10 +8408,7 @@ declare type LayoutIdentity = Identity_4 & {
8254
8408
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8255
8409
  type: 'layout-initialized';
8256
8410
  layoutIdentity: OpenFin.LayoutIdentity;
8257
- ofViews: {
8258
- identity: OpenFin.Identity;
8259
- entityType: 'view';
8260
- }[];
8411
+ ofViews: OpenFin.ViewCreationResult[];
8261
8412
  };
8262
8413
 
8263
8414
  /**
@@ -8365,7 +8516,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8365
8516
  /**
8366
8517
  * @experimental
8367
8518
  */
8368
- getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity;
8519
+ getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity | undefined;
8369
8520
  /**
8370
8521
  * @experimental
8371
8522
  */
@@ -8466,6 +8617,17 @@ declare class LayoutModule extends Base {
8466
8617
  * ```
8467
8618
  */
8468
8619
  getCurrentSync(): OpenFin.Layout;
8620
+ /**
8621
+ * Retrieves the OpenFin.Layout instance for the Window the View is attached to.
8622
+ *
8623
+ * @example
8624
+ * ```js
8625
+ * const viewIdentity = { uuid: 'uuid', name: 'view-name' };
8626
+ * const layout = await fin.Platform.Layout.getLayoutByViewIdentity(viewIdentity);
8627
+ * console.log(await layout.getCurrentViews());
8628
+ * ```
8629
+ */
8630
+ getLayoutByViewIdentity(viewIdentity: OpenFin.Identity): Promise<OpenFin.Layout>;
8469
8631
  /**
8470
8632
  * Initialize the window's Layout.
8471
8633
  *
@@ -9279,6 +9441,10 @@ declare type MutableViewOptions = {
9279
9441
  * @defaultValue 'enabled'
9280
9442
  */
9281
9443
  throttling: ViewThrottling;
9444
+ /**
9445
+ * {@inheritDoc ChromiumPolicies}
9446
+ */
9447
+ chromiumPolicies: ChromiumPolicies;
9282
9448
  };
9283
9449
 
9284
9450
  /**
@@ -9519,6 +9685,12 @@ declare type MutableWindowOptions = {
9519
9685
  * Shows the window's icon in the taskbar.
9520
9686
  */
9521
9687
  showTaskbarIcon: boolean;
9688
+ /**
9689
+ * Specify a taskbar group for the window.
9690
+ * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
9691
+ * @remarks It's only updatable when `enableJumpList` is set to false.
9692
+ */
9693
+ taskbarIconGroup: string;
9522
9694
  interop: InteropConfig;
9523
9695
  /**
9524
9696
  * @internal
@@ -9538,6 +9710,10 @@ declare type MutableWindowOptions = {
9538
9710
  * @remarks If `throttling` option is present, the `backgroundThrottling` option is completely ignored for windows.
9539
9711
  */
9540
9712
  throttling: WindowThrottling;
9713
+ /**
9714
+ * {@inheritDoc ChromiumPolicies}
9715
+ */
9716
+ chromiumPolicies: ChromiumPolicies;
9541
9717
  };
9542
9718
 
9543
9719
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9650,154 +9826,6 @@ declare type NonPropagatedWindowEvent = never;
9650
9826
  */
9651
9827
  declare type NotCloseRequested<EventType extends string> = Exclude<EventType, 'close-requested'>;
9652
9828
 
9653
- declare type NotificationAction_2 = {
9654
- /**
9655
- * Type of action this structure represents (BUTTON, TEXT)
9656
- */
9657
- type: number;
9658
- /**
9659
- * Action name that the author can use to distinguish them.
9660
- */
9661
- action: string;
9662
- /**
9663
- * Title of the action button.
9664
- */
9665
- title: string;
9666
- /**
9667
- * URL of the icon for the button. May be empty if no url was specified.
9668
- */
9669
- icon: string;
9670
- /**
9671
- * Placeholder to display for text-based actions in absence of user input.
9672
- */
9673
- placeholder: string;
9674
- };
9675
-
9676
- /**
9677
- * Emitted when a developer has called .close on a notification which has been interecepted.
9678
- */
9679
- declare type NotificationCloseRequested = BaseEvent_9 & {
9680
- type: 'notification-close-requested';
9681
- notificationId: string;
9682
- };
9683
-
9684
- declare type NotificationData = {
9685
- /**
9686
- * Title to be displayed with the Web Notification.
9687
- */
9688
- title: string;
9689
- /**
9690
- * Hint to determine the directionality of the displayed notification.
9691
- * (LEFT_TO_RIGHT, RIGHT_TO_LEFT, AUTO)
9692
- */
9693
- direction: number;
9694
- /**
9695
- * BCP 47 language tag describing the notification's contents. Optional.
9696
- */
9697
- lang: string;
9698
- /**
9699
- * Contents of the notification.
9700
- */
9701
- body: string;
9702
- /**
9703
- * Tag of the notification. Notifications sharing both their origin and their, tag
9704
- * will replace the first displayed notification.
9705
- */
9706
- tag: string;
9707
- /**
9708
- * URL of the image contents of the notification. May be empty if no url was
9709
- * specified.
9710
- */
9711
- image: string;
9712
- /**
9713
- * URL of the icon which is to be displayed with the notification.
9714
- */
9715
- icon: string;
9716
- /**
9717
- * URL of the badge for representing the notification. May be empty if no url was
9718
- * specified.
9719
- */
9720
- badge: string;
9721
- /**
9722
- * Vibration pattern for the notification, following the syntax of the Vibration
9723
- * API. https://www.w3.org/TR/vibration/
9724
- */
9725
- vibration_pattern: number[];
9726
- /**
9727
- * The time at which the event the notification represents took place.
9728
- */
9729
- timestamp: string;
9730
- /**
9731
- * Whether default notification indicators (sound, vibration, light) should be
9732
- * played again if the notification is replacing an older notification.
9733
- */
9734
- renotify: boolean;
9735
- /**
9736
- * Whether default notification indicators (sound, vibration, light) should be
9737
- * played again if the notification is replacing an older notification.
9738
- */
9739
- silent: boolean;
9740
- /**
9741
- * Whether the notification should remain onscreen indefinitely, rather than being
9742
- * auto-minimized to the notification center (if allowed by platform).
9743
- */
9744
- requireInteraction: boolean;
9745
- /**
9746
- * Base64 encoded Developer-provided data associated with the notification, in the
9747
- * form of a serialized string. Must not exceed |kMaximumDeveloperDataSize| bytes.
9748
- */
9749
- data: string;
9750
- /**
9751
- * Actions that should be shown as buttons on the notification.
9752
- */
9753
- actions: NotificationAction_2[];
9754
- /**
9755
- * The time at which the notification should be shown.
9756
- */
9757
- showTriggerTimestamp?: string | null;
9758
- /**
9759
- * Scenarios that define the notification behavior. (DEFAULT, INCOMING_CALL)
9760
- */
9761
- scenario: number;
9762
- };
9763
-
9764
- declare type NotificationInterceptedEvent = NamedEvent & {
9765
- type: 'notification-intercepted';
9766
- /**
9767
- * id of the notification
9768
- */
9769
- notificationId: string;
9770
- /**
9771
- * origin of the notification
9772
- */
9773
- origin: string;
9774
- /**
9775
- * empty if notification comes from worker
9776
- */
9777
- documentUrl: string;
9778
- notificationData: NotificationData;
9779
- /**
9780
- * Image for the notification. The bitmap may be empty if the developer did not
9781
- * provide an image, or fetching of the image failed.
9782
- */
9783
- image: SerializedImage;
9784
- /**
9785
- * Main icon for the notification. The bitmap may be empty if the developer did not
9786
- * provide an icon, or fetching of the icon failed.
9787
- */
9788
- notificationIcon: SerializedImage;
9789
- /**
9790
- * Badge for the notification. The bitmap may be empty if the developer did not
9791
- * provide a badge, or fetching of the badge failed.
9792
- */
9793
- badge: SerializedImage;
9794
- /**
9795
- * Icons for the actions. A bitmap may be empty if the developer did not provide an
9796
- * icon, or fetching of the icon failed.
9797
- */
9798
- actionIcons: SerializedImage[];
9799
- };
9800
-
9801
9829
  /**
9802
9830
  * @internal
9803
9831
  *
@@ -9906,8 +9934,11 @@ declare namespace OpenFin {
9906
9934
  ViewVisibilityOptions,
9907
9935
  WindowState,
9908
9936
  AutoplayPolicyOptions,
9937
+ ExcludeOptions,
9909
9938
  ConstWindowOptions,
9910
9939
  InheritableOptions,
9940
+ PolicyOptions,
9941
+ ChromiumPolicies,
9911
9942
  MutableWindowOptions,
9912
9943
  WorkspacePlatformOptions,
9913
9944
  WebRequestHeader,
@@ -9941,6 +9972,9 @@ declare namespace OpenFin {
9941
9972
  ViewOptions,
9942
9973
  ConstViewOptions,
9943
9974
  ViewState,
9975
+ ViewCreationSuccess,
9976
+ ViewCreationFailure,
9977
+ ViewCreationResult,
9944
9978
  Certificate,
9945
9979
  HostContextChangedPayload,
9946
9980
  ApplySnapshotOptions,
@@ -10186,6 +10220,7 @@ declare namespace OpenFin {
10186
10220
  RoutingInfo,
10187
10221
  DownloadShelfOptions,
10188
10222
  ViewShowAtOptions,
10223
+ ExtensionInfo,
10189
10224
  ApplicationEvents,
10190
10225
  BaseEvents,
10191
10226
  ExternalApplicationEvents,
@@ -10387,6 +10422,10 @@ declare type PerDomainSettings = {
10387
10422
  * {@link ContentRedirect} in {@link WindowOptions} and {@link ViewOptions} will be **ignored**.
10388
10423
  */
10389
10424
  content?: ContentPermission;
10425
+ /**
10426
+ * {@inheritdoc ChromiumPolicies}
10427
+ */
10428
+ chromiumPolicies?: ChromiumPolicies;
10390
10429
  };
10391
10430
 
10392
10431
  /**
@@ -10434,8 +10473,14 @@ declare class Platform extends EmitterBase<OpenFin.PlatformEvent> {
10434
10473
  identity: OpenFin.ApplicationIdentity;
10435
10474
  /**
10436
10475
  * @internal
10476
+ * Reuse clients to avoid overwriting already-registered client in provider
10477
+ * This ensures that only channel client is created per channel name per `fin` instance
10437
10478
  */
10438
- constructor(identity: OpenFin.ApplicationIdentity, channel: Channel_3);
10479
+ private static clientMap;
10480
+ /**
10481
+ * @internal
10482
+ */
10483
+ constructor(wire: Transport, identity: OpenFin.ApplicationIdentity, channelName?: string);
10439
10484
  getClient: (identity?: OpenFin.ApplicationIdentity) => Promise<ChannelClient_2>;
10440
10485
  /**
10441
10486
  * Creates a new view and attaches it to a specified target window.
@@ -11819,6 +11864,45 @@ declare interface PlatformProvider {
11819
11864
  * @returns {Promise<void>}
11820
11865
  */
11821
11866
  handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
11867
+ /**
11868
+ * @experimental
11869
+ *
11870
+ * This method is called to handle errors with view creation and initial navigation during layout creation.
11871
+ * Overriding this method enables catching the error and correcting behavior (ie navigating to an error page).
11872
+ * * To indicate that the error has been handled, view creation should be treated as successful return {identity: viewIdentity, success: true}.
11873
+ * * Not returning anything will cause the layout-initialized event to include the view as failed with the original error.
11874
+ * * Throwing an error will update the error on the event payload of layout-initialized to the thrown error.
11875
+ *
11876
+ * @param viewIdentity Identity of the view
11877
+ * @param error error thrown during a view creation
11878
+ * @returns {Promise<OpenFin.ViewCreationSuccess | void>}
11879
+ *
11880
+ * @example
11881
+ *
11882
+ * ```js
11883
+ * const overrideCallback = (PlatformProvider) => {
11884
+ * class Override extends PlatformProvider {
11885
+ * async handleFailedViewCreation(viewIdentity, error) {
11886
+ * const view = fin.View.wrapSync(viewId);
11887
+ * try {
11888
+ * // navigate to an error page
11889
+ * await view.navigate('http://localhost:3000/errorPage.html');
11890
+ * // resolve a success result after redirecting to a error page
11891
+ * return {identity: viewIdentity, success: true};
11892
+ * } catch(e) {
11893
+ * // layout-initialized event will include this view with the error
11894
+ * throw error;
11895
+ * }
11896
+ * }
11897
+ * }
11898
+ * return new Override();
11899
+ * }
11900
+ *
11901
+ * fin.Platform.init({ overrideCallback });
11902
+ *
11903
+ * ```
11904
+ */
11905
+ handleFailedViewCreation(viewIdentity: OpenFin.Identity, error: Error): Promise<OpenFin.ViewCreationSuccess | void>;
11822
11906
  }
11823
11907
 
11824
11908
  /**
@@ -11883,6 +11967,12 @@ declare type PointTopLeft = {
11883
11967
  left: number;
11884
11968
  };
11885
11969
 
11970
+ /**
11971
+ * When set to `disable`, disables the policy
11972
+ * When set to `defer-to-group-policy`, respects Group Policy settings
11973
+ */
11974
+ declare type PolicyOptions = 'disable' | 'defer-to-group-policy';
11975
+
11886
11976
  declare type PopupBaseBehavior = 'close' | 'hide';
11887
11977
 
11888
11978
  declare type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
@@ -12740,13 +12830,6 @@ declare interface ProtocolMap extends ProtocolMapBase {
12740
12830
  'get-version': GetterCall<string>;
12741
12831
  'clear-cache': ApiCall<OpenFin.ClearCacheOption, void>;
12742
12832
  'delete-cache-request': VoidCall;
12743
- 'dispatch-notification-action': {
12744
- request: {
12745
- notificationId: string;
12746
- action: 'click' | 'close' | 'show';
12747
- };
12748
- response: void;
12749
- };
12750
12833
  'exit-desktop': VoidCall;
12751
12834
  'fetch-manifest': ApiCall<{
12752
12835
  manifestUrl: string;
@@ -12777,6 +12860,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
12777
12860
  response: string;
12778
12861
  };
12779
12862
  'get-focused-window': GetterCall<OpenFin.Identity | null>;
12863
+ 'get-focused-content': GetterCall<(OpenFin.Identity & {
12864
+ entityType: 'window' | 'view';
12865
+ }) | null>;
12780
12866
  'is-app-certified': {
12781
12867
  request: {
12782
12868
  manifestUrl: string;
@@ -12905,6 +12991,14 @@ declare interface ProtocolMap extends ProtocolMapBase {
12905
12991
  }, void>;
12906
12992
  'system-register-shutdown-handler': VoidCall;
12907
12993
  'get-permissions': GetterCall<any>;
12994
+ 'refresh-extensions': {
12995
+ request: void;
12996
+ response: string[] | undefined;
12997
+ };
12998
+ 'get-installed-extensions': {
12999
+ request: void;
13000
+ response: OpenFin.ExtensionInfo[];
13001
+ };
12908
13002
  'fdc3-add-context-listener': VoidCall;
12909
13003
  'fdc3-add-intent-listener': VoidCall;
12910
13004
  'fdc3-raise-intent': VoidCall;
@@ -13593,6 +13687,21 @@ declare type ScreenshotPrintOptions = {
13593
13687
  content: 'screenshot';
13594
13688
  };
13595
13689
 
13690
+ /**
13691
+ * An event generated when an application modifies the runtime in a way that affects all other applications in the
13692
+ * application runtime/security realm.
13693
+ */
13694
+ declare type SecurityRealmEvent = BaseEvent_9 & {
13695
+ /**
13696
+ * Config URL of the application that modified the security realm's extensions
13697
+ */
13698
+ configUrl: string;
13699
+ /**
13700
+ * Identity of the application that modified the security realm's extensions
13701
+ */
13702
+ applicationIdentity: OpenFin.ApplicationIdentity;
13703
+ };
13704
+
13596
13705
  declare type SendActionResponse<T extends keyof ProtocolMap> = Message<{
13597
13706
  data: ProtocolMap[T]['response'];
13598
13707
  } & ProtocolMap[T]['specialResponse']>;
@@ -13609,11 +13718,6 @@ declare type SentMessage<Value> = Promise<Value> & {
13609
13718
  messageId: ReturnType<Environment['getNextMessageId']>;
13610
13719
  };
13611
13720
 
13612
- /**
13613
- * Utility type to mark an image serialized as a base64 data URL.
13614
- */
13615
- declare type SerializedImage = string;
13616
-
13617
13721
  /**
13618
13722
  * @interface
13619
13723
  */
@@ -14056,13 +14160,6 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
14056
14160
  * @internal
14057
14161
  */
14058
14162
  constructor(wire: Transport);
14059
- /**
14060
- * Dispatch an event to the webcontents that created the notification.
14061
- * Only works for notifications that have been intercepted in the same runtime.
14062
- */
14063
- dispatchNotificationAction(notificationId: string, { action }: {
14064
- action: 'click' | 'close' | 'show';
14065
- }): Promise<void>;
14066
14163
  private sendExternalProcessRequest;
14067
14164
  /**
14068
14165
  * Returns the version of the runtime. The version contains the major, minor,
@@ -14241,7 +14338,9 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
14241
14338
  */
14242
14339
  getEnvironmentVariable(envName: string): Promise<string>;
14243
14340
  /**
14244
- * Get current focused window.
14341
+ * Get currently focused Window.
14342
+ * If a View currently has focus, returns the identity of View's parent Window.
14343
+ * Use {@link Window._Window#getFocusedContent Window.getFocusedContent} to directly access currently focused Window or View.
14245
14344
  *
14246
14345
  * @example
14247
14346
  * ```js
@@ -14249,6 +14348,17 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
14249
14348
  * ```
14250
14349
  */
14251
14350
  getFocusedWindow(): Promise<OpenFin.Identity | null>;
14351
+ /**
14352
+ * Get currently focused content. Returns identity of entity with `entityType`.
14353
+ *
14354
+ * @example
14355
+ * ```js
14356
+ * fin.System.getFocusedContent().then(contentIdentity => console.log(contentIdentity)).catch(err => console.log(err));
14357
+ * ```
14358
+ */
14359
+ getFocusedContent(): Promise<(OpenFin.Identity & {
14360
+ entityType: 'window' | 'view';
14361
+ }) | null>;
14252
14362
  /**
14253
14363
  * Returns information about the given app's certification status
14254
14364
  *
@@ -15502,6 +15612,16 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
15502
15612
  * ```
15503
15613
  */
15504
15614
  setDomainSettings(domainSettings: OpenFin.DefaultDomainSettings): Promise<void>;
15615
+ /**
15616
+ * Attempts to install and enable extensions for the security realm. Users may want to call this function in response
15617
+ * to an `extensions-install-failed` event. Only extensions allowed by every application on the current security realm
15618
+ * will be installed/enabled.
15619
+ */
15620
+ refreshExtensions(): Promise<string[] | undefined>;
15621
+ /**
15622
+ * Gets the currently-installed
15623
+ */
15624
+ getInstalledExtensions(): Promise<OpenFin.ExtensionInfo[]>;
15505
15625
  }
15506
15626
 
15507
15627
  /**
@@ -15519,7 +15639,6 @@ declare namespace SystemEvents {
15519
15639
  IdleStateChangedEvent,
15520
15640
  IdleEvent,
15521
15641
  MonitorInfoChangedEvent,
15522
- NotificationCloseRequested,
15523
15642
  MonitorEvent,
15524
15643
  SessionChangedEvent,
15525
15644
  AppVersionEvent,
@@ -15533,6 +15652,14 @@ declare namespace SystemEvents {
15533
15652
  ApplicationCreatedEvent,
15534
15653
  DesktopIconClickedEvent,
15535
15654
  SystemShutdownEvent,
15655
+ ExtensionsEnabledEvent,
15656
+ ExtensionsDisabledEvent,
15657
+ ExtensionsExcludedEvent,
15658
+ ExtensionsInstalledEvent,
15659
+ ExtensionInstalledEvent,
15660
+ ExtensionsInstallFailedEvent,
15661
+ ExtensionInstallFailedEvent,
15662
+ ExtensionsInitializationFailedEvent,
15536
15663
  Event_11 as Event,
15537
15664
  SystemEvent,
15538
15665
  EventType_8 as EventType,
@@ -16453,7 +16580,7 @@ declare class View_2 extends WebContents<OpenFin.ViewEvent> {
16453
16580
  */
16454
16581
  getInfo: () => Promise<OpenFin.ViewInfo>;
16455
16582
  /**
16456
- * Retrieves the layout for the window the view is attached to.
16583
+ * Retrieves the OpenFin.Layout instance for the Window the View is attached to.
16457
16584
  *
16458
16585
  * @example
16459
16586
  * ```js
@@ -16651,6 +16778,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
16651
16778
  options?: Partial<ViewOptions>;
16652
16779
  };
16653
16780
 
16781
+ /**
16782
+ * @interface
16783
+ */
16784
+ declare type ViewCreationFailure = {
16785
+ /**
16786
+ * The identity of the created view
16787
+ */
16788
+ identity: Identity_4;
16789
+ /**
16790
+ * Whether the view was created with errors
16791
+ */
16792
+ success: false;
16793
+ /**
16794
+ * Error thrown during view creation
16795
+ */
16796
+ error: Error;
16797
+ };
16798
+
16654
16799
  /**
16655
16800
  * The options object required by {@link View.ViewModule.create View.create}.
16656
16801
  *
@@ -16666,6 +16811,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
16666
16811
 
16667
16812
  declare type ViewCreationOrReference = OpenFin.Identity | OpenFin.PlatformViewCreationOptions;
16668
16813
 
16814
+ /**
16815
+ * A view creation state
16816
+ */
16817
+ declare type ViewCreationResult = ViewCreationSuccess | ViewCreationFailure;
16818
+
16819
+ /**
16820
+ * @interface
16821
+ */
16822
+ declare type ViewCreationSuccess = {
16823
+ /**
16824
+ * The identity of the created view
16825
+ */
16826
+ identity: Identity_4;
16827
+ /**
16828
+ * Whether the view was created without errors
16829
+ */
16830
+ success: true;
16831
+ };
16832
+
16669
16833
  /**
16670
16834
  * Generated when a window has a view detached from it.
16671
16835
  * @remarks Will fire when a view is destroyed in which case `target` will be null.
@@ -16827,6 +16991,9 @@ declare class ViewModule extends Base {
16827
16991
  */
16828
16992
  declare type ViewOptions = ConstViewOptions & MutableViewOptions;
16829
16993
 
16994
+ /**
16995
+ * @interface
16996
+ */
16830
16997
  declare type ViewShowAtOptions = {
16831
16998
  /**
16832
16999
  * Sets the view as the top level view. See {@link OpenFin.View.bringToFront} for more information.
@@ -17913,10 +18080,6 @@ declare namespace WebContentsEvents {
17913
18080
  FileDownloadProgressEvent,
17914
18081
  FileDownloadCompletedEvent,
17915
18082
  ContentBlockedEvent,
17916
- SerializedImage,
17917
- NotificationAction_2 as NotificationAction,
17918
- NotificationData,
17919
- NotificationInterceptedEvent,
17920
18083
  Event_5 as Event,
17921
18084
  WebContentsEvent,
17922
18085
  WillPropagateWebContentsEvent,