@openfin/core 42.103.4 → 42.104.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.
@@ -3041,6 +3041,48 @@ declare type ClearCacheOption = {
3041
3041
  localStorage?: boolean;
3042
3042
  };
3043
3043
 
3044
+ /**
3045
+ * @interface
3046
+ * Options for clearing various types of browsing data. Based on Electron's session.clearData() API.
3047
+ */
3048
+ declare type ClearDataOptions = {
3049
+ /**
3050
+ * The types of data to clear. By default, this will clear all types of data.
3051
+ * This can potentially include data types not explicitly listed here.
3052
+ *
3053
+ * - `backgroundFetch` - Background Fetch
3054
+ * - `cache` - Cache (includes cachestorage and shadercache)
3055
+ * - `cookies` - Cookies
3056
+ * - `downloads` - Downloads
3057
+ * - `fileSystems` - File Systems
3058
+ * - `indexedDB` - IndexedDB
3059
+ * - `localStorage` - Local Storage
3060
+ * - `serviceWorkers` - Service Workers
3061
+ * - `webSQL` - WebSQL
3062
+ */
3063
+ dataTypes?: Array<'backgroundFetch' | 'cache' | 'cookies' | 'downloads' | 'fileSystems' | 'indexedDB' | 'localStorage' | 'serviceWorkers' | 'webSQL'>;
3064
+ /**
3065
+ * Clear data for only these origins. Cannot be used with excludeOrigins.
3066
+ * Example: ['http://localhost:8081', 'https://example.com']
3067
+ */
3068
+ origins?: string[];
3069
+ /**
3070
+ * Clear data for all origins except these ones. Cannot be used with origins.
3071
+ * Example: ['http://workspace.here.io']
3072
+ */
3073
+ excludeOrigins?: string[];
3074
+ /**
3075
+ * Skips deleting session/authentication cookies currently maintaining active connections. (Default: false)
3076
+ */
3077
+ avoidClosingConnections?: boolean;
3078
+ /**
3079
+ * The behavior for matching data to origins.
3080
+ * - `third-parties-included` (default) - Storage is matched on origin in first-party contexts and top-level-site in third-party contexts.
3081
+ * - `origin-in-all-contexts` - Storage is matched on origin only in all contexts.
3082
+ */
3083
+ originMatchingMode?: 'third-parties-included' | 'origin-in-all-contexts';
3084
+ };
3085
+
3044
3086
  /**
3045
3087
  * @typeParam Data User-defined shape for data returned upon menu item click. Should be a
3046
3088
  * [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
@@ -5023,7 +5065,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
5023
5065
  */
5024
5066
  declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5025
5067
  target: OpenFin_2.Identity;
5026
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
5068
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent | ViewOptionsChangedEvent;
5027
5069
 
5028
5070
  /**
5029
5071
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
@@ -9923,6 +9965,7 @@ declare namespace OpenFin_2 {
9923
9965
  NonAppProcessDetails,
9924
9966
  SystemProcessInfo,
9925
9967
  ClearCacheOption,
9968
+ ClearDataOptions,
9926
9969
  CookieInfo,
9927
9970
  CookieOption,
9928
9971
  CrashReporterOptions,
@@ -12834,6 +12877,8 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12834
12877
  };
12835
12878
  'get-version': GetterCall<string>;
12836
12879
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
12880
+ 'clear-http-cache': VoidCall;
12881
+ 'clear-cache-data': ApiCall<OpenFin_2.ClearDataOptions, void>;
12837
12882
  'delete-cache-request': VoidCall;
12838
12883
  'exit-desktop': VoidCall;
12839
12884
  'fetch-manifest': ApiCall<{
@@ -14389,6 +14434,44 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
14389
14434
  *
14390
14435
  */
14391
14436
  clearCache(options: OpenFin_2.ClearCacheOption): Promise<void>;
