@openfin/core 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.
@@ -2265,8 +2265,6 @@ declare class Channel extends EmitterBase<ChannelEvent> {
2265
2265
 
2266
2266
  declare type Channel_2 = OpenFin_2.Fin['InterApplicationBus']['Channel'];
2267
2267
 
2268
- declare type Channel_3 = OpenFin_2.Fin['InterApplicationBus']['Channel'];
2269
-
2270
2268
  declare type ChannelAction = OpenFin_2.ChannelAction;
2271
2269
 
2272
2270
  declare type ChannelAction_2 = (payload: unknown, id: ProviderIdentity_4 | ClientIdentity) => unknown;
@@ -2940,6 +2938,18 @@ declare type ChildWindowCreatedEvent = ContentCreationRulesEvent & {
2940
2938
  childOptions: OpenFin_2.WindowOptions;
2941
2939
  };
2942
2940
 
2941
+ /**
2942
+ * Control behavior for Chromium policies
2943
+ *
2944
+ * @interface
2945
+ */
2946
+ declare type ChromiumPolicies = {
2947
+ /**
2948
+ * Disable AutofillAddressEnabled policy for a Window or View.
2949
+ */
2950
+ AutofillAddressEnabled?: PolicyOptions;
2951
+ };
2952
+
2943
2953
  declare interface ClassicProtocolOffer extends ProtocolPacketBase {
2944
2954
  type: 'classic';
2945
2955
  }
@@ -3408,10 +3418,6 @@ declare type ConstViewOptions = {
3408
3418
  * but the properties in the manifest will take precedence if there is any collision.
3409
3419
  */
3410
3420
  manifestUrl: string;
3411
- /**
3412
- * 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.
3413
- */
3414
- interceptNotifications: boolean;
3415
3421
  zoomLevel: number;
3416
3422
  experimental: any;
3417
3423
  fdc3InteropApi?: string;
@@ -3455,6 +3461,10 @@ declare type ConstViewOptions = {
3455
3461
  */
3456
3462
  enabled: boolean;
3457
3463
  };
3464
+ /**
3465
+ * Control which options to ignore when creating a Platform View.
3466
+ */
3467
+ excludeOptions: ExcludeOptions;
3458
3468
  };
3459
3469
 
3460
3470
  /**
@@ -3585,12 +3595,6 @@ declare type ConstWindowOptions = {
3585
3595
  */
3586
3596
  downloadShelf: DownloadShelfOptions;
3587
3597
  height: number;
3588
- /**
3589
- * @defaultValue false
3590
- * @remarks
3591
- * When set to `true` the platform will intercept all web notifications and instead raise `notification-intercepted` events.
3592
- */
3593
- interceptNotifications: boolean;
3594
3598
  layout: any;
3595
3599
  /**
3596
3600
  * @experimental
@@ -3669,11 +3673,6 @@ declare type ConstWindowOptions = {
3669
3673
  * @deprecated - use `icon` instead.
3670
3674
  */
3671
3675
  taskbarIcon: string;
3672
- /**
3673
- * Specify a taskbar group for the window.
3674
- * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
3675
- */
3676
- taskbarIconGroup: string;
3677
3676
  /**
3678
3677
  * @defaultValue "about:blank"
3679
3678
  *
@@ -3710,6 +3709,10 @@ declare type ConstWindowOptions = {
3710
3709
  * 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.
3711
3710
  */
3712
3711
  inheritance?: Partial<InheritableOptions>;
3712
+ /**
3713
+ * Control which options to ignore when creating a Platform Window.
3714
+ */
3715
+ excludeOptions: ExcludeOptions;
3713
3716
  };
3714
3717
 
3715
3718
  /**
@@ -4711,6 +4714,7 @@ declare interface Environment {
4711
4714
  getInteropInfo(fin: OpenFin_2.Fin<OpenFin_2.EntityType>): Promise<InternalInteropBrokerOptions & {
4712
4715
  fdc3Version?: Version;
4713
4716
  }>;
4717
+ getViewWindowIdentity(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, identity: OpenFin_2.Identity): Promise<OpenFin_2.Identity>;
4714
4718
  readonly type: EnvironmentType;
4715
4719
  }
4716
4720
 
@@ -4744,7 +4748,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
4744
4748
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
4745
4749
  * from which they propagate).
4746
4750
  */
4747
- declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | NotificationCloseRequested;
4751
+ 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;
4748
4752
 
4749
4753
  /**
4750
4754
  * [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.
@@ -4784,7 +4788,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4784
4788
  */
