@openfin/core 40.200.2 → 41.83.2

Sign up to get free protection for your applications and to get access to all the features.
package/out/mock.d.ts CHANGED
@@ -2304,8 +2304,6 @@ declare class Channel extends EmitterBase<ChannelEvent> {
2304
2304
 
2305
2305
  declare type Channel_2 = OpenFin_2.Fin['InterApplicationBus']['Channel'];
2306
2306
 
2307
- declare type Channel_3 = OpenFin_2.Fin['InterApplicationBus']['Channel'];
2308
-
2309
2307
  declare type ChannelAction = OpenFin_2.ChannelAction;
2310
2308
 
2311
2309
  declare type ChannelAction_2 = (payload: unknown, id: ProviderIdentity_4 | ClientIdentity) => unknown;
@@ -2996,6 +2994,18 @@ declare type ChildWindowCreatedEvent = ContentCreationRulesEvent & {
2996
2994
  childOptions: OpenFin_2.WindowOptions;
2997
2995
  };
2998
2996
 
2997
+ /**
2998
+ * Control behavior for Chromium policies
2999
+ *
3000
+ * @interface
3001
+ */
3002
+ declare type ChromiumPolicies = {
3003
+ /**
3004
+ * Disable AutofillAddressEnabled policy for a Window or View.
3005
+ */
3006
+ AutofillAddressEnabled?: PolicyOptions;
3007
+ };
3008
+
2999
3009
  declare interface ClassicProtocolOffer extends ProtocolPacketBase {
3000
3010
  type: 'classic';
3001
3011
  }
@@ -3467,10 +3477,6 @@ declare type ConstViewOptions = {
3467
3477
  * but the properties in the manifest will take precedence if there is any collision.
3468
3478
  */
3469
3479
  manifestUrl: string;
3470
- /**
3471
- * 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.
3472
- */
3473
- interceptNotifications: boolean;
3474
3480
  zoomLevel: number;
3475
3481
  experimental: any;
3476
3482
  fdc3InteropApi?: string;
@@ -3514,6 +3520,10 @@ declare type ConstViewOptions = {
3514
3520
  */
3515
3521
  enabled: boolean;
3516
3522
  };
3523
+ /**
3524
+ * Control which options to ignore when creating a Platform View.
3525
+ */
3526
+ excludeOptions: ExcludeOptions;
3517
3527
  };
3518
3528
 
3519
3529
  /**
@@ -3644,12 +3654,6 @@ declare type ConstWindowOptions = {
3644
3654
  */
3645
3655
  downloadShelf: DownloadShelfOptions;
3646
3656
  height: number;
3647
- /**
3648
- * @defaultValue false
3649
- * @remarks
3650
- * When set to `true` the platform will intercept all web notifications and instead raise `notification-intercepted` events.
3651
- */
3652
- interceptNotifications: boolean;
3653
3657
  layout: any;
3654
3658
  /**
3655
3659
  * @experimental
@@ -3728,11 +3732,6 @@ declare type ConstWindowOptions = {
3728
3732
  * @deprecated - use `icon` instead.
3729
3733
  */
3730
3734
  taskbarIcon: string;
3731
- /**
3732
- * Specify a taskbar group for the window.
3733
- * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
3734
- */
3735
- taskbarIconGroup: string;
3736
3735
  /**
3737
3736
  * @defaultValue "about:blank"
3738
3737
  *
@@ -3769,6 +3768,10 @@ declare type ConstWindowOptions = {
3769
3768
  * 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.
3770
3769
  */
3771
3770
  inheritance?: Partial<InheritableOptions>;
3771
+ /**
3772
+ * Control which options to ignore when creating a Platform Window.
3773
+ */
3774
+ excludeOptions: ExcludeOptions;
3772
3775
  };
3773
3776
 
3774
3777
  /**
@@ -4775,6 +4778,7 @@ declare interface Environment {
4775
4778
  getInteropInfo(fin: OpenFin_2.Fin<OpenFin_2.EntityType>): Promise<InternalInteropBrokerOptions & {
4776
4779
  fdc3Version?: Version;
4777
4780
  }>;
4781
+ getViewWindowIdentity(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, identity: OpenFin_2.Identity): Promise<OpenFin_2.Identity>;
4778
4782
  readonly type: EnvironmentType;
4779
4783
  }
4780
4784
 
@@ -4808,7 +4812,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
4808
4812
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
4809
4813
  * from which they propagate).
4810
4814
  */
4811
- declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | NotificationCloseRequested;
4815
+ 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;
4812
4816
 