14437
+ /**
14438
+ * Clears only the HTTP cache (browser cache for HTML, CSS, JS, images).
14439
+ * Service workers and other storage data are preserved.
14440
+ *
14441
+ * This is useful when you need to clear stale content without breaking offline functionality.
14442
+ *
14443
+ * @example
14444
+ * ```js
14445
+ * // Clear HTTP cache without affecting service workers
14446
+ * await fin.System.clearHTTPCache();
14447
+ * ```
14448
+ */
14449
+ clearHTTPCache(): Promise<void>;
14450
+ /**
14451
+ * Clears browsing data with granular control over what to clear and which origins to target.
14452
+ *
14453
+ * @param options - Optional configuration for what data to clear
14454
+ *
14455
+ * @example
14456
+ * ```js
14457
+ * // Clear only cookies and localStorage for a specific origin
14458
+ * await fin.System.clearCacheData({
14459
+ * dataTypes: ['cookies', 'localStorage'],
14460
+ * origins: ['http://localhost:8081']
14461
+ * });
14462
+ *
14463
+ * // Clear everything except for a specific origin
14464
+ * await fin.System.clearCacheData({
14465
+ * excludeOrigins: ['http://example.com']
14466
+ * });
14467
+ *
14468
+ * // Clear all service workers across all origins
14469
+ * await fin.System.clearCacheData({
14470
+ * dataTypes: ['serviceWorkers']
14471
+ * });
14472
+ * ```
14473
+ */
14474
+ clearCacheData(options?: OpenFin_2.ClearDataOptions): Promise<void>;
14392
14475
  /**
14393
14476
  * Clears all cached data when OpenFin Runtime exits.
14394
14477
  *
@@ -14595,6 +14678,11 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
14595
14678
  /**
14596
14679
  * Returns a unique identifier (UUID) provided by the machine.
14597
14680
  *
14681
+ * On Windows, the machine ID is the `MachineGuid` value located in the Windows Registry at:
14682
+ * `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`.
14683
+ *
14684
+ * On macOS, the machine ID is the hardware UUID of the machine, obtained via native OS APIs.
14685
+ *
14598
14686
  * @example
14599
14687
  * ```js
14600
14688
  * fin.System.getMachineId().then(id => console.log(id)).catch(err => console.log(err));
@@ -16927,6 +17015,7 @@ declare namespace ViewEvents {
16927
17015
  HotkeyEvent,
16928
17016
  ShownEvent,
16929
17017
  HostContextChangedEvent,
17018
+ ViewOptionsChangedEvent,
16930
17019
  Event_4 as Event,
16931
17020
  ViewEvent,
16932
17021
  WillPropagateViewEvent,
@@ -17055,6 +17144,23 @@ declare class ViewModule extends Base {
17055
17144
  */
17056
17145
  declare type ViewOptions = ConstViewOptions & MutableViewOptions;
17057
17146
 
17147
+ /**
17148
+ * Generated whenever a view's options are changed.
17149
+ * @remarks Will not emit if an updateOptions call does not result in a new diff.
17150
+ * @interface
17151
+ */
17152
+ declare type ViewOptionsChangedEvent = BaseEvent_4 & {
17153
+ type: 'options-changed';
17154
+ /**
17155
+ * The new state of the view's options.
17156
+ */
17157
+ options: OpenFin_2.ViewOptions;
17158
+ /**
17159
+ * Diff between the previous value of options and new.
17160
+ */
17161
+ diff: OpenFin_2.ViewOptions;
17162
+ };
17163
+
17058
17164
  /**
17059
17165
  * @interface
17060
17166
  */
@@ -3041,6 +3041,48 @@ declare type ClearCacheOption = {
3041
3041
  localStorage?: boolean;
3042
3042
  };
3043
3043
 
