@beam3_dev/api_module 0.0.153 → 0.0.154
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/dist/wb3Api.js +76 -70
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +4 -4
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -213,8 +213,8 @@ function Te(e, t, n) {
|
|
|
213
213
|
},
|
|
214
214
|
onComplete(r, o, i) {
|
|
215
215
|
const c = JSON.parse(r), d = c.data.map((p) => {
|
|
216
|
-
const l = p.attributes.name,
|
|
217
|
-
return { name: l, id:
|
|
216
|
+
const l = p.attributes.name, f = p.id;
|
|
217
|
+
return { name: l, id: f };
|
|
218
218
|
});
|
|
219
219
|
t && t(d, c);
|
|
220
220
|
},
|
|
@@ -293,12 +293,12 @@ function ve(e, t, n = void 0, s = void 0) {
|
|
|
293
293
|
Accept: "application/json,text/javascript,*/*"
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
|
-
onComplete(
|
|
297
|
-
n && n(JSON.parse(
|
|
296
|
+
onComplete(f) {
|
|
297
|
+
n && n(JSON.parse(f));
|
|
298
298
|
},
|
|
299
|
-
onFailure(
|
|
300
|
-
const g =
|
|
301
|
-
g.msg =
|
|
299
|
+
onFailure(f, u) {
|
|
300
|
+
const g = f;
|
|
301
|
+
g.msg = u.errormsg, g.errCode = u.errorcode, s && s(g);
|
|
302
302
|
}
|
|
303
303
|
});
|
|
304
304
|
}
|
|
@@ -313,8 +313,8 @@ function V(e, t = void 0, n = void 0) {
|
|
|
313
313
|
t && t(JSON.parse(p));
|
|
314
314
|
},
|
|
315
315
|
onFailure(p, l) {
|
|
316
|
-
const
|
|
317
|
-
|
|
316
|
+
const f = p;
|
|
317
|
+
f.msg = l.errormsg, f.errCode = l.errorcode, n && n(f);
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
320
|
}
|
|
@@ -327,13 +327,13 @@ function Ie(e, t = void 0, n = void 0) {
|
|
|
327
327
|
m(i, {
|
|
328
328
|
opts: d,
|
|
329
329
|
onComplete(p) {
|
|
330
|
-
const l = JSON.parse(p),
|
|
330
|
+
const l = JSON.parse(p), f = {}, u = l.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
331
331
|
if (a && Object.keys(a).length > 0) {
|
|
332
|
-
const g =
|
|
333
|
-
|
|
332
|
+
const g = u.filter((y) => y.owner === a.email), h = u.filter((y) => y.members.includes(a.email)), S = g.concat(h);
|
|
333
|
+
f.iam = S, f.UG = u, f.iamMember = h, V(
|
|
334
334
|
e,
|
|
335
335
|
(y) => {
|
|
336
|
-
|
|
336
|
+
f.rules = y, t && t(f);
|
|
337
337
|
},
|
|
338
338
|
(y) => {
|
|
339
339
|
n && n(y);
|
|
@@ -440,8 +440,8 @@ var X = function(e, t, n, s) {
|
|
|
440
440
|
var i = e.length;
|
|
441
441
|
o > 0 && i > o && (i = o);
|
|
442
442
|
for (var c = 0; c < i; ++c) {
|
|
443
|
-
var d = e[c].replace(r, "%20"), p = d.indexOf(n), l,
|
|
444
|
-
p >= 0 ? (l = d.substr(0, p),
|
|
443
|
+
var d = e[c].replace(r, "%20"), p = d.indexOf(n), l, f, u, g;
|
|
444
|
+
p >= 0 ? (l = d.substr(0, p), f = d.substr(p + 1)) : (l = d, f = ""), u = decodeURIComponent(l), g = decodeURIComponent(f), B(a, u) ? Array.isArray(a[u]) ? a[u].push(g) : a[u] = [a[u], g] : a[u] = g;
|
|
445
445
|
}
|
|
446
446
|
return a;
|
|
447
447
|
}, N = function(e) {
|
|
@@ -621,10 +621,10 @@ function q(e, t, n, s, a, r, o = void 0, i = void 0) {
|
|
|
621
621
|
ENO_CSRF_TOKEN: r
|
|
622
622
|
},
|
|
623
623
|
onComplete(d, p, l) {
|
|
624
|
-
const
|
|
625
|
-
|
|
624
|
+
const f = JSON.parse(d).data[0].dataelements, u = new FormData();
|
|
625
|
+
u.append("__fcs__jobTicket", f.ticket), u.append("file_0", s, a);
|
|
626
626
|
const g = {};
|
|
627
|
-
g.method = "POST", g.data =
|
|
627
|
+
g.method = "POST", g.data = u, g.onComplete = function(h) {
|
|
628
628
|
let S = "temp_" + Date.now(), y = {
|
|
629
629
|
method: "PUT",
|
|
630
630
|
headers: {
|
|
@@ -660,7 +660,7 @@ function q(e, t, n, s, a, r, o = void 0, i = void 0) {
|
|
|
660
660
|
);
|
|
661
661
|
}, g.onFailure = function(h) {
|
|
662
662
|
i && i(h);
|
|
663
|
-
}, g.timeout = 0, m(
|
|
663
|
+
}, g.timeout = 0, m(f.ticketURL, g);
|
|
664
664
|
}
|
|
665
665
|
});
|
|
666
666
|
}
|
|
@@ -680,8 +680,8 @@ async function Re(e, t, n, s, a = void 0, r = void 0) {
|
|
|
680
680
|
headers: {
|
|
681
681
|
ENO_CSRF_TOKEN: i.value
|
|
682
682
|
},
|
|
683
|
-
onComplete(
|
|
684
|
-
const h = JSON.parse(
|
|
683
|
+
onComplete(f, u, g) {
|
|
684
|
+
const h = JSON.parse(f).data[0].dataelements;
|
|
685
685
|
d.append("__fcs__jobTicket", h.ticket), d.append("filename", p, n);
|
|
686
686
|
const S = {
|
|
687
687
|
method: "POST",
|
|
@@ -742,7 +742,7 @@ function b(e, t = void 0, n = void 0, s = void 0, a = void 0, r = void 0, o = !1
|
|
|
742
742
|
method: "GET",
|
|
743
743
|
onComplete(c) {
|
|
744
744
|
const d = JSON.parse(c);
|
|
745
|
-
let p = "", l,
|
|
745
|
+
let p = "", l, f, u;
|
|
746
746
|
if (t) {
|
|
747
747
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
748
748
|
if (g) {
|
|
@@ -753,29 +753,29 @@ function b(e, t = void 0, n = void 0, s = void 0, a = void 0, r = void 0, o = !1
|
|
|
753
753
|
(C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
|
|
754
754
|
)
|
|
755
755
|
), n && (Array.isArray(n) ? n.forEach((S) => {
|
|
756
|
-
|
|
756
|
+
u || h.forEach((y) => {
|
|
757
757
|
if (S === y.role.name && s === y.organization.title)
|
|
758
|
-
|
|
758
|
+
u = S, f = s;
|
|
759
759
|
else if (S === y.role.name) {
|
|
760
760
|
let _ = h.filter(
|
|
761
761
|
(C) => C.role.name === S
|
|
762
762
|
);
|
|
763
|
-
_.length === 1 ? (
|
|
763
|
+
_.length === 1 ? (u = _[0].role.name, f = _[0].organization.title) : r(_);
|
|
764
764
|
}
|
|
765
765
|
});
|
|
766
766
|
}) : h.forEach((S) => {
|
|
767
767
|
if (n === S.role.name && s === S.organization.title)
|
|
768
|
-
|
|
768
|
+
u = n, f = s;
|
|
769
769
|
else if (n === S.role.name) {
|
|
770
770
|
let y = h.filter(
|
|
771
771
|
(_) => _.role.name === n
|
|
772
772
|
);
|
|
773
|
-
y.length === 1 ? (
|
|
773
|
+
y.length === 1 ? (u = y[0].role.name, f = y[0].organization.title) : r(y);
|
|
774
774
|
}
|
|
775
775
|
}));
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
|
-
l &&
|
|
778
|
+
l && f && u ? (p = u + "." + f + "." + l, a(p)) : d.preferredcredentials && o ? (p = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, a(p)) : r && (p = u + "." + f + "." + l, r(p));
|
|
779
779
|
},
|
|
780
780
|
onFailure(c, d) {
|
|
781
781
|
console.log("Erreur de récupération du contexte de sécurité. => ", {
|
|
@@ -885,17 +885,23 @@ function Z(e, t, n = void 0, s = void 0, a = void 0) {
|
|
|
885
885
|
const d = c.data;
|
|
886
886
|
c.success === !0 && (n && n(), d.forEach((p) => {
|
|
887
887
|
try {
|
|
888
|
-
const l = p.dataelements.fileName,
|
|
889
|
-
m(
|
|
890
|
-
onComplete: (
|
|
888
|
+
const l = p.dataelements.fileName, f = p.dataelements.ticketURL;
|
|
889
|
+
m(f, {
|
|
890
|
+
onComplete: (u) => {
|
|
891
|
+
let g;
|
|
892
|
+
try {
|
|
893
|
+
g = JSON.parse(u);
|
|
894
|
+
} catch {
|
|
895
|
+
g = u;
|
|
896
|
+
}
|
|
891
897
|
s && s({
|
|
892
898
|
objectId: p.id,
|
|
893
899
|
fileName: l,
|
|
894
|
-
data:
|
|
900
|
+
data: g
|
|
895
901
|
});
|
|
896
902
|
},
|
|
897
|
-
onFailure: (
|
|
898
|
-
console.log("error http",
|
|
903
|
+
onFailure: (u) => {
|
|
904
|
+
console.log("error http", u);
|
|
899
905
|
}
|
|
900
906
|
});
|
|
901
907
|
} catch (l) {
|
|
@@ -1353,16 +1359,16 @@ function He(e, t, n = void 0, s = void 0) {
|
|
|
1353
1359
|
Accept: "application/json"
|
|
1354
1360
|
},
|
|
1355
1361
|
data: JSON.stringify(l),
|
|
1356
|
-
onComplete(
|
|
1357
|
-
JSON.parse(
|
|
1358
|
-
const
|
|
1362
|
+
onComplete(f) {
|
|
1363
|
+
JSON.parse(f);
|
|
1364
|
+
const u = {};
|
|
1359
1365
|
setTimeout(() => {
|
|
1360
1366
|
H(
|
|
1361
1367
|
e,
|
|
1362
1368
|
o,
|
|
1363
1369
|
(g) => {
|
|
1364
1370
|
const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", y = g.data[0].relateddata.ownerInfo[0].dataelements.name;
|
|
1365
|
-
|
|
1371
|
+
u.name = h, u.ext = S, u.createBy = y, t.info = { ...u }, ie(
|
|
1366
1372
|
e,
|
|
1367
1373
|
t,
|
|
1368
1374
|
(_) => {
|
|
@@ -1380,9 +1386,9 @@ function He(e, t, n = void 0, s = void 0) {
|
|
|
1380
1386
|
);
|
|
1381
1387
|
}, 2e3);
|
|
1382
1388
|
},
|
|
1383
|
-
onFailure(
|
|
1384
|
-
const g =
|
|
1385
|
-
g.msg =
|
|
1389
|
+
onFailure(f, u) {
|
|
1390
|
+
const g = f;
|
|
1391
|
+
g.msg = u.errormsg, g.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
|
|
1386
1392
|
}
|
|
1387
1393
|
});
|
|
1388
1394
|
}
|
|
@@ -1464,8 +1470,8 @@ function ie(e, t, n = void 0, s = void 0) {
|
|
|
1464
1470
|
n(l);
|
|
1465
1471
|
},
|
|
1466
1472
|
onFailure(p, l) {
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1473
|
+
const f = p;
|
|
1474
|
+
f.msg = l.errormsg, f.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f), console.log("Erreur de recuperation d'id du doc et des tags", p);
|
|
1469
1475
|
}
|
|
1470
1476
|
});
|
|
1471
1477
|
}
|
|
@@ -1500,8 +1506,8 @@ function ze(e, t, n = void 0, s = void 0) {
|
|
|
1500
1506
|
n && n(p);
|
|
1501
1507
|
},
|
|
1502
1508
|
onFailure(p, l) {
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1509
|
+
const f = p;
|
|
1510
|
+
f.msg = l.errormsg, f.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
|
|
1505
1511
|
}
|
|
1506
1512
|
});
|
|
1507
1513
|
}
|
|
@@ -1616,21 +1622,21 @@ function et(e, t = void 0, n = void 0) {
|
|
|
1616
1622
|
},
|
|
1617
1623
|
onComplete(i, c, d) {
|
|
1618
1624
|
const l = JSON.parse(i).result;
|
|
1619
|
-
let
|
|
1620
|
-
l.forEach((
|
|
1625
|
+
let f = 0;
|
|
1626
|
+
l.forEach((u) => {
|
|
1621
1627
|
const g = {
|
|
1622
|
-
description:
|
|
1623
|
-
id:
|
|
1624
|
-
title:
|
|
1625
|
-
owner:
|
|
1626
|
-
role:
|
|
1627
|
-
access:
|
|
1628
|
+
description: u.description,
|
|
1629
|
+
id: u.id,
|
|
1630
|
+
title: u.title,
|
|
1631
|
+
owner: u.owner,
|
|
1632
|
+
role: u.role,
|
|
1633
|
+
access: u.access
|
|
1628
1634
|
};
|
|
1629
1635
|
ae(
|
|
1630
1636
|
e,
|
|
1631
|
-
|
|
1637
|
+
u.id,
|
|
1632
1638
|
(h) => {
|
|
1633
|
-
|
|
1639
|
+
f++, g.members = h, r.push(g), f === l.length && t && t(r);
|
|
1634
1640
|
},
|
|
1635
1641
|
(h) => n(h)
|
|
1636
1642
|
);
|
|
@@ -1725,13 +1731,13 @@ function nt(e, t, n = void 0, s = void 0) {
|
|
|
1725
1731
|
},
|
|
1726
1732
|
data: JSON.stringify(i),
|
|
1727
1733
|
type: "json",
|
|
1728
|
-
onComplete(l,
|
|
1734
|
+
onComplete(l, f, u) {
|
|
1729
1735
|
const g = l;
|
|
1730
|
-
g.reponse = JSON.parse(
|
|
1736
|
+
g.reponse = JSON.parse(u.response), g.status = u.status, n && n(g), c.id_msg = g.result.id, R(e, c);
|
|
1731
1737
|
},
|
|
1732
|
-
onFailure(l,
|
|
1738
|
+
onFailure(l, f, u) {
|
|
1733
1739
|
const g = l;
|
|
1734
|
-
g.msg =
|
|
1740
|
+
g.msg = f.errormsg, g.status = f.status, s && s(g);
|
|
1735
1741
|
}
|
|
1736
1742
|
});
|
|
1737
1743
|
});
|
|
@@ -1749,13 +1755,13 @@ function oe(e, t, n, s) {
|
|
|
1749
1755
|
onComplete(o) {
|
|
1750
1756
|
const i = JSON.parse(o), c = [];
|
|
1751
1757
|
i.result.forEach((l) => {
|
|
1752
|
-
l.users = l.users.sort((
|
|
1758
|
+
l.users = l.users.sort((f, u) => f.login.localeCompare(u.login)), l.users.length === t.length && c.push(l);
|
|
1753
1759
|
});
|
|
1754
1760
|
const d = t.sort(), p = c.find((l) => {
|
|
1755
|
-
const
|
|
1756
|
-
return l.users.forEach((
|
|
1757
|
-
|
|
1758
|
-
}), JSON.stringify(
|
|
1761
|
+
const f = [];
|
|
1762
|
+
return l.users.forEach((u) => {
|
|
1763
|
+
f.push(u.login);
|
|
1764
|
+
}), JSON.stringify(f) === JSON.stringify(d);
|
|
1759
1765
|
});
|
|
1760
1766
|
n && p !== void 0 ? n(p) : (s || p === void 0) && s(p);
|
|
1761
1767
|
},
|
|
@@ -1848,13 +1854,13 @@ function st(e, t, n = void 0, s = void 0) {
|
|
|
1848
1854
|
headers: d,
|
|
1849
1855
|
data: JSON.stringify(i),
|
|
1850
1856
|
type: "json",
|
|
1851
|
-
onComplete(p, l,
|
|
1852
|
-
const
|
|
1853
|
-
|
|
1857
|
+
onComplete(p, l, f) {
|
|
1858
|
+
const u = JSON.parse(p);
|
|
1859
|
+
u.status = f.status, u.response = f.response, n && n(u);
|
|
1854
1860
|
},
|
|
1855
|
-
onFailure(p, l,
|
|
1856
|
-
const
|
|
1857
|
-
|
|
1861
|
+
onFailure(p, l, f) {
|
|
1862
|
+
const u = p;
|
|
1863
|
+
u.status = l.status, u.response = l.errormsg, s && s(u);
|
|
1858
1864
|
}
|
|
1859
1865
|
});
|
|
1860
1866
|
});
|