@openfin/fdc3-api 44.100.57 → 44.100.58

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.
@@ -1417,6 +1417,56 @@ declare type ApplicationWindowInfo = {
1417
1417
  uuid: string;
1418
1418
  };
1419
1419
 
1420
+ /**
1421
+ * `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled when the app logging feature is enabled for its application.
1422
+ *
1423
+ * Please note, `enableAppLogging` must be specified in the application manifest's `platform` or `startup_app` key for this feature to be activated.
1424
+ *
1425
+ * If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
1426
+ *
1427
+ * This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
1428
+ * controlling a url's appLogLevel, its options will be ignored.
1429
+ *
1430
+ * @default 'debug'
1431
+ *
1432
+ * @example Controlling App Logs With DefaultViewOptions + Domain Settings
1433
+ *
1434
+ * In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
1435
+ *
1436
+ * We also use domain settings to suppress logs entirely for an example URL, and to lower verbosity to 'debug' for another.
1437
+ *
1438
+ * ```ts
1439
+ * {
1440
+ * <rest of settings>
1441
+ * "platform": {
1442
+ * <rest of settings>
1443
+ * "enableAppLogging": "true",
1444
+ * "defaultViewOptions": {
1445
+ * "appLogLevel": "warn"
1446
+ * },
1447
+ * "domainSettings": {
1448
+ * "default": { <rest of settings> }
1449
+ * "rules": [
1450
+ * <rest of rules>
1451
+ * {
1452
+ * "match": ["*://*?app-logging-level=silent"],
1453
+ * "options": {
1454
+ * "appLogLevel": "silent"
1455
+ * }
1456
+ * },
1457
+ * {
1458
+ * "match": ["*://*?app-logging-level=debug"],
1459
+ * "options": {
1460
+ * "appLogLevel": "debug"
1461
+ * }
1462
+ * },
1463
+ * ]
1464
+ * }
1465
+ * }
1466
+ * }
1467
+ */
1468
+ declare type AppLogLevel = 'silent' | 'debug' | 'info' | 'warn' | 'error';
1469
+
1420
1470
  /**
1421
1471
  * @interface
1422
1472
  */
@@ -9153,6 +9203,12 @@ declare type LogInfo = {
9153
9203
  */
9154
9204
  declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
9155
9205
 
9206
+ declare type LogPath = 'debug.log' | 'app.log';
9207
+
9208
+ declare type LogTarget = {
9209
+ type: LogPath;
9210
+ };
9211
+
9156
9212
  /**
9157
9213
  * Log types
9158
9214
  *
@@ -9673,10 +9729,9 @@ declare type MutableViewOptions = {
9673
9729
  */
9674
9730
  chromiumPolicies: ChromiumPolicies;
9675
9731
  /**
9676
- * When set to `false`, disables sending application logs to RVM for this view.
9677
- * When omitted, inherits from the parent application.
9732
+ * Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
9678
9733
  */
9679
- enableAppLogging?: boolean;
9734
+ appLogLevel?: AppLogLevel;
9680
9735
  };
9681
9736
 
9682
9737
  /**
@@ -9952,11 +10007,9 @@ declare type MutableWindowOptions = {
9952
10007
  */
9953
10008
  chromiumPolicies: ChromiumPolicies;
9954
10009
  /**
9955
- * When set to `false`, disables sending application logs to RVM for this window.
9956
- * When omitted, inherits from the parent application.
9957
- *
10010
+ * Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
9958
10011
  */
9959
- enableAppLogging?: boolean;
10012
+ appLogLevel?: AppLogLevel;
9960
10013
  };
9961
10014
 
9962
10015
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -10355,6 +10408,9 @@ declare namespace OpenFin {
10355
10408
  InheritableOptions,
10356
10409
  PolicyOptions,
10357
10410
  ChromiumPolicies,
10411
+ AppLogLevel,
10412
+ LogPath,
10413
+ LogTarget,
10358
10414
  MutableWindowOptions,
10359
10415
  WorkspacePlatformOptions,
10360
10416
  WebRequestHeader,
@@ -10935,10 +10991,10 @@ declare type PerDomainSettings = {
10935
10991
  drag?: 'allow' | 'block';
10936
10992
  };
10937
10993
  /**
10938
- * When set to `false`, disables sending application logs to RVM for this window.
10939
- * When omitted, inherits from the parent application.
10994
+ * Allows the app log level of any matching content to be overriden.
10995
+ * See also {@link AppLogLevel} for more information.
10940
10996
  */
10941
- enableAppLogging?: boolean;
10997
+ appLogLevel?: AppLogLevel;
10942
10998
  };
10943
10999
 
