@openfin/core 42.100.91 → 42.100.94

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.
@@ -5570,6 +5570,7 @@ declare interface FinApi<MeType extends OpenFin_2.EntityType> {
5570
5570
  readonly Platform: PlatformModule;
5571
5571
  readonly Interop: InteropModule;
5572
5572
  readonly SnapshotSource: SnapshotSourceModule;
5573
+ readonly NotificationManager: NotificationManagerModule;
5573
5574
  /**
5574
5575
  * Provides access to the OpenFin representation of the current code context (usually an entity
5575
5576
  * such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as to the current `Interop` context.
@@ -8661,19 +8662,74 @@ declare type LogInfo = {
8661
8662
  */
8662
8663
  declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
8663
8664
 
8665
+ /**
8666
+ * Options for the Log Uploader.
8667
+ */
8668
+ declare type LogUploaderOptions = LogUploadOptions & {
8669
+ ui?: LogUploaderUIOptions & {
8670
+ /**
8671
+ * Whether the Log Uploader UI should be shown.
8672
+ * @defaultValue true
8673
+ */
8674
+ show?: boolean;
8675
+ };
8676
+ };
8677
+
8678
+ /**
8679
+ * Options for the Log Uploader UI.
8680
+ * @interface
8681
+ */
8664
8682
  declare type LogUploaderUIOptions = {
8683
+ /**
8684
+ * Title for the Log Uploader window.
8685
+ * @defaultValue 'Here Log Uploader'
8686
+ */
8665
8687
  title?: string;
8688
+ /**
8689
+ * URL of an icon to use for the Log Uploader tool. The default is the Here logo.
8690
+ */
8666
8691
  icon?: string;
8692
+ /**
8693
+ * Name of the organization displayed in the Uploader window.
8694
+ * @defaultValue 'Here'
8695
+ */
8667
8696
  header?: string;
8697
+ /**
8698
+ * An explanation for the user of the purpose of the tool.
8699
+ * @defaultValue 'The following logs are being requested'
8700
+ */
8668
8701
  description?: string;
8702
+ /**
8703
+ * An email address that the user can contact with questions.
8704
+ * @defaultValue 'support@here.io'
8705
+ */
8669
8706
  email?: string;
8707
+ /**
8708
+ * URL of a webpage where the user can find more information about log uploading.
8709
+ * @defaultValue 'https://resources.here.io/docs/core/manage/security/'
8710
+ */
8670
8711
  website?: string;
8712
+ /**
8713
+ * Description of the webpage where the user can find more information.
8714
+ * @defaultValue 'Here Security'
8715
+ */
8671
8716
  websiteDescription?: string;
8672
8717
  };
8673
8718
 
8674
8719
  declare type LogUploadOptions = {
8720
+ /**
8721
+ * The URL where log files are to be uploaded.
8722
+ */
8675
8723
  endpoint: string;
8724
+ /**
8725
+ * An array of URL match patterns to define the manifests of the programs that the Log Uploader should upload logs for.
8726
+ * @defaultValue []
8727
+ */
8676
8728
  manifests?: string[];
8729
+ /**
8730
+ * An array of strings that specifies which logs should be uploaded.
8731
+ * @defaultValue ['app', 'rvm', 'debug']
8732
+ */
8677
8733
  logs?: string[];
8678
8734
  ui?: LogUploaderUIOptions;
8679
8735
  };
@@ -9459,6 +9515,29 @@ declare type NonPropagatedWindowEvent = never;
9459
9515
 
9460
9516
  /* Excluded from this release type: NotCloseRequested */
9461
9517
 
9518
+ declare type NotificationEvent = {
9519
+ type: 'close' | 'click' | 'show';
9520
+ notificationId: string;
9521
+ };
9522
+
9523
+ declare class NotificationManagerInstance {
9524
+ #private;
9525
+ constructor(wire: Transport, id: string);
9526
+ setNotificationHandler: (handler: NotificiationHandler) => Promise<void>;
9527
+ destroy: () => Promise<void>;
9528
+ dispatch: (event: NotificationEvent) => Promise<void>;
9529
+ }
9530
+
9531
+ declare class NotificationManagerModule extends Base {
9532
+ init: () => Promise<NotificationManagerInstance>;
9533
+ }
9534
+
9535
+ declare type NotificationManagerPermissions = {
9536
+ init: boolean;
9537
+ };
9538
+
9539
+ declare type NotificiationHandler = (event: WebNotificationInfo) => void;
9540
+
9462
9541
  /* Excluded from this release type: NotRequested */
9463
9542
 
9464
9543
  /**
@@ -9631,6 +9710,7 @@ declare namespace OpenFin_2 {
9631
9710
  ApplicationPermissions,
9632
9711
  LaunchExternalProcessRule,
9633
9712
  SystemPermissions,
9713
+ NotificationManagerPermissions,
9634
9714
  DevicePermissionName,
9635
9715
  WebPermissionName,
9636
9716
  WebPermission,
@@ -9644,6 +9724,7 @@ declare namespace OpenFin_2 {
9644
9724
  PlatformViewCreationOptions,
9645
9725
  ProcessAffinityStrategy,
9646
9726
  PlatformOptions,
9727
+ LogUploaderOptions,
9647
9728
  LogUploaderUIOptions,
9648
9729
  LogUploadOptions,
9649
9730
  Manifest,
@@ -9867,6 +9948,11 @@ declare namespace OpenFin_2 {
9867
9948
  RoutingInfo,
9868
9949
  DownloadShelfOptions,
9869
9950
  ViewShowAtOptions,
9951
+ NotificationEvent,
9952
+ NotificationManagerInstance,
9953
+ NotificationManagerModule,
9954
+ WebNotificationInfo,
9955
+ WebNotificationProperties,
9870
9956
  ExtensionInfo,
9871
9957
  ServeRequest,
9872
9958
  AppAssetServeRequest,
@@ -10163,6 +10249,7 @@ declare type Permissions_2 = {
10163
10249
  Clipboard?: Partial<ClipboardApiPermissions>;
10164
10250
  webAPIs?: WebPermission[];
10165
10251
  devices?: DeviceInfo[];
10252
+ NotificationManager?: Partial<NotificationManagerPermissions>;
10166
10253
  };
10167
10254
 
10168
10255
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -12331,6 +12418,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12331
12418
  transitions: OpenFin_2.Transition;
12332
12419
  options: OpenFin_2.TransitionOptions;
12333
12420
  }>;
12421
+ 'activate-window-and-focus': ApiCall<{
12422
+ winIdentity: OpenFin_2.Identity;
12423
+ focusIdentity: OpenFin_2.Identity;
12424
+ }, boolean>;
12334
12425
  'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
12335
12426
  'get-window-bounds': IdentityCall<{
12336
12427
  options?: OpenFin_2.GetBoundsOptions;
@@ -12953,6 +13044,34 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12953
13044
  };
12954
13045
  response: void;
12955
13046
  };
13047
+ 'launch-log-uploader': ApiCall<{
13048
+ options: OpenFin_2.LogUploaderOptions;
13049
+ }, void> & {
13050
+ apiPath: '.launchLogUploader';
13051
+ namespace: 'System';
13052
+ };
13053
+ 'dispatch-notification-event': {
13054
+ request: {
13055
+ notificationId: string;
13056
+ type: 'close' | 'show' | 'click';
13057
+ };
13058
+ response: void;
13059
+ };
13060
+ 'init-notification-manager': {
13061
+ request: {};
13062
+ response: {
13063
+ managerId: string;
13064
+ };
13065
+ apiPath: '.init';
13066
+ secure: true;
13067
+ namespace: 'NotificationManager';
13068
+ };
13069
+ 'destroy-notification-manager': {
13070
+ request: {
13071
+ managerId: string;
13072
+ };
13073
+ response: void;
13074
+ };
12956
13075
  };
12957
13076
 
12958
13077
  declare type ProtocolOffer = ClassicProtocolOffer | RTCProtocolOffer;
@@ -15477,6 +15596,10 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15477
15596
  * Not indended for general use, will be used by the `@openfin/workspace-platform` package.
15478
15597
  */
15479
15598
  serveAsset(options: OpenFin_2.ServeAssetOptions): Promise<OpenFin_2.ServedAssetInfo>;
15599
+ /**
15600
+ * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
15601
+ */
15602
+ launchLogUploader(options: OpenFin_2.LogUploaderOptions): Promise<void>;
15480
15603
  }
