@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
  *
@@ -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
  *