10944
11000
  /**
@@ -13275,10 +13331,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13275
13331
  'get-current-window': VoidCall;
13276
13332
  'get-current-window-sync': VoidCall;
13277
13333
  'show-download-bubble': IdentityCall<{
13278
- options: OpenFin.Anchor;
13334
+ anchor?: OpenFin.Anchor;
13279
13335
  }, void>;
13280
13336
  'update-download-bubble-anchor': IdentityCall<{
13281
- options: OpenFin.Anchor;
13337
+ anchor: OpenFin.Anchor;
13282
13338
  }, void>;
13283
13339
  'get-external-application-info': ApiCall<OpenFin.ApplicationIdentity, OpenFin.ExternalApplicationInfo>;
13284
13340
  'external-application-wrap': VoidCall;
@@ -15693,16 +15749,14 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
15693
15749
  * Writes the passed message into both the log file and the console.
15694
15750
  * @param level The log level for the entry. Can be either "info", "warning" or "error"
15695
15751
  * @param message The log message text
15696
- * @param target.type Optional. The the log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
15752
+ * @param target The log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
15697
15753
  *
15698
15754
  * @example
15699
15755
  * ```js
15700
15756
  * fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
15701
15757
  * ```
15702
15758
  */
15703
- log(level: string, message: string, { type }?: {
15704
- type?: 'app.log' | 'debug.log';
15705
- }): Promise<void>;
15759
+ log(level: string, message: string, target?: OpenFin.LogTarget): Promise<void>;
15706
15760
  /**
15707
15761
  * Opens the passed URL in the default web browser.
15708
15762
  *
@@ -16527,11 +16581,35 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
16527
16581
  /**
16528
16582
  * Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
16529
16583
  * @param overrides - Array of ColorProviderOverrides objects
16584
+ * @example
16585
+ * ```ts
16586
+ * await fin.System.setThemePalette([
16587
+ * {
16588
+ * colorProviderKey: { colorMode: 'light' },
16589
+ * colorsMap: {
16590
+ * kColorLabelForeground: 4278190080,
16591
+ * kColorBubbleBackground: 4293980400
16592
+ * }
16593
+ * },
16594
+ * {
16595
+ * colorProviderKey: { colorMode: 'dark' },
16596
+ * colorsMap: {
16597
+ * kColorLabelForeground: 4293980400,
16598
+ * kColorBubbleBackground: 4293980400
16599
+ * }
16600
+ * }
16601
+ * ]);
16602
+ * ```
16530
16603
  */
16531
16604
  setThemePalette(themePalette: Array<OpenFin.ThemePalette>): Promise<void>;
16532
16605
  /**
16533
16606
  * Retrieves currently used color overrides
16534
16607
  * @returns Array of ColorProviderOverrides objects
16608
+ * @example
16609
+ * ```ts
16610
+ * const themePalette = await fin.System.getThemePalette();
16611
+ * console.log(themePalette);
16612
+ * ```
16535
16613
  */
16536
16614
  getThemePalette(): Promise<Array<OpenFin.ThemePalette>>;
16537
16615
  }
@@ -20251,8 +20329,19 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
20251
20329
  * @returns {Promise<void>}
20252
20330
  * A promise that resolves once the request to show the download bubble
20253
20331
  * has been processed.
20332
+ * @example
20333
+ * ```js
20334
+ * const w = fin.Window.getCurrentSync();
20335
+ * const el = document.getElementById("download-bubble-button");
20336
+ * const rect = el.getBoundingClientRect();
20337
+ * const anchor = {
20338
+ * bounds: rect,
20339
+ * location: "topRight"
20340
+ * };
20341
+ * w.showDownloadBubble(anchor);
20342
+ * ```
20254
20343
  */
20255
- showDownloadBubble(options: OpenFin.Anchor): Promise<void>;
20344
+ showDownloadBubble(anchor?: OpenFin.Anchor): Promise<void>;
20256
20345
  /**
20257
20346
  * Updates the anchor used for positioning the download bubble. This allows
20258
20347
  * moving the bubble reactively—for example, in response to window resizes,
@@ -20264,8 +20353,27 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
20264
20353
  *
20265
20354
  * @returns {Promise<void>}
20266
20355
  * A promise that resolves once the anchor update has been applied.
20356
+ * @example
20357
+ * ```js
20358
+ * var w = fin.Window.getCurrentSync();
20359
+ * w.on('download-button-visibility-changed', (evt) => {
20360
+ * if (evt.visible) {
20361
+ * const el = document.getElementById("download-bubble-button");
20362
+ * //We show our button and get it's bounding rect
20363
+ * el.classList.remove("hidden");
20364
+ * const rect = el.getBoundingClientRect();
20365
+ * const anchor = {
20366
+ * bounds: rect,
20367
+ * location: "topRight"
20368
+ * }
20369
+ * w.updateDownloadBubbleAnchor(anchor);
20370
+ * } else {
20371
+ * //We hide our button
20372
+ * document.getElementById("download-bubble-button")?.classList.add("hidden");
20373
+ * }
20374
+ });
20267
20375
  */
20268
- updateDownloadBubbleAnchor(options: OpenFin.Anchor): Promise<void>;
20376
+ updateDownloadBubbleAnchor(anchor: OpenFin.Anchor): Promise<void>;
20269
20377
  }
20270
20378
 