15481
15604
 
15482
15605
  /**
@@ -17821,6 +17944,19 @@ declare namespace WebContentsEvents {
17821
17944
  }
17822
17945
  }
17823
17946
 
17947
+ declare type WebNotificationInfo = {
17948
+ notificationId: string;
17949
+ properties: WebNotificationProperties;
17950
+ url: string;
17951
+ images: {
17952
+ icon?: string;
17953
+ badge?: string;
17954
+ image?: string;
17955
+ };
17956
+ };
17957
+
17958
+ declare type WebNotificationProperties = Pick<Notification, 'tag' | 'body' | 'data' | 'dir' | 'icon' | 'lang' | 'title'>;
17959
+
17824
17960
  /**
17825
17961
  * Defines the type of requested web APIs permission.
17826
17962
  *
@@ -17963,6 +18099,30 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
17963
18099
  * ```
17964
18100
  */
17965
18101
  getAllFrames(): Promise<Array<OpenFin_2.FrameInfo>>;
18102
+ /**
18103
+ * Activates the current window and focuses the child entity if it exists. If this does
18104
+ * not succeed - say the child does not belong to this window, or the identity does not exist -
18105
+ * it will return false.
18106
+ *
18107
+ * @example
18108
+ * ```js
18109
+ * const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
18110
+ *
18111
+ * win.getCurrentViews()
18112
+ * .then(([view1]) => {
18113
+ * return win.activateAndFocus(view1.identity);
18114
+ * })
18115
+ * .then(success => {
18116
+ * if (success) {
18117
+ * console.log('Window activated and child focused');
18118
+ * } else {
18119
+ * console.log('Window activation failed, focus state unchanged');
18120
+ * }
18121
+ * })
18122
+ * .catch(console.error);
18123
+ * ```
18124
+ */
18125
+ activateAndFocus(childIdentityToFocus: OpenFin_2.Identity): Promise<boolean>;
17966
18126
  /**
17967
18127
  * Gets the current bounds (top, bottom, right, left, width, height) of the window.
17968
18128
  *
package/out/stub.d.ts CHANGED
@@ -5655,6 +5655,7 @@ declare interface FinApi<MeType extends OpenFin_2.EntityType> {
5655
5655
  readonly Platform: PlatformModule;
5656
5656
  readonly Interop: InteropModule;
5657
5657
  readonly SnapshotSource: SnapshotSourceModule;
5658
+ readonly NotificationManager: NotificationManagerModule;
5658
5659
  /**
5659
5660
  * Provides access to the OpenFin representation of the current code context (usually an entity
5660
5661
  * such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as to the current `Interop` context.
@@ -8957,19 +8958,74 @@ declare type LogInfo = {
8957
8958
  */
