@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.
@@ -2262,8 +2262,6 @@ declare class Channel extends EmitterBase<ChannelEvent> {
2262
2262
 
2263
2263
  declare type Channel_2 = OpenFin.Fin['InterApplicationBus']['Channel'];
2264
2264
 
2265
- declare type Channel_3 = OpenFin.Fin['InterApplicationBus']['Channel'];
2266
-
2267
2265
  declare type ChannelAction = OpenFin.ChannelAction;
2268
2266
 
2269
2267
  declare type ChannelAction_2 = (payload: unknown, id: ProviderIdentity_4 | ClientIdentity) => unknown;
@@ -2937,6 +2935,18 @@ declare type ChildWindowCreatedEvent = ContentCreationRulesEvent & {
2937
2935
  childOptions: OpenFin.WindowOptions;
2938
2936
  };
2939
2937
 
2938
+ /**
2939
+ * Control behavior for Chromium policies
2940
+ *
2941
+ * @interface
2942
+ */
2943
+ declare type ChromiumPolicies = {
2944
+ /**
2945
+ * Disable AutofillAddressEnabled policy for a Window or View.
2946
+ */
2947
+ AutofillAddressEnabled?: PolicyOptions;
2948
+ };
2949
+
2940
2950
  declare interface ClassicProtocolOffer extends ProtocolPacketBase {
2941
2951
  type: 'classic';
2942
2952
  }
@@ -3405,10 +3415,6 @@ declare type ConstViewOptions = {
3405
3415
  * but the properties in the manifest will take precedence if there is any collision.
3406
3416
  */
3407
3417
  manifestUrl: string;
3408
- /**
3409
- * 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.
3410
- */
3411
- interceptNotifications: boolean;
3412
3418
  zoomLevel: number;
3413
3419
  experimental: any;
3414
3420
  fdc3InteropApi?: string;
@@ -3452,6 +3458,10 @@ declare type ConstViewOptions = {
3452
3458
  */
3453
3459
  enabled: boolean;
3454
3460
  };
3461
+ /**
3462
+ * Control which options to ignore when creating a Platform View.
3463
+ */
3464
+ excludeOptions: ExcludeOptions;
3455
3465
  };
3456
3466
 
3457
3467
  /**
@@ -3582,12 +3592,6 @@ declare type ConstWindowOptions = {
3582
3592
  */
3583
3593
  downloadShelf: DownloadShelfOptions;
3584
3594
  height: number;
3585
- /**
3586
- * @defaultValue false
3587
- * @remarks
3588
- * When set to `true` the platform will intercept all web notifications and instead raise `notification-intercepted` events.
3589
- */
3590
- interceptNotifications: boolean;
3591
3595
  layout: any;
3592
3596
  /**
3593
3597
  * @experimental
@@ -3666,11 +3670,6 @@ declare type ConstWindowOptions = {
3666
3670
  * @deprecated - use `icon` instead.
3667
3671
  */
3668
3672
  taskbarIcon: string;
3669
- /**
3670
- * Specify a taskbar group for the window.
3671
- * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
3672
- */
3673
- taskbarIconGroup: string;
3674
3673
  /**
3675
3674
  * @defaultValue "about:blank"
3676
3675
  *
@@ -3707,6 +3706,10 @@ declare type ConstWindowOptions = {
3707
3706
  * 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.
3708
3707
  */
3709
3708
  inheritance?: Partial<InheritableOptions>;
3709
+ /**
3710
+ * Control which options to ignore when creating a Platform Window.
3711
+ */
3712
+ excludeOptions: ExcludeOptions;
3710
3713
  };
3711
3714
 
3712
3715
  /**
@@ -4708,6 +4711,7 @@ declare interface Environment {
4708
4711
  getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
4709
4712
  fdc3Version?: Version;
4710
4713
  }>;
4714
+ getViewWindowIdentity(fin: OpenFin.Fin<OpenFin.EntityType>, identity: OpenFin.Identity): Promise<OpenFin.Identity>;
4711
4715
  readonly type: EnvironmentType;
4712
4716
  }
4713
4717
 
@@ -4741,7 +4745,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
4741
4745
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
4742
4746
  * from which they propagate).
4743
4747
  */
4744
- declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | NotificationCloseRequested;
4748
+ 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;
4745
4749
 
4746
4750
  /**
4747
4751
  * [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.
@@ -4781,7 +4785,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4781
4785
  */
4782
4786
  declare type Event_5<Topic extends string> = {
4783
4787
  topic: Topic;
4784
- } & (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);
4788
+ } & (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);
4785
4789
 