20271
20379
  /**
@@ -1417,6 +1417,56 @@ declare type ApplicationWindowInfo = {
1417
1417
  uuid: string;
1418
1418
  };
1419
1419
 
1420
+ /**
1421
+ * `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled when the app logging feature is enabled for its application.
1422
+ *
1423
+ * Please note, `enableAppLogging` must be specified in the application manifest's `platform` or `startup_app` key for this feature to be activated.
1424
+ *
1425
+ * If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
1426
+ *
1427
+ * This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
1428
+ * controlling a url's appLogLevel, its options will be ignored.
1429
+ *
1430
+ * @default 'debug'
1431
+ *
1432
+ * @example Controlling App Logs With DefaultViewOptions + Domain Settings
1433
+ *
1434
+ * In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
1435
+ *
1436
+ * We also use domain settings to suppress logs entirely for an example URL, and to lower verbosity to 'debug' for another.
1437
+ *
1438
+ * ```ts
1439
+ * {
1440
+ * <rest of settings>
1441
+ * "platform": {
1442
+ * <rest of settings>
1443
+ * "enableAppLogging": "true",
1444
+ * "defaultViewOptions": {
1445
+ * "appLogLevel": "warn"
1446
+ * },
1447
+ * "domainSettings": {
1448
+ * "default": { <rest of settings> }
1449
+ * "rules": [
1450
+ * <rest of rules>
1451
+ * {
1452
+ * "match": ["*://*?app-logging-level=silent"],
1453
+ * "options": {
1454
+ * "appLogLevel": "silent"
1455
+ * }
1456
+ * },
1457
+ * {
1458
+ * "match": ["*://*?app-logging-level=debug"],
1459
+ * "options": {
1460
+ * "appLogLevel": "debug"
1461
+ * }
1462
+ * },
1463
+ * ]
1464
+ * }
1465
+ * }
1466
+ * }
1467
+ */
1468
+ declare type AppLogLevel = 'silent' | 'debug' | 'info' | 'warn' | 'error';
1469
+
1420
1470
  /**
1421
1471
  * @interface
1422
1472
  */
@@ -9153,6 +9203,12 @@ declare type LogInfo = {
9153
9203
  */
9154
9204
  declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
9155
9205
 
9206
+ declare type LogPath = 'debug.log' | 'app.log';
9207
+
9208
+ declare type LogTarget = {
9209
+ type: LogPath;
9210
+ };
9211
+
9156
9212
  /**
9157
9213
  * Log types
9158
9214
  *
@@ -9673,10 +9729,9 @@ declare type MutableViewOptions = {
9673
9729
  */
9674
9730
  chromiumPolicies: ChromiumPolicies;
9675
9731
  /**
9676
- * When set to `false`, disables sending application logs to RVM for this view.
9677
- * When omitted, inherits from the parent application.
9732
+ * Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
9678
9733
  */
9679
- enableAppLogging?: boolean;
9734
+ appLogLevel?: AppLogLevel;
9680
9735
  };
9681
9736
 
9682
9737
  /**
@@ -9952,11 +10007,9 @@ declare type MutableWindowOptions = {
9952
10007
  */
9953
10008
  chromiumPolicies: ChromiumPolicies;
9954
10009
  /**
9955
- * When set to `false`, disables sending application logs to RVM for this window.
9956
- * When omitted, inherits from the parent application.
9957
- *
10010
+ * Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
9958
10011
  */
9959
- enableAppLogging?: boolean;
10012
+ appLogLevel?: AppLogLevel;
9960
10013
  };
9961
10014
 
9962
10015
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -10355,6 +10408,9 @@ declare namespace OpenFin {
10355
10408
  InheritableOptions,
10356
10409
  PolicyOptions,
10357
10410
  ChromiumPolicies,
10411
+ AppLogLevel,
10412
+ LogPath,
10413
+ LogTarget,
10358
10414
  MutableWindowOptions,
10359
10415
  WorkspacePlatformOptions,
10360
10416
  WebRequestHeader,
@@ -10935,10 +10991,10 @@ declare type PerDomainSettings = {
10935
10991
  drag?: 'allow' | 'block';
10936
10992
  };
10937
10993
  /**
10938
- * When set to `false`, disables sending application logs to RVM for this window.
10939
- * When omitted, inherits from the parent application.
10994
+ * Allows the app log level of any matching content to be overriden.
10995
+ * See also {@link AppLogLevel} for more information.
10940
10996
  */
10941
- enableAppLogging?: boolean;
10997
+ appLogLevel?: AppLogLevel;
10942
10998
  };
10943
10999
 