4813
4817
  /**
4814
4818
  * [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.
@@ -4848,7 +4852,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4848
4852
  */
4849
4853
  declare type Event_5<Topic extends string> = {
4850
4854
  topic: Topic;
4851
- } & (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);
4855
+ } & (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);
4852
4856
 
4853
4857
  /**
4854
4858
  * [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
@@ -4962,6 +4966,18 @@ declare type EventWithId<Event extends AppVersionEvent> = Event extends infer E
4962
4966
  appVersionId: string;
4963
4967
  } : never;
4964
4968
 
4969
+ /**
4970
+ * @interface
4971
+ */
4972
+ declare type ExcludeOptions = {
4973
+ /**
4974
+ * @defaultValue false
4975
+ *
4976
+ * When true, will not merge default preload scripts from {@link ApplicationOptions.defaultWindowOptions} or {@link ApplicationOptions.defaultViewOptions}.
4977
+ */
4978
+ preloadScripts: boolean;
4979
+ };
4980
+
4965
4981
  /**
4966
4982
  * @internal
4967
4983
  *
@@ -4986,6 +5002,105 @@ declare type ExitCode = {
4986
5002
  exitCode: number;
4987
5003
  };
4988
5004
 
5005
+ declare type ExtensionEvent = SecurityRealmEvent & {
5006
+ /**
5007
+ * Runtime extension whose status has been (possibly) modified
5008
+ */
5009
+ extension: string;
5010
+ };
5011
+
5012
+ /**
5013
+ * @interface
5014
+ */
5015
+ declare type ExtensionInfo = {
5016
+ extensionId: string;
5017
+ name: string;
5018
+ enabled: boolean;
5019
+ };
5020
+
5021
+ /**
5022
+ * An event that fires when an extension is installed in the security realm.
5023
+ *
5024
+ * @interface
5025
+ */
5026
+ declare type ExtensionInstalledEvent = ExtensionEvent & {
5027
+ type: 'extension-installed';
5028
+ };
5029
+
5030
+ /**
5031
+ * An event that fires when an extension fails to install in the security realm.
5032
+ *
5033
+ * @interface
5034
+ */
5035
+ declare type ExtensionInstallFailedEvent = ExtensionEvent & {
5036
+ type: 'extension-install-failed';
5037
+ };
5038
+
5039
+ /**
5040
+ * An event that fires when extensions are disabled in the security realm.
5041
+ *
5042
+ * @interface
5043
+ */
5044
+ declare type ExtensionsDisabledEvent = ExtensionsEvent & {
5045
+ type: 'extensions-disabled';
5046
+ };
5047
+
5048
+ /**
5049
+ * An event that fires when extensions are enabled in the security realm.
5050
+ *
5051
+ * @interface
5052
+ */
5053
+ declare type ExtensionsEnabledEvent = ExtensionsEvent & {
5054
+ type: 'extensions-enabled';
5055
+ };
5056
+
5057
+ declare type ExtensionsEvent = SecurityRealmEvent & {
5058
+ /**
5059
+ * Runtime extensions whose status has been (possibly) modified
5060
+ */
5061
+ extensions: string[];
5062
+ };
5063
+
5064
+ /**
5065
+ * An event that fires when requested extensions are not allowed to be installed in the security realm.
5066
+ *
5067
+ * @interface
5068
+ */
5069
+ declare type ExtensionsExcludedEvent = ExtensionsEvent & {
5070
+ type: 'extensions-excluded';
5071
+ };
5072
+
5073
+ /**
5074
+ * An event that fires when extension initialization fails on initial app launch. Users may attempt to
5075
+ * re-initialize extensions by calling {@link System.refreshExtensions}. This event will not fire in response
5076
+ * to manual extension refreshes (users should catch the error normally).
5077
+ */
5078
+ declare type ExtensionsInitializationFailedEvent = Omit<ExtensionsEvent, 'extensions'> & {
5079
+ type: 'extensions-initialization-failed';
5080
+ /**
5081
+ * The error that caused the extension initialization failure
5082
+ */
5083
+ error: Error;
5084
+ };
5085
+
5086
+ /**
5087
+ * An event that fires when extensions are installed in the security realm.
5088
+ *
5089
+ * @interface
5090
+ */
5091
+ declare type ExtensionsInstalledEvent = ExtensionsEvent & {
5092
+ type: 'extensions-installed';
5093
+ };
5094
+
5095
+ /**
5096
+ * An event that fires when extensions fail to install in the security realm.
5097
+ *
5098
+ * @interface
5099
+ */
5100
+ declare type ExtensionsInstallFailedEvent = ExtensionsEvent & {
5101
+ type: 'extensions-install-failed';
5102
+ };
5103
+
4989
5104
  /**
4990
5105
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
4991
5106
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -7650,6 +7765,10 @@ declare type LaunchIntoPlatformPayload = {
7650
7765
  */
