@openfin/core 44.100.109 → 44.101.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.
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;
@@ -6737,6 +6738,16 @@ declare type IntentMetadata<TargetType = any> = {
6737
6738
  */
6738
6739
  declare class InterApplicationBus extends Base {
6739
6740
  Channel: Channel;
6741
+ /**
6742
+ * Event types for the InterApplicationBus.
6743
+ *
6744
+ * @remarks The `subscriber-added` and `subscriber-removed` events are disabled by default.
6745
+ * To re-enable them, launch the runtime with the `--emit-legacy-iab-events` flag.
6746
+ * These events will be removed in a future version. Use {@link Channel} for connection
6747
+ * lifecycle management instead.
6748
+ *
6749
+ * @deprecated Use {@link Channel} `onConnection` / `onDisconnection` instead.
6750
+ */
6740
6751
  events: {
6741
6752
  subscriberAdded: string;
6742
6753
  subscriberRemoved: string;
@@ -10651,6 +10662,9 @@ declare namespace OpenFin_2 {
10651
10662
  SystemProcessInfo,
10652
10663
  ClearCacheOption,
10653
10664
  ClearDataOptions,
10665
+ TraceConfig,
10666
+ TraceCategoriesAndOptions,
10667
+ TraceBufferUsage,
10654
10668
  CookieInfo,
10655
10669
  CookieOption,
10656
10670
  CrashReporterOptions,
@@ -13326,19 +13340,17 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13326
13340
  response: OpenFin_2.MenuResult;
13327
13341
  };
13328
13342
  'close-tray-icon-popup-menu': IdentityCall<{}, void>;
13329
- 'wrap-application': VoidCall;
13330
- 'wrap-application-sync': VoidCall;
13331
13343
  'create-application': ApiCall<OpenFin_2.ApplicationCreationOptions, void>;
13332
- 'application-create': VoidCall;
13333
- 'start-application': VoidCall;
13334
13344
  'run-applications': ApiCall<{
13335
13345
  applications: Array<OpenFin_2.ManifestInfo>;
13336
13346
  opts?: OpenFin_2.RvmLaunchOptions;
13337
13347
  }, void>;
13338
- 'get-current-application': VoidCall;
13339
- 'get-current-application-sync': VoidCall;
13340
- 'application-start-from-manifest': VoidCall;
13341
- 'application-create-from-manifest': VoidCall;
13348
+ 'send-analytics-batch': {
13349
+ request: {
13350
+ counts: Record<string, number>;
13351
+ };
13352
+ response: void;
13353
+ };
13342
13354
  'request-external-authorization': {
13343
13355
  request: any;
13344
13356
  response: void;
@@ -13457,10 +13469,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13457
13469
  options: OpenFin_2.UpdatableViewOptions;
13458
13470
  }>;
13459
13471
  'trigger-before-unload': IdentityCall<{}, boolean>;
13460
- 'view-wrap-sync': VoidCall;
13461
- 'view-wrap': VoidCall;
13462
- 'view-get-current': VoidCall;
13463
- 'view-get-current-sync': VoidCall;
13464
13472
  'animate-window': IdentityCall<{
13465
13473
  transitions: OpenFin_2.Transition;
13466
13474
  options: OpenFin_2.TransitionOptions;
@@ -13552,11 +13560,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13552
13560
  };
13553
13561
  response: void;
13554
13562
  };
13555
- 'window-wrap': VoidCall;
13556
- 'window-wrap-sync': VoidCall;
13557
- 'create-window': VoidCall;
13558
- 'get-current-window': VoidCall;
13559
- 'get-current-window-sync': VoidCall;
13560
13563
  'show-download-bubble': IdentityCall<{
13561
13564
  anchor?: OpenFin_2.Anchor;
13562
13565
  }, void>;
@@ -13564,14 +13567,8 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13564
13567
  anchor: OpenFin_2.Anchor;
13565
13568
  }, void>;
13566
13569
  'get-external-application-info': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.ExternalApplicationInfo>;
13567
- 'external-application-wrap': VoidCall;
13568
- 'external-application-wrap-sync': VoidCall;
13569
13570
  'get-frame-info': ApiCall<OpenFin_2.Identity, OpenFin_2.FrameInfo>;
13570
13571
  'get-parent-window': ApiCall<OpenFin_2.Identity, OpenFin_2.FrameInfo>;
13571
- 'frame-wrap': VoidCall;
13572
- 'frame-wrap-sync': VoidCall;
13573
- 'frame-get-current': VoidCall;
13574
- 'frame-get-current-sync': VoidCall;
13575
13572
  'global-hotkey-register': {
13576
13573
  request: {
13577
13574
  hotkey: string;
@@ -13664,6 +13661,12 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13664
13661
  }, OpenFin_2.NativeTheme>;
13665
13662
  'get-theme-preferences': GetterCall<OpenFin_2.NativeTheme>;
13666
13663
  'get-version': GetterCall<string>;
13664
+ 'content-tracing-get-categories': GetterCall<string[]>;
13665
+ 'content-tracing-start-recording': ApiCall<{
13666
+ options: OpenFin_2.TraceConfig | OpenFin_2.TraceCategoriesAndOptions;
13667
+ }, void>;
13668
+ 'content-tracing-stop-recording': GetterCall<string>;
13669
+ 'content-tracing-get-trace-buffer-usage': GetterCall<OpenFin_2.TraceBufferUsage>;
13667
13670
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
13668
13671
  'clear-http-cache': VoidCall;
13669
13672
  'clear-cache-data': ApiCall<OpenFin_2.ClearDataOptions, void>;
@@ -13908,7 +13911,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13908
13911
  apiPath: '.resolveDomainSettings';
13909
13912
  namespace: 'System';
13910
13913
  };
13911
- 'system-register-shutdown-handler': VoidCall;
13912
13914
  'get-permissions': GetterCall<any>;
13913
13915
  'refresh-extensions': {
13914
13916
  request: void;
@@ -13927,24 +13929,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13927
13929
  request: void;
13928
13930
  response: Array<OpenFin_2.ThemePalette>;
13929
13931
  };
13930
- 'fdc3-add-context-listener': VoidCall;
13931
- 'fdc3-add-intent-listener': VoidCall;
13932
- 'fdc3-raise-intent': VoidCall;
13933
- 'fdc3-find-intent': VoidCall;
13934
- 'fdc3-find-intents-by-context': VoidCall;
13935
- 'fdc3-raise-intent-for-context': VoidCall;
13936
- 'fdc3-get-info': VoidCall;
13937
- 'fdc3-find-instances': VoidCall;
13938
- 'fdc3-get-app-metadata': VoidCall;
13939
- 'fdc3-broadcast': VoidCall;
13940
- 'fdc3-open': VoidCall;
13941
- 'fdc3-get-or-create-channel': VoidCall;
13942
- 'fdc3-get-system-channels': VoidCall;
13943
- 'fdc3-join-channel': VoidCall;
13944
- 'fdc3-get-current-channel': VoidCall;
13945
- 'fdc3-leave-current-channel': VoidCall;
13946
- 'interop-init': VoidCall;
13947
- 'interop-connect-sync': VoidCall;
13948
13932
  'interop-client-set-context': VoidCall;
13949
13933
  'interop-client-add-context-handler': VoidCall;
13950
13934
  'interop-client-get-context-groups': VoidCall;
@@ -13975,12 +13959,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13975
13959
  'interop-session-context-group-set-context': VoidCall;
13976
13960
  'interop-session-context-group-get-context': VoidCall;
13977
13961
  'interop-session-context-group-add-handler': VoidCall;
13978
- 'platform-wrap': VoidCall;
13979
- 'platform-wrap-sync': VoidCall;
13980
- 'platform-get-current': VoidCall;
13981
- 'platform-get-current-sync': VoidCall;
13982
- 'platform-start': VoidCall;
13983
- 'platform-start-from-manifest': VoidCall;
13984
13962
  'platform-get-client': ApplicationIdentityCall<{}, void>;
13985
13963
  'platform-create-view': ApplicationIdentityCall<{}, void>;
13986
13964
  'platform-create-window': ApplicationIdentityCall<{}, void>;
@@ -13993,11 +13971,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13993
13971
  'platform-set-window-context': ApplicationIdentityCall<{}, void>;
13994
13972
  'platform-get-window-context': ApplicationIdentityCall<{}, void>;
13995
13973
  'platform-close-window': ApplicationIdentityCall<{}, void>;
13996
- 'layout-wrap': VoidCall;
13997
- 'layout-wrap-sync': VoidCall;
13998
- 'layout-get-current': VoidCall;
13999
- 'layout-get-current-sync': VoidCall;
14000
- 'layout-init': VoidCall;
14001
13974
  'layout-get-config': VoidCall;
14002
13975
  'layout-get-views': VoidCall;
14003
13976
  'layout-replace': VoidCall;
@@ -14016,12 +13989,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
14016
13989
  'layout-controller-create-adjacent-stack': VoidCall;
14017
13990
  'layout-controller-get-adjacent-stacks': VoidCall;
14018
13991
  'layout-controller-set-stack-active-view': VoidCall;
14019
- 'snapshot-source-init': VoidCall;
14020
- 'snapshot-source-wrap-sync': VoidCall;
14021
- 'snapshot-source-wrap': VoidCall;
14022
- 'snapshot-source-ready': VoidCall;
14023
- 'snapshot-source-get-snapshot': VoidCall;
14024
- 'snapshot-source-apply-snapshot': VoidCall;
14025
13992
  'capture-page': IdentityCall<{
14026
13993
  options?: OpenFin_2.CapturePageOptions;
14027
13994
  }, string>;
@@ -15256,6 +15223,10 @@ declare type SubscriptionOptions = {
15256
15223
  *
15257
15224
  */
15258
15225
  declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15226
+ /**
15227
+ * Chromium content tracing APIs.
15228
+ */
15229
+ readonly ContentTracing: SystemContentTracing;
15259
15230
  /**
15260
15231
  * @internal
15261
15232
  */
@@ -16892,6 +16863,83 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
16892
16863
  getThemePalette(): Promise<Array<OpenFin_2.ThemePalette>>;
16893
16864
  }
16894
16865
 
16866
+ /**
16867
+ * Chromium content tracing APIs exposed under `fin.System.ContentTracing`.
16868
+ */
16869
+ declare class SystemContentTracing extends Base {
16870
+ /**
16871
+ * Gets the currently known tracing category groups.
16872
+ *
16873
+ * @example
16874
+ * ```ts
16875
+ * const categories = await fin.System.ContentTracing.getCategories();
16876
+ * const sorted = [...new Set(categories)].sort((a, b) => a.localeCompare(b));
16877
+ * console.log(`Loaded ${sorted.length} tracing categories`);
16878
+ * ```
16879
+ */
16880
+ getCategories(): Promise<string[]>;
16881
+ /**
16882
+ * Starts content tracing across runtime processes.
16883
+ *
16884
+ * Only one content tracing session may be active across the runtime at a time.
16885
+ * This method rejects if another identity already owns the active session.
16886
+ *
16887
+ * @example
16888
+ * ```ts
16889
+ * await fin.System.ContentTracing.startRecording({
16890
+ * recording_mode: 'record-as-much-as-possible',
16891
+ * included_categories: [
16892
+ * '*',
16893
+ * 'disabled-by-default-blink.invalidation',
16894
+ * 'disabled-by-default-cc.debug',
16895
+ * 'disabled-by-default-viz.surface_id_flow'
16896
+ * ]
16897
+ * });
16898
+ *
16899
+ * console.log('Content tracing started. Call stopRecording() when ready to collect the trace.');
16900
+ * ```
16901
+ *
16902
+ * @example
16903
+ * ```ts
16904
+ * await fin.System.ContentTracing.startRecording({
16905
+ * categoryFilter: 'electron,blink,cc',
16906
+ * traceOptions: 'record-until-full,enable-sampling'
16907
+ * });
16908
+ * ```
16909
+ */
16910
+ startRecording(options: OpenFin_2.TraceConfig | OpenFin_2.TraceCategoriesAndOptions): Promise<void>;
16911
+ /**
16912
+ * Stops the active content tracing session and writes the trace to the runtime-managed cache folder.
16913
+ *
16914
+ * The calling identity must match the identity that started the active tracing session.
16915
+ * This method rejects if tracing is not active or is owned by another identity.
16916
+ *
16917
+ * @example
16918
+ * ```ts
16919
+ * const tracePath = await fin.System.ContentTracing.stopRecording();
16920
+ * console.log('Trace written to:', tracePath);
16921
+ * // Load the file in chrome://tracing or https://ui.perfetto.dev/
16922
+ * ```
16923
+ */
16924
+ stopRecording(): Promise<string>;
16925
+ /**
16926
+ * Returns the current maximum trace buffer usage across processes.
16927
+ *
16928
+ * This method is not supported on macOS and rejects on that platform.
16929
+ *
16930
+ * @example
16931
+ * ```ts
16932
+ * try {
16933
+ * const usage = await fin.System.ContentTracing.getTraceBufferUsage();
16934
+ * console.log(`Buffer usage: ${usage.percentage}% (${usage.value})`);
16935
+ * } catch (error) {
16936
+ * console.warn('Trace buffer usage is not available on this platform.', error);
16937
+ * }
16938
+ * ```
16939
+ */
16940
+ getTraceBufferUsage(): Promise<OpenFin_2.TraceBufferUsage>;
16941
+ }
16942
+
16895
16943
  /**
16896
16944
  * @deprecated Renamed to {@link Event}.
16897
16945
  */
@@ -17338,6 +17386,76 @@ declare type Time = {
17338
17386
 
17339
17387
  declare type TimeZones = 'utc' | 'local';
17340
17388
 
17389
+ /**
17390
+ * @interface
17391
+ * Current maximum usage across trace buffers.
17392
+ */
17393
+ declare type TraceBufferUsage = {
17394
+ value: number;
17395
+ percentage: number;
17396
+ };
17397
+
17398
+ /**
17399
+ * @interface
17400
+ * Shorthand tracing configuration based on Electron's contentTracing.startRecording() API.
17401
+ */
17402
+ declare type TraceCategoriesAndOptions = {
17403
+ /**
17404
+ * Filter that controls which category groups should be traced.
17405
+ * 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.
17406
+ */
17407
+ categoryFilter: string;
17408
+ /**
17409
+ * 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.
17410
+ */
17411
+ traceOptions: string;
17412
+ };
17413
+
17414
+ /**
17415
+ * @interface
17416
+ * Structured tracing configuration based on Electron's contentTracing.startRecording() API.
17417
+ */
17418
+ declare type TraceConfig = {
17419
+ /**
17420
+ * Can be `record-until-full`, `record-continuously`, `record-as-much-as-possible` or `trace-to-console`.
17421
+ * Defaults to `record-until-full`, which will record until the trace buffer is full and then stop recording.
17422
+ */
17423
+ recording_mode?: 'record-until-full' | 'record-continuously' | 'record-as-much-as-possible' | 'trace-to-console';
17424
+ /**
17425
+ * Maximum size of the trace recording buffer in kilobytes.
17426
+ */
17427
+ trace_buffer_size_in_kb?: number;
17428
+ /**
17429
+ * Maximum size of the trace recording buffer in events.
17430
+ * Defaults to 100MB
17431
+ */
17432
+ trace_buffer_size_in_events?: number;
17433
+ /**
17434
+ * Filters event data according to Chromium's vetted allowlist.
17435
+ */
17436
+ enable_argument_filter?: boolean;
17437
+ /**
17438
+ * A list of tracing categories to include.
17439
+ */
17440
+ included_categories?: string[];
17441
+ /**
17442
+ * A list of tracing categories to exclude.
17443
+ */
17444
+ excluded_categories?: string[];
17445
+ /**
17446
+ * A list of process IDs to include in the trace.
17447
+ */
17448
+ included_process_ids?: number[];
17449
+ /**
17450
+ * A list of histogram names to report with the trace.
17451
+ */
17452
+ histogram_names?: string[];
17453
+ /**
17454
+ * Additional configuration for memory tracing when memory-infra tracing is enabled.
17455
+ */
17456
+ memory_dump_config?: Record<string, any>;
17457
+ };
17458
+
17341
17459
  /**
17342
17460
  * @interface
17343
17461
  */
@@ -17406,9 +17524,12 @@ declare class Transport<MeType extends EntityType = EntityType> extends EventEmi
17406
17524
  sendRaw: Wire['send'];
17407
17525
  eventAggregator: EventAggregator;
17408
17526
  protected messageHandlers: MessageHandler[];
17409
- constructor(factory: WireFactory, environment: Environment, config: OpenFin_2.Identity);
17527
+ constructor(factory: WireFactory, environment: Environment, config: OpenFin_2.Identity & {
17528
+ apiDiagnostics?: boolean;
17529
+ });
17410
17530
  getFin(): OpenFin_2.Fin<MeType>;
17411
17531
  registerFin(_fin: OpenFin_2.Fin<MeType>): void;
17532
+ recordAnalytic(action: string): void;
17412
17533
  connectSync: () => void;
17413
17534
  getPort: () => string;
17414
17535
  shutdown(): Promise<void>;