@openfin/fdc3-api 38.82.67 → 38.83.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/fdc3-api.d.ts CHANGED
@@ -3522,6 +3522,10 @@ declare type ConstViewOptions = {
3522
3522
  */
3523
3523
  enabled: boolean;
3524
3524
  };
3525
+ /**
3526
+ * Control which options to ignore when creating a Platform View.
3527
+ */
3528
+ excludeOptions: ExcludeOptions;
3525
3529
  };
3526
3530
 
3527
3531
  /**
@@ -3766,6 +3770,10 @@ declare type ConstWindowOptions = {
3766
3770
  * Controls whether an option is inherited from the parent application. The option is set as part of the window options for the parent application in either the {@link Manifest.startup_app} or {@link Manifest.platform} properties in the manifest or in {@link ApplicationOptions.mainWindowOptions} when calling {@link Application.ApplicationModule.start Application.start}. Use { [option]: false } to disable a specific [option]. All inheritable properties will be inherited by default if omitted.
3767
3771
  */
3768
3772
  inheritance?: Partial<InheritableOptions>;
3773
+ /**
3774
+ * Control which options to ignore when creating a Platform Window.
3775
+ */
3776
+ excludeOptions: ExcludeOptions;
3769
3777
  };
3770
3778
 
3771
3779
  /**
@@ -4804,7 +4812,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
4804
4812
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
4805
4813
  * from which they propagate).
4806
4814
  */
4807
- declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent;
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;
4808
4816
 
4809
4817
  /**
4810
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.
@@ -4958,6 +4966,18 @@ declare type EventWithId<Event extends AppVersionEvent> = Event extends infer E
4958
4966
  appVersionId: string;
4959
4967
  } : never;
4960
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
+
4961
4981
  /**
4962
4982
  * @internal
4963
4983
  *
@@ -4982,6 +5002,105 @@ declare type ExitCode = {
4982
5002
  exitCode: number;
4983
5003
  };
4984
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
+
4985
5104
  /**
4986
5105
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
4987
5106
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -8246,10 +8365,7 @@ declare type LayoutIdentity = Identity_4 & {
8246
8365
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8247
8366
  type: 'layout-initialized';
8248
8367
  layoutIdentity: OpenFin.LayoutIdentity;
8249
- ofViews: {
8250
- identity: OpenFin.Identity;
8251
- entityType: 'view';
8252
- }[];
8368
+ ofViews: OpenFin.ViewCreationResult[];
8253
8369
  };
8254
8370
 
8255
8371
  /**
@@ -9746,6 +9862,7 @@ declare namespace OpenFin {
9746
9862
  ViewVisibilityOptions,
9747
9863
  WindowState,
9748
9864
  AutoplayPolicyOptions,
9865
+ ExcludeOptions,
9749
9866
  ConstWindowOptions,
9750
9867
  InheritableOptions,
9751
9868
  PolicyOptions,
@@ -9783,6 +9900,9 @@ declare namespace OpenFin {
9783
9900
  ViewOptions,
9784
9901
  ConstViewOptions,
9785
9902
  ViewState,
9903
+ ViewCreationSuccess,
9904
+ ViewCreationFailure,
9905
+ ViewCreationResult,
9786
9906
  Certificate,
9787
9907
  HostContextChangedPayload,
9788
9908
  ApplySnapshotOptions,
@@ -10026,6 +10146,7 @@ declare namespace OpenFin {
10026
10146
  RoutingInfo,
10027
10147
  DownloadShelfOptions,
10028
10148
  ViewShowAtOptions,
10149
+ ExtensionInfo,
10029
10150
  ApplicationEvents,
10030
10151
  BaseEvents,
10031
10152
  ExternalApplicationEvents,
@@ -11663,6 +11784,45 @@ declare interface PlatformProvider {
11663
11784
  * @returns {Promise<void>}
11664
11785
  */
11665
11786
  handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
11787
+ /**
11788
+ * @experimental
11789
+ *
11790
+ * This method is called to handle errors with view creation and initial navigation during layout creation.
11791
+ * Overriding this method enables catching the error and correcting behavior (ie navigating to an error page).
11792
+ * * To indicate that the error has been handled, view creation should be treated as successful return {identity: viewIdentity, success: true}.
11793
+ * * Not returning anything will cause the layout-initialized event to include the view as failed with the original error.
11794
+ * * Throwing an error will update the error on the event payload of layout-initialized to the thrown error.
11795
+ *
11796
+ * @param viewIdentity Identity of the view
11797
+ * @param error error thrown during a view creation
11798
+ * @returns {Promise<OpenFin.ViewCreationSuccess | void>}
11799
+ *
11800
+ * @example
11801
+ *
11802
+ * ```js
11803
+ * const overrideCallback = (PlatformProvider) => {
11804
+ * class Override extends PlatformProvider {
11805
+ * async handleFailedViewCreation(viewIdentity, error) {
11806
+ * const view = fin.View.wrapSync(viewId);
11807
+ * try {
11808
+ * // navigate to an error page
11809
+ * await view.navigate('http://localhost:3000/errorPage.html');
11810
+ * // resolve a success result after redirecting to a error page
11811
+ * return {identity: viewIdentity, success: true};
11812
+ * } catch(e) {
11813
+ * // layout-initialized event will include this view with the error
11814
+ * throw error;
11815
+ * }
11816
+ * }
11817
+ * }
11818
+ * return new Override();
11819
+ * }
11820
+ *
11821
+ * fin.Platform.init({ overrideCallback });
11822
+ *
11823
+ * ```
11824
+ */
11825
+ handleFailedViewCreation(viewIdentity: OpenFin.Identity, error: Error): Promise<OpenFin.ViewCreationSuccess | void>;
11666
11826
  }