10944
11000
  /**
@@ -13275,10 +13331,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13275
13331
  'get-current-window': VoidCall;
13276
13332
  'get-current-window-sync': VoidCall;
13277
13333
  'show-download-bubble': IdentityCall<{
13278
- options: OpenFin.Anchor;
13334
+ anchor?: OpenFin.Anchor;
13279
13335
  }, void>;
13280
13336
  'update-download-bubble-anchor': IdentityCall<{
13281
- options: OpenFin.Anchor;
13337
+ anchor: OpenFin.Anchor;
13282
13338
  }, void>;
13283
13339
  'get-external-application-info': ApiCall<OpenFin.ApplicationIdentity, OpenFin.ExternalApplicationInfo>;
13284
13340
  'external-application-wrap': VoidCall;
@@ -15693,16 +15749,14 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
15693
15749
  * Writes the passed message into both the log file and the console.
15694
15750
  * @param level The log level for the entry. Can be either "info", "warning" or "error"
15695
15751
  * @param message The log message text
15696
- * @param target.type Optional. The the log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
15752
+ * @param target The log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
15697
15753
  *
15698
15754
  * @example
15699
15755
  * ```js
15700
15756
  * fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
15701
15757
  * ```
15702
15758
  */
15703
- log(level: string, message: string, { type }?: {
15704
- type?: 'app.log' | 'debug.log';
15705
- }): Promise<void>;
15759
+ log(level: string, message: string, target?: OpenFin.LogTarget): Promise<void>;
15706
15760
  /**
15707
15761
  * Opens the passed URL in the default web browser.
15708
15762
  *
@@ -16527,11 +16581,35 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
16527
16581
  /**
16528
16582
  * Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
16529
16583
  * @param overrides - Array of ColorProviderOverrides objects
16584
+ * @example
16585
+ * ```ts
16586
+ * await fin.System.setThemePalette([
16587
+ * {
16588
+ * colorProviderKey: { colorMode: 'light' },
16589
+ * colorsMap: {
16590
+ * kColorLabelForeground: 4278190080,
16591
+ * kColorBubbleBackground: 4293980400
16592
+ * }
16593
+ * },
16594
+ * {
16595
+ * colorProviderKey: { colorMode: 'dark' },
16596
+ * colorsMap: {
16597
+ * kColorLabelForeground: 4293980400,
16598
+ * kColorBubbleBackground: 4293980400
16599
+ * }
16600
+ * }
16601
+ * ]);
16602
+ * ```
16530
16603
  */
16531
16604
  setThemePalette(themePalette: Array<OpenFin.ThemePalette>): Promise<void>;
16532
16605
  /**
16533
16606
  * Retrieves currently used color overrides
16534
16607
  * @returns Array of ColorProviderOverrides objects
16608
+ * @example
16609
+ * ```ts
16610
+ * const themePalette = await fin.System.getThemePalette();
16611
+ * console.log(themePalette);
16612
+ * ```
16535
16613
  */
16536
16614
  getThemePalette(): Promise<Array<OpenFin.ThemePalette>>;
16537
16615
  }
@@ -20251,8 +20329,19 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
20251
20329
  * @returns {Promise<void>}
20252
20330
  * A promise that resolves once the request to show the download bubble
20253
20331
  * has been processed.
20332
+ * @example
20333
+ * ```js
20334
+ * const w = fin.Window.getCurrentSync();
20335
+ * const el = document.getElementById("download-bubble-button");
20336
+ * const rect = el.getBoundingClientRect();
20337
+ * const anchor = {
20338
+ * bounds: rect,
20339
+ * location: "topRight"
20340
+ * };
20341
+ * w.showDownloadBubble(anchor);
20342
+ * ```
20254
20343
  */
20255
- showDownloadBubble(options: OpenFin.Anchor): Promise<void>;
20344
+ showDownloadBubble(anchor?: OpenFin.Anchor): Promise<void>;
20256
20345
  /**
20257
20346
  * Updates the anchor used for positioning the download bubble. This allows
20258
20347
  * moving the bubble reactively—for example, in response to window resizes,
@@ -20264,8 +20353,27 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
20264
20353
  *
20265
20354
  * @returns {Promise<void>}
20266
20355
  * A promise that resolves once the anchor update has been applied.
20356
+ * @example
20357
+ * ```js
20358
+ * var w = fin.Window.getCurrentSync();
20359
+ * w.on('download-button-visibility-changed', (evt) => {
20360
+ * if (evt.visible) {
20361
+ * const el = document.getElementById("download-bubble-button");
20362
+ * //We show our button and get it's bounding rect
20363
+ * el.classList.remove("hidden");
20364
+ * const rect = el.getBoundingClientRect();
20365
+ * const anchor = {
20366
+ * bounds: rect,
20367
+ * location: "topRight"
20368
+ * }
20369
+ * w.updateDownloadBubbleAnchor(anchor);
20370
+ * } else {
20371
+ * //We hide our button
20372
+ * document.getElementById("download-bubble-button")?.classList.add("hidden");
20373
+ * }
20374
+ });
20267
20375
  */
20268
- updateDownloadBubbleAnchor(options: OpenFin.Anchor): Promise<void>;
20376
+ updateDownloadBubbleAnchor(anchor: OpenFin.Anchor): Promise<void>;
20269
20377
  }
20270
20378
 