3044
+ /**
3045
+ * @interface
3046
+ * Options for clearing various types of browsing data. Based on Electron's session.clearData() API.
3047
+ */
3048
+ declare type ClearDataOptions = {
3049
+ /**
3050
+ * The types of data to clear. By default, this will clear all types of data.
3051
+ * This can potentially include data types not explicitly listed here.
3052
+ *
3053
+ * - `backgroundFetch` - Background Fetch
3054
+ * - `cache` - Cache (includes cachestorage and shadercache)
3055
+ * - `cookies` - Cookies
3056
+ * - `downloads` - Downloads
3057
+ * - `fileSystems` - File Systems
3058
+ * - `indexedDB` - IndexedDB
3059
+ * - `localStorage` - Local Storage
3060
+ * - `serviceWorkers` - Service Workers
3061
+ * - `webSQL` - WebSQL
3062
+ */
3063
+ dataTypes?: Array<'backgroundFetch' | 'cache' | 'cookies' | 'downloads' | 'fileSystems' | 'indexedDB' | 'localStorage' | 'serviceWorkers' | 'webSQL'>;
3064
+ /**
3065
+ * Clear data for only these origins. Cannot be used with excludeOrigins.
3066
+ * Example: ['http://localhost:8081', 'https://example.com']
3067
+ */
3068
+ origins?: string[];
3069
+ /**
3070
+ * Clear data for all origins except these ones. Cannot be used with origins.
3071
+ * Example: ['http://workspace.here.io']
3072
+ */
3073
+ excludeOrigins?: string[];
3074
+ /**
3075
+ * Skips deleting session/authentication cookies currently maintaining active connections. (Default: false)
3076
+ */
3077
+ avoidClosingConnections?: boolean;
3078
+ /**
3079
+ * The behavior for matching data to origins.
3080
+ * - `third-parties-included` (default) - Storage is matched on origin in first-party contexts and top-level-site in third-party contexts.
3081
+ * - `origin-in-all-contexts` - Storage is matched on origin only in all contexts.
3082
+ */
3083
+ originMatchingMode?: 'third-parties-included' | 'origin-in-all-contexts';
3084
+ };
3085
+
3044
3086
  /**
3045
3087
  * @typeParam Data User-defined shape for data returned upon menu item click. Should be a
3046
3088
  * [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
@@ -5023,7 +5065,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
5023
5065
  */
5024
5066
  declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5025
5067
  target: OpenFin_2.Identity;
5026
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
5068
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent | ViewOptionsChangedEvent;
5027
5069
 
5028
5070
  /**
5029
5071
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
@@ -9923,6 +9965,7 @@ declare namespace OpenFin_2 {
9923
9965
  NonAppProcessDetails,
9924
9966
  SystemProcessInfo,
9925
9967
  ClearCacheOption,
9968
+ ClearDataOptions,
9926
9969
  CookieInfo,
9927
9970
  CookieOption,
9928
9971
  CrashReporterOptions,
@@ -12834,6 +12877,8 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12834
12877
  };
12835
12878
  'get-version': GetterCall<string>;
12836
12879
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
12880
+ 'clear-http-cache': VoidCall;
12881
+ 'clear-cache-data': ApiCall<OpenFin_2.ClearDataOptions, void>;
12837
12882
  'delete-cache-request': VoidCall;
12838
12883
  'exit-desktop': VoidCall;
12839
12884
  'fetch-manifest': ApiCall<{
@@ -14389,6 +14434,44 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
14389
14434
  *
14390
14435
  */
14391
14436
  clearCache(options: OpenFin_2.ClearCacheOption): Promise<void>;
14437
+ /**
14438
+ * Clears only the HTTP cache (browser cache for HTML, CSS, JS, images).
14439
+ * Service workers and other storage data are preserved.
14440
+ *
14441
+ * This is useful when you need to clear stale content without breaking offline functionality.
14442
+ *
14443
+ * @example
14444
+ * ```js
14445
+ * // Clear HTTP cache without affecting service workers
14446
+ * await fin.System.clearHTTPCache();
14447
+ * ```
14448
+ */
14449
+ clearHTTPCache(): Promise<void>;
14450
+ /**
14451
+ * Clears browsing data with granular control over what to clear and which origins to target.
14452
+ *
14453
+ * @param options - Optional configuration for what data to clear
14454
+ *
14455
+ * @example
14456
+ * ```js
14457
+ * // Clear only cookies and localStorage for a specific origin
14458
+ * await fin.System.clearCacheData({
14459
+ * dataTypes: ['cookies', 'localStorage'],
14460
+ * origins: ['http://localhost:8081']
14461
+ * });
14462
+ *
14463
+ * // Clear everything except for a specific origin
14464
+ * await fin.System.clearCacheData({
14465
+ * excludeOrigins: ['http://example.com']
14466
+ * });
14467
+ *
14468
+ * // Clear all service workers across all origins
14469
+ * await fin.System.clearCacheData({
14470
+ * dataTypes: ['serviceWorkers']
14471
+ * });
14472
+ * ```
14473
+ */
14474
+ clearCacheData(options?: OpenFin_2.ClearDataOptions): Promise<void>;
14392
14475
  /**
14393
14476
  * Clears all cached data when OpenFin Runtime exits.
14394
14477
  *
@@ -14595,6 +14678,11 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
14595
14678
  /**
14596
14679
  * Returns a unique identifier (UUID) provided by the machine.
14597
14680
  *
14681
+ * On Windows, the machine ID is the `MachineGuid` value located in the Windows Registry at:
14682
+ * `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`.
14683
+ *
14684
+ * On macOS, the machine ID is the hardware UUID of the machine, obtained via native OS APIs.
14685
+ *
14598
14686
  * @example
14599
14687
  * ```js
14600
14688
  * fin.System.getMachineId().then(id => console.log(id)).catch(err => console.log(err));
@@ -16927,6 +17015,7 @@ declare namespace ViewEvents {
16927
17015
  HotkeyEvent,
16928
17016
  ShownEvent,
16929
17017
  HostContextChangedEvent,
17018
+ ViewOptionsChangedEvent,
16930
17019
  Event_4 as Event,
16931
17020
  ViewEvent,
16932
17021
  WillPropagateViewEvent,
@@ -17055,6 +17144,23 @@ declare class ViewModule extends Base {
17055
17144
  */