8958
8959
  declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
8959
8960
 
8961
+ /**
8962
+ * Options for the Log Uploader.
8963
+ */
8964
+ declare type LogUploaderOptions = LogUploadOptions & {
8965
+ ui?: LogUploaderUIOptions & {
8966
+ /**
8967
+ * Whether the Log Uploader UI should be shown.
8968
+ * @defaultValue true
8969
+ */
8970
+ show?: boolean;
8971
+ };
8972
+ };
8973
+
8974
+ /**
8975
+ * Options for the Log Uploader UI.
8976
+ * @interface
8977
+ */
8960
8978
  declare type LogUploaderUIOptions = {
8979
+ /**
8980
+ * Title for the Log Uploader window.
8981
+ * @defaultValue 'Here Log Uploader'
8982
+ */
8961
8983
  title?: string;
8984
+ /**
8985
+ * URL of an icon to use for the Log Uploader tool. The default is the Here logo.
8986
+ */
8962
8987
  icon?: string;
8988
+ /**
8989
+ * Name of the organization displayed in the Uploader window.
8990
+ * @defaultValue 'Here'
8991
+ */
8963
8992
  header?: string;
8993
+ /**
8994
+ * An explanation for the user of the purpose of the tool.
8995
+ * @defaultValue 'The following logs are being requested'
8996
+ */
8964
8997
  description?: string;
8998
+ /**
8999
+ * An email address that the user can contact with questions.
9000
+ * @defaultValue 'support@here.io'
9001
+ */
8965
9002
  email?: string;
9003
+ /**
9004
+ * URL of a webpage where the user can find more information about log uploading.
9005
+ * @defaultValue 'https://resources.here.io/docs/core/manage/security/'
9006
+ */
8966
9007
  website?: string;
9008
+ /**
9009
+ * Description of the webpage where the user can find more information.
9010
+ * @defaultValue 'Here Security'
9011
+ */
8967
9012
  websiteDescription?: string;
8968
9013
  };