4786
4790
  /**
4787
4791
  * [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
@@ -4886,6 +4890,18 @@ declare type EventType_9 = Event_12['type'];
4886
4890
 
4887
4891
  /* Excluded from this release type: EventWithId */
4888
4892
 
4893
+ /**
4894
+ * @interface
4895
+ */
4896
+ declare type ExcludeOptions = {
4897
+ /**
4898
+ * @defaultValue false
4899
+ *
4900
+ * When true, will not merge default preload scripts from {@link ApplicationOptions.defaultWindowOptions} or {@link ApplicationOptions.defaultViewOptions}.
4901
+ */
4902
+ preloadScripts: boolean;
4903
+ };
4904
+
4889
4905
  /* Excluded from this release type: ExcludeRequested */
4890
4906
 
4891
4907
  declare type ExistingConnectConfig = ConfigWithUuid & {
@@ -4901,6 +4917,105 @@ declare type ExitCode = {
4901
4917
  exitCode: number;
4902
4918
  };
4903
4919
 
4920
+ declare type ExtensionEvent = SecurityRealmEvent & {
4921
+ /**
4922
+ * Runtime extension whose status has been (possibly) modified
4923
+ */
4924
+ extension: string;
4925
+ };
4926
+
4927
+ /**
4928
+ * @interface
4929
+ */
4930
+ declare type ExtensionInfo = {
4931
+ extensionId: string;
4932
+ name: string;
4933
+ enabled: boolean;
4934
+ };
4935
+
4936
+ /**
4937
+ * An event that fires when an extension is installed in the security realm.
4938
+ *
4939
+ * @interface
4940
+ */
4941
+ declare type ExtensionInstalledEvent = ExtensionEvent & {
4942
+ type: 'extension-installed';
4943
+ };
4944
+
4945
+ /**
4946
+ * An event that fires when an extension fails to install in the security realm.
4947
+ *
4948
+ * @interface
4949
+ */
4950
+ declare type ExtensionInstallFailedEvent = ExtensionEvent & {
4951
+ type: 'extension-install-failed';
4952
+ };
4953
+
4954
+ /**
4955
+ * An event that fires when extensions are disabled in the security realm.
4956
+ *
4957
+ * @interface
4958
+ */
4959
+ declare type ExtensionsDisabledEvent = ExtensionsEvent & {
4960
+ type: 'extensions-disabled';
4961
+ };
4962
+
4963
+ /**
4964
+ * An event that fires when extensions are enabled in the security realm.
4965
+ *
4966
+ * @interface
4967
+ */
4968
+ declare type ExtensionsEnabledEvent = ExtensionsEvent & {
4969
+ type: 'extensions-enabled';
4970
+ };
4971
+
4972
+ declare type ExtensionsEvent = SecurityRealmEvent & {
4973
+ /**
4974
+ * Runtime extensions whose status has been (possibly) modified
4975
+ */
4976
+ extensions: string[];
4977
+ };
4978
+
4979
+ /**
4980
+ * An event that fires when requested extensions are not allowed to be installed in the security realm.
4981
+ *
4982
+ * @interface
4983
+ */
4984
+ declare type ExtensionsExcludedEvent = ExtensionsEvent & {
4985
+ type: 'extensions-excluded';
4986
+ };
4987
+
4988
+ /**
4989
+ * An event that fires when extension initialization fails on initial app launch. Users may attempt to
4990
+ * re-initialize extensions by calling {@link System.refreshExtensions}. This event will not fire in response
4991
+ * to manual extension refreshes (users should catch the error normally).
4992
+ */
4993
+ declare type ExtensionsInitializationFailedEvent = Omit<ExtensionsEvent, 'extensions'> & {
4994
+ type: 'extensions-initialization-failed';
4995
+ /**
4996
+ * The error that caused the extension initialization failure
4997
+ */
4998
+ error: Error;
4999
+ };
5000
+
5001
+ /**
5002
+ * An event that fires when extensions are installed in the security realm.
5003
+ *
5004
+ * @interface
5005
+ */
5006
+ declare type ExtensionsInstalledEvent = ExtensionsEvent & {
5007
+ type: 'extensions-installed';
5008
+ };
5009
+
5010
+ /**
5011
+ * An event that fires when extensions fail to install in the security realm.
5012
+ *
5013
+ * @interface
5014
+ */
5015
+ declare type ExtensionsInstallFailedEvent = ExtensionsEvent & {
5016
+ type: 'extensions-install-failed';
5017
+ };
5018
+
4904
5019
  /**
4905
5020
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
4906
5021
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -7875,6 +7990,7 @@ declare type LaunchIntoPlatformPayload = {
7875
7990
  */
7876
7991
  declare class Layout extends Base {
7877
7992
  #private;
7993
+ /* Excluded from this release type: getClient */
7878
7994
  /* Excluded from this release type: init */
7879
7995
  identity: OpenFin.Identity | OpenFin.LayoutIdentity;
7880
7996
  private platform;
@@ -7974,6 +8090,17 @@ declare class Layout extends Base {
7974
8090
  * ```
7975
8091
  */
7976
8092
  getRootItem(): Promise<OpenFin.ColumnOrRow | OpenFin.TabStack>;
8093
+ /**
8094
+ * Retrieves the OpenFin.TabStack instance which the View belongs to.
8095
+ *
8096
+ * @example
8097
+ * ```js
8098
+ * const viewIdentity = { uuid: 'uuid', name: 'view-name' };
8099
+ * const stack = await fin.View.wrapSync(viewIdentity).getStackByViewIdentity(viewIdentity);
8100
+ * console.log(await stack.getViews());
8101
+ * ```
8102
+ */
8103
+ getStackByViewIdentity(identity: OpenFin.Identity): Promise<OpenFin.TabStack>;
7977
8104
  /**
7978
8105
  * Replaces the specified view with a view with the provided configuration.
7979
8106
  *
@@ -8027,6 +8154,29 @@ declare class Layout extends Base {
8027
8154
  * ```
8028
8155
  */
8029
8156
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
8157
+ /**
8158
+ * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
8159
+ *
8160
+ * @param viewOptions - The options for creating the view.
8161
+ * @param options - Optional parameters for adding the view.
8162
+ * @param options.location - The location where the view should be added.
8163
+ * @param options.targetView - The target view to which the new view should be added.
8164
+ * @returns A promise that resolves to an object containing the identity of the added view.
8165
+ */
8166
+ addView(viewOptions: OpenFin.PlatformViewCreationOptions, { location, targetView }?: {
8167
+ location?: OpenFin.CreateViewTarget['location'];
8168
+ targetView?: OpenFin.Identity;
8169
+ }): Promise<{
8170
+ identity: OpenFin.Identity;
8171
+ }>;
8172
+ /**
8173
+ * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
8174
+ * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
8175
+ *
8176
+ * @param viewIdentity - The identity of the view to close.
8177
+ * @returns A promise that resolves when the view is closed.
8178
+ */
8179
+ closeView(viewIdentity: OpenFin.Identity): Promise<void>;
8030
8180
  }
8031
8181
 
8032
8182
  /**
@@ -8039,7 +8189,7 @@ declare type LayoutColumn = LayoutItemConfig & {
8039
8189
  /**
8040
8190
  * @interface
8041
8191
  */
8042
- declare type LayoutComponent = LayoutItemConfig & {
8192
+ declare type LayoutComponent = Omit<LayoutItemConfig, 'content' | 'type'> & {
8043
8193
  /**
8044
8194
  * Only a component type will have this property and it should be set to view.
8045
8195
  */
@@ -8048,6 +8198,7 @@ declare type LayoutComponent = LayoutItemConfig & {
8048
8198
  * Only a component type will have this property and it represents the view options of a given component.
8049
8199
  */
8050
8200
  componentState?: Partial<ViewCreationOptions>;
8201
+ type: 'component';
8051
8202
  };
8052
8203
 
8053
8204
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
@@ -8131,10 +8282,7 @@ declare type LayoutIdentity = Identity_4 & {
8131
8282
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8132
8283
  type: 'layout-initialized';
8133
8284
  layoutIdentity: OpenFin.LayoutIdentity;
8134
- ofViews: {
8135
- identity: OpenFin.Identity;
8136
- entityType: 'view';
8137
- }[];
8285
+ ofViews: OpenFin.ViewCreationResult[];
8138
8286
  };
8139
8287
 
8140
8288
  /**
@@ -8242,7 +8390,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8242
8390
  /**
8243
8391
  * @experimental
8244
8392
  */
8245
- getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity;
8393
+ getLayoutIdentityForView(viewIdentity: Identity_4): LayoutIdentity | undefined;
8246
8394
  /**
8247
8395
  * @experimental
8248
8396
  */
@@ -8343,6 +8491,17 @@ declare class LayoutModule extends Base {
8343
8491
  * ```
8344
8492
  */
8345
8493
  getCurrentSync(): OpenFin.Layout;
8494
+ /**
8495
+ * Retrieves the OpenFin.Layout instance for the Window the View is attached to.
8496
+ *
8497
+ * @example
8498
+ * ```js
8499
+ * const viewIdentity = { uuid: 'uuid', name: 'view-name' };
8500
+ * const layout = await fin.Platform.Layout.getLayoutByViewIdentity(viewIdentity);
8501
+ * console.log(await layout.getCurrentViews());
8502
+ * ```
8503
+ */
8504
+ getLayoutByViewIdentity(viewIdentity: OpenFin.Identity): Promise<OpenFin.Layout>;
8346
8505
  /**
8347
8506
  * Initialize the window's Layout.
8348
8507
  *
@@ -8982,6 +9141,10 @@ declare type MutableViewOptions = {
8982
9141
  * @defaultValue 'enabled'
8983
9142
  */
8984
9143
  throttling: ViewThrottling;
9144
+ /**
9145
+ * {@inheritDoc ChromiumPolicies}
9146
+ */
9147
+ chromiumPolicies: ChromiumPolicies;
8985
9148
  };
8986
9149
 
8987
9150
  /**
@@ -9222,6 +9385,12 @@ declare type MutableWindowOptions = {
9222
9385
  * Shows the window's icon in the taskbar.
9223
9386
  */
9224
9387
  showTaskbarIcon: boolean;
9388
+ /**
9389
+ * Specify a taskbar group for the window.
9390
+ * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
9391
+ * @remarks It's only updatable when `enableJumpList` is set to false.
9392
+ */
9393
+ taskbarIconGroup: string;
9225
9394
  interop: InteropConfig;
9226
9395
  /* Excluded from this release type: _internalWorkspaceData */
9227
9396
  /* Excluded from this release type: workspacePlatform */
@@ -9233,6 +9402,10 @@ declare type MutableWindowOptions = {
9233
9402
  * @remarks If `throttling` option is present, the `backgroundThrottling` option is completely ignored for windows.
9234
9403
  */
9235
9404
  throttling: WindowThrottling;
9405
+ /**
9406
+ * {@inheritDoc ChromiumPolicies}
9407
+ */
9408
+ chromiumPolicies: ChromiumPolicies;
9236
9409
  };
9237
9410
 
9238
9411
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9340,154 +9513,6 @@ declare type NonPropagatedWindowEvent = never;
9340
9513
 
9341
9514
  /* Excluded from this release type: NotCloseRequested */
9342
9515
 
9343
- declare type NotificationAction_2 = {
9344
- /**
9345
- * Type of action this structure represents (BUTTON, TEXT)
9346
- */
9347
- type: number;
9348
- /**
9349
- * Action name that the author can use to distinguish them.
9350
- */
9351
- action: string;
9352
- /**
9353
- * Title of the action button.
9354
- */
9355
- title: string;
9356
- /**
9357
- * URL of the icon for the button. May be empty if no url was specified.
9358
- */
9359
- icon: string;
9360
- /**
9361
- * Placeholder to display for text-based actions in absence of user input.
9362
- */
9363
- placeholder: string;
9364
- };
9365
-
9366
- /**
9367
- * Emitted when a developer has called .close on a notification which has been interecepted.
9368
- */
9369
- declare type NotificationCloseRequested = BaseEvent_9 & {
9370
- type: 'notification-close-requested';
9371
- notificationId: string;
9372
- };
9373
-
9374
- declare type NotificationData = {
9375
- /**
9376
- * Title to be displayed with the Web Notification.
9377
- */
9378
- title: string;
9379
- /**
9380
- * Hint to determine the directionality of the displayed notification.
9381
- * (LEFT_TO_RIGHT, RIGHT_TO_LEFT, AUTO)
9382
- */
9383
- direction: number;
9384
- /**
9385
- * BCP 47 language tag describing the notification's contents. Optional.
9386
- */
9387
- lang: string;
9388
- /**
9389
- * Contents of the notification.
9390
- */
9391
- body: string;
9392
- /**
9393
- * Tag of the notification. Notifications sharing both their origin and their, tag
9394
- * will replace the first displayed notification.
9395
- */
9396
- tag: string;
9397
- /**
9398
- * URL of the image contents of the notification. May be empty if no url was
9399
- * specified.
9400
- */
9401
- image: string;
9402
- /**
9403
- * URL of the icon which is to be displayed with the notification.
9404
- */
9405
- icon: string;
9406
- /**
9407
- * URL of the badge for representing the notification. May be empty if no url was
9408
- * specified.
9409
- */
9410
- badge: string;
9411
- /**
9412
- * Vibration pattern for the notification, following the syntax of the Vibration
9413
- * API. https://www.w3.org/TR/vibration/
9414
- */
9415
- vibration_pattern: number[];
9416
- /**
9417
- * The time at which the event the notification represents took place.
9418
- */
9419
- timestamp: string;
9420
- /**
9421
- * Whether default notification indicators (sound, vibration, light) should be
9422
- * played again if the notification is replacing an older notification.
9423
- */
9424
- renotify: boolean;
9425
- /**
9426
- * Whether default notification indicators (sound, vibration, light) should be
9427
- * played again if the notification is replacing an older notification.
9428
- */
9429
- silent: boolean;
9430
- /**
9431
- * Whether the notification should remain onscreen indefinitely, rather than being
9432
- * auto-minimized to the notification center (if allowed by platform).
9433
- */
9434
- requireInteraction: boolean;
9435
- /**
9436
- * Base64 encoded Developer-provided data associated with the notification, in the
9437
- * form of a serialized string. Must not exceed |kMaximumDeveloperDataSize| bytes.
9438
- */
9439
- data: string;
9440
- /**
9441
- * Actions that should be shown as buttons on the notification.
9442
- */
9443
- actions: NotificationAction_2[];
9444
- /**
9445
- * The time at which the notification should be shown.
9446
- */
9447
- showTriggerTimestamp?: string | null;
9448
- /**
9449
- * Scenarios that define the notification behavior. (DEFAULT, INCOMING_CALL)
9450
- */
9451
- scenario: number;
9452
- };
9453
-
9454
- declare type NotificationInterceptedEvent = NamedEvent & {
9455
- type: 'notification-intercepted';
9456
- /**
9457
- * id of the notification
9458
- */
9459
- notificationId: string;
9460
- /**
9461
- * origin of the notification
9462
- */
9463
- origin: string;
9464
- /**
9465
- * empty if notification comes from worker
9466
- */
9467
- documentUrl: string;
9468
- notificationData: NotificationData;
9469
- /**
9470
- * Image for the notification. The bitmap may be empty if the developer did not
9471
- * provide an image, or fetching of the image failed.
9472
- */
9473
- image: SerializedImage;
9474
- /**
9475
- * Main icon for the notification. The bitmap may be empty if the developer did not
9476
- * provide an icon, or fetching of the icon failed.
9477
- */
9478
- notificationIcon: SerializedImage;
9479
- /**
9480
- * Badge for the notification. The bitmap may be empty if the developer did not
9481
- * provide a badge, or fetching of the badge failed.
9482
- */
9483
- badge: SerializedImage;
9484
- /**
9485
- * Icons for the actions. A bitmap may be empty if the developer did not provide an
9486
- * icon, or fetching of the icon failed.
9487
- */
9488
- actionIcons: SerializedImage[];
9489
- };
9490
-
9491
9516
  /* Excluded from this release type: NotRequested */
9492
9517
 
9493
9518
  /**
@@ -9591,8 +9616,11 @@ declare namespace OpenFin {
9591
9616
  ViewVisibilityOptions,
9592
9617
  WindowState,
9593
9618
  AutoplayPolicyOptions,
9619
+ ExcludeOptions,
9594
9620
  ConstWindowOptions,
9595
9621
  InheritableOptions,
9622
+ PolicyOptions,
9623
+ ChromiumPolicies,
9596
9624
  MutableWindowOptions,
9597
9625
  WorkspacePlatformOptions,
9598
9626
  WebRequestHeader,
@@ -9626,6 +9654,9 @@ declare namespace OpenFin {
9626
9654
  ViewOptions,
9627
9655
  ConstViewOptions,
9628
9656
  ViewState,
9657
+ ViewCreationSuccess,
9658
+ ViewCreationFailure,
9659
+ ViewCreationResult,
9629
9660
  Certificate,
9630
9661
  HostContextChangedPayload,
9631
9662
  ApplySnapshotOptions,
@@ -9871,6 +9902,7 @@ declare namespace OpenFin {
9871
9902
  RoutingInfo,
9872
9903
  DownloadShelfOptions,
9873
9904
  ViewShowAtOptions,
9905
+ ExtensionInfo,
9874
9906
  ApplicationEvents,
9875
9907
  BaseEvents,
9876
9908
  ExternalApplicationEvents,
@@ -10072,6 +10104,10 @@ declare type PerDomainSettings = {
10072
10104
  * {@link ContentRedirect} in {@link WindowOptions} and {@link ViewOptions} will be **ignored**.
10073
10105
  */
10074
10106
  content?: ContentPermission;
10107
+ /**
10108
+ * {@inheritdoc ChromiumPolicies}
10109
+ */
10110
+ chromiumPolicies?: ChromiumPolicies;
10075
10111
  };
10076
10112
 
10077
10113
  /**
@@ -10117,6 +10153,7 @@ declare class Platform extends EmitterBase<OpenFin.PlatformEvent> {
10117
10153
  private _channel;
10118
10154
  Application: OpenFin.Application;
10119
10155
  identity: OpenFin.ApplicationIdentity;
10156
+ /* Excluded from this release type: clientMap */
10120
10157
  /* Excluded from this release type: __constructor */
10121
10158
  getClient: (identity?: OpenFin.ApplicationIdentity) => Promise<ChannelClient_2>;
10122
10159
  /**
@@ -11426,6 +11463,45 @@ declare interface PlatformProvider {
11426
11463
  * @returns {Promise<void>}
11427
11464
  */
11428
11465
  handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
11466
+ /**
11467
+ * @experimental
11468
+ *
11469
+ * This method is called to handle errors with view creation and initial navigation during layout creation.
11470
+ * Overriding this method enables catching the error and correcting behavior (ie navigating to an error page).
11471
+ * * To indicate that the error has been handled, view creation should be treated as successful return {identity: viewIdentity, success: true}.
11472
+ * * Not returning anything will cause the layout-initialized event to include the view as failed with the original error.
11473
+ * * Throwing an error will update the error on the event payload of layout-initialized to the thrown error.
11474
+ *
11475
+ * @param viewIdentity Identity of the view
11476
+ * @param error error thrown during a view creation
11477
+ * @returns {Promise<OpenFin.ViewCreationSuccess | void>}
11478
+ *
11479
+ * @example
11480
+ *
11481
+ * ```js
11482
+ * const overrideCallback = (PlatformProvider) => {
11483
+ * class Override extends PlatformProvider {
11484
+ * async handleFailedViewCreation(viewIdentity, error) {
11485
+ * const view = fin.View.wrapSync(viewId);
11486
+ * try {
11487
+ * // navigate to an error page
11488
+ * await view.navigate('http://localhost:3000/errorPage.html');
11489
+ * // resolve a success result after redirecting to a error page
11490
+ * return {identity: viewIdentity, success: true};
11491
+ * } catch(e) {
11492
+ * // layout-initialized event will include this view with the error
11493
+ * throw error;
11494
+ * }
11495
+ * }
11496
+ * }
11497
+ * return new Override();
11498
+ * }
11499
+ *
11500
+ * fin.Platform.init({ overrideCallback });
11501
+ *
11502
+ * ```
11503
+ */
11504
+ handleFailedViewCreation(viewIdentity: OpenFin.Identity, error: Error): Promise<OpenFin.ViewCreationSuccess | void>;
11429
11505
  }
11430
11506
 
11431
11507
  /**
@@ -11490,6 +11566,12 @@ declare type PointTopLeft = {
11490
11566
  left: number;
11491
11567
  };
11492
11568
 
11569
+ /**
11570
+ * When set to `disable`, disables the policy
11571
+ * When set to `defer-to-group-policy`, respects Group Policy settings
11572
+ */
11573
+ declare type PolicyOptions = 'disable' | 'defer-to-group-policy';
11574
+
11493
11575
  declare type PopupBaseBehavior = 'close' | 'hide';
11494
11576
 
11495
11577
  declare type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
@@ -12347,13 +12429,6 @@ declare interface ProtocolMap extends ProtocolMapBase {
12347
12429
  'get-version': GetterCall<string>;
12348
12430
  'clear-cache': ApiCall<OpenFin.ClearCacheOption, void>;
12349
12431
  'delete-cache-request': VoidCall;
12350
- 'dispatch-notification-action': {
12351
- request: {
12352
- notificationId: string;
12353
- action: 'click' | 'close' | 'show';
12354
- };
12355
- response: void;
12356
- };
12357
12432
  'exit-desktop': VoidCall;
12358
12433
  'fetch-manifest': ApiCall<{
12359
12434
  manifestUrl: string;
@@ -12384,6 +12459,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
12384
12459
  response: string;
12385
12460
  };
12386
12461
  'get-focused-window': GetterCall<OpenFin.Identity | null>;
12462
+ 'get-focused-content': GetterCall<(OpenFin.Identity & {
12463
+ entityType: 'window' | 'view';
12464
+ }) | null>;
12387
12465
  'is-app-certified': {
12388
12466
  request: {
12389
12467
  manifestUrl: string;
@@ -12512,6 +12590,14 @@ declare interface ProtocolMap extends ProtocolMapBase {
12512
12590
  }, void>;
12513
12591
  'system-register-shutdown-handler': VoidCall;
12514
12592
  'get-permissions': GetterCall<any>;
12593
+ 'refresh-extensions': {
12594
+ request: void;
12595
+ response: string[] | undefined;
12596
+ };
12597
+ 'get-installed-extensions': {
12598
+ request: void;
12599
+ response: OpenFin.ExtensionInfo[];
12600
+ };
12515
12601
  'fdc3-add-context-listener': VoidCall;
12516
12602
  'fdc3-add-intent-listener': VoidCall;
12517
12603
  'fdc3-raise-intent': VoidCall;
@@ -13200,6 +13286,21 @@ declare type ScreenshotPrintOptions = {
13200
13286
  content: 'screenshot';
13201
13287
  };
13202
13288
 
13289
+ /**
13290
+ * An event generated when an application modifies the runtime in a way that affects all other applications in the
13291
+ * application runtime/security realm.
13292
+ */
13293
+ declare type SecurityRealmEvent = BaseEvent_9 & {
13294
+ /**
13295
+ * Config URL of the application that modified the security realm's extensions
13296
+ */
13297
+ configUrl: string;
13298
+ /**
13299
+ * Identity of the application that modified the security realm's extensions
13300
+ */
13301
+ applicationIdentity: OpenFin.ApplicationIdentity;
13302
+ };
13303
+
13203
13304
  declare type SendActionResponse<T extends keyof ProtocolMap> = Message<{
13204
13305
  data: ProtocolMap[T]['response'];
13205
13306
  } & ProtocolMap[T]['specialResponse']>;
@@ -13216,11 +13317,6 @@ declare type SentMessage<Value> = Promise<Value> & {
13216
13317
  messageId: ReturnType<Environment['getNextMessageId']>;
13217
13318
  };
13218
13319
 
13219
- /**
13220
- * Utility type to mark an image serialized as a base64 data URL.
13221
- */
13222
- declare type SerializedImage = string;
13223
-
13224
13320
  /**
13225
13321
  * @interface
13226
13322
  */
@@ -13657,13 +13753,6 @@ declare type SubscriptionOptions = {
13657
13753
  */
13658
13754
  declare class System extends EmitterBase<OpenFin.SystemEvent> {
13659
13755
  /* Excluded from this release type: __constructor */
13660
- /**
13661
- * Dispatch an event to the webcontents that created the notification.
13662
- * Only works for notifications that have been intercepted in the same runtime.
13663
- */
13664
- dispatchNotificationAction(notificationId: string, { action }: {
13665
- action: 'click' | 'close' | 'show';
13666
- }): Promise<void>;
13667
13756
  private sendExternalProcessRequest;
13668
13757
  /**
13669
13758
  * Returns the version of the runtime. The version contains the major, minor,
@@ -13842,7 +13931,9 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
13842
13931
  */
13843
13932
  getEnvironmentVariable(envName: string): Promise<string>;
13844
13933
  /**
13845
- * Get current focused window.
13934
+ * Get currently focused Window.
13935
+ * If a View currently has focus, returns the identity of View's parent Window.
13936
+ * Use {@link Window._Window#getFocusedContent Window.getFocusedContent} to directly access currently focused Window or View.
13846
13937
  *
13847
13938
  * @example
13848
13939
  * ```js
@@ -13850,6 +13941,17 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
13850
13941
  * ```
13851
13942
  */
13852
13943
  getFocusedWindow(): Promise<OpenFin.Identity | null>;
13944
+ /**
13945
+ * Get currently focused content. Returns identity of entity with `entityType`.
13946
+ *
13947
+ * @example
13948
+ * ```js
13949
+ * fin.System.getFocusedContent().then(contentIdentity => console.log(contentIdentity)).catch(err => console.log(err));
13950
+ * ```
13951
+ */
13952
+ getFocusedContent(): Promise<(OpenFin.Identity & {
13953
+ entityType: 'window' | 'view';
13954
+ }) | null>;
13853
13955
  /**
13854
13956
  * Returns information about the given app's certification status
13855
13957
  *
@@ -15103,6 +15205,16 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
15103
15205
  * ```
15104
15206
  */
15105
15207
  setDomainSettings(domainSettings: OpenFin.DefaultDomainSettings): Promise<void>;
15208
+ /**
15209
+ * Attempts to install and enable extensions for the security realm. Users may want to call this function in response
15210
+ * to an `extensions-install-failed` event. Only extensions allowed by every application on the current security realm
15211
+ * will be installed/enabled.
15212
+ */
15213
+ refreshExtensions(): Promise<string[] | undefined>;
15214
+ /**
15215
+ * Gets the currently-installed
15216
+ */
15217
+ getInstalledExtensions(): Promise<OpenFin.ExtensionInfo[]>;
15106
15218
  }
15107
15219
 
15108
15220
  /**
@@ -15120,7 +15232,6 @@ declare namespace SystemEvents {
15120
15232
  IdleStateChangedEvent,
15121
15233
  IdleEvent,
15122
15234
  MonitorInfoChangedEvent,
15123
- NotificationCloseRequested,
15124
15235
  MonitorEvent,
15125
15236
  SessionChangedEvent,
15126
15237
  AppVersionEvent,
@@ -15134,6 +15245,14 @@ declare namespace SystemEvents {
15134
15245
  ApplicationCreatedEvent,
15135
15246
  DesktopIconClickedEvent,
15136
15247
  SystemShutdownEvent,
15248
+ ExtensionsEnabledEvent,
15249
+ ExtensionsDisabledEvent,
15250
+ ExtensionsExcludedEvent,
15251
+ ExtensionsInstalledEvent,
15252
+ ExtensionInstalledEvent,
15253
+ ExtensionsInstallFailedEvent,
15254
+ ExtensionInstallFailedEvent,
15255
+ ExtensionsInitializationFailedEvent,
15137
15256
  Event_11 as Event,
15138
15257
  SystemEvent,
15139
15258
  EventType_8 as EventType,
@@ -16044,7 +16163,7 @@ declare class View_2 extends WebContents<OpenFin.ViewEvent> {
16044
16163
  */
16045
16164
  getInfo: () => Promise<OpenFin.ViewInfo>;
16046
16165
  /**
16047
- * Retrieves the layout for the window the view is attached to.
16166
+ * Retrieves the OpenFin.Layout instance for the Window the View is attached to.
16048
16167
  *
16049
16168
  * @example
16050
16169
  * ```js
@@ -16208,6 +16327,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
16208
16327
  options?: Partial<ViewOptions>;
16209
16328
  };
16210
16329
 
16330
+ /**
16331
+ * @interface
16332
+ */
16333
+ declare type ViewCreationFailure = {
16334
+ /**
16335
+ * The identity of the created view
16336
+ */
16337
+ identity: Identity_4;
16338
+ /**
16339
+ * Whether the view was created with errors
16340
+ */
16341
+ success: false;
16342
+ /**
16343
+ * Error thrown during view creation
16344
+ */
16345
+ error: Error;
16346
+ };
16347
+
16211
16348
  /**
16212
16349
  * The options object required by {@link View.ViewModule.create View.create}.
16213
16350
  *
@@ -16223,6 +16360,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
16223
16360
 
16224
16361
  declare type ViewCreationOrReference = OpenFin.Identity | OpenFin.PlatformViewCreationOptions;
16225
16362
 
16363
+ /**
16364
+ * A view creation state
16365
+ */
16366
+ declare type ViewCreationResult = ViewCreationSuccess | ViewCreationFailure;
16367
+
16368
+ /**
16369
+ * @interface
16370
+ */
16371
+ declare type ViewCreationSuccess = {
16372
+ /**
16373
+ * The identity of the created view
16374
+ */
16375
+ identity: Identity_4;
16376
+ /**
16377
+ * Whether the view was created without errors
16378
+ */
16379
+ success: true;
16380
+ };
16381
+
16226
16382
  /**
16227
16383
  * Generated when a window has a view detached from it.
16228
16384
  * @remarks Will fire when a view is destroyed in which case `target` will be null.
@@ -16384,6 +16540,9 @@ declare class ViewModule extends Base {
16384
16540
  */
16385
16541
  declare type ViewOptions = ConstViewOptions & MutableViewOptions;
16386
16542
 
16543
+ /**
16544
+ * @interface
16545
+ */
16387
16546
  declare type ViewShowAtOptions = {
16388
16547
  /**
16389
16548
  * Sets the view as the top level view. See {@link OpenFin.View.bringToFront} for more information.
@@ -17470,10 +17629,6 @@ declare namespace WebContentsEvents {
17470
17629
  FileDownloadProgressEvent,
17471
17630
  FileDownloadCompletedEvent,
17472
17631
  ContentBlockedEvent,
17473
- SerializedImage,
17474
- NotificationAction_2 as NotificationAction,
17475
- NotificationData,
17476
- NotificationInterceptedEvent,
17477
17632
  Event_5 as Event,
17478
17633
  WebContentsEvent,
17479
17634
  WillPropagateWebContentsEvent,