17056
17145
  declare type ViewOptions = ConstViewOptions & MutableViewOptions;
17057
17146
 
17147
+ /**
17148
+ * Generated whenever a view's options are changed.
17149
+ * @remarks Will not emit if an updateOptions call does not result in a new diff.
17150
+ * @interface
17151
+ */
17152
+ declare type ViewOptionsChangedEvent = BaseEvent_4 & {
17153
+ type: 'options-changed';
17154
+ /**
17155
+ * The new state of the view's options.
17156
+ */
17157
+ options: OpenFin_2.ViewOptions;
17158
+ /**
17159
+ * Diff between the previous value of options and new.
17160
+ */
17161
+ diff: OpenFin_2.ViewOptions;
17162
+ };
17163
+
17058
17164
  /**
17059
17165
  * @interface
17060
17166
  */
@@ -3041,6 +3041,48 @@ declare type ClearCacheOption = {
3041
3041
  localStorage?: boolean;
3042
3042
  };
3043
3043
 
3044
+ /**
3045
+ * @interface
3046
+ * Options for clearing various types of browsing data. Based on Electron's session.clearData() API.
3047
+ */
3048
+ declare type ClearDataOptions = {
3049
+ /**
3050
+ * The types of data to clear. By default, this will clear all types of data.
3051
+ * This can potentially include data types not explicitly listed here.
3052
+ *
3053
+ * - `backgroundFetch` - Background Fetch
3054
+ * - `cache` - Cache (includes cachestorage and shadercache)
3055
+ * - `cookies` - Cookies
3056
+ * - `downloads` - Downloads
3057
+ * - `fileSystems` - File Systems
3058
+ * - `indexedDB` - IndexedDB
3059
+ * - `localStorage` - Local Storage
3060
+ * - `serviceWorkers` - Service Workers
3061
+ * - `webSQL` - WebSQL
3062
+ */
3063
+ dataTypes?: Array<'backgroundFetch' | 'cache' | 'cookies' | 'downloads' | 'fileSystems' | 'indexedDB' | 'localStorage' | 'serviceWorkers' | 'webSQL'>;
3064
+ /**
3065
+ * Clear data for only these origins. Cannot be used with excludeOrigins.
3066
+ * Example: ['http://localhost:8081', 'https://example.com']
3067
+ */
3068
+ origins?: string[];
3069
+ /**
3070
+ * Clear data for all origins except these ones. Cannot be used with origins.
3071
+ * Example: ['http://workspace.here.io']
3072
+ */
3073
+ excludeOrigins?: string[];
3074
+ /**
3075
+ * Skips deleting session/authentication cookies currently maintaining active connections. (Default: false)
3076
+ */
3077
+ avoidClosingConnections?: boolean;
3078
+ /**
3079
+ * The behavior for matching data to origins.
3080
+ * - `third-parties-included` (default) - Storage is matched on origin in first-party contexts and top-level-site in third-party contexts.
3081
+ * - `origin-in-all-contexts` - Storage is matched on origin only in all contexts.
3082
+ */
3083
+ originMatchingMode?: 'third-parties-included' | 'origin-in-all-contexts';
3084
+ };
3085
+
3044
3086
  /**
3045
3087
  * @typeParam Data User-defined shape for data returned upon menu item click. Should be a
3046
3088
  * [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
@@ -5023,7 +5065,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
5023
5065
  */
5024
5066
  declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5025
5067
  target: OpenFin_2.Identity;
5026
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
5068
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent | ViewOptionsChangedEvent;
5027
5069
 