8969
9014
 
8970
9015
  declare type LogUploadOptions = {
9016
+ /**
9017
+ * The URL where log files are to be uploaded.
9018
+ */
8971
9019
  endpoint: string;
9020
+ /**
9021
+ * An array of URL match patterns to define the manifests of the programs that the Log Uploader should upload logs for.
9022
+ * @defaultValue []
9023
+ */
8972
9024
  manifests?: string[];
9025
+ /**
9026
+ * An array of strings that specifies which logs should be uploaded.
9027
+ * @defaultValue ['app', 'rvm', 'debug']
9028
+ */
8973
9029
  logs?: string[];
8974
9030
  ui?: LogUploaderUIOptions;
8975
9031
  };
@@ -9772,6 +9828,29 @@ declare type NonPropagatedWindowEvent = never;
9772
9828
  */
9773
9829
  declare type NotCloseRequested<EventType extends string> = Exclude<EventType, 'close-requested'>;
9774
9830
 
9831
+ declare type NotificationEvent = {
9832
+ type: 'close' | 'click' | 'show';
9833
+ notificationId: string;
9834
+ };
9835
+
9836
+ declare class NotificationManagerInstance {
9837
+ #private;
9838
+ constructor(wire: Transport, id: string);
9839
+ setNotificationHandler: (handler: NotificiationHandler) => Promise<void>;
9840
+ destroy: () => Promise<void>;
9841
+ dispatch: (event: NotificationEvent) => Promise<void>;
9842
+ }
9843
+
9844
+ declare class NotificationManagerModule extends Base {
9845
+ init: () => Promise<NotificationManagerInstance>;
9846
+ }
9847
+
9848
+ declare type NotificationManagerPermissions = {
9849
+ init: boolean;
9850
+ };
9851
+
9852
+ declare type NotificiationHandler = (event: WebNotificationInfo) => void;
9853
+
9775
9854
  /**
9776
9855
  * @internal
9777
9856
  *
@@ -9949,6 +10028,7 @@ declare namespace OpenFin_2 {
9949
10028
  ApplicationPermissions,
9950
10029
  LaunchExternalProcessRule,
9951
10030
  SystemPermissions,
10031
+ NotificationManagerPermissions,
9952
10032
  DevicePermissionName,
9953
10033
  WebPermissionName,
9954
10034
  WebPermission,
@@ -9962,6 +10042,7 @@ declare namespace OpenFin_2 {
9962
10042
  PlatformViewCreationOptions,
9963
10043
  ProcessAffinityStrategy,
9964
10044
  PlatformOptions,
10045
+ LogUploaderOptions,
9965
10046
  LogUploaderUIOptions,
9966
10047
  LogUploadOptions,
9967
10048
  Manifest,
@@ -10185,6 +10266,11 @@ declare namespace OpenFin_2 {
10185
10266
  RoutingInfo,
10186
10267
  DownloadShelfOptions,
10187
10268
  ViewShowAtOptions,
10269
+ NotificationEvent,
10270
+ NotificationManagerInstance,
10271
+ NotificationManagerModule,
10272
+ WebNotificationInfo,
10273
+ WebNotificationProperties,
10188
10274
  ExtensionInfo,
10189
10275
  ServeRequest,
10190
10276
  AppAssetServeRequest,
@@ -10481,6 +10567,7 @@ declare type Permissions_2 = {
10481
10567
  Clipboard?: Partial<ClipboardApiPermissions>;
10482
10568
  webAPIs?: WebPermission[];
10483
10569
  devices?: DeviceInfo[];
10570
+ NotificationManager?: Partial<NotificationManagerPermissions>;
10484
10571
  };
10485
10572
 
10486
10573
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -12732,6 +12819,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12732
12819
  transitions: OpenFin_2.Transition;
12733
12820
  options: OpenFin_2.TransitionOptions;
12734
12821
  }>;
12822
+ 'activate-window-and-focus': ApiCall<{
12823
+ winIdentity: OpenFin_2.Identity;
12824
+ focusIdentity: OpenFin_2.Identity;
12825
+ }, boolean>;
12735
12826
  'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
12736
12827
  'get-window-bounds': IdentityCall<{
12737
12828
  options?: OpenFin_2.GetBoundsOptions;
@@ -13354,6 +13445,34 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13354
13445
  };
13355
13446
  response: void;
13356
13447
  };
13448
+ 'launch-log-uploader': ApiCall<{
13449
+ options: OpenFin_2.LogUploaderOptions;
13450
+ }, void> & {
13451
+ apiPath: '.launchLogUploader';
13452
+ namespace: 'System';
13453
+ };
13454
+ 'dispatch-notification-event': {
13455
+ request: {
13456
+ notificationId: string;
13457
+ type: 'close' | 'show' | 'click';
13458
+ };
13459
+ response: void;
13460
+ };
13461
+ 'init-notification-manager': {
13462
+ request: {};
13463
+ response: {
13464
+ managerId: string;
13465
+ };
13466
+ apiPath: '.init';
13467
+ secure: true;
13468
+ namespace: 'NotificationManager';
13469
+ };
13470
+ 'destroy-notification-manager': {
13471
+ request: {
13472
+ managerId: string;
13473
+ };
13474
+ response: void;
13475
+ };
13357
13476
  };
13358
13477
 
13359
13478
  declare type ProtocolOffer = ClassicProtocolOffer | RTCProtocolOffer;
@@ -15884,6 +16003,10 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15884
16003
  * Not indended for general use, will be used by the `@openfin/workspace-platform` package.
15885
16004
  */
