@beam3_dev/api_module 0.0.274 → 0.0.276
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 +142 -138
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +6 -6
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { v4 as K } from "uuid";
|
|
2
2
|
import { DateTime as O } from "luxon";
|
|
3
|
-
import { requirejs as $, widget as
|
|
3
|
+
import { requirejs as $, widget as D } from "@widget-lab/3ddashboard-utils";
|
|
4
4
|
function B() {
|
|
5
5
|
return K();
|
|
6
6
|
}
|
|
@@ -89,7 +89,7 @@ async function we(e, t = W) {
|
|
|
89
89
|
} : n;
|
|
90
90
|
for (let c of i)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(
|
|
92
|
+
(p) => p.start === O.fromISO(c.date).toISODate() && p.name === "Férié : " + c.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
94
|
name: "Férié : " + c.comment,
|
|
95
95
|
start: O.fromISO(c.date).toISODate(),
|
|
@@ -155,7 +155,7 @@ function be(e, t = void 0) {
|
|
|
155
155
|
$(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
|
|
156
156
|
let n;
|
|
157
157
|
n === void 0 && (n = s.createProxy({
|
|
158
|
-
widgetId:
|
|
158
|
+
widgetId: D.id,
|
|
159
159
|
filteringMode: "WithFilteringServices"
|
|
160
160
|
}), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
|
|
161
161
|
});
|
|
@@ -171,7 +171,7 @@ async function $e(e, t = void 0, s = void 0) {
|
|
|
171
171
|
await $(
|
|
172
172
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
173
173
|
(n) => {
|
|
174
|
-
(!e || e === "") && (e =
|
|
174
|
+
(!e || e === "") && (e = D.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
|
|
175
175
|
n.getPlatformServices({
|
|
176
176
|
platformId: e,
|
|
177
177
|
onComplete: t,
|
|
@@ -195,7 +195,7 @@ function q() {
|
|
|
195
195
|
};
|
|
196
196
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function v(e, t = void 0, s = void 0) {
|
|
199
199
|
if (e.tenant) {
|
|
200
200
|
const n = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
|
|
201
201
|
m(n, {
|
|
@@ -246,9 +246,9 @@ function Ie(e, t, s) {
|
|
|
246
246
|
Accept: "application/json"
|
|
247
247
|
},
|
|
248
248
|
onComplete(r, o, a) {
|
|
249
|
-
const c = JSON.parse(r), d = c.data.map((
|
|
250
|
-
const
|
|
251
|
-
return { name:
|
|
249
|
+
const c = JSON.parse(r), d = c.data.map((p) => {
|
|
250
|
+
const u = p.attributes.name, f = p.id;
|
|
251
|
+
return { name: u, id: f };
|
|
252
252
|
});
|
|
253
253
|
t && t(d, c);
|
|
254
254
|
},
|
|
@@ -310,10 +310,10 @@ function Fe(e, t, s = void 0, n = void 0) {
|
|
|
310
310
|
onComplete(d) {
|
|
311
311
|
s && s(JSON.parse(d));
|
|
312
312
|
},
|
|
313
|
-
onFailure(d,
|
|
313
|
+
onFailure(d, p) {
|
|
314
314
|
console.log(d);
|
|
315
|
-
const
|
|
316
|
-
|
|
315
|
+
const u = d;
|
|
316
|
+
u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
319
|
}
|
|
@@ -343,12 +343,12 @@ function Y(e, t = void 0, s = void 0) {
|
|
|
343
343
|
}, d = `${r}${o}${a}`;
|
|
344
344
|
m(d, {
|
|
345
345
|
OPTsH: c,
|
|
346
|
-
onComplete(
|
|
347
|
-
t && t(JSON.parse(
|
|
346
|
+
onComplete(p) {
|
|
347
|
+
t && t(JSON.parse(p));
|
|
348
348
|
},
|
|
349
|
-
onFailure(
|
|
350
|
-
const f =
|
|
351
|
-
f.msg =
|
|
349
|
+
onFailure(p, u) {
|
|
350
|
+
const f = p;
|
|
351
|
+
f.msg = u.errormsg, f.errCode = u.errorcode, s && s(f);
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
354
|
}
|
|
@@ -360,8 +360,8 @@ function je(e, t = void 0, s = void 0) {
|
|
|
360
360
|
try {
|
|
361
361
|
m(a, {
|
|
362
362
|
opts: d,
|
|
363
|
-
onComplete(
|
|
364
|
-
const
|
|
363
|
+
onComplete(p) {
|
|
364
|
+
const u = JSON.parse(p), f = {}, l = u.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
365
365
|
if (i && Object.keys(i).length > 0) {
|
|
366
366
|
const g = l.filter((_) => _.owner === i.email), h = l.filter((_) => _.members.includes(i.email)), y = g.concat(h);
|
|
367
367
|
f.iam = y, f.UG = l, f.iamMember = h, Y(
|
|
@@ -375,12 +375,12 @@ function je(e, t = void 0, s = void 0) {
|
|
|
375
375
|
);
|
|
376
376
|
}
|
|
377
377
|
},
|
|
378
|
-
onFailure(
|
|
379
|
-
s && s(
|
|
378
|
+
onFailure(p) {
|
|
379
|
+
s && s(p);
|
|
380
380
|
}
|
|
381
381
|
});
|
|
382
|
-
} catch (
|
|
383
|
-
console.log(
|
|
382
|
+
} catch (p) {
|
|
383
|
+
console.log(p);
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
function Ae(e, t) {
|
|
@@ -389,7 +389,7 @@ function Ae(e, t) {
|
|
|
389
389
|
method: "DELETE"
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function De(e, t, s, n = void 0, i = void 0) {
|
|
393
393
|
const { space: r, tenant: o } = e, a = {
|
|
394
394
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
395
395
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
@@ -398,21 +398,21 @@ function ve(e, t, s, n = void 0, i = void 0) {
|
|
|
398
398
|
nexURImem: "/members",
|
|
399
399
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
400
400
|
OPTsTenant: `tenant=dstenant:${o}`
|
|
401
|
-
}, c = s, d = `${r}${a.URIUGr}/${t}`,
|
|
401
|
+
}, c = s, d = `${r}${a.URIUGr}/${t}`, p = JSON.stringify(c);
|
|
402
402
|
m(d, {
|
|
403
403
|
headers: F,
|
|
404
404
|
method: "PATCH",
|
|
405
|
-
data:
|
|
405
|
+
data: p,
|
|
406
406
|
type: "json",
|
|
407
|
-
onComplete(
|
|
408
|
-
n && n(
|
|
407
|
+
onComplete(u) {
|
|
408
|
+
n && n(u);
|
|
409
409
|
},
|
|
410
|
-
onFailure(
|
|
411
|
-
i && i(
|
|
410
|
+
onFailure(u) {
|
|
411
|
+
i && i(u);
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function ve(e, t, s, n = void 0, i = void 0) {
|
|
416
416
|
const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
417
417
|
m(a, {
|
|
418
418
|
method: "PATCH",
|
|
@@ -427,7 +427,7 @@ function xe(e, t, s, n = void 0, i = void 0) {
|
|
|
427
427
|
}
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function xe(e, t, s = void 0, n = void 0) {
|
|
431
431
|
const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
432
432
|
m(o, {
|
|
433
433
|
opts: {
|
|
@@ -474,8 +474,8 @@ var Q = function(e, t, s, n) {
|
|
|
474
474
|
var a = e.length;
|
|
475
475
|
o > 0 && a > o && (a = o);
|
|
476
476
|
for (var c = 0; c < a; ++c) {
|
|
477
|
-
var d = e[c].replace(r, "%20"),
|
|
478
|
-
|
|
477
|
+
var d = e[c].replace(r, "%20"), p = d.indexOf(s), u, f, l, g;
|
|
478
|
+
p >= 0 ? (u = d.substr(0, p), f = d.substr(p + 1)) : (u = d, f = ""), l = decodeURIComponent(u), g = decodeURIComponent(f), z(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
|
|
479
479
|
}
|
|
480
480
|
return i;
|
|
481
481
|
}, N = function(e) {
|
|
@@ -499,7 +499,7 @@ var Q = function(e, t, s, n) {
|
|
|
499
499
|
};
|
|
500
500
|
I.decode = I.parse = Q;
|
|
501
501
|
I.encode = I.stringify = Z;
|
|
502
|
-
async function
|
|
502
|
+
async function x(e, t = void 0, s = void 0, n = void 0) {
|
|
503
503
|
const i = e.space;
|
|
504
504
|
if (t === void 0) {
|
|
505
505
|
console.log("Le paramètre docid est obligatoire");
|
|
@@ -532,8 +532,8 @@ async function Pe(e, t = void 0, s = void 0, n = void 0) {
|
|
|
532
532
|
},
|
|
533
533
|
data: o,
|
|
534
534
|
onComplete(a, c, d) {
|
|
535
|
-
const
|
|
536
|
-
s && s(
|
|
535
|
+
const p = JSON.parse(a);
|
|
536
|
+
s && s(p);
|
|
537
537
|
},
|
|
538
538
|
onFailure(a) {
|
|
539
539
|
n && n(a);
|
|
@@ -654,7 +654,7 @@ function ee(e, t, s, n, i, r, o = void 0, a = void 0) {
|
|
|
654
654
|
headers: {
|
|
655
655
|
ENO_CSRF_TOKEN: e.token
|
|
656
656
|
},
|
|
657
|
-
onComplete(d,
|
|
657
|
+
onComplete(d, p, u) {
|
|
658
658
|
const f = JSON.parse(d).csrf, l = JSON.parse(d).data[0].dataelements, g = new FormData();
|
|
659
659
|
let h;
|
|
660
660
|
n instanceof Blob ? h = n : h = new Blob([n], {
|
|
@@ -735,7 +735,7 @@ async function Me(e, t, s = void 0, n = void 0) {
|
|
|
735
735
|
});
|
|
736
736
|
}
|
|
737
737
|
async function Je(e, t, s, n = void 0, i = void 0) {
|
|
738
|
-
e.space, e.token, e.ctx,
|
|
738
|
+
e.space, e.token, e.ctx, x(
|
|
739
739
|
e,
|
|
740
740
|
t,
|
|
741
741
|
(r) => {
|
|
@@ -885,11 +885,11 @@ function U(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, o = !1
|
|
|
885
885
|
method: "GET",
|
|
886
886
|
onComplete(c) {
|
|
887
887
|
const d = JSON.parse(c);
|
|
888
|
-
let
|
|
888
|
+
let p = "", u, f, l;
|
|
889
889
|
if (t) {
|
|
890
890
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
891
891
|
if (g) {
|
|
892
|
-
|
|
892
|
+
u = t;
|
|
893
893
|
let h = g.couples;
|
|
894
894
|
h = h.filter(
|
|
895
895
|
(y, _, S) => _ === S.findIndex(
|
|
@@ -918,7 +918,7 @@ function U(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, o = !1
|
|
|
918
918
|
}));
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
|
-
|
|
921
|
+
u && f && l ? (p = l + "." + f + "." + u, i(p)) : d.preferredcredentials && o ? (p = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(p)) : r && (p = l + "." + f + "." + u, r(p));
|
|
922
922
|
},
|
|
923
923
|
onFailure(c, d) {
|
|
924
924
|
console.warn("Erreur de récupération du contexte de sécurité. => ", {
|
|
@@ -1015,9 +1015,9 @@ function ae(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
1015
1015
|
type: "json",
|
|
1016
1016
|
onComplete(c) {
|
|
1017
1017
|
const d = c.data;
|
|
1018
|
-
c.success === !0 && (s && s(), d.forEach((
|
|
1018
|
+
c.success === !0 && (s && s(), d.forEach((p) => {
|
|
1019
1019
|
try {
|
|
1020
|
-
const
|
|
1020
|
+
const u = p.dataelements.fileName, f = p.dataelements.ticketURL;
|
|
1021
1021
|
m(f, {
|
|
1022
1022
|
onComplete: (l, g) => {
|
|
1023
1023
|
let h;
|
|
@@ -1027,9 +1027,9 @@ function ae(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
1027
1027
|
h = l.blob();
|
|
1028
1028
|
}
|
|
1029
1029
|
n && n({
|
|
1030
|
-
objectId:
|
|
1030
|
+
objectId: p.id,
|
|
1031
1031
|
headers: g,
|
|
1032
|
-
fileName:
|
|
1032
|
+
fileName: u,
|
|
1033
1033
|
data: h
|
|
1034
1034
|
});
|
|
1035
1035
|
},
|
|
@@ -1037,8 +1037,8 @@ function ae(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
1037
1037
|
console.log("error http", l);
|
|
1038
1038
|
}
|
|
1039
1039
|
});
|
|
1040
|
-
} catch (
|
|
1041
|
-
console.log(
|
|
1040
|
+
} catch (u) {
|
|
1041
|
+
console.log(u), i && i(u);
|
|
1042
1042
|
}
|
|
1043
1043
|
}));
|
|
1044
1044
|
},
|
|
@@ -1258,7 +1258,7 @@ function Ve(e, t, s, n, i = void 0, r = void 0) {
|
|
|
1258
1258
|
items: []
|
|
1259
1259
|
};
|
|
1260
1260
|
t && (d.parentId = t), d.items.push(c);
|
|
1261
|
-
let
|
|
1261
|
+
let p = {
|
|
1262
1262
|
method: "POST",
|
|
1263
1263
|
headers: {
|
|
1264
1264
|
Accept: "application/json",
|
|
@@ -1268,14 +1268,14 @@ function Ve(e, t, s, n, i = void 0, r = void 0) {
|
|
|
1268
1268
|
},
|
|
1269
1269
|
data: JSON.stringify(d),
|
|
1270
1270
|
type: "json",
|
|
1271
|
-
onComplete(
|
|
1272
|
-
i && i(
|
|
1271
|
+
onComplete(u) {
|
|
1272
|
+
i && i(u);
|
|
1273
1273
|
},
|
|
1274
|
-
onFailure(
|
|
1275
|
-
r && r(
|
|
1274
|
+
onFailure(u) {
|
|
1275
|
+
r && r(u);
|
|
1276
1276
|
}
|
|
1277
1277
|
};
|
|
1278
|
-
m(a,
|
|
1278
|
+
m(a, p);
|
|
1279
1279
|
});
|
|
1280
1280
|
}
|
|
1281
1281
|
function qe(e, t, s, n, i = void 0, r = void 0) {
|
|
@@ -1462,7 +1462,7 @@ function nt(e, t, s = void 0, n = void 0) {
|
|
|
1462
1462
|
uri: "/resources/6w/tags",
|
|
1463
1463
|
otpCTX: "SecurityContext=preferred",
|
|
1464
1464
|
optTenant: `tenant=${r}`
|
|
1465
|
-
},
|
|
1465
|
+
}, p = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, u = {
|
|
1466
1466
|
tag: [
|
|
1467
1467
|
{
|
|
1468
1468
|
subject: [
|
|
@@ -1477,18 +1477,18 @@ function nt(e, t, s = void 0, n = void 0) {
|
|
|
1477
1477
|
}
|
|
1478
1478
|
]
|
|
1479
1479
|
};
|
|
1480
|
-
m(
|
|
1480
|
+
m(p, {
|
|
1481
1481
|
method: "PUT",
|
|
1482
1482
|
headers: {
|
|
1483
1483
|
"Content-Type": "application/json",
|
|
1484
1484
|
Accept: "application/json"
|
|
1485
1485
|
},
|
|
1486
|
-
data: JSON.stringify(
|
|
1486
|
+
data: JSON.stringify(u),
|
|
1487
1487
|
onComplete(f) {
|
|
1488
1488
|
JSON.parse(f);
|
|
1489
1489
|
const l = {};
|
|
1490
1490
|
setTimeout(() => {
|
|
1491
|
-
|
|
1491
|
+
x(
|
|
1492
1492
|
e,
|
|
1493
1493
|
o,
|
|
1494
1494
|
(g) => {
|
|
@@ -1590,13 +1590,13 @@ function ue(e, t, s = void 0, n = void 0) {
|
|
|
1590
1590
|
method: "POST",
|
|
1591
1591
|
headers: a,
|
|
1592
1592
|
data: JSON.stringify(d),
|
|
1593
|
-
onComplete(
|
|
1594
|
-
const
|
|
1595
|
-
s(
|
|
1593
|
+
onComplete(p) {
|
|
1594
|
+
const u = JSON.parse(p);
|
|
1595
|
+
s(u);
|
|
1596
1596
|
},
|
|
1597
|
-
onFailure(
|
|
1598
|
-
const f =
|
|
1599
|
-
f.msg =
|
|
1597
|
+
onFailure(p, u) {
|
|
1598
|
+
const f = p;
|
|
1599
|
+
f.msg = u.errormsg, f.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f), console.log("Erreur de recuperation d'id du doc et des tags", p);
|
|
1600
1600
|
}
|
|
1601
1601
|
});
|
|
1602
1602
|
}
|
|
@@ -1627,12 +1627,12 @@ function st(e, t, s = void 0, n = void 0) {
|
|
|
1627
1627
|
"Content-Type": "application/json",
|
|
1628
1628
|
Accept: "application/json,text/javascript,*/*"
|
|
1629
1629
|
},
|
|
1630
|
-
onComplete(
|
|
1631
|
-
s && s(
|
|
1630
|
+
onComplete(p) {
|
|
1631
|
+
s && s(p);
|
|
1632
1632
|
},
|
|
1633
|
-
onFailure(
|
|
1634
|
-
const f =
|
|
1635
|
-
f.msg =
|
|
1633
|
+
onFailure(p, u) {
|
|
1634
|
+
const f = p;
|
|
1635
|
+
f.msg = u.errormsg, f.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f);
|
|
1636
1636
|
}
|
|
1637
1637
|
});
|
|
1638
1638
|
}
|
|
@@ -1653,9 +1653,9 @@ function it(e, t = "", s = void 0, n = void 0) {
|
|
|
1653
1653
|
onComplete(d) {
|
|
1654
1654
|
s && s(JSON.parse(d));
|
|
1655
1655
|
},
|
|
1656
|
-
onFailure(d,
|
|
1657
|
-
const
|
|
1658
|
-
|
|
1656
|
+
onFailure(d, p) {
|
|
1657
|
+
const u = d;
|
|
1658
|
+
u.msg = p.error, n && n(u);
|
|
1659
1659
|
}
|
|
1660
1660
|
});
|
|
1661
1661
|
}
|
|
@@ -1746,9 +1746,9 @@ function rt(e, t = void 0, s = void 0) {
|
|
|
1746
1746
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1747
1747
|
},
|
|
1748
1748
|
onComplete(a, c, d) {
|
|
1749
|
-
const
|
|
1749
|
+
const u = JSON.parse(a).result;
|
|
1750
1750
|
let f = 0;
|
|
1751
|
-
|
|
1751
|
+
u.forEach((l) => {
|
|
1752
1752
|
const g = {
|
|
1753
1753
|
description: l.description,
|
|
1754
1754
|
id: l.id,
|
|
@@ -1761,7 +1761,7 @@ function rt(e, t = void 0, s = void 0) {
|
|
|
1761
1761
|
e,
|
|
1762
1762
|
l.id,
|
|
1763
1763
|
(h) => {
|
|
1764
|
-
f++, g.members = h, r.push(g), f ===
|
|
1764
|
+
f++, g.members = h, r.push(g), f === u.length && t && t(r);
|
|
1765
1765
|
},
|
|
1766
1766
|
(h) => s(h)
|
|
1767
1767
|
);
|
|
@@ -1836,23 +1836,23 @@ function dt(e, t, s = void 0, n = void 0) {
|
|
|
1836
1836
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
1837
1837
|
msg: fe(t.msg)
|
|
1838
1838
|
};
|
|
1839
|
-
let
|
|
1839
|
+
let p = !1;
|
|
1840
1840
|
le(
|
|
1841
1841
|
c.users,
|
|
1842
|
-
(
|
|
1843
|
-
|
|
1842
|
+
(u) => {
|
|
1843
|
+
u !== void 0 && (d.id_msg = u.id, p = !0, A(e, d));
|
|
1844
1844
|
},
|
|
1845
|
-
(
|
|
1846
|
-
|
|
1845
|
+
(u) => {
|
|
1846
|
+
p = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", u), n && n(u), d.id_msg = "";
|
|
1847
1847
|
}
|
|
1848
|
-
),
|
|
1849
|
-
|
|
1848
|
+
), p === !1 && setTimeout(() => {
|
|
1849
|
+
p === !1 && C(e, (u) => {
|
|
1850
1850
|
m(a, {
|
|
1851
1851
|
method: "POST",
|
|
1852
1852
|
headers: {
|
|
1853
1853
|
"Content-Type": "application/json",
|
|
1854
1854
|
Accept: "application/json",
|
|
1855
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1855
|
+
"X-DS-SWYM-CSRFTOKEN": u.result.ServerToken
|
|
1856
1856
|
},
|
|
1857
1857
|
data: JSON.stringify(c),
|
|
1858
1858
|
type: "json",
|
|
@@ -1879,16 +1879,16 @@ function le(e, t, s, n) {
|
|
|
1879
1879
|
},
|
|
1880
1880
|
onComplete(o) {
|
|
1881
1881
|
const a = JSON.parse(o), c = [];
|
|
1882
|
-
a.result.forEach((
|
|
1883
|
-
|
|
1882
|
+
a.result.forEach((u) => {
|
|
1883
|
+
u.users = u.users.sort((f, l) => f.login.localeCompare(l.login)), u.users.length === t.length && c.push(u);
|
|
1884
1884
|
});
|
|
1885
|
-
const d = t.sort(),
|
|
1885
|
+
const d = t.sort(), p = c.find((u) => {
|
|
1886
1886
|
const f = [];
|
|
1887
|
-
return
|
|
1887
|
+
return u.users.forEach((l) => {
|
|
1888
1888
|
f.push(l.login);
|
|
1889
1889
|
}), JSON.stringify(f) === JSON.stringify(d);
|
|
1890
1890
|
});
|
|
1891
|
-
s &&
|
|
1891
|
+
s && p !== void 0 ? s(p) : (n || p === void 0) && n(p);
|
|
1892
1892
|
},
|
|
1893
1893
|
onFailure(o) {
|
|
1894
1894
|
const a = o;
|
|
@@ -1923,13 +1923,13 @@ function A(e, t, s = void 0, n = void 0) {
|
|
|
1923
1923
|
},
|
|
1924
1924
|
data: JSON.stringify(o),
|
|
1925
1925
|
type: "json",
|
|
1926
|
-
onComplete(c, d,
|
|
1927
|
-
const
|
|
1928
|
-
|
|
1926
|
+
onComplete(c, d, p) {
|
|
1927
|
+
const u = c;
|
|
1928
|
+
u.status = p.status, u.response = JSON.parse(p.response), console.log("✅ _3dSwym_sendDirectMessageData => ", u), s && s(u);
|
|
1929
1929
|
},
|
|
1930
1930
|
onFailure(c, d) {
|
|
1931
|
-
const
|
|
1932
|
-
|
|
1931
|
+
const p = c;
|
|
1932
|
+
p.msg = d.errormsg, p.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
|
|
1933
1933
|
}
|
|
1934
1934
|
});
|
|
1935
1935
|
});
|
|
@@ -1969,13 +1969,13 @@ function ut(e, t, s = void 0, n = void 0) {
|
|
|
1969
1969
|
headers: d,
|
|
1970
1970
|
data: JSON.stringify(a),
|
|
1971
1971
|
type: "json",
|
|
1972
|
-
onComplete(
|
|
1973
|
-
const l = JSON.parse(
|
|
1972
|
+
onComplete(p, u, f) {
|
|
1973
|
+
const l = JSON.parse(p);
|
|
1974
1974
|
l.status = f.status, l.response = f.response, s && s(l);
|
|
1975
1975
|
},
|
|
1976
|
-
onFailure(
|
|
1977
|
-
const l =
|
|
1978
|
-
l.status =
|
|
1976
|
+
onFailure(p, u, f) {
|
|
1977
|
+
const l = p;
|
|
1978
|
+
l.status = u.status, l.response = u.errormsg, n && n(l);
|
|
1979
1979
|
}
|
|
1980
1980
|
});
|
|
1981
1981
|
});
|
|
@@ -2036,15 +2036,15 @@ function pt(e, t = void 0, s = void 0) {
|
|
|
2036
2036
|
},
|
|
2037
2037
|
method: "POST",
|
|
2038
2038
|
data: JSON.stringify(r),
|
|
2039
|
-
onComplete(c, d,
|
|
2040
|
-
const
|
|
2041
|
-
typeof
|
|
2039
|
+
onComplete(c, d, p) {
|
|
2040
|
+
const u = { response: c };
|
|
2041
|
+
typeof u.response == "string" && (u.response = JSON.parse(u.response)), u.status = p.status, t && t(u);
|
|
2042
2042
|
},
|
|
2043
|
-
onFailure(c, d,
|
|
2044
|
-
const
|
|
2043
|
+
onFailure(c, d, p) {
|
|
2044
|
+
const u = JSON.parse(d), f = JSON.parse(c), l = new Error(
|
|
2045
2045
|
`Erreur sur cette requête : ${n.base + n.uri}`,
|
|
2046
2046
|
{
|
|
2047
|
-
cause: { head:
|
|
2047
|
+
cause: { head: u, rep: f }
|
|
2048
2048
|
}
|
|
2049
2049
|
);
|
|
2050
2050
|
s && s(l);
|
|
@@ -2074,8 +2074,8 @@ function lt(e, t, s = void 0, n = void 0) {
|
|
|
2074
2074
|
s && s(a);
|
|
2075
2075
|
},
|
|
2076
2076
|
onFailure(a, c, d) {
|
|
2077
|
-
const
|
|
2078
|
-
|
|
2077
|
+
const p = a;
|
|
2078
|
+
p.status = c.status, p.response = c.errormsg, n && n(p);
|
|
2079
2079
|
}
|
|
2080
2080
|
});
|
|
2081
2081
|
});
|
|
@@ -2117,8 +2117,8 @@ function mt(e, t, s) {
|
|
|
2117
2117
|
community_id: a,
|
|
2118
2118
|
status_comment: c,
|
|
2119
2119
|
status_id: d,
|
|
2120
|
-
message:
|
|
2121
|
-
} = e,
|
|
2120
|
+
message: p
|
|
2121
|
+
} = e, u = {
|
|
2122
2122
|
base: `${n}`,
|
|
2123
2123
|
uri: "/api/idea/edit"
|
|
2124
2124
|
}, l = {
|
|
@@ -2136,7 +2136,7 @@ function mt(e, t, s) {
|
|
|
2136
2136
|
community_id: a,
|
|
2137
2137
|
status_comment: c,
|
|
2138
2138
|
status_id: d,
|
|
2139
|
-
message:
|
|
2139
|
+
message: p,
|
|
2140
2140
|
published: "1"
|
|
2141
2141
|
}
|
|
2142
2142
|
}),
|
|
@@ -2151,14 +2151,14 @@ function mt(e, t, s) {
|
|
|
2151
2151
|
s && s(g);
|
|
2152
2152
|
}
|
|
2153
2153
|
};
|
|
2154
|
-
m(
|
|
2154
|
+
m(u.base + u.uri, l);
|
|
2155
2155
|
}
|
|
2156
2156
|
function gt(e, t, s = void 0, n = void 0) {
|
|
2157
2157
|
const { _3DSwym: i } = e;
|
|
2158
2158
|
let { community_id: r, limit: o, page: a, search: c } = t;
|
|
2159
|
-
const d = [],
|
|
2160
|
-
let
|
|
2161
|
-
a || (a =
|
|
2159
|
+
const d = [], p = 1;
|
|
2160
|
+
let u = !1, f = 2;
|
|
2161
|
+
a || (a = p), o || (o = 100);
|
|
2162
2162
|
const l = {
|
|
2163
2163
|
uri: "/api/idea/list",
|
|
2164
2164
|
comId: `/community_id/${r}`,
|
|
@@ -2188,7 +2188,7 @@ function gt(e, t, s = void 0, n = void 0) {
|
|
|
2188
2188
|
}
|
|
2189
2189
|
}
|
|
2190
2190
|
if (s && f < a && !c) {
|
|
2191
|
-
|
|
2191
|
+
u = !0, s(d);
|
|
2192
2192
|
return;
|
|
2193
2193
|
}
|
|
2194
2194
|
y(_);
|
|
@@ -2200,7 +2200,7 @@ function gt(e, t, s = void 0, n = void 0) {
|
|
|
2200
2200
|
}
|
|
2201
2201
|
});
|
|
2202
2202
|
};
|
|
2203
|
-
|
|
2203
|
+
u || y(g);
|
|
2204
2204
|
});
|
|
2205
2205
|
}
|
|
2206
2206
|
function me(e) {
|
|
@@ -2298,9 +2298,9 @@ function ht(e, t = void 0, s = void 0) {
|
|
|
2298
2298
|
onComplete(d) {
|
|
2299
2299
|
t && t(d);
|
|
2300
2300
|
},
|
|
2301
|
-
onFailure(d,
|
|
2302
|
-
const
|
|
2303
|
-
|
|
2301
|
+
onFailure(d, p) {
|
|
2302
|
+
const u = d;
|
|
2303
|
+
u.status = p.status, u.response = p.errormsg, s && s(u);
|
|
2304
2304
|
}
|
|
2305
2305
|
});
|
|
2306
2306
|
} else
|
|
@@ -2320,11 +2320,15 @@ function yt(e, t = void 0, s = void 0) {
|
|
|
2320
2320
|
console.log("_3DSwym_get_currentUser | url", o), m(o, {
|
|
2321
2321
|
method: "GET",
|
|
2322
2322
|
onComplete(a, c, d) {
|
|
2323
|
+
let p = a.replace('"[', "[").replace(']"', "]").replace('"{', "{").replace('}"', "}").replace(/\\/g, "");
|
|
2324
|
+
console.log("result", p);
|
|
2323
2325
|
let u = {};
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2326
|
+
try {
|
|
2327
|
+
u = JSON.parse(p);
|
|
2328
|
+
} catch (f) {
|
|
2329
|
+
i("ERROR | _3DSwym_get_currentUser => JSON.Parse()", f);
|
|
2330
|
+
}
|
|
2331
|
+
console.log(u), u.first_name = u?.firstName, u.last_name = u?.lastName, console.log("_3DSwym_get_currentUser | info", u), r = u, n(u);
|
|
2328
2332
|
},
|
|
2329
2333
|
onFailure(a) {
|
|
2330
2334
|
i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", a);
|
|
@@ -2372,26 +2376,26 @@ function St(e, t = void 0, s = void 0) {
|
|
|
2372
2376
|
},
|
|
2373
2377
|
data: JSON.stringify({ richMessage: o }),
|
|
2374
2378
|
type: "json",
|
|
2375
|
-
onComplete(
|
|
2379
|
+
onComplete(p, u, f) {
|
|
2376
2380
|
const l = {
|
|
2377
|
-
response: typeof
|
|
2381
|
+
response: typeof p == "string" ? JSON.parse(p) : p
|
|
2378
2382
|
};
|
|
2379
2383
|
l.status = f.status, t && t(l);
|
|
2380
2384
|
},
|
|
2381
|
-
onFailure(
|
|
2382
|
-
s && s(
|
|
2385
|
+
onFailure(p) {
|
|
2386
|
+
s && s(p);
|
|
2383
2387
|
}
|
|
2384
2388
|
};
|
|
2385
2389
|
m(a, d);
|
|
2386
2390
|
}
|
|
2387
2391
|
function wt(e, t = void 0, s = void 0) {
|
|
2388
|
-
e.tenant &&
|
|
2392
|
+
e.tenant && v(e, (n) => {
|
|
2389
2393
|
const i = n.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
|
|
2390
2394
|
return t && t(i), i;
|
|
2391
2395
|
});
|
|
2392
2396
|
}
|
|
2393
2397
|
function Ct(e, t = void 0, s = void 0) {
|
|
2394
|
-
e.tenant &&
|
|
2398
|
+
e.tenant && v(e, (n) => {
|
|
2395
2399
|
const i = n.services.find(
|
|
2396
2400
|
(a) => a.id === "3dpassport"
|
|
2397
2401
|
)?.url, r = n.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
|
|
@@ -2596,7 +2600,7 @@ async function At(e, t, s, n, i = void 0, r = void 0) {
|
|
|
2596
2600
|
}
|
|
2597
2601
|
}
|
|
2598
2602
|
//!SECTION
|
|
2599
|
-
async function
|
|
2603
|
+
async function Dt(e, t, s, n = void 0, i = void 0) {
|
|
2600
2604
|
if (e.tenant) {
|
|
2601
2605
|
const r = e.tenant.toLowerCase();
|
|
2602
2606
|
fetch(
|
|
@@ -2612,11 +2616,11 @@ async function vt(e, t, s, n = void 0, i = void 0) {
|
|
|
2612
2616
|
}
|
|
2613
2617
|
}
|
|
2614
2618
|
//!SECTION
|
|
2615
|
-
function
|
|
2619
|
+
function vt(e) {
|
|
2616
2620
|
const t = "Hello " + e;
|
|
2617
2621
|
return console.log(t), t;
|
|
2618
2622
|
}
|
|
2619
|
-
function
|
|
2623
|
+
function xt(e, t = void 0, s = void 0) {
|
|
2620
2624
|
return console.log("credentials", e), new Promise((n) => {
|
|
2621
2625
|
if (e.token === "" && b(e), !e.space || e.space === "") {
|
|
2622
2626
|
const o = q();
|
|
@@ -2697,7 +2701,7 @@ function Dt(e, t = void 0, s = void 0) {
|
|
|
2697
2701
|
}
|
|
2698
2702
|
export {
|
|
2699
2703
|
B as UUID,
|
|
2700
|
-
|
|
2704
|
+
xt as _3DSearch_usersGroup,
|
|
2701
2705
|
Ge as _3DSpace_Create_Doc,
|
|
2702
2706
|
Je as _3DSpace_Update_Doc,
|
|
2703
2707
|
qe as _3DSpace_bookmark_addSubsciptions,
|
|
@@ -2709,7 +2713,7 @@ export {
|
|
|
2709
2713
|
ee as _3DSpace_file_update_csr,
|
|
2710
2714
|
Le as _3DSpace_file_url_csr,
|
|
2711
2715
|
R as _3DSpace_get_csrf,
|
|
2712
|
-
|
|
2716
|
+
x as _3DSpace_get_docInfo,
|
|
2713
2717
|
ae as _3DSpace_get_downloadTicket_multidoc,
|
|
2714
2718
|
Pe as _3DSpace_get_multiDocInfo,
|
|
2715
2719
|
U as _3DSpace_get_securityContexts,
|
|
@@ -2744,7 +2748,7 @@ export {
|
|
|
2744
2748
|
Nt as _Iterop_AddOrRemoveRows,
|
|
2745
2749
|
Ct as _Iterop_Auth_CAS,
|
|
2746
2750
|
kt as _Iterop_GetOneDependencyTable,
|
|
2747
|
-
|
|
2751
|
+
Dt as _Iterop_GetOneList,
|
|
2748
2752
|
jt as _Iterop_PatchDependencyTable,
|
|
2749
2753
|
At as _Iterop_PutDependencyTable,
|
|
2750
2754
|
It as _Iterop_businessTableSearchInRows,
|
|
@@ -2757,7 +2761,7 @@ export {
|
|
|
2757
2761
|
Rt as _Iterop_updateBusinessTable,
|
|
2758
2762
|
q as _getPlateformInfos,
|
|
2759
2763
|
$e as _getPlatformServices,
|
|
2760
|
-
|
|
2764
|
+
v as _getServiceUrl,
|
|
2761
2765
|
Ne as _getServiceUrl_3DPassport,
|
|
2762
2766
|
wt as _getServiceUrl_Iterop,
|
|
2763
2767
|
m as _httpCallAuthenticated,
|
|
@@ -2785,12 +2789,12 @@ export {
|
|
|
2785
2789
|
je as getUserGroupsList,
|
|
2786
2790
|
Y as getUsersGroupRules,
|
|
2787
2791
|
Ze as get_3DSpace_csrf,
|
|
2788
|
-
|
|
2789
|
-
|
|
2792
|
+
De as patchUserGroups,
|
|
2793
|
+
ve as patchUserGroupsControl,
|
|
2790
2794
|
Qe as pushDataIn3DSpace,
|
|
2791
|
-
|
|
2795
|
+
xe as readUserGroupControl,
|
|
2792
2796
|
st as removeTagToDoc,
|
|
2793
|
-
|
|
2797
|
+
vt as sayHello,
|
|
2794
2798
|
Ce as updateEvent
|
|
2795
2799
|
};
|
|
2796
2800
|
//# sourceMappingURL=wb3Api.js.map
|