7651
7766
  declare class Layout extends Base {
7652
7767
  #private;
7768
+ /**
7769
+ * @internal
7770
+ */
7771
+ static getClient(layout: Layout): Promise<LayoutEntitiesClient>;
7653
7772
  /**
7654
7773
  * @internal
7655
7774
  */
@@ -7755,6 +7874,17 @@ declare class Layout extends Base {
7755
7874
  * ```
7756
7875
  */
7757
7876
  getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
7877
+ /**
7878
+ * Retrieves the OpenFin.TabStack instance which the View belongs to.
7879
+ *
7880
+ * @example
7881
+ * ```js
7882
+ * const viewIdentity = { uuid: 'uuid', name: 'view-name' };
7883
+ * const stack = await fin.View.wrapSync(viewIdentity).getStackByViewIdentity(viewIdentity);
7884
+ * console.log(await stack.getViews());
7885
+ * ```
7886
+ */
7887
+ getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
7758
7888
  /**
7759
7889
  * Replaces the specified view with a view with the provided configuration.
7760
7890
  *
@@ -7808,6 +7938,29 @@ declare class Layout extends Base {
7808
7938
  * ```
7809
7939
  */
7810
7940
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
7941
+ /**
7942
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
7943
+ *
7944
+ * @param viewOptions - The options for creating the view.
7945
+ * @param options - Optional parameters for adding the view.
7946
+ * @param options.location - The location where the view should be added.
7947
+ * @param options.targetView - The target view to which the new view should be added.
7948
+ * @returns A promise that resolves to an object containing the identity of the added view.
7949
+ */
7950
+ addView(viewOptions: OpenFin_2.PlatformViewCreationOptions, { location, targetView }?: {
7951
+ location?: OpenFin_2.CreateViewTarget['location'];
7952
+ targetView?: OpenFin_2.Identity;
7953
+ }): Promise<{
7954
+ identity: OpenFin_2.Identity;
7955
+ }>;
7956
+ /**
7957
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
7958
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
7959
+ *
7960
+ * @param viewIdentity - The identity of the view to close.
7961
+ * @returns A promise that resolves when the view is closed.
7962
+ */
7963
+ closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
7811
7964
  }
7812
7965
 
7813
7966
  /**
@@ -7820,7 +7973,7 @@ declare type LayoutColumn = LayoutItemConfig & {
7820
7973
  /**
7821
7974
  * @interface
7822
7975
  */
7823
- declare type LayoutComponent = LayoutItemConfig & {
7976
+ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
7824
7977
  /**
7825
7978
  * Only a component type will have this property and it should be set to view.
7826
7979
  */
@@ -7829,6 +7982,7 @@ declare type LayoutComponent = LayoutItemConfig & {
7829
7982
  * Only a component type will have this property and it represents the view options of a given component.
7830
7983
  */
7831
7984
  componentState?: Partial<ViewCreationOptions>;
7985
+ type: 'component';
7832
7986
  };
7833
7987
 
7834
7988
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
@@ -7912,10 +8066,7 @@ declare type LayoutIdentity = Identity_4 & {
7912
8066
  declare type LayoutInitializedEvent = BaseEvent_5 & {
7913
8067
  type: 'layout-initialized';
7914
8068
  layoutIdentity: OpenFin_2.LayoutIdentity;
7915
- ofViews: {
7916
- identity: OpenFin_2.Identity;
7917
- entityType: 'view';
7918
- }[];
8069
+ ofViews: OpenFin_2.ViewCreationResult[];
7919
8070
  };
7920
8071
 
7921
8072
  /**
@@ -8023,7 +8174,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8023
8174
  /**
8024
8175
  * @experimental
8025
8176
  */
8026
- getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity;
8177
+ getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity | undefined;
8027
8178
  /**
8028
8179
  * @experimental
8029
8180
  */
@@ -8124,6 +8275,17 @@ declare class LayoutModule extends Base {
8124
8275
  * ```
8125
8276
  */
8126
8277
  getCurrentSync(): OpenFin_2.Layout;
8278
+ /**
8279
+ * Retrieves the OpenFin.Layout instance for the Window the View is attached to.
8280
+ *
8281
+ * @example
8282
+ * ```js
8283
+ * const viewIdentity = { uuid: 'uuid', name: 'view-name' };
8284
+ * const layout = await fin.Platform.Layout.getLayoutByViewIdentity(viewIdentity);
8285
+ * console.log(await layout.getCurrentViews());
8286
+ * ```
8287
+ */
8288
+ getLayoutByViewIdentity(viewIdentity: OpenFin_2.Identity): Promise<OpenFin_2.Layout>;
8127
8289
  /**
8128
8290
  * Initialize the window's Layout.
8129
8291
  *
@@ -8937,6 +9099,10 @@ declare type MutableViewOptions = {
8937
9099
  * @defaultValue 'enabled'
8938
9100
  */
8939
9101
  throttling: ViewThrottling;
9102
+ /**
9103
+ * {@inheritDoc ChromiumPolicies}
9104
+ */
9105
+ chromiumPolicies: ChromiumPolicies;
8940
9106
  };
8941
9107
 
8942
9108
  /**
@@ -9177,6 +9343,12 @@ declare type MutableWindowOptions = {
9177
9343
  * Shows the window's icon in the taskbar.
9178
9344
  */
9179
9345
  showTaskbarIcon: boolean;
9346
+ /**
9347
+ * Specify a taskbar group for the window.
9348
+ * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
9349
+ * @remarks It's only updatable when `enableJumpList` is set to false.
9350
+ */
9351
+ taskbarIconGroup: string;
9180
9352
  interop: InteropConfig;
9181
9353
  /**
9182
9354
  * @internal
@@ -9196,6 +9368,10 @@ declare type MutableWindowOptions = {
9196
9368
  * @remarks If `throttling` option is present, the `backgroundThrottling` option is completely ignored for windows.
9197
9369
  */
9198
9370
  throttling: WindowThrottling;
9371
+ /**
9372
+ * {@inheritDoc ChromiumPolicies}
9373
+ */
9374
+ chromiumPolicies: ChromiumPolicies;
9199
9375
  };
9200
9376
 
9201
9377
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9308,154 +9484,6 @@ declare type NonPropagatedWindowEvent = never;
9308
9484
  */
9309
9485
  declare type NotCloseRequested<EventType extends string> = Exclude<EventType, 'close-requested'>;
9310
9486
 
9311
- declare type NotificationAction_2 = {
9312
- /**
9313
- * Type of action this structure represents (BUTTON, TEXT)
9314
- */
9315
- type: number;
9316
- /**
9317
- * Action name that the author can use to distinguish them.
9318
- */
9319
- action: string;
9320
- /**
9321
- * Title of the action button.
9322
- */
9323
- title: string;
9324
- /**
9325
- * URL of the icon for the button. May be empty if no url was specified.
9326
- */
9327
- icon: string;
9328
- /**
9329
- * Placeholder to display for text-based actions in absence of user input.
9330
- */
9331
- placeholder: string;
9332
- };
9333
-
9334
- /**
9335
- * Emitted when a developer has called .close on a notification which has been interecepted.
9336
- */
9337
- declare type NotificationCloseRequested = BaseEvent_9 & {
9338
- type: 'notification-close-requested';
9339
- notificationId: string;
9340
- };
9341
-
9342
- declare type NotificationData = {
9343
- /**
9344
- * Title to be displayed with the Web Notification.
9345
- */
9346
- title: string;
9347
- /**
9348
- * Hint to determine the directionality of the displayed notification.
9349
- * (LEFT_TO_RIGHT, RIGHT_TO_LEFT, AUTO)
9350
- */
9351
- direction: number;
9352
- /**
9353
- * BCP 47 language tag describing the notification's contents. Optional.
9354
- */
9355
- lang: string;
9356
- /**
9357
- * Contents of the notification.
9358
- */
9359
- body: string;
9360
- /**
9361
- * Tag of the notification. Notifications sharing both their origin and their, tag
9362
- * will replace the first displayed notification.
9363
- */
9364
- tag: string;
9365
- /**
9366
- * URL of the image contents of the notification. May be empty if no url was
9367
- * specified.
9368
- */
9369
- image: string;
9370
- /**
9371
- * URL of the icon which is to be displayed with the notification.
9372
- */
9373
- icon: string;
9374
- /**
9375
- * URL of the badge for representing the notification. May be empty if no url was
9376
- * specified.
9377
- */
9378
- badge: string;
9379
- /**
9380
- * Vibration pattern for the notification, following the syntax of the Vibration
9381
- * API. https://www.w3.org/TR/vibration/
9382
- */
9383
- vibration_pattern: number[];
9384
- /**
9385
- * The time at which the event the notification represents took place.
9386
- */
9387
- timestamp: string;
9388
- /**
9389
- * Whether default notification indicators (sound, vibration, light) should be
9390
- * played again if the notification is replacing an older notification.
9391
- */
9392
- renotify: boolean;
9393
- /**
9394
- * Whether default notification indicators (sound, vibration, light) should be
9395
- * played again if the notification is replacing an older notification.
9396
- */
9397
- silent: boolean;
9398
- /**
9399
- * Whether the notification should remain onscreen indefinitely, rather than being
9400
- * auto-minimized to the notification center (if allowed by platform).
9401
- */
9402
- requireInteraction: boolean;
9403
- /**
9404
- * Base64 encoded Developer-provided data associated with the notification, in the
9405
- * form of a serialized string. Must not exceed |kMaximumDeveloperDataSize| bytes.
9406
- */
9407
- data: string;
9408
- /**
9409
- * Actions that should be shown as buttons on the notification.
9410
- */
9411
- actions: NotificationAction_2[];
9412
- /**
9413
- * The time at which the notification should be shown.
9414
- */
9415
- showTriggerTimestamp?: string | null;
9416
- /**
9417
- * Scenarios that define the notification behavior. (DEFAULT, INCOMING_CALL)
9418
- */
9419
- scenario: number;
9420
- };
9421
-
9422
- declare type NotificationInterceptedEvent = NamedEvent & {
9423
- type: 'notification-intercepted';
9424
- /**
9425
- * id of the notification
9426
- */
9427
- notificationId: string;
9428
- /**
9429
- * origin of the notification
9430
- */
9431
- origin: string;
9432
- /**
9433
- * empty if notification comes from worker
9434
- */
9435
- documentUrl: string;
9436
- notificationData: NotificationData;
9437
- /**
9438
- * Image for the notification. The bitmap may be empty if the developer did not
9439
- * provide an image, or fetching of the image failed.
9440
- */
9441
- image: SerializedImage;
9442
- /**
9443
- * Main icon for the notification. The bitmap may be empty if the developer did not
9444
- * provide an icon, or fetching of the icon failed.
9445
- */
9446
- notificationIcon: SerializedImage;
9447
- /**
9448
- * Badge for the notification. The bitmap may be empty if the developer did not
9449
- * provide a badge, or fetching of the badge failed.
9450
- */
9451
- badge: SerializedImage;
9452
- /**
9453
- * Icons for the actions. A bitmap may be empty if the developer did not provide an
9454
- * icon, or fetching of the icon failed.
9455
- */
9456
- actionIcons: SerializedImage[];
9457
- };
9458
-
9459
9487
  /**
9460
9488
  * @internal
9461
9489
  *
@@ -9564,8 +9592,11 @@ declare namespace OpenFin_2 {
9564
9592
  ViewVisibilityOptions,
9565
9593
  WindowState,
9566
9594
  AutoplayPolicyOptions,
9595
+ ExcludeOptions,
9567
9596
  ConstWindowOptions,
9568
9597
  InheritableOptions,
9598
+ PolicyOptions,
9599
+ ChromiumPolicies,
9569
9600
  MutableWindowOptions,
9570
9601
  WorkspacePlatformOptions,
9571
9602
  WebRequestHeader,
@@ -9599,6 +9630,9 @@ declare namespace OpenFin_2 {
9599
9630
  ViewOptions,
9600
9631
  ConstViewOptions,
9601
9632
  ViewState,
9633
+ ViewCreationSuccess,
9634
+ ViewCreationFailure,
9635
+ ViewCreationResult,
9602
9636
  Certificate,
9603
9637
  HostContextChangedPayload,
9604
9638
  ApplySnapshotOptions,
@@ -9844,6 +9878,7 @@ declare namespace OpenFin_2 {
9844
9878
  RoutingInfo,
9845
9879
  DownloadShelfOptions,
9846
9880
  ViewShowAtOptions,
9881
+ ExtensionInfo,
9847
9882
  ApplicationEvents,
9848
9883
  BaseEvents,
9849
9884
  ExternalApplicationEvents,
@@ -10047,6 +10082,10 @@ declare type PerDomainSettings = {
10047
10082
  * {@link ContentRedirect} in {@link WindowOptions} and {@link ViewOptions} will be **ignored**.
10048
10083
  */
10049
10084
  content?: ContentPermission;
10085
+ /**
10086
+ * {@inheritdoc ChromiumPolicies}
10087
+ */
10088
+ chromiumPolicies?: ChromiumPolicies;
10050
10089
  };
10051
10090
 
10052
10091
  /**
@@ -10094,8 +10133,14 @@ declare class Platform extends EmitterBase<OpenFin_2.PlatformEvent> {
10094
10133
  identity: OpenFin_2.ApplicationIdentity;
10095
10134
  /**
10096
10135
  * @internal
10136
+ * Reuse clients to avoid overwriting already-registered client in provider
10137
+ * This ensures that only channel client is created per channel name per `fin` instance
10097
10138
  */
10098
- constructor(identity: OpenFin_2.ApplicationIdentity, channel: Channel_3);
10139
+ private static clientMap;
10140
+ /**
10141
+ * @internal
10142
+ */
10143
+ constructor(wire: Transport, identity: OpenFin_2.ApplicationIdentity, channelName?: string);
10099
10144
  getClient: (identity?: OpenFin_2.ApplicationIdentity) => Promise<ChannelClient_2>;
10100
10145
  /**
10101
10146
  * Creates a new view and attaches it to a specified target window.
@@ -11479,6 +11524,45 @@ declare interface PlatformProvider {
11479
11524
  * @returns {Promise<void>}
11480
11525
  */
11481
11526
  handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
11527
+ /**
11528
+ * @experimental
11529
+ *
11530
+ * This method is called to handle errors with view creation and initial navigation during layout creation.
11531
+ * Overriding this method enables catching the error and correcting behavior (ie navigating to an error page).
11532
+ * * To indicate that the error has been handled, view creation should be treated as successful return {identity: viewIdentity, success: true}.
11533
+ * * Not returning anything will cause the layout-initialized event to include the view as failed with the original error.
11534
+ * * Throwing an error will update the error on the event payload of layout-initialized to the thrown error.
11535
+ *
11536
+ * @param viewIdentity Identity of the view
11537
+ * @param error error thrown during a view creation
11538
+ * @returns {Promise<OpenFin.ViewCreationSuccess | void>}
11539
+ *
11540
+ * @example
11541
+ *
11542
+ * ```js
11543
+ * const overrideCallback = (PlatformProvider) => {
11544
+ * class Override extends PlatformProvider {
11545
+ * async handleFailedViewCreation(viewIdentity, error) {
11546
+ * const view = fin.View.wrapSync(viewId);
11547
+ * try {
11548
+ * // navigate to an error page
11549
+ * await view.navigate('http://localhost:3000/errorPage.html');
11550
+ * // resolve a success result after redirecting to a error page
11551
+ * return {identity: viewIdentity, success: true};
11552
+ * } catch(e) {
11553
+ * // layout-initialized event will include this view with the error
11554
+ * throw error;
11555
+ * }
11556
+ * }
11557
+ * }
11558
+ * return new Override();
11559
+ * }
11560
+ *
11561
+ * fin.Platform.init({ overrideCallback });
11562
+ *
11563
+ * ```
11564
+ */
11565
+ handleFailedViewCreation(viewIdentity: OpenFin_2.Identity, error: Error): Promise<OpenFin_2.ViewCreationSuccess | void>;
11482
11566
  }
11483
11567
 
11484
11568
  /**
@@ -11543,6 +11627,12 @@ declare type PointTopLeft = {
11543
11627
  left: number;
11544
11628
  };
11545
11629
 
11630
+ /**
11631
+ * When set to `disable`, disables the policy
11632
+ * When set to `defer-to-group-policy`, respects Group Policy settings
11633
+ */
11634
+ declare type PolicyOptions = 'disable' | 'defer-to-group-policy';
11635
+
11546
11636
  declare type PopupBaseBehavior = 'close' | 'hide';
11547
11637
 
11548
11638
  declare type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
@@ -12400,13 +12490,6 @@ declare interface ProtocolMap extends ProtocolMapBase {
12400
12490
  'get-version': GetterCall<string>;
12401
12491
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
12402
12492
  'delete-cache-request': VoidCall;
12403
- 'dispatch-notification-action': {
12404
- request: {
12405
- notificationId: string;
12406
- action: 'click' | 'close' | 'show';
12407
- };
12408
- response: void;
12409
- };
12410
12493
  'exit-desktop': VoidCall;
12411
12494
  'fetch-manifest': ApiCall<{
12412
12495
  manifestUrl: string;
@@ -12437,6 +12520,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
12437
12520
  response: string;
12438
12521
  };
12439
12522
  'get-focused-window': GetterCall<OpenFin_2.Identity | null>;
12523
+ 'get-focused-content': GetterCall<(OpenFin_2.Identity & {
12524
+ entityType: 'window' | 'view';
12525
+ }) | null>;
12440
12526
  'is-app-certified': {
12441
12527
  request: {
12442
12528
  manifestUrl: string;
@@ -12565,6 +12651,14 @@ declare interface ProtocolMap extends ProtocolMapBase {
12565
12651
  }, void>;
12566
12652
  'system-register-shutdown-handler': VoidCall;
12567
12653
  'get-permissions': GetterCall<any>;
12654
+ 'refresh-extensions': {
12655
+ request: void;
12656
+ response: string[] | undefined;
12657
+ };
12658
+ 'get-installed-extensions': {
12659
+ request: void;
12660
+ response: OpenFin_2.ExtensionInfo[];
12661
+ };
12568
12662
  'fdc3-add-context-listener': VoidCall;
12569
12663
  'fdc3-add-intent-listener': VoidCall;
12570
12664
  'fdc3-raise-intent': VoidCall;
@@ -13253,6 +13347,21 @@ declare type ScreenshotPrintOptions = {
13253
13347
  content: 'screenshot';
13254
13348
  };
13255
13349
 
13350
+ /**
13351
+ * An event generated when an application modifies the runtime in a way that affects all other applications in the
13352
+ * application runtime/security realm.
13353
+ */
13354
+ declare type SecurityRealmEvent = BaseEvent_9 & {
13355
+ /**
13356
+ * Config URL of the application that modified the security realm's extensions
13357
+ */
13358
+ configUrl: string;
13359
+ /**
13360
+ * Identity of the application that modified the security realm's extensions
13361
+ */
13362
+ applicationIdentity: OpenFin_2.ApplicationIdentity;
13363
+ };
13364
+
13256
13365
  declare type SendActionResponse<T extends keyof ProtocolMap> = Message<{
13257
13366
  data: ProtocolMap[T]['response'];
13258
13367
  } & ProtocolMap[T]['specialResponse']>;
@@ -13269,11 +13378,6 @@ declare type SentMessage<Value> = Promise<Value> & {
13269
13378
  messageId: ReturnType<Environment['getNextMessageId']>;
13270
13379
  };
13271
13380
 
13272
- /**
13273
- * Utility type to mark an image serialized as a base64 data URL.
13274
- */
13275
- declare type SerializedImage = string;
13276
-
13277
13381
  /**
13278
13382
  * @interface
13279
13383
  */
@@ -13716,13 +13820,6 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
13716
13820
  * @internal
13717
13821
  */
13718
13822
  constructor(wire: Transport);
13719
- /**
13720
- * Dispatch an event to the webcontents that created the notification.
13721
- * Only works for notifications that have been intercepted in the same runtime.
13722
- */
13723
- dispatchNotificationAction(notificationId: string, { action }: {
13724
- action: 'click' | 'close' | 'show';
13725
- }): Promise<void>;
13726
13823
  private sendExternalProcessRequest;
13727
13824
  /**
13728
13825
  * Returns the version of the runtime. The version contains the major, minor,
@@ -13901,7 +13998,9 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
13901
13998
  */
13902
13999
  getEnvironmentVariable(envName: string): Promise<string>;
13903
14000
  /**
13904
- * Get current focused window.
14001
+ * Get currently focused Window.
14002
+ * If a View currently has focus, returns the identity of View's parent Window.
14003
+ * Use {@link Window._Window#getFocusedContent Window.getFocusedContent} to directly access currently focused Window or View.
13905
14004
  *
13906
14005
  * @example
13907
14006
  * ```js
@@ -13909,6 +14008,17 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
13909
14008
  * ```
13910
14009
  */
13911
14010
  getFocusedWindow(): Promise<OpenFin_2.Identity | null>;
14011
+ /**
14012
+ * Get currently focused content. Returns identity of entity with `entityType`.
14013
+ *
14014
+ * @example
14015
+ * ```js
14016
+ * fin.System.getFocusedContent().then(contentIdentity => console.log(contentIdentity)).catch(err => console.log(err));
14017
+ * ```
14018
+ */
14019
+ getFocusedContent(): Promise<(OpenFin_2.Identity & {
14020
+ entityType: 'window' | 'view';
14021
+ }) | null>;
13912
14022
  /**
13913
14023
  * Returns information about the given app's certification status
13914
14024
  *
@@ -15162,6 +15272,16 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15162
15272
  * ```
15163
15273
  */
15164
15274
  setDomainSettings(domainSettings: OpenFin_2.DefaultDomainSettings): Promise<void>;
15275
+ /**
15276
+ * Attempts to install and enable extensions for the security realm. Users may want to call this function in response
15277
+ * to an `extensions-install-failed` event. Only extensions allowed by every application on the current security realm
15278
+ * will be installed/enabled.
15279
+ */
15280
+ refreshExtensions(): Promise<string[] | undefined>;
15281
+ /**
15282
+ * Gets the currently-installed
15283
+ */
15284
+ getInstalledExtensions(): Promise<OpenFin_2.ExtensionInfo[]>;
15165
15285
  }
15166
15286
 
15167
15287
  /**
@@ -15179,7 +15299,6 @@ declare namespace SystemEvents {
15179
15299
  IdleStateChangedEvent,
15180
15300
  IdleEvent,
15181
15301
  MonitorInfoChangedEvent,
15182
- NotificationCloseRequested,
15183
15302
  MonitorEvent,
15184
15303
  SessionChangedEvent,
15185
15304
  AppVersionEvent,
@@ -15193,6 +15312,14 @@ declare namespace SystemEvents {
15193
15312
  ApplicationCreatedEvent,
15194
15313
  DesktopIconClickedEvent,
15195
15314
  SystemShutdownEvent,
15315
+ ExtensionsEnabledEvent,
15316
+ ExtensionsDisabledEvent,
15317
+ ExtensionsExcludedEvent,
15318
+ ExtensionsInstalledEvent,
15319
+ ExtensionInstalledEvent,
15320
+ ExtensionsInstallFailedEvent,
15321
+ ExtensionInstallFailedEvent,
15322
+ ExtensionsInitializationFailedEvent,
15196
15323
  Event_11 as Event,
15197
15324
  SystemEvent,
15198
15325
  EventType_8 as EventType,
@@ -16007,7 +16134,7 @@ declare class View_2 extends WebContents<OpenFin_2.ViewEvent> {
16007
16134
  */
16008
16135
  getInfo: () => Promise<OpenFin_2.ViewInfo>;
16009
16136
  /**
16010
- * Retrieves the layout for the window the view is attached to.
16137
+ * Retrieves the OpenFin.Layout instance for the Window the View is attached to.
16011
16138
  *
16012
16139
  * @example
16013
16140
  * ```js
@@ -16205,6 +16332,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
16205
16332
  options?: Partial<ViewOptions>;
16206
16333
  };
16207
16334
 
16335
+ /**
16336
+ * @interface
16337
+ */
16338
+ declare type ViewCreationFailure = {
16339
+ /**
16340
+ * The identity of the created view
16341
+ */
16342
+ identity: Identity_4;
16343
+ /**
16344
+ * Whether the view was created with errors
16345
+ */
16346
+ success: false;
16347
+ /**
16348
+ * Error thrown during view creation
16349
+ */
16350
+ error: Error;
16351
+ };
16352
+
16208
16353
  /**
16209
16354
  * The options object required by {@link View.ViewModule.create View.create}.
16210
16355
  *
@@ -16220,6 +16365,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
16220
16365
 
16221
16366
  declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformViewCreationOptions;
16222
16367
 
16368
+ /**
16369
+ * A view creation state
16370
+ */
16371
+ declare type ViewCreationResult = ViewCreationSuccess | ViewCreationFailure;
16372
+
16373
+ /**
16374
+ * @interface
16375
+ */
16376
+ declare type ViewCreationSuccess = {
16377
+ /**
16378
+ * The identity of the created view
16379
+ */
16380
+ identity: Identity_4;
16381
+ /**
16382
+ * Whether the view was created without errors
16383
+ */
16384
+ success: true;
16385
+ };
16386
+
16223
16387
  /**
16224
16388
  * Generated when a window has a view detached from it.
16225
16389
  * @remarks Will fire when a view is destroyed in which case `target` will be null.
@@ -16381,6 +16545,9 @@ declare class ViewModule extends Base {
16381
16545
  */
16382
16546
  declare type ViewOptions = ConstViewOptions & MutableViewOptions;
16383
16547
 
16548
+ /**
16549
+ * @interface
16550
+ */
16384
16551
  declare type ViewShowAtOptions = {
16385
16552
  /**
16386
16553
  * Sets the view as the top level view. See {@link OpenFin.View.bringToFront} for more information.
@@ -17467,10 +17634,6 @@ declare namespace WebContentsEvents {
17467
17634
  FileDownloadProgressEvent,
17468
17635
  FileDownloadCompletedEvent,
17469
17636
  ContentBlockedEvent,
17470
- SerializedImage,
17471
- NotificationAction_2 as NotificationAction,
17472
- NotificationData,
17473
- NotificationInterceptedEvent,
17474
17637
  Event_5 as Event,
17475
17638
  WebContentsEvent,
17476
17639
  WillPropagateWebContentsEvent,