15886
16005
  serveAsset(options: OpenFin_2.ServeAssetOptions): Promise<OpenFin_2.ServedAssetInfo>;
16006
+ /**
16007
+ * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
16008
+ */
16009
+ launchLogUploader(options: OpenFin_2.LogUploaderOptions): Promise<void>;
15887
16010
  }
15888
16011
 
15889
16012
  /**
@@ -18272,6 +18395,19 @@ declare namespace WebContentsEvents {
18272
18395
  }
18273
18396
  }
18274
18397
 
18398
+ declare type WebNotificationInfo = {
18399
+ notificationId: string;
18400
+ properties: WebNotificationProperties;
18401
+ url: string;
18402
+ images: {
18403
+ icon?: string;
18404
+ badge?: string;
18405
+ image?: string;
18406
+ };
18407
+ };
18408
+
18409
+ declare type WebNotificationProperties = Pick<Notification, 'tag' | 'body' | 'data' | 'dir' | 'icon' | 'lang' | 'title'>;
18410
+
18275
18411
  /**
18276
18412
  * Defines the type of requested web APIs permission.
18277
18413
  *
@@ -18417,6 +18553,30 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
18417
18553
  * ```
18418
18554
  */
18419
18555
  getAllFrames(): Promise<Array<OpenFin_2.FrameInfo>>;
18556
+ /**
18557
+ * Activates the current window and focuses the child entity if it exists. If this does
18558
+ * not succeed - say the child does not belong to this window, or the identity does not exist -
18559
+ * it will return false.
18560
+ *
18561
+ * @example
18562
+ * ```js
18563
+ * const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
18564
+ *
18565
+ * win.getCurrentViews()
18566
+ * .then(([view1]) => {
18567
+ * return win.activateAndFocus(view1.identity);
18568
+ * })
18569
+ * .then(success => {
18570
+ * if (success) {
18571
+ * console.log('Window activated and child focused');
18572
+ * } else {
18573
+ * console.log('Window activation failed, focus state unchanged');
18574
+ * }
18575
+ * })
18576
+ * .catch(console.error);
18577
+ * ```
18578
+ */
18579
+ activateAndFocus(childIdentityToFocus: OpenFin_2.Identity): Promise<boolean>;
18420
18580
  /**
18421
18581
  * Gets the current bounds (top, bottom, right, left, width, height) of the window.
18422
18582
  *