5028
5070
  /**
5029
5071
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
@@ -9923,6 +9965,7 @@ declare namespace OpenFin_2 {
9923
9965
  NonAppProcessDetails,
9924
9966
  SystemProcessInfo,
9925
9967
  ClearCacheOption,
9968
+ ClearDataOptions,
9926
9969
  CookieInfo,
9927
9970
  CookieOption,
9928
9971
  CrashReporterOptions,
@@ -12834,6 +12877,8 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12834
12877
  };
12835
12878
  'get-version': GetterCall<string>;
12836
12879
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
12880
+ 'clear-http-cache': VoidCall;
12881
+ 'clear-cache-data': ApiCall<OpenFin_2.ClearDataOptions, void>;
12837
12882
  'delete-cache-request': VoidCall;
12838
12883
  'exit-desktop': VoidCall;
12839
12884
  'fetch-manifest': ApiCall<{
@@ -14389,6 +14434,44 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
14389
14434
  *
14390
14435
  */
14391
14436
  clearCache(options: OpenFin_2.ClearCacheOption): Promise<void>;
14437
+ /**
14438
+ * Clears only the HTTP cache (browser cache for HTML, CSS, JS, images).
14439
+ * Service workers and other storage data are preserved.
14440
+ *
14441
+ * This is useful when you need to clear stale content without breaking offline functionality.
14442
+ *
14443
+ * @example
14444
+ * ```js
14445
+ * // Clear HTTP cache without affecting service workers
14446
+ * await fin.System.clearHTTPCache();
14447
+ * ```
14448
+ */
14449
+ clearHTTPCache(): Promise<void>;
14450
+ /**
14451
+ * Clears browsing data with granular control over what to clear and which origins to target.
14452
+ *
14453
+ * @param options - Optional configuration for what data to clear
14454
+ *
14455
+ * @example
14456
+ * ```js
14457
+ * // Clear only cookies and localStorage for a specific origin
14458
+ * await fin.System.clearCacheData({
14459
+ * dataTypes: ['cookies', 'localStorage'],
14460
+ * origins: ['http://localhost:8081']
14461
+ * });
14462
+ *
14463
+ * // Clear everything except for a specific origin
14464
+ * await fin.System.clearCacheData({
14465
+ * excludeOrigins: ['http://example.com']
14466
+ * });
14467
+ *
14468
+ * // Clear all service workers across all origins
14469
+ * await fin.System.clearCacheData({
14470
+ * dataTypes: ['serviceWorkers']
14471
+ * });
14472
+ * ```
14473
+ */
14474
+ clearCacheData(options?: OpenFin_2.ClearDataOptions): Promise<void>;
14392
14475
  /**
14393
14476
  * Clears all cached data when OpenFin Runtime exits.
14394
14477
  *
@@ -14595,6 +14678,11 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
14595
14678
  /**
14596
14679
  * Returns a unique identifier (UUID) provided by the machine.
14597
14680
  *
14681
+ * On Windows, the machine ID is the `MachineGuid` value located in the Windows Registry at:
14682
+ * `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`.
14683
+ *
14684
+ * On macOS, the machine ID is the hardware UUID of the machine, obtained via native OS APIs.
14685
+ *
14598
14686
  * @example
14599
14687
  * ```js
14600
14688
  * fin.System.getMachineId().then(id => console.log(id)).catch(err => console.log(err));
@@ -16927,6 +17015,7 @@ declare namespace ViewEvents {
16927
17015
  HotkeyEvent,
16928
17016
  ShownEvent,
16929
17017
  HostContextChangedEvent,
17018
+ ViewOptionsChangedEvent,
16930
17019
  Event_4 as Event,
16931
17020
  ViewEvent,
16932
17021
  WillPropagateViewEvent,
@@ -17055,6 +17144,23 @@ declare class ViewModule extends Base {
17055
17144
  */
17056
17145
  declare type ViewOptions = ConstViewOptions & MutableViewOptions;
17057
17146
 
17147
+ /**
17148
+ * Generated whenever a view's options are changed.
17149
+ * @remarks Will not emit if an updateOptions call does not result in a new diff.
17150
+ * @interface
17151
+ */
17152
+ declare type ViewOptionsChangedEvent = BaseEvent_4 & {
17153
+ type: 'options-changed';
17154
+ /**
17155
+ * The new state of the view's options.
17156
+ */
17157
+ options: OpenFin_2.ViewOptions;
17158
+ /**
17159
+ * Diff between the previous value of options and new.
17160
+ */
17161
+ diff: OpenFin_2.ViewOptions;
17162
+ };
17163
+
17058
17164
  /**
17059
17165
  * @interface
17060
17166
  */
