@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.
@@ -3463,6 +3463,10 @@ declare type ConstViewOptions = {
3463
3463
  */
3464
3464
  enabled: boolean;
3465
3465
  };
3466
+ /**
3467
+ * Control which options to ignore when creating a Platform View.
3468
+ */
3469
+ excludeOptions: ExcludeOptions;
3466
3470
  };
3467
3471
 
3468
3472
  /**
@@ -3707,6 +3711,10 @@ declare type ConstWindowOptions = {
3707
3711
  * 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
3712
  */
3709
3713
  inheritance?: Partial<InheritableOptions>;
3714
+ /**
3715
+ * Control which options to ignore when creating a Platform Window.
3716
+ */
3717
+ excludeOptions: ExcludeOptions;
3710
3718
  };
3711
3719
 
3712
3720
  /**
@@ -4740,7 +4748,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
4740
4748
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
4741
4749
  * from which they propagate).
4742
4750
  */
4743
- declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent;
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;
4744
4752
 
4745
4753
  /**
4746
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.
@@ -4885,6 +4893,18 @@ declare type EventType_9 = Event_12['type'];
4885
4893
 
4886
4894
  /* Excluded from this release type: EventWithId */
4887
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
+
4888
4908
  /* Excluded from this release type: ExcludeRequested */
4889
4909
 
4890
4910
  declare type ExistingConnectConfig = ConfigWithUuid & {
@@ -4900,6 +4920,105 @@ declare type ExitCode = {
4900
4920
  exitCode: number;
4901
4921
  };
4902
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
+
4903
5022
  /**
4904
5023
  * An ExternalApplication object representing native language adapter connections to the runtime. Allows
4905
5024
  * the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
@@ -8123,10 +8242,7 @@ declare type LayoutIdentity = Identity_4 & {
8123
8242
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8124
8243
  type: 'layout-initialized';
8125
8244
  layoutIdentity: OpenFin.LayoutIdentity;
8126
- ofViews: {
8127
- identity: OpenFin.Identity;
8128
- entityType: 'view';
8129
- }[];
8245
+ ofViews: OpenFin.ViewCreationResult[];
8130
8246
  };
8131
8247
 
8132
8248
  /**
@@ -9431,6 +9547,7 @@ declare namespace OpenFin {
9431
9547
  ViewVisibilityOptions,
9432
9548
  WindowState,
9433
9549
  AutoplayPolicyOptions,
9550
+ ExcludeOptions,
9434
9551
  ConstWindowOptions,
9435
9552
  InheritableOptions,
9436
9553
  PolicyOptions,
@@ -9468,6 +9585,9 @@ declare namespace OpenFin {
9468
9585
  ViewOptions,
9469
9586
  ConstViewOptions,
9470
9587
  ViewState,
9588
+ ViewCreationSuccess,
9589
+ ViewCreationFailure,
9590
+ ViewCreationResult,
9471
9591
  Certificate,
9472
9592
  HostContextChangedPayload,
9473
9593
  ApplySnapshotOptions,
@@ -9711,6 +9831,7 @@ declare namespace OpenFin {
9711
9831
  RoutingInfo,
9712
9832
  DownloadShelfOptions,
9713
9833
  ViewShowAtOptions,
9834
+ ExtensionInfo,
9714
9835
  ApplicationEvents,
9715
9836
  BaseEvents,
9716
9837
  ExternalApplicationEvents,
@@ -11270,6 +11391,45 @@ declare interface PlatformProvider {
11270
11391
  * @returns {Promise<void>}
11271
11392
  */
11272
11393
  handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
11394
+ /**
11395
+ * @experimental
11396
+ *
11397
+ * This method is called to handle errors with view creation and initial navigation during layout creation.
11398
+ * Overriding this method enables catching the error and correcting behavior (ie navigating to an error page).
11399
+ * * To indicate that the error has been handled, view creation should be treated as successful return {identity: viewIdentity, success: true}.
11400
+ * * Not returning anything will cause the layout-initialized event to include the view as failed with the original error.
11401
+ * * Throwing an error will update the error on the event payload of layout-initialized to the thrown error.
11402
+ *
11403
+ * @param viewIdentity Identity of the view
11404
+ * @param error error thrown during a view creation
11405
+ * @returns {Promise<OpenFin.ViewCreationSuccess | void>}
11406
+ *
11407
+ * @example
11408
+ *
11409
+ * ```js
11410
+ * const overrideCallback = (PlatformProvider) => {
11411
+ * class Override extends PlatformProvider {
11412
+ * async handleFailedViewCreation(viewIdentity, error) {
11413
+ * const view = fin.View.wrapSync(viewId);
11414
+ * try {
11415
+ * // navigate to an error page
11416
+ * await view.navigate('http://localhost:3000/errorPage.html');
11417
+ * // resolve a success result after redirecting to a error page
11418
+ * return {identity: viewIdentity, success: true};
11419
+ * } catch(e) {
11420
+ * // layout-initialized event will include this view with the error
11421
+ * throw error;
11422
+ * }
11423
+ * }
11424
+ * }
11425
+ * return new Override();
11426
+ * }
11427
+ *
11428
+ * fin.Platform.init({ overrideCallback });
11429
+ *
11430
+ * ```
11431
+ */
11432
+ handleFailedViewCreation(viewIdentity: OpenFin.Identity, error: Error): Promise<OpenFin.ViewCreationSuccess | void>;
11273
11433
  }
11274
11434
 