20271
20379
  /**
@@ -1417,6 +1417,56 @@ declare type ApplicationWindowInfo = {
1417
1417
  uuid: string;
1418
1418
  };
1419
1419
 
1420
+ /**
1421
+ * `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled when the app logging feature is enabled for its application.
1422
+ *
1423
+ * Please note, `enableAppLogging` must be specified in the application manifest's `platform` or `startup_app` key for this feature to be activated.
1424
+ *
1425
+ * If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
1426
+ *
1427
+ * This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
1428
+ * controlling a url's appLogLevel, its options will be ignored.
1429
+ *
1430
+ * @default 'debug'
1431
+ *
1432
+ * @example Controlling App Logs With DefaultViewOptions + Domain Settings
1433
+ *
1434
+ * In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
1435
+ *
1436
+ * We also use domain settings to suppress logs entirely for an example URL, and to lower verbosity to 'debug' for another.
1437
+ *
1438
+ * ```ts
1439
+ * {
1440
+ * <rest of settings>
1441
+ * "platform": {
1442
+ * <rest of settings>
1443
+ * "enableAppLogging": "true",
1444
+ * "defaultViewOptions": {
1445
+ * "appLogLevel": "warn"
1446
+ * },
1447
+ * "domainSettings": {
1448
+ * "default": { <rest of settings> }
1449
+ * "rules": [
1450
+ * <rest of rules>
1451
+ * {
1452
+ * "match": ["*://*?app-logging-level=silent"],
1453
+ * "options": {
1454
+ * "appLogLevel": "silent"
1455
+ * }
1456
+ * },
1457
+ * {
1458
+ * "match": ["*://*?app-logging-level=debug"],
1459
+ * "options": {
1460
+ * "appLogLevel": "debug"
1461
+ * }
1462
+ * },
1463
+ * ]
1464
+ * }
1465
+ * }
1466
+ * }
1467
+ */
1468
+ declare type AppLogLevel = 'silent' | 'debug' | 'info' | 'warn' | 'error';
1469
+
1420
1470
  /**
1421
1471
  * @interface
1422
1472
  */
@@ -9153,6 +9203,12 @@ declare type LogInfo = {
9153
9203
  */
9154
9204
  declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
9155
9205
 
9206
+ declare type LogPath = 'debug.log' | 'app.log';
9207
+
9208
+ declare type LogTarget = {
9209
+ type: LogPath;
9210
+ };
9211
+
9156
9212
  /**
9157
9213
  * Log types
9158
9214
  *
@@ -9673,10 +9729,9 @@ declare type MutableViewOptions = {
9673
9729
  */
9674
9730
  chromiumPolicies: ChromiumPolicies;
9675
9731
  /**
9676
- * When set to `false`, disables sending application logs to RVM for this view.
9677
- * When omitted, inherits from the parent application.
9732
+ * Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
9678
9733
  */
9679
- enableAppLogging?: boolean;
9734
+ appLogLevel?: AppLogLevel;
9680
9735
  };
9681
9736
 
9682
9737
  /**
@@ -9952,11 +10007,9 @@ declare type MutableWindowOptions = {
9952
10007
  */
9953
10008
  chromiumPolicies: ChromiumPolicies;
9954
10009
  /**
9955
- * When set to `false`, disables sending application logs to RVM for this window.
9956
- * When omitted, inherits from the parent application.
9957
- *
10010
+ * Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
9958
10011
  */
9959
- enableAppLogging?: boolean;
10012
+ appLogLevel?: AppLogLevel;
9960
10013
  };
9961
10014
 
9962
10015
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -10355,6 +10408,9 @@ declare namespace OpenFin {
10355
10408
  InheritableOptions,
10356
10409
  PolicyOptions,
10357
10410
  ChromiumPolicies,
10411
+ AppLogLevel,
10412
+ LogPath,
10413
+ LogTarget,
10358
10414
  MutableWindowOptions,
10359
10415
  WorkspacePlatformOptions,
10360
10416
  WebRequestHeader,
@@ -10935,10 +10991,10 @@ declare type PerDomainSettings = {
10935
10991
  drag?: 'allow' | 'block';
10936
10992
  };
10937
10993
  /**
10938
- * When set to `false`, disables sending application logs to RVM for this window.
10939
- * When omitted, inherits from the parent application.
10994
+ * Allows the app log level of any matching content to be overriden.
10995
+ * See also {@link AppLogLevel} for more information.
10940
10996
  */
10941
- enableAppLogging?: boolean;
10997
+ appLogLevel?: AppLogLevel;
10942
10998
  };
10943
10999
 