package/out/stub.d.ts CHANGED
@@ -3097,6 +3097,48 @@ declare type ClearCacheOption = {
3097
3097
  localStorage?: boolean;
3098
3098
  };
3099
3099
 
3100
+ /**
3101
+ * @interface
3102
+ * Options for clearing various types of browsing data. Based on Electron's session.clearData() API.
3103
+ */
3104
+ declare type ClearDataOptions = {
3105
+ /**
3106
+ * The types of data to clear. By default, this will clear all types of data.
3107
+ * This can potentially include data types not explicitly listed here.
3108
+ *
3109
+ * - `backgroundFetch` - Background Fetch
3110
+ * - `cache` - Cache (includes cachestorage and shadercache)
3111
+ * - `cookies` - Cookies
3112
+ * - `downloads` - Downloads
3113
+ * - `fileSystems` - File Systems
3114
+ * - `indexedDB` - IndexedDB
3115
+ * - `localStorage` - Local Storage
3116
+ * - `serviceWorkers` - Service Workers
3117
+ * - `webSQL` - WebSQL
3118
+ */
3119
+ dataTypes?: Array<'backgroundFetch' | 'cache' | 'cookies' | 'downloads' | 'fileSystems' | 'indexedDB' | 'localStorage' | 'serviceWorkers' | 'webSQL'>;
3120
+ /**
3121
+ * Clear data for only these origins. Cannot be used with excludeOrigins.
3122
+ * Example: ['http://localhost:8081', 'https://example.com']
3123
+ */
3124
+ origins?: string[];
3125
+ /**
3126
+ * Clear data for all origins except these ones. Cannot be used with origins.
3127
+ * Example: ['http://workspace.here.io']
3128
+ */
3129
+ excludeOrigins?: string[];
3130
+ /**
3131
+ * Skips deleting session/authentication cookies currently maintaining active connections. (Default: false)
3132
+ */
3133
+ avoidClosingConnections?: boolean;
3134
+ /**
3135
+ * The behavior for matching data to origins.
3136
+ * - `third-parties-included` (default) - Storage is matched on origin in first-party contexts and top-level-site in third-party contexts.
3137
+ * - `origin-in-all-contexts` - Storage is matched on origin only in all contexts.
3138
+ */
3139
+ originMatchingMode?: 'third-parties-included' | 'origin-in-all-contexts';
3140
+ };
3141
+
3100
3142
  /**
3101
3143
  * @typeParam Data User-defined shape for data returned upon menu item click. Should be a
3102
3144
  * [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
@@ -5087,7 +5129,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
5087
5129
  */
5088
5130
  declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5089
5131
  target: OpenFin_2.Identity;
5090
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
5132
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent | ViewOptionsChangedEvent;
5091
5133
 
5092
5134
  /**
5093
5135
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
@@ -10257,6 +10299,7 @@ declare namespace OpenFin_2 {
10257
10299
  NonAppProcessDetails,
10258
10300
  SystemProcessInfo,
10259
10301
  ClearCacheOption,
10302
+ ClearDataOptions,
10260
10303
  CookieInfo,
10261
10304
  CookieOption,
10262
10305
  CrashReporterOptions,
@@ -13251,6 +13294,8 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13251
13294
  };
13252
13295
  'get-version': GetterCall<string>;
13253
13296
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
13297
+ 'clear-http-cache': VoidCall;
13298
+ 'clear-cache-data': ApiCall<OpenFin_2.ClearDataOptions, void>;
13254
13299
  'delete-cache-request': VoidCall;
13255
13300
  'exit-desktop': VoidCall;
13256
13301
  'fetch-manifest': ApiCall<{
@@ -14812,6 +14857,44 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
14812
14857
  *
14813
14858
  */
14814
14859
  clearCache(options: OpenFin_2.ClearCacheOption): Promise<void>;