4785
4789
  declare type Event_5<Topic extends string> = {
4786
4790
  topic: Topic;
4787
- } & (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);
4791
+ } & (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);
4788
4792
 
4789
4793
  /**
4790
4794
  * [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
@@ -4889,6 +4893,18 @@ declare type EventType_9 = Event_12['type'];
4889
4893
 
4890
4894
  /* Excluded from this release type: EventWithId */
4891
4895
 
4896
+ /**
4897
+ * @interface
4898
+ */
4899
+ declare type ExcludeOptions = {
4900
+ /**
4901
+ * @defaultValue false
4902
+ *
4903
+ * When true, will not merge default preload scripts from {@link ApplicationOptions.defaultWindowOptions} or {@link ApplicationOptions.defaultViewOptions}.
4904
+ */
4905
+ preloadScripts: boolean;
4906
+ };
4907
+
4892
4908
  /* Excluded from this release type: ExcludeRequested */
4893
4909
 
4894
4910
  declare type ExistingConnectConfig = ConfigWithUuid & {
@@ -4904,6 +4920,105 @@ declare type ExitCode = {
4904
4920
  exitCode: number;
4905
4921
  };
4906
4922
 
4923
+ declare type ExtensionEvent = SecurityRealmEvent & {
4924
+ /**
4925
+ * Runtime extension whose status has been (possibly) modified
4926
+ */
4927
+ extension: string;
4928
+ };
4929
+
4930
+ /**
4931
+ * @interface
4932
+ */
4933
+ declare type ExtensionInfo = {
4934
+ extensionId: string;
4935
+ name: string;
4936
+ enabled: boolean;
4937
+ };
4938
+
4939
+ /**
4940
+ * An event that fires when an extension is installed in the security realm.
4941
+ *
4942
+ * @interface
4943
+ */
4944
+ declare type ExtensionInstalledEvent = ExtensionEvent & {
4945
+ type: 'extension-installed';
4946
+ };
4947
+
4948
+ /**
4949
+ * An event that fires when an extension fails to install in the security realm.
4950
+ *
4951
+ * @interface
4952
+ */
4953
+ declare type ExtensionInstallFailedEvent = ExtensionEvent & {
4954
+ type: 'extension-install-failed';
4955
+ };
4956
+
4957
+ /**
4958
+ * An event that fires when extensions are disabled in the security realm.
4959
+ *
4960
+ * @interface
4961
+ */
4962
+ declare type ExtensionsDisabledEvent = ExtensionsEvent & {
4963
+ type: 'extensions-disabled';
4964
+ };
4965
+
4966
+ /**
4967
+ * An event that fires when extensions are enabled in the security realm.
4968
+ *
4969
+ * @interface
4970
+ */
4971
+ declare type ExtensionsEnabledEvent = ExtensionsEvent & {
4972
+ type: 'extensions-enabled';
4973
+ };
4974
+
4975
+ declare type ExtensionsEvent = SecurityRealmEvent & {
4976
+ /**
4977
+ * Runtime extensions whose status has been (possibly) modified
4978
+ */
4979
+ extensions: string[];
4980
+ };
4981
+
4982
+ /**
4983
+ * An event that fires when requested extensions are not allowed to be installed in the security realm.
4984
+ *
4985
+ * @interface
4986
+ */
4987
+ declare type ExtensionsExcludedEvent = ExtensionsEvent & {
4988
+ type: 'extensions-excluded';
4989
+ };
4990
+
4991
+ /**
4992
+ * An event that fires when extension initialization fails on initial app launch. Users may attempt to
4993
+ * re-initialize extensions by calling {@link System.refreshExtensions}. This event will not fire in response
4994
+ * to manual extension refreshes (users should catch the error normally).
4995
+ */
4996
+ declare type ExtensionsInitializationFailedEvent = Omit<ExtensionsEvent, 'extensions'> & {
4997
+ type: 'extensions-initialization-failed';
4998
+ /**
4999
+ * The error that caused the extension initialization failure
5000
+ */
5001
+ error: Error;
5002
+ };
5003
+
5004
+ /**
5005
+ * An event that fires when extensions are installed in the security realm.
5006
+ *
5007
+ * @interface
5008
+ */
5009
+ declare type ExtensionsInstalledEvent = ExtensionsEvent & {
5010
+ type: 'extensions-installed';
5011
+ };
5012
+
5013
+ /**
5014
+ * An event that fires when extensions fail to install in the security realm.
5015
+ *
5016
+ * @interface
5017
+ */
5018
+ declare type ExtensionsInstallFailedEvent = ExtensionsEvent & {
5019
+ type: 'extensions-install-failed';
5020
+ };
5021
+
4907
5022
  /**
4908
5023
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
4909
5024
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -7533,6 +7648,7 @@ declare type LaunchIntoPlatformPayload = {
7533
7648
  */
7534
7649
  declare class Layout extends Base {
7535
7650
  #private;
7651
+ /* Excluded from this release type: getClient */
7536
7652
  /* Excluded from this release type: init */
7537
7653
  identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
7538
7654
  private platform;
@@ -7632,6 +7748,17 @@ declare class Layout extends Base {
7632
7748
  * ```
7633
7749
  */
7634
7750
  getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
7751
+ /**
7752
+ * Retrieves the OpenFin.TabStack instance which the View belongs to.
7753
+ *
7754
+ * @example
7755
+ * ```js
7756
+ * const viewIdentity = { uuid: 'uuid', name: 'view-name' };
7757
+ * const stack = await fin.View.wrapSync(viewIdentity).getStackByViewIdentity(viewIdentity);
7758
+ * console.log(await stack.getViews());
7759
+ * ```
7760
+ */
7761
+ getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
7635
7762
  /**
7636
7763
  * Replaces the specified view with a view with the provided configuration.
7637
7764
  *
@@ -7685,6 +7812,29 @@ declare class Layout extends Base {
7685
7812
  * ```
7686
7813
  */
7687
7814
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
7815
+ /**
7816
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
7817
+ *
7818
+ * @param viewOptions - The options for creating the view.
7819
+ * @param options - Optional parameters for adding the view.
7820
+ * @param options.location - The location where the view should be added.
7821
+ * @param options.targetView - The target view to which the new view should be added.
7822
+ * @returns A promise that resolves to an object containing the identity of the added view.
7823
+ */
7824
+ addView(viewOptions: OpenFin_2.PlatformViewCreationOptions, { location, targetView }?: {
7825
+ location?: OpenFin_2.CreateViewTarget['location'];
7826
+ targetView?: OpenFin_2.Identity;
7827
+ }): Promise<{
7828
+ identity: OpenFin_2.Identity;
7829
+ }>;
7830
+ /**
7831
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
7832
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
7833
+ *
7834
+ * @param viewIdentity - The identity of the view to close.
7835
+ * @returns A promise that resolves when the view is closed.
7836
+ */
7837
+ closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
7688
7838
  }
7689
7839
 
7690
7840
  /**
@@ -7697,7 +7847,7 @@ declare type LayoutColumn = LayoutItemConfig & {
7697
7847
  /**
7698
7848
  * @interface
7699
7849
  */
7700
- declare type LayoutComponent = LayoutItemConfig & {
7850
+ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
7701
7851
  /**
7702
7852
  * Only a component type will have this property and it should be set to view.
7703
7853
  */
@@ -7706,6 +7856,7 @@ declare type LayoutComponent = LayoutItemConfig & {
7706
7856
  * Only a component type will have this property and it represents the view options of a given component.
7707
7857
  */
7708
7858
  componentState?: Partial<ViewCreationOptions>;
7859
+ type: 'component';
7709
7860
  };
7710
7861
 
7711
7862
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
@@ -7789,10 +7940,7 @@ declare type LayoutIdentity = Identity_4 & {
7789
7940
  declare type LayoutInitializedEvent = BaseEvent_5 & {
7790
7941
  type: 'layout-initialized';
7791
7942
  layoutIdentity: OpenFin_2.LayoutIdentity;
7792
- ofViews: {
7793
- identity: OpenFin_2.Identity;
7794
- entityType: 'view';
7795
- }[];
7943
+ ofViews: OpenFin_2.ViewCreationResult[];
7796
7944
  };
7797
7945
 
7798
7946
  /**
@@ -7900,7 +8048,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
7900
8048
  /**
7901
8049
  * @experimental
7902
8050
  */
7903
- getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity;
8051
+ getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity | undefined;
7904
8052
  /**
7905
8053
  * @experimental
7906
8054
  */
@@ -8001,6 +8149,17 @@ declare class LayoutModule extends Base {
8001
8149
  * ```
8002
8150
  */
8003
8151
  getCurrentSync(): OpenFin_2.Layout;
8152
+ /**
8153
+ * Retrieves the OpenFin.Layout instance for the Window the View is attached to.
8154
+ *
8155
+ * @example
8156
+ * ```js
8157
+ * const viewIdentity = { uuid: 'uuid', name: 'view-name' };
8158
+ * const layout = await fin.Platform.Layout.getLayoutByViewIdentity(viewIdentity);
8159
+ * console.log(await layout.getCurrentViews());
8160
+ * ```
8161
+ */
8162
+ getLayoutByViewIdentity(viewIdentity: OpenFin_2.Identity): Promise<OpenFin_2.Layout>;
8004
8163
  /**
8005
8164
  * Initialize the window's Layout.
8006
8165
  *
@@ -8640,6 +8799,10 @@ declare type MutableViewOptions = {
8640
8799
  * @defaultValue 'enabled'
8641
8800
  */
8642
8801
  throttling: ViewThrottling;
8802
+ /**
8803
+ * {@inheritDoc ChromiumPolicies}
8804
+ */
8805
+ chromiumPolicies: ChromiumPolicies;
8643
8806
  };
8644
8807
 
8645
8808
  /**
@@ -8880,6 +9043,12 @@ declare type MutableWindowOptions = {
8880
9043
  * Shows the window's icon in the taskbar.
8881
9044
  */
8882
9045
  showTaskbarIcon: boolean;
9046
+ /**
9047
+ * Specify a taskbar group for the window.
9048
+ * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
9049
+ * @remarks It's only updatable when `enableJumpList` is set to false.
9050
+ */
9051
+ taskbarIconGroup: string;
8883
9052
  interop: InteropConfig;
8884
9053
  /* Excluded from this release type: _internalWorkspaceData */
8885
9054
  /* Excluded from this release type: workspacePlatform */
@@ -8891,6 +9060,10 @@ declare type MutableWindowOptions = {
8891
9060
  * @remarks If `throttling` option is present, the `backgroundThrottling` option is completely ignored for windows.
8892
9061
  */
8893
9062
  throttling: WindowThrottling;
9063
+ /**
9064
+ * {@inheritDoc ChromiumPolicies}
9065
+ */
9066
+ chromiumPolicies: ChromiumPolicies;
8894
9067
  };
8895
9068
 
8896
9069
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -8998,154 +9171,6 @@ declare type NonPropagatedWindowEvent = never;
8998
9171
 
8999
9172
  /* Excluded from this release type: NotCloseRequested */
9000
9173
 
9001
- declare type NotificationAction_2 = {
9002
- /**
9003
- * Type of action this structure represents (BUTTON, TEXT)
9004
- */
9005
- type: number;
9006
- /**
9007
- * Action name that the author can use to distinguish them.
9008
- */
9009
- action: string;
9010
- /**
9011
- * Title of the action button.
9012
- */
9013
- title: string;
9014
- /**
9015
- * URL of the icon for the button. May be empty if no url was specified.
9016
- */
9017
- icon: string;
9018
- /**
9019
- * Placeholder to display for text-based actions in absence of user input.
9020
- */
9021
- placeholder: string;
9022
- };
9023
-
9024
- /**
9025
- * Emitted when a developer has called .close on a notification which has been interecepted.
9026
- */
9027
- declare type NotificationCloseRequested = BaseEvent_9 & {
9028
- type: 'notification-close-requested';
9029
- notificationId: string;
9030
- };
9031
-
9032
- declare type NotificationData = {
9033
- /**
9034
- * Title to be displayed with the Web Notification.
9035
- */
9036
- title: string;
9037
- /**
9038
- * Hint to determine the directionality of the displayed notification.
9039
- * (LEFT_TO_RIGHT, RIGHT_TO_LEFT, AUTO)
9040
- */
9041
- direction: number;
9042
- /**
9043
- * BCP 47 language tag describing the notification's contents. Optional.
9044
- */
9045
- lang: string;
9046
- /**
9047
- * Contents of the notification.
9048
- */
9049
- body: string;
9050
- /**
9051
- * Tag of the notification. Notifications sharing both their origin and their, tag
9052
- * will replace the first displayed notification.
9053
- */
9054
- tag: string;
9055
- /**
9056
- * URL of the image contents of the notification. May be empty if no url was
9057
- * specified.
9058
- */
9059
- image: string;
9060
- /**
9061
- * URL of the icon which is to be displayed with the notification.
9062
- */
9063
- icon: string;
9064
- /**
9065
- * URL of the badge for representing the notification. May be empty if no url was
9066
- * specified.
9067
- */
9068
- badge: string;
9069
- /**
9070
- * Vibration pattern for the notification, following the syntax of the Vibration
9071
- * API. https://www.w3.org/TR/vibration/
9072
- */
9073
- vibration_pattern: number[];
9074
- /**
9075
- * The time at which the event the notification represents took place.
9076
- */
9077
- timestamp: string;
9078
- /**
9079
- * Whether default notification indicators (sound, vibration, light) should be
9080
- * played again if the notification is replacing an older notification.
9081
- */
9082
- renotify: boolean;
9083
- /**
9084
- * Whether default notification indicators (sound, vibration, light) should be
9085
- * played again if the notification is replacing an older notification.
9086
- */
9087
- silent: boolean;
9088
- /**
9089
- * Whether the notification should remain onscreen indefinitely, rather than being
9090
- * auto-minimized to the notification center (if allowed by platform).
9091
- */
9092
- requireInteraction: boolean;
9093
- /**
9094
- * Base64 encoded Developer-provided data associated with the notification, in the
9095
- * form of a serialized string. Must not exceed |kMaximumDeveloperDataSize| bytes.
9096
- */
9097
- data: string;
9098
- /**
9099
- * Actions that should be shown as buttons on the notification.
9100
- */
9101
- actions: NotificationAction_2[];
9102
- /**
9103
- * The time at which the notification should be shown.
9104
- */
9105
- showTriggerTimestamp?: string | null;
9106
- /**
9107
- * Scenarios that define the notification behavior. (DEFAULT, INCOMING_CALL)
9108
- */
9109
- scenario: number;
9110
- };
9111
-
9112
- declare type NotificationInterceptedEvent = NamedEvent & {
9113
- type: 'notification-intercepted';
9114
- /**
9115
- * id of the notification
9116
- */
9117
- notificationId: string;
9118
- /**
9119
- * origin of the notification
9120
- */
9121
- origin: string;
9122
- /**
9123
- * empty if notification comes from worker
9124
- */
9125
- documentUrl: string;
9126
- notificationData: NotificationData;
9127
- /**
9128
- * Image for the notification. The bitmap may be empty if the developer did not
9129
- * provide an image, or fetching of the image failed.
9130
- */
9131
- image: SerializedImage;
9132
- /**
9133
- * Main icon for the notification. The bitmap may be empty if the developer did not
9134
- * provide an icon, or fetching of the icon failed.
9135
- */
9136
- notificationIcon: SerializedImage;
9137
- /**
9138
- * Badge for the notification. The bitmap may be empty if the developer did not
9139
- * provide a badge, or fetching of the badge failed.
9140
- */
9141
- badge: SerializedImage;
9142
- /**
9143
- * Icons for the actions. A bitmap may be empty if the developer did not provide an
9144
- * icon, or fetching of the icon failed.
9145
- */
9146
- actionIcons: SerializedImage[];
9147
- };
9148
-
9149
9174
  /* Excluded from this release type: NotRequested */
9150
9175
 
9151
9176
  /**
@@ -9249,8 +9274,11 @@ declare namespace OpenFin_2 {
9249
9274
  ViewVisibilityOptions,
9250
9275
  WindowState,
9251
9276
  AutoplayPolicyOptions,
9277
+ ExcludeOptions,
9252
9278
  ConstWindowOptions,
9253
9279
  InheritableOptions,
9280
+ PolicyOptions,
9281
+ ChromiumPolicies,
9254
9282
  MutableWindowOptions,
9255
9283
  WorkspacePlatformOptions,
9256
9284
  WebRequestHeader,
@@ -9284,6 +9312,9 @@ declare namespace OpenFin_2 {
9284
9312
  ViewOptions,
9285
9313
  ConstViewOptions,
9286
9314
  ViewState,
9315
+ ViewCreationSuccess,
9316
+ ViewCreationFailure,
9317
+ ViewCreationResult,
9287
9318
  Certificate,
9288
9319
  HostContextChangedPayload,
9289
9320
  ApplySnapshotOptions,
@@ -9529,6 +9560,7 @@ declare namespace OpenFin_2 {
9529
9560
  RoutingInfo,
9530
9561
  DownloadShelfOptions,
9531
9562
  ViewShowAtOptions,
9563
+ ExtensionInfo,
9532
9564
  ApplicationEvents,
9533
9565
  BaseEvents,
9534
9566
  ExternalApplicationEvents,
@@ -9732,6 +9764,10 @@ declare type PerDomainSettings = {
9732
9764
  * {@link ContentRedirect} in {@link WindowOptions} and {@link ViewOptions} will be **ignored**.
9733
9765
  */
9734
9766
  content?: ContentPermission;
9767
+ /**
9768
+ * {@inheritdoc ChromiumPolicies}
9769
+ */
9770
+ chromiumPolicies?: ChromiumPolicies;
9735
9771
  };
9736
9772
 
9737
9773
  /**
@@ -9777,6 +9813,7 @@ declare class Platform extends EmitterBase<OpenFin_2.PlatformEvent> {
9777
9813
  private _channel;
9778
9814
  Application: OpenFin_2.Application;
9779
9815
  identity: OpenFin_2.ApplicationIdentity;
9816
+ /* Excluded from this release type: clientMap */
9780
9817
  /* Excluded from this release type: __constructor */
9781
9818
  getClient: (identity?: OpenFin_2.ApplicationIdentity) => Promise<ChannelClient_2>;
9782
9819
  /**
@@ -11086,6 +11123,45 @@ declare interface PlatformProvider {
11086
11123
  * @returns {Promise<void>}
11087
11124
  */
11088
11125
  handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
11126
+ /**
11127
+ * @experimental
11128
+ *
11129
+ * This method is called to handle errors with view creation and initial navigation during layout creation.
11130
+ * Overriding this method enables catching the error and correcting behavior (ie navigating to an error page).
11131
+ * * To indicate that the error has been handled, view creation should be treated as successful return {identity: viewIdentity, success: true}.
11132
+ * * Not returning anything will cause the layout-initialized event to include the view as failed with the original error.
11133
+ * * Throwing an error will update the error on the event payload of layout-initialized to the thrown error.
11134
+ *
11135
+ * @param viewIdentity Identity of the view
11136
+ * @param error error thrown during a view creation
11137
+ * @returns {Promise<OpenFin.ViewCreationSuccess | void>}
11138
+ *
11139
+ * @example
11140
+ *
11141
+ * ```js
11142
+ * const overrideCallback = (PlatformProvider) => {
11143
+ * class Override extends PlatformProvider {
11144
+ * async handleFailedViewCreation(viewIdentity, error) {
11145
+ * const view = fin.View.wrapSync(viewId);
11146
+ * try {
11147
+ * // navigate to an error page
11148
+ * await view.navigate('http://localhost:3000/errorPage.html');
11149
+ * // resolve a success result after redirecting to a error page
11150
+ * return {identity: viewIdentity, success: true};
11151
+ * } catch(e) {
11152
+ * // layout-initialized event will include this view with the error
11153
+ * throw error;
11154
+ * }
11155
+ * }
11156
+ * }
11157
+ * return new Override();
11158
+ * }
11159
+ *
11160
+ * fin.Platform.init({ overrideCallback });
11161
+ *
11162
+ * ```
11163
+ */
11164
+ handleFailedViewCreation(viewIdentity: OpenFin_2.Identity, error: Error): Promise<OpenFin_2.ViewCreationSuccess | void>;
11089
11165
  }
11090
11166
 
11091
11167
  /**
@@ -11150,6 +11226,12 @@ declare type PointTopLeft = {
11150
11226
  left: number;
11151
11227
  };
11152
11228
 
11229
+ /**
11230
+ * When set to `disable`, disables the policy
11231
+ * When set to `defer-to-group-policy`, respects Group Policy settings
11232
+ */
11233
+ declare type PolicyOptions = 'disable' | 'defer-to-group-policy';
11234
+
11153
11235
  declare type PopupBaseBehavior = 'close' | 'hide';
11154
11236
 
11155
11237
  declare type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
@@ -12007,13 +12089,6 @@ declare interface ProtocolMap extends ProtocolMapBase {
12007
12089
  'get-version': GetterCall<string>;
12008
12090
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
12009
12091
  'delete-cache-request': VoidCall;
12010
- 'dispatch-notification-action': {
12011
- request: {
12012
- notificationId: string;
12013
- action: 'click' | 'close' | 'show';
12014
- };
12015
- response: void;
12016
- };
12017
12092
  'exit-desktop': VoidCall;
12018
12093
  'fetch-manifest': ApiCall<{
12019
12094
  manifestUrl: string;
@@ -12044,6 +12119,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
12044
12119
  response: string;
12045
12120
  };
12046
12121
  'get-focused-window': GetterCall<OpenFin_2.Identity | null>;
12122
+ 'get-focused-content': GetterCall<(OpenFin_2.Identity & {
12123
+ entityType: 'window' | 'view';
12124
+ }) | null>;
12047
12125
  'is-app-certified': {
12048
12126
  request: {
12049
12127
  manifestUrl: string;
@@ -12172,6 +12250,14 @@ declare interface ProtocolMap extends ProtocolMapBase {
12172
12250
  }, void>;
12173
12251
  'system-register-shutdown-handler': VoidCall;
12174
12252
  'get-permissions': GetterCall<any>;
12253
+ 'refresh-extensions': {
12254
+ request: void;
12255
+ response: string[] | undefined;
12256
+ };
12257
+ 'get-installed-extensions': {
12258
+ request: void;
12259
+ response: OpenFin_2.ExtensionInfo[];
12260
+ };
12175
12261
  'fdc3-add-context-listener': VoidCall;
12176
12262
  'fdc3-add-intent-listener': VoidCall;
12177
12263
  'fdc3-raise-intent': VoidCall;
@@ -12860,6 +12946,21 @@ declare type ScreenshotPrintOptions = {
12860
12946
  content: 'screenshot';
12861
12947
  };
12862
12948
 
12949
+ /**
12950
+ * An event generated when an application modifies the runtime in a way that affects all other applications in the
12951
+ * application runtime/security realm.
12952
+ */
12953
+ declare type SecurityRealmEvent = BaseEvent_9 & {
12954
+ /**
12955
+ * Config URL of the application that modified the security realm's extensions
12956
+ */
12957
+ configUrl: string;
12958
+ /**
12959
+ * Identity of the application that modified the security realm's extensions
12960
+ */
12961
+ applicationIdentity: OpenFin_2.ApplicationIdentity;
12962
+ };
12963
+
12863
12964
  declare type SendActionResponse<T extends keyof ProtocolMap> = Message<{
12864
12965
  data: ProtocolMap[T]['response'];
12865
12966
  } & ProtocolMap[T]['specialResponse']>;
@@ -12876,11 +12977,6 @@ declare type SentMessage<Value> = Promise<Value> & {
12876
12977
  messageId: ReturnType<Environment['getNextMessageId']>;
12877
12978
  };
12878
12979
 
12879
- /**
12880
- * Utility type to mark an image serialized as a base64 data URL.
12881
- */
12882
- declare type SerializedImage = string;
12883
-
12884
12980
  /**
12885
12981
  * @interface
12886
12982
  */
@@ -13317,13 +13413,6 @@ declare type SubscriptionOptions = {
13317
13413
  */
13318
13414
  declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
13319
13415
  /* Excluded from this release type: __constructor */
13320
- /**
13321
- * Dispatch an event to the webcontents that created the notification.
13322
- * Only works for notifications that have been intercepted in the same runtime.
13323
- */
13324
- dispatchNotificationAction(notificationId: string, { action }: {
13325
- action: 'click' | 'close' | 'show';
13326
- }): Promise<void>;
13327
13416
  private sendExternalProcessRequest;
13328
13417
  /**
13329
13418
  * Returns the version of the runtime. The version contains the major, minor,
@@ -13502,7 +13591,9 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
13502
13591
  */
13503
13592
  getEnvironmentVariable(envName: string): Promise<string>;
13504
13593
  /**
13505
- * Get current focused window.
13594
+ * Get currently focused Window.
13595
+ * If a View currently has focus, returns the identity of View's parent Window.
13596
+ * Use {@link Window._Window#getFocusedContent Window.getFocusedContent} to directly access currently focused Window or View.
13506
13597
  *
13507
13598
  * @example
13508
13599
  * ```js
@@ -13510,6 +13601,17 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
13510
13601
  * ```
13511
13602
  */
13512
13603
  getFocusedWindow(): Promise<OpenFin_2.Identity | null>;
13604
+ /**
13605
+ * Get currently focused content. Returns identity of entity with `entityType`.
13606
+ *
13607
+ * @example
13608
+ * ```js
13609
+ * fin.System.getFocusedContent().then(contentIdentity => console.log(contentIdentity)).catch(err => console.log(err));
13610
+ * ```
13611
+ */
13612
+ getFocusedContent(): Promise<(OpenFin_2.Identity & {
13613
+ entityType: 'window' | 'view';
13614
+ }) | null>;
13513
13615
  /**
13514
13616
  * Returns information about the given app's certification status
13515
13617
  *
@@ -14763,6 +14865,16 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
14763
14865
  * ```
14764
14866
  */
14765
14867
  setDomainSettings(domainSettings: OpenFin_2.DefaultDomainSettings): Promise<void>;
14868
+ /**
14869
+ * Attempts to install and enable extensions for the security realm. Users may want to call this function in response
14870
+ * to an `extensions-install-failed` event. Only extensions allowed by every application on the current security realm
14871
+ * will be installed/enabled.
14872
+ */
14873
+ refreshExtensions(): Promise<string[] | undefined>;
14874
+ /**
14875
+ * Gets the currently-installed
14876
+ */
14877
+ getInstalledExtensions(): Promise<OpenFin_2.ExtensionInfo[]>;
14766
14878
  }
14767
14879
 
14768
14880
  /**
@@ -14780,7 +14892,6 @@ declare namespace SystemEvents {
14780
14892
  IdleStateChangedEvent,
14781
14893
  IdleEvent,
14782
14894
  MonitorInfoChangedEvent,
14783
- NotificationCloseRequested,
14784
14895
  MonitorEvent,
14785
14896
  SessionChangedEvent,
14786
14897
  AppVersionEvent,
@@ -14794,6 +14905,14 @@ declare namespace SystemEvents {
14794
14905
  ApplicationCreatedEvent,
14795
14906
  DesktopIconClickedEvent,
14796
14907
  SystemShutdownEvent,
14908
+ ExtensionsEnabledEvent,
14909
+ ExtensionsDisabledEvent,
14910
+ ExtensionsExcludedEvent,
14911
+ ExtensionsInstalledEvent,
14912
+ ExtensionInstalledEvent,
14913
+ ExtensionsInstallFailedEvent,
14914
+ ExtensionInstallFailedEvent,
14915
+ ExtensionsInitializationFailedEvent,
14797
14916
  Event_11 as Event,
14798
14917
  SystemEvent,
14799
14918
  EventType_8 as EventType,
@@ -15598,7 +15717,7 @@ declare class View_2 extends WebContents<OpenFin_2.ViewEvent> {
15598
15717
  */
15599
15718
  getInfo: () => Promise<OpenFin_2.ViewInfo>;
15600
15719
  /**
15601
- * Retrieves the layout for the window the view is attached to.
15720
+ * Retrieves the OpenFin.Layout instance for the Window the View is attached to.
15602
15721
  *
15603
15722
  * @example
15604
15723
  * ```js
@@ -15762,6 +15881,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
15762
15881
  options?: Partial<ViewOptions>;
15763
15882
  };
15764
15883
 
15884
+ /**
15885
+ * @interface
15886
+ */
15887
+ declare type ViewCreationFailure = {
15888
+ /**
15889
+ * The identity of the created view
15890
+ */
15891
+ identity: Identity_4;
15892
+ /**
15893
+ * Whether the view was created with errors
15894
+ */
15895
+ success: false;
15896
+ /**
15897
+ * Error thrown during view creation
15898
+ */
15899
+ error: Error;
15900
+ };
15901
+
15765
15902
  /**
15766
15903
  * The options object required by {@link View.ViewModule.create View.create}.
15767
15904
  *
@@ -15777,6 +15914,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
15777
15914
 
15778
15915
  declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformViewCreationOptions;
15779
15916
 
15917
+ /**
15918
+ * A view creation state
15919
+ */
15920
+ declare type ViewCreationResult = ViewCreationSuccess | ViewCreationFailure;
15921
+
15922
+ /**
15923
+ * @interface
15924
+ */
15925
+ declare type ViewCreationSuccess = {
15926
+ /**
15927
+ * The identity of the created view
15928
+ */
15929
+ identity: Identity_4;
15930
+ /**
15931
+ * Whether the view was created without errors
15932
+ */
15933
+ success: true;
15934
+ };
15935
+
15780
15936
  /**
15781
15937
  * Generated when a window has a view detached from it.
15782
15938
  * @remarks Will fire when a view is destroyed in which case `target` will be null.
@@ -15938,6 +16094,9 @@ declare class ViewModule extends Base {
15938
16094
  */
15939
16095
  declare type ViewOptions = ConstViewOptions & MutableViewOptions;
15940
16096
 
16097
+ /**
16098
+ * @interface
16099
+ */
15941
16100
  declare type ViewShowAtOptions = {
15942
16101
  /**
15943
16102
  * Sets the view as the top level view. See {@link OpenFin.View.bringToFront} for more information.
@@ -17024,10 +17183,6 @@ declare namespace WebContentsEvents {
17024
17183
  FileDownloadProgressEvent,
17025
17184
  FileDownloadCompletedEvent,
17026
17185
  ContentBlockedEvent,
17027
- SerializedImage,
17028
- NotificationAction_2 as NotificationAction,
17029
- NotificationData,
17030
- NotificationInterceptedEvent,
17031
17186
  Event_5 as Event,
17032
17187
  WebContentsEvent,
17033
17188
  WillPropagateWebContentsEvent,