10944
11000
  /**
@@ -13275,10 +13331,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13275
13331
  'get-current-window': VoidCall;
13276
13332
  'get-current-window-sync': VoidCall;
13277
13333
  'show-download-bubble': IdentityCall<{
13278
- options: OpenFin.Anchor;
13334
+ anchor?: OpenFin.Anchor;
13279
13335
  }, void>;
13280
13336
  'update-download-bubble-anchor': IdentityCall<{
13281
- options: OpenFin.Anchor;
13337
+ anchor: OpenFin.Anchor;
13282
13338
  }, void>;
13283
13339
  'get-external-application-info': ApiCall<OpenFin.ApplicationIdentity, OpenFin.ExternalApplicationInfo>;
13284
13340
  'external-application-wrap': VoidCall;
@@ -15693,16 +15749,14 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
15693
15749
  * Writes the passed message into both the log file and the console.
15694
15750
  * @param level The log level for the entry. Can be either "info", "warning" or "error"
15695
15751
  * @param message The log message text
15696
- * @param target.type Optional. The the log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
15752
+ * @param target The log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
15697
15753
  *
15698
15754
  * @example
15699
15755
  * ```js
15700
15756
  * fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
15701
15757
  * ```
15702
15758
  */
15703
- log(level: string, message: string, { type }?: {
15704
- type?: 'app.log' | 'debug.log';
15705
- }): Promise<void>;
15759
+ log(level: string, message: string, target?: OpenFin.LogTarget): Promise<void>;
15706
15760
  /**
15707
15761
  * Opens the passed URL in the default web browser.
15708
15762
  *
@@ -16527,11 +16581,35 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
16527
16581
  /**
16528
16582
  * Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
16529
16583
  * @param overrides - Array of ColorProviderOverrides objects
16584
+ * @example
16585
+ * ```ts
16586
+ * await fin.System.setThemePalette([
16587
+ * {
16588
+ * colorProviderKey: { colorMode: 'light' },
16589
+ * colorsMap: {
16590
+ * kColorLabelForeground: 4278190080,
16591
+ * kColorBubbleBackground: 4293980400
16592
+ * }
16593
+ * },
16594
+ * {
16595
+ * colorProviderKey: { colorMode: 'dark' },
16596
+ * colorsMap: {
16597
+ * kColorLabelForeground: 4293980400,
16598
+ * kColorBubbleBackground: 4293980400
16599
+ * }
16600
+ * }
16601
+ * ]);
16602
+ * ```
16530
16603
  */
16531
16604
  setThemePalette(themePalette: Array<OpenFin.ThemePalette>): Promise<void>;
16532
16605
  /**
16533
16606
  * Retrieves currently used color overrides
16534
16607
  * @returns Array of ColorProviderOverrides objects
16608
+ * @example
16609
+ * ```ts
16610
+ * const themePalette = await fin.System.getThemePalette();
16611
+ * console.log(themePalette);
16612
+ * ```
16535
16613
  */
16536
16614
  getThemePalette(): Promise<Array<OpenFin.ThemePalette>>;
16537
16615
  }
@@ -20251,8 +20329,19 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
20251
20329
  * @returns {Promise<void>}
20252
20330
  * A promise that resolves once the request to show the download bubble
20253
20331
  * has been processed.
20332
+ * @example
20333
+ * ```js
20334
+ * const w = fin.Window.getCurrentSync();
20335
+ * const el = document.getElementById("download-bubble-button");
20336
+ * const rect = el.getBoundingClientRect();
20337
+ * const anchor = {
20338
+ * bounds: rect,
20339
+ * location: "topRight"
20340
+ * };
20341
+ * w.showDownloadBubble(anchor);
20342
+ * ```
20254
20343
  */
20255
- showDownloadBubble(options: OpenFin.Anchor): Promise<void>;
20344
+ showDownloadBubble(anchor?: OpenFin.Anchor): Promise<void>;
20256
20345
  /**
20257
20346
  * Updates the anchor used for positioning the download bubble. This allows
20258
20347
  * moving the bubble reactively—for example, in response to window resizes,
@@ -20264,8 +20353,27 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
20264
20353
  *
20265
20354
  * @returns {Promise<void>}
20266
20355
  * A promise that resolves once the anchor update has been applied.
20356
+ * @example
20357
+ * ```js
20358
+ * var w = fin.Window.getCurrentSync();
20359
+ * w.on('download-button-visibility-changed', (evt) => {
20360
+ * if (evt.visible) {
20361
+ * const el = document.getElementById("download-bubble-button");
20362
+ * //We show our button and get it's bounding rect
20363
+ * el.classList.remove("hidden");
20364
+ * const rect = el.getBoundingClientRect();
20365
+ * const anchor = {
20366
+ * bounds: rect,
20367
+ * location: "topRight"
20368
+ * }
20369
+ * w.updateDownloadBubbleAnchor(anchor);
20370
+ * } else {
20371
+ * //We hide our button
20372
+ * document.getElementById("download-bubble-button")?.classList.add("hidden");
20373
+ * }
20374
+ });
20267
20375
  */
20268
- updateDownloadBubbleAnchor(options: OpenFin.Anchor): Promise<void>;
20376
+ updateDownloadBubbleAnchor(anchor: OpenFin.Anchor): Promise<void>;
20269
20377
  }
20270
20378
 