11275
11435
  /**
@@ -12355,6 +12515,14 @@ declare interface ProtocolMap extends ProtocolMapBase {
12355
12515
  }, void>;
12356
12516
  'system-register-shutdown-handler': VoidCall;
12357
12517
  'get-permissions': GetterCall<any>;
12518
+ 'refresh-extensions': {
12519
+ request: void;
12520
+ response: string[] | undefined;
12521
+ };
12522
+ 'get-installed-extensions': {
12523
+ request: void;
12524
+ response: OpenFin.ExtensionInfo[];
12525
+ };
12358
12526
  'fdc3-add-context-listener': VoidCall;
12359
12527
  'fdc3-add-intent-listener': VoidCall;
12360
12528
  'fdc3-raise-intent': VoidCall;
@@ -13043,6 +13211,21 @@ declare type ScreenshotPrintOptions = {
13043
13211
  content: 'screenshot';
13044
13212
  };
13045
13213
 
13214
+ /**
13215
+ * An event generated when an application modifies the runtime in a way that affects all other applications in the
13216
+ * application runtime/security realm.
13217
+ */
13218
+ declare type SecurityRealmEvent = BaseEvent_9 & {
13219
+ /**
13220
+ * Config URL of the application that modified the security realm's extensions
13221
+ */
13222
+ configUrl: string;
13223
+ /**
13224
+ * Identity of the application that modified the security realm's extensions
13225
+ */
13226
+ applicationIdentity: OpenFin.ApplicationIdentity;
13227
+ };
13228
+
13046
13229
  declare type SendActionResponse<T extends keyof ProtocolMap> = Message<{
13047
13230
  data: ProtocolMap[T]['response'];
13048
13231
  } & ProtocolMap[T]['specialResponse']>;
@@ -14934,6 +15117,16 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
14934
15117
  * ```
14935
15118
  */
14936
15119
  setDomainSettings(domainSettings: OpenFin.DefaultDomainSettings): Promise<void>;
15120
+ /**
15121
+ * Attempts to install and enable extensions for the security realm. Users may want to call this function in response
15122
+ * to an `extensions-install-failed` event. Only extensions allowed by every application on the current security realm
15123
+ * will be installed/enabled.
15124
+ */
15125
+ refreshExtensions(): Promise<string[] | undefined>;
15126
+ /**
15127
+ * Gets the currently-installed
15128
+ */
15129
+ getInstalledExtensions(): Promise<OpenFin.ExtensionInfo[]>;
14937
15130
  }
14938
15131
 
14939
15132
  /**
@@ -14964,6 +15157,14 @@ declare namespace SystemEvents {
14964
15157
  ApplicationCreatedEvent,
14965
15158
  DesktopIconClickedEvent,
14966
15159
  SystemShutdownEvent,
15160
+ ExtensionsEnabledEvent,
15161
+ ExtensionsDisabledEvent,
15162
+ ExtensionsExcludedEvent,
15163
+ ExtensionsInstalledEvent,
15164
+ ExtensionInstalledEvent,
15165
+ ExtensionsInstallFailedEvent,
15166
+ ExtensionInstallFailedEvent,
15167
+ ExtensionsInitializationFailedEvent,
14967
15168
  Event_11 as Event,
14968
15169
  SystemEvent,
14969
15170
  EventType_8 as EventType,
@@ -16038,6 +16239,24 @@ declare type ViewContentCreationRule = BaseContentCreationRule & {
16038
16239
  options?: Partial<ViewOptions>;
16039
16240
  };
16040
16241
 
16242
+ /**
16243
+ * @interface
16244
+ */
16245
+ declare type ViewCreationFailure = {
16246
+ /**
16247
+ * The identity of the created view
16248
+ */
16249
+ identity: Identity_4;
16250
+ /**
16251
+ * Whether the view was created with errors
16252
+ */
16253
+ success: false;
16254
+ /**
16255
+ * Error thrown during view creation
16256
+ */
16257
+ error: Error;
16258
+ };
16259
+
16041
16260
  /**
16042
16261
  * The options object required by {@link View.ViewModule.create View.create}.
16043
16262
  *
@@ -16053,6 +16272,25 @@ declare type ViewCreationOptions = Partial<ViewOptions> & {
16053
16272
 
16054
16273
  declare type ViewCreationOrReference = OpenFin.Identity | OpenFin.PlatformViewCreationOptions;
16055
16274
 
16275
+ /**
16276
+ * A view creation state
16277
+ */
16278
+ declare type ViewCreationResult = ViewCreationSuccess | ViewCreationFailure;
16279
+
16280
+ /**
16281
+ * @interface
16282
+ */
16283
+ declare type ViewCreationSuccess = {
16284
+ /**
16285
+ * The identity of the created view
16286
+ */
16287
+ identity: Identity_4;
16288
+ /**
16289
+ * Whether the view was created without errors
16290
+ */
16291
+ success: true;
16292
+ };
16293
+
16056
16294
  /**
16057
16295
  * Generated when a window has a view detached from it.
16058
16296
  * @remarks Will fire when a view is destroyed in which case `target` will be null.
@@ -16214,6 +16452,9 @@ declare class ViewModule extends Base {
16214
16452
  */
16215
16453
  declare type ViewOptions = ConstViewOptions & MutableViewOptions;
16216
16454
 
16455
+ /**
16456
+ * @interface
16457
+ */
16217
16458
  declare type ViewShowAtOptions = {
16218
16459
  /**
16219
16460
  * Sets the view as the top level view. See {@link OpenFin.View.bringToFront} for more information.