11667
11827
 
11668
11828
  /**
@@ -12748,6 +12908,14 @@ declare interface ProtocolMap extends ProtocolMapBase {
12748
12908
  }, void>;
12749
12909
  'system-register-shutdown-handler': VoidCall;
12750
12910
  'get-permissions': GetterCall<any>;
12911
+ 'refresh-extensions': {
12912
+ request: void;
12913
+ response: string[] | undefined;
12914
+ };
12915
+ 'get-installed-extensions': {
12916
+ request: void;
12917
+ response: OpenFin.ExtensionInfo[];
12918
+ };
12751
12919
  'fdc3-add-context-listener': VoidCall;
12752
12920
  'fdc3-add-intent-listener': VoidCall;
12753
12921
  'fdc3-raise-intent': VoidCall;
@@ -13436,6 +13604,21 @@ declare type ScreenshotPrintOptions = {
13436
13604
  content: 'screenshot';
13437
13605
  };
13438
13606
 
13607
+ /**
13608
+ * An event generated when an application modifies the runtime in a way that affects all other applications in the
13609
+ * application runtime/security realm.
13610
+ */
13611
+ declare type SecurityRealmEvent = BaseEvent_9 & {
13612
+ /**
13613
+ * Config URL of the application that modified the security realm's extensions
13614
+ */
13615
+ configUrl: string;
13616
+ /**
13617
+ * Identity of the application that modified the security realm's extensions
13618
+ */
13619
+ applicationIdentity: OpenFin.ApplicationIdentity;
13620
+ };
13621
+
13439
13622
  declare type SendActionResponse<T extends keyof ProtocolMap> = Message<{
13440
13623
  data: ProtocolMap[T]['response'];
13441
13624
  } & ProtocolMap[T]['specialResponse']>;
@@ -15333,6 +15516,16 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
15333
15516
  * ```
15334
15517
  */
15335
15518
  setDomainSettings(domainSettings: OpenFin.DefaultDomainSettings): Promise<void>;
15519
+ /**
15520
+ * Attempts to install and enable extensions for the security realm. Users may want to call this function in response
15521
+ * to an `extensions-install-failed` event. Only extensions allowed by every application on the current security realm
15522
+ * will be installed/enabled.
15523
+ */
15524
+ refreshExtensions(): Promise<string[] | undefined>;
15525
+ /**
15526
+ * Gets the currently-installed
15527
+ */
15528
+ getInstalledExtensions(): Promise<OpenFin.ExtensionInfo[]>;
15336
15529
  }
15337
15530
 
15338
15531
  /**
@@ -15363,6 +15556,14 @@ declare namespace SystemEvents {
15363
15556
  ApplicationCreatedEvent,
15364
15557
  DesktopIconClickedEvent,
15365
15558
  SystemShutdownEvent,
15559
+ ExtensionsEnabledEvent,
15560
+ ExtensionsDisabledEvent,
15561
+ ExtensionsExcludedEvent,
15562
+ ExtensionsInstalledEvent,
15563
+ ExtensionInstalledEvent,
15564
+ ExtensionsInstallFailedEvent,
15565
+ ExtensionInstallFailedEvent,
15566
+ ExtensionsInitializationFailedEvent,
15366
15567
  Event_11 as Event,
15367
15568
  SystemEvent,
15368
15569
  EventType_8 as EventType,
@@ -16481,6 +16682,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
16481
16682
  options?: Partial<ViewOptions>;
16482
16683
  };
16483
16684
 
16685
+ /**
16686
+ * @interface
16687
+ */
16688
+ declare type ViewCreationFailure = {
16689
+ /**
16690
+ * The identity of the created view
16691
+ */
16692
+ identity: Identity_4;
16693
+ /**
16694
+ * Whether the view was created with errors
16695
+ */
16696
+ success: false;
16697
+ /**
16698
+ * Error thrown during view creation
16699
+ */
16700
+ error: Error;
16701
+ };
16702
+
16484
16703
  /**
16485
16704
  * The options object required by {@link View.ViewModule.create View.create}.
16486
16705
  *
@@ -16496,6 +16715,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
16496
16715
 
16497
16716
  declare type ViewCreationOrReference = OpenFin.Identity | OpenFin.PlatformViewCreationOptions;
16498
16717
 
16718
+ /**
16719
+ * A view creation state
16720
+ */
16721
+ declare type ViewCreationResult = ViewCreationSuccess | ViewCreationFailure;
16722
+
16723
+ /**
16724
+ * @interface
16725
+ */
16726
+ declare type ViewCreationSuccess = {
16727
+ /**
16728
+ * The identity of the created view
16729
+ */
16730
+ identity: Identity_4;
16731
+ /**
16732
+ * Whether the view was created without errors
16733
+ */
16734
+ success: true;
16735
+ };
16736
+
16499
16737
  /**
16500
16738
  * Generated when a window has a view detached from it.
16501
16739
  * @remarks Will fire when a view is destroyed in which case `target` will be null.
@@ -16657,6 +16895,9 @@ declare class ViewModule extends Base {
16657
16895
  */
16658
16896
  declare type ViewOptions = ConstViewOptions & MutableViewOptions;
16659
16897
 
16898
+ /**
16899
+ * @interface
16900
+ */
16660
16901
  declare type ViewShowAtOptions = {
16661
16902
  /**
16662
16903
  * Sets the view as the top level view. See {@link OpenFin.View.bringToFront} for more information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/fdc3-api",
3
- "version": "38.82.67",
3
+ "version": "38.83.70",
4
4
  "description": "OpenFin fdc3 module utilities and types.",
5
5
  "license": "SEE LICENSE IN LICENSE.MD",
6
6
  "private": false,