20271
20379
  /**
package/out/fdc3-api.d.ts CHANGED
@@ -1423,6 +1423,56 @@ declare type ApplicationWindowInfo = {
1423
1423
  uuid: string;
1424
1424
  };
1425
1425
 
1426
+ /**
1427
+ * `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled when the app logging feature is enabled for its application.
1428
+ *
1429
+ * Please note, `enableAppLogging` must be specified in the application manifest's `platform` or `startup_app` key for this feature to be activated.
1430
+ *
1431
+ * If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
1432
+ *
1433
+ * This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
1434
+ * controlling a url's appLogLevel, its options will be ignored.
1435
+ *
1436
+ * @default 'debug'
1437
+ *
1438
+ * @example Controlling App Logs With DefaultViewOptions + Domain Settings
1439
+ *
1440
+ * In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
1441
+ *
1442
+ * We also use domain settings to suppress logs entirely for an example URL, and to lower verbosity to 'debug' for another.
1443
+ *
1444
+ * ```ts
1445
+ * {
1446
+ * <rest of settings>
1447
+ * "platform": {
1448
+ * <rest of settings>
1449
+ * "enableAppLogging": "true",
1450
+ * "defaultViewOptions": {
1451
+ * "appLogLevel": "warn"
1452
+ * },
1453
+ * "domainSettings": {
1454
+ * "default": { <rest of settings> }
1455
+ * "rules": [
1456
+ * <rest of rules>
1457
+ * {
1458
+ * "match": ["*://*?app-logging-level=silent"],
1459
+ * "options": {
1460
+ * "appLogLevel": "silent"
1461
+ * }
1462
+ * },
1463
+ * {
1464
+ * "match": ["*://*?app-logging-level=debug"],
1465
+ * "options": {
1466
+ * "appLogLevel": "debug"
1467
+ * }
1468
+ * },
1469
+ * ]
1470
+ * }
1471
+ * }
1472
+ * }
1473
+ */
1474
+ declare type AppLogLevel = 'silent' | 'debug' | 'info' | 'warn' | 'error';
1475
+
1426
1476
  /**
1427
1477
  * @interface
1428
1478
  */
@@ -9462,6 +9512,12 @@ declare type LogInfo = {
9462
9512
  */
9463
9513
  declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
9464
9514
 
9515
+ declare type LogPath = 'debug.log' | 'app.log';
9516
+
9517
+ declare type LogTarget = {
9518
+ type: LogPath;
9519
+ };
9520
+
9465
9521
  /**
9466
9522
  * Log types
9467
9523
  *
@@ -9986,10 +10042,9 @@ declare type MutableViewOptions = {
9986
10042
  */
9987
10043
  chromiumPolicies: ChromiumPolicies;
9988
10044
  /**
9989
- * When set to `false`, disables sending application logs to RVM for this view.
9990
- * When omitted, inherits from the parent application.
10045
+ * Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
9991
10046
  */
9992
- enableAppLogging?: boolean;
10047
+ appLogLevel?: AppLogLevel;
9993
10048
  };
9994
10049
 
9995
10050
  /**
@@ -10273,11 +10328,9 @@ declare type MutableWindowOptions = {
10273
10328
  */
10274
10329
  chromiumPolicies: ChromiumPolicies;
10275
10330
  /**
10276
- * When set to `false`, disables sending application logs to RVM for this window.
10277
- * When omitted, inherits from the parent application.
10278
- *
10331
+ * Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
10279
10332
  */
10280
- enableAppLogging?: boolean;
10333
+ appLogLevel?: AppLogLevel;
10281
10334
  };
10282
10335
 
10283
10336
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -10689,6 +10742,9 @@ declare namespace OpenFin {
10689
10742
  InheritableOptions,
10690
10743
  PolicyOptions,
10691
10744
  ChromiumPolicies,
10745
+ AppLogLevel,
10746
+ LogPath,
10747
+ LogTarget,
10692
10748
  MutableWindowOptions,
10693
10749
  WorkspacePlatformOptions,
10694
10750
  WebRequestHeader,
@@ -11269,10 +11325,10 @@ declare type PerDomainSettings = {
11269
11325
  drag?: 'allow' | 'block';
11270
11326
  };
11271
11327
  /**
11272
- * When set to `false`, disables sending application logs to RVM for this window.
11273
- * When omitted, inherits from the parent application.
11328
+ * Allows the app log level of any matching content to be overriden.
11329
+ * See also {@link AppLogLevel} for more information.
11274
11330
  */
11275
- enableAppLogging?: boolean;
11331
+ appLogLevel?: AppLogLevel;
11276
11332
  };
11277
11333
 
11278
11334
  /**
@@ -13692,10 +13748,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13692
13748
  'get-current-window': VoidCall;
13693
13749
  'get-current-window-sync': VoidCall;
13694
13750
  'show-download-bubble': IdentityCall<{
13695
- options: OpenFin.Anchor;
13751
+ anchor?: OpenFin.Anchor;
13696
13752
  }, void>;
13697
13753
  'update-download-bubble-anchor': IdentityCall<{
13698
- options: OpenFin.Anchor;
13754
+ anchor: OpenFin.Anchor;
13699
13755
  }, void>;
13700
13756
  'get-external-application-info': ApiCall<OpenFin.ApplicationIdentity, OpenFin.ExternalApplicationInfo>;
13701
13757
  'external-application-wrap': VoidCall;
@@ -16116,16 +16172,14 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
16116
16172
  * Writes the passed message into both the log file and the console.
16117
16173
  * @param level The log level for the entry. Can be either "info", "warning" or "error"
16118
16174
  * @param message The log message text
16119
- * @param target.type Optional. The the log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
16175
+ * @param target The log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
16120
16176
  *
16121
16177
  * @example
16122
16178
  * ```js
16123
16179
  * fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
16124
16180
  * ```
16125
16181
  */
16126
- log(level: string, message: string, { type }?: {
16127
- type?: 'app.log' | 'debug.log';
16128
- }): Promise<void>;
16182
+ log(level: string, message: string, target?: OpenFin.LogTarget): Promise<void>;
16129
16183
  /**
16130
16184
  * Opens the passed URL in the default web browser.
16131
16185
  *
@@ -16950,11 +17004,35 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
16950
17004
  /**
16951
17005
  * Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
16952
17006
  * @param overrides - Array of ColorProviderOverrides objects
17007
+ * @example
17008
+ * ```ts
17009
+ * await fin.System.setThemePalette([
17010
+ * {
17011
+ * colorProviderKey: { colorMode: 'light' },
17012
+ * colorsMap: {
17013
+ * kColorLabelForeground: 4278190080,
17014
+ * kColorBubbleBackground: 4293980400
17015
+ * }
17016
+ * },
17017
+ * {
17018
+ * colorProviderKey: { colorMode: 'dark' },
17019
+ * colorsMap: {
17020
+ * kColorLabelForeground: 4293980400,
17021
+ * kColorBubbleBackground: 4293980400
17022
+ * }
17023
+ * }
17024
+ * ]);
17025
+ * ```
16953
17026
  */
16954
17027
  setThemePalette(themePalette: Array<OpenFin.ThemePalette>): Promise<void>;
16955
17028
  /**
16956
17029
  * Retrieves currently used color overrides
16957
17030
  * @returns Array of ColorProviderOverrides objects
17031
+ * @example
17032
+ * ```ts
17033
+ * const themePalette = await fin.System.getThemePalette();
17034
+ * console.log(themePalette);
17035
+ * ```
16958
17036
  */
16959
17037
  getThemePalette(): Promise<Array<OpenFin.ThemePalette>>;
16960
17038
  }
@@ -20721,8 +20799,19 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
20721
20799
  * @returns {Promise<void>}
20722
20800
  * A promise that resolves once the request to show the download bubble
20723
20801
  * has been processed.
20802
+ * @example
20803
+ * ```js
20804
+ * const w = fin.Window.getCurrentSync();
20805
+ * const el = document.getElementById("download-bubble-button");
20806
+ * const rect = el.getBoundingClientRect();
20807
+ * const anchor = {
20808
+ * bounds: rect,
20809
+ * location: "topRight"
20810
+ * };
20811
+ * w.showDownloadBubble(anchor);
20812
+ * ```
20724
20813
  */
20725
- showDownloadBubble(options: OpenFin.Anchor): Promise<void>;
20814
+ showDownloadBubble(anchor?: OpenFin.Anchor): Promise<void>;
20726
20815
  /**
20727
20816
  * Updates the anchor used for positioning the download bubble. This allows
20728
20817
  * moving the bubble reactively—for example, in response to window resizes,
@@ -20734,8 +20823,27 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
20734
20823
  *
20735
20824
  * @returns {Promise<void>}
20736
20825
  * A promise that resolves once the anchor update has been applied.
20826
+ * @example
20827
+ * ```js
20828
+ * var w = fin.Window.getCurrentSync();
20829
+ * w.on('download-button-visibility-changed', (evt) => {
20830
+ * if (evt.visible) {
20831
+ * const el = document.getElementById("download-bubble-button");
20832
+ * //We show our button and get it's bounding rect
20833
+ * el.classList.remove("hidden");
20834
+ * const rect = el.getBoundingClientRect();
20835
+ * const anchor = {
20836
+ * bounds: rect,
20837
+ * location: "topRight"
20838
+ * }
20839
+ * w.updateDownloadBubbleAnchor(anchor);
20840
+ * } else {
20841
+ * //We hide our button
20842
+ * document.getElementById("download-bubble-button")?.classList.add("hidden");
20843
+ * }
20844
+ });
20737
20845
  */
20738
- updateDownloadBubbleAnchor(options: OpenFin.Anchor): Promise<void>;
20846
+ updateDownloadBubbleAnchor(anchor: OpenFin.Anchor): Promise<void>;
20739
20847
  }
20740
20848
 
20741
20849
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/fdc3-api",
3
- "version": "44.100.57",
3
+ "version": "44.100.58",
4
4
  "description": "OpenFin fdc3 module utilities and types.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,