14860
+ /**
14861
+ * Clears only the HTTP cache (browser cache for HTML, CSS, JS, images).
14862
+ * Service workers and other storage data are preserved.
14863
+ *
14864
+ * This is useful when you need to clear stale content without breaking offline functionality.
14865
+ *
14866
+ * @example
14867
+ * ```js
14868
+ * // Clear HTTP cache without affecting service workers
14869
+ * await fin.System.clearHTTPCache();
14870
+ * ```
14871
+ */
14872
+ clearHTTPCache(): Promise<void>;
14873
+ /**
14874
+ * Clears browsing data with granular control over what to clear and which origins to target.
14875
+ *
14876
+ * @param options - Optional configuration for what data to clear
14877
+ *
14878
+ * @example
14879
+ * ```js
14880
+ * // Clear only cookies and localStorage for a specific origin
14881
+ * await fin.System.clearCacheData({
14882
+ * dataTypes: ['cookies', 'localStorage'],
14883
+ * origins: ['http://localhost:8081']
14884
+ * });
14885
+ *
14886
+ * // Clear everything except for a specific origin
14887
+ * await fin.System.clearCacheData({
14888
+ * excludeOrigins: ['http://example.com']
14889
+ * });
14890
+ *
14891
+ * // Clear all service workers across all origins
14892
+ * await fin.System.clearCacheData({
14893
+ * dataTypes: ['serviceWorkers']
14894
+ * });
14895
+ * ```
14896
+ */
14897
+ clearCacheData(options?: OpenFin_2.ClearDataOptions): Promise<void>;
14815
14898
  /**
14816
14899
  * Clears all cached data when OpenFin Runtime exits.
14817
14900
  *
@@ -15018,6 +15101,11 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15018
15101
  /**
15019
15102
  * Returns a unique identifier (UUID) provided by the machine.
15020
15103
  *
15104
+ * On Windows, the machine ID is the `MachineGuid` value located in the Windows Registry at:
15105
+ * `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`.
15106
+ *
15107
+ * On macOS, the machine ID is the hardware UUID of the machine, obtained via native OS APIs.
15108
+ *
15021
15109
  * @example
15022
15110
  * ```js
15023
15111
  * fin.System.getMachineId().then(id => console.log(id)).catch(err => console.log(err));
@@ -17394,6 +17482,7 @@ declare namespace ViewEvents {
17394
17482
  HotkeyEvent,
17395
17483
  ShownEvent,
17396
17484
  HostContextChangedEvent,
17485
+ ViewOptionsChangedEvent,
17397
17486
  Event_4 as Event,
17398
17487
  ViewEvent,
17399
17488
  WillPropagateViewEvent,
@@ -17522,6 +17611,23 @@ declare class ViewModule extends Base {
17522
17611
  */
17523
17612
  declare type ViewOptions = ConstViewOptions & MutableViewOptions;
17524
17613
 
17614
+ /**
17615
+ * Generated whenever a view's options are changed.
17616
+ * @remarks Will not emit if an updateOptions call does not result in a new diff.
17617
+ * @interface
17618
+ */
17619
+ declare type ViewOptionsChangedEvent = BaseEvent_4 & {
17620
+ type: 'options-changed';
17621
+ /**
17622
+ * The new state of the view's options.
17623
+ */
17624
+ options: OpenFin_2.ViewOptions;
17625
+ /**
17626
+ * Diff between the previous value of options and new.
17627
+ */
17628
+ diff: OpenFin_2.ViewOptions;
17629
+ };
17630
+
17525
17631
  /**
17526
17632
  * @interface
17527
17633
  */
package/out/stub.js CHANGED
@@ -5487,6 +5487,48 @@ class System extends base_1$m.EmitterBase {
5487
5487
  clearCache(options) {
5488
5488
  return this.wire.sendAction('clear-cache', options).then(() => undefined);
5489
5489
  }
5490
+ /**
5491
+ * Clears only the HTTP cache (browser cache for HTML, CSS, JS, images).
5492
+ * Service workers and other storage data are preserved.
5493
+ *
5494
+ * This is useful when you need to clear stale content without breaking offline functionality.
5495
+ *
5496
+ * @example
5497
+ * ```js
5498
+ * // Clear HTTP cache without affecting service workers
5499
+ * await fin.System.clearHTTPCache();
5500
+ * ```
5501
+ */
5502
+ clearHTTPCache() {
5503
+ return this.wire.sendAction('clear-http-cache').then(() => undefined);
5504
+ }
5505
+ /**
5506
+ * Clears browsing data with granular control over what to clear and which origins to target.
5507
+ *
5508
+ * @param options - Optional configuration for what data to clear
5509
+ *
5510
+ * @example
5511
+ * ```js
5512
+ * // Clear only cookies and localStorage for a specific origin
5513
+ * await fin.System.clearCacheData({
5514
+ * dataTypes: ['cookies', 'localStorage'],
5515
+ * origins: ['http://localhost:8081']
5516
+ * });
5517
+ *
5518
+ * // Clear everything except for a specific origin
5519
+ * await fin.System.clearCacheData({
5520
+ * excludeOrigins: ['http://example.com']
5521
+ * });
5522
+ *
5523
+ * // Clear all service workers across all origins
5524
+ * await fin.System.clearCacheData({
5525
+ * dataTypes: ['serviceWorkers']
5526
+ * });
5527
+ * ```
5528
+ */
5529
+ clearCacheData(options) {
5530
+ return this.wire.sendAction('clear-cache-data', options || {}).then(() => undefined);
5531
+ }
5490
5532
  /**
5491
5533
  * Clears all cached data when OpenFin Runtime exits.
5492
5534
  *
@@ -5749,6 +5791,11 @@ class System extends base_1$m.EmitterBase {
5749
5791
  /**
5750
5792
  * Returns a unique identifier (UUID) provided by the machine.
5751
5793
  *
5794
+ * On Windows, the machine ID is the `MachineGuid` value located in the Windows Registry at:
5795
+ * `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`.
5796
+ *
5797
+ * On macOS, the machine ID is the hardware UUID of the machine, obtained via native OS APIs.
5798
+ *
5752
5799
  * @example
5753
5800
  * ```js
5754
5801
  * fin.System.getMachineId().then(id => console.log(id)).catch(err => console.log(err));
@@ -15989,7 +16036,6 @@ fdc3Channels2_0.createV2Channel = createV2Channel;
15989
16036
  // Generate an ID to make a session context group with. We will pass that ID to the Broker.
15990
16037
  // The broker will then setContext on that session context group later with our Intent Result,
15991
16038
  const guid = (0, utils_1.generateId)(); // TODO make this undefined in web
15992
- let isPromiseSettled = false;
15993
16039
  // Adding the intentResolutionResultId to the intentObj. Because fireIntent only accepts a single arg, we have to slap it in here.
15994
16040
  const metadata = app ? { target: app, intentResolutionResultId: guid } : { intentResolutionResultId: guid };
15995
16041
  const intentObj = intent ? { name: intent, context, metadata } : { ...context, metadata };
@@ -16005,21 +16051,11 @@ fdc3Channels2_0.createV2Channel = createV2Channel;
16005
16051
  reject(new Error('getResult is not supported in this environment'));
16006
16052
  });
16007
16053
  });
16008
- getResultPromise
16009
- .then(() => {
16010
- isPromiseSettled = true;
16011
- })
16012
- .catch(() => {
16013
- isPromiseSettled = true;
16014
- });
16015
16054
  // Set up the getResult call.
16016
16055
  const getResult = async () => {
16017
- // All this mumbo jumbo is needed to make sure that getResult resolves correctly and conforms to the FDC3 spec.
16018
- if (!isPromiseSettled) {
16019
- return undefined;
16020
- }
16021
16056
  let intentResult = await getResultPromise;
16022
- if (isPromiseSettled && !intentResult) {
16057
+ // void / no payload, or web path where subscribe resolves undefined (see getResultPromise above)
16058
+ if (intentResult == null) {
16023
16059
  return undefined;
16024
16060
  }
16025
16061
  if (typeof intentResult !== 'object') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "42.103.4",
3
+ "version": "42.104.2",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/stub.js",
@@ -18,9 +18,9 @@
18
18
  "watch": "run-p watch:*",
19
19
  "watch:rollup": "npm run dev:rollup -- --watch",
20
20
  "watch:copy": "npm run dev:copy",
21
- "ci:prepublish": "of-npm prepublish",
22
- "ci:postpublish": "of-npm postpublish",
23
- "ci:publish": "npm publish",
21
+ "ci:prepack": "of-npm prepack",
22
+ "ci:pack": "npm pack",
23
+ "ci:postpack": "of-npm postpack",
24
24
  "version:update": "of-npm version --allow-same-version '$RMAJOR.$RMINOR.$RPATCH'"
25
25
  },
26
26
  "files": [