@openfin/core 43.103.2 → 43.104.1

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.
package/out/stub.d.ts CHANGED
@@ -88,7 +88,7 @@ declare type AlertRequestedEvent = BaseEvent_5 & {
88
88
  url: string;
89
89
  };
90
90
 
91
- declare type AnalyticsOnlyCalls = 'window-get-web-window' | 'layout-get-by-view-identity' | 'layout-get-stack-by-view' | 'layout-add-view' | 'layout-close-view' | 'view-get-parent-layout' | 'view-get-current-stack' | 'window-is-main-window' | 'window-get-parent-application' | 'window-get-parent-window' | 'window-create-window' | 'window-get-layout' | 'window-dispatch-popup-result' | `layout-controller-${string}`;
91
+ declare type AnalyticsOnlyCalls = 'layout-get-stack-by-view' | 'layout-add-view' | 'layout-close-view' | `layout-controller-${string}`;
92
92
 
93
93
  declare type AnalyticsProtocolMap = {
94
94
  [k in AnalyticsOnlyCalls]: VoidCall;
@@ -1789,6 +1789,7 @@ declare type BaseConfig = {
1789
1789
  devToolsPort?: number;
1790
1790
  installerUI?: boolean;
1791
1791
  runtime?: RuntimeConfig;
1792
+ apiDiagnostics?: boolean;
1792
1793
  appAssets?: [
1793
1794
  {
1794
1795
  src: string;
@@ -3170,6 +3171,11 @@ declare type ClearCacheOption = {
3170
3171
  * browser data that can be used across sessions
3171
3172
  */
3172
3173
  localStorage?: boolean;
3174
+ /**
3175
+ * Clears saved window-state data written for windows that use `saveWindowState`.
3176
+ * After this data is cleared, previously persisted bounds and state (Maximized/Minimized) will not be restored until new state is written again.
3177
+ */
3178
+ windowState?: boolean;
3173
3179
  };
3174
3180
 
3175
3181
  /**
@@ -3212,6 +3218,11 @@ declare type ClearDataOptions = {
3212
3218
  * - `origin-in-all-contexts` - Storage is matched on origin only in all contexts.
3213
3219
  */
3214
3220
  originMatchingMode?: 'third-parties-included' | 'origin-in-all-contexts';
3221
+ /**
3222
+ * Clears saved window-state data written for windows that use `saveWindowState`.
3223
+ * After this data is cleared, previously persisted bounds and state (Maximized/Minimized) will not be restored until new state is written again.
3224
+ */
3225
+ windowState?: boolean;
3215
3226
  };
3216
3227
 
3217
3228
  /**
@@ -6709,6 +6720,16 @@ declare type IntentMetadata<TargetType = any> = {
6709
6720
  */
6710
6721
  declare class InterApplicationBus extends Base {
6711
6722
  Channel: Channel;
6723
+ /**
6724
+ * Event types for the InterApplicationBus.
6725
+ *
6726
+ * @remarks The `subscriber-added` and `subscriber-removed` events are disabled by default.
6727
+ * To re-enable them, launch the runtime with the `--emit-legacy-iab-events` flag.
6728
+ * These events will be removed in a future version. Use {@link Channel} for connection
6729
+ * lifecycle management instead.
6730
+ *
6731
+ * @deprecated Use {@link Channel} `onConnection` / `onDisconnection` instead.
6732
+ */
6712
6733
  events: {
6713
6734
  subscriberAdded: string;
6714
6735
  subscriberRemoved: string;
@@ -10623,6 +10644,9 @@ declare namespace OpenFin_2 {
10623
10644
  SystemProcessInfo,
10624
10645
  ClearCacheOption,
10625
10646
  ClearDataOptions,
10647
+ TraceConfig,
10648
+ TraceCategoriesAndOptions,
10649
+ TraceBufferUsage,
10626
10650
  CookieInfo,
10627
10651
  CookieOption,
10628
10652
  CrashReporterOptions,
@@ -13297,19 +13321,17 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13297
13321
  response: OpenFin_2.MenuResult;
13298
13322
  };
13299
13323
  'close-tray-icon-popup-menu': IdentityCall<{}, void>;
13300
- 'wrap-application': VoidCall;
13301
- 'wrap-application-sync': VoidCall;
13302
13324
  'create-application': ApiCall<OpenFin_2.ApplicationCreationOptions, void>;
13303
- 'application-create': VoidCall;
13304
- 'start-application': VoidCall;
13305
13325
  'run-applications': ApiCall<{
13306
13326
  applications: Array<OpenFin_2.ManifestInfo>;
13307
13327
  opts?: OpenFin_2.RvmLaunchOptions;
13308
13328
  }, void>;
13309
- 'get-current-application': VoidCall;
13310
- 'get-current-application-sync': VoidCall;
13311
- 'application-start-from-manifest': VoidCall;
13312
- 'application-create-from-manifest': VoidCall;
13329
+ 'send-analytics-batch': {
13330
+ request: {
13331
+ counts: Record<string, number>;
13332
+ };
13333
+ response: void;
13334
+ };
13313
13335
  'request-external-authorization': {
13314
13336
  request: any;
13315
13337
  response: void;
@@ -13428,10 +13450,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13428
13450
  options: OpenFin_2.UpdatableViewOptions;
13429
13451
  }>;
13430
13452
  'trigger-before-unload': IdentityCall<{}, boolean>;
13431
- 'view-wrap-sync': VoidCall;
13432
- 'view-wrap': VoidCall;
13433
- 'view-get-current': VoidCall;
13434
- 'view-get-current-sync': VoidCall;
13435
13453
  'animate-window': IdentityCall<{
13436
13454
  transitions: OpenFin_2.Transition;
13437
13455
  options: OpenFin_2.TransitionOptions;
@@ -13523,11 +13541,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13523
13541
  };
13524
13542
  response: void;
13525
13543
  };
13526
- 'window-wrap': VoidCall;
13527
- 'window-wrap-sync': VoidCall;
13528
- 'create-window': VoidCall;
13529
- 'get-current-window': VoidCall;
13530
- 'get-current-window-sync': VoidCall;
13531
13544
  'show-download-bubble': IdentityCall<{
13532
13545
  anchor?: OpenFin_2.Anchor;
13533
13546
  }, void>;
@@ -13535,14 +13548,8 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13535
13548
  anchor: OpenFin_2.Anchor;
13536
13549
  }, void>;
13537
13550
  'get-external-application-info': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.ExternalApplicationInfo>;
13538
- 'external-application-wrap': VoidCall;
13539
- 'external-application-wrap-sync': VoidCall;
13540
13551
  'get-frame-info': ApiCall<OpenFin_2.Identity, OpenFin_2.FrameInfo>;
13541
13552
  'get-parent-window': ApiCall<OpenFin_2.Identity, OpenFin_2.FrameInfo>;
13542
- 'frame-wrap': VoidCall;
13543
- 'frame-wrap-sync': VoidCall;
13544
- 'frame-get-current': VoidCall;
13545
- 'frame-get-current-sync': VoidCall;
13546
13553
  'global-hotkey-register': {
13547
13554
  request: {
13548
13555
  hotkey: string;
@@ -13635,6 +13642,12 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13635
13642
  }, OpenFin_2.NativeTheme>;
13636
13643
  'get-theme-preferences': GetterCall<OpenFin_2.NativeTheme>;
13637
13644
  'get-version': GetterCall<string>;
13645
+ 'content-tracing-get-categories': GetterCall<string[]>;
13646
+ 'content-tracing-start-recording': ApiCall<{
13647
+ options: OpenFin_2.TraceConfig | OpenFin_2.TraceCategoriesAndOptions;
13648
+ }, void>;
13649
+ 'content-tracing-stop-recording': GetterCall<string>;
13650
+ 'content-tracing-get-trace-buffer-usage': GetterCall<OpenFin_2.TraceBufferUsage>;
13638
13651
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
13639
13652
  'clear-http-cache': VoidCall;
13640
13653
  'clear-cache-data': ApiCall<OpenFin_2.ClearDataOptions, void>;
@@ -13879,7 +13892,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13879
13892
  apiPath: '.resolveDomainSettings';
13880
13893
  namespace: 'System';
13881
13894
  };
13882
- 'system-register-shutdown-handler': VoidCall;
13883
13895
  'get-permissions': GetterCall<any>;
13884
13896
  'refresh-extensions': {
13885
13897
  request: void;
@@ -13898,24 +13910,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13898
13910
  request: void;
13899
13911
  response: Array<OpenFin_2.ThemePalette>;
13900
13912
  };
13901
- 'fdc3-add-context-listener': VoidCall;
13902
- 'fdc3-add-intent-listener': VoidCall;
13903
- 'fdc3-raise-intent': VoidCall;
13904
- 'fdc3-find-intent': VoidCall;
13905
- 'fdc3-find-intents-by-context': VoidCall;
13906
- 'fdc3-raise-intent-for-context': VoidCall;
13907
- 'fdc3-get-info': VoidCall;
13908
- 'fdc3-find-instances': VoidCall;
13909
- 'fdc3-get-app-metadata': VoidCall;
13910
- 'fdc3-broadcast': VoidCall;
13911
- 'fdc3-open': VoidCall;
13912
- 'fdc3-get-or-create-channel': VoidCall;
13913
- 'fdc3-get-system-channels': VoidCall;
13914
- 'fdc3-join-channel': VoidCall;
13915
- 'fdc3-get-current-channel': VoidCall;
13916
- 'fdc3-leave-current-channel': VoidCall;
13917
- 'interop-init': VoidCall;
13918
- 'interop-connect-sync': VoidCall;
13919
13913
  'interop-client-set-context': VoidCall;
13920
13914
  'interop-client-add-context-handler': VoidCall;
13921
13915
  'interop-client-get-context-groups': VoidCall;
@@ -13946,12 +13940,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13946
13940
  'interop-session-context-group-set-context': VoidCall;
13947
13941
  'interop-session-context-group-get-context': VoidCall;
13948
13942
  'interop-session-context-group-add-handler': VoidCall;
13949
- 'platform-wrap': VoidCall;
13950
- 'platform-wrap-sync': VoidCall;
13951
- 'platform-get-current': VoidCall;
13952
- 'platform-get-current-sync': VoidCall;
13953
- 'platform-start': VoidCall;
13954
- 'platform-start-from-manifest': VoidCall;
13955
13943
  'platform-get-client': ApplicationIdentityCall<{}, void>;
13956
13944
  'platform-create-view': ApplicationIdentityCall<{}, void>;
13957
13945
  'platform-create-window': ApplicationIdentityCall<{}, void>;
@@ -13964,11 +13952,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13964
13952
  'platform-set-window-context': ApplicationIdentityCall<{}, void>;
13965
13953
  'platform-get-window-context': ApplicationIdentityCall<{}, void>;
13966
13954
  'platform-close-window': ApplicationIdentityCall<{}, void>;
13967
- 'layout-wrap': VoidCall;
13968
- 'layout-wrap-sync': VoidCall;
13969
- 'layout-get-current': VoidCall;
13970
- 'layout-get-current-sync': VoidCall;
13971
- 'layout-init': VoidCall;
13972
13955
  'layout-get-config': VoidCall;
13973
13956
  'layout-get-views': VoidCall;
13974
13957
  'layout-replace': VoidCall;
@@ -13987,12 +13970,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13987
13970
  'layout-controller-create-adjacent-stack': VoidCall;
13988
13971
  'layout-controller-get-adjacent-stacks': VoidCall;
13989
13972
  'layout-controller-set-stack-active-view': VoidCall;
13990
- 'snapshot-source-init': VoidCall;
13991
- 'snapshot-source-wrap-sync': VoidCall;
13992
- 'snapshot-source-wrap': VoidCall;
13993
- 'snapshot-source-ready': VoidCall;
13994
- 'snapshot-source-get-snapshot': VoidCall;
13995
- 'snapshot-source-apply-snapshot': VoidCall;
13996
13973
  'capture-page': IdentityCall<{
13997
13974
  options?: OpenFin_2.CapturePageOptions;
13998
13975
  }, string>;
@@ -15227,6 +15204,10 @@ declare type SubscriptionOptions = {
15227
15204
  *
15228
15205
  */
15229
15206
  declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15207
+ /**
15208
+ * Chromium content tracing APIs.
15209
+ */
15210
+ readonly ContentTracing: SystemContentTracing;
15230
15211
  /**
15231
15212
  * @internal
15232
15213
  */
@@ -15253,13 +15234,15 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15253
15234
  * * cookies: browser [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies)
15254
15235
  * * localStorage: browser data that can be used across sessions ([local storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage))
15255
15236
  * * appcache: html5 [application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache)
15237
+ * * windowState: clears data written for windows using `saveWindowState`; after clearing, previously saved bounds and state will not be restored until new state is written
15256
15238
  * @example
15257
15239
  * ```js
15258
15240
  * const clearCacheOptions = {
15259
15241
  * appcache: true,
15260
15242
  * cache: true,
15261
15243
  * cookies: true,
15262
- * localStorage: true
15244
+ * localStorage: true,
15245
+ * windowState: true
15263
15246
  * };
15264
15247
  * fin.System.clearCache(clearCacheOptions).then(() => console.log('Cache cleared')).catch(err => console.log(err));
15265
15248
  * ```
@@ -15284,12 +15267,16 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15284
15267
  *
15285
15268
  * @param options - Optional configuration for what data to clear
15286
15269
  *
15270
+ * @remarks Set `windowState: true` to also clear data written for windows using `saveWindowState`.
15271
+ * After this data is cleared, previously saved bounds and state will not be restored until new state is written again.
15272
+ *
15287
15273
  * @example
15288
15274
  * ```js
15289
15275
  * // Clear only cookies and localStorage for a specific origin
15290
15276
  * await fin.System.clearCacheData({
15291
15277
  * dataTypes: ['cookies', 'localStorage'],
15292
- * origins: ['http://localhost:8081']
15278
+ * origins: ['http://localhost:8081'],
15279
+ * windowState: true
15293
15280
  * });
15294
15281
  *
15295
15282
  * // Clear everything except for a specific origin
@@ -16863,6 +16850,36 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
16863
16850
  getThemePalette(): Promise<Array<OpenFin_2.ThemePalette>>;
16864
16851
  }
16865
16852
 
16853
+ /**
16854
+ * Chromium content tracing APIs exposed under `fin.System.ContentTracing`.
16855
+ */
16856
+ declare class SystemContentTracing extends Base {
16857
+ /**
16858
+ * Gets the currently known tracing category groups.
16859
+ */
16860
+ getCategories(): Promise<string[]>;
16861
+ /**
16862
+ * Starts content tracing across runtime processes.
16863
+ *
16864
+ * Only one content tracing session may be active across the runtime at a time.
16865
+ * This method rejects if another identity already owns the active session.
16866
+ */
16867
+ startRecording(options: OpenFin_2.TraceConfig | OpenFin_2.TraceCategoriesAndOptions): Promise<void>;
16868
+ /**
16869
+ * Stops the active content tracing session and writes the trace to the runtime-managed cache folder.
16870
+ *
16871
+ * The calling identity must match the identity that started the active tracing session.
16872
+ * This method rejects if tracing is not active or is owned by another identity.
16873
+ */
16874
+ stopRecording(): Promise<string>;
16875
+ /**
16876
+ * Returns the current maximum trace buffer usage across processes.
16877
+ *
16878
+ * This method is not supported on macOS and rejects on that platform.
16879
+ */
16880
+ getTraceBufferUsage(): Promise<OpenFin_2.TraceBufferUsage>;
16881
+ }
16882
+
16866
16883
  /**
16867
16884
  * @deprecated Renamed to {@link Event}.
16868
16885
  */
@@ -17309,6 +17326,76 @@ declare type Time = {
17309
17326
 
17310
17327
  declare type TimeZones = 'utc' | 'local';
17311
17328
 
17329
+ /**
17330
+ * @interface
17331
+ * Current maximum usage across trace buffers.
17332
+ */
17333
+ declare type TraceBufferUsage = {
17334
+ value: number;
17335
+ percentage: number;
17336
+ };
17337
+
17338
+ /**
17339
+ * @interface
17340
+ * Shorthand tracing configuration based on Electron's contentTracing.startRecording() API.
17341
+ */
17342
+ declare type TraceCategoriesAndOptions = {
17343
+ /**
17344
+ * Filter that controls which category groups should be traced.
17345
+ * A filter can have an optional '-' prefix to exclude category groups that contain a matching category. Having both included and excluded category patterns in the same list is not supported. Examples: test_MyTest*, test_MyTest*,test_OtherStuff, -excluded_category1,-excluded_category2.
17346
+ */
17347
+ categoryFilter: string;
17348
+ /**
17349
+ * Comma-delimited string controlling recording mode and extra trace options. valid strings; record-until-full, record-continuously, trace-to-console, enable-sampling, enable-systrace, e.g. 'record-until-full,enable-sampling'. The first 3 options are trace recording modes and hence mutually exclusive. If more than one trace recording modes appear in the traceOptions string, the last one takes precedence. If none of the trace recording modes are specified, recording mode is record-until-full. The trace option will first be reset to the default option (record_mode set to record-until-full, enable_sampling and enable_systrace set to false) before options parsed from traceOptions are applied on it.
17350
+ */
17351
+ traceOptions: string;
17352
+ };
17353
+
17354
+ /**
17355
+ * @interface
17356
+ * Structured tracing configuration based on Electron's contentTracing.startRecording() API.
17357
+ */
17358
+ declare type TraceConfig = {
17359
+ /**
17360
+ * Can be `record-until-full`, `record-continuously`, `record-as-much-as-possible` or `trace-to-console`.
17361
+ * Defaults to `record-until-full`, which will record until the trace buffer is full and then stop recording.
17362
+ */
17363
+ recording_mode?: 'record-until-full' | 'record-continuously' | 'record-as-much-as-possible' | 'trace-to-console';
17364
+ /**
17365
+ * Maximum size of the trace recording buffer in kilobytes.
17366
+ */
17367
+ trace_buffer_size_in_kb?: number;
17368
+ /**
17369
+ * Maximum size of the trace recording buffer in events.
17370
+ * Defaults to 100MB
17371
+ */
17372
+ trace_buffer_size_in_events?: number;
17373
+ /**
17374
+ * Filters event data according to Chromium's vetted allowlist.
17375
+ */
17376
+ enable_argument_filter?: boolean;
17377
+ /**
17378
+ * A list of tracing categories to include.
17379
+ */
17380
+ included_categories?: string[];
17381
+ /**
17382
+ * A list of tracing categories to exclude.
17383
+ */
17384
+ excluded_categories?: string[];
17385
+ /**
17386
+ * A list of process IDs to include in the trace.
17387
+ */
17388
+ included_process_ids?: number[];
17389
+ /**
17390
+ * A list of histogram names to report with the trace.
17391
+ */
17392
+ histogram_names?: string[];
17393
+ /**
17394
+ * Additional configuration for memory tracing when memory-infra tracing is enabled.
17395
+ */
17396
+ memory_dump_config?: Record<string, any>;
17397
+ };
17398
+
17312
17399
  /**
17313
17400
  * @interface
17314
17401
  */
@@ -17377,9 +17464,12 @@ declare class Transport<MeType extends EntityType = EntityType> extends EventEmi
17377
17464
  sendRaw: Wire['send'];
17378
17465
  eventAggregator: EventAggregator;
17379
17466
  protected messageHandlers: MessageHandler[];
17380
- constructor(factory: WireFactory, environment: Environment, config: OpenFin_2.Identity);
17467
+ constructor(factory: WireFactory, environment: Environment, config: OpenFin_2.Identity & {
17468
+ apiDiagnostics?: boolean;
17469
+ });
17381
17470
  getFin(): OpenFin_2.Fin<MeType>;
17382
17471
  registerFin(_fin: OpenFin_2.Fin<MeType>): void;
17472
+ recordAnalytic(action: string): void;
17383
17473
  connectSync: () => void;
17384
17474
  getPort: () => string;
17385
17475
  shutdown(): Promise<void>;