@openfin/fdc3-api 45.100.51 → 45.100.55
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/fdc3-api-alpha.d.ts +135 -61
- package/out/fdc3-api-beta.d.ts +135 -61
- package/out/fdc3-api-public.d.ts +135 -61
- package/out/fdc3-api.d.ts +135 -61
- package/out/fdc3-api.js +22 -66
- package/package.json +1 -1
package/out/fdc3-api.js
CHANGED
|
@@ -1294,9 +1294,7 @@ class FDC3ModuleBase {
|
|
|
1294
1294
|
* @static
|
|
1295
1295
|
*/
|
|
1296
1296
|
async broadcast(context) {
|
|
1297
|
-
this.wire.
|
|
1298
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1299
|
-
});
|
|
1297
|
+
this.wire.recordAnalytic('fdc3-broadcast');
|
|
1300
1298
|
return this.client.setContext(context);
|
|
1301
1299
|
}
|
|
1302
1300
|
/**
|
|
@@ -1307,9 +1305,7 @@ class FDC3ModuleBase {
|
|
|
1307
1305
|
* @tutorial fdc3.open
|
|
1308
1306
|
*/
|
|
1309
1307
|
async _open(app, context) {
|
|
1310
|
-
this.wire.
|
|
1311
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1312
|
-
});
|
|
1308
|
+
this.wire.recordAnalytic('fdc3-open');
|
|
1313
1309
|
try {
|
|
1314
1310
|
return await InteropClient.ferryFdc3Call(this.client, 'fdc3Open', { app, context });
|
|
1315
1311
|
}
|
|
@@ -1333,9 +1329,7 @@ class FDC3ModuleBase {
|
|
|
1333
1329
|
* @tutorial fdc3.getOrCreateChannel
|
|
1334
1330
|
*/
|
|
1335
1331
|
async getOrCreateChannel(channelId, fdc3Factory) {
|
|
1336
|
-
this.wire.
|
|
1337
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1338
|
-
});
|
|
1332
|
+
this.wire.recordAnalytic('fdc3-get-or-create-channel');
|
|
1339
1333
|
const hasChannelIdBeenUsed = await InteropClient.ferryFdc3Call(this.client, 'isIdUsedByPrivateChannel', {
|
|
1340
1334
|
channelId
|
|
1341
1335
|
});
|
|
@@ -1363,9 +1357,7 @@ class FDC3ModuleBase {
|
|
|
1363
1357
|
* @static
|
|
1364
1358
|
*/
|
|
1365
1359
|
async getSystemChannels() {
|
|
1366
|
-
this.wire.
|
|
1367
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1368
|
-
});
|
|
1360
|
+
this.wire.recordAnalytic('fdc3-get-system-channels');
|
|
1369
1361
|
return this._getChannels();
|
|
1370
1362
|
}
|
|
1371
1363
|
/**
|
|
@@ -1380,9 +1372,7 @@ class FDC3ModuleBase {
|
|
|
1380
1372
|
* @static
|
|
1381
1373
|
*/
|
|
1382
1374
|
async joinChannel(channelId) {
|
|
1383
|
-
this.wire.
|
|
1384
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1385
|
-
});
|
|
1375
|
+
this.wire.recordAnalytic('fdc3-join-channel');
|
|
1386
1376
|
try {
|
|
1387
1377
|
return await this.client.joinContextGroup(channelId);
|
|
1388
1378
|
}
|
|
@@ -1405,9 +1395,7 @@ class FDC3ModuleBase {
|
|
|
1405
1395
|
* @tutorial fdc3.getCurrentChannel
|
|
1406
1396
|
*/
|
|
1407
1397
|
async getCurrentChannel() {
|
|
1408
|
-
this.wire.
|
|
1409
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1410
|
-
});
|
|
1398
|
+
this.wire.recordAnalytic('fdc3-get-current-channel');
|
|
1411
1399
|
const currentContextGroupInfo = await this.getCurrentContextGroupInfo();
|
|
1412
1400
|
if (!currentContextGroupInfo) {
|
|
1413
1401
|
return null;
|
|
@@ -1422,9 +1410,7 @@ class FDC3ModuleBase {
|
|
|
1422
1410
|
* @static
|
|
1423
1411
|
*/
|
|
1424
1412
|
async leaveCurrentChannel() {
|
|
1425
|
-
this.wire.
|
|
1426
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1427
|
-
});
|
|
1413
|
+
this.wire.recordAnalytic('fdc3-leave-current-channel');
|
|
1428
1414
|
return this.client.removeFromContextGroup();
|
|
1429
1415
|
}
|
|
1430
1416
|
// utils
|
|
@@ -1544,9 +1530,7 @@ class Fdc3Module extends FDC3ModuleBase {
|
|
|
1544
1530
|
*/
|
|
1545
1531
|
// @ts-expect-error TODO [CORE-1524]
|
|
1546
1532
|
addContextListener(contextType, handler) {
|
|
1547
|
-
this.wire.
|
|
1548
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1549
|
-
});
|
|
1533
|
+
this.wire.recordAnalytic('fdc3-add-context-listener');
|
|
1550
1534
|
let listener;
|
|
1551
1535
|
if (typeof contextType === 'function') {
|
|
1552
1536
|
console.warn('addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)');
|
|
@@ -1569,9 +1553,7 @@ class Fdc3Module extends FDC3ModuleBase {
|
|
|
1569
1553
|
* @static
|
|
1570
1554
|
*/
|
|
1571
1555
|
addIntentListener(intent, handler) {
|
|
1572
|
-
this.wire.
|
|
1573
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1574
|
-
});
|
|
1556
|
+
this.wire.recordAnalytic('fdc3-add-intent-listener');
|
|
1575
1557
|
const contextHandler = (raisedIntent) => {
|
|
1576
1558
|
const { context, metadata: intentMetadata } = raisedIntent;
|
|
1577
1559
|
const { metadata } = context;
|
|
@@ -1599,9 +1581,7 @@ class Fdc3Module extends FDC3ModuleBase {
|
|
|
1599
1581
|
* @static
|
|
1600
1582
|
*/
|
|
1601
1583
|
async raiseIntent(intent, context, app) {
|
|
1602
|
-
this.wire.
|
|
1603
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1604
|
-
});
|
|
1584
|
+
this.wire.recordAnalytic('fdc3-raise-intent');
|
|
1605
1585
|
const intentObj = app
|
|
1606
1586
|
? { name: intent, context, metadata: { target: app } }
|
|
1607
1587
|
: { name: intent, context };
|
|
@@ -1621,9 +1601,7 @@ class Fdc3Module extends FDC3ModuleBase {
|
|
|
1621
1601
|
* @tutorial fdc3.findIntent
|
|
1622
1602
|
*/
|
|
1623
1603
|
async findIntent(intent, context) {
|
|
1624
|
-
this.wire.
|
|
1625
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1626
|
-
});
|
|
1604
|
+
this.wire.recordAnalytic('fdc3-find-intent');
|
|
1627
1605
|
try {
|
|
1628
1606
|
return await this.client.getInfoForIntent({ name: intent, context });
|
|
1629
1607
|
}
|
|
@@ -1639,9 +1617,7 @@ class Fdc3Module extends FDC3ModuleBase {
|
|
|
1639
1617
|
* @tutorial fdc3.findIntentsByContext
|
|
1640
1618
|
*/
|
|
1641
1619
|
async findIntentsByContext(context) {
|
|
1642
|
-
this.wire.
|
|
1643
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1644
|
-
});
|
|
1620
|
+
this.wire.recordAnalytic('fdc3-find-intents-by-context');
|
|
1645
1621
|
try {
|
|
1646
1622
|
return await this.client.getInfoForIntentsByContext(context);
|
|
1647
1623
|
}
|
|
@@ -1658,9 +1634,7 @@ class Fdc3Module extends FDC3ModuleBase {
|
|
|
1658
1634
|
* @tutorial fdc3.raiseIntentForContext
|
|
1659
1635
|
*/
|
|
1660
1636
|
async raiseIntentForContext(context, app) {
|
|
1661
|
-
this.wire.
|
|
1662
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1663
|
-
});
|
|
1637
|
+
this.wire.recordAnalytic('fdc3-raise-intent-for-context');
|
|
1664
1638
|
try {
|
|
1665
1639
|
return await this.client.fireIntentForContext({ ...context, metadata: { target: app } });
|
|
1666
1640
|
}
|
|
@@ -1684,9 +1658,7 @@ class Fdc3Module extends FDC3ModuleBase {
|
|
|
1684
1658
|
* @tutorial fdc3.getInfo
|
|
1685
1659
|
*/
|
|
1686
1660
|
getInfo() {
|
|
1687
|
-
this.wire.
|
|
1688
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1689
|
-
});
|
|
1661
|
+
this.wire.recordAnalytic('fdc3-get-info');
|
|
1690
1662
|
const version = this.wire.environment.getAdapterVersionSync();
|
|
1691
1663
|
return {
|
|
1692
1664
|
providerVersion: version,
|
|
@@ -1753,9 +1725,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
|
|
|
1753
1725
|
* @tutorial fdc3v2.findInstances
|
|
1754
1726
|
*/
|
|
1755
1727
|
async findInstances(app) {
|
|
1756
|
-
this.wire.
|
|
1757
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1758
|
-
});
|
|
1728
|
+
this.wire.recordAnalytic('fdc3-find-instances');
|
|
1759
1729
|
try {
|
|
1760
1730
|
return await InteropClient.ferryFdc3Call(this.client, 'fdc3FindInstances', app);
|
|
1761
1731
|
}
|
|
@@ -1771,9 +1741,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
|
|
|
1771
1741
|
* @tutorial fdc3v2.getAppMetadata
|
|
1772
1742
|
*/
|
|
1773
1743
|
async getAppMetadata(app) {
|
|
1774
|
-
this.wire.
|
|
1775
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1776
|
-
});
|
|
1744
|
+
this.wire.recordAnalytic('fdc3-get-app-metadata');
|
|
1777
1745
|
try {
|
|
1778
1746
|
return await InteropClient.ferryFdc3Call(this.client, 'fdc3GetAppMetadata', app);
|
|
1779
1747
|
}
|
|
@@ -1791,9 +1759,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
|
|
|
1791
1759
|
*/
|
|
1792
1760
|
// @ts-expect-error TODO [CORE-1524]
|
|
1793
1761
|
async addContextListener(contextType, handler) {
|
|
1794
|
-
this.wire.
|
|
1795
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1796
|
-
});
|
|
1762
|
+
this.wire.recordAnalytic('fdc3-add-context-listener');
|
|
1797
1763
|
// The FDC3 ContextHandler only expects the context and optional ContextMetadata, so we wrap the handler
|
|
1798
1764
|
// here so it only gets passed these parameters
|
|
1799
1765
|
const getWrappedHandler = (handlerToWrap) => {
|
|
@@ -1822,9 +1788,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
|
|
|
1822
1788
|
* @tutorial fdc3.findIntent
|
|
1823
1789
|
*/
|
|
1824
1790
|
async findIntent(intent, context, resultType) {
|
|
1825
|
-
this.wire.
|
|
1826
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1827
|
-
});
|
|
1791
|
+
this.wire.recordAnalytic('fdc3-find-intent');
|
|
1828
1792
|
try {
|
|
1829
1793
|
return await this.client.getInfoForIntent({ name: intent, context, metadata: { resultType } });
|
|
1830
1794
|
}
|
|
@@ -1841,9 +1805,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
|
|
|
1841
1805
|
* @tutorial fdc3v2.findIntentsByContext
|
|
1842
1806
|
*/
|
|
1843
1807
|
async findIntentsByContext(context, resultType) {
|
|
1844
|
-
this.wire.
|
|
1845
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1846
|
-
});
|
|
1808
|
+
this.wire.recordAnalytic('fdc3-find-intents-by-context');
|
|
1847
1809
|
const payload = resultType ? { context, metadata: { resultType } } : context;
|
|
1848
1810
|
try {
|
|
1849
1811
|
return await InteropClient.ferryFdc3Call(this.client, 'fdc3v2FindIntentsByContext', payload);
|
|
@@ -1862,9 +1824,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
|
|
|
1862
1824
|
* @tutorial fdc3v2.raiseIntent
|
|
1863
1825
|
*/
|
|
1864
1826
|
async raiseIntent(intent, context, app) {
|
|
1865
|
-
this.wire.
|
|
1866
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1867
|
-
});
|
|
1827
|
+
this.wire.recordAnalytic('fdc3-raise-intent');
|
|
1868
1828
|
try {
|
|
1869
1829
|
if (typeof app === 'string') {
|
|
1870
1830
|
console.warn('Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).');
|
|
@@ -1885,9 +1845,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
|
|
|
1885
1845
|
*/
|
|
1886
1846
|
async raiseIntentForContext(context, app) {
|
|
1887
1847
|
// TODO: We have to do the same thing we do for raiseIntent here as well.
|
|
1888
|
-
this.wire.
|
|
1889
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1890
|
-
});
|
|
1848
|
+
this.wire.recordAnalytic('fdc3-raise-intent-for-context');
|
|
1891
1849
|
try {
|
|
1892
1850
|
if (typeof app === 'string') {
|
|
1893
1851
|
console.warn('Passing a string as the app parameter is deprecated, please use an AppIdentifier ({ appId: string; instanceId?: string }).');
|
|
@@ -1907,9 +1865,7 @@ class Fdc3Module2 extends FDC3ModuleBase {
|
|
|
1907
1865
|
* @tutorial fdc3.addIntentListener
|
|
1908
1866
|
*/
|
|
1909
1867
|
async addIntentListener(intent, handler) {
|
|
1910
|
-
this.wire.
|
|
1911
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
1912
|
-
});
|
|
1868
|
+
this.wire.recordAnalytic('fdc3-add-intent-listener');
|
|
1913
1869
|
if (typeof intent !== 'string') {
|
|
1914
1870
|
throw new Error('First argument must be an Intent name');
|
|
1915
1871
|
}
|