@openfin/core 39.82.13 → 39.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.
@@ -102,7 +102,7 @@ declare type ApiInjection = DomainApiSettings;
102
102
  * Generated when a new Platform's API becomes responsive.
103
103
  * @interface
104
104
  */
105
- declare type ApiReadyEvent = BaseEvent & {
105
+ declare type ApiReadyEvent = BaseEvents.BaseEvent & {
106
106
  topic: 'application';
107
107
  type: 'platform-api-ready';
108
108
  };
@@ -914,7 +914,7 @@ declare namespace ApplicationEvents {
914
914
  PropagatedApplicationEvent,
915
915
  PropagatedEventType_3 as PropagatedEventType,
916
916
  PropagatedApplicationEventType,
917
- Payload_4 as Payload,
917
+ Payload_5 as Payload,
918
918
  ByType_3 as ByType
919
919
  }
920
920
  }
@@ -1707,7 +1707,7 @@ declare type BaseEvent_10 = Events.BaseEvents.BaseEvent;
1707
1707
  * A base Channel event.
1708
1708
  * @interface
1709
1709
  */
1710
- declare type BaseEvent_2 = NamedEvent & {
1710
+ declare type BaseEvent_2 = BaseEvents.NamedEvent & {
1711
1711
  channelName: string;
1712
1712
  channelId: string;
1713
1713
  };
@@ -1777,6 +1777,7 @@ declare namespace BaseEvents {
1777
1777
  NotCloseRequested,
1778
1778
  PropagatedEventType,
1779
1779
  PropagatedEvent,
1780
+ Payload_2 as Payload,
1780
1781
  EventHandler,
1781
1782
  BaseEvent,
1782
1783
  IdentityEvent,
@@ -1917,7 +1918,7 @@ declare type BrowserContentCreationRule = BaseContentCreationRule & {
1917
1918
  *
1918
1919
  * @typeParam Type String key specifying the event to extract
1919
1920
  */
1920
- declare type ByType<Type extends EventType> = Payload_2<Type>;
1921
+ declare type ByType<Type extends EventType> = Payload_3<Type>;
1921
1922
 
1922
1923
  /**
1923
1924
  * Extracts a single event type matching the given key from the Window {@link Event} union.
@@ -1926,7 +1927,7 @@ declare type ByType<Type extends EventType> = Payload_2<Type>;
1926
1927
  *
1927
1928
  * @typeParam Type String key specifying the event to extract
1928
1929
  */
1929
- declare type ByType_2<Type extends EventType_2> = Payload_3<Type>;
1930
+ declare type ByType_2<Type extends EventType_2> = Payload_4<Type>;
1930
1931
 
1931
1932
  /**
1932
1933
  * Extracts a single event type matching the given key from the Application {@link Event} union.
@@ -1935,7 +1936,7 @@ declare type ByType_2<Type extends EventType_2> = Payload_3<Type>;
1935
1936
  *
1936
1937
  * @typeParam Type String key specifying the event to extract
1937
1938
  */
1938
- declare type ByType_3<Type extends EventType_3> = Payload_4<Type>;
1939
+ declare type ByType_3<Type extends EventType_3> = Payload_5<Type>;
1939
1940
 
1940
1941
  /**
1941
1942
  * Extracts a single event type matching the given key from the ExternalApplication {@link Event} union.
@@ -1944,7 +1945,7 @@ declare type ByType_3<Type extends EventType_3> = Payload_4<Type>;
1944
1945
  *
1945
1946
  * @typeParam Type String key specifying the event to extract
1946
1947
  */
1947
- declare type ByType_4<Type extends EventType_4> = Payload_5<Type>;
1948
+ declare type ByType_4<Type extends EventType_4> = Payload_6<Type>;
1948
1949
 
1949
1950
  /**
1950
1951
  * Extracts a single event type matching the given key from the Frame {@link Event} union.
@@ -1953,7 +1954,7 @@ declare type ByType_4<Type extends EventType_4> = Payload_5<Type>;
1953
1954
  *
1954
1955
  * @typeParam Type String key specifying the event to extract
1955
1956
  */
1956
- declare type ByType_5<Type extends EventType_5> = Payload_6<Type>;
1957
+ declare type ByType_5<Type extends EventType_5> = Payload_7<Type>;
1957
1958
 
1958
1959
  /**
1959
1960
  * Extracts a single event type matching the given key from the GlobalHotkey {@link Event} union.
@@ -1962,7 +1963,7 @@ declare type ByType_5<Type extends EventType_5> = Payload_6<Type>;
1962
1963
  *
1963
1964
  * @typeParam Type String key specifying the event to extract
1964
1965
  */
1965
- declare type ByType_6<Type extends EventType_6> = Payload_7<Type>;
1966
+ declare type ByType_6<Type extends EventType_6> = Payload_8<Type>;
1966
1967
 
1967
1968
  /**
1968
1969
  * Extracts a single event type matching the given key from the Platform {@link Event} union.
@@ -1971,7 +1972,7 @@ declare type ByType_6<Type extends EventType_6> = Payload_7<Type>;
1971
1972
  *
1972
1973
  * @typeParam Type String key specifying the event to extract
1973
1974
  */
1974
- declare type ByType_7<Type extends EventType_7> = Payload_8<Type>;
1975
+ declare type ByType_7<Type extends EventType_7> = Payload_9<Type>;
1975
1976
 
1976
1977
  /**
1977
1978
  * Extracts a single event type matching the given key from the System {@link Event} union.
@@ -1980,7 +1981,7 @@ declare type ByType_7<Type extends EventType_7> = Payload_8<Type>;
1980
1981
  *
1981
1982
  * @typeParam Type String key specifying the event to extract
1982
1983
  */
1983
- declare type ByType_8<Type extends EventType_8> = Payload_9<Type>;
1984
+ declare type ByType_8<Type extends EventType_8> = Payload_10<Type>;
1984
1985
 
1985
1986
  /**
1986
1987
  * Extracts a single event type matching the given key from the Layout DOM {@link Event} union.
@@ -1989,7 +1990,7 @@ declare type ByType_8<Type extends EventType_8> = Payload_9<Type>;
1989
1990
  *
1990
1991
  * @typeParam Type String key specifying the event to extract
1991
1992
  */
1992
- declare type ByType_9<Type extends EventType_9> = Payload_10<Type>;
1993
+ declare type ByType_9<Type extends EventType_9> = Payload_11<Type>;
1993
1994
 
1994
1995
  /**
1995
1996
  * Configuration for page capture.
@@ -3701,6 +3702,7 @@ declare type ContainerCreatedEvent = LayoutDOMEvent & {
3701
3702
 
3702
3703
  /**
3703
3704
  * Generated when content navigation or redirection is blocked by {@link OpenFin.DomainSettings}.
3705
+ * @interface
3704
3706
  */
3705
3707
  declare type ContentBlockedEvent = NamedEvent & {
3706
3708
  type: 'content-blocked';
@@ -4805,9 +4807,7 @@ declare class EventAggregator extends EmitterMap {
4805
4807
  * @remarks Selects the correct type for the event
4806
4808
  * payload from the provided union based on the provided string literal type.
4807
4809
  */
4808
- declare type EventHandler<EmitterEvent extends BaseEvent, EventType extends string> = (payload: Extract<EmitterEvent, {
4809
- type: EventType;
4810
- }>, ...args: any[]) => void;
4810
+ declare type EventHandler<EmitterEvent extends BaseEvent, EventType extends string> = (payload: Payload_2<EmitterEvent, EventType>, ...args: any[]) => void;
4811
4811
 
4812
4812
  declare namespace Events {
4813
4813
  export {
@@ -4943,7 +4943,7 @@ declare namespace ExternalApplicationEvents {
4943
4943
  ExternalApplicationEvent,
4944
4944
  EventType_4 as EventType,
4945
4945
  ExternalApplicationEventType,
4946
- Payload_5 as Payload,
4946
+ Payload_6 as Payload,
4947
4947
  ByType_4 as ByType
4948
4948
  }
4949
4949
  }
@@ -5395,7 +5395,7 @@ declare namespace FrameEvents {
5395
5395
  FrameEvent,
5396
5396
  EventType_5 as EventType,
5397
5397
  FrameEventType,
5398
- Payload_6 as Payload,
5398
+ Payload_7 as Payload,
5399
5399
  ByType_5 as ByType
5400
5400
  }
5401
5401
  }
@@ -5635,7 +5635,7 @@ declare namespace GlobalHotkeyEvents {
5635
5635
  GlobalHotkeyEvent,
5636
5636
  EventType_6 as EventType,
5637
5637
  GlobalHotkeyEventType,
5638
- Payload_7 as Payload,
5638
+ Payload_8 as Payload,
5639
5639
  ByType_6 as ByType
5640
5640
  }
5641
5641
  }
@@ -7715,7 +7715,7 @@ declare namespace LayoutDOMEvents {
7715
7715
  LayoutStateChangedEvent,
7716
7716
  Event_12 as Event,
7717
7717
  EventType_9 as EventType,
7718
- Payload_10 as Payload,
7718
+ Payload_11 as Payload,
7719
7719
  ByType_9 as ByType
7720
7720
  }
7721
7721
  }
@@ -8221,6 +8221,23 @@ declare type LogLevel = OpenFin_2.LogLevel;
8221
8221
  */
8222
8222
  declare type LogLevel_2 = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
8223
8223
 
8224
+ declare type LogUploaderUIOptions = {
8225
+ title?: string;
8226
+ icon?: string;
8227
+ header?: string;
8228
+ description?: string;
8229
+ email?: string;
8230
+ website?: string;
8231
+ websiteDescription?: string;
8232
+ };
8233
+
8234
+ declare type LogUploadOptions = {
8235
+ endpoint: string;
8236
+ manifests?: string[];
8237
+ logs?: string[];
8238
+ ui?: LogUploaderUIOptions;
8239
+ };
8240
+
8224
8241
  /**
8225
8242
  * @interface
8226
8243
  */
@@ -8279,6 +8296,7 @@ declare type Manifest = {
8279
8296
  enableErrorReporting?: boolean;
8280
8297
  };
8281
8298
  interopBrokerConfiguration: InteropBrokerOptions;
8299
+ logUpload?: LogUploadOptions;
8282
8300
  };
8283
8301
 
8284
8302
  /**
@@ -8910,6 +8928,34 @@ declare type NavigationRules = {
8910
8928
 
8911
8929
  declare type NewConnectConfig = ConfigWithUuid & ConfigWithRuntime;
8912
8930
 
8931
+ declare interface NodeNetworkInterfaceBase {
8932
+ address: string;
8933
+ netmask: string;
8934
+ mac: string;
8935
+ internal: boolean;
8936
+ cidr: string | null;
8937
+ }
8938
+
8939
+ declare type NodeNetworkInterfaceInfo = NodeNetworkInterfaceInfoIPv4 | NodeNetworkInterfaceInfoIPv6;
8940
+
8941
+ declare interface NodeNetworkInterfaceInfoIPv4 extends NodeNetworkInterfaceBase {
8942
+ family: 'IPv4';
8943
+ scopeid?: undefined;
8944
+ }
8945
+
8946
+ declare interface NodeNetworkInterfaceInfoIPv6 extends NodeNetworkInterfaceBase {
8947
+ family: 'IPv6';
8948
+ scopeid: number;
8949
+ }
8950
+
8951
+ declare interface NodeUserInfo {
8952
+ username: string;
8953
+ uid: number;
8954
+ gid: number;
8955
+ shell: string | null;
8956
+ homedir: string;
8957
+ }
8958
+
8913
8959
  /**
8914
8960
  * @interface
8915
8961
  */
@@ -9112,6 +9158,8 @@ declare namespace OpenFin_2 {
9112
9158
  PlatformViewCreationOptions,
9113
9159
  ProcessAffinityStrategy,
9114
9160
  PlatformOptions,
9161
+ LogUploaderUIOptions,
9162
+ LogUploadOptions,
9115
9163
  Manifest,
9116
9164
  LayoutContent,
9117
9165
  LayoutItemConfig,
@@ -9139,6 +9187,7 @@ declare namespace OpenFin_2 {
9139
9187
  Time,
9140
9188
  CpuInfo,
9141
9189
  GpuInfo,
9190
+ OSInfo,
9142
9191
  HostSpecs,
9143
9192
  PrinterInfo_2 as PrinterInfo,
9144
9193
  Dpi,
@@ -9348,6 +9397,25 @@ declare type OptionsChangedEvent = BaseEvent_5 & {
9348
9397
  diff: OpenFin_2.WindowOptionDiff;
9349
9398
  };
9350
9399
 
9400
+ /**
9401
+ * @interface
9402
+ * The keys represent the output from calling individual Node `os` APIs.
9403
+ * For example, `userInfo` will have the output of calling `os.userInfo()`. For more information
9404
+ * see [Node `os` API docs](https://nodejs.org/docs/latest-v20.x/api/os.html)
9405
+ */
9406
+ declare type OSInfo = {
9407
+ platform: string;
9408
+ release: string;
9409
+ version: string;
9410
+ /**
9411
+ * Throws if a user has no username or homedir.
9412
+ * See [Node os.userInfo docs for more info](https://nodejs.org/docs/latest-v20.x/api/os.html#osuserinfooptions)
9413
+ */
9414
+ userInfo: NodeUserInfo;
9415
+ hostname: string;
9416
+ networkInterfaces: Record<string, NodeNetworkInterfaceInfo[] | undefined>;
9417
+ };
9418
+
9351
9419
  declare type OverrideCallback<T extends any = PlatformProvider, U extends T = T> = (arg: Constructor<T>) => U | Promise<U>;
9352
9420
 
9353
9421
  /**
@@ -9376,86 +9444,110 @@ declare type Payload<Success extends boolean = boolean, Data = any> = {
9376
9444
  error?: Success extends false ? ErrorPlainObject | undefined : never;
9377
9445
  };
9378
9446
 
9447
+ /**
9448
+ * Extracts a single event type matching the given key from the System {@link Event} union.
9449
+ *
9450
+ * @see {@link ByType}
9451
+ *
9452
+ * @typeParam Type String key specifying the event to extract
9453
+ */
9454
+ declare type Payload_10<Type extends EventType_8> = BaseEvents.Payload<Event_11, Type>;
9455
+
9379
9456
  /**
9380
9457
  * Extracts a single event type matching the given key from the Layout DOM {@link Event} union.
9381
9458
  *
9382
9459
  * @typeParam Type String key specifying the event to extract
9383
9460
  */
9384
- declare type Payload_10<Type extends EventType_9> = Extract<Event_12, {
9461
+ declare type Payload_11<Type extends EventType_9> = Extract<Event_12, {
9385
9462
  type: Type;
9386
9463
  }>;
9387
9464
 
9465
+ /**
9466
+ * Extracts a single event type matching the given type key from the provided EmitterEvent union.
9467
+ *
9468
+ * @remarks Each event emitter namespace defines its own reduction of this type that fixes the Event parameter to
9469
+ * the appropriate payload union for that namespace.
9470
+ *
9471
+ * @typeParam Event Union of payloads for events on the given emitter
9472
+ * @see {@link ByType}
9473
+ *
9474
+ * @typeParam Type String key specifying the event to extract from the union
9475
+ *
9476
+ * @see {@link OpenFin.Events.ApplicationEvents.Payload}
9477
+ * @see {@link OpenFin.Events.ExternalApplicationEvents.Payload}
9478
+ * @see {@link OpenFin.Events.FrameEvents.Payload}
9479
+ * @see {@link OpenFin.Events.GlobalHotkeyEvents.Payload}
9480
+ * @see {@link OpenFin.Events.PlatformEvents.Payload}
9481
+ * @see {@link OpenFin.Events.SystemEvents.Payload}
9482
+ * @see {@link OpenFin.Events.ViewEvents.Payload}
9483
+ * @see {@link OpenFin.Events.WindowEvents.Payload}
9484
+ */
9485
+ declare type Payload_2<Event extends BaseEvent, EventType extends string> = Extract<Event, {
9486
+ type: EventType;
9487
+ }>;
9488
+
9388
9489
  /**
9389
9490
  * Extracts a single event type matching the given key from the View {@link Event} union.
9390
9491
  *
9492
+ * @see {@link ByType}
9493
+ *
9391
9494
  * @typeParam Type String key specifying the event to extract
9392
9495
  */
9393
- declare type Payload_2<Type extends EventType> = Extract<Event_4, {
9394
- type: Type;
9395
- }>;
9496
+ declare type Payload_3<Type extends EventType> = BaseEvents.Payload<Event_4, Type>;
9396
9497
 
9397
9498
  /**
9398
9499
  * Extracts a single event type matching the given key from the Window {@link Event} union.
9399
9500
  *
9501
+ * @see {@link ByType}
9502
+ *
9400
9503
  * @typeParam Type String key specifying the event to extract
9401
9504
  */
9402
- declare type Payload_3<Type extends EventType_2> = Extract<Event_6, {
9403
- type: Type;
9404
- }>;
9505
+ declare type Payload_4<Type extends EventType_2> = BaseEvents.Payload<Event_6, Type>;
9405
9506
 
9406
9507
  /**
9407
9508
  * Extracts a single event type matching the given key from the Application {@link Event} union.
9408
9509
  *
9510
+ * @see {@link ByType}
9511
+ *
9409
9512
  * @typeParam Type String key specifying the event to extract
9410
9513
  */
9411
- declare type Payload_4<Type extends EventType_3> = Extract<Event_3, {
9412
- type: Type;
9413
- }>;
9514
+ declare type Payload_5<Type extends EventType_3> = BaseEvents.Payload<Event_3, Type>;
9414
9515
 
9415
9516
  /**
9416
9517
  * Extracts a single event type matching the given key from the ExternalApplication {@link Event} union.
9417
9518
  *
9519
+ * @see {@link ByType}
9520
+ *
9418
9521
  * @typeParam Type String key specifying the event to extract
9419
9522
  */
9420
- declare type Payload_5<Type extends EventType_4> = Extract<Event_7, {
9421
- type: Type;
9422
- }>;
9523
+ declare type Payload_6<Type extends EventType_4> = BaseEvents.Payload<Event_7, Type>;
9423
9524
 
9424
9525
  /**
9425
9526
  * Extracts a single event type matching the given key from the Frame {@link Event} union.
9426
9527
  *
9528
+ * @see {@link ByType}
9529
+ *
9427
9530
  * @typeParam Type String key specifying the event to extract
9428
9531
  */
9429
- declare type Payload_6<Type extends EventType_5> = Extract<Event_8, {
9430
- type: Type;
9431
- }>;
9532
+ declare type Payload_7<Type extends EventType_5> = BaseEvents.Payload<Event_8, Type>;
9432
9533
 
9433
9534
  /**
9434
9535
  * Extracts a single event type matching the given key from the GlobalHotkey {@link Event} union.
9435
9536
  *
9537
+ * @see {@link ByType}
9538
+ *
9436
9539
  * @typeParam Type String key specifying the event to extract
9437
9540
  */
9438
- declare type Payload_7<Type extends EventType_6> = Extract<Event_9, {
9439
- type: Type;
9440
- }>;
9541
+ declare type Payload_8<Type extends EventType_6> = BaseEvents.Payload<Event_9, Type>;
9441
9542
 
9442
9543
  /**
9443
9544
  * Extracts a single event type matching the given key from the Platform {@link Event} union.
9444
9545
  *
9445
- * @typeParam Type String key specifying the event to extract
9446
- */
9447
- declare type Payload_8<Type extends EventType_7> = Extract<Event_10, {
9448
- type: Type;
9449
- }>;
9450
-
9451
- /**
9452
- * Extracts a single event type matching the given key from the System {@link Event} union.
9546
+ * @see {@link ByType}
9453
9547
  *
9454
9548
  * @typeParam Type String key specifying the event to extract
9455
9549
  */
9456
- declare type Payload_9<Type extends EventType_8> = Extract<Event_11, {
9457
- type: Type;
9458
- }>;
9550
+ declare type Payload_9<Type extends EventType_7> = BaseEvents.Payload<Event_10, Type>;
9459
9551
 
9460
9552
  /**
9461
9553
  * @interface
@@ -10150,7 +10242,7 @@ declare namespace PlatformEvents {
10150
10242
  PlatformEvent,
10151
10243
  EventType_7 as EventType,
10152
10244
  PlatformEventType,
10153
- Payload_8 as Payload,
10245
+ Payload_9 as Payload,
10154
10246
  ByType_7 as ByType
10155
10247
  }
10156
10248
  }
@@ -11585,6 +11677,8 @@ declare interface ProtocolMap extends ProtocolMapBase {
11585
11677
  };
11586
11678
  response: void;
11587
11679
  };
11680
+ 'get-host-specs': GetterCall<OpenFin_2.HostSpecs>;
11681
+ 'get-os-info': GetterCall<OpenFin_2.OSInfo>;
11588
11682
  'system-get-printers': GetterCall<OpenFin_2.PrinterInfo[]>;
11589
11683
  'system-register-shutdown-handler': VoidCall;
11590
11684
  'get-domain-settings': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.DefaultDomainSettings>;
@@ -12441,7 +12535,7 @@ declare type Snapshot = {
12441
12535
  * _Note_ - In the case of using a custom provider, if a window has a layout property but does not call _Layout.init_ this event may not fire.
12442
12536
  * @interface
12443
12537
  */
12444
- declare type SnapshotAppliedEvent = BaseEvent & {
12538
+ declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
12445
12539
  topic: 'application';
12446
12540
  type: 'platform-snapshot-applied';
12447
12541
  };
@@ -12925,7 +13019,8 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
12925
13019
  */
12926
13020
  getRvmInfo(): Promise<OpenFin_2.RVMInfo>;
12927
13021
  /**
12928
- * Retrieves system information.
13022
+ * Retrieves general system information. If you need more detailed information about the
13023
+ * OS and the currently logged in user, use `fin.System.getOSInfo()` instead.
12929
13024
  *
12930
13025
  * @example
12931
13026
  * ```js
@@ -12933,6 +13028,15 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
12933
13028
  * ```
12934
13029
  */
12935
13030
  getHostSpecs(): Promise<OpenFin_2.HostSpecs>;
13031
+ /**
13032
+ * Retrieves information about the OS and the currently logged in user.
13033
+ *
13034
+ * @example
13035
+ * ```js
13036
+ * fin.System.getOSInfo().then(specs => console.log(specs)).catch(err => console.log(err));
13037
+ * ```
13038
+ */
13039
+ getOSInfo(): Promise<OpenFin_2.OSInfo>;
12936
13040
  /**
12937
13041
  * Runs an executable or batch file. A path to the file must be included in options.
12938
13042
  * <br> A uuid may be optionally provided. If not provided, OpenFin will create a uuid for the new process.
@@ -14046,7 +14150,7 @@ declare namespace SystemEvents {
14046
14150
  SystemEvent,
14047
14151
  EventType_8 as EventType,
14048
14152
  SystemEventType,
14049
- Payload_9 as Payload,
14153
+ Payload_10 as Payload,
14050
14154
  ByType_8 as ByType
14051
14155
  }
14052
14156
  }
@@ -14060,6 +14164,7 @@ declare type SystemEventType = EventType_8;
14060
14164
  * @interface
14061
14165
  */
14062
14166
  declare type SystemPermissions = {
14167
+ getOSInfo: boolean;
14063
14168
  getAllExternalWindows: boolean;
14064
14169
  launchExternalProcess: boolean | {
14065
14170
  enabled: boolean;
@@ -15067,7 +15172,7 @@ declare namespace ViewEvents {
15067
15172
  PropagatedViewEvent,
15068
15173
  PropagatedEventType_2 as PropagatedEventType,
15069
15174
  PropagatedViewEventType,
15070
- Payload_2 as Payload,
15175
+ Payload_3 as Payload,
15071
15176
  ByType
15072
15177
  }
15073
15178
  }
@@ -17588,7 +17693,7 @@ declare namespace WindowEvents {
17588
17693
  PropagatedEvent_3 as PropagatedEvent,
17589
17694
  PropagatedWindowEvent,
17590
17695
  PropagatedWindowEventType,
17591
- Payload_3 as Payload,
17696
+ Payload_4 as Payload,
17592
17697
  ByType_2 as ByType
17593
17698
  }
17594
17699
  }