@acrobits/ipc-sdk 0.8.0-alpha.0 → 0.8.0-alpha.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/docs/classes/IPCManager.html +7 -8
- package/docs/interfaces/UriContactItem.html +3 -3
- package/docs/types/HostType.html +1 -1
- package/docs/types/IpcProtocolVersion.html +1 -1
- package/lib/index.d.ts +3 -4
- package/lib/ipc-sdk.js +50 -59
- package/lib/ipc-sdk.js.map +1 -1
- package/lib/ipc-sdk.umd.cjs +2 -2
- package/lib/ipc-sdk.umd.cjs.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +7 -7
package/lib/ipc-sdk.js
CHANGED
|
@@ -96,8 +96,8 @@ var I = function() {
|
|
|
96
96
|
var u = a.value;
|
|
97
97
|
u.remove(this);
|
|
98
98
|
}
|
|
99
|
-
} catch (
|
|
100
|
-
t = { error:
|
|
99
|
+
} catch (p) {
|
|
100
|
+
t = { error: p };
|
|
101
101
|
} finally {
|
|
102
102
|
try {
|
|
103
103
|
a && !a.done && (e = c.return) && e.call(c);
|
|
@@ -112,8 +112,8 @@ var I = function() {
|
|
|
112
112
|
if (m(v))
|
|
113
113
|
try {
|
|
114
114
|
v();
|
|
115
|
-
} catch (
|
|
116
|
-
s =
|
|
115
|
+
} catch (p) {
|
|
116
|
+
s = p instanceof j ? p.errors : [p];
|
|
117
117
|
}
|
|
118
118
|
var g = this._finalizers;
|
|
119
119
|
if (g) {
|
|
@@ -123,12 +123,12 @@ var I = function() {
|
|
|
123
123
|
var V = w.value;
|
|
124
124
|
try {
|
|
125
125
|
ie(V);
|
|
126
|
-
} catch (
|
|
127
|
-
s = s ?? [],
|
|
126
|
+
} catch (p) {
|
|
127
|
+
s = s ?? [], p instanceof j ? s = F(F([], $(s)), $(p.errors)) : s.push(p);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
} catch (
|
|
131
|
-
r = { error:
|
|
130
|
+
} catch (p) {
|
|
131
|
+
r = { error: p };
|
|
132
132
|
} finally {
|
|
133
133
|
try {
|
|
134
134
|
w && !w.done && (i = E.return) && i.call(E);
|
|
@@ -857,8 +857,8 @@ var te = function() {
|
|
|
857
857
|
var u = a.value;
|
|
858
858
|
u.remove(this);
|
|
859
859
|
}
|
|
860
|
-
} catch (
|
|
861
|
-
t = { error:
|
|
860
|
+
} catch (p) {
|
|
861
|
+
t = { error: p };
|
|
862
862
|
} finally {
|
|
863
863
|
try {
|
|
864
864
|
a && !a.done && (e = c.return) && e.call(c);
|
|
@@ -873,8 +873,8 @@ var te = function() {
|
|
|
873
873
|
if (S(v))
|
|
874
874
|
try {
|
|
875
875
|
v();
|
|
876
|
-
} catch (
|
|
877
|
-
s =
|
|
876
|
+
} catch (p) {
|
|
877
|
+
s = p instanceof H ? p.errors : [p];
|
|
878
878
|
}
|
|
879
879
|
var g = this._finalizers;
|
|
880
880
|
if (g) {
|
|
@@ -884,12 +884,12 @@ var te = function() {
|
|
|
884
884
|
var V = w.value;
|
|
885
885
|
try {
|
|
886
886
|
pe(V);
|
|
887
|
-
} catch (
|
|
888
|
-
s = s ?? [],
|
|
887
|
+
} catch (p) {
|
|
888
|
+
s = s ?? [], p instanceof H ? s = J(J([], K(s)), K(p.errors)) : s.push(p);
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
|
-
} catch (
|
|
892
|
-
r = { error:
|
|
891
|
+
} catch (p) {
|
|
892
|
+
r = { error: p };
|
|
893
893
|
} finally {
|
|
894
894
|
try {
|
|
895
895
|
w && !w.done && (i = E.return) && i.call(E);
|
|
@@ -1210,7 +1210,7 @@ function y(n) {
|
|
|
1210
1210
|
}));
|
|
1211
1211
|
});
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1213
|
+
function f(n, t) {
|
|
1214
1214
|
return R(function(e, r) {
|
|
1215
1215
|
var i = 0;
|
|
1216
1216
|
e.subscribe(P(r, function(s) {
|
|
@@ -1337,7 +1337,7 @@ class xt {
|
|
|
1337
1337
|
const t = "HELLO", e = this.createMessage(t);
|
|
1338
1338
|
e.protocolVersions = this.supportedVersions, this.logCreated(t, e);
|
|
1339
1339
|
const r = this.incomingMessages$.pipe(
|
|
1340
|
-
|
|
1340
|
+
f((i) => i.type === t && i.replyTo === e.id),
|
|
1341
1341
|
h((i) => i),
|
|
1342
1342
|
d(this.logReceived(t)),
|
|
1343
1343
|
h((i) => {
|
|
@@ -1367,7 +1367,7 @@ class xt {
|
|
|
1367
1367
|
const t = "TOKEN", e = this.createMessage(t);
|
|
1368
1368
|
this.logCreated(t, e);
|
|
1369
1369
|
const r = this.incomingMessages$.pipe(
|
|
1370
|
-
|
|
1370
|
+
f((i) => i.type === t && i.replyTo === e.id),
|
|
1371
1371
|
h((i) => i),
|
|
1372
1372
|
d(this.logReceived(t)),
|
|
1373
1373
|
y(1)
|
|
@@ -1450,7 +1450,7 @@ class xt {
|
|
|
1450
1450
|
throw new l(this.currentContext);
|
|
1451
1451
|
const t = "JOIN ROOM";
|
|
1452
1452
|
return this.incomingMessages$.pipe(
|
|
1453
|
-
|
|
1453
|
+
f((e) => e.type === t && e.target === "client"),
|
|
1454
1454
|
h((e) => e),
|
|
1455
1455
|
d(this.logReceived(t)),
|
|
1456
1456
|
h((e) => e)
|
|
@@ -1486,7 +1486,7 @@ class xt {
|
|
|
1486
1486
|
throw new l(this.currentContext);
|
|
1487
1487
|
const t = "LEAVE ROOM";
|
|
1488
1488
|
return this.incomingMessages$.pipe(
|
|
1489
|
-
|
|
1489
|
+
f((e) => e.type === t && e.target === "client"),
|
|
1490
1490
|
h((e) => e),
|
|
1491
1491
|
d(this.logReceived(t)),
|
|
1492
1492
|
h((e) => e)
|
|
@@ -1523,7 +1523,7 @@ class xt {
|
|
|
1523
1523
|
throw new l(this.currentContext);
|
|
1524
1524
|
const t = "CONFIG";
|
|
1525
1525
|
return this.incomingMessages$.pipe(
|
|
1526
|
-
|
|
1526
|
+
f((e) => e.type === t && e.target === "client"),
|
|
1527
1527
|
h((e) => e),
|
|
1528
1528
|
d(this.logReceived(t)),
|
|
1529
1529
|
h((e) => ({
|
|
@@ -1546,7 +1546,7 @@ class xt {
|
|
|
1546
1546
|
const e = "SCREENSHARE SOURCE", r = this.createMessage(e);
|
|
1547
1547
|
r.sourceTypes = t, this.logCreated(e, r);
|
|
1548
1548
|
const i = this.incomingMessages$.pipe(
|
|
1549
|
-
|
|
1549
|
+
f((s) => s.type === e && s.replyTo === r.id),
|
|
1550
1550
|
h((s) => s),
|
|
1551
1551
|
d(this.logReceived(e)),
|
|
1552
1552
|
h((s) => s),
|
|
@@ -1560,7 +1560,7 @@ class xt {
|
|
|
1560
1560
|
const i = "LAYOUT CHANGE";
|
|
1561
1561
|
let s, o;
|
|
1562
1562
|
if (e && r ? (s = this.createMessage(i, !1, r), s.result = e) : (s = this.createMessage(i), o = this.incomingMessages$.pipe(
|
|
1563
|
-
|
|
1563
|
+
f((c) => c.type === i && c.replyTo === s.id),
|
|
1564
1564
|
h((c) => c),
|
|
1565
1565
|
d(this.logReceived(i)),
|
|
1566
1566
|
h((c) => c),
|
|
@@ -1604,7 +1604,7 @@ class xt {
|
|
|
1604
1604
|
throw new l(this.currentContext);
|
|
1605
1605
|
const t = "LAYOUT CHANGE";
|
|
1606
1606
|
return this.incomingMessages$.pipe(
|
|
1607
|
-
|
|
1607
|
+
f((e) => e.type === t && e.target === "client" && e.replyTo === null),
|
|
1608
1608
|
h((e) => e),
|
|
1609
1609
|
d(this.logReceived(t)),
|
|
1610
1610
|
h((e) => e)
|
|
@@ -1617,7 +1617,7 @@ class xt {
|
|
|
1617
1617
|
const e = "OAUTH TOKEN", r = this.createMessage(e);
|
|
1618
1618
|
r.providerTypes = t, this.logCreated(e, r);
|
|
1619
1619
|
const i = this.incomingMessages$.pipe(
|
|
1620
|
-
|
|
1620
|
+
f((s) => s.type === e && s.replyTo === r.id),
|
|
1621
1621
|
h((s) => s),
|
|
1622
1622
|
d(this.logReceived(e)),
|
|
1623
1623
|
y(1)
|
|
@@ -1648,7 +1648,7 @@ class xt {
|
|
|
1648
1648
|
const s = "SELECT CONTACTS", o = this.createMessage(s, !0);
|
|
1649
1649
|
o.streamType = e, o.streamId = t, o.contactType = r, o.currentContacts = i, this.logCreated(s, o);
|
|
1650
1650
|
const c = this.incomingMessages$.pipe(
|
|
1651
|
-
|
|
1651
|
+
f((a) => a.type === s && a.replyTo === o.id),
|
|
1652
1652
|
d(this.logReceived(s)),
|
|
1653
1653
|
// validate if `streamId` is the same as we sent
|
|
1654
1654
|
h((a) => {
|
|
@@ -1677,7 +1677,7 @@ class xt {
|
|
|
1677
1677
|
const e = "MATCH CONTACTS", r = this.createMessage(e);
|
|
1678
1678
|
r.contacts = [...t], this.logCreated(e, r);
|
|
1679
1679
|
const i = this.incomingMessages$.pipe(
|
|
1680
|
-
|
|
1680
|
+
f((s) => s.type === e && s.replyTo === r.id),
|
|
1681
1681
|
d(this.logReceived(e)),
|
|
1682
1682
|
h((s) => s),
|
|
1683
1683
|
y(1)
|
|
@@ -1715,7 +1715,7 @@ class xt {
|
|
|
1715
1715
|
throw new l(this.currentContext);
|
|
1716
1716
|
const t = "PUSH MESSAGE";
|
|
1717
1717
|
return this.incomingMessages$.pipe(
|
|
1718
|
-
|
|
1718
|
+
f((e) => e.type === t && e.target === "client"),
|
|
1719
1719
|
h((e) => e),
|
|
1720
1720
|
d(this.logReceived(t))
|
|
1721
1721
|
);
|
|
@@ -1735,7 +1735,7 @@ class xt {
|
|
|
1735
1735
|
const t = "PUSH TOKEN", e = this.createMessage(t);
|
|
1736
1736
|
this.logCreated(t, e);
|
|
1737
1737
|
const r = this.incomingMessages$.pipe(
|
|
1738
|
-
|
|
1738
|
+
f((i) => i.type === t && i.replyTo === e.id),
|
|
1739
1739
|
d(this.logReceived(t)),
|
|
1740
1740
|
h((i) => i),
|
|
1741
1741
|
y(1)
|
|
@@ -1774,7 +1774,7 @@ class xt {
|
|
|
1774
1774
|
throw new l(this.currentContext);
|
|
1775
1775
|
const t = "PUSH TOKEN";
|
|
1776
1776
|
return this.incomingMessages$.pipe(
|
|
1777
|
-
|
|
1777
|
+
f(
|
|
1778
1778
|
(e) => e.type === t && e.target === "client" && e.replyTo === null && e.expectReply === !1
|
|
1779
1779
|
),
|
|
1780
1780
|
h((e) => {
|
|
@@ -1798,7 +1798,7 @@ class xt {
|
|
|
1798
1798
|
throw new l(this.currentContext);
|
|
1799
1799
|
const t = "BADGE QUERY";
|
|
1800
1800
|
return this.incomingMessages$.pipe(
|
|
1801
|
-
|
|
1801
|
+
f((e) => e.type === t && e.target === "client"),
|
|
1802
1802
|
h((e) => e),
|
|
1803
1803
|
d(this.logReceived(t))
|
|
1804
1804
|
);
|
|
@@ -1856,7 +1856,7 @@ class xt {
|
|
|
1856
1856
|
throw new l(this.currentContext);
|
|
1857
1857
|
const t = "LIFECYCLE";
|
|
1858
1858
|
return this.incomingMessages$.pipe(
|
|
1859
|
-
|
|
1859
|
+
f((e) => e.type === t && e.target === "client"),
|
|
1860
1860
|
h((e) => e),
|
|
1861
1861
|
d(this.logReceived(t))
|
|
1862
1862
|
);
|
|
@@ -1896,7 +1896,7 @@ class xt {
|
|
|
1896
1896
|
throw new l(this.currentContext);
|
|
1897
1897
|
const t = "REQUEST LOGS";
|
|
1898
1898
|
return this.incomingMessages$.pipe(
|
|
1899
|
-
|
|
1899
|
+
f((e) => e.type === t && e.target === "client"),
|
|
1900
1900
|
h((e) => e),
|
|
1901
1901
|
d(this.logReceived(t))
|
|
1902
1902
|
);
|
|
@@ -1952,7 +1952,7 @@ class xt {
|
|
|
1952
1952
|
}
|
|
1953
1953
|
i && (o.shouldOpen = i), this.logCreated(s, o);
|
|
1954
1954
|
const c = this.incomingMessages$.pipe(
|
|
1955
|
-
|
|
1955
|
+
f((a) => a.type === s && a.replyTo === o.id),
|
|
1956
1956
|
d(this.logReceived(s)),
|
|
1957
1957
|
h((a) => a),
|
|
1958
1958
|
y(1)
|
|
@@ -1992,7 +1992,7 @@ class xt {
|
|
|
1992
1992
|
throw new l(this.currentContext);
|
|
1993
1993
|
const t = "FILE TRANSFER";
|
|
1994
1994
|
return this.incomingMessages$.pipe(
|
|
1995
|
-
|
|
1995
|
+
f(
|
|
1996
1996
|
(e) => e.type === t && e.target === "client" && e.replyTo === null
|
|
1997
1997
|
),
|
|
1998
1998
|
h((e) => (e.fileHash = e.fileHash.toLowerCase(), e)),
|
|
@@ -2055,7 +2055,7 @@ class xt {
|
|
|
2055
2055
|
this.logCreated(s, o);
|
|
2056
2056
|
let c = 0;
|
|
2057
2057
|
const a = this.incomingMessages$.pipe(
|
|
2058
|
-
|
|
2058
|
+
f(
|
|
2059
2059
|
(u) => u.type === s && u.replyTo === o.id
|
|
2060
2060
|
),
|
|
2061
2061
|
d(this.logReceived(s)),
|
|
@@ -2101,7 +2101,7 @@ class xt {
|
|
|
2101
2101
|
}
|
|
2102
2102
|
this.logCreated(o, c);
|
|
2103
2103
|
const a = this.incomingMessages$.pipe(
|
|
2104
|
-
|
|
2104
|
+
f(
|
|
2105
2105
|
(u) => u.type === o && u.replyTo === c.id
|
|
2106
2106
|
),
|
|
2107
2107
|
h((u) => {
|
|
@@ -2136,7 +2136,7 @@ class xt {
|
|
|
2136
2136
|
const s = "FILE DOWNLOAD", o = this.createMessage(s);
|
|
2137
2137
|
o.url = t, o.key = e, o.fileName = r, o.mimeType = i, this.logCreated(s, o);
|
|
2138
2138
|
const c = this.incomingMessages$.pipe(
|
|
2139
|
-
|
|
2139
|
+
f((a) => a.type === s && a.replyTo === o.id),
|
|
2140
2140
|
d(this.logReceived(s)),
|
|
2141
2141
|
h((a) => a),
|
|
2142
2142
|
y(1)
|
|
@@ -2160,15 +2160,8 @@ class xt {
|
|
|
2160
2160
|
sendFileOpenMessage(t, e) {
|
|
2161
2161
|
if (!this.isEmbedded())
|
|
2162
2162
|
throw new l(this.currentContext);
|
|
2163
|
-
const r = "FILE OPEN", i = this.createMessage(r, !
|
|
2164
|
-
i.hash = t.toLowerCase(), i.streamId = e, this.logCreated(r, i);
|
|
2165
|
-
const s = this.incomingMessages$.pipe(
|
|
2166
|
-
p((o) => o.type === r && o.replyTo === i.id),
|
|
2167
|
-
d(this.logReceived(r)),
|
|
2168
|
-
h((o) => o),
|
|
2169
|
-
y(1)
|
|
2170
|
-
);
|
|
2171
|
-
return this.port2.postMessage(i), this.logSent(r, i), s;
|
|
2163
|
+
const r = "FILE OPEN", i = this.createMessage(r, !1);
|
|
2164
|
+
i.hash = t.toLowerCase(), i.streamId = e, this.logCreated(r, i), this.port2.postMessage(i), this.logSent(r, i);
|
|
2172
2165
|
}
|
|
2173
2166
|
/**
|
|
2174
2167
|
* Sends a {@link FileRemoveMessage} to the Host app, to request removal of a file from the
|
|
@@ -2191,7 +2184,7 @@ class xt {
|
|
|
2191
2184
|
const r = "FILE REMOVE", i = this.createMessage(r, !0);
|
|
2192
2185
|
i.hash = t.toLowerCase(), i.streamId = e, this.logCreated(r, i);
|
|
2193
2186
|
const s = this.incomingMessages$.pipe(
|
|
2194
|
-
|
|
2187
|
+
f((o) => o.type === r && o.replyTo === i.id),
|
|
2195
2188
|
d(this.logReceived(r)),
|
|
2196
2189
|
h((o) => o),
|
|
2197
2190
|
y(1)
|
|
@@ -2241,14 +2234,13 @@ class xt {
|
|
|
2241
2234
|
* Sends a {@link SipCallMessage} to the Host app to initiate a SIP call between the current user
|
|
2242
2235
|
* and the callee.
|
|
2243
2236
|
*
|
|
2244
|
-
* @param
|
|
2245
|
-
* @param cloudUsername - _Optional_. The cloud username of the callee
|
|
2237
|
+
* @param contact - The {@link ContactItem} for the callee.
|
|
2246
2238
|
*/
|
|
2247
|
-
sendSipCallMessage(t
|
|
2239
|
+
sendSipCallMessage(t) {
|
|
2248
2240
|
if (!this.isEmbedded())
|
|
2249
2241
|
throw new l(this.currentContext);
|
|
2250
|
-
const
|
|
2251
|
-
|
|
2242
|
+
const e = "SIP CALL", r = this.createMessage(e, !1);
|
|
2243
|
+
r.contact = t, this.logCreated(e, r), this.port2.postMessage(r), this.logSent(e, r);
|
|
2252
2244
|
}
|
|
2253
2245
|
/**
|
|
2254
2246
|
* Checks if the client app is either embedded in an iframe or in a native webview.
|
|
@@ -2490,13 +2482,12 @@ class It {
|
|
|
2490
2482
|
this.logger.debug("Opening URL: ", t), this.helper.openUrl(t, e);
|
|
2491
2483
|
}
|
|
2492
2484
|
/**
|
|
2493
|
-
* Initiates a SIP call to the given
|
|
2485
|
+
* Initiates a SIP call to the given {@link ContactItem}.
|
|
2494
2486
|
*
|
|
2495
|
-
* @param
|
|
2496
|
-
* @param cloudUsername - _Optional_. The cloud username of the callee.
|
|
2487
|
+
* @param contact - {@link ContactItem} for the callee.
|
|
2497
2488
|
*/
|
|
2498
|
-
sipCall(t
|
|
2499
|
-
this.logger.debug("Initiating SIP Call: ", t
|
|
2489
|
+
sipCall(t) {
|
|
2490
|
+
this.logger.debug("Initiating SIP Call: ", t), this.helper.sendSipCallMessage(t);
|
|
2500
2491
|
}
|
|
2501
2492
|
/**
|
|
2502
2493
|
* Registers a callback to be invoked when a {@link IPCEvents.BadgeQuery} is received.
|