@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.
@@ -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;
@@ -1757,6 +1757,7 @@ declare type BaseConfig = {
1757
1757
  devToolsPort?: number;
1758
1758
  installerUI?: boolean;
1759
1759
  runtime?: RuntimeConfig;
1760
+ apiDiagnostics?: boolean;
1760
1761
  appAssets?: [
1761
1762
  {
1762
1763
  src: string;
@@ -6643,6 +6644,16 @@ declare type IntentMetadata<TargetType = any> = {
6643
6644
  */
6644
6645
  declare class InterApplicationBus extends Base {
6645
6646
  Channel: Channel;
6647
+ /**
6648
+ * Event types for the InterApplicationBus.
6649
+ *
6650
+ * @remarks The `subscriber-added` and `subscriber-removed` events are disabled by default.
6651
+ * To re-enable them, launch the runtime with the `--emit-legacy-iab-events` flag.
6652
+ * These events will be removed in a future version. Use {@link Channel} for connection
6653
+ * lifecycle management instead.
6654
+ *
6655
+ * @deprecated Use {@link Channel} `onConnection` / `onDisconnection` instead.
6656
+ */
6646
6657
  events: {
6647
6658
  subscriberAdded: string;
6648
6659
  subscriberRemoved: string;
@@ -10317,6 +10328,9 @@ declare namespace OpenFin_2 {
10317
10328
  SystemProcessInfo,
10318
10329
  ClearCacheOption,
10319
10330
  ClearDataOptions,
10331
+ TraceConfig,
10332
+ TraceCategoriesAndOptions,
10333
+ TraceBufferUsage,
10320
10334
  CookieInfo,
10321
10335
  CookieOption,
10322
10336
  CrashReporterOptions,
@@ -12909,19 +12923,17 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12909
12923
  response: OpenFin_2.MenuResult;
12910
12924
  };
12911
12925
  'close-tray-icon-popup-menu': IdentityCall<{}, void>;
12912
- 'wrap-application': VoidCall;
12913
- 'wrap-application-sync': VoidCall;
12914
12926
  'create-application': ApiCall<OpenFin_2.ApplicationCreationOptions, void>;
12915
- 'application-create': VoidCall;
12916
- 'start-application': VoidCall;
12917
12927
  'run-applications': ApiCall<{
12918
12928
  applications: Array<OpenFin_2.ManifestInfo>;
12919
12929
  opts?: OpenFin_2.RvmLaunchOptions;
12920
12930
  }, void>;
12921
- 'get-current-application': VoidCall;
12922
- 'get-current-application-sync': VoidCall;
12923
- 'application-start-from-manifest': VoidCall;
12924
- 'application-create-from-manifest': VoidCall;
12931
+ 'send-analytics-batch': {
12932
+ request: {
12933
+ counts: Record<string, number>;
12934
+ };
12935
+ response: void;
12936
+ };
12925
12937
  'request-external-authorization': {
12926
12938
  request: any;
12927
12939
  response: void;
@@ -13040,10 +13052,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13040
13052
  options: OpenFin_2.UpdatableViewOptions;
13041
13053
  }>;
13042
13054
  'trigger-before-unload': IdentityCall<{}, boolean>;
13043
- 'view-wrap-sync': VoidCall;
13044
- 'view-wrap': VoidCall;
13045
- 'view-get-current': VoidCall;
13046
- 'view-get-current-sync': VoidCall;
13047
13055
  'animate-window': IdentityCall<{
13048
13056
  transitions: OpenFin_2.Transition;
13049
13057
  options: OpenFin_2.TransitionOptions;
@@ -13135,11 +13143,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13135
13143
  };
13136
13144
  response: void;
13137
13145
  };
13138
- 'window-wrap': VoidCall;
13139
- 'window-wrap-sync': VoidCall;
13140
- 'create-window': VoidCall;
13141
- 'get-current-window': VoidCall;
13142
- 'get-current-window-sync': VoidCall;
13143
13146
  'show-download-bubble': IdentityCall<{
13144
13147
  anchor?: OpenFin_2.Anchor;
13145
13148
  }, void>;
@@ -13147,14 +13150,8 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13147
13150
  anchor: OpenFin_2.Anchor;
13148
13151
  }, void>;
13149
13152
  'get-external-application-info': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.ExternalApplicationInfo>;
13150
- 'external-application-wrap': VoidCall;
13151
- 'external-application-wrap-sync': VoidCall;
13152
13153
  'get-frame-info': ApiCall<OpenFin_2.Identity, OpenFin_2.FrameInfo>;
13153
13154
  'get-parent-window': ApiCall<OpenFin_2.Identity, OpenFin_2.FrameInfo>;
13154
- 'frame-wrap': VoidCall;
13155
- 'frame-wrap-sync': VoidCall;
13156
- 'frame-get-current': VoidCall;
13157
- 'frame-get-current-sync': VoidCall;
13158
13155
  'global-hotkey-register': {
13159
13156
  request: {
13160
13157
  hotkey: string;
@@ -13247,6 +13244,12 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13247
13244
  }, OpenFin_2.NativeTheme>;
13248
13245
  'get-theme-preferences': GetterCall<OpenFin_2.NativeTheme>;
13249
13246
  'get-version': GetterCall<string>;
13247
+ 'content-tracing-get-categories': GetterCall<string[]>;
13248
+ 'content-tracing-start-recording': ApiCall<{
13249
+ options: OpenFin_2.TraceConfig | OpenFin_2.TraceCategoriesAndOptions;
13250
+ }, void>;
13251
+ 'content-tracing-stop-recording': GetterCall<string>;
13252
+ 'content-tracing-get-trace-buffer-usage': GetterCall<OpenFin_2.TraceBufferUsage>;
13250
13253
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
13251
13254
  'clear-http-cache': VoidCall;
13252
13255
  'clear-cache-data': ApiCall<OpenFin_2.ClearDataOptions, void>;
@@ -13491,7 +13494,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13491
13494
  apiPath: '.resolveDomainSettings';
13492
13495
  namespace: 'System';
13493
13496
  };
13494
- 'system-register-shutdown-handler': VoidCall;
13495
13497
  'get-permissions': GetterCall<any>;
13496
13498
  'refresh-extensions': {
13497
13499
  request: void;
@@ -13510,24 +13512,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13510
13512
  request: void;
13511
13513
  response: Array<OpenFin_2.ThemePalette>;
13512
13514
  };
13513
- 'fdc3-add-context-listener': VoidCall;
13514
- 'fdc3-add-intent-listener': VoidCall;
13515
- 'fdc3-raise-intent': VoidCall;
13516
- 'fdc3-find-intent': VoidCall;
13517
- 'fdc3-find-intents-by-context': VoidCall;
13518
- 'fdc3-raise-intent-for-context': VoidCall;
13519
- 'fdc3-get-info': VoidCall;
13520
- 'fdc3-find-instances': VoidCall;
13521
- 'fdc3-get-app-metadata': VoidCall;
13522
- 'fdc3-broadcast': VoidCall;
13523
- 'fdc3-open': VoidCall;
13524
- 'fdc3-get-or-create-channel': VoidCall;
13525
- 'fdc3-get-system-channels': VoidCall;
13526
- 'fdc3-join-channel': VoidCall;
13527
- 'fdc3-get-current-channel': VoidCall;
13528
- 'fdc3-leave-current-channel': VoidCall;
13529
- 'interop-init': VoidCall;
13530
- 'interop-connect-sync': VoidCall;
13531
13515
  'interop-client-set-context': VoidCall;
13532
13516
  'interop-client-add-context-handler': VoidCall;
13533
13517
  'interop-client-get-context-groups': VoidCall;
@@ -13558,12 +13542,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13558
13542
  'interop-session-context-group-set-context': VoidCall;
13559
13543
  'interop-session-context-group-get-context': VoidCall;
13560
13544
  'interop-session-context-group-add-handler': VoidCall;
13561
- 'platform-wrap': VoidCall;
13562
- 'platform-wrap-sync': VoidCall;
13563
- 'platform-get-current': VoidCall;
13564
- 'platform-get-current-sync': VoidCall;
13565
- 'platform-start': VoidCall;
13566
- 'platform-start-from-manifest': VoidCall;
13567
13545
  'platform-get-client': ApplicationIdentityCall<{}, void>;
13568
13546
  'platform-create-view': ApplicationIdentityCall<{}, void>;
13569
13547
  'platform-create-window': ApplicationIdentityCall<{}, void>;
@@ -13576,11 +13554,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13576
13554
  'platform-set-window-context': ApplicationIdentityCall<{}, void>;
13577
13555
  'platform-get-window-context': ApplicationIdentityCall<{}, void>;
13578
13556
  'platform-close-window': ApplicationIdentityCall<{}, void>;
13579
- 'layout-wrap': VoidCall;
13580
- 'layout-wrap-sync': VoidCall;
13581
- 'layout-get-current': VoidCall;
13582
- 'layout-get-current-sync': VoidCall;
13583
- 'layout-init': VoidCall;
13584
13557
  'layout-get-config': VoidCall;
13585
13558
  'layout-get-views': VoidCall;
13586
13559
  'layout-replace': VoidCall;
@@ -13599,12 +13572,6 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13599
13572
  'layout-controller-create-adjacent-stack': VoidCall;
13600
13573
  'layout-controller-get-adjacent-stacks': VoidCall;
13601
13574
  'layout-controller-set-stack-active-view': VoidCall;
13602
- 'snapshot-source-init': VoidCall;
13603
- 'snapshot-source-wrap-sync': VoidCall;
13604
- 'snapshot-source-wrap': VoidCall;
13605
- 'snapshot-source-ready': VoidCall;
13606
- 'snapshot-source-get-snapshot': VoidCall;
13607
- 'snapshot-source-apply-snapshot': VoidCall;
13608
13575
  'capture-page': IdentityCall<{
13609
13576
  options?: OpenFin_2.CapturePageOptions;
13610
13577
  }, string>;
@@ -14836,6 +14803,10 @@ declare type SubscriptionOptions = {
14836
14803
  *
14837
14804
  */
14838
14805
  declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
14806
+ /**
14807
+ * Chromium content tracing APIs.
14808
+ */
14809
+ readonly ContentTracing: SystemContentTracing;
14839
14810
  /* Excluded from this release type: __constructor */
14840
14811
  private sendExternalProcessRequest;
14841
14812
  /**
@@ -16469,6 +16440,83 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
16469
16440
  getThemePalette(): Promise<Array<OpenFin_2.ThemePalette>>;
16470
16441
  }
16471
16442
 
16443
+ /**
16444
+ * Chromium content tracing APIs exposed under `fin.System.ContentTracing`.
16445
+ */
16446
+ declare class SystemContentTracing extends Base {
16447
+ /**
16448
+ * Gets the currently known tracing category groups.
16449
+ *
16450
+ * @example
16451
+ * ```ts
16452
+ * const categories = await fin.System.ContentTracing.getCategories();
16453
+ * const sorted = [...new Set(categories)].sort((a, b) => a.localeCompare(b));
16454
+ * console.log(`Loaded ${sorted.length} tracing categories`);
16455
+ * ```
16456
+ */
16457
+ getCategories(): Promise<string[]>;
16458
+ /**
16459
+ * Starts content tracing across runtime processes.
16460
+ *
16461
+ * Only one content tracing session may be active across the runtime at a time.
16462
+ * This method rejects if another identity already owns the active session.
16463
+ *
16464
+ * @example
16465
+ * ```ts
16466
+ * await fin.System.ContentTracing.startRecording({
16467
+ * recording_mode: 'record-as-much-as-possible',
16468
+ * included_categories: [
16469
+ * '*',
16470
+ * 'disabled-by-default-blink.invalidation',
16471
+ * 'disabled-by-default-cc.debug',
16472
+ * 'disabled-by-default-viz.surface_id_flow'
16473
+ * ]
16474
+ * });
16475
+ *
16476
+ * console.log('Content tracing started. Call stopRecording() when ready to collect the trace.');
16477
+ * ```
16478
+ *
16479
+ * @example
16480
+ * ```ts
16481
+ * await fin.System.ContentTracing.startRecording({
16482
+ * categoryFilter: 'electron,blink,cc',
16483
+ * traceOptions: 'record-until-full,enable-sampling'
16484
+ * });
16485
+ * ```
16486
+ */
16487
+ startRecording(options: OpenFin_2.TraceConfig | OpenFin_2.TraceCategoriesAndOptions): Promise<void>;
16488
+ /**
16489
+ * Stops the active content tracing session and writes the trace to the runtime-managed cache folder.
16490
+ *
16491
+ * The calling identity must match the identity that started the active tracing session.
16492
+ * This method rejects if tracing is not active or is owned by another identity.
16493
+ *
16494
+ * @example
16495
+ * ```ts
16496
+ * const tracePath = await fin.System.ContentTracing.stopRecording();
16497
+ * console.log('Trace written to:', tracePath);
16498
+ * // Load the file in chrome://tracing or https://ui.perfetto.dev/
16499
+ * ```
16500
+ */
16501
+ stopRecording(): Promise<string>;
16502
+ /**
16503
+ * Returns the current maximum trace buffer usage across processes.
16504
+ *
16505
+ * This method is not supported on macOS and rejects on that platform.
16506
+ *
16507
+ * @example
16508
+ * ```ts
16509
+ * try {
16510
+ * const usage = await fin.System.ContentTracing.getTraceBufferUsage();
16511
+ * console.log(`Buffer usage: ${usage.percentage}% (${usage.value})`);
16512
+ * } catch (error) {
16513
+ * console.warn('Trace buffer usage is not available on this platform.', error);
16514
+ * }
16515
+ * ```
16516
+ */
16517
+ getTraceBufferUsage(): Promise<OpenFin_2.TraceBufferUsage>;
16518
+ }
16519
+
16472
16520
  /**
16473
16521
  * @deprecated Renamed to {@link Event}.
16474
16522
  */
@@ -16908,6 +16956,76 @@ declare type Time = {
16908
16956
 
16909
16957
  declare type TimeZones = 'utc' | 'local';
16910
16958
 
16959
+ /**
16960
+ * @interface
16961
+ * Current maximum usage across trace buffers.
16962
+ */
16963
+ declare type TraceBufferUsage = {
16964
+ value: number;
16965
+ percentage: number;
16966
+ };
16967
+
16968
+ /**
16969
+ * @interface
16970
+ * Shorthand tracing configuration based on Electron's contentTracing.startRecording() API.
16971
+ */
16972
+ declare type TraceCategoriesAndOptions = {
16973
+ /**
16974
+ * Filter that controls which category groups should be traced.
16975
+ * 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.
16976
+ */
16977
+ categoryFilter: string;
16978
+ /**
16979
+ * 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.
16980
+ */
16981
+ traceOptions: string;
16982
+ };
16983
+
16984
+ /**
16985
+ * @interface
16986
+ * Structured tracing configuration based on Electron's contentTracing.startRecording() API.
16987
+ */
16988
+ declare type TraceConfig = {
16989
+ /**
16990
+ * Can be `record-until-full`, `record-continuously`, `record-as-much-as-possible` or `trace-to-console`.
16991
+ * Defaults to `record-until-full`, which will record until the trace buffer is full and then stop recording.
16992
+ */
16993
+ recording_mode?: 'record-until-full' | 'record-continuously' | 'record-as-much-as-possible' | 'trace-to-console';
16994
+ /**
16995
+ * Maximum size of the trace recording buffer in kilobytes.
16996
+ */
16997
+ trace_buffer_size_in_kb?: number;
16998
+ /**
16999
+ * Maximum size of the trace recording buffer in events.
17000
+ * Defaults to 100MB
17001
+ */
17002
+ trace_buffer_size_in_events?: number;
17003
+ /**
17004
+ * Filters event data according to Chromium's vetted allowlist.
17005
+ */
17006
+ enable_argument_filter?: boolean;
17007
+ /**
17008
+ * A list of tracing categories to include.
17009
+ */
17010
+ included_categories?: string[];
17011
+ /**
17012
+ * A list of tracing categories to exclude.
17013
+ */
17014
+ excluded_categories?: string[];
17015
+ /**
17016
+ * A list of process IDs to include in the trace.
17017
+ */
17018
+ included_process_ids?: number[];
17019
+ /**
17020
+ * A list of histogram names to report with the trace.
17021
+ */
17022
+ histogram_names?: string[];
17023
+ /**
17024
+ * Additional configuration for memory tracing when memory-infra tracing is enabled.
17025
+ */
17026
+ memory_dump_config?: Record<string, any>;
17027
+ };
17028
+
16911
17029
  /**
16912
17030
  * @interface
16913
17031
  */
@@ -16976,9 +17094,12 @@ declare class Transport<MeType extends EntityType = EntityType> extends EventEmi
16976
17094
  sendRaw: Wire['send'];
16977
17095
  eventAggregator: EventAggregator;
16978
17096
  protected messageHandlers: MessageHandler[];
16979
- constructor(factory: WireFactory, environment: Environment, config: OpenFin_2.Identity);
17097
+ constructor(factory: WireFactory, environment: Environment, config: OpenFin_2.Identity & {
17098
+ apiDiagnostics?: boolean;
17099
+ });
16980
17100
  getFin(): OpenFin_2.Fin<MeType>;
16981
17101
  registerFin(_fin: OpenFin_2.Fin<MeType>): void;
17102
+ recordAnalytic(action: string): void;
16982
17103
  connectSync: () => void;
16983
17104
  getPort: () => string;
16984
17105
  shutdown